@openmrs/esm-framework 3.2.1-pre.1098 → 3.2.1-pre.1104

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,3 +1,3 @@
1
1
  /*! For license information please see openmrs-esm-framework.js.LICENSE.txt */
2
- System.register([],(function(e,t){return{execute:function(){e((()=>{var e={9672:(e,t)=>{!function(){var e=t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var t,o,i=String(e),a=0,s=n,u="";i.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&t>>8-a%1*8)){if((o=i.charCodeAt(a+=3/4))>255)throw new r("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|o}return u}),e.atob||(e.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,u="";i=t.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?u+=String.fromCharCode(255&o>>(-2*a&6)):0)i=n.indexOf(i);return u})}()},5426:(e,t,n)=>{System.register(["@openmrs/esm-config"],(function(e,t){var r={};return{setters:[function(e){r.Type=e.Type,r.defineConfigSchema=e.defineConfigSchema,r.getConfig=e.getConfig,r.navigate=e.navigate,r.validators=e.validators}],execute:function(){e((()=>{var e={672:(e,t)=>{!function(){var e=t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var t,o,i=String(e),a=0,s=n,u="";i.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&t>>8-a%1*8)){if((o=i.charCodeAt(a+=3/4))>255)throw new r("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|o}return u}),e.atob||(e.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,u="";i=t.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?u+=String.fromCharCode(255&o>>(-2*a&6)):0)i=n.indexOf(i);return u})}()},525:function(e){(function(){var t,n;function r(e,o){var i,a=e.data.entry||[],s=[];for(i=0;i<a.length;i++)s.push(a[i].resource);o(s);var u=n.defer();return t.nextPage({bundle:e.data}).then((function(e){r(e,o).then((function(e){u.resolve()}))}),(function(e){u.resolve()})),u.promise}function o(e,o,i,a){n.defer(),t.search(e).then((function(e){r(e,o).then((function(){i()}),(function(e){a(e)}))}),(function(e){a(e)}))}function i(e){var t=n.defer(),r=[];return o(e,(function(e){e.forEach((function(e){r.push(e)}))}),(function(){t.resolve(r)}),(function(e){t.reject(e)})),t.promise}function a(e,r){var o=n.defer();return t.search(e).then((function(e){var n={},i=[function(){o.resolve(e,n)}];function a(){i.pop()()}var s=e.data;s.entry&&s.entry.forEach((function(e){var o=e.resource,u=o.resourceType;r&&r.forEach((function(e){var r=e.split("."),c=r[0],l=r[1],f=o[l];if(u===c&&f){var p=f.reference;n[p]||function(e,r,o){i.push((function(){!function(e,r,o){var i=o.reference;t.resolve({bundle:e,resource:r,reference:o}).then((function(e){var t=e.data||e.content;n[i]=t,a()}))}(e,r,o)}))}(s,o,f)}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise}e.exports=function(e,r){return t=e,n=r,e.drain=o,e.fetchAll=i,e.fetchAllWithReferences=a,e}}).call(this)},256:function(e,t,n){(function(){n(454);var t=n(801),r=n(921),o=n(294),i=n(821),a=n(442),s=n(856),u=n(719),c=n(29),l=n(723),f=n(249),p=n(525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},g=function(e,t){return h("headers."+e,t)},y=d(a),m=d(s(e,n)).and(y).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(g("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(g("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=m.and(v("GET")),w=m.and(v("POST")),_=m.and(v("PUT")),E=m.and(v("DELETE")),x=m.and(v("PATCH")),S=i.Http(e,n),O=f.Path,k=O(e.baseUrl),T=k.slash(":type || :resource.resourceType"),P=T.slash("_history"),j=T.slash(":id || :resource.id"),C=j.slash("_history"),N=j.slash(":versionId || :resource.meta.versionId"),A=k.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=g("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(k.slash("metadata")).end(S),document:w.and(k.slash("Document")).end(S),profile:b.and(k.slash("Profile").slash(":type")).end(S),transaction:w.and(k).end(S),history:b.and(k.slash("_history")).and(R).end(S),typeHistory:b.and(P).and(R).end(S),resourceHistory:b.and(C).and(R).end(S),read:b.and(c.$WithPatient).and(j).end(S),vread:b.and(N).end(S),delete:E.and(j).and(I).end(S),create:w.and(T).and(I).end(S),validate:w.and(T.slash("_validate")).end(S),meta:{add:w.and(A.slash("$meta-add")).end(S),delete:w.and(A.slash("$meta-delete")).end(S),read:b.and(A.slash("$meta")).end(S)},search:b.and(T).and(c.$WithPatient).and(r.$SearchParams).and(R).end(S),update:_.and(j).and(I).end(S),conditionalUpdate:_.and(T).and(r.$SearchParams).and(I).end(S),conditionalDelete:E.and(T).and(r.$SearchParams).and(I).end(S),nextPage:b.and(u.$$BundleLinkUrl("next")).end(S),prevPage:b.and(u.$$BundleLinkUrl("previous")).and(u.$$BundleLinkUrl("prev")).end(S),getBundleByUrl:b.and(O(":url")).end(S),resolve:b.and(l.resolve).end(S),patch:x.and(j).and(g("Content-Type","application/json-patch+json")).end(S)},n)}}).call(this)},294:function(e,t,n){(function(){var e,r=n(801),o=n(672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},719:(e,t)=>{t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},801:function(e,t,n){(function(){var e=n(454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:e=>{e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},821:function(e,t,n){(function(){var e=n(454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},29:function(e,t,n){(function(){var e=n(801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},723:function(e,t,n){(function(){var t=n(454),r=/^#(.*)/,o=function(e){var n=e.cache,o=e.reference,i=e.bundle,a=o;if(!a.reference)return null;if(a.reference.match(r))return function(e,t){var n=e.match(r)[1],o=(t.contained||[]).filter((function(e){return(e.id||e._id)==n}))[0];return o&&{content:o}||null}(a.reference,e.resource);var s=t.absoluteUrl(e.baseUrl,a.reference);return(i&&i.entry||[]).filter((function(e){return e.id===s}))[0]||(null!=n?n[s]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,s=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return s.resolve(i),s.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},921:function(e,t,n){(function(){var e=n(454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,s={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},u={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},c=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n;switch(r(t)){case"object":return function(e,t){return i(t,(function(n,i){var a,l,f,p;return a=i[0],p=i[1],n.concat("$and"===a?o(p).reduce((function(t,n){return t.concat(c(e,n))}),[]):"$type"===a?[]:function(e){return 0===e.indexOf("$")}(a)?(l={param:e},"$or"===a?l.value=p:(s[a]&&(l.operator=s[a]),u[a]&&(l.modifier=u[a]),"object"===r(p)&&p.$or?l.value=p.$or:l.value=[p]),[l]):(t.$type&&(f=":"+t.$type),c(""+e+(f||"")+"."+a,p)))}))}(e,t);case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(c(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,s,u;for(u=[],o=0,i=(s=l(e)).length;o<i;o++)t=s[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,u.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return u}().join("&")};t._query=l,t.query=f;var p=n(801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},249:function(e,t,n){(function(){n(454);var e=n(801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n=function(e,t){return 0==e.indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(e,t):e}(e.trim(),t);if((null==n||void 0===n)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return n}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var s=function(){return Array.prototype.slice.call(arguments)};t.argsArray=s,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},s.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var u=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=u;var c=function(e,t,n){return t?u(c(e),e,t,n):function(t,n){return c(e,t,n)}};t.postwalk=c}).call(this)},651:(e,t,n)=>{!function(t){var n=function(e){return o(!0===e,!1,arguments)};function r(e,t){if("object"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function o(e,t,o){var a=o[0],s=o.length;(e||"object"!==i(a))&&(a={});for(var u=0;u<s;++u){var c=o[u];if("object"===i(c))for(var l in c)if("__proto__"!==l){var f=e?n.clone(c[l]):c[l];a[l]=t?r(a[l],f):f}}return a}function i(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return o(!0===e,!0,arguments)},n.clone=function(e){var t,r,o=e,a=i(e);if("array"===a)for(o=[],r=e.length,t=0;t<r;++t)o[t]=n.clone(e[t]);else if("object"===a)for(t in o={},e)o[t]=n.clone(e[t]);return o},t?e.exports=n:window.merge=n}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:e=>{"use strict";e.exports=r}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={id:t,loaded:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.y=t,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})();var a={};return(0,i(968).s)(1),(()=>{"use strict";i.r(a),i.d(a,{OpenmrsFetchError:()=>H,VisitMode:()=>tt,VisitStatus:()=>nt,backendDependencies:()=>st,defaultVisitCustomRepresentation:()=>Ye,fetchCurrentPatient:()=>We,fhir:()=>G,fhirBaseUrl:()=>q,getCurrentUser:()=>De,getLocations:()=>at,getLoggedInUser:()=>Fe,getSessionLocation:()=>Be,getStartedVisit:()=>et,getVisitTypes:()=>ot,getVisitsForPatient:()=>Qe,makeUrl:()=>V,openmrsFetch:()=>W,openmrsObservableFetch:()=>K,refetchCurrentUser:()=>Me,saveVisit:()=>Je,sessionEndpoint:()=>z,setSessionLocation:()=>ze,setupApiModule:()=>Ve,toLocationObject:()=>it,toVisitTypeObject:()=>rt,updateVisit:()=>Xe,userHasAccess:()=>Ue});var e=function(t,n){return e=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,n)};function t(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function r(e){return"function"==typeof e}var o=!1,s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,o=e},get useDeprecatedSynchronousErrorHandling(){return o}};function u(e){setTimeout((function(){throw e}),0)}var c={closed:!0,next:function(e){},error:function(e){if(s.useDeprecatedSynchronousErrorHandling)throw e;u(e)},complete:function(){}},l=Array.isArray||function(e){return e&&"number"==typeof e.length};function f(e){return null!==e&&"object"==typeof e}var p=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}(),d=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,o=n._parentOrParents,i=n._ctorUnsubscribe,a=n._unsubscribe,s=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,o instanceof e)o.remove(this);else if(null!==o)for(var u=0;u<o.length;++u)o[u].remove(this);if(r(a)){i&&(this._unsubscribe=void 0);try{a.call(this)}catch(e){t=e instanceof p?h(e.errors):[e]}}if(l(s)){u=-1;for(var c=s.length;++u<c;){var d=s[u];if(f(d))try{d.unsubscribe()}catch(e){t=t||[],e instanceof p?t=t.concat(h(e.errors)):t.push(e)}}}if(t)throw new p(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof e){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},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function h(e){return e.reduce((function(e,t){return e.concat(t instanceof p?t.errors:t)}),[])}var v="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),g=function(e){function n(t,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=c;break;case 1:if(!t){i.destination=c;break}if("object"==typeof t){t instanceof n?(i.syncErrorThrowable=t.syncErrorThrowable,i.destination=t,t.add(i)):(i.syncErrorThrowable=!0,i.destination=new y(i,t));break}default:i.syncErrorThrowable=!0,i.destination=new y(i,t,r,o)}return i}return t(n,e),n.prototype[v]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(d),y=function(e){function n(t,n,o,i){var a,s=e.call(this)||this;s._parentSubscriber=t;var u=s;return r(n)?a=n:n&&(a=n.next,o=n.error,i=n.complete,n!==c&&(r((u=Object.create(n)).unsubscribe)&&s.add(u.unsubscribe.bind(u)),u.unsubscribe=s.unsubscribe.bind(s))),s._context=u,s._next=a,s._error=o,s._complete=i,s}return t(n,e),n.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},n.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=s.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):u(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;u(e)}}},n.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)};s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},n.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw e;u(e)}},n.prototype.__tryOrSetError=function(e,t,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return s.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(u(t),!0)}return!1},n.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},n}(g),m="function"==typeof Symbol&&Symbol.observable||"@@observable";function b(e){return e}function w(e){return 0===e.length?b:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var _=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,o=function(e,t,n){if(e){if(e instanceof g)return e;if(e[v])return e[v]()}return e||t||n?new g(e,t,n):new g(c)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||s.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),s.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&r instanceof g?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=E(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[m]=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:w(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=E(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}();function E(e){if(e||(e=s.Promise||Promise),!e)throw new Error("no Promise impl found");return e}const x="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var S="object"==typeof self&&self&&self.Object===Object&&self;const O=(x||S||Function("return this")()).Symbol;var k=Object.prototype,T=k.hasOwnProperty,P=k.toString,j=O?O.toStringTag:void 0,C=Object.prototype.toString,N=O?O.toStringTag:void 0;const A=(I=Object.getPrototypeOf,R=Object,function(e){return I(R(e))});var I,R,$=Function.prototype,D=Object.prototype,L=$.toString,M=D.hasOwnProperty,U=L.call(Object);const F=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":N&&N in Object(e)?function(e){var t=T.call(e,j),n=e[j];try{e[j]=void 0;var r=!0}catch(e){}var o=P.call(e);return r&&(t?e[j]=n:delete e[j]),o}(e):function(e){return C.call(e)}(e)}(e))return!1;var t=A(e);if(null===t)return!0;var n=M.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&L.call(n)==U};var B=i(824);const z="/ws/rest/v1/session";function V(e){return window.openmrsBase+e}function W(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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.");const n=V(e);t.headers||(t.headers={}),F(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;const r=Error();return window.fetch(n,t).then((async e=>{const t=e;if(t.ok)return 204===t.status?(t.data=null,t):t.text().then((e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t}));{const{redirectAuthFailure:e}=await(0,B.getConfig)("@openmrs/esm-api");return n===V(z)&&403===t.status||e.enabled&&e.errors.includes(t.status)?((0,B.navigate)({to:e.url}),e.resolvePromise?Promise.resolve():new Promise((()=>{}))):t.text().then((e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new H(n,t,o,r)}),(e=>{throw new H(n,t,null,r)}))}}))}function K(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");const n=new AbortController;return t.signal=n.signal,new _((r=>{let o=!1;return W(e,t).then((e=>{o=!0,r.next(e),r.complete()}),(e=>{o=!0,r.error(e)})),()=>{o||n.abort()}}))}class H extends Error{constructor(e,t,n,r){super(),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:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}}const q="/ws/fhir2/R4",G=i(256)({baseUrl:q},{http:e=>W(e.url,{method:e.method,headers:e.headers}).then((t=>({status:t.status,headers:t.headers,data:t.data,config:e})),(t=>({status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e})))});var Z=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),Y=function(e){function n(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return t(n,e),n.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)}}},n}(d),Q=function(e){function n(t){var n=e.call(this,t)||this;return n.destination=t,n}return t(n,e),n}(g),J=function(e){function n(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t(n,e),n.prototype[v]=function(){return new Q(this)},n.prototype.lift=function(e){var t=new X(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Z;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new Z;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},n.prototype.complete=function(){if(this.closed)throw new Z;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},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(t){if(this.closed)throw new Z;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(e){if(this.closed)throw new Z;return this.hasError?(e.error(this.thrownError),d.EMPTY):this.isStopped?(e.complete(),d.EMPTY):(this.observers.push(e),new Y(this,e))},n.prototype.asObservable=function(){var e=new _;return e.source=this,e},n.create=function(e,t){return new X(e,t)},n}(_),X=function(e){function n(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t(n,e),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):d.EMPTY},n}(J),ee=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t(n,e),n.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)},n.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},n.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)},n}(function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t(n,e),n.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},n.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},n.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},n.prototype.execute=function(e,t){if(this.closed)return new 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))},n.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},n.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},n}(function(e){function n(t,n){return e.call(this)||this}return t(n,e),n.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},n}(d))),te=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}(),ne=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n}(function(e){function n(t,r){void 0===r&&(r=te.now);var o=e.call(this,t,(function(){return n.delegate&&n.delegate!==o?n.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return t(n,e),n.prototype.schedule=function(t,r,o){return void 0===r&&(r=0),n.delegate&&n.delegate!==this?n.delegate.schedule(t,r,o):e.prototype.schedule.call(this,t,r,o)},n.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},n}(te)),re=new ne(ee),oe=new _((function(e){return e.complete()}));function ie(e){return e?function(e){return new _((function(t){return e.schedule((function(){return t.complete()}))}))}(e):oe}function ae(e){return e&&"function"==typeof e.schedule}var se,ue=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}};function ce(e,t){return new _((function(n){var r=new d,o=0;return r.add(t.schedule((function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function le(e,t){return t?ce(e,t):new _(ue(e))}se||(se={});var fe=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(){var e;switch(this.kind){case"N":return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return ae(n)?(e.pop(),ce(e,n)):le(e)}(this.value);case"E":return e=this.error,new _((function(t){return t.error(e)}));case"C":return ie()}throw new 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}(),pe=function(e){function n(t,n,r){void 0===r&&(r=0);var o=e.call(this,t)||this;return o.scheduler=n,o.delay=r,o}return t(n,e),n.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},n.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new de(e,this.destination)))},n.prototype._next=function(e){this.scheduleMessage(fe.createNext(e))},n.prototype._error=function(e){this.scheduleMessage(fe.createError(e)),this.unsubscribe()},n.prototype._complete=function(){this.scheduleMessage(fe.createComplete()),this.unsubscribe()},n}(g),de=function(e,t){this.notification=e,this.destination=t},he=function(e){function n(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);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===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return t(n,e),n.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)},n.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new ve(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},n.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 Z;if(this.isStopped||this.hasError?t=d.EMPTY:(this.observers.push(e),t=new Y(this,e)),o&&e.add(e=new pe(e,o)),n)for(var a=0;a<i&&!e.closed;a++)e.next(r[a]);else for(a=0;a<i&&!e.closed;a++)e.next(r[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},n.prototype._getNow=function(){return(this.scheduler||re).now()},n.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},n}(J),ve=function(e,t){this.time=e,this.value=t};function ge(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new ye(e,t))}}var ye=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new me(e,this.project,this.thisArg))},e}(),me=function(e){function n(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return t(n,e),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(g),be="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",we=function(e){if(e&&"function"==typeof e[m])return r=e,function(e){var t=r[m]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}(e))return ue(e);if(function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,u),e};if(e&&"function"==typeof e[be])return t=e,function(e){for(var n=t[be]();;){var r=void 0;try{r=n.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,r,o=f(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")},_e=function(e){function n(t){var n=e.call(this)||this;return n.parent=t,n}return t(n,e),n.prototype._next=function(e){this.parent.notifyNext(e)},n.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},n.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},n}(g),Ee=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.notifyNext=function(e){this.destination.next(e)},n.prototype.notifyError=function(e){this.destination.error(e)},n.prototype.notifyComplete=function(){this.destination.complete()},n}(g);function xe(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(r){return r.pipe(xe((function(n,r){return(o=e(n,r),o instanceof _?o:new _(we(o))).pipe(ge((function(e,o){return t(n,e,r,o)})));var o}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new Se(e,n))})}var Se=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new Oe(e,this.project,this.concurrent))},e}(),Oe=function(e){function n(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);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 t(n,e),n.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},n.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t)},n.prototype._innerSub=function(e){var t=new _e(this),n=this.destination;n.add(t);var r=function(e,t){if(!t.closed){if(e instanceof _)return e.subscribe(t);var n;try{n=we(e)(t)}catch(e){t.error(e)}return n}}(e,t);r!==t&&n.add(r)},n.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},n.prototype.notifyNext=function(e){this.destination.next(e)},n.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},n}(Ee);function ke(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),xe(b,e)}function Te(){}function Pe(e,t,n){return function(r){return r.lift(new je(e,t,n))}}var je=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 Ce(e,this.nextOrObserver,this.error,this.complete))},e}(),Ce=function(e){function n(t,n,o,i){var a=e.call(this,t)||this;return a._tapNext=Te,a._tapError=Te,a._tapComplete=Te,a._tapError=o||Te,a._tapComplete=i||Te,r(n)?(a._context=a,a._tapNext=n):n&&(a._context=n,a._tapNext=n.next||Te,a._tapError=n.error||Te,a._tapComplete=n.complete||Te),a}return t(n,e),n.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},n.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},n.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},n}(g);function Ne(e,t){return function(n){return n.lift(new Ae(e,t))}}var Ae=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Ie(e,this.predicate,this.thisArg))},e}(),Ie=function(e){function n(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=r,o.count=0,o}return t(n,e),n.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},n}(g);const Re=new he(1);let $e=0;function De(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!1};return $e<Date.now()-6e4&&Me(),Re.asObservable().pipe(ke(),Pe(Le),ge((t=>e.includeAuthStatus?t:t.user)),Ne(Boolean))}function Le(e){if(e?.user?.userProperties?.defaultLocale){const t=e.user.userProperties.defaultLocale;t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}}function Me(){$e=Date.now(),Re.next(W(z).then((e=>"object"==typeof e.data?e.data:Promise.reject())).catch((()=>({sessionId:"",authenticated:!1}))))}function Ue(e,t){return function(e,t){return t.privileges.find((t=>e===t.display))}(e,t)||function(e){return e.roles.find((e=>"System Developer"===e.display))}(t)}function Fe(){return new Promise(((e,t)=>{const n=De().subscribe((t=>{e(t),n.unsubscribe()}),t)}))}function Be(){return new Promise(((e,t)=>{const n=De({includeAuthStatus:!0}).subscribe((t=>{e(t.sessionLocation),n.unsubscribe()}),t)}))}async function ze(e,t){await W(z,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}),Me()}function Ve(){(0,B.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:B.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:B.Type.String,_default:"${openmrsSpaBase}/login",_validators:[B.validators.isUrl]},errors:{_type:B.Type.Array,_default:[401],_elements:{_type:B.Type.Number,_validators:[B.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:B.Type.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."}}}),Me()}function We(e,t){return e?G.read({type:"Patient",patient:e,...t}):Promise.resolve(null)}var Ke=function(e){function n(t){var n=e.call(this)||this;return n._value=t,n}return t(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Z;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(J),He=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}();function qe(e){return function(t){return 0===e?ie():t.lift(new Ge(e))}}var Ge=function(){function e(e){if(this.total=e,this.total<0)throw new He}return e.prototype.call=function(e,t){return t.subscribe(new Ze(e,this.total))},e}(),Ze=function(e){function n(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return t(n,e),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(g);const Ye="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)";function Qe(e,t,n){return K(`/ws/rest/v1/visit?patient=${e}&v=${n??Ye}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(qe(1)).pipe(ge((e=>e)))}function Je(e,t){return K("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function Xe(e,t,n){return K(`/ws/rest/v1/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}const et=new Ke(null);let tt,nt;function rt(e){return{uuid:e.uuid,display:e.display,name:e.name}}function ot(){return K("/ws/rest/v1/visittype").pipe(ge((e=>e.data.results.map(rt)))).pipe(qe(1))}function it(e){return{uuid:e.uuid,display:e.display}}function at(){return K("/ws/rest/v1/location").pipe(ge((e=>e.data.results.map(it)))).pipe(qe(1))}!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(tt||(tt={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(nt||(nt={}));const st={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}})(),a})())}}}))},2199:(e,t,n)=>{"use strict";n.d(t,{nF:()=>m,u4:()=>$e,Rx:()=>De,Wf:()=>Be,I$:()=>Ce,Vy:()=>Se,N$:()=>w,DN:()=>b,ts:()=>ye,JC:()=>Fe,r:()=>_e,WK:()=>Ee,$X:()=>Re,P9:()=>Me,nx:()=>Ne,bf:()=>v,vb:()=>g,uj:()=>y,VJ:()=>be,bX:()=>Ae,z$:()=>h,jK:()=>xe,Lq:()=>Ue,VF:()=>Le,ym:()=>Ie,y9:()=>we});var r=n(921),o=n(963);const i=(0,n(6899).Z)(Object.getPrototypeOf,Object);var a=n(4897),s=Function.prototype,u=Object.prototype,c=s.toString,l=u.hasOwnProperty,f=c.call(Object);const p=function(e){if(!(0,a.Z)(e)||"[object Object]"!=(0,o.Z)(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f};var d=n(7179);const h="/ws/rest/v1/session";function v(e){return window.openmrsBase+e}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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.");const n=v(e);t.headers||(t.headers={}),p(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;const r=Error();return window.fetch(n,t).then((async e=>{const t=e;if(t.ok)return 204===t.status?(t.data=null,t):t.text().then((e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t}));{const{redirectAuthFailure:e}=await(0,d.getConfig)("@openmrs/esm-api");return n===v(h)&&403===t.status||e.enabled&&e.errors.includes(t.status)?((0,d.navigate)({to:e.url}),e.resolvePromise?Promise.resolve():new Promise((()=>{}))):t.text().then((e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new m(n,t,o,r)}),(e=>{throw new m(n,t,null,r)}))}}))}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");const n=new AbortController;return t.signal=n.signal,new r.y((r=>{let o=!1;return g(e,t).then((e=>{o=!0,r.next(e),r.complete()}),(e=>{o=!0,r.error(e)})),()=>{o||n.abort()}}))}class m extends Error{constructor(e,t,n,r){super(),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:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}}const b="/ws/fhir2/R4",w=n(1256)({baseUrl:b},{http:e=>g(e.url,{method:e.method,headers:e.headers}).then((t=>({status:t.status,headers:t.headers,data:t.data,config:e})),(t=>({status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e})))});var _=n(7080),E=n(2585),x=n(1098),S=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return _.ZT(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}(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 _.ZT(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 new 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||new 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}(function(e){function t(t,n){return e.call(this)||this}return _.ZT(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(x.w))),O=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}(),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _.ZT(t,e),t}(function(e){function t(n,r){void 0===r&&(r=O.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 _.ZT(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=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(O)),T=new k(S),P=n(7811),j=new r.y((function(e){return e.complete()}));function C(e){return e?function(e){return new r.y((function(t){return e.schedule((function(){return t.complete()}))}))}(e):j}function N(e){return e&&"function"==typeof e.schedule}var A,I=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}};function R(e,t){return new r.y((function(n){var r=new x.w,o=0;return r.add(t.schedule((function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function $(e,t){return t?R(e,t):new r.y(I(e))}A||(A={});var D=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(){var e;switch(this.kind){case"N":return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return N(n)?(e.pop(),R(e,n)):$(e)}(this.value);case"E":return e=this.error,new r.y((function(t){return t.error(e)}));case"C":return C()}throw new 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}(),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 _.ZT(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 M(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(D.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(D.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(D.createComplete()),this.unsubscribe()},t}(P.L),M=function(){return function(e,t){this.notification=e,this.destination=t}}(),U=n(7043),F=n(6362),B=function(e){function t(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);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===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return _.ZT(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 z(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.N;if(this.isStopped||this.hasError?t=x.w.EMPTY:(this.observers.push(e),t=new F.W(this,e)),o&&e.add(e=new L(e,o)),n)for(var a=0;a<i&&!e.closed;a++)e.next(r[a]);else for(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||T).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}(E.xQ),z=function(){return function(e,t){this.time=e,this.value=t}}();function V(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new W(e,t))}}var W=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new K(e,this.project,this.thisArg))},e}(),K=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 _.ZT(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(P.L),H=n(1450);function q(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var G=q(),Z=n(4002),Y=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Q(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var J=n(1167),X=function(e){if(e&&"function"==typeof e[Z.L])return r=e,function(e){var t=r[Z.L]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(Y(e))return I(e);if(Q(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,H.z),e};if(e&&"function"==typeof e[G])return t=e,function(e){for(var n=t[G]();;){var r=void 0;try{r=n.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,r,o=(0,J.K)(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};var ee=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,n}return _.ZT(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}(P.L),te=(P.L,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _.ZT(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}(P.L));function ne(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(o){return o.pipe(ne((function(n,o){return(i=e(n,o),i instanceof r.y?i:new r.y(X(i))).pipe(V((function(e,r){return t(n,e,o,r)})));var i}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new re(e,n))})}P.L;var re=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new oe(e,this.project,this.concurrent))},e}(),oe=function(e){function t(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);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 _.ZT(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){return void this.destination.error(e)}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new ee(this),n=this.destination;n.add(t);var o=function(e,t){if(!t.closed){if(e instanceof r.y)return e.subscribe(t);var n;try{n=X(e)(t)}catch(e){t.error(e)}return n}}(e,t);o!==t&&n.add(o)},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}(te),ie=n(7430);function ae(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),ne(ie.y,e)}function se(){}var ue=n(9147);function ce(e,t,n){return function(r){return r.lift(new le(e,t,n))}}var le=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 fe(e,this.nextOrObserver,this.error,this.complete))},e}(),fe=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i._tapNext=se,i._tapError=se,i._tapComplete=se,i._tapError=r||se,i._tapComplete=o||se,(0,ue.m)(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||se,i._tapError=n.error||se,i._tapComplete=n.complete||se),i}return _.ZT(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},t}(P.L);function pe(e,t){return function(n){return n.lift(new de(e,t))}}var de=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new he(e,this.predicate,this.thisArg))},e}(),he=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 _.ZT(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(P.L);const ve=new B(1);let ge=0;function ye(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!1};return ge<Date.now()-6e4&&be(),ve.asObservable().pipe(ae(),ce(me),V((t=>e.includeAuthStatus?t:t.user)),pe(Boolean))}function me(e){if(e?.user?.userProperties?.defaultLocale){const t=e.user.userProperties.defaultLocale;t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}}function be(){ge=Date.now(),ve.next(g(h).then((e=>"object"==typeof e.data?e.data:Promise.reject())).catch((()=>({sessionId:"",authenticated:!1}))))}function we(e,t){return function(e,t){return t.privileges.find((t=>e===t.display))}(e,t)||function(e){return e.roles.find((e=>"System Developer"===e.display))}(t)}function _e(){return new Promise(((e,t)=>{const n=ye().subscribe((t=>{e(t),n.unsubscribe()}),t)}))}function Ee(){return new Promise(((e,t)=>{const n=ye({includeAuthStatus:!0}).subscribe((t=>{e(t.sessionLocation),n.unsubscribe()}),t)}))}async function xe(e,t){await g(h,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}),be()}function Se(e,t){return e?w.read({type:"Patient",patient:e,...t}):Promise.resolve(null)}var Oe=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return _.ZT(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)throw new U.N;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(E.xQ),ke=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}();function Te(e){return function(t){return 0===e?C():t.lift(new Pe(e))}}var Pe=function(){function e(e){if(this.total=e,this.total<0)throw new ke}return e.prototype.call=function(e,t){return t.subscribe(new je(e,this.total))},e}(),je=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return _.ZT(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}(P.L);const Ce="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)";function Ne(e,t,n){return y(`/ws/rest/v1/visit?patient=${e}&v=${n??Ce}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(Te(1)).pipe(V((e=>e)))}function Ae(e,t){return y("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function Ie(e,t,n){return y(`/ws/rest/v1/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}const Re=new Oe(null);let $e,De;function Le(e){return{uuid:e.uuid,display:e.display,name:e.name}}function Me(){return y("/ws/rest/v1/visittype").pipe(V((e=>e.data.results.map(Le)))).pipe(Te(1))}function Ue(e){return{uuid:e.uuid,display:e.display}}function Fe(){return y("/ws/rest/v1/location").pipe(V((e=>e.data.results.map(Ue)))).pipe(Te(1))}!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}($e||($e={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(De||(De={}));const Be={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}},3107:()=>{System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.createGlobalStore=e.createGlobalStore}],execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:e=>{"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=t,o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i={};return(0,o(968).s)(1),(()=>{"use strict";function e(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function t(e){return e&&e.sensitive?"":"i"}function n(n,r,o){return function(n,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,s=o.start,u=void 0===s||s,c=o.end,l=void 0===c||c,f=o.encode,p=void 0===f?function(e){return e}:f,d="["+e(o.endsWith||"")+"]|$",h="["+e(o.delimiter||"/#?")+"]",v=u?"^":"",g=0,y=n;g<y.length;g++){var m=y[g];if("string"==typeof m)v+=e(p(m));else{var b=e(p(m.prefix)),w=e(p(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";v+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else v+="("+m.pattern+")"+m.modifier;else v+="(?:"+b+w+")"+m.modifier}}if(l)a||(v+=h+"?"),v+=o.endsWith?"(?="+d+")":"$";else{var E=n[n.length-1],x="string"==typeof E?h.indexOf(E[E.length-1])>-1:void 0===E;a||(v+="(?:"+h+"(?="+d+"))?"),x||(v+="(?="+h+"|"+d+")")}return new RegExp(v,t(o))}(function(t,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '+s);for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at "+s);i+=e[s++]}else i+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=s}else{for(var a="",s=n+1;s<e.length;){var u=e.charCodeAt(s);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(t),o=n.prefixes,i=void 0===o?"./":o,a="[^"+e(n.delimiter||"/#?")+"]+?",s=[],u=0,c=0,l="",f=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=f(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var h=f("CHAR"),v=f("NAME"),g=f("PATTERN");if(v||g){var y=h||"";-1===i.indexOf(y)&&(l+=y,y=""),l&&(s.push(l),l=""),s.push({name:v||u++,prefix:y,suffix:"",pattern:g||a,modifier:f("MODIFIER")||""})}else{var m=h||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(s.push(l),l=""),f("OPEN")){y=d();var b=f("NAME")||"",w=f("PATTERN")||"",_=d();p("CLOSE"),s.push({name:b||(w?u++:""),pattern:b&&!w?a:w,prefix:y,suffix:_,modifier:f("MODIFIER")||""})}else p("END")}}return s}(n,o),r,o)}function r(e,o,i){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(e,o):Array.isArray(e)?function(e,n,o){var i=e.map((function(e){return r(e,n,o).source}));return new RegExp("(?:"+i.join("|")+")",t(o))}(e,o,i):n(e,o,i)}o.r(i),o.d(i,{filterBreadcrumbs:()=>p,getBreadcrumbs:()=>l,getBreadcrumbsFor:()=>d,registerBreadcrumb:()=>u,registerBreadcrumbs:()=>c});const a=(0,o(685).createGlobalStore)("breadcrumbs",[]);function s(e){return e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?r(e.matcher):r(e.path)}function u(e){return c([e])}function c(e){const t=[...l(),...e.map((e=>({matcher:s(e),settings:e})))];a.setState(t,!0)}function l(){return a.getState()}function f(e,t){if(t)return function(e,t){const[n]=e.filter((e=>e.matcher.test(t)));return n}(e,t)||function(e,t){const n=t.split("/");for(;n.length>1;){n.pop();const t=f(e,n.join("/"));if(t)return t}}(e,t)}function p(e,t){if(e.length>0){const n=f(e,t);if(n){const t=[n];let r=f(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=f(e,r.settings.parent);return t.reverse()}}return[]}function d(e){return p(l(),e)}})(),i})())}}}))},7179:()=>{System.register(["@openmrs/esm-state","single-spa"],(function(e,t){var n={},r={};return{setters:[function(e){n.createGlobalStore=e.createGlobalStore,n.getGlobalStore=e.getGlobalStore},function(e){r.navigateToUrl=e.navigateToUrl}],execute:function(){e((()=>{var e={712:(e,t,n)=>{var r=n(823),o=n(773)((function(e,t){return r(e.length,(function(){return e.apply(t,arguments)}))}));e.exports=o},122:(e,t,n)=>{var r=n(918),o=n(764)((function(e){return null!=e&&"function"==typeof e.clone?e.clone():r(e,[],[],!0)}));e.exports=o},102:(e,t,n)=>{var r=n(773),o=n(968),i=r((function(e,t){return o(e,t,[],[])}));e.exports=i},823:e=>{e.exports=function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}},340:e=>{e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},918:(e,t,n)=>{var r=n(259),o=n(704);e.exports=function e(t,n,i,a){var s=function(r){for(var o=n.length,s=0;s<o;){if(t===n[s])return i[s];s+=1}for(var u in n[s+1]=t,i[s+1]=r,t)r[u]=a?e(t[u],n,i,!0):t[u];return r};switch(o(t)){case"Object":return s({});case"Array":return s([]);case"Date":return new Date(t.valueOf());case"RegExp":return r(t);default:return t}}},259:e=>{e.exports=function(e){return new RegExp(e.source,(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":""))}},764:(e,t,n)=>{var r=n(230);e.exports=function(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}},773:(e,t,n)=>{var r=n(764),o=n(230);e.exports=function(e){return function t(n,i){switch(arguments.length){case 0:return t;case 1:return o(n)?t:r((function(t){return e(n,t)}));default:return o(n)&&o(i)?t:o(n)?r((function(t){return e(t,i)})):o(i)?r((function(t){return e(n,t)})):e(n,i)}}}},138:(e,t,n)=>{var r=n(764),o=n(773),i=n(230);e.exports=function(e){return function t(n,a,s){switch(arguments.length){case 0:return t;case 1:return i(n)?t:o((function(t,r){return e(n,t,r)}));case 2:return i(n)&&i(a)?t:i(n)?o((function(t,n){return e(t,a,n)})):i(a)?o((function(t,r){return e(n,t,r)})):r((function(t){return e(n,a,t)}));default:return i(n)&&i(a)&&i(s)?t:i(n)&&i(a)?o((function(t,n){return e(t,n,s)})):i(n)&&i(s)?o((function(t,n){return e(t,a,n)})):i(a)&&i(s)?o((function(t,r){return e(n,t,r)})):i(n)?r((function(t){return e(t,a,s)})):i(a)?r((function(t){return e(n,t,s)})):i(s)?r((function(t){return e(n,a,t)})):e(n,a,s)}}}},968:(e,t,n)=>{var r=n(340),o=n(587),i=n(168),a=n(673),s=n(784),u=n(478),c=n(704);function l(e,t,n,i){var a=r(e),s=r(t);function u(e,t){return f(e,t,n.slice(),i.slice())}return!o((function(e,t){return!o(u,t,e)}),s,a)}function f(e,t,n,r){if(s(e,t))return!0;var o=c(e);if(o!==c(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===i(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!s(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!s(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var p=n.length-1;p>=0;){if(n[p]===e)return r[p]===t;p-=1}switch(o){case"Map":return e.size===t.size&&l(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&l(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var d=u(e);if(d.length!==u(t).length)return!1;var h=n.concat([e]),v=r.concat([t]);for(p=d.length-1;p>=0;){var g=d[p];if(!a(g,t)||!f(t[g],e[g],h,v))return!1;p-=1}return!0}e.exports=f},168:e=>{e.exports=function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}},673:e=>{e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}},587:e=>{e.exports=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}},640:(e,t,n)=>{var r=n(673),o=Object.prototype.toString,i=function(){return"[object Arguments]"===o.call(arguments)?function(e){return"[object Arguments]"===o.call(e)}:function(e){return r("callee",e)}}();e.exports=i},726:e=>{e.exports=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)}},534:(e,t,n)=>{var r=n(764),o=n(726),i=n(468),a=r((function(e){return!!o(e)||!!e&&"object"==typeof e&&!i(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));e.exports=a},78:e=>{e.exports=function(e){return"[object Object]"===Object.prototype.toString.call(e)}},230:e=>{e.exports=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}},468:e=>{e.exports=function(e){return"[object String]"===Object.prototype.toString.call(e)}},784:e=>{e.exports="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},623:(e,t,n)=>{var r=n(534),o=n(782),i=n(712);function a(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function s(e,t,n,r){return e["@@transducer/result"](n[r](i(e["@@transducer/step"],e),t))}var u="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";e.exports=function(e,t,n){if("function"==typeof e&&(e=o(e)),r(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return s(e,t,n,"fantasy-land/reduce");if(null!=n[u])return a(e,t,n[u]());if("function"==typeof n.next)return a(e,t,n);if("function"==typeof n.reduce)return s(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}},782:e=>{var t=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();e.exports=function(e){return new t(e)}},478:(e,t,n)=>{var r=n(764),o=n(673),i=n(640),a=!{toString:null}.propertyIsEnumerable("toString"),s=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],u=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),c=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},l="function"!=typeof Object.keys||u?r((function(e){if(Object(e)!==e)return[];var t,n,r=[],l=u&&i(e);for(t in e)!o(t,e)||l&&"length"===t||(r[r.length]=t);if(a)for(n=s.length-1;n>=0;)o(t=s[n],e)&&!c(r,t)&&(r[r.length]=t),n-=1;return r})):r((function(e){return Object(e)!==e?[]:Object.keys(e)}));e.exports=l},317:(e,t,n)=>{var r=n(773),o=n(937),i=r((function(e,t){return o((function(e,t,n){return n}),e,t)}));e.exports=i},937:(e,t,n)=>{var r=n(138),o=n(78),i=n(145),a=r((function e(t,n,r){return i((function(n,r,i){return o(r)&&o(i)?e(t,r,i):t(n,r,i)}),n,r)}));e.exports=a},145:(e,t,n)=>{var r=n(138),o=n(673),i=r((function(e,t,n){var r,i={};for(r in t)o(r,t)&&(i[r]=o(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)o(r,n)&&!o(r,i)&&(i[r]=n[r]);return i}));e.exports=i},61:(e,t,n)=>{var r=n(138)(n(623));e.exports=r},704:(e,t,n)=>{var r=n(764)((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));e.exports=r},685:e=>{"use strict";e.exports=n},645:e=>{"use strict";e.exports=r}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";o.r(i),o.d(i,{Type:()=>l,configExtensionStore:()=>S,configInternalStore:()=>w,defineConfigSchema:()=>L,defineExtensionConfigSchema:()=>M,getConfig:()=>F,getConfigStore:()=>O,getExtensionConfig:()=>C,getExtensionConfigFromStore:()=>N,getExtensionSlotConfig:()=>T,getExtensionSlotConfigFromStore:()=>P,getExtensionSlotsConfigStore:()=>k,getExtensionsConfigStore:()=>j,implementerToolsConfigStore:()=>A,inRange:()=>ce,interpolateString:()=>se,interpolateUrl:()=>ae,isUrl:()=>fe,isUrlWithTemplateParameters:()=>le,navigate:()=>ue,processConfig:()=>B,provide:()=>U,temporaryConfigStore:()=>x,validator:()=>f,validators:()=>pe});var e=o(317),t=o.n(e),n=o(61),r=o.n(n),a=o(122),s=o.n(a),u=o(102),c=o.n(u);let l;function f(e,t){return n=>{if(!e(n))return t}}!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid"}(l||(l={}));const p=f((e=>Array.isArray(e)),"must be an array"),d=f((e=>"boolean"==typeof e),"must be a boolean"),h=f((e=>"number"==typeof e),"must be a number"),v=f((e=>"string"==typeof e),"must be a string"),g=f((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e),"must be an object (not an array or null)"),y=f((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");var m=o(685);const b={providedConfigs:[],schemas:{},devDefaultsAreOn:E()},w=(0,m.createGlobalStore)("config-internal",b);let _=E();function E(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}}w.subscribe((e=>{var t;e.devDefaultsAreOn!=_&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),_=e.devDefaultsAreOn)}));const x=(0,m.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});x.subscribe((e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));const S=(0,m.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function O(e){return(0,m.getGlobalStore)(`config-module-${e}`,{config:null,loaded:!1})}function k(){return(0,m.getGlobalStore)("config-extension-slots",{slots:{}})}function T(e){return P(k().getState(),e)}function P(e,t){return e.slots[t]??{loaded:!1,config:{}}}function j(){return(0,m.getGlobalStore)("config-extensions",{configs:{}})}function C(e,t){return N(j().getState(),e,t)}function N(e,t,n){const r=e.configs[t]?.[n];return r??{loaded:!1,config:null}}const A=(0,m.createGlobalStore)("config-implementer-tools",{config:{}});function I(e,t){for(let n of Object.keys(e.schemas)){const r=G(n,e,t);O(n).setState({loaded:!0,config:r})}}function R(e,t){const n=function(e,t){const n=Y(H(e,t)),r=Object.keys(n).reduce(((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e)),{});return function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))K(r,t,e)}(r),Object.keys(r).reduce(((e,t)=>({...e,...r[t]})),{})}(e,t),r=Object.fromEntries(Object.entries(n).map((e=>{let[t,n]=e;return[t,{loaded:!0,config:n}]}))),o=k(),i=o.getState(),a={slots:{...i.slots,...r}};c()(i,a)||o.setState(a)}function $(e,t){const n=function(e,t){let n=V(s()(e.schemas));const r=[...e.providedConfigs.map((e=>[e.config,e.source])),[t.config,"temporary config"]];for(let[e,t]of r)n=Y([n,W(e,t)]);return n}(e,t);A.setState({config:n})}function D(e,t,n){const r={};for(let o of t.mountedExtensions){const t=z(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]={...r[o.slotName],[o.extensionId]:{config:t,loaded:!0}}}j().setState({configs:r})}function L(e,t){q(e,t);const n=w.getState();w.setState({schemas:{...n.schemas,[e]:t}})}function M(e,t){q(e,t);const n=w.getState();n.schemas[e]&&console.warn(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),w.setState({schemas:{...n.schemas,[e]:t}})}function U(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided";const n=w.getState();w.setState({providedConfigs:[...n.providedConfigs,{source:t,config:e}]})}function F(e){return new Promise((t=>{const n=O(e);function r(e){e.loaded&&e.config&&(t(e.config),o&&o())}r(n.getState());const o=n.subscribe(r)}))}function B(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Q(e,t,n);const o=ne(e,t,r);return o}function z(e,t,n,r,o,i){const a=function(e){const[t]=e.split("#");return t}(r),s=o.schemas[a],u=s?a:t,c=H(o,i),l=Z(e,c)?.extensionSlots?.[n]?.configure?.[r]??{},f=Y([Z(u,c),l]),p=s??o.schemas[t];Q(p,f,u);const d=ne(p,f,o.devDefaultsAreOn);return delete d.extensionSlots,d}function V(e){return e.hasOwnProperty("_default")?{...e,_value:e._default,_source:"default"}:oe(e)?Object.keys(e).reduce(((t,n)=>(t[n]=V(e[n]),t)),{}):{}}function W(e,t){return oe(e)?Object.keys(e).reduce(((n,r)=>(n[r]=W(e[r],t),n)),{}):{_value:e,_source:t}}function K(e,t,n){const r=`Extension slot config '${t}.extensionSlots.${n}`,o=Object.keys(e).filter((e=>!["add","remove","order","configure"].includes(e)));o.length&&console.error(r+`' contains invalid keys '${o.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every((e=>"string"==typeof e))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((e=>"string"==typeof e))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((e=>"string"==typeof e))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(oe(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function H(e,t){return[...e.providedConfigs.map((e=>e.config)),t.config]}function q(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const o of Object.keys(t).filter((e=>!e.startsWith("_")))){const i=n+(n&&".")+o,a=t[o];if(!oe(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}a.hasOwnProperty("_default")||q(e,a,i);const s=a._elements;if(re(s)&&q(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}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const u=a._type;u&&!Object.values(l).includes(u)&&console.error(`${e} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(l).join(", ")}. Received '${u}'`),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}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),s&&u&&![l.Array,l.Object].includes(u)&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(u)}`)}}function G(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);const r=t.schemas[e],o=Z(e,H(t,n));Q(r,o,e);const i=ne(r,o,t.devDefaultsAreOn);return delete i.extensionSlots,i}function Z(e,t){return Y(t.map((t=>{let{[e]:n}=t;return n})).filter((e=>!!e)))}function Y(e){return r()(t())({},e)}I(w.getState(),x.getState()),w.subscribe((e=>I(e,x.getState()))),x.subscribe((e=>I(w.getState(),e))),$(w.getState(),x.getState()),w.subscribe((e=>$(e,x.getState()))),x.subscribe((e=>$(w.getState(),e))),R(w.getState(),x.getState()),w.subscribe((e=>R(e,x.getState()))),x.subscribe((e=>R(w.getState(),e))),D(w.getState(),S.getState(),x.getState()),w.subscribe((e=>{D(e,S.getState(),x.getState())})),S.subscribe((e=>{D(w.getState(),e,x.getState())})),x.subscribe((e=>{D(w.getState(),S.getState(),e)}));const Q=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e.hasOwnProperty(r)?(ee(i,a._type,o),te(i,a._validators,o),oe(o)?a._type===l.Object?J(a,o,i):a.hasOwnProperty("_default")||Q(a,o,i):a._type===l.Array&&X(a,o,i)):"extensionSlots"!==r&&console.error(`Unknown config key '${i}' provided. Ignoring.`)}};function J(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];Q(e._elements,o,`${n}.${r}`)}}function X(e,t,n){if(re(e._elements))for(let r=0;r<t.length;r++)Q(e._elements,t[r],`${n}[${r}]`);for(let r=0;r<t.length;r++)ee(`${n}[${r}]`,e._elements?._type,t[r]),te(`${n}[${r}]`,e._elements?._validators,t[r])}function ee(e,t,n){t&&te(e,[{Array:p,Boolean:d,ConceptUuid:y,Number:h,Object:g,String:v,UUID:y,PersonAttributeTypeUuid:y}[t]],n)}function te(e,t,n){if(t)try{for(let r of t){const t=r(n);if("string"==typeof t){const r="object"==typeof n?JSON.stringify(n):n;console.error(`Invalid configuration value ${r} for ${e}: ${t}`)}}}catch(t){console.error(`Skipping invalid validator at "${e}".`)}}const ne=(e,t,n)=>{const r=s()(t);if(!e)return r;for(const t of Object.keys(e)){const o=r[t],i=e[t];if(i&&i.hasOwnProperty("_default")){if(!r.hasOwnProperty(t)){const e=i._devDefault||i._default;r[t]=n?e:i._default}const e=i._elements;if(o&&re(e))if(i._type===l.Array){const i=o.map((t=>ne(e,t,n)));r[t]=i}else if(i._type===l.Object)for(let t of Object.keys(o))o[t]=ne(e,o[t],n)}else if(oe(i)){const e=r.hasOwnProperty(t)?o:{};oe(e)&&(r[t]=ne(i,e,n))}}return r};function re(e){return!!e&&Object.keys(e).filter((e=>!["_default","_validators"].includes(e))).length>0}function oe(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}var ie=o(645);function ae(e){const t=window.getOpenmrsSpaBase().replace(/\/$/,"");return se(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:t}).replace(/^\/\//,"/")}function se(e,t){return Object.keys(t).reduce(((e,n)=>e.split("${"+n+"}").join(t[n])),e)}function ue(e){let{to:t}=e;const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=ae(t);r.startsWith(n)?(0,ie.navigateToUrl)(r):window.location.assign(r)}const ce=(e,t)=>f((n=>e<=n&&n<=t),`must be between ${e} and ${t}`),le=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return f((e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let 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(", "))},fe=le([]),pe={inRange:ce,isUrl:fe,isUrlWithTemplateParameters:le}})(),i})())}}}))},5734:(e,t,n)=>{"use strict";n.d(t,{JU:()=>r.ConfigStore,Dy:()=>o,SH:()=>ye,Tj:()=>me,iE:()=>we,pR:()=>ce,Z2:()=>l,IT:()=>a,ll:()=>i,CB:()=>p,gZ:()=>f,c4:()=>u,JJ:()=>be,sC:()=>c,z2:()=>d});var r={};let o;function i(e){const t=window.getOpenmrsSpaBase().replace(/\/$/,"");return a(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:t}).replace(/^\/\//,"/")}function a(e,t){return Object.keys(t).reduce(((e,n)=>e.split("${"+n+"}").join(t[n])),e)}n.r(r),n.d(r,{R2:()=>ue,hv:()=>oe,pR:()=>ce,Gr:()=>le,_z:()=>fe,HN:()=>pe,DK:()=>se}),function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid"}(o||(o={}));var s=n(3710);function u(e){let{to:t}=e;const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=i(t);r.startsWith(n)?(0,s.UO)(r):window.location.assign(r)}function c(e,t){return n=>{if(!e(n))return t}}const l=(e,t)=>c((n=>e<=n&&n<=t),`must be between ${e} and ${t}`),f=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return c((e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let 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(", "))},p=f([]),d={inRange:l,isUrl:p,isUrlWithTemplateParameters:f};function h(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function v(e){return function t(n){return 0===arguments.length||h(n)?t:e.apply(this,arguments)}}function g(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return h(n)?t:v((function(t){return e(n,t)}));default:return h(n)&&h(r)?t:h(n)?v((function(t){return e(t,r)})):h(r)?v((function(t){return e(n,t)})):e(n,r)}}}function y(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function m(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function b(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const w="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var _=Object.prototype.toString,E=function(){return"[object Arguments]"===_.call(arguments)?function(e){return"[object Arguments]"===_.call(e)}:function(e){return b("callee",e)}}();const x=E;var S=!{toString:null}.propertyIsEnumerable("toString"),O=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=function(){return arguments.propertyIsEnumerable("length")}(),T=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const P="function"!=typeof Object.keys||k?v((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=k&&x(e);for(t in e)!b(t,e)||o&&"length"===t||(r[r.length]=t);if(S)for(n=O.length-1;n>=0;)b(t=O[n],e)&&!T(r,t)&&(r[r.length]=t),n-=1;return r})):v((function(e){return Object(e)!==e?[]:Object.keys(e)})),j=v((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function C(e,t,n,r){var o=y(e);function i(e,t){return N(e,t,n.slice(),r.slice())}return!m((function(e,t){return!m(i,t,e)}),y(t),o)}function N(e,t,n,r){if(w(e,t))return!0;var o,i,a=j(e);if(a!==j(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!w(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!w(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var s=n.length-1;s>=0;){if(n[s]===e)return r[s]===t;s-=1}switch(a){case"Map":return e.size===t.size&&C(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&C(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=P(e);if(u.length!==P(t).length)return!1;var c=n.concat([e]),l=r.concat([t]);for(s=u.length-1;s>=0;){var f=u[s];if(!b(f,t)||!N(t[f],e[f],c,l))return!1;s-=1}return!0}const A=g((function(e,t){return N(e,t,[],[])}));function I(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?I(e[s],t,n,!0):e[s];return o};switch(j(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const R=v((function(e){return null!=e&&"function"==typeof e.clone?e.clone():I(e,[],[],!0)}));function $(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return h(n)?t:g((function(t,r){return e(n,t,r)}));case 2:return h(n)&&h(r)?t:h(n)?g((function(t,n){return e(t,r,n)})):h(r)?g((function(t,r){return e(n,t,r)})):v((function(t){return e(n,r,t)}));default:return h(n)&&h(r)&&h(o)?t:h(n)&&h(r)?g((function(t,n){return e(t,n,o)})):h(n)&&h(o)?g((function(t,n){return e(t,r,n)})):h(r)&&h(o)?g((function(t,r){return e(n,t,r)})):h(n)?v((function(t){return e(t,r,o)})):h(r)?v((function(t){return e(n,t,o)})):h(o)?v((function(t){return e(n,r,t)})):e(n,r,o)}}}const D=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},L=v((function(e){return!!D(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));var M=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),U=g((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))}));const F=U;function B(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function z(e,t,n,r){return e["@@transducer/result"](n[r](F(e["@@transducer/step"],e),t))}var V="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function W(e,t,n){if("function"==typeof e&&(e=function(e){return new M(e)}(e)),L(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return z(e,t,n,"fantasy-land/reduce");if(null!=n[V])return B(e,t,n[V]());if("function"==typeof n.next)return B(e,t,n);if("function"==typeof n.reduce)return z(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}const K=$(W);function H(e){return"[object Object]"===Object.prototype.toString.call(e)}const q=$((function(e,t,n){var r,o={};for(r in t)b(r,t)&&(o[r]=b(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)b(r,n)&&!b(r,o)&&(o[r]=n[r]);return o})),G=$((function e(t,n,r){return q((function(n,r,o){return H(r)&&H(o)?e(t,r,o):t(n,r,o)}),n,r)})),Z=g((function(e,t){return G((function(e,t,n){return n}),e,t)})),Y=c((e=>Array.isArray(e)),"must be an array"),Q=c((e=>"boolean"==typeof e),"must be a boolean"),J=c((e=>"number"==typeof e),"must be a number"),X=c((e=>"string"==typeof e),"must be a string"),ee=c((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e),"must be an object (not an array or null)"),te=c((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");var ne=n(8748);const re={providedConfigs:[],schemas:{},devDefaultsAreOn:ae()},oe=(0,ne.createGlobalStore)("config-internal",re);let ie=ae();function ae(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}}oe.subscribe((e=>{var t;e.devDefaultsAreOn!=ie&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),ie=e.devDefaultsAreOn)}));const se=(0,ne.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});se.subscribe((e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));const ue=(0,ne.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function ce(e){return(0,ne.getGlobalStore)(`config-module-${e}`,{config:null,loaded:!1})}function le(){return(0,ne.getGlobalStore)("config-extension-slots",{slots:{}})}function fe(){return(0,ne.getGlobalStore)("config-extensions",{configs:{}})}const pe=(0,ne.createGlobalStore)("config-implementer-tools",{config:{}});function de(e,t){for(let n of Object.keys(e.schemas)){const r=Te(n,e,t);ce(n).setState({loaded:!0,config:r})}}function he(e,t){const n=function(e,t){const n=je(Oe(e,t)),r=Object.keys(n).reduce(((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e)),{});return function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))Se(r,t,e)}(r),Object.keys(r).reduce(((e,t)=>({...e,...r[t]})),{})}(e,t),r=Object.fromEntries(Object.entries(n).map((e=>{let[t,n]=e;return[t,{loaded:!0,config:n}]}))),o=le(),i=o.getState(),a={slots:{...i.slots,...r}};A(i,a)||o.setState(a)}function ve(e,t){const n=function(e,t){let n=Ee(R(e.schemas));const r=[...e.providedConfigs.map((e=>[e.config,e.source])),[t.config,"temporary config"]];for(let[e,t]of r)n=je([n,xe(e,t)]);return n}(e,t);pe.setState({config:n})}function ge(e,t,n){const r={};for(let o of t.mountedExtensions){const t=_e(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]={...r[o.slotName],[o.extensionId]:{config:t,loaded:!0}}}fe().setState({configs:r})}function ye(e,t){ke(e,t);const n=oe.getState();oe.setState({schemas:{...n.schemas,[e]:t}})}function me(e,t){ke(e,t);const n=oe.getState();n.schemas[e]&&console.warn(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),oe.setState({schemas:{...n.schemas,[e]:t}})}function be(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided";const n=oe.getState();oe.setState({providedConfigs:[...n.providedConfigs,{source:t,config:e}]})}function we(e){return new Promise((t=>{const n=ce(e);function r(e){e.loaded&&e.config&&(t(e.config),o&&o())}r(n.getState());const o=n.subscribe(r)}))}function _e(e,t,n,r,o,i){const a=function(e){const[t]=e.split("#");return t}(r),s=o.schemas[a],u=s?a:t,c=Oe(o,i),l=Pe(e,c)?.extensionSlots?.[n]?.configure?.[r]??{},f=je([Pe(u,c),l]),p=s??o.schemas[t];Ce(p,f,u);const d=$e(p,f,o.devDefaultsAreOn);return delete d.extensionSlots,d}function Ee(e){return e.hasOwnProperty("_default")?{...e,_value:e._default,_source:"default"}:Le(e)?Object.keys(e).reduce(((t,n)=>(t[n]=Ee(e[n]),t)),{}):{}}function xe(e,t){return Le(e)?Object.keys(e).reduce(((n,r)=>(n[r]=xe(e[r],t),n)),{}):{_value:e,_source:t}}function Se(e,t,n){const r=`Extension slot config '${t}.extensionSlots.${n}`,o=Object.keys(e).filter((e=>!["add","remove","order","configure"].includes(e)));o.length&&console.error(r+`' contains invalid keys '${o.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every((e=>"string"==typeof e))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((e=>"string"==typeof e))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((e=>"string"==typeof e))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Le(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function Oe(e,t){return[...e.providedConfigs.map((e=>e.config)),t.config]}function ke(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const i of Object.keys(t).filter((e=>!e.startsWith("_")))){const a=n+(n&&".")+i,s=t[i];if(!Le(s)){console.error(`${e} has bad config schema definition for key '${a}'. ${r}`);continue}s.hasOwnProperty("_default")||ke(e,s,a);const u=s._elements;if(De(u)&&ke(e,u,a+"._elements"),s._validators)for(let t of s._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${a}' ${r}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const c=s._type;c&&!Object.values(o).includes(c)&&console.error(`${e} has invalid type for key '${a}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(o).join(", ")}. Received '${c}'`),Object.keys(s).every((e=>["_description","_validators","_elements","_type"].includes(e)))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${a}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(s)}`),u&&c&&![o.Array,o.Object].includes(c)&&console.error(`${e} has bad config schema definition for key '${a}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(c)}`)}}function Te(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);const r=t.schemas[e],o=Pe(e,Oe(t,n));Ce(r,o,e);const i=$e(r,o,t.devDefaultsAreOn);return delete i.extensionSlots,i}function Pe(e,t){return je(t.map((t=>{let{[e]:n}=t;return n})).filter((e=>!!e)))}function je(e){return K(Z)({},e)}de(oe.getState(),se.getState()),oe.subscribe((e=>de(e,se.getState()))),se.subscribe((e=>de(oe.getState(),e))),ve(oe.getState(),se.getState()),oe.subscribe((e=>ve(e,se.getState()))),se.subscribe((e=>ve(oe.getState(),e))),he(oe.getState(),se.getState()),oe.subscribe((e=>he(e,se.getState()))),se.subscribe((e=>he(oe.getState(),e))),ge(oe.getState(),ue.getState(),se.getState()),oe.subscribe((e=>{ge(e,ue.getState(),se.getState())})),ue.subscribe((e=>{ge(oe.getState(),e,se.getState())})),se.subscribe((e=>{ge(oe.getState(),ue.getState(),e)}));const Ce=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";for(const r of Object.keys(t)){const i=t[r],a=n+"."+r,s=e[r];e.hasOwnProperty(r)?(Ie(a,s._type,i),Re(a,s._validators,i),Le(i)?s._type===o.Object?Ne(s,i,a):s.hasOwnProperty("_default")||Ce(s,i,a):s._type===o.Array&&Ae(s,i,a)):"extensionSlots"!==r&&console.error(`Unknown config key '${a}' provided. Ignoring.`)}};function Ne(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];Ce(e._elements,o,`${n}.${r}`)}}function Ae(e,t,n){if(De(e._elements))for(let r=0;r<t.length;r++)Ce(e._elements,t[r],`${n}[${r}]`);for(let r=0;r<t.length;r++)Ie(`${n}[${r}]`,e._elements?._type,t[r]),Re(`${n}[${r}]`,e._elements?._validators,t[r])}function Ie(e,t,n){t&&Re(e,[{Array:Y,Boolean:Q,ConceptUuid:te,Number:J,Object:ee,String:X,UUID:te,PersonAttributeTypeUuid:te}[t]],n)}function Re(e,t,n){if(t)try{for(let r of t){const t=r(n);if("string"==typeof t){const r="object"==typeof n?JSON.stringify(n):n;console.error(`Invalid configuration value ${r} for ${e}: ${t}`)}}}catch(t){console.error(`Skipping invalid validator at "${e}".`)}}const $e=(e,t,n)=>{const r=R(t);if(!e)return r;for(const t of Object.keys(e)){const i=r[t],a=e[t];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(t)){const e=a._devDefault||a._default;r[t]=n?e:a._default}const e=a._elements;if(i&&De(e))if(a._type===o.Array){const o=i.map((t=>$e(e,t,n)));r[t]=o}else if(a._type===o.Object)for(let t of Object.keys(i))i[t]=$e(e,i[t],n)}else if(Le(a)){const e=r.hasOwnProperty(t)?i:{};Le(e)&&(r[t]=$e(a,e,n))}}return r};function De(e){return!!e&&Object.keys(e).filter((e=>!["_default","_validators"].includes(e))).length>0}function Le(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}},4729:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:e=>{"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=t,o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i={};return(0,o(968).s)(1),(()=>{"use strict";o.r(i),o.d(i,{createErrorHandler:()=>n,reportError:()=>t});var e=o(728);function t(e){const t=r(e);setTimeout((()=>{throw t}))}function n(){const e=Error();return n=>{r(n).stack+=`\nAsync stacktrace:\n${e.stack}`,t(n)}}function r(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)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())}window.onerror=function(){return(0,e.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,e.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}})(),i})())}}}))},2465:(e,t,n)=>{e=n.nmd(e),System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(r,o){var i={},a={},s={};return{setters:[function(e){i.configExtensionStore=e.configExtensionStore,i.getExtensionConfigFromStore=e.getExtensionConfigFromStore,i.getExtensionSlotConfig=e.getExtensionSlotConfig,i.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,i.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,i.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){a.createGlobalStore=e.createGlobalStore,a.getGlobalStore=e.getGlobalStore},function(e){s.mountRootParcel=e.mountRootParcel}],execute:function(){r((()=>{var r={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:e=>{"use strict";e.exports=i},685:e=>{"use strict";e.exports=a},645:e=>{"use strict";e.exports=s}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return r[e](n,n.exports,c),n.exports}c.y=o,c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e})();var l={};return(0,c(968).s)(1),(()=>{"use strict";c.r(l),c.d(l,{attach:()=>wt,checkStatus:()=>jt,checkStatusFor:()=>Ct,detach:()=>_t,detachAll:()=>Et,extensionStore:()=>Rt,getAssignedExtensions:()=>kt,getConnectedExtensions:()=>St,getCustomProps:()=>Nt,getExtensionInternalStore:()=>at,getExtensionNameFromId:()=>gt,getExtensionRegistration:()=>mt,getExtensionRegistrationFrom:()=>yt,getExtensionStore:()=>ut,registerExtension:()=>bt,registerExtensionSlot:()=>Tt,renderExtension:()=>It,reset:()=>Pt,updateInternalExtensionStore:()=>st});const r=function(e,t){return e===t||e!=e&&t!=t},o=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1};var i=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=o(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const s=a,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var f="object"==typeof self&&self&&self.Object===Object&&self;const p=u||f||Function("return this")(),d=p.Symbol;var h=Object.prototype,v=h.hasOwnProperty,g=h.toString,y=d?d.toStringTag:void 0,m=Object.prototype.toString,b=d?d.toStringTag:void 0;const w=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":b&&b in Object(e)?function(e){var t=v.call(e,y),n=e[y];try{e[y]=void 0;var r=!0}catch(e){}var o=g.call(e);return r&&(t?e[y]=n:delete e[y]),o}(e):function(e){return m.call(e)}(e)},_=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},E=function(e){if(!_(e))return!1;var t=w(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},x=p["__core-js_shared__"];var S,O=(S=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",k=Function.prototype.toString;const T=function(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var P=/^\[object .+?Constructor\]$/,j=Function.prototype,C=Object.prototype,N=j.toString,A=C.hasOwnProperty,I=RegExp("^"+N.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const R=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!_(e)||(t=e,O&&O in t))&&(E(e)?I:P).test(T(e));var t}(n)?n:void 0},$=R(p,"Map"),D=R(Object,"create");var L=Object.prototype.hasOwnProperty,M=Object.prototype.hasOwnProperty;function U(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}U.prototype.clear=function(){this.__data__=D?D(null):{},this.size=0},U.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},U.prototype.get=function(e){var t=this.__data__;if(D){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return L.call(t,e)?t[e]:void 0},U.prototype.has=function(e){var t=this.__data__;return D?void 0!==t[e]:M.call(t,e)},U.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=D&&void 0===t?"__lodash_hash_undefined__":t,this};const F=U,B=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}z.prototype.clear=function(){this.size=0,this.__data__={hash:new F,map:new($||s),string:new F}},z.prototype.delete=function(e){var t=B(this,e).delete(e);return this.size-=t?1:0,t},z.prototype.get=function(e){return B(this,e).get(e)},z.prototype.has=function(e){return B(this,e).has(e)},z.prototype.set=function(e,t){var n=B(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const V=z;function W(e){var t=this.__data__=new s(e);this.size=t.size}W.prototype.clear=function(){this.__data__=new s,this.size=0},W.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},W.prototype.get=function(e){return this.__data__.get(e)},W.prototype.has=function(e){return this.__data__.has(e)},W.prototype.set=function(e,t){var n=this.__data__;if(n instanceof s){var r=n.__data__;if(!$||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new V(r)}return n.set(e,t),this.size=n.size,this};const K=W;function H(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new V;++t<n;)this.add(e[t])}H.prototype.add=H.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},H.prototype.has=function(e){return this.__data__.has(e)};const q=H,G=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Z=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,d=2&n?new q:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],v=t[f];if(r)var g=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==g){if(g)continue;p=!1;break}if(d){if(!G(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},Y=p.Uint8Array,Q=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},J=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var X=d?d.prototype:void 0,ee=X?X.valueOf:void 0;const te=Array.isArray;var ne=Object.prototype.propertyIsEnumerable,re=Object.getOwnPropertySymbols;const oe=re?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(re(e),(function(t){return ne.call(e,t)})))}:function(){return[]},ie=function(e){return null!=e&&"object"==typeof e},ae=function(e){return ie(e)&&"[object Arguments]"==w(e)};var se=Object.prototype,ue=se.hasOwnProperty,ce=se.propertyIsEnumerable,le=ae(function(){return arguments}())?ae:function(e){return ie(e)&&ue.call(e,"callee")&&!ce.call(e,"callee")};const fe=le;var pe=t&&!t.nodeType&&t,de=pe&&e&&!e.nodeType&&e,he=de&&de.exports===pe?p.Buffer:void 0;const ve=(he?he.isBuffer:void 0)||function(){return!1};var ge=/^(?:0|[1-9]\d*)$/;const ye=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t},me=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var be={};be["[object Float32Array]"]=be["[object Float64Array]"]=be["[object Int8Array]"]=be["[object Int16Array]"]=be["[object Int32Array]"]=be["[object Uint8Array]"]=be["[object Uint8ClampedArray]"]=be["[object Uint16Array]"]=be["[object Uint32Array]"]=!0,be["[object Arguments]"]=be["[object Array]"]=be["[object ArrayBuffer]"]=be["[object Boolean]"]=be["[object DataView]"]=be["[object Date]"]=be["[object Error]"]=be["[object Function]"]=be["[object Map]"]=be["[object Number]"]=be["[object Object]"]=be["[object RegExp]"]=be["[object Set]"]=be["[object String]"]=be["[object WeakMap]"]=!1;var we=t&&!t.nodeType&&t,_e=we&&e&&!e.nodeType&&e,Ee=_e&&_e.exports===we&&u.process,xe=function(){try{return _e&&_e.require&&_e.require("util").types||Ee&&Ee.binding&&Ee.binding("util")}catch(e){}}(),Se=xe&&xe.isTypedArray;const Oe=Se?(ke=Se,function(e){return ke(e)}):function(e){return ie(e)&&me(e.length)&&!!be[w(e)]};var ke,Te=Object.prototype.hasOwnProperty,Pe=Object.prototype;const je=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var Ce=Object.prototype.hasOwnProperty;const Ne=function(e){return null!=(t=e)&&me(t.length)&&!E(t)?function(e,t){var n=te(e),r=!n&&fe(e),o=!n&&!r&&ve(e),i=!n&&!r&&!o&&Oe(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var c in e)!Te.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ye(c,u))||s.push(c);return s}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Pe))return je(e);var t,n,r=[];for(var o in Object(e))Ce.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},Ae=function(e){return function(e,t,n){var r=t(e);return te(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ne,oe)};var Ie=Object.prototype.hasOwnProperty;const Re=R(p,"DataView"),$e=R(p,"Promise"),De=R(p,"Set"),Le=R(p,"WeakMap");var Me="[object Map]",Ue="[object Promise]",Fe="[object Set]",Be="[object WeakMap]",ze="[object DataView]",Ve=T(Re),We=T($),Ke=T($e),He=T(De),qe=T(Le),Ge=w;(Re&&Ge(new Re(new ArrayBuffer(1)))!=ze||$&&Ge(new $)!=Me||$e&&Ge($e.resolve())!=Ue||De&&Ge(new De)!=Fe||Le&&Ge(new Le)!=Be)&&(Ge=function(e){var t=w(e),n="[object Object]"==t?e.constructor:void 0,r=n?T(n):"";if(r)switch(r){case Ve:return ze;case We:return Me;case Ke:return Ue;case He:return Fe;case qe:return Be}return t});const Ze=Ge;var Ye="[object Arguments]",Qe="[object Array]",Je="[object Object]",Xe=Object.prototype.hasOwnProperty;const et=function(e,t,n,o,i,a){var s=te(e),u=te(t),c=s?Qe:Ze(e),l=u?Qe:Ze(t),f=(c=c==Ye?Je:c)==Je,p=(l=l==Ye?Je:l)==Je,d=c==l;if(d&&ve(e)){if(!ve(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new K),s||Oe(e)?Z(e,t,n,o,i,a):function(e,t,n,o,i,a,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new Y(e),new Y(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=Q;case"[object Set]":var c=1&o;if(u||(u=J),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;o|=2,s.set(e,t);var f=Z(u(e),u(t),o,i,a,s);return s.delete(e),f;case"[object Symbol]":if(ee)return ee.call(e)==ee.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var h=f&&Xe.call(e,"__wrapped__"),v=p&&Xe.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,y=v?t.value():t;return a||(a=new K),i(g,y,n,o,a)}}return!!d&&(a||(a=new K),function(e,t,n,r,o,i){var a=1&n,s=Ae(e),u=s.length;if(u!=Ae(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:Ie.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var v=e[l=s[c]],g=t[l];if(r)var y=a?r(g,v,l,t,e,i):r(v,g,l,e,t,i);if(!(void 0===y?v===g||o(v,g,n,r,i):y)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,o,i,a))},tt=function e(t,n,r,o,i){return t===n||(null==t||null==n||!ie(t)&&!ie(n)?t!=t&&n!=n:et(t,n,r,o,e,i))},nt=function(e,t){return tt(e,t)};var rt=c(824),ot=c(685);const it=(0,ot.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),at=()=>(0,ot.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}});function st(e){const t=it.getState(),n=e(t);n!==t&&it.setState(n)}const ut=()=>(0,ot.getGlobalStore)("extensions",{slots:{}});function ct(e){const t=[];for(let n of Object.values(e.extensions))for(let e of n.instances)t.push({slotModuleName:e.slotModuleName,extensionModuleName:n.moduleName,slotName:e.slotName,extensionId:e.id});nt(rt.configExtensionStore.getState().mountedExtensions,t)||rt.configExtensionStore.setState({mountedExtensions:t})}ct(it.getState()),it.subscribe(ct);const lt=at(),ft=ut(),pt=(0,rt.getExtensionSlotsConfigStore)(),dt=(0,rt.getExtensionsConfigStore)();function ht(e,t,n){const r={};for(let[o,i]of Object.entries(e.slots)){const{config:a}=(0,rt.getExtensionSlotConfigFromStore)(t,i.name),s=Ot(o,e,a,n);r[o]={moduleName:i.moduleName,assignedExtensions:s}}nt(ft.getState().slots,r)||ft.setState({slots:r})}function vt(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function gt(e){const[t]=e.split("#");return t}function yt(e,t){const n=gt(t);return e.extensions[n]}function mt(e){return yt(lt.getState(),e)}lt.subscribe((e=>{ht(e,pt.getState(),dt.getState())})),pt.subscribe((e=>{ht(lt.getState(),e,dt.getState())})),dt.subscribe((e=>{ht(lt.getState(),pt.getState(),e)}));const bt=lt.action(((e,t)=>{e.extensions[t.name]={...t,instances:[]}}));function wt(e,t){st((n=>{const r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...vt(e),attachedIds:[t]}}}}))}function _t(e,t){st((n=>{const 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 Et(e){st((t=>{const n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t}))}function xt(e,t,n,r){const o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;{const t=r.indexOf(e);return-1!==t?2e3+t:-1}}function St(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t??navigator.onLine;return e.filter((e=>Ct(n,e.online,e.offline)))}function Ot(e,t,n,r){const o=function(e,t){const n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=lt.getState();return[...t,...n].filter((e=>!r.includes(e))).sort(((e,n)=>{const r=xt(e,o,i[gt(e)].order,t),a=xt(n,o,i[gt(n)].order,t);return-1===a?-1:-1===r?1:r-a}))}(n,t.slots[e].attachedIds),i=[];for(let n of o){const{config:o}=(0,rt.getExtensionConfigFromStore)(r,e,n),a=gt(n),s=t.extensions[a];i.push({id:n,name:a,moduleName:s.moduleName,config:o,meta:s.meta,online:s.online,offline:s.offline})}return i}function kt(e){const t=lt.getState(),{config:n}=(0,rt.getExtensionSlotConfig)(e);return Ot(e,t,n,dt.getState())}const Tt=lt.action(((e,t,n)=>{const r=e.slots[n]?.moduleName;if(r&&r!=t)return console.warn(`An extension slot with the name '${n}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${r}.`),e;if(r&&r==t)return e;if(e.slots[n])return{...e,slots:{...e.slots,[n]:{...e.slots[n],moduleName:t}}};const o=vt(n,t);return{...e,slots:{...e.slots,[n]:o}}})),Pt=ft.action((()=>({slots:{},extensions:{}})));function jt(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=navigator.onLine;return Ct(n,e,t)}function Ct(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)}function Nt(e,t){const n=navigator.onLine?e:t;return"object"==typeof n?n:{}}var At=c(645);function It(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e=>e,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const a=gt(r),s=mt(r);let u=!0,c=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);const{load:l,online:f,offline:p,meta:d,moduleName:h}=s;jt(f,p)&&(l().then((a=>{let{default:s,...l}=a;u&&(c=(0,At.mountRootParcel)(o(s??l),{...Nt(f,p),...i,_meta:d,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:h},domElement:e}))})),st((o=>{const i={domElement:e,id:r,slotName:t,slotModuleName:n};return{...o,extensions:{...o.extensions,[a]:{...o.extensions[a],instances:[...o.extensions[a].instances,i]}}}})))}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return()=>{u=!1,c&&("MOUNTED"!==c.getStatus()?c.mountPromise.then((()=>{c&&c.unmount()})):c.unmount())}}const Rt=at()})(),l})())}}}))},9187:(e,t,n)=>{"use strict";n.d(t,{pv:()=>r.AssignedExtension,x9:()=>o.CancelLoading,uP:()=>r.ConnectedExtension,uu:()=>r.ExtensionMeta,tj:()=>r.ExtensionRegistration,u_:()=>r.ExtensionSlotState,qN:()=>r.ExtensionStore,ub:()=>T,og:()=>P,lW:()=>j,h6:()=>I,Kq:()=>N,EB:()=>S,yw:()=>f,ix:()=>k,Qq:()=>R,H8:()=>y});var r={};n.r(r),n.d(r,{Co:()=>c,yw:()=>f,qO:()=>l});var o={};n.r(o),n.d(o,{H:()=>y});var i=n(7179),a=n(3202),s=n(8748);const u=(0,s.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),c=()=>(0,s.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}});function l(e){const t=u.getState(),n=e(t);n!==t&&u.setState(n)}const f=()=>(0,s.getGlobalStore)("extensions",{slots:{}});function p(e){const t=[];for(let n of Object.values(e.extensions))for(let e of n.instances)t.push({slotModuleName:e.slotModuleName,extensionModuleName:n.moduleName,slotName:e.slotName,extensionId:e.id});(0,a.Z)(i.configExtensionStore.getState().mountedExtensions,t)||i.configExtensionStore.setState({mountedExtensions:t})}function d(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=navigator.onLine;return h(n,e,t)}function h(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)}function v(e,t){const n=navigator.onLine?e:t;return"object"==typeof n?n:{}}p(u.getState()),u.subscribe(p);var g=n(3710);function y(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e=>e,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const a=S(r),s=O(r);let u=!0,c=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);const{load:f,online:p,offline:h,meta:y,moduleName:m}=s;d(p,h)&&(f().then((a=>{let{default:s,...l}=a;u&&(c=(0,g.BP)(o(s??l),{...v(p,h),...i,_meta:y,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:m},domElement:e}))})),l((o=>{const i={domElement:e,id:r,slotName:t,slotModuleName:n};return{...o,extensions:{...o.extensions,[a]:{...o.extensions[a],instances:[...o.extensions[a].instances,i]}}}})))}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return()=>{u=!1,c&&("MOUNTED"!==c.getStatus()?c.mountPromise.then((()=>{c&&c.unmount()})):c.unmount())}}c();const m=c(),b=f(),w=(0,i.getExtensionSlotsConfigStore)(),_=(0,i.getExtensionsConfigStore)();function E(e,t,n){const r={};for(let[o,a]of Object.entries(e.slots)){const{config:s}=(0,i.getExtensionSlotConfigFromStore)(t,a.name),u=A(o,e,s,n);r[o]={moduleName:a.moduleName,assignedExtensions:u}}(0,a.Z)(b.getState().slots,r)||b.setState({slots:r})}function x(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function S(e){const[t]=e.split("#");return t}function O(e){return function(e,t){const n=S(t);return e.extensions[n]}(m.getState(),e)}m.subscribe((e=>{E(e,w.getState(),_.getState())})),w.subscribe((e=>{E(m.getState(),e,_.getState())})),_.subscribe((e=>{E(m.getState(),w.getState(),e)}));const k=m.action(((e,t)=>{e.extensions[t.name]={...t,instances:[]}}));function T(e,t){l((n=>{const r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...x(e),attachedIds:[t]}}}}))}function P(e,t){l((n=>{const 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 j(e){l((t=>{const n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t}))}function C(e,t,n,r){const o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;{const t=r.indexOf(e);return-1!==t?2e3+t:-1}}function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t??navigator.onLine;return e.filter((e=>h(n,e.online,e.offline)))}function A(e,t,n,r){const o=function(e,t){const n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=m.getState();return[...t,...n].filter((e=>!r.includes(e))).sort(((e,n)=>{const r=C(e,o,i[S(e)].order,t),a=C(n,o,i[S(n)].order,t);return-1===a?-1:-1===r?1:r-a}))}(n,t.slots[e].attachedIds),a=[];for(let n of o){const{config:o}=(0,i.getExtensionConfigFromStore)(r,e,n),s=S(n),u=t.extensions[s];a.push({id:n,name:s,moduleName:u.moduleName,config:o,meta:u.meta,online:u.online,offline:u.offline})}return a}function I(e){const t=m.getState(),{config:n}=(0,i.getExtensionSlotConfig)(e);return A(e,t,n,_.getState())}const R=m.action(((e,t,n)=>{const r=e.slots[n]?.moduleName;if(r&&r!=t)return console.warn(`An extension slot with the name '${n}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${r}.`),e;if(r&&r==t)return e;if(e.slots[n])return{...e,slots:{...e.slots,[n]:{...e.slots[n],moduleName:t}}};const o=x(n,t);return{...e,slots:{...e.slots,[n]:o}}}));b.action((()=>({slots:{},extensions:{}})))},9976:()=>{System.register([],(function(e,t){return{execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(968).s)(1),(()=>{"use strict";r.r(o),r.d(o,{dispatchConnectivityChanged:()=>t,dispatchNotificationShown:()=>f,dispatchPrecacheStaticDependencies:()=>s,setupPaths:()=>h,setupUtils:()=>v,subscribeConnectivity:()=>i,subscribeConnectivityChanged:()=>n,subscribeNotificationShown:()=>p,subscribePrecacheStaticDependencies:()=>u,subscribeToastShown:()=>d});const e="openmrs:connectivity-changed";function t(t){window.dispatchEvent(new CustomEvent(e,{detail:{online:t}}))}function n(t){const n=e=>t(e.detail);return window.addEventListener(e,n),()=>window.removeEventListener(e,n)}function i(e){return e({online:navigator.onLine}),n(e)}const a="openmrs:precache-static-dependencies";function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(a,{detail:e}))}function u(e){const t=t=>e(t.detail);return window.addEventListener(a,t),()=>window.removeEventListener(a,t)}const c="openmrs:notification-shown",l="openmrs:toast-shown";function f(e){window.dispatchEvent(new CustomEvent(c,{detail:e}))}function p(e){const t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function d(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}function h(e){window.openmrsBase=e.apiUrl,window.spaBase=e.spaPath,window.spaEnv=e.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=()=>`${window.spaBase}/`}function v(){window.copyText=e=>{const t=window.getSelection();if(t){const n=document.createRange();n.selectNode(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges()}}}})(),o})())}}}))},5763:(e,t,n)=>{"use strict";n.d(t,{ac:()=>r.ConnectivityChangedEvent,hM:()=>r.PrecacheStaticDependenciesEvent,Kj:()=>r.ShowNotificationEvent,P3:()=>r.ShowToastEvent,BW:()=>a,XS:()=>i,NQ:()=>f,dY:()=>u,id:()=>p});var r={};n.r(r),n.d(r,{BW:()=>a,XS:()=>i,NQ:()=>f,dY:()=>u,id:()=>p});const o="openmrs:connectivity-changed";function i(e){const t=t=>e(t.detail);return window.addEventListener(o,t),()=>window.removeEventListener(o,t)}function a(e){return e({online:navigator.onLine}),i(e)}const s="openmrs:precache-static-dependencies";function u(e){const t=t=>e(t.detail);return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}const c="openmrs:notification-shown",l="openmrs:toast-shown";function f(e){const t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function p(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}},5614:(e,t,n)=>{"use strict";n.d(t,{iC:()=>r.OfflineMode,Vm:()=>r.OfflineModeResult,Cg:()=>o.QueueItemDescriptor,we:()=>o.SyncItem,Ug:()=>o.SyncProcessOptions,jp:()=>zr,Qd:()=>Br,Gy:()=>Vr,sF:()=>Nr,vm:()=>a,aA:()=>Dr,k1:()=>rr,TI:()=>Fr,Q2:()=>Ur,z7:()=>Ar,nN:()=>sr,gp:()=>mr,a7:()=>Cr,Rz:()=>_r,QI:()=>br,$9:()=>wr,X2:()=>Mr,dt:()=>or,H_:()=>Wr,MO:()=>ir});var r={};n.r(r),n.d(r,{vm:()=>a});var o={};n.r(o),n.d(o,{jp:()=>zr,Qd:()=>Br,Gy:()=>Vr,aA:()=>Dr,TI:()=>Fr,Q2:()=>Ur,X2:()=>Mr,H_:()=>Wr});let i="unavailable";function a(){return{current:i,notAvailable:!0,active:!1}}const s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,u=Object.keys,c=Array.isArray;function l(e,t){return"object"!=typeof t||u(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||s.Promise||(s.Promise=Promise);const f=Object.getPrototypeOf,p={}.hasOwnProperty;function d(e,t){return p.call(e,t)}function h(e,t){"function"==typeof t&&(t=t(f(e))),("undefined"==typeof Reflect?u:Reflect.ownKeys)(t).forEach((n=>{g(e,n,t[n])}))}const v=Object.defineProperty;function g(e,t,n,r){v(e,t,l(n&&d(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function y(e){return{from:function(t){return e.prototype=Object.create(t.prototype),g(e.prototype,"constructor",e),{extend:h.bind(null,e.prototype)}}}}const m=Object.getOwnPropertyDescriptor;function b(e,t){let n;return m(e,t)||(n=f(e))&&b(n,t)}const w=[].slice;function E(e,t,n){return w.call(e,t,n)}function x(e,t){return t(e)}function S(e){if(!e)throw new Error("Assertion Failed")}function O(e){s.setImmediate?setImmediate(e):setTimeout(e,0)}function k(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function T(e,t){if(d(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=T(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:T(s,t.substr(a+1))}}function P(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){S("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)P(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?c(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u||(u=e[a]={}),P(u,s,n)}}else void 0===n?c(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function j(e){var t={};for(var n in e)d(e,n)&&(t[n]=e[n]);return t}const C=[].concat;function N(e){return C.apply([],e)}const A="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(N([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>s[e])),I=A.map((e=>s[e]));k(A,(e=>[e,!0]));let R=null;function $(e){R="undefined"!=typeof WeakMap&&new WeakMap;const t=D(e);return R=null,t}function D(e){if(!e||"object"!=typeof e)return e;let t=R&&R.get(e);if(t)return t;if(c(e)){t=[],R&&R.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(D(e[n]))}else if(I.indexOf(e.constructor)>=0)t=e;else{const n=f(e);for(var o in t=n===Object.prototype?{}:Object.create(n),R&&R.set(e,t),e)d(e,o)&&(t[o]=D(e[o]))}return t}const{toString:L}={};function M(e){return L.call(e).slice(8,-1)}const U="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",F="symbol"==typeof U?function(e){var t;return null!=e&&(t=e[U])&&t.apply(e)}:function(){return null},B={};function z(e){var t,n,r,o;if(1===arguments.length){if(c(e))return e.slice();if(this===B&&"string"==typeof e)return[e];if(o=F(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=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const V="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var W="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function K(e,t){W=e,H=t}var H=()=>!0;const q=!new Error("").stack;function G(){if(q)try{throw G.arguments,new Error}catch(e){return e}return new Error}function Z(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(H).map((e=>"\n"+e)).join("")):""}var Y=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Q=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Y),J={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 X(e,t){this._e=G(),this.name=e,this.message=t}function ee(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function te(e,t,n,r){this._e=G(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ee(e,t)}function ne(e,t){this._e=G(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=ee(e,t)}y(X).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Z(this._e,2))}},toString:function(){return this.name+": "+this.message}}),y(te).from(X),y(ne).from(X);var re=Q.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const oe=X;var ie=Q.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=G(),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=J[t]||n,this.inner=null)}return y(r).from(oe),e[t]=r,e}),{});ie.Syntax=SyntaxError,ie.Type=TypeError,ie.Range=RangeError;var ae=Y.reduce(((e,t)=>(e[t+"Error"]=ie[t],e)),{}),se=Q.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=ie[t]),e)),{});function ue(){}function ce(e){return e}function le(e,t){return null==e||e===ce?t:function(n){return t(e(n))}}function fe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function pe(e,t){return e===ue?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?fe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?fe(o,this.onerror):o),void 0!==i?i:n}}function de(e,t){return e===ue?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?fe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?fe(r,this.onerror):r)}}function he(e,t){return e===ue?t:function(n){var r=e.apply(this,arguments);l(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?fe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?fe(i,this.onerror):i),void 0===r?void 0===a?void 0:a:l(r,a)}}function ve(e,t){return e===ue?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function ge(e,t){return e===ue?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}}se.ModifyError=te,se.DexieError=X,se.BulkError=ne;var ye={};const[me,be,we]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,f(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,f(t),e]})(),_e=be&&be.then,Ee=me&&me.constructor,xe=!!we;var Se=!1,Oe=we?()=>{we.then(Ge)}:s.setImmediate?setImmediate.bind(null,Ge):s.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Ge(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Ge,0)},ke=function(e,t){$e.push([e,t]),Pe&&(Oe(),Pe=!1)},Te=!0,Pe=!0,je=[],Ce=[],Ne=null,Ae=ce,Ie={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:mt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{mt(e[0],e[1])}catch(e){}}))}},Re=Ie,$e=[],De=0,Le=[];function Me(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=ue,this._lib=!1;var t=this._PSD=Re;if(W&&(this._stackHolder=G(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ye)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&ze(this,this._value))}this._state=null,this._value=null,++t.ref,Be(this,e)}const Ue={get:function(){var e=Re,t=ot;function n(n,r){var o=!e.global&&(e!==Re||t!==ot);const i=o&&!ut();var a=new Me(((t,a)=>{We(this,new Fe(gt(n,e,o,i),gt(r,e,o,i),t,a,e))}));return W&&qe(a,this),a}return n.prototype=ye,n},set:function(e){g(this,"then",e&&e.prototype===ye?Ue:{get:function(){return e},set:Ue.set})}};function Fe(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 Be(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&Ze();t&&"function"==typeof t.then?Be(e,((e,n)=>{t instanceof Me?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,Ve(e)),n&&Ye()}}),ze.bind(null,e))}catch(t){ze(e,t)}}function ze(e,t){if(Ce.push(t),null===e._state){var n=e._lib&&Ze();t=Ae(t),e._state=!1,e._value=t,W&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=b(t,"stack");t._promise=e,g(t,"stack",{get:()=>Se?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){je.some((t=>t._value===e._value))||je.push(e)}(e),Ve(e),n&&Ye()}}function Ve(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)We(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===De&&(++De,ke((()=>{0==--De&&Qe()}),[]))}function We(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,++De,ke(Ke,[n,e,t])}else e._listeners.push(t)}function Ke(e,t,n){try{Ne=t;var r,o=t._value;t._state?r=e(o):(Ce.length&&(Ce=[]),r=e(o),-1===Ce.indexOf(o)&&function(e){for(var t=je.length;t;)if(je[--t]._value===e._value)return void je.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Ne=null,0==--De&&Qe(),--n.psd.ref||n.psd.finalize()}}function He(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Z(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return W&&((r=Z(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&He(e._prev,t,n)),t}function qe(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Ge(){Ze()&&Ye()}function Ze(){var e=Te;return Te=!1,Pe=!1,e}function Ye(){var e,t,n;do{for(;$e.length>0;)for(e=$e,$e=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while($e.length>0);Te=!0,Pe=!0}function Qe(){var e=je;je=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Le.slice(0),n=t.length;n;)t[--n]()}function Je(e){return new Me(ye,!1,e)}function Xe(e,t){var n=Re;return function(){var r=Ze(),o=Re;try{return pt(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{pt(o,!1),r&&Ye()}}}h(Me.prototype,{then:Ue,_then:function(e,t){We(this,new Fe(null,null,e,t,Re))},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):Je(e))):this.then(null,(e=>e&&e.name===t?n(e):Je(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),Je(t))))},stack:{get:function(){if(this._stack)return this._stack;try{Se=!0;var e=He(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Se=!1}}},timeout:function(e,t){return e<1/0?new Me(((n,r)=>{var o=setTimeout((()=>r(new ie.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&g(Me.prototype,Symbol.toStringTag,"Dexie.Promise"),Ie.env=dt(),h(Me,{all:function(){var e=z.apply(null,arguments).map(ct);return new Me((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>Me.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof Me)return e;if(e&&"function"==typeof e.then)return new Me(((t,n)=>{e.then(t,n)}));var t=new Me(ye,!0,e);return qe(t,Ne),t},reject:Je,race:function(){var e=z.apply(null,arguments).map(ct);return new Me(((t,n)=>{e.map((e=>Me.resolve(e).then(t,n)))}))},PSD:{get:()=>Re,set:e=>Re=e},totalEchoes:{get:()=>ot},newPSD:at,usePSD:ht,scheduler:{get:()=>ke,set:e=>{ke=e}},rejectionMapper:{get:()=>Ae,set:e=>{Ae=e}},follow:(e,t)=>new Me(((n,r)=>at(((t,n)=>{var r=Re;r.unhandleds=[],r.onunhandled=n,r.finalize=fe((function(){!function(e){Le.push((function t(){e(),Le.splice(Le.indexOf(t),1)})),++De,ke((()=>{0==--De&&Qe()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),Ee&&(Ee.allSettled&&g(Me,"allSettled",(function(){const e=z.apply(null,arguments).map(ct);return new Me((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>Me.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),Ee.any&&"undefined"!=typeof AggregateError&&g(Me,"any",(function(){const e=z.apply(null,arguments).map(ct);return new Me(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>Me.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const et={awaits:0,echoes:0,id:0};var tt=0,nt=[],rt=0,ot=0,it=0;function at(e,t,n,r){var o=Re,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++it;var a=Ie.env;i.env=xe?{Promise:Me,PromiseProp:{value:Me,configurable:!0,writable:!0},all:Me.all,race:Me.race,allSettled:Me.allSettled,any:Me.any,resolve:Me.resolve,reject:Me.reject,nthen:yt(a.nthen,i),gthen:yt(a.gthen,i)}:{},t&&l(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=ht(i,e,n,r);return 0===i.ref&&i.finalize(),s}function st(){return et.id||(et.id=++tt),++et.awaits,et.echoes+=100,et.id}function ut(){return!!et.awaits&&(0==--et.awaits&&(et.id=0),et.echoes=100*et.awaits,!0)}function ct(e){return et.echoes&&e&&e.constructor===Ee?(st(),e.then((e=>(ut(),e)),(e=>(ut(),bt(e))))):e}function lt(e){++ot,et.echoes&&0!=--et.echoes||(et.echoes=et.id=0),nt.push(Re),pt(e,!0)}function ft(){var e=nt[nt.length-1];nt.pop(),pt(e,!1)}function pt(e,t){var n=Re;if((t?!et.echoes||rt++&&e===Re:!rt||--rt&&e===Re)||vt(t?lt.bind(null,e):ft),e!==Re&&(Re=e,n===Ie&&(Ie.env=dt()),xe)){var r=Ie.env.Promise,o=e.env;be.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(s,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function dt(){var e=s.Promise;return xe?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:be.then,gthen:e.prototype.then}:{}}function ht(e,t,n,r,o){var i=Re;try{return pt(e,!0),t(n,r,o)}finally{pt(i,!1)}}function vt(e){_e.call(me,e)}function gt(e,t,n,r){return"function"!=typeof e?e:function(){var o=Re;n&&st(),pt(t,!0);try{return e.apply(this,arguments)}finally{pt(o,!1),r&&vt(ut)}}}function yt(e,t){return function(n,r){return e.call(this,gt(n,t),gt(r,t))}}function mt(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(s.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),l(r,o)):s.CustomEvent&&l(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&s.dispatchEvent&&(dispatchEvent(r),!s.PromiseRejectionEvent&&s.onunhandledrejection))try{s.onunhandledrejection(r)}catch(e){}W&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+_e).indexOf("[native code]")&&(st=ut=ue);var bt=Me.reject;function wt(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Re.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===re.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>wt(e,t,n,r)))):bt(o)}return o._promise(t,((e,t)=>at((()=>(Re.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return bt(new ie.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return bt(new ie.DatabaseClosed);e.open().catch(ue)}return e._state.dbReadyPromise.then((()=>wt(e,t,n,r)))}const _t=String.fromCharCode(65535),Et="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",xt=[],St="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Ot=St,kt=St,Tt=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function Pt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const jt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ct(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=$(t))[e],t)}class Nt{_trans(e,t,n){const r=this._tx||Re.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new ie.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=Ze();try{return r&&r.db===this.db?r===Re.trans?r._promise(e,i,n):at((()=>r._promise(e,i,n)),{trans:r,transless:Re.transless||Re}):wt(this.db,e,[this.name],i)}finally{a&&Ye()}}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(c(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=u(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const 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!==_t)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&W&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?Pt(n,a&&a.multi?e=>{const t=T(e,o);return c(t)&&t.some((e=>i(s,e)))}:e=>i(s,T(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,c(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(d(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){l(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Ct(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?Me.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{P(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||c(e))return this.where(":id").equals(e).modify(t);{const n=T(e,this.schema.primKey.keyPath);if(void 0===n)return bt(new ie.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?u(t).forEach((n=>{P(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Ct(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Me.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{P(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?Me.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:jt}))).then((e=>e.numFailures?Me.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){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new ie.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ie.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Ct(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 ne(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new ie.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ie.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Ct(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 ne(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const 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 ne(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function At(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new 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)return a(e);r||(r=ve),o||(o=ue);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){u(e).forEach((function(t){var n=e[t];if(c(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new ie.InvalidArgument("Invalid event config");var r=i(t,ce,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){O((function(){e.apply(null,t)}))}))}))}}))}}function It(e,t){return y(t).from({prototype:e}),t}function Rt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function $t(e,t){e.filter=Pt(e.filter,t)}function Dt(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>Pt(r(),t()):t,e.justLimit=n&&!r}function Lt(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new ie.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Mt(e,t,n){const r=Lt(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 Ut(e,t,n,r){const o=e.replayFilter?Pt(e.filter,e.replayFilter()):e.filter;if(e.or){const 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)),d(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),Ft(Mt(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Ft(Mt(e,r,n),Pt(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function Ft(e,t,n,r){var o=Xe(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=ue}),(t=>{e.fail(t),n=ue}))||o(e.value,e,(e=>n=e)),n()}))}))}function Bt(e,t){try{const n=zt(e),r=zt(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){const 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}(Vt(e),Vt(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Bt(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function zt(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=M(e);return"ArrayBuffer"===n?"binary":n}function Vt(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class Wt{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,bt.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,bt.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=Pt(t.algorithm,e)}_iterate(e,t){return Ut(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&l(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Ut(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Rt(t,!0))return n.count({trans:e,query:{index:Lt(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Ut(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const 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&&Rt(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=Lt(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))}{const n=[];return Ut(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Rt(t)?Dt(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Dt(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Dt(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return $t(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,n;return $t(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Pt(t.isMatch,n),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&&Rt(t,!0)&&t.limit>0)return this._read((e=>{var n=Lt(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 $t(this._ctx,(function(e){var t=e.primaryKey.toString(),r=d(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=u(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];T(t,a)!==s&&(P(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:c}=a.schema.primaryKey,l=this.db._options.modifyChunkSize||200,f=[];let p=0;const d=[],h=(e,t)=>{const{failures:n,numFailures:r}=t;p+=e-r;for(let e of u(n))f.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=u=>{const f=Math.min(l,o.length-u);return a.getMany({trans:n,keys:o.slice(u,u+f),cache:"immutable"}).then((p=>{const d=[],v=[],g=s?[]:null,y=[];for(let e=0;e<f;++e){const t=p[e],n={value:$(t),primKey:o[u+e]};!1!==r.call(n,n.value,n)&&(null==n.value?y.push(o[u+e]):s||0===Bt(c(t),c(n.value))?(v.push(n.value),s&&g.push(o[u+e])):(y.push(o[u+e]),d.push(n.value)))}const m=Rt(t)&&t.limit===1/0&&("function"!=typeof e||e===Kt)&&{index:t.index,range:t.range};return Promise.resolve(d.length>0&&a.mutate({trans:n,type:"add",values:d}).then((e=>{for(let t in e.failures)y.splice(parseInt(t),1);h(d.length,e)}))).then((()=>(v.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:g,values:v,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>h(v.length,e))))).then((()=>(y.length>0||m&&e===Kt)&&a.mutate({trans:n,type:"delete",keys:y,criteria:m}).then((e=>h(y.length,e))))).then((()=>o.length>u+f&&i(u+l)))}))};return i(0).then((()=>{if(f.length>0)throw new te("Error modifying one or more objects",f,p,d);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Rt(e)&&(e.isPrimKey&&!kt||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new te("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Kt)}}const Kt=(e,t)=>t.value=null;function Ht(e,t){return e<t?-1:e===t?0:1}function qt(e,t){return e>t?-1:e===t?0:1}function Gt(e,t,n){var r=e instanceof en?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Zt(e){return new e.Collection(e,(()=>Xt(""))).limit(0)}function Yt(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}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)}function Qt(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return Gt(e,"String expected.");function p(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?Ht:qt;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})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}p("next");var d=new e.Collection(e,(()=>Jt(s[0],u[f-1]+r)));d._ondirectionchange=function(e){p(e)};var h=0;return d._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,u,h))return!0;for(var d=null,v=h;v<f;++v){var g=Yt(o,p,s[v],u[v],a,c);null===g&&null===d?h=v+1:(null===d||a(d,g)>0)&&(d=g)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d}function Jt(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Xt(e){return{type:1,lower:e,upper:e}}class en{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)?Zt(this):new this.Collection(this,(()=>Jt(e,t,!n,!r)))}catch(e){return Gt(this,Et)}}equals(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Xt(e)))}above(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(e,void 0,!0)))}aboveOrEqual(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(e,void 0,!1)))}below(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(void 0,e)))}startsWith(e){return"string"!=typeof e?Gt(this,"String expected."):this.between(e,e+_t,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Qt(this,((e,t)=>0===e.indexOf(t[0])),[e],_t)}equalsIgnoreCase(e){return Qt(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=z.apply(B,arguments);return 0===e.length?Zt(this):Qt(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=z.apply(B,arguments);return 0===e.length?Zt(this):Qt(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,_t)}anyOf(){const e=z.apply(B,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Gt(this,Et)}if(0===e.length)return Zt(this);const n=new this.Collection(this,(()=>Jt(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)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,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(){const e=z.apply(B,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Gt(this,Et)}const 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){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return Zt(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return Gt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ie.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&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}),[]),c.sort(f)}catch(e){return Gt(this,Et)}let p=0;const d=u?e=>r(e,c[p][1])>0:e=>r(e,c[p][1])>=0,h=s?e=>o(e,c[p][0])>0:e=>o(e,c[p][0])>=0;let v=d;const g=new this.Collection(this,(()=>Jt(c[0][0],c[c.length-1][1],!s,!u)));return g._ondirectionchange=e=>{"next"===e?(v=d,l=r):(v=h,l=o),c.sort(f)},g._addAlgorithm(((e,t,n)=>{for(var o=e.key;v(o);)if(++p,p===c.length)return t(n),!1;return!!function(e){return!d(e)&&!h(e)}(o)||(0===this._cmp(o,c[p][1])||0===this._cmp(o,c[p][0])||t((()=>{l===r?e.continue(c[p][0]):e.continue(c[p][1])})),!1)})),g}startsWithAnyOf(){const e=z.apply(B,arguments);return e.every((e=>"string"==typeof e))?0===e.length?Zt(this):this.inAnyRange(e.map((e=>[e,e+_t]))):Gt(this,"startsWithAnyOf() only works with strings")}}function tn(e){return Xe((function(t){return nn(t),e(t.target.error),!1}))}function nn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const rn=At(null,"storagemutated");class on{_lock(){return S(!Re.global),++this._reculock,1!==this._reculock||Re.global||(Re.lockOwnerFor=this),this}_unlock(){if(S(!Re.global),0==--this._reculock)for(Re.global||(Re.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{ht(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Re.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(S(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new ie.DatabaseClosed(n);case"MissingAPIError":throw new ie.MissingAPI(n.message,n);default:throw new ie.OpenFailed(n)}if(!this.active)throw new ie.TransactionInactive;return S(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=Xe((t=>{nn(t),this._reject(e.error)})),e.onabort=Xe((t=>{nn(t),this.active&&this._reject(new ie.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Xe((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&rn.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return bt(new ie.ReadOnly("Transaction is readonly"));if(!this.active)return bt(new ie.TransactionInactive);if(this._locked())return new Me(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},Re])}));if(n)return at((()=>{var e=new Me(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new Me(((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();const n=Me.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 Me(((e,r)=>{n.then((n=>t._waitingQueue.push(Xe(e.bind(null,n)))),(e=>t._waitingQueue.push(Xe(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 ie.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(d(t,e))return t[e];const n=this.schema[e];if(!n)throw new ie.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function an(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?"++":"")+sn(t)}}function sn(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function un(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:k(n,(e=>[e.name,e]))}}let cn=e=>{try{return e.only([[]]),cn=()=>[[]],[[]]}catch(e){return cn=()=>_t,_t}};function ln(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>T(t,e)}(e):t=>T(t,e)}function fn(e){return[].slice.call(e)}let pn=0;function dn(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function hn(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{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)}const{schema:o,hasGetAll:i}=function(e,t){const n=fn(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=c(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:ln(t)},indexes:fn(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:c(o),keyPath:o,unique:n,multiEntry:r,extractKey:ln(o)};return i[dn(o)]=a,a})),getIndexByKeyPath:e=>i[dn(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[dn(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=Xe(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:p}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let d;const h=[],v=[];let g=0;const y=e=>{++g,nn(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:g,failures:v,results:[],lastResult:void 0});3===a.type?h.push(d=c.clear()):h.push(d=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<p;++r)h.push(d=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),d.onerror=y;else for(let t=0;t<p;++t)h.push(d=c[n](e[t])),d.onerror=y}const m=e=>{const t=e.target.result;h.forEach(((e,t)=>null!=e.error&&(v[t]=e.error))),s({numFailures:g,failures:v,results:"delete"===n?o:h.map((e=>e.result)),lastResult:t})};d.onerror=e=>{y(e),m(e)},d.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=Xe(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},p=tn(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=p,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=Xe(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=tn(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=Xe(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:p}=c,d=a.objectStore(t),h=f.isPrimaryKey?d:d.index(f.name),v=r(p);if(0===u)return o({result:[]});if(e){const e=s?h.getAll(v,l):h.getAllKeys(v,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=tn(i)}else{let e=0;const t=s||!("openKeyCursor"in h)?h.openCursor(v):h.openKeyCursor(v),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=tn(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=Xe(s);const{index:c,range:l}=o,f=e.objectStore(t),p=c.isPrimaryKey?f:f.index(c.name),d=i?a?"prevunique":"prev":a?"nextunique":"next",h=n||!("openKeyCursor"in p)?p.openCursor(r(l),d):p.openKeyCursor(r(l),d);h.onerror=tn(u),h.onsuccess=Xe((t=>{const n=h.result;if(!n)return void s(null);n.___id=++pn,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Xe(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=Xe(e),h.onerror=tn(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 new Error("Cursor behind last entry")},n.stop()};return h.onsuccess=Xe((e=>{h.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=Xe((t=>e(t.target.result))),l.onerror=tn(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:cn(t),schema:o}}function vn({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(hn(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const 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 gn({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=b(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?g(t,n,{get(){return this.table(n)},set(e){v(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function yn({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function mn(e,t){return e._cfg.version-t._cfg.version}function bn(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=Re.transless||Re;at((()=>{Re.trans=i,Re.transless=s,0===t?(u(o).forEach((e=>{_n(n,e,o[e].primKey,o[e].indexes)})),vn(e,n),Me.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=xn(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,c=i._cfg.dbschema;Sn(e,o,r),Sn(e,c,r),a=e._dbSchema=c;const l=wn(o,c);l.add.forEach((e=>{_n(r,e[0],e[1].primKey,e[1].indexes)})),l.change.forEach((e=>{if(e.recreate)throw new ie.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>En(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),En(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const f=i._cfg.contentUpgrade;if(f&&i._cfg.version>t){vn(e,r),n._memoizedTables={},s=!0;let t=j(c);l.del.forEach((e=>{t[e]=o[e]})),yn(e,[e.Transaction.prototype]),gn(e,[e.Transaction.prototype],u(t),t),n.schema=t;const i=V(f);let a;i&&st();const p=Me.follow((()=>{if(a=f(n),a&&i){var e=ut.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?Me.resolve(a):p.then((()=>a))}})),o.push((t=>{s&&Ot||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),yn(e,[e.Transaction.prototype]),gn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?Me.resolve(o.shift()(n.idbtrans)).then(e):Me.resolve()}().then((()=>{var e,t;t=r,u(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||_n(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}function wn(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!St)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function _n(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>En(o,e))),o}function En(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function xn(e,t,n){const r={};return E(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=an(sn(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=an(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=un(e,i,a)})),r}function Sn({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+E(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class On{_parseStoresSpec(e,t){u(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return an(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),c(r),0===t)})),o=r.shift();if(o.multi)throw new ie.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new ie.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new ie.Schema("Index must have a name and cannot be an empty string")})),t[n]=un(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{l(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,yn(t,[t._allTables,t,t.Transaction.prototype]),gn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],u(o),o),t._storeNames=u(o),this}upgrade(e){return this._cfg.contentUpgrade=ge(this._cfg.contentUpgrade||ue,e),this}}function kn(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new qn("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Tn(e){return e&&"function"==typeof e.databases}function Pn(e){return at((function(){return Re.letThrough=!0,e()}))}function jn(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function Cn(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):c(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function Nn(e,t,n){var r=arguments.length;if(r<2)throw new ie.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=N(o);return[e,i,n]}function An(e,t,n,r,o){return Me.resolve().then((()=>{const i=Re.transless||Re,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===re.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>An(e,t,n,null,o)))):bt(r)}const u=V(o);let c;u&&st();const l=Me.follow((()=>{if(c=o.call(a,a),c)if(u){var e=ut.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=Cn(c))}),s);return(c&&"function"==typeof c.then?Me.resolve(c).then((e=>a.active?e:bt(new ie.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),bt(e))))}))}function In(e,t,n){const r=c(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Rn={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=dn(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:ln(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:In(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:In(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[dn(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(In(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(In(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return c}}}};function $n(e,t,n,r){return n=n||{},r=r||"",u(e).forEach((o=>{if(d(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=M(i);e!==M(a)?n[r+o]=t[o]:"Object"===e?$n(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})),u(t).forEach((o=>{d(e,o)||(n[r+o]=t[o])})),n}const Dn={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=Re.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===ue)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===ue&&s.fire===ue)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===ue)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===ue)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=Re.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||P(e.values[o],r.keyPath,n))}else{const r=$n(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{d(t,e)?t[e]=i[e]:P(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Ln(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Bt(t.keys[o],e[i])&&(r.push(n?$(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const Mn={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Ln(e.keys,e.trans._cache,"clone"===e.cache);return t?Me.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?$(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Un(e){return!("from"in e)}const Fn=function(e,t){if(!this){const t=new Fn;return e&&"d"in e&&l(t,e),t}l(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Bn(e,t,n){const r=Bt(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Un(e))return l(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Bt(n,e.from)<0)return o?Bn(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Wn(e);if(Bt(t,e.to)>0)return i?Bn(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Wn(e);Bt(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Bt(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&zn(e,o),i&&a&&zn(e,i)}function zn(e,t){Un(t)||function e(t,{from:n,to:r,l:o,r:i}){Bn(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Vn(e){let t=Un(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Bt(e,t.n.from)<0;)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||Bt(e,t.n.to)<=0)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 Wn(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const 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=Kn(n)}e.d=Kn(e)}function Kn({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}h(Fn.prototype,{add(e){return zn(this,e),this},addKey(e){return Bn(this,e,e),this},addKeys(e){return e.forEach((e=>Bn(this,e,e))),this},[U](){return Vn(this)}});const Hn={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new Fn(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,f={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new Fn)},l=u(""),f=u(":dels"),{type:p}=e;let[d,h]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const v=e.trans._cache;return o.mutate(e).then((e=>{if(c(d)){"delete"!==p&&(d=e.results),l.addKeys(d);const t=Ln(d,v);t||"add"===p||f.addKeys(d),(t||h)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&c(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==Bt(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,h)}else if(d){const e={from:d.lower,to:d.upper};f.add(e),l.add(e)}else l.add(n),f.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},p=({query:{index:t,range:n}})=>{var r,o;return[t,new Fn(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},d={get:e=>[a,new Fn(e.key)],getMany:e=>[a,(new Fn).addKeys(e.keys)],count:p,query:p,openCursor:p};return u(d).forEach((e=>{f[e]=function(i){const{subscr:a}=Re;if(a){const u=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new Fn)},c=u(""),f=u(":dels"),[p,h]=d[e](i);if(u(p.name||"").add(h),!p.isPrimaryKey){if("count"!==e){const 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)));const e=i.values?n.result.map(s):n.result;i.values?c.addKeys(e):f.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(f.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return f.addKey(t),t}},value:{get:()=>(t&&c.addKey(e.primaryKey),e.value)}})}return n}))}f.add(n)}}return o[e].apply(this,arguments)}})),f}}}};class qn{constructor(e,t){this._middlewares={},this.verno=0;const n=qn.dependencies;this._options=t={addons:qn.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ue,dbReadyPromise:null,cancelOpen:ue,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new Me((e=>{o.dbReadyResolve=e})),o.openCanceller=new Me(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=At(this,"populate","blocked","versionchange","close",{ready:[ge,ue]}),this.on.ready.subscribe=x(this.on.ready.subscribe,(e=>(t,n)=>{qn.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||Me.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,It(Wt.prototype,(function(e,t){this.db=i;let n=jt,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==ce?s:null}}))),this.Table=function(e){return It(Nt.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:At(null,{creating:[pe,ue],reading:[le,ce],updating:[he,ue],deleting:[de,ue]})}))}(this),this.Transaction=function(e){return It(on.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=At(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 Me(((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(),bt(e)}))}))}(this),this.Version=function(e){return It(On.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return It(en.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new ie.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)=>o.cmp(e,t)<0?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=cn(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),xt.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Rn),this.use(Dn),this.use(Hn),this.use(Mn),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new ie.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new ie.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const 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(mn),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||Re.letThrough||this._vip)?e():new Me(((e,t)=>{if(this._state.openComplete)return t(new ie.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new ie.DatabaseClosed);this.open().catch(ue)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const 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){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?bt(t.dbOpenError):e));W&&(t.openCanceller._stackHolder=G()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new ie.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return Me.race([r,("undefined"==typeof navigator?Me.resolve():jn()).then((()=>new Me(((r,i)=>{if(o(),!n)throw new ie.MissingAPI;const c=e.name,l=t.autoSchema?n.open(c):n.open(c,Math.round(10*e.verno));if(!l)throw new ie.MissingAPI;l.onerror=tn(i),l.onblocked=Xe(e._fireOnBlocked),l.onupgradeneeded=Xe((r=>{if(a=l.transaction,t.autoSchema&&!e._options.allowEmptyDB){l.onerror=nn,a.abort(),l.result.close();const e=n.deleteDatabase(c);e.onsuccess=e.onerror=Xe((()=>{i(new ie.NoSuchDatabase(`Database ${c} doesnt exist`))}))}else{a.onerror=tn(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=l.result,bn(e,o/10,a,i)}}),i),l.onsuccess=Xe((()=>{a=null;const n=e._novip.idbdb=l.result,o=E(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=xn(0,t,n);e._storeNames=E(t.objectStoreNames,0),gn(e,[e._allTables],u(r),r)}(e,n,r):(Sn(e,e._dbSchema,r),function(e,t){const n=wn(xn(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),vn(e,r)}catch(e){}var i;xt.push(e),n.onversionchange=Xe((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=Xe((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!Tn(e)&&"__dbnames"!==n&&kn(e,t).put({name:n}).catch(ue)}(e._deps,c),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],Me.resolve(Pn((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(ge,ue);return t.onReadyBeingFired=[],Me.resolve(Pn((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),bt(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=xt.indexOf(this);if(t>=0&&xt.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Me((t=>{e.dbReadyResolve=t})),e.openCanceller=new Me(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new ie.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Me(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Xe((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Tn(e)&&"__dbnames"!==n&&kn(e,t).delete(n).catch(ue)}(this._deps,this.name),n()})),e.onerror=tn(r),e.onblocked=this._fireOnBlocked};if(e)throw new ie.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return u(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Nn.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=Re.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new ie.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new ie.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new ie.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):bt(e)}const s=An.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):Re.trans?ht(Re.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!d(this._allTables,e))throw new ie.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const Gn="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Zn{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[Gn](){return this}}function Yn(e,t){return u(t).forEach((n=>{zn(e[n]||(e[n]=new Fn),t[n])})),e}let Qn;try{Qn={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch(s){Qn={indexedDB:null,IDBKeyRange:null}}const Jn=qn;function Xn(e){let t=er;try{er=!0,rn.storagemutated.fire(e)}finally{er=t}}h(Jn,{...se,delete:e=>new Jn(e,{addons:[]}).delete(),exists:e=>new Jn(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Tn(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):kn(e,t).toCollection().primaryKeys()}(Jn.dependencies).then(e)}catch(e){return bt(new ie.MissingAPI)}},defineClass:()=>function(e){l(this,e)},ignoreTransaction:e=>Re.trans?ht(Re.transless,e):e(),vip:Pn,async:function(e){return function(){try{var t=Cn(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Me.resolve(t)}catch(e){return bt(e)}}},spawn:function(e,t,n){try{var r=Cn(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:Me.resolve(r)}catch(e){return bt(e)}},currentTransaction:{get:()=>Re.trans||null},waitFor:function(e,t){const n=Me.resolve("function"==typeof e?Jn.ignoreTransaction(e):e).timeout(t||6e4);return Re.trans?Re.trans.waitFor(n):n},Promise:Me,debug:{get:()=>W,set:e=>{K(e,"dexie"===e?()=>!0:Tt)}},derive:y,extend:l,props:h,override:x,Events:At,on:rn,liveQuery:function(e){return new Zn((t=>{const n=V(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,rn.storagemutated.unsubscribe(f)}};t.start&&t.start(a);let s=!1,c=!1;function l(){return u(i).some((e=>o[e]&&function(e,t){const n=Vn(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Vn(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(Bt(s.from,o.to)<=0&&Bt(s.to,o.from)>=0)return!0;Bt(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const f=e=>{Yn(o,e),l()&&p()},p=()=>{if(s||r)return;o={};const u={},d=function(t){n&&st();const r=()=>at(e,{subscr:t,trans:null}),o=Re.trans?ht(Re.transless,r):r();return n&&o.then(ut,ut),o}(u);c||(rn("storagemutated",f),c=!0),s=!0,Promise.resolve(d).then((e=>{s=!1,r||(l()?p():(o={},i=u,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return p(),a}))},extendObservabilitySet:Yn,getByKeyPath:T,setByKeyPath:P,delByKeyPath:function(e,t){"string"==typeof t?P(e,t,void 0):"length"in t&&[].map.call(t,(function(t){P(e,t,void 0)}))},shallowClone:j,deepClone:$,getObjectDiff:$n,cmp:Bt,asap:O,minKey:-1/0,addons:[],connections:xt,errnames:re,dependencies:Qn,semVer:"3.2.1",version:"3.2.1".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),Jn.maxKey=cn(Jn.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(rn("storagemutated",(e=>{if(!er){let t;St?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),er=!0,dispatchEvent(t),er=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{er||Xn(e)})));let er=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");rn("storagemutated",(t=>{er||e.postMessage(t)})),e.onmessage=e=>{e.data&&Xn(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){rn("storagemutated",(e=>{try{er||("undefined"!=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){}})),addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&Xn(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&Xn(e.changedParts)}))}Me.rejectionMapper=function(e,t){if(!e||e instanceof X||e instanceof TypeError||e instanceof SyntaxError||!e.name||!ae[e.name])return e;var n=new ae[e.name](t||e.message,e);return"stack"in e&&g(n,"stack",{get:function(){return this.inner.stack}}),n},K(W,Tt);var tr=n(8748);const nr=(0,tr.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function rr(){return nr}function or(e,t){const n=nr.getState();nr.setState({handlers:{...n.handlers,[e]:t}})}async function ir(e){const t=Object.entries(nr.getState().handlers),n=t.map((e=>{let[t]=e;return t})),r=[],o=[],i={},a=new AbortController;await ar(e,{timestamp:new Date,syncingHandlers:n,syncedHandlers:r,failedHandlers:o,errors:i,abort:()=>(a.abort(),!0)}),await Promise.all(t.map((async t=>{let[n,s]=t;try{await s.onOfflinePatientAdded({patientUuid:e,signal:a.signal}),console.debug(`Offline patient handler ${n} successfully synchronized patient data.`),r.push(n)}catch(e){console.error(`Offline patient handler ${n} failed. Error: `,e),o.push(n),i[n]=e?.message??e?.toString()??""}}))),await ar(e,{timestamp:new Date,syncingHandlers:[],syncedHandlers:r,failedHandlers:o,errors:i,abort:()=>!1})}async function ar(e,t){const n=nr.getState();nr.setState({offlinePatientDataSyncState:{...n.offlinePatientDataSyncState,[e]:t}});const r=new ur,o={id:(await r.offlinePatientDataSyncStates.get({patientUuid:e}))?.id,patientUuid:e,state:{timestamp:t.timestamp,syncedHandlers:t.syncedHandlers,failedHandlers:[...t.failedHandlers,...t.syncingHandlers],errors:t.errors}};await r.offlinePatientDataSyncStates.put(o)}async function sr(){const e=new ur,t=await e.offlinePatientDataSyncStates.toArray(),n=nr.getState().offlinePatientDataSyncState;for(const e of t)n[e.patientUuid]={...e.state,syncingHandlers:[],abort:()=>!1};nr.setState({offlinePatientDataSyncState:n})}class ur extends qn{constructor(){super("EsmOfflinePatientData"),this.version(1).stores({offlinePatientDataSyncStates:"++id,&patientUuid"}),this.offlinePatientDataSyncStates=this.table("offlinePatientDataSyncStates")}}try{self["workbox:window:6.5.1"]&&_()}catch(c){}function cr(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 lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}try{self["workbox:core:6.5.1"]&&_()}catch(c){}var fr=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function pr(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var dr=function(e,t){this.type=e,Object.assign(this,t)};function hr(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function vr(){}var gr={type:"SKIP_WAITING"};function yr(e,t){if(!t)return e&&e.then?e.then(vr):Promise.resolve()}async function mr(e){const t=await Promise.resolve(void 0);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."}}!function(e){var t,n;function r(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new fr,r.en=new fr,r.on=new fr,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!pr(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 dr(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new dr("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 dr("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return hr(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new dr("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},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}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return yr(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),hr(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&pr(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new dr("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},i.update=function(){try{return this.fn?yr(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return hr(this.getSW(),(function(t){return cr(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&cr(this.fn.waiting,gr)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&pr(e.scriptURL,this.sn.toString())?e:void 0},i.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 hr(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)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(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)}}(r.prototype,o)}(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,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return lr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lr(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(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}());const br="x-omrs-offline-response-body",wr="x-omrs-offline-response-status",_r="x-omrs-offline-caching-strategy";var Er,xr=new Uint8Array(16);function Sr(){if(!Er&&!(Er="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Er(xr)}const Or=/^(?:[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,kr=function(e){return"string"==typeof e&&Or.test(e)};for(var Tr=[],Pr=0;Pr<256;++Pr)Tr.push((Pr+256).toString(16).substr(1));const jr=function(e,t,n){var r=(e=e||{}).random||(e.rng||Sr)();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 function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Tr[e[t+0]]+Tr[e[t+1]]+Tr[e[t+2]]+Tr[e[t+3]]+"-"+Tr[e[t+4]]+Tr[e[t+5]]+"-"+Tr[e[t+6]]+Tr[e[t+7]]+"-"+Tr[e[t+8]]+Tr[e[t+9]]+"-"+Tr[e[t+10]]+Tr[e[t+11]]+Tr[e[t+12]]+Tr[e[t+13]]+Tr[e[t+14]]+Tr[e[t+15]]).toLowerCase();if(!kr(n))throw TypeError("Stringified UUID is invalid");return n}(r)},Cr="OFFLINE+";function Nr(){return Cr+jr()}function Ar(e){return e.startsWith(Cr)}var Ir=n(5426);const Rr=new class extends qn{constructor(){super("EsmOffline"),this.version(3).stores({syncQueue:"++id,userId,type,[userId+type]"}),this.syncQueue=this.table("syncQueue")}},$r={};function Dr(){return Rr}async function Lr(){return(await(0,Ir.getLoggedInUser)())?.uuid||"*"}async function Mr(e,t,n){const r=await Lr();return await async function(e,t,n,r){const o=Rr.syncQueue,i=r&&r.id;return void 0!==i&&await o.where({type:t,userId:e}).filter((e=>e?.descriptor.id===i)).delete(),await o.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date})}(r,e,t,n)}async function Ur(e){const t=await Lr();return await async function(e,t){const n=Rr.syncQueue,r=[];return await n.where({type:t,userId:e}).each((e=>{r.push(e.content)})),r}(t,e)}async function Fr(e){return await Rr.syncQueue.get(e)}function Br(e){return!!$r[e]?.options.onBeginEditSyncItem}async function zr(e){const t=await Fr(e);if(!t)throw new Error(`No sync item with the ID ${e} exists.`);const n=$r[t.type]?.options.onBeginEditSyncItem;if(!n)throw new 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 Vr(e){await Rr.syncQueue.delete(e)}function Wr(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};$r[e]={type:e,dependsOn:t,process:n,options:r}}(0,tr.createGlobalStore)("offline-synchronization",{})},4734:(e,t,n)=>{"use strict";n.d(t,{w:()=>u,hj:()=>fn,g:()=>r.ExtensionData,dT:()=>b,Vz:()=>ot,NV:()=>c,D$:()=>Re,Ae:()=>Ae,tl:()=>Ne,a$:()=>Ie,YV:()=>$e,P3:()=>h,yn:()=>De,ZR:()=>Fe,BL:()=>v,Y9:()=>p,Yq:()=>Qe,p8:()=>g,qd:()=>Je,jf:()=>Xe,mr:()=>tt,Z_:()=>nt,t$:()=>rt,h0:()=>ln,lm:()=>He,Oy:()=>it,oR:()=>ct,xQ:()=>lt,JF:()=>un,NN:()=>cn});var r={};n.r(r),n.d(r,{s:()=>i});var o=n(2735);const i=o.createContext({moduleName:""});var a=n(7179);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const u=e=>{let{to:t,children:n,...r}=e;return o.createElement("a",s({onClick:e=>function(e,t){e.metaKey||e.ctrlKey||e.shiftKey||0!=e.button||(e.preventDefault(),(0,a.navigate)({to:t}))}(e,t),href:(0,a.interpolateUrl)(t)},r),n)};function c(e){return function(t){const[n,r]=(0,o.useState)(e.getState());(0,o.useEffect)((()=>e.subscribe((e=>r(e)))),[]);let i={};return t&&(i=(0,o.useMemo)((()=>function(e,t){"function"==typeof t&&(t=t(e));const n={};for(let r in t)n[r]=e.action(t[r]);return n}(e,t)),[e,t])),{...n,...i}}}var l=n(2465),f=n(9976);function p(){let[e,t]=(0,o.useState)(window.navigator.onLine);return(0,o.useEffect)((()=>(0,f.subscribeConnectivityChanged)((e=>{let{online:n}=e;return t(n)}))),[]),e}var d=n(2891);function h(e){const[t,n]=(0,o.useState)([]);return(0,o.useEffect)((()=>{function r(r){const o=r.slots[e]?.assignedExtensions??[];(0,d.isEqual)(o,t)||n(o)}return r((0,l.getExtensionStore)().getState()),(0,l.getExtensionStore)().subscribe(r)}),[e,t]),t}function v(e){const t=p(),n=h(e);return(0,o.useMemo)((()=>(0,l.getConnectedExtensions)(n,t)),[n,t])}function g(e){const{moduleName:t}=(0,o.useContext)(i);if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,o.useEffect)((()=>{(0,l.registerExtensionSlot)(t,e)}),[]),{extensions:v(e),extensionSlotName:e,extensionSlotModuleName:t}}function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function m(e){return e}const b=e=>{let{extensionSlotName:t,select:n=m,children:r,state:a,style:s,...u}=e;const c=(0,o.useRef)(null),{extensions:l,extensionSlotModuleName:f}=g(t),p=(0,o.useRef)(a);(function(e,t){if(e===t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){const o=n[r];if(!(o in t)||t[o]!==e[o])return!1}return!0})(p.current,a)||(p.current=a);const d=(0,o.useMemo)((()=>t&&n(l).map((e=>o.createElement(i.Provider,{key:e.id,value:{moduleName:f,extension:{extensionId:e.id,extensionSlotName:t,extensionSlotModuleName:f}}},r??o.createElement(fn,{state:p.current}))))),[n,l,t,p.current]);return o.createElement("div",y({ref:c,"data-extension-slot-name":t,"data-extension-slot-module-name":f,style:{...s,position:"relative"}},u),d)};var w=n(2788);function _(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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e){return(x="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 S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e){return(O="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 k(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(O(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(O(e)));return e}}var T=null;try{T=require("react").createContext()}catch(_){}var P={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}};function j(e){if("object"!==x(e))throw new Error("single-spa-react requires a configuration object");var t=E(E({},P),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!T&&t.React.createContext&&(T=t.React.createContext()),t.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}(t);var n={bootstrap:C.bind(null,t),mount:N.bind(null,t),unmount:A.bind(null,t)};return t.parcelCanUpdate&&(n.update=I.bind(null,t)),n}function C(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))}function N(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.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=R(e,t,(function(){n(this)})),i=k(e,t)(),a=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=t.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:e});e.domElements[t.name]=i,e.renderResults[t.name]=a}))}function A(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))}function I(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=R(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=k(e,t)();e.ReactDOM.render(r,i)}}))}function R(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=T?e.React.createElement(T.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)),e.React.createElement(e.SingleSpaRoot,E(E({},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(){setTimeout(e.unmountFinished)}}),o)}function $(e){return $="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 D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){D(e,t,n[t])}))}return e}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(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 F(e,t,n){return t&&U(e.prototype,t),n&&U(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function B(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(e,t){if(t&&("object"===$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return B(e)}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function W(e,t){return W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},W(e,t)}function K(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}var H={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},q=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};M(this,e),this.init(t,n)}return F(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||H,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,L({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),G=new q,Z=function(){function e(){M(this,e),this.observers={}}return F(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function Y(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function Q(e){return null==e?"":""+e}function J(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function X(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function ee(e,t,n){var r=X(e,t,Object);r.obj[r.k]=n}function te(e,t){var n=X(e,t),r=n.obj,o=n.k;if(r)return r[o]}function ne(e,t,n){var r=te(e,n);return void 0!==r?r:te(t,n)}function re(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):re(e[r],t[r],n):e[r]=t[r]);return e}function oe(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var ie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ae(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return ie[e]})):e}var se="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,ue=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return M(this,t),n=z(this,V(t).call(this)),se&&Z.call(B(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return K(t,e),F(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),te(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),ee(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=te(this.data,a)||{};r?re(s,n,o):s=L({},s,n),ee(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?L({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(Z),ce={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},le={},fe=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return M(this,t),n=z(this,V(t).call(this)),se&&Z.call(B(n)),J(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,B(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=G.create("translator"),n}return K(t,e),F(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==$(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),s=a.key,u=a.namespaces,c=u[u.length-1],l=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(f){var p=n.nsSeparator||this.options.nsSeparator;return c+p+s}return s}var d=this.resolve(e,n),h=d&&d.res,v=d&&d.usedKey||s,g=d&&d.exactUsedKey||s,y=Object.prototype.toString.apply(h),m=["[object Number]","[object Function]","[object RegExp]"],b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&_&&m.indexOf(y)<0&&("string"!=typeof b||"[object Array]"!==y)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,h,n):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(i){var E="[object Array]"===y,x=E?[]:{},S=E?g:v;for(var O in h)if(Object.prototype.hasOwnProperty.call(h,O)){var k="".concat(S).concat(i).concat(O);x[O]=this.translate(k,L({},n,{joinArrays:!1,ns:u})),x[O]===k&&(x[O]=h[O])}h=x}}else if(w&&"string"==typeof b&&"[object Array]"===y)(h=h.join(b))&&(h=this.extendTranslation(h,e,n,r));else{var T=!1,P=!1,j=void 0!==n.count&&"string"!=typeof n.count,C=t.hasDefaultValue(n),N=j?this.pluralResolver.getSuffix(l,n.count):"",A=n["defaultValue".concat(N)]||n.defaultValue;!this.isValidLookup(h)&&C&&(T=!0,h=A),this.isValidLookup(h)||(P=!0,h=s);var I=C&&A!==h&&this.options.updateMissing;if(P||T||I){if(this.logger.log(I?"updateKey":"missingKey",l,c,s,I?A:h),i){var R=this.resolve(s,L({},n,{keySeparator:!1}));R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var D=[],M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&M&&M[0])for(var U=0;U<M.length;U++)D.push(M[U]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(n.lng||this.language):D.push(n.lng||this.language);var F=function(e,t,r){o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,t,I?r:h,I,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,t,I?r:h,I,n),o.emit("missingKey",e,c,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?D.forEach((function(e){o.pluralResolver.getSuffixes(e).forEach((function(t){F([e],s+t,n["defaultValue".concat(t)]||A)}))})):F(D,s,A))}h=this.extendTranslation(h,e,n,d,r),P&&h===s&&this.options.appendNamespaceToMissingKey&&(h="".concat(c,":").concat(s)),P&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(L({},n,{interpolation:L({},this.options.interpolation,n.interpolation)}));var a,s=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=L({},this.options.interpolation.defaultVariables,c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=ce.handle(p,e,t,this.options&&this.options.postProcessPassResolved?L({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,p=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,d=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!le["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(le["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" 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!!!")),d.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u,l=c,d=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(d,c,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&p&&d.push(l+i),p&&d.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&d.push(l+=i));u=d.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(Z);function pe(e){return e.charAt(0).toUpperCase()+e.slice(1)}var de=function(){function e(t){M(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=G.create("languageUtils")}return F(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=pe(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=pe(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=pe(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var 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||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),he=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ve={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function ge(){var e={};return he.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:ve[t.fc]}}))})),e}var ye=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};M(this,e),this.languageUtils=t,this.options=n,this.logger=G.create("pluralResolver"),this.rules=ge()}return F(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),me=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};M(this,e),this.logger=G.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return F(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:ae,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?oe(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?oe(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?oe(t.nestingPrefix):t.nestingPrefixEscaped||oe("$t("),this.nestingSuffix=t.nestingSuffix?oe(t.nestingSuffix):t.nestingSuffixEscaped||oe(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=ne(t,u,e);return s.alwaysFormat?s.format(o,void 0,n):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(ne(t,u,a),c,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(p){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=Q(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=L({},i);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,a)).replace(/'/g,'"');try{a=JSON.parse(o),t&&(a=L({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var u=[],c=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),u=l,c=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Q(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=u.reduce((function(e,t){return o.format(e,t,i.lng,i)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),be=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return M(this,t),o=z(this,V(t).call(this)),se&&Z.call(B(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=G.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return K(t,e),F(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=X(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,L({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(Z);function we(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===$(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===$(e[2])||"object"===$(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function _e(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ee(){}var xe=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(M(this,t),e=z(this,V(t).call(this)),se&&Z.call(B(e)),e.options=_e(n),e.services={},e.logger=G,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),z(e,B(e));setTimeout((function(){e.init(n,r)}),0)}return e}return K(t,e),F(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=L({},we(),this.options,_e(t)),this.format=this.options.interpolation.format,n||(n=Ee),!this.options.isClone){this.modules.logger?G.init(r(this.modules.logger),this.options):G.init(null,this.options);var o=new de(this.options);this.store=new ue(this.options.resources,this.options);var i=this.services;i.logger=G,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new ye(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new me(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new be(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new fe(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var s=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var c=Y(),l=function(){var t=function(t,r){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),c.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),c}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=Y();return e||(e=this.languages),t||(t=this.options.ns),n||(n=Ee),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new 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&&ce.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=Y();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,r=function e(t,r){var o;if("object"!==$(r)){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];o=n.options.overloadTranslationOptionHandler([t,r].concat(a))}else o=L({},r);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=Y();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=Y();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee,o=L({},this.options,n,{isClone:!0}),i=new t(o),a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=L({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new fe(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}}]),t}(Z);const Se=new xe;var Oe=o.createContext();function ke(e){var t=e.i18n,n=e.defaultNS,r=e.children,i=(0,o.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return(0,o.createElement)(Oe.Provider,{value:i},r)}F((function e(){M(this,e),this.usedNamespaces={}}),[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]);const Te=Se.default||Se,Pe={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},je=e=>{(0,o.useEffect)((()=>(Te.on("languageChanged",e.forceUpdate),()=>Te.off("languageChanged",e.forceUpdate))),[e.forceUpdate]);const t=(0,o.useRef)(null);if(t.current)throw t.current;if(!Te.hasLoadedNamespace(e.ns)){const n=setTimeout((()=>{console.warn(`openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['${e.ns}']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects.`)}),3e3);throw Te.loadNamespaces([e.ns]).then((()=>clearTimeout(n))).catch((e=>{clearTimeout(n),t.current=e}))}return o.createElement(o.Fragment,null,e.children)};function Ce(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");const t=Object.assign({},Pe,e);return function(e){var n,r,a,s;return r=n=class extends o.Component{constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}}}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 o.createElement("div",null,"An error has occurred. Please try reloading the page.");{const n=o.createElement(i.Provider,{value:this.state.config},o.createElement(o.Suspense,{fallback:null},t.disableTranslations?o.createElement(e,this.props):o.createElement(je,{ns:t.moduleName,forceUpdate:()=>this.forceUpdate()},o.createElement(ke,{i18n:Te,defaultNS:t.moduleName},o.createElement(e,this.props)))));return t.strictMode||!o.StrictMode?n:o.createElement(o.StrictMode,null,n)}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in r?Object.defineProperty(r,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[a]=s,n}}function Ne(e,t){return j({React:o,ReactDOM:w,rootComponent:Ce(t)(e)})}function Ae(e,t){return()=>e().then((e=>{let{default:n}=e;return Ne(n,t)}))}function Ie(e,t){return()=>Promise.resolve(Ne(e,t))}const Re=Ae;function $e(e){const[t,n]=(0,o.useState)([]);return(0,o.useEffect)((()=>(0,l.getExtensionStore)().subscribe((r=>{const o=r.slots[e]?.assignedExtensions.map((e=>e.id))??[];(0,d.isEqual)(o,t)||n(o)}))),[]),t}function De(e){(0,o.useEffect)((()=>{if(e){const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}}),[e])}var Le=n(3202);const Me={};function Ue(e){const t=(0,o.useMemo)(a.getExtensionsConfigStore,[]),n=function(e,t){const[n,r]=(0,o.useState)(function(e,t){return t?()=>{const n=e.getState(),r=(0,a.getExtensionConfigFromStore)(n,t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null}(e,t));return(0,o.useEffect)((()=>{if(t)return e.subscribe((e=>{const o=(0,a.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!(0,Le.Z)(o.config,n)&&r(o.config)}))}),[e,t,n]),n}(t,e);if(!n&&e){const n=`${e.extensionSlotName}-${e.extensionId}`;throw!Me[n]&&t&&(Me[n]=function(e,t){return new Promise((n=>{const r=e.subscribe((e=>{const o=(0,a.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(t,e)),Me[n]}return n||{}}function Fe(){const{moduleName:e,extension:t}=(0,o.useContext)(i);if(!e&&!t)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');const n=function(e){const t=(0,o.useMemo)((()=>(0,a.getConfigStore)(e)),[e]),n=e,r=function(e){const[t,n]=(0,o.useState)(function(e){return()=>{const t=e.getState();return t.loaded&&t.config?t.config:null}}(e));return(0,o.useEffect)((()=>e?.subscribe((e=>{e.loaded&&e.config&&n(e.config)}))),[e]),t}(t);if(!r)throw Me[n]||(Me[n]=function(e){return new Promise((t=>{const n=e.subscribe((e=>{e.loaded&&e.config&&(t(e.config),n())}))}))}(t)),Me[n];return r}(e),r=Ue(t);return(0,o.useMemo)((()=>({...n,...r})),[n,r])}var Be,ze=n(5426);!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(Be||(Be={}));const Ve={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};function We(){const e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function Ke(e,t){switch(t.type){case Be.loadPatient:return{...e,patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null};case Be.newPatient:return{...e,patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null};case Be.loadError:return{...e,patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err};default:return e}}function He(e){const[t,n]=(0,o.useReducer)(Ke,{...Ve,patientUuid:e??null,isPendingUuid:!e,isLoadingPatient:!!e});return(0,o.useEffect)((()=>{if(t.isPendingUuid){const e=We();n(e?{type:Be.loadPatient,patientUuid:e}:{type:Be.newPatient,patient:null})}let e=!0;return t.isLoadingPatient&&t.patientUuid&&(0,ze.fetchCurrentPatient)(t.patientUuid).then((t=>e&&n({patient:t.data,type:Be.newPatient})),(t=>e&&n({err:t,type:Be.loadError}))),()=>{e=!1}}),[t.isPendingUuid,t.isLoadingPatient,t.patientUuid]),(0,o.useEffect)((()=>{const e=e=>{const r=We();r!=t.patientUuid&&n({type:Be.loadPatient,patientUuid:r})};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)}),[t.patientUuid]),{isLoading:t.isPendingUuid||t.isLoadingPatient,patient:t.patient,patientUuid:e??t.patientUuid,error:t.err}}var qe;!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLloadErroroadError"}(qe||(qe={}));const Ge={patient:null,isLoadingPatient:!0,err:null};function Ze(){const e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function Ye(e,t){switch(t.type){case qe.loadPatient:return{...e,patient:null,isLoadingPatient:!0,err:null};case qe.newPatient:return{...e,patient:t.patient,isLoadingPatient:!1,err:null};case qe.loadError:return{...e,patient:null,isLoadingPatient:!1,err:t.err};default:return e}}function Qe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ze();const[t,n]=(0,o.useReducer)(Ye,Ge);return(0,o.useEffect)((()=>{let t=!0;return e?((0,ze.fetchCurrentPatient)(e).then((e=>t&&n({patient:e.data,type:qe.newPatient})),(e=>t&&n({err:e,type:qe.loadError}))),n({type:qe.loadPatient})):n({type:qe.newPatient,patient:null}),()=>{t=!1}}),[e]),[t.isLoadingPatient,t.patient,e,t.err]}function Je(e){const t=v(e);return(0,o.useMemo)((()=>Object.fromEntries(t.map((e=>[e.name,e.meta])))),[t])}c((0,l.getExtensionInternalStore)());const Xe=c((0,l.getExtensionStore)());function et(){let e="tablet";return document.body.classList.forEach((t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-tablet":e="desktop"}})),e}function tt(){const[e,t]=(0,o.useState)(et);return(0,o.useEffect)((()=>{const e=()=>{t(et())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e}function nt(){const[e,t]=(0,o.useState)([]);return(0,o.useEffect)((()=>{const e=(0,ze.getLocations)().subscribe((e=>{t(e)}),(e=>{console.error(e)}));return()=>e.unsubscribe()}),[]),e}function rt(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(t){const t=t=>{n?.current?.contains(t.target)||e(t)};return window.addEventListener("click",t),()=>window.removeEventListener("click",t)}}),[e,t]),n}const ot=e=>{let{privilege:t,children:n}=e;const[r,i]=(0,o.useState)(null);return(0,o.useEffect)((()=>{const e=(0,ze.getCurrentUser)({includeAuthStatus:!1}).subscribe(i);return()=>e.unsubscribe()}),[]),r&&(0,ze.userHasAccess)(t,r)?o.createElement(o.Fragment,null,n):null};function it(){const[e,t]=(0,o.useState)(null);return(0,o.useEffect)((()=>{if(null===e){const e=(0,ze.openmrsObservableFetch)("/ws/rest/v1/session").subscribe((e=>{t(e.data)}));return()=>e.unsubscribe()}}),[e]),e}var at=n(8748);function st(e,t){"function"==typeof t&&(t=t(e));const n={};for(let r in t)n[r]=e.action(t[r]);return n}const ut=e=>e;function ct(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ut,n=arguments.length>2?arguments[2]:void 0;const[r,i]=(0,o.useState)((()=>t(e.getState())));(0,o.useEffect)((()=>(0,at.subscribeTo)(e,t,i)),[e,t]);let a={};return n&&(a=(0,o.useMemo)((()=>st(e,n)),[e,n])),{...r,...a}}function lt(e,t){return ct(e,ut,t)}function ft(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function pt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var dt,ht=function(){},vt=ht(),gt=Object,yt=function(e){return e===vt},mt=function(e){return"function"==typeof e},bt=function(e,t){return gt.assign({},e,t)},wt="undefined",_t=function(){return typeof window!=wt},Et=new WeakMap,xt=0,St=function(e){var t,n,r=typeof e,o=e&&e.constructor,i=o==Date;if(gt(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=Et.get(e))return t;if(t=++xt+"~",Et.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=St(e[n])+",";Et.set(e,t)}if(o==gt){t="#";for(var a=gt.keys(e).sort();!yt(n=a.pop());)yt(e[n])||(t+=n+":"+St(e[n])+",");Et.set(e,t)}}return t},Ot=!0,kt=_t(),Tt=typeof document!=wt,Pt=kt&&window.addEventListener?window.addEventListener.bind(window):ht,jt=Tt?document.addEventListener.bind(document):ht,Ct=kt&&window.removeEventListener?window.removeEventListener.bind(window):ht,Nt=Tt?document.removeEventListener.bind(document):ht,At={isOnline:function(){return Ot},isVisible:function(){var e=Tt&&document.visibilityState;return yt(e)||"hidden"!==e}},It={initFocus:function(e){return jt("visibilitychange",e),Pt("focus",e),function(){Nt("visibilitychange",e),Ct("focus",e)}},initReconnect:function(e){var t=function(){Ot=!0,e()},n=function(){Ot=!1};return Pt("online",t),Pt("offline",n),function(){Ct("online",t),Ct("offline",n)}}},Rt=!_t()||"Deno"in window,$t=Rt?o.useEffect:o.useLayoutEffect,Dt="undefined"!=typeof navigator&&navigator.connection,Lt=!Rt&&Dt&&(["slow-2g","2g"].includes(Dt.effectiveType)||Dt.saveData),Mt=function(e){if(mt(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?St(e):"",t,e?"$swr$"+e:""]},Ut=new WeakMap,Ft=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var s=Ut.get(e),u=s[0],c=s[1],l=s[3],f=u[t],p=c[t];if(a&&p)for(var d=0;d<p.length;++d)p[d](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},Bt=0,zt=function(){return++Bt},Vt=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ft(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,c,l,f,p,d,h,v,g,y,m,b,w;return pt(this,(function(_){switch(_.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!yt((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,s=!1!==i.revalidate,u=!1!==i.rollbackOnError,c=i.optimisticData,l=Mt(n),f=l[0],p=l[2],!f)return[2];if(d=Ut.get(t),h=d[2],e.length<3)return[2,Ft(t,f,t.get(f),vt,vt,s,!0)];if(v=r,y=zt(),h[f]=[y,0],m=!yt(c),b=t.get(f),m&&(t.set(f,c),Ft(t,f,c)),mt(v))try{v=v(t.get(f))}catch(e){g=e}return v&&mt(v.then)?[4,v.catch((function(e){g=e}))]:[3,2];case 1:if(v=_.sent(),y!==h[f][0]){if(g)throw g;return[2,v]}g&&m&&u&&(a=!0,v=b,t.set(f,b)),_.label=2;case 2:return a&&(g||(mt(a)&&(v=a(v,b)),t.set(f,v)),t.set(p,bt(t.get(p),{error:g}))),h[f][1]=zt(),[4,Ft(t,f,v,g,vt,s,!!a)];case 3:if(w=_.sent(),g)throw g;return[2,a?w:v]}}))}))},Wt=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Kt=function(e,t){if(!Ut.has(e)){var n=bt(It,t),r={},o=Vt.bind(vt,e),i=ht;if(Ut.set(e,[r,{},{},{},o]),!Rt){var a=n.initFocus(setTimeout.bind(vt,Wt.bind(vt,r,0))),s=n.initReconnect(setTimeout.bind(vt,Wt.bind(vt,r,1)));i=function(){a&&a(),s&&s(),Ut.delete(e)}}return[e,o,i]}return[e,Ut.get(e)[4]]},Ht=Kt(new Map),qt=Ht[0],Gt=Ht[1],Zt=bt({onLoadingSlow:ht,onSuccess:ht,onError:ht,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!yt(i)&&a>i||setTimeout(r,s,o)},onDiscarded:ht,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Lt?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Lt?5e3:3e3,compare:function(e,t){return St(e)==St(t)},isPaused:function(){return!1},cache:qt,mutate:Gt,fallback:{}},At),Yt=function(e,t){var n=bt(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=bt(o,a))}return n},Qt=(0,o.createContext)({}),Jt=function(e){return mt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},Xt=function(){return bt(Zt,(0,o.useContext)(Qt))},en=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},tn={dedupe:!0},nn=(gt.defineProperty((function(e){var t=e.value,n=Yt((0,o.useContext)(Qt),t),r=t&&t.provider,i=(0,o.useState)((function(){return r?Kt(r(n.cache||qt),t):vt}))[0];return i&&(n.cache=i[0],n.mutate=i[1]),$t((function(){return i?i[2]:vt}),[]),(0,o.createElement)(Qt.Provider,bt(e,{value:n}))}),"default",{value:Zt}),dt=function(e,t,n){var r=n.cache,i=n.compare,a=n.fallbackData,s=n.suspense,u=n.revalidateOnMount,c=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,p=Ut.get(r),d=p[0],h=p[1],v=p[2],g=p[3],y=Mt(e),m=y[0],b=y[1],w=y[2],_=(0,o.useRef)(!1),E=(0,o.useRef)(!1),x=(0,o.useRef)(m),S=(0,o.useRef)(t),O=(0,o.useRef)(n),k=function(){return O.current},T=function(){return k().isVisible()&&k().isOnline()},P=function(e){return r.set(w,bt(r.get(w),e))},j=r.get(m),C=yt(a)?n.fallback[m]:a,N=yt(j)?C:j,A=r.get(w)||{},I=A.error,R=!_.current,$=function(){return R&&!yt(u)?u:!k().isPaused()&&(s?!yt(N):yt(N)||n.revalidateIfStale)},D=!(!m||!t)&&(!!A.isValidating||R&&$()),L=function(e,t){var n=(0,o.useState)({})[1],r=(0,o.useRef)(e),i=(0,o.useRef)({data:!1,error:!1,isValidating:!1}),a=(0,o.useCallback)((function(e){var o=!1,a=r.current;for(var s in e){var u=s;a[u]!==e[u]&&(a[u]=e[u],i.current[u]&&(o=!0))}o&&!t.current&&n({})}),[]);return $t((function(){r.current=e})),[r,i.current,a]}({data:N,error:I,isValidating:D},E),M=L[0],U=L[1],F=L[2],B=(0,o.useCallback)((function(e){return ft(void 0,void 0,void 0,(function(){var t,o,a,s,u,c,l,f,p,d,h,y,w;return pt(this,(function(O){switch(O.label){case 0:if(t=S.current,!m||!t||E.current||k().isPaused())return[2,!1];s=!0,u=e||{},c=!g[m]||!u.dedupe,l=function(){return!E.current&&m===x.current&&_.current},f=function(){var e=g[m];e&&e[1]===a&&delete g[m]},p={isValidating:!1},d=function(){P({isValidating:!1}),l()&&F(p)},P({isValidating:!0}),F({isValidating:!0}),O.label=1;case 1:return O.trys.push([1,3,,4]),c&&(Ft(r,m,M.current.data,M.current.error,!0),n.loadingTimeout&&!r.get(m)&&setTimeout((function(){s&&l()&&k().onLoadingSlow(m,n)}),n.loadingTimeout),g[m]=[t.apply(void 0,b),zt()]),w=g[m],o=w[0],a=w[1],[4,o];case 2:return o=O.sent(),c&&setTimeout(f,n.dedupingInterval),g[m]&&g[m][1]===a?(P({error:vt}),p.error=vt,h=v[m],!yt(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(d(),c&&l()&&k().onDiscarded(m),[2,!1]):(i(M.current.data,o)?p.data=M.current.data:p.data=o,i(r.get(m),o)||r.set(m,o),c&&l()&&k().onSuccess(o,m,n),[3,4])):(c&&l()&&k().onDiscarded(m),[2,!1]);case 3:return y=O.sent(),f(),k().isPaused()||(P({error:y}),p.error=y,c&&l()&&(k().onError(y,m,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||mt(n.shouldRetryOnError)&&n.shouldRetryOnError(y))&&T()&&k().onErrorRetry(y,m,n,B,{retryCount:(u.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return s=!1,d(),l()&&c&&Ft(r,m,p.data,p.error,!1),[2,!0]}}))}))}),[m]),z=(0,o.useCallback)(Vt.bind(vt,r,(function(){return x.current})),[]);if($t((function(){S.current=t,O.current=n})),$t((function(){if(m){var e=m!==x.current,t=B.bind(vt,tn),n=0,r=en(m,h,(function(e,t,n){F(bt({error:t,isValidating:n},i(M.current.data,e)?vt:{data:e}))})),o=en(m,d,(function(e){if(0==e){var r=Date.now();k().revalidateOnFocus&&r>n&&T()&&(n=r+k().focusThrottleInterval,t())}else if(1==e)k().revalidateOnReconnect&&T()&&t();else if(2==e)return B()}));return E.current=!1,x.current=m,_.current=!0,e&&F({data:N,error:I,isValidating:D}),$()&&(yt(N)||Rt?t():(a=t,_t()&&typeof window.requestAnimationFrame!=wt?window.requestAnimationFrame(a):setTimeout(a,1))),function(){E.current=!0,r(),o()}}var a}),[m,B]),$t((function(){var e;function t(){var t=mt(c)?c(N):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){M.current.error||!l&&!k().isVisible()||!f&&!k().isOnline()?t():B(tn).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[c,l,f,B]),(0,o.useDebugValue)(N),s&&yt(N)&&m)throw S.current=t,O.current=n,E.current=!1,yt(I)?B(tn):I;return{mutate:z,get data(){return U.data=!0,N},get error(){return U.error=!0,I},get isValidating(){return U.isValidating=!0,D}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Xt(),r=Jt(e),o=r[0],i=r[1],a=r[2],s=Yt(n,a),u=dt,c=s.use;if(c)for(var l=c.length;l-- >0;)u=c[l](u);return u(o,i||s.fetcher,s)}),rn=n(7530),on=n.n(rn),an=n(4332),sn=n.n(an);function un(e){const{data:t,error:n,mutate:r,isValidating:o}=nn(`/ws/rest/v1/visit?patient=${e}&v=${ze.defaultVisitCustomRepresentation}&includeInactive=false`,ze.openmrsFetch);return{error:n,mutate:r,isValidating:o,currentVisit:t?.data.results.find((e=>null===e.stopDatetime&&on()(e.startDatetime).isToday()))??null}}function cn(){const[e,t]=(0,o.useState)([]);return(0,o.useEffect)((()=>{const e=(0,ze.getVisitTypes)().subscribe((e=>{t(e)}),(e=>console.error(e)));return()=>e.unsubscribe()}),[]),e}function ln(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const[n,r]=(0,o.useState)(1),i=(0,o.useMemo)((()=>Math.max(1,Math.ceil(e.length/t))),[e.length,t]),a=(0,o.useMemo)((()=>{const r=(n-1)*t,o=(n+0)*t;return e.slice(r,o)}),[e,n,t]);return{results:a,totalPages:i,currentPage:n,paginated:e.length>t,showNextButton:n<i,showPreviousButton:n>1,goTo(e){r(Math.max(1,Math.min(i,e)))},goToNext(){n<i&&r(n+1)},goToPrevious(){n>1&&r(n-1)}}}on().extend(sn());const fn=e=>{let{state:t,wrap:n}=e;const[r,a]=(0,o.useState)(),{extension:s}=(0,o.useContext)(i),u=(0,o.useCallback)((e=>{a(e)}),[]);(0,o.useEffect)((()=>{if(null!=r&&s)return(0,l.renderExtension)(r,s.extensionSlotName,s.extensionSlotModuleName,s.extensionId,void 0,t)}),[s?.extensionSlotName,s?.extensionId,s?.extensionSlotModuleName,t,r]);const c=o.createElement("div",{ref:u,"data-extension-id":s?.extensionId,style:{position:"relative"}});return s&&n?n(c,s):c}},8748:()=>{System.register([],(function(e,t){return{execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(968).s)(1),(()=>{"use strict";function e(e,t){for(var n in t)e[n]=t[n];return e}function t(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,s=0;s<a.length;s++)a[s](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}}r.r(o),r.d(o,{createAppState:()=>s,createGlobalStore:()=>i,getAppState:()=>u,getGlobalStore:()=>a,subscribeTo:()=>c});const n={};function i(e,r){const o=n[e];if(o)return o.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):o.value.setState(r,!0),o.active=!0,o.value;{const o=t(r);return n[e]={value:o,active:!0},o}}function a(e,r){const o=n[e];if(!o){const o=t(r);return n[e]={value:o,active:!1},o}return o.value}function s(e){return i("app",e)}function u(){return a("app",{})}function c(e,t,n){let r=t(e.getState());return e.subscribe((e=>{const o=t(e);o!==r&&(r=o,n(o))}))}})(),o})())}}}))},9850:(e,t,n)=>{"use strict";n.d(t,{aB:()=>r.AppState,jk:()=>s,W5:()=>c,zJ:()=>u,se:()=>l});var r={};function o(e,t){for(var n in t)e[n]=t[n];return e}function i(e){var t=[];function n(e){for(var n=[],r=0;r<t.length;r++)t[r]===e?e=null:n.push(t[r]);t=n}function r(n,r,i){e=r?n:o(o({},e),n);for(var a=t,s=0;s<a.length;s++)a[s](e,i)}return e=e||{},{action:function(t){function n(e){r(e,!1,t)}return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var a=t.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return t.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return e}}}n.r(r),n.d(r,{jk:()=>s,W5:()=>c,zJ:()=>u,se:()=>l});const a={};function s(e,t){const n=a[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;{const n=i(t);return a[e]={value:n,active:!0},n}}function u(e,t){const n=a[e];if(!n){const n=i(t);return a[e]={value:n,active:!1},n}return n.value}function c(){return u("app",{})}function l(e,t,n){let r=t(e.getState());return e.subscribe((e=>{const o=t(e);o!==r&&(r=o,n(o))}))}},7202:(e,t,n)=>{"use strict";n.d(t,{iW:()=>r.InlineNotificationType,MK:()=>r.NotificationDescriptor,fU:()=>o.ToastDescriptor,yQ:()=>o.ToastNotificationMeta,pC:()=>o.ToastType,K4:()=>O,c0:()=>m,CF:()=>_});var r={};n.r(r);var o={};n.r(o),n(2735),n(2788);var i=n(2585),a=n(9295),s=n(606),u=n(175),c=n(6575),l=n(6905),f=n(7840),p=n(9494),d=n(8396),h=Object.prototype.hasOwnProperty;const v=function(e){if(null==e)return!0;if((0,l.Z)(e)&&((0,c.Z)(e)||"string"==typeof e||"function"==typeof e.splice||(0,f.Z)(e)||(0,d.Z)(e)||(0,u.Z)(e)))return!e.length;var t=(0,s.Z)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,p.Z)(e))return!(0,a.Z)(e).length;for(var n in e)if(h.call(e,n))return!1;return!0},g=new i.xQ;let y=0;function m(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!v(t))?setTimeout((()=>{g.next({...e,id:y++})}),0):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}const b=new i.xQ;let w=0;function _(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!v(t))?setTimeout((()=>{b.next({...e,id:w++})}),0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}n(2465);const E=(0,n(8748).createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]});function x(e){const t=E.getState(),n=[e,...t.modalStack];E.setState({...t,modalStack:n})}function S(e){const t=E.getState(),n=t.modalStack.map((t=>t===e?{...t,state:"TO_BE_DELETED"}:t));E.setState({...t,modalStack:n})}function O(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const r=()=>{const e=E.getState().modalStack.find((e=>e.onClose===n));e&&S(e)};return x({state:"NEW",onClose:n,extensionId:e,props:{extensionId:e,close:r,...t}}),r}window.getComputedStyle(document.body).overflow},3315:()=>{System.register(["dayjs","i18next"],(function(e,t){var n={},r={};return{setters:[function(e){n.default=e.default},function(e){r.default=e.default}],execute:function(){e((()=>{var e={4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},9014:function(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){return new o({date:e,utc:!0,args:arguments})},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 u=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 u.call(this)};var c=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(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),null===r))return this;var a=Math.abs(r)<=16?60*r:r,s=this;if(o)return s.$offset=a,s.$u=0===r,s;if(0!==r){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+u,e)).$offset=a,s.$x.$localOffset=u}else s=this.utc();return s};var l=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).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 f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.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)}}}()},5923:(e,t,n)=>{"use strict";const r=n(2138),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),p=Symbol("cache"),d=Symbol("updateAgeOnGet"),h=()=>1,v=(e,t,n)=>{const r=e[p].get(t);if(r){const t=r.value;if(g(e,t)){if(m(e,r),!e[s])return}else n&&(e[d]&&(r.value.now=Date.now()),e[f].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[u]&&n>e[u]},y=e=>{if(e[i]>e[o])for(let t=e[f].tail;e[i]>e[o]&&null!==t;){const n=t.prev;m(e,t),t=n}},m=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[i]-=n.length,e[p].delete(n.key),e[f].removeNode(t)}};class b{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const w=(e,t,n,r)=>{let o=n.value;g(e,o)&&(m(e,n),e[s]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,y(this)}get max(){return this[o]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,y(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[i]=0,this[f].forEach((e=>{e.length=this[a](e.value,e.key),this[i]+=e.length}))),y(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let n=this[f].tail;null!==n;){const r=n.prev;w(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[f].head;null!==n;){const r=n.next;w(this,e,n,t),n=r}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[c]&&this[f]&&this[f].length&&this[f].forEach((e=>this[c](e.key,e.value))),this[p]=new Map,this[f]=new r,this[i]=0}dump(){return this[f].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,n){if((n=n||this[u])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[a](t,e);if(this[p].has(e)){if(s>this[o])return m(this,this[p].get(e)),!1;const a=this[p].get(e).value;return this[c]&&(this[l]||this[c](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[i]+=s-a.length,a.length=s,this.get(e),y(this),!0}const d=new b(e,t,s,r,n);return d.length>this[o]?(this[c]&&this[c](e,t),!1):(this[i]+=d.length,this[f].unshift(d),this[p].set(e,this[f].head),y(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!g(this,t)}get(e){return v(this,e,!0)}peek(e){return v(this,e,!1)}pop(){const e=this[f].tail;return e?(m(this,e),e.value):null}del(e){m(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[p].forEach(((e,t)=>v(this,t,!1)))}}},4074:(e,t,n)=>{const r=Symbol("SemVer ANY");class o{static get ANY(){return r}constructor(e,t){if(t=i(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return u(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new f(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new f(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=u(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=u(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||i&&a||s||c}}e.exports=o;const i=n(156),{re:a,t:s}=n(887),u=n(2401),c=n(3843),l=n(9405),f=n(4355)},4355:(e,t,n)=>{class r{constructor(e,t){if(t=i(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=o.get(t);if(n)return n;const r=this.options.loose,i=r?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(i,T(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[l.COMPARATORTRIM],f),s("comparator trim",e,c[l.COMPARATORTRIM]),e=(e=(e=e.replace(c[l.TILDETRIM],p)).replace(c[l.CARETTRIM],d)).split(/\s+/).join(" ");const u=r?c[l.COMPARATORLOOSE]:c[l.COMPARATOR],v=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>k(e,this.options))).filter(this.options.loose?e=>!!e.match(u):()=>!0).map((e=>new a(e,this.options))),g=(v.length,new Map);for(const e of v){if(h(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const m=[...g.values()];return o.set(t,m),m}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>g(n,t)&&e.set.some((e=>g(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const o=new(n(5923))({max:1e3}),i=n(156),a=n(4074),s=n(3843),u=n(9405),{re:c,t:l,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:d}=n(887),h=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},y=(e,t)=>(s("comp",e,t),e=_(e,t),s("caret",e),e=b(e,t),s("tildes",e),e=x(e,t),s("xrange",e),e=O(e,t),s("stars",e),e),m=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{const n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,((t,n,r,o,i)=>{let a;return s("tilde",e,t,n,r,o,i),m(n)?a="":m(r)?a=`>=${n}.0.0 <${+n+1}.0.0-0`:m(o)?a=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:i?(s("replaceTilde pr",i),a=`>=${n}.${r}.${o}-${i} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${o} <${n}.${+r+1}.0-0`,s("tilde return",a),a}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{s("caret",e,t);const n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,i,a)=>{let u;return s("caret",e,t,n,o,i,a),m(n)?u="":m(o)?u=`>=${n}.0.0${r} <${+n+1}.0.0-0`:m(i)?u="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(s("replaceCaret pr",a),u="0"===n?"0"===o?`>=${n}.${o}.${i}-${a} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}-${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i}-${a} <${+n+1}.0.0-0`):(s("no pr"),u="0"===n?"0"===o?`>=${n}.${o}.${i}${r} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i} <${+n+1}.0.0-0`),s("caret return",u),u}))},x=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>S(e,t))).join(" ")),S=(e,t)=>{e=e.trim();const n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,((n,r,o,i,a,u)=>{s("xRange",e,n,r,o,i,a,u);const c=m(o),l=c||m(i),f=l||m(a),p=f;return"="===r&&p&&(r=""),u=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(l&&(i=0),a=0,">"===r?(r=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):"<="===r&&(r="<",l?o=+o+1:i=+i+1),"<"===r&&(u="-0"),n=`${r+o}.${i}.${a}${u}`):l?n=`>=${o}.0.0${u} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${u} <${o}.${+i+1}.0-0`),s("xRange return",n),n}))},O=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[l.STAR],"")),k=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),T=e=>(t,n,r,o,i,a,s,u,c,l,f,p,d)=>`${n=m(r)?"":m(o)?`>=${r}.0.0${e?"-0":""}`:m(i)?`>=${r}.${o}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${u=m(c)?"":m(l)?`<${+c+1}.0.0-0`:m(f)?`<${c}.${+l+1}.0-0`:p?`<=${c}.${l}.${f}-${p}`:e?`<${c}.${l}.${+f+1}-0`:`<=${u}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},9405:(e,t,n)=>{const r=n(3843),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=n(8202),{re:a,t:s}=n(887),u=n(156),{compareIdentifiers:c}=n(1630);class l{constructor(e,t){if(t=u(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],o=e.prerelease[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return c(n,o)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const n=this.build[t],o=e.build[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return c(n,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=l},953:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},2401:(e,t,n)=>{const r=n(8896),o=n(8378),i=n(9261),a=n(6647),s=n(3433),u=n(4622);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return o(e,n,c);case">":return i(e,n,c);case">=":return a(e,n,c);case"<":return s(e,n,c);case"<=":return u(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},6839:(e,t,n)=>{const r=n(9405),o=n(5497),{re:i,t:a}=n(887);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=i[a.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),i[a.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[a.COERCERTL].lastIndex=-1}else n=e.match(i[a.COERCE]);return null===n?null:o(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},6218:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n)=>{const o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},9643:(e,t,n)=>{const r=n(3308);e.exports=(e,t)=>r(e,t,!0)},3308:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},3948:(e,t,n)=>{const r=n(5497),o=n(8896);e.exports=(e,t)=>{if(o(e,t))return null;{const n=r(e),o=r(t),i=n.prerelease.length||o.prerelease.length,a=i?"pre":"",s=i?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==o[e])return a+e;return s}}},8896:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>0===r(e,t,n)},9261:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)>0},6647:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)>=0},5791:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n,o)=>{"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},3433:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)<0},4622:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)<=0},629:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).major},9986:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).minor},8378:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>0!==r(e,t,n)},5497:(e,t,n)=>{const{MAX_LENGTH:r}=n(8202),{re:o,t:i}=n(887),a=n(9405),s=n(156);e.exports=(e,t)=>{if(t=s(t),e instanceof a)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[i.LOOSE]:o[i.FULL]).test(e))return null;try{return new a(e,t)}catch(e){return null}}},9800:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).patch},4408:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},762:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(t,e,n)},2743:(e,t,n)=>{const r=n(6218);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},5312:(e,t,n)=>{const r=n(4355);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},2354:(e,t,n)=>{const r=n(6218);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},4512:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},4770:(e,t,n)=>{const r=n(887);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(8202).SEMVER_SPEC_VERSION,SemVer:n(9405),compareIdentifiers:n(1630).compareIdentifiers,rcompareIdentifiers:n(1630).rcompareIdentifiers,parse:n(5497),valid:n(4512),clean:n(953),inc:n(5791),diff:n(3948),major:n(629),minor:n(9986),patch:n(9800),prerelease:n(4408),compare:n(3308),rcompare:n(762),compareLoose:n(9643),compareBuild:n(6218),sort:n(2354),rsort:n(2743),gt:n(9261),lt:n(3433),eq:n(8896),neq:n(8378),gte:n(6647),lte:n(4622),cmp:n(2401),coerce:n(6839),Comparator:n(4074),Range:n(4355),satisfies:n(5312),toComparators:n(9663),maxSatisfying:n(4931),minSatisfying:n(5891),minVersion:n(4925),validRange:n(9965),outside:n(3260),gtr:n(715),ltr:n(6),intersects:n(9560),simplifyRange:n(7795),subset:n(7732)}},8202:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},3843:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error("SEMVER",...t)}:()=>{};e.exports=t},1630:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},156:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},887:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(8202),o=n(3843),i=(t=e.exports={}).re=[],a=t.src=[],s=t.t={};let u=0;const c=(e,t,n)=>{const r=u++;o(r,t),s[e]=r,a[r]=t,i[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),c("FULL",`^${a[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),c("LOOSE",`^${a[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),c("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",a[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},715:(e,t,n)=>{const r=n(3260);e.exports=(e,t,n)=>r(e,t,">",n)},9560:(e,t,n)=>{const r=n(4355);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},6:(e,t,n)=>{const r=n(3260);e.exports=(e,t,n)=>r(e,t,"<",n)},4931:(e,t,n)=>{const r=n(9405),o=n(4355);e.exports=(e,t,n)=>{let i=null,a=null,s=null;try{s=new o(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(i&&-1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},5891:(e,t,n)=>{const r=n(9405),o=n(4355);e.exports=(e,t,n)=>{let i=null,a=null,s=null;try{s=new o(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(i&&1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},4925:(e,t,n)=>{const r=n(9405),o=n(4355),i=n(9261);e.exports=(e,t)=>{e=new o(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let a=null;o.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":a&&!i(t,a)||(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!a||n&&!i(n,a)||(n=a)}return n&&e.test(n)?n:null}},3260:(e,t,n)=>{const r=n(9405),o=n(4074),{ANY:i}=o,a=n(4355),s=n(5312),u=n(9261),c=n(3433),l=n(4622),f=n(6647);e.exports=(e,t,n,p)=>{let d,h,v,g,y;switch(e=new r(e,p),t=new a(t,p),n){case">":d=u,h=l,v=c,g=">",y=">=";break;case"<":d=c,h=f,v=u,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,p))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let a=null,s=null;if(r.forEach((e=>{e.semver===i&&(e=new o(">=0.0.0")),a=a||e,s=s||e,d(e.semver,a.semver,p)?a=e:v(e.semver,s.semver,p)&&(s=e)})),a.operator===g||a.operator===y)return!1;if((!s.operator||s.operator===g)&&h(e,s.semver))return!1;if(s.operator===y&&v(e,s.semver))return!1}return!0}},7795:(e,t,n)=>{const r=n(5312),o=n(3308);e.exports=(e,t,n)=>{const i=[];let a=null,s=null;const u=e.sort(((e,t)=>o(e,t,n)));for(const e of u)r(e,t,n)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);const c=[];for(const[e,t]of i)e===t?c.push(e):t||e!==u[0]?t?e===u[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const l=c.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length<f.length?l:t}},7732:(e,t,n)=>{const r=n(4355),o=n(4074),{ANY:i}=o,a=n(5312),s=n(3308),u=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=n.includePrerelease?[new o(">=0.0.0-0")]:[new o(">=0.0.0")]}if(1===t.length&&t[0].semver===i){if(n.includePrerelease)return!0;t=[new o(">=0.0.0")]}const r=new Set;let u,f,p,d,h,v,g;for(const t of e)">"===t.operator||">="===t.operator?u=c(u,t,n):"<"===t.operator||"<="===t.operator?f=l(f,t,n):r.add(t.semver);if(r.size>1)return null;if(u&&f){if(p=s(u.semver,f.semver,n),p>0)return null;if(0===p&&(">="!==u.operator||"<="!==f.operator))return null}for(const e of r){if(u&&!a(e,String(u),n))return null;if(f&&!a(e,String(f),n))return null;for(const r of t)if(!a(e,String(r),n))return!1;return!0}let y=!(!f||n.includePrerelease||!f.semver.prerelease.length)&&f.semver,m=!(!u||n.includePrerelease||!u.semver.prerelease.length)&&u.semver;y&&1===y.prerelease.length&&"<"===f.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,v=v||"<"===e.operator||"<="===e.operator,u)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),">"===e.operator||">="===e.operator){if(d=c(u,e,n),d===e&&d!==u)return!1}else if(">="===u.operator&&!a(u.semver,String(e),n))return!1;if(f)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(h=l(f,e,n),h===e&&h!==f)return!1}else if("<="===f.operator&&!a(f.semver,String(e),n))return!1;if(!e.operator&&(f||u)&&0!==p)return!1}return!(u&&v&&!f&&0!==p||f&&g&&!u&&0!==p||m||y)},c=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},l=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e===t)return!0;e=new r(e,n),t=new r(t,n);let o=!1;e:for(const r of e.set){for(const e of t.set){const t=u(r,e,n);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},9663:(e,t,n)=>{const r=n(4355);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},9965:(e,t,n)=>{const r=n(4355);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},7968:(e,t,n)=>{const r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},9961:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},2138:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n<o;n++)t.push(arguments[n]);return t}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function i(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,r){if(!(this instanceof a))return new a(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,o=this.head;null!==o;)n.push(e.call(t,o.value,this)),o=o.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,o=this.tail;null!==o;)n.push(e.call(t,o.value,this)),o=o.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)n.push(i.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n<e;n++)r=r.next;var o,i,s,u,c=[];for(n=0;r&&n<t;n++)c.push(r.value),r=this.removeNode(r);for(null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev),n=0;n<(arguments.length<=2?0:arguments.length-2);n++)s=n+2<2||arguments.length<=n+2?void 0:arguments[n+2],u=void 0,null===(u=(i=r)===(o=this).head?new a(s,null,i,o):new a(s,i,i.next,o)).next&&(o.tail=u),null===u.prev&&(o.head=u),o.length++,r=u;return c},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(9961)(r)}catch(e){}},9688:e=>{"use strict";e.exports=n},7064:e=>{"use strict";e.exports=r}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={exports:{}};return e[t].call(r.exports,r,r.exports,i),r.exports}i.y=t,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})();var a={};return(0,i(7968).s)(1),(()=>{"use strict";function e(e){return(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())-Date.UTC(e.getUTCFullYear(),0,0))/24/60/60/1e3}function t(e,t){const n=e.toISOString(),r=t.toISOString();return n.slice(0,n.indexOf("T"))===r.slice(0,r.indexOf("T"))}function n(n){const r=new Date,o=new Date(n),i=r.getUTCMonth()-o.getUTCMonth(),a=r.getUTCDate()-o.getUTCDate();let s=r.getUTCFullYear()-o.getUTCFullYear();(i<0||0===i&&a<0)&&s--;let u=i>=0?i:i+12;a<0&&u--;const c=u>0?`${u} mo`:"";let l=e(r)-e(o);l<0&&(l+=365);const f=Math.floor(l/7),p=l-7*f;return 0===s?t(r,o)?"Today":f<4||0===f?`${l} day`:p>0?`${f} wk ${p} d`:`${f} week`:s<2?`${c} ${s} yr`.trim():s<18?`${s} yr ${c}`.trim():`${s} years`}i.r(a),i.d(a,{age:()=>n,daysIntoYear:()=>e,formatDate:()=>E,formatDatetime:()=>S,formatTime:()=>x,isOmrsDateStrict:()=>f,isOmrsDateToday:()=>p,isSameDay:()=>t,isVersionSatisfied:()=>C,parseDate:()=>w,retry:()=>N,toDateObjectStrict:()=>d,toOmrsDateFormat:()=>b,toOmrsDayDateFormat:()=>y,toOmrsIsoString:()=>h,toOmrsTimeString:()=>g,toOmrsTimeString24:()=>v,toOmrsYearlessDateFormat:()=>m,translateFrom:()=>T});var r=i(9688),o=i(9014),s=i.n(o),u=i(4332),c=i.n(u);r.default.extend(s()),r.default.extend(c());const l="YYYY-MM-DDTHH:mm:ss.SSSZZ";function f(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&"+"===e[23]&&":"!==e[26]&&(0,r.default)(e,l).isValid()}function p(e){return(0,r.default)(e).isToday()}function d(e){return f(e)?(0,r.default)(e,l).toDate():null}function h(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,r.default)(e);return t&&(n=n.utc()),n.format(l)}function v(e){return(0,r.default)(e).format("HH:mm")}function g(e){return r.default.utc(e).format("HH:mm A")}function y(e){return b(e,"DD - MMM - YYYY")}function m(e){return b(e,"DD-MMM")}function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MMM-DD";return(0,r.default)(e).format(t)}function w(e){return(0,r.default)(e).toDate()}const _={mode:"standard",time:"for today",day:!0,year:!0};function E(e,t){const{mode:n,time:o,day:i,year:a}={..._,...t},s={year:a?"numeric":void 0,month:"short",day:i?"2-digit":void 0};let u,c=O();const l=(0,r.default)(e).isToday();if(l)u=new Intl.RelativeTimeFormat(c,{numeric:"auto"}).format(0,"day"),u=u[0].toLocaleUpperCase(c)+u.slice(1);else if("en"==c&&(c="en-GB"),u=e.toLocaleDateString(c,s),"en-GB"==c&&"standard"==n&&a&&i&&(u=u.replace(/ /g,"-")),"wide"==n&&(u=u.replace(/ /g," — "),/ru.*/.test(c))){const e=u.length;u=u.slice(0,e-5)+u.slice(e-5).replace(" — "," ")}return(!0===o||l&&"for today"===o)&&(u+=`, ${x(e)}`),u}function x(e){return e.toLocaleTimeString(O(),{hour:"2-digit",minute:"2-digit"})}function S(e,t){return E(e,{...t,time:!0})}function O(){let e=window.i18next.language;return e=e.replace("_","-"),"ht"===e&&(e="fr-HT"),e}var k=i(7064);function T(e,t,n,r){return(k.default.default||k.default).t(t,{ns:e,defaultValue:n,...r})}var P=i(4770);function j(e){const[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function C(e,t){const n=function(e){const t=e.indexOf("-");return t>=0?`${j(e.slice(0,t))}-${e.slice(t+1)}`:j(e)}(t);return P.satisfies(n,e,{includePrerelease:!0})}async function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{shouldRetry:n,getDelay:r,onError:o}=t;n=n??(e=>A(e,5)),r=r??(e=>I(e,1e3));let i,a=0;do{try{return await R(r(a)),await e()}catch(e){o?.(e,a),i=e}}while(n(a++));throw i}function A(e,t){return e<=t}function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=n?e+1:e;return t*Math.pow(2,r)}async function R(e){if(!(e<=0))return new Promise((t=>setTimeout(t,e)))}})(),a})())}}}))},7530:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",o="minute",i="hour",a="day",s="week",u="month",c="quarter",l="year",f="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,u),i=n-o<0,a=t.clone().add(r+(i?-1:1),u);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:l,w:s,d:a,D:f,h:i,m:o,s:r,ms:n,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},m="en",b={};b[m]=v;var w=function(e){return e instanceof S},_=function e(t,n,r){var o;if(!t)return m;if("string"==typeof t){var i=t.toLowerCase();b[i]&&(o=i),n&&(b[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,o=s}return!r&&o&&(m=o),o||!r&&m},E=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new S(n)},x=y;x.l=_,x.i=w,x.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){function v(e){this.$L=_(e.locale,null,!0),this.parse(e)}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(d);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return x},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=E(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return E(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<E(e)},g.$g=function(e,t,n){return x.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,c=!!x.u(t)||t,p=x.p(e),d=function(e,t){var r=x.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return c?r:r.endOf(a)},h=function(e,t){return x.w(n.toDate()[e].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},v=this.$W,g=this.$M,y=this.$D,m="set"+(this.$u?"UTC":"");switch(p){case l:return c?d(1,0):d(31,11);case u:return c?d(1,g):d(0,g+1);case s:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return d(c?y-w:y+(6-w),g);case a:case f:return h(m+"Hours",0);case i:return h(m+"Minutes",1);case o:return h(m+"Seconds",2);case r:return h(m+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var s,c=x.p(e),p="set"+(this.$u?"UTC":""),d=(s={},s[a]=p+"Date",s[f]=p+"Date",s[u]=p+"Month",s[l]=p+"FullYear",s[i]=p+"Hours",s[o]=p+"Minutes",s[r]=p+"Seconds",s[n]=p+"Milliseconds",s)[c],h=c===a?this.$D+(t-this.$W):t;if(c===u||c===l){var v=this.clone().set(f,1);v.$d[d](h),v.init(),this.$d=v.set(f,Math.min(this.$D,v.daysInMonth())).$d}else d&&this.$d[d](h);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[x.p(e)]()},g.add=function(n,c){var f,p=this;n=Number(n);var d=x.p(c),h=function(e){var t=E(p);return x.w(t.date(t.date()+Math.round(e*n)),p)};if(d===u)return this.set(u,this.$M+n);if(d===l)return this.set(l,this.$y+n);if(d===a)return h(1);if(d===s)return h(7);var v=(f={},f[o]=e,f[i]=t,f[r]=1e3,f)[d]||1,g=this.$d.getTime()+n*v;return x.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=x.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].substr(0,i)},f=function(e){return x.s(i%12||12,e,"0")},d=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},v={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:x.s(s+1,2,"0"),MMM:l(n.monthsShort,s,c,3),MMMM:l(c,s),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:x.s(i,2,"0"),h:f(1),hh:f(2),a:d(i,a,!0),A:d(i,a,!1),m:String(a),mm:x.s(a,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:o};return r.replace(h,(function(e,t){return t||v[e]||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,f,p){var d,h=x.p(f),v=E(n),g=(v.utcOffset()-this.utcOffset())*e,y=this-v,m=x.m(this,v);return m=(d={},d[l]=m/12,d[u]=m,d[c]=m/3,d[s]=(y-g)/6048e5,d[a]=(y-g)/864e5,d[i]=y/t,d[o]=y/e,d[r]=y/1e3,d)[h]||y,p?m:x.a(m)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return b[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=_(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return x.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),O=S.prototype;return E.prototype=O,[["$ms",n],["$s",r],["$m",o],["$H",i],["$W",a],["$M",u],["$y",l],["$D",f]].forEach((function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),E.extend=function(e,t){return e.$i||(e(t,S,E),e.$i=!0),E},E.locale=_,E.isDayjs=w,E.unix=function(e){return E(1e3*e)},E.en=b[m],E.Ls=b,E.p={},E}()},4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},4525:function(e){(function(){var t,n;function r(e,o){var i,a=e.data.entry||[],s=[];for(i=0;i<a.length;i++)s.push(a[i].resource);o(s);var u=n.defer();return t.nextPage({bundle:e.data}).then((function(e){r(e,o).then((function(e){u.resolve()}))}),(function(e){u.resolve()})),u.promise}function o(e,o,i,a){n.defer(),t.search(e).then((function(e){r(e,o).then((function(){i()}),(function(e){a(e)}))}),(function(e){a(e)}))}function i(e){var t=n.defer(),r=[];return o(e,(function(e){e.forEach((function(e){r.push(e)}))}),(function(){t.resolve(r)}),(function(e){t.reject(e)})),t.promise}function a(e,r){var o=n.defer();return t.search(e).then((function(e){var n={},i=[function(){o.resolve(e,n)}];function a(){i.pop()()}var s=e.data;s.entry&&s.entry.forEach((function(e){var o=e.resource,u=o.resourceType;r&&r.forEach((function(e){var r=e.split("."),c=r[0],l=r[1],f=o[l];if(u===c&&f){var p=f.reference;n[p]||function(e,r,o){i.push((function(){!function(e,r,o){var i=o.reference;t.resolve({bundle:e,resource:r,reference:o}).then((function(e){var t=e.data||e.content;n[i]=t,a()}))}(e,r,o)}))}(s,o,f)}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise}e.exports=function(e,r){return t=e,n=r,e.drain=o,e.fetchAll=i,e.fetchAllWithReferences=a,e}}).call(this)},1256:function(e,t,n){(function(){n(5454);var t=n(4801),r=n(7921),o=n(8294),i=n(8821),a=n(442),s=n(856),u=n(7719),c=n(3029),l=n(2723),f=n(4249),p=n(4525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},g=function(e,t){return h("headers."+e,t)},y=d(a),m=d(s(e,n)).and(y).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(g("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(g("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=m.and(v("GET")),w=m.and(v("POST")),_=m.and(v("PUT")),E=m.and(v("DELETE")),x=m.and(v("PATCH")),S=i.Http(e,n),O=f.Path,k=O(e.baseUrl),T=k.slash(":type || :resource.resourceType"),P=T.slash("_history"),j=T.slash(":id || :resource.id"),C=j.slash("_history"),N=j.slash(":versionId || :resource.meta.versionId"),A=k.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=g("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(k.slash("metadata")).end(S),document:w.and(k.slash("Document")).end(S),profile:b.and(k.slash("Profile").slash(":type")).end(S),transaction:w.and(k).end(S),history:b.and(k.slash("_history")).and(R).end(S),typeHistory:b.and(P).and(R).end(S),resourceHistory:b.and(C).and(R).end(S),read:b.and(c.$WithPatient).and(j).end(S),vread:b.and(N).end(S),delete:E.and(j).and(I).end(S),create:w.and(T).and(I).end(S),validate:w.and(T.slash("_validate")).end(S),meta:{add:w.and(A.slash("$meta-add")).end(S),delete:w.and(A.slash("$meta-delete")).end(S),read:b.and(A.slash("$meta")).end(S)},search:b.and(T).and(c.$WithPatient).and(r.$SearchParams).and(R).end(S),update:_.and(j).and(I).end(S),conditionalUpdate:_.and(T).and(r.$SearchParams).and(I).end(S),conditionalDelete:E.and(T).and(r.$SearchParams).and(I).end(S),nextPage:b.and(u.$$BundleLinkUrl("next")).end(S),prevPage:b.and(u.$$BundleLinkUrl("previous")).and(u.$$BundleLinkUrl("prev")).end(S),getBundleByUrl:b.and(O(":url")).end(S),resolve:b.and(l.resolve).end(S),patch:x.and(j).and(g("Content-Type","application/json-patch+json")).end(S)},n)}}).call(this)},8294:function(e,t,n){(function(){var e,r=n(4801),o=n(9672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},7719:(e,t)=>{t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},4801:function(e,t,n){(function(){var e=n(5454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:e=>{e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},8821:function(e,t,n){(function(){var e=n(5454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},3029:function(e,t,n){(function(){var e=n(4801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},2723:function(e,t,n){(function(){var t=n(5454),r=/^#(.*)/,o=function(e){var n=e.cache,o=e.reference,i=e.bundle,a=o;if(!a.reference)return null;if(a.reference.match(r))return function(e,t){var n=e.match(r)[1],o=(t.contained||[]).filter((function(e){return(e.id||e._id)==n}))[0];return o&&{content:o}||null}(a.reference,e.resource);var s=t.absoluteUrl(e.baseUrl,a.reference);return(i&&i.entry||[]).filter((function(e){return e.id===s}))[0]||(null!=n?n[s]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,s=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return s.resolve(i),s.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},7921:function(e,t,n){(function(){var e=n(5454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,s={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},u={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},c=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n;switch(r(t)){case"object":return function(e,t){return i(t,(function(n,i){var a,l,f,p;return a=i[0],p=i[1],n.concat("$and"===a?o(p).reduce((function(t,n){return t.concat(c(e,n))}),[]):"$type"===a?[]:function(e){return 0===e.indexOf("$")}(a)?(l={param:e},"$or"===a?l.value=p:(s[a]&&(l.operator=s[a]),u[a]&&(l.modifier=u[a]),"object"===r(p)&&p.$or?l.value=p.$or:l.value=[p]),[l]):(t.$type&&(f=":"+t.$type),c(""+e+(f||"")+"."+a,p)))}))}(e,t);case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(c(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,s,u;for(u=[],o=0,i=(s=l(e)).length;o<i;o++)t=s[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,u.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return u}().join("&")};t._query=l,t.query=f;var p=n(4801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},4249:function(e,t,n){(function(){n(5454);var e=n(4801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n=function(e,t){return 0==e.indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(e,t):e}(e.trim(),t);if((null==n||void 0===n)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return n}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},5454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var s=function(){return Array.prototype.slice.call(arguments)};t.argsArray=s,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},s.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var u=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=u;var c=function(e,t,n){return t?u(c(e),e,t,n):function(t,n){return c(e,t,n)}};t.postwalk=c}).call(this)},2891:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],v="[object Arguments]",g="[object Array]",y="[object Boolean]",m="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",E="[object Map]",x="[object Number]",S="[object Object]",O="[object Promise]",k="[object RegExp]",T="[object Set]",P="[object String]",j="[object Symbol]",C="[object WeakMap]",N="[object ArrayBuffer]",A="[object DataView]",I="[object Float32Array]",R="[object Float64Array]",$="[object Int8Array]",D="[object Int16Array]",L="[object Int32Array]",M="[object Uint8Array]",U="[object Uint8ClampedArray]",F="[object Uint16Array]",B="[object Uint32Array]",z=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,q=RegExp(K.source),G=RegExp(H.source),Z=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="["+Se+"]",ke="["+_e+"]",Te="\\d+",Pe="["+Ee+"]",je="[^\\ud800-\\udfff"+Se+Te+"\\u2700-\\u27bf"+Ee+xe+"]",Ce="\\ud83c[\\udffb-\\udfff]",Ne="[^\\ud800-\\udfff]",Ae="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",Re="["+xe+"]",$e="(?:"+Pe+"|"+je+")",De="(?:"+Re+"|"+je+")",Le="(?:['’](?:d|ll|m|re|s|t|ve))?",Me="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ue="(?:"+ke+"|"+Ce+")?",Fe="[\\ufe0e\\ufe0f]?",Be=Fe+Ue+"(?:\\u200d(?:"+[Ne,Ae,Ie].join("|")+")"+Fe+Ue+")*",ze="(?:"+["[\\u2700-\\u27bf]",Ae,Ie].join("|")+")"+Be,Ve="(?:"+[Ne+ke+"?",ke,Ae,Ie,"[\\ud800-\\udfff]"].join("|")+")",We=RegExp("['’]","g"),Ke=RegExp(ke,"g"),He=RegExp(Ce+"(?="+Ce+")|"+Ve+Be,"g"),qe=RegExp([Re+"?"+Pe+"+"+Le+"(?="+[Oe,Re,"$"].join("|")+")",De+"+"+Me+"(?="+[Oe,Re+$e,"$"].join("|")+")",Re+"?"+$e+"+"+Le,Re+"+"+Me,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,ze].join("|"),"g"),Ge=RegExp("[\\u200d\\ud800-\\udfff"+_e+"\\ufe0e\\ufe0f]"),Ze=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ye=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Qe=-1,Je={};Je[I]=Je[R]=Je[$]=Je[D]=Je[L]=Je[M]=Je[U]=Je[F]=Je[B]=!0,Je[v]=Je[g]=Je[N]=Je[y]=Je[A]=Je[m]=Je[b]=Je[w]=Je[E]=Je[x]=Je[S]=Je[k]=Je[T]=Je[P]=Je[C]=!1;var Xe={};Xe[v]=Xe[g]=Xe[N]=Xe[A]=Xe[y]=Xe[m]=Xe[I]=Xe[R]=Xe[$]=Xe[D]=Xe[L]=Xe[E]=Xe[x]=Xe[S]=Xe[k]=Xe[T]=Xe[P]=Xe[j]=Xe[M]=Xe[U]=Xe[F]=Xe[B]=!0,Xe[b]=Xe[w]=Xe[C]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ot="object"==typeof self&&self&&self.Object===Object&&self,it=rt||ot||Function("return this")(),at=t&&!t.nodeType&&t,st=at&&e&&!e.nodeType&&e,ut=st&&st.exports===at,ct=ut&&rt.process,lt=function(){try{return st&&st.require&&st.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ft=lt&&lt.isArrayBuffer,pt=lt&&lt.isDate,dt=lt&&lt.isMap,ht=lt&&lt.isRegExp,vt=lt&&lt.isSet,gt=lt&&lt.isTypedArray;function yt(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)}function mt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function wt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Et(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function xt(e,t){return!(null==e||!e.length)&&It(e,t,0)>-1}function St(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Ot(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}function kt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Tt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Pt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ct=Lt("length");function Nt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function At(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function It(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):At(e,$t,n)}function Rt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function $t(e){return e!=e}function Dt(e,t){var n=null==e?0:e.length;return n?Ft(e,t)/n:p}function Lt(e){return function(t){return null==t?o:t[e]}}function Mt(e){return function(t){return null==e?o:e[t]}}function Ut(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Ft(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Bt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function zt(e){return e?e.slice(0,sn(e)+1).replace(re,""):e}function Vt(e){return function(t){return e(t)}}function Wt(e,t){return Ot(t,(function(t){return e[t]}))}function Kt(e,t){return e.has(t)}function Ht(e,t){for(var n=-1,r=e.length;++n<r&&It(t,e[n],0)>-1;);return n}function qt(e,t){for(var n=e.length;n--&&It(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Zt=Mt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yt=Mt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Qt(e){return"\\"+et[e]}function Jt(e){return Ge.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,i[o++]=n)}return i}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Jt(e)?function(e){for(var t=He.lastIndex=0;He.test(e);)++t;return t}(e):Ct(e)}function an(e){return Jt(e)?function(e){return e.match(He)||[]}(e):function(e){return e.split("")}(e)}function sn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var un=Mt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),cn=function e(t){var n,r=(t=null==t?it:cn.defaults(it.Object(),t,cn.pick(it,Ye))).Array,oe=t.Date,_e=t.Error,Ee=t.Function,xe=t.Math,Se=t.Object,Oe=t.RegExp,ke=t.String,Te=t.TypeError,Pe=r.prototype,je=Ee.prototype,Ce=Se.prototype,Ne=t["__core-js_shared__"],Ae=je.toString,Ie=Ce.hasOwnProperty,Re=0,$e=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=Ce.toString,Le=Ae.call(Se),Me=it._,Ue=Oe("^"+Ae.call(Ie).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=ut?t.Buffer:o,Be=t.Symbol,ze=t.Uint8Array,Ve=Fe?Fe.allocUnsafe:o,He=en(Se.getPrototypeOf,Se),Ge=Se.create,et=Ce.propertyIsEnumerable,rt=Pe.splice,ot=Be?Be.isConcatSpreadable:o,at=Be?Be.iterator:o,st=Be?Be.toStringTag:o,ct=function(){try{var e=li(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==it.clearTimeout&&t.clearTimeout,Ct=oe&&oe.now!==it.Date.now&&oe.now,Mt=t.setTimeout!==it.setTimeout&&t.setTimeout,ln=xe.ceil,fn=xe.floor,pn=Se.getOwnPropertySymbols,dn=Fe?Fe.isBuffer:o,hn=t.isFinite,vn=Pe.join,gn=en(Se.keys,Se),yn=xe.max,mn=xe.min,bn=oe.now,wn=t.parseInt,_n=xe.random,En=Pe.reverse,xn=li(t,"DataView"),Sn=li(t,"Map"),On=li(t,"Promise"),kn=li(t,"Set"),Tn=li(t,"WeakMap"),Pn=li(Se,"create"),jn=Tn&&new Tn,Cn={},Nn=Ui(xn),An=Ui(Sn),In=Ui(On),Rn=Ui(kn),$n=Ui(Tn),Dn=Be?Be.prototype:o,Ln=Dn?Dn.valueOf:o,Mn=Dn?Dn.toString:o;function Un(e){if(ns(e)&&!Ka(e)&&!(e instanceof Vn)){if(e instanceof zn)return e;if(Ie.call(e,"__wrapped__"))return Fi(e)}return new zn(e)}var Fn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Bn(){}function zn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}function Gn(e){var t=this.__data__=new Kn(e);this.size=t.size}function Zn(e,t){var n=Ka(e),r=!n&&Wa(e),o=!n&&!r&&Za(e),i=!n&&!r&&!o&&ls(e),a=n||r||o||i,s=a?Bt(e.length,ke):[],u=s.length;for(var c in e)!t&&!Ie.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yi(c,u))||s.push(c);return s}function Yn(e){var t=e.length;return t?e[Hr(0,t-1)]:o}function Qn(e,t){return Ri(Po(e),ar(t,0,e.length))}function Jn(e){return Ri(Po(e))}function Xn(e,t,n){(n!==o&&!Ba(e[t],n)||n===o&&!(t in e))&&or(e,t,n)}function er(e,t,n){var r=e[t];Ie.call(e,t)&&Ba(r,n)&&(n!==o||t in e)||or(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function rr(e,t){return e&&jo(t,As(t),e)}function or(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,i=t.length,a=r(i),s=null==e;++n<i;)a[n]=s?o:Ts(e,t[n]);return a}function ar(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function sr(e,t,n,r,i,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!ts(e))return e;var f=Ka(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Po(e,s)}else{var p=di(e),d=p==w||p==_;if(Za(e))return Eo(e,u);if(p==S||p==v||d&&!i){if(s=c||d?{}:vi(e),!u)return c?function(e,t){return jo(e,pi(e),t)}(e,function(e,t){return e&&jo(t,Is(t),e)}(s,e)):function(e,t){return jo(e,fi(e),t)}(e,rr(s,e))}else{if(!Xe[p])return i?e:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case N:return xo(e);case y:case m:return new o(+e);case A:return function(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case I:case R:case $:case D:case L:case M:case U:case F:case B:return So(e,n);case E:return new o;case x:case P:return new o(e);case k:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new o;case j:return r=e,Ln?Se(Ln.call(r)):{}}}(e,p,u)}}a||(a=new Gn);var h=a.get(e);if(h)return h;a.set(e,s),ss(e)?e.forEach((function(r){s.add(sr(r,t,n,r,e,a))})):rs(e)&&e.forEach((function(r,o){s.set(o,sr(r,t,n,o,e,a))}));var g=f?o:(l?c?ri:ni:c?Is:As)(e);return bt(g||e,(function(r,o){g&&(r=e[o=r]),er(s,o,sr(r,t,n,o,e,a))})),s}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Se(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new Te(i);return Ci((function(){e.apply(o,n)}),t)}function lr(e,t,n,r){var o=-1,i=xt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Ot(t,Vt(n))),r?(i=St,a=!1):t.length>=200&&(i=Kt,a=!1,t=new qn(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else i(t,f,r)||u.push(l)}return u}Un.templateSettings={escape:Z,evaluate:Y,interpolate:Q,variable:"",imports:{_:Un}},Un.prototype=Bn.prototype,Un.prototype.constructor=Un,zn.prototype=Fn(Bn.prototype),zn.prototype.constructor=zn,Vn.prototype=Fn(Bn.prototype),Vn.prototype.constructor=Vn,Wn.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(Pn){var n=t[e];return n===a?o:n}return Ie.call(t,e)?t[e]:o},Wn.prototype.has=function(e){var t=this.__data__;return Pn?t[e]!==o:Ie.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pn&&t===o?a:t,this},Kn.prototype.clear=function(){this.__data__=[],this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Kn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?o:t[n][1]},Kn.prototype.has=function(e){return tr(this.__data__,e)>-1},Kn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Sn||Kn),string:new Wn}},Hn.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return ui(this,e).get(e)},Hn.prototype.has=function(e){return ui(this,e).has(e)},Hn.prototype.set=function(e,t){var n=ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,a),this},qn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.clear=function(){this.__data__=new Kn,this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.__data__.get(e)},Gn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Kn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ao(br),pr=Ao(wr,!0);function dr(e,t){var n=!0;return fr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function hr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],s=t(a);if(null!=s&&(u===o?s==s&&!cs(s):n(s,u)))var u=s,c=a}return c}function vr(e,t){var n=[];return fr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function gr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=gi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?gr(s,t-1,n,r,o):kt(o,s):r||(o[o.length]=s)}return o}var yr=Io(),mr=Io(!0);function br(e,t){return e&&yr(e,t,As)}function wr(e,t){return e&&mr(e,t,As)}function _r(e,t){return Et(t,(function(t){return Ja(e[t])}))}function Er(e,t){for(var n=0,r=(t=mo(t,e)).length;null!=e&&n<r;)e=e[Mi(t[n++])];return n&&n==r?e:o}function xr(e,t,n){var r=t(e);return Ka(e)?r:kt(r,n(e))}function Sr(e){return null==e?e===o?"[object Undefined]":"[object Null]":st&&st in Se(e)?function(e){var t=Ie.call(e,st),n=e[st];try{e[st]=o;var r=!0}catch(e){}var i=De.call(e);return r&&(t?e[st]=n:delete e[st]),i}(e):function(e){return De.call(e)}(e)}function Or(e,t){return e>t}function kr(e,t){return null!=e&&Ie.call(e,t)}function Tr(e,t){return null!=e&&t in Se(e)}function Pr(e,t,n){for(var i=n?St:xt,a=e[0].length,s=e.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=Ot(p,Vt(t))),l=mn(p.length,l),c[u]=!n&&(t||a>=120&&p.length>=120)?new qn(u&&p):o}p=e[0];var d=-1,h=c[0];e:for(;++d<a&&f.length<l;){var v=p[d],g=t?t(v):v;if(v=n||0!==v?v:0,!(h?Kt(h,g):i(f,g,n))){for(u=s;--u;){var y=c[u];if(!(y?Kt(y,g):i(e[u],g,n)))continue e}h&&h.push(g),f.push(v)}}return f}function jr(e,t,n){var r=null==(e=ki(e,t=mo(t,e)))?e:e[Mi(Qi(t))];return null==r?o:yt(r,e,n)}function Cr(e){return ns(e)&&Sr(e)==v}function Nr(e,t,n,r,i){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var s=Ka(e),u=Ka(t),c=s?g:di(e),l=u?g:di(t),f=(c=c==v?S:c)==S,p=(l=l==v?S:l)==S,d=c==l;if(d&&Za(e)){if(!Za(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Gn),s||ls(e)?ei(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!i(new ze(e),new ze(t)));case y:case m:case x:return Ba(+e,+t);case b:return e.name==t.name&&e.message==t.message;case k:case P:return e==t+"";case E:var s=Xt;case T:var u=1&r;if(s||(s=nn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=ei(s(e),s(t),r,o,i,a);return a.delete(e),l;case j:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,n,r,i,a);if(!(1&n)){var h=f&&Ie.call(e,"__wrapped__"),w=p&&Ie.call(t,"__wrapped__");if(h||w){var _=h?e.value():e,O=w?t.value():t;return a||(a=new Gn),i(_,O,n,r,a)}}return!!d&&(a||(a=new Gn),function(e,t,n,r,i,a){var s=1&n,u=ni(e),c=u.length;if(c!=ni(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:Ie.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=s;++l<c;){var g=e[f=u[l]],y=t[f];if(r)var m=s?r(y,g,f,t,e,a):r(g,y,f,e,t,a);if(!(m===o?g===y||i(g,y,n,r,a):m)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,i,a))}(e,t,n,r,Nr,i))}function Ar(e,t,n,r){var i=n.length,a=i,s=!r;if(null==e)return!a;for(e=Se(e);i--;){var u=n[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){var c=(u=n[i])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===o&&!(c in e))return!1}else{var p=new Gn;if(r)var d=r(l,f,c,e,t,p);if(!(d===o?Nr(f,l,3,r,p):d))return!1}}return!0}function Ir(e){return!(!ts(e)||(t=e,$e&&$e in t))&&(Ja(e)?Ue:ve).test(Ui(e));var t}function Rr(e){return"function"==typeof e?e:null==e?ou:"object"==typeof e?Ka(e)?Ur(e[0],e[1]):Mr(e):du(e)}function $r(e){if(!Ei(e))return gn(e);var t=[];for(var n in Se(e))Ie.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Dr(e,t){return e<t}function Lr(e,t){var n=-1,o=qa(e)?r(e.length):[];return fr(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Mr(e){var t=ci(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(n){return n===e||Ar(n,e,t)}}function Ur(e,t){return bi(e)&&xi(t)?Si(Mi(e),t):function(n){var r=Ts(n,e);return r===o&&r===t?Ps(n,e):Nr(t,r,3)}}function Fr(e,t,n,r,i){e!==t&&yr(t,(function(a,s){if(i||(i=new Gn),ts(a))!function(e,t,n,r,i,a,s){var u=Pi(e,n),c=Pi(t,n),l=s.get(c);if(l)Xn(e,n,l);else{var f=a?a(u,c,n+"",e,t,s):o,p=f===o;if(p){var d=Ka(c),h=!d&&Za(c),v=!d&&!h&&ls(c);f=c,d||h||v?Ka(u)?f=u:Ga(u)?f=Po(u):h?(p=!1,f=Eo(c,!0)):v?(p=!1,f=So(c,!0)):f=[]:is(c)||Wa(c)?(f=u,Wa(u)?f=ms(u):ts(u)&&!Ja(u)||(f=vi(c))):p=!1}p&&(s.set(c,f),i(f,c,r,a,s),s.delete(c)),Xn(e,n,f)}}(e,t,s,n,Fr,r,i);else{var u=r?r(Pi(e,s),a,s+"",e,t,i):o;u===o&&(u=a),Xn(e,s,u)}}),Is)}function Br(e,t){var n=e.length;if(n)return yi(t+=t<0?n:0,n)?e[t]:o}function zr(e,t,n){t=t.length?Ot(t,(function(e){return Ka(e)?function(t){return Er(t,1===e.length?e[0]:e)}:e})):[ou];var r=-1;t=Ot(t,Vt(si()));var o=Lr(e,(function(e,n,o){var i=Ot(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var u=Oo(o[r],i[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(o)}function Vr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Er(e,a);n(s,a)&&Qr(i,mo(a,e),s)}return i}function Wr(e,t,n,r){var o=r?Rt:It,i=-1,a=t.length,s=e;for(e===t&&(t=Po(t)),n&&(s=Ot(e,Vt(n)));++i<a;)for(var u=0,c=t[i],l=n?n(c):c;(u=o(s,l,u,r))>-1;)s!==e&&rt.call(s,u,1),rt.call(e,u,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;yi(o)?rt.call(e,o,1):co(e,o)}}return e}function Hr(e,t){return e+fn(_n()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Gr(e,t){return Ni(Oi(e,t,ou),e+"")}function Zr(e){return Yn(Bs(e))}function Yr(e,t){var n=Bs(e);return Ri(n,ar(t,0,n.length))}function Qr(e,t,n,r){if(!ts(e))return e;for(var i=-1,a=(t=mo(t,e)).length,s=a-1,u=e;null!=u&&++i<a;){var c=Mi(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var f=u[c];(l=r?r(f,c,u):o)===o&&(l=ts(f)?f:yi(t[i+1])?[]:{})}er(u,c,l),u=u[c]}return e}var Jr=jn?function(e,t){return jn.set(e,t),e}:ou,Xr=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:ou;function eo(e){return Ri(Bs(e))}function to(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function no(e,t){var n;return fr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function ro(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!cs(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return oo(e,t,ou,n)}function oo(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=cs(t),l=t===o;i<a;){var f=fn((i+a)/2),p=n(e[f]),d=p!==o,h=null===p,v=p==p,g=cs(p);if(s)var y=r||v;else y=l?v&&(r||d):u?v&&d&&(r||!h):c?v&&d&&!h&&(r||!g):!h&&!g&&(r?p<=t:p<t);y?i=f+1:a=f}return mn(a,4294967294)}function io(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Ba(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function ao(e){return"number"==typeof e?e:cs(e)?p:+e}function so(e){if("string"==typeof e)return e;if(Ka(e))return Ot(e,so)+"";if(cs(e))return Mn?Mn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function uo(e,t,n){var r=-1,o=xt,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=St;else if(i>=200){var c=t?null:Go(e);if(c)return nn(c);a=!1,o=Kt,u=new qn}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function co(e,t){return null==(e=ki(e,t=mo(t,e)))||delete e[Mi(Qi(t))]}function lo(e,t,n,r){return Qr(e,t,n(Er(e,t)),r)}function fo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?to(e,r?0:i,r?i+1:o):to(e,r?i+1:0,r?o:i)}function po(e,t){var n=e;return n instanceof Vn&&(n=n.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,kt([e],t.args))}),n)}function ho(e,t,n){var o=e.length;if(o<2)return o?uo(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var s=e[i],u=-1;++u<o;)u!=i&&(a[i]=lr(a[i]||s,e[u],t,n));return uo(gr(a,1),t,n)}function vo(e,t,n){for(var r=-1,i=e.length,a=t.length,s={};++r<i;){var u=r<a?t[r]:o;n(s,e[r],u)}return s}function go(e){return Ga(e)?e:[]}function yo(e){return"function"==typeof e?e:ou}function mo(e,t){return Ka(e)?e:bi(e,t)?[e]:Li(bs(e))}var bo=Gr;function wo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:to(e,t,n)}var _o=lt||function(e){return it.clearTimeout(e)};function Eo(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function xo(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function So(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=cs(e),s=t!==o,u=null===t,c=t==t,l=cs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}function ko(e,t,n,o){for(var i=-1,a=e.length,s=n.length,u=-1,c=t.length,l=yn(a-s,0),f=r(c+l),p=!o;++u<c;)f[u]=t[u];for(;++i<s;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[u++]=e[i++];return f}function To(e,t,n,o){for(var i=-1,a=e.length,s=-1,u=n.length,c=-1,l=t.length,f=yn(a-u,0),p=r(f+l),d=!o;++i<f;)p[i]=e[i];for(var h=i;++c<l;)p[h+c]=t[c];for(;++s<u;)(d||i<a)&&(p[h+n[s]]=e[i++]);return p}function Po(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function jo(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):o;c===o&&(c=e[u]),i?or(n,u,c):er(n,u,c)}return n}function Co(e,t){return function(n,r){var o=Ka(n)?mt:nr,i=t?t():{};return o(n,e,si(r,2),i)}}function No(e){return Gr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&mi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Se(t);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Ao(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Se(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Io(e){return function(t,n,r){for(var o=-1,i=Se(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}function Ro(e){return function(t){var n=Jt(t=bs(t))?an(t):o,r=n?n[0]:t.charAt(0),i=n?wo(n,1).join(""):t.slice(1);return r[e]()+i}}function $o(e){return function(t){return Tt(Js(Ws(t).replace(We,"")),e,"")}}function Do(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function Lo(e){return function(t,n,r){var i=Se(t);if(!qa(t)){var a=si(n,3);t=As(t),n=function(e){return a(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[a?t[s]:s]:o}}function Mo(e){return ti((function(t){var n=t.length,r=n,a=zn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Te(i);if(a&&!u&&"wrapper"==ii(s))var u=new zn([],!0)}for(r=u?r:n;++r<n;){var c=ii(s=t[r]),l="wrapper"==c?oi(s):o;u=l&&wi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[ii(l[0])].apply(u,l[3]):1==s.length&&wi(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ka(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Uo(e,t,n,i,a,s,u,l,f,p){var d=t&c,h=1&t,v=2&t,g=24&t,y=512&t,m=v?o:Do(e);return function o(){for(var c=arguments.length,b=r(c),w=c;w--;)b[w]=arguments[w];if(g)var _=ai(o),E=Gt(b,_);if(i&&(b=ko(b,i,a,g)),s&&(b=To(b,s,u,g)),c-=E,g&&c<p){var x=tn(b,_);return Ho(e,t,Uo,o.placeholder,n,b,x,l,f,p-c)}var S=h?n:this,O=v?S[e]:e;return c=b.length,l?b=Ti(b,l):y&&c>1&&b.reverse(),d&&f<c&&(b.length=f),this&&this!==it&&this instanceof o&&(O=m||Do(O)),O.apply(S,b)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Bo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=so(n),r=so(r)):(n=ao(n),r=ao(r)),i=e(n,r)}return i}}function zo(e){return ti((function(t){return t=Ot(t,Vt(si())),Gr((function(n){var r=this;return e(t,(function(e){return yt(e,r,n)}))}))}))}function Vo(e,t){var n=(t=t===o?" ":so(t)).length;if(n<2)return n?qr(t,e):t;var r=qr(t,ln(e/on(t)));return Jt(t)?wo(an(r),0,e).join(""):r.slice(0,e)}function Wo(e){return function(t,n,i){return i&&"number"!=typeof i&&mi(t,n,i)&&(n=i=o),t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n,o){for(var i=-1,a=yn(ln((t-e)/(n||1)),0),s=r(a);a--;)s[o?a:++i]=e,e+=n;return s}(t,n,i=i===o?t<n?1:-1:hs(i),e)}}function Ko(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Ho(e,t,n,r,i,a,s,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var d=[e,t,i,p?a:o,p?s:o,p?o:a,p?o:s,c,l,f],h=n.apply(o,d);return wi(e)&&ji(h,d),h.placeholder=r,Ai(h,e,t)}function qo(e){var t=xe[e];return function(e,n){if(e=ys(e),(n=null==n?0:mn(vs(n),292))&&hn(e)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Go=kn&&1/nn(new kn([,-0]))[1]==l?function(e){return new kn(e)}:cu;function Zo(e){return function(t){var n=di(t);return n==E?Xt(t):n==T?rn(t):function(e,t){return Ot(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yo(e,t,n,a,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(i);var v=a?a.length:0;if(v||(t&=-97,a=l=o),p=p===o?p:yn(vs(p),0),d=d===o?d:vs(d),v-=l?l.length:0,64&t){var g=a,y=l;a=l=o}var m=h?o:oi(e),b=[e,t,n,a,l,g,y,f,p,d];if(m&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?ko(l,u,t[4]):u,e[4]=l?tn(e[3],s):t[4]}(u=t[5])&&(l=e[5],e[5]=l?To(l,u,t[6]):u,e[6]=l?tn(e[5],s):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(b,m),e=b[0],t=b[1],n=b[2],a=b[3],l=b[4],!(d=b[9]=b[9]===o?h?0:e.length:yn(b[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var i=Do(e);return function a(){for(var s=arguments.length,u=r(s),c=s,l=ai(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:tn(u,l);return(s-=f.length)<n?Ho(e,t,Uo,a.placeholder,o,u,f,o,o,n-s):yt(this&&this!==it&&this instanceof a?i:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?Uo.apply(o,b):function(e,t,n,o){var i=1&t,a=Do(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=o.length,f=r(l+u),p=this&&this!==it&&this instanceof t?a:e;++c<l;)f[c]=o[c];for(;u--;)f[c++]=arguments[++s];return yt(p,i?n:this,f)}}(e,t,n,a);else var w=function(e,t,n){var r=1&t,o=Do(e);return function t(){return(this&&this!==it&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Ai((m?Jr:ji)(w,b),e,t)}function Qo(e,t,n,r){return e===o||Ba(e,Ce[n])&&!Ie.call(r,n)?t:e}function Jo(e,t,n,r,i,a){return ts(e)&&ts(t)&&(a.set(t,e),Fr(e,t,o,Jo,a),a.delete(t)),e}function Xo(e){return is(e)?o:e}function ei(e,t,n,r,i,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&n?new qn:o;for(a.set(e,t),a.set(t,e);++p<u;){var v=e[p],g=t[p];if(r)var y=s?r(g,v,p,t,e,a):r(v,g,p,e,t,a);if(y!==o){if(y)continue;d=!1;break}if(h){if(!jt(t,(function(e,t){if(!Kt(h,t)&&(v===e||i(v,e,n,r,a)))return h.push(t)}))){d=!1;break}}else if(v!==g&&!i(v,g,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function ti(e){return Ni(Oi(e,o,Hi),e+"")}function ni(e){return xr(e,As,fi)}function ri(e){return xr(e,Is,pi)}var oi=jn?function(e){return jn.get(e)}:cu;function ii(e){for(var t=e.name+"",n=Cn[t],r=Ie.call(Cn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ai(e){return(Ie.call(Un,"placeholder")?Un:e).placeholder}function si(){var e=Un.iteratee||iu;return e=e===iu?Rr:e,arguments.length?e(arguments[0],arguments[1]):e}function ui(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ci(e){for(var t=As(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,xi(o)]}return t}function li(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Ir(n)?n:o}var fi=pn?function(e){return null==e?[]:(e=Se(e),Et(pn(e),(function(t){return et.call(e,t)})))}:gu,pi=pn?function(e){for(var t=[];e;)kt(t,fi(e)),e=He(e);return t}:gu,di=Sr;function hi(e,t,n){for(var r=-1,o=(t=mo(t,e)).length,i=!1;++r<o;){var a=Mi(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&es(o)&&yi(a,o)&&(Ka(e)||Wa(e))}function vi(e){return"function"!=typeof e.constructor||Ei(e)?{}:Fn(He(e))}function gi(e){return Ka(e)||Wa(e)||!!(ot&&e&&e[ot])}function yi(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function mi(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&yi(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function bi(e,t){if(Ka(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||X.test(e)||!J.test(e)||null!=t&&e in Se(t)}function wi(e){var t=ii(e),n=Un[t];if("function"!=typeof n||!(t in Vn.prototype))return!1;if(e===n)return!0;var r=oi(n);return!!r&&e===r[0]}(xn&&di(new xn(new ArrayBuffer(1)))!=A||Sn&&di(new Sn)!=E||On&&di(On.resolve())!=O||kn&&di(new kn)!=T||Tn&&di(new Tn)!=C)&&(di=function(e){var t=Sr(e),n=t==S?e.constructor:o,r=n?Ui(n):"";if(r)switch(r){case Nn:return A;case An:return E;case In:return O;case Rn:return T;case $n:return C}return t});var _i=Ne?Ja:yu;function Ei(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ce)}function xi(e){return e==e&&!ts(e)}function Si(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in Se(n))}}function Oi(e,t,n){return t=yn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=yn(o.length-t,0),s=r(a);++i<a;)s[i]=o[t+i];i=-1;for(var u=r(t+1);++i<t;)u[i]=o[i];return u[t]=n(s),yt(e,this,u)}}function ki(e,t){return t.length<2?e:Er(e,to(t,0,-1))}function Ti(e,t){for(var n=e.length,r=mn(t.length,n),i=Po(e);r--;){var a=t[r];e[r]=yi(a,n)?i[a]:o}return e}function Pi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ji=Ii(Jr),Ci=Mt||function(e,t){return it.setTimeout(e,t)},Ni=Ii(Xr);function Ai(e,t,n){var r=t+"";return Ni(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return bt(h,(function(n){var r="_."+n[0];t&n[1]&&!xt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function Ii(e){var t=0,n=0;return function(){var r=bn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ri(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=Hr(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var $i,Di,Li=($i=$a((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,o){t.push(r?o.replace(le,"$1"):n||e)})),t}),(function(e){return 500===Di.size&&Di.clear(),e})),Di=$i.cache,$i);function Mi(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ui(e){if(null!=e){try{return Ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fi(e){if(e instanceof Vn)return e.clone();var t=new zn(e.__wrapped__,e.__chain__);return t.__actions__=Po(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bi=Gr((function(e,t){return Ga(e)?lr(e,gr(t,1,Ga,!0)):[]})),zi=Gr((function(e,t){var n=Qi(t);return Ga(n)&&(n=o),Ga(e)?lr(e,gr(t,1,Ga,!0),si(n,2)):[]})),Vi=Gr((function(e,t){var n=Qi(t);return Ga(n)&&(n=o),Ga(e)?lr(e,gr(t,1,Ga,!0),o,n):[]}));function Wi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vs(n);return o<0&&(o=yn(r+o,0)),At(e,si(t,3),o)}function Ki(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=vs(n),i=n<0?yn(r+i,0):mn(i,r-1)),At(e,si(t,3),i,!0)}function Hi(e){return null!=e&&e.length?gr(e,1):[]}function qi(e){return e&&e.length?e[0]:o}var Gi=Gr((function(e){var t=Ot(e,go);return t.length&&t[0]===e[0]?Pr(t):[]})),Zi=Gr((function(e){var t=Qi(e),n=Ot(e,go);return t===Qi(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Pr(n,si(t,2)):[]})),Yi=Gr((function(e){var t=Qi(e),n=Ot(e,go);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Pr(n,o,t):[]}));function Qi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Ji=Gr(Xi);function Xi(e,t){return e&&e.length&&t&&t.length?Wr(e,t):e}var ea=ti((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Kr(e,Ot(t,(function(e){return yi(e,n)?+e:e})).sort(Oo)),r}));function ta(e){return null==e?e:En.call(e)}var na=Gr((function(e){return uo(gr(e,1,Ga,!0))})),ra=Gr((function(e){var t=Qi(e);return Ga(t)&&(t=o),uo(gr(e,1,Ga,!0),si(t,2))})),oa=Gr((function(e){var t=Qi(e);return t="function"==typeof t?t:o,uo(gr(e,1,Ga,!0),o,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Et(e,(function(e){if(Ga(e))return t=yn(e.length,t),!0})),Bt(t,(function(t){return Ot(e,Lt(t))}))}function aa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Ot(n,(function(e){return yt(t,o,e)}))}var sa=Gr((function(e,t){return Ga(e)?lr(e,t):[]})),ua=Gr((function(e){return ho(Et(e,Ga))})),ca=Gr((function(e){var t=Qi(e);return Ga(t)&&(t=o),ho(Et(e,Ga),si(t,2))})),la=Gr((function(e){var t=Qi(e);return t="function"==typeof t?t:o,ho(Et(e,Ga),o,t)})),fa=Gr(ia),pa=Gr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,aa(e,n)}));function da(e){var t=Un(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var va=ti((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vn&&yi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:o}),new zn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),ga=Co((function(e,t,n){Ie.call(e,n)?++e[n]:or(e,n,1)})),ya=Lo(Wi),ma=Lo(Ki);function ba(e,t){return(Ka(e)?bt:fr)(e,si(t,3))}function wa(e,t){return(Ka(e)?wt:pr)(e,si(t,3))}var _a=Co((function(e,t,n){Ie.call(e,n)?e[n].push(t):or(e,n,[t])})),Ea=Gr((function(e,t,n){var o=-1,i="function"==typeof t,a=qa(e)?r(e.length):[];return fr(e,(function(e){a[++o]=i?yt(t,e,n):jr(e,t,n)})),a})),xa=Co((function(e,t,n){or(e,n,t)}));function Sa(e,t){return(Ka(e)?Ot:Lr)(e,si(t,3))}var Oa=Co((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ka=Gr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&mi(e,t[0],t[1])?t=[]:n>2&&mi(t[0],t[1],t[2])&&(t=[t[0]]),zr(e,gr(t,1),[])})),Ta=Ct||function(){return it.Date.now()};function Pa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Yo(e,c,o,o,o,o,t)}function ja(e,t){var n;if("function"!=typeof t)throw new Te(i);return e=vs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ca=Gr((function(e,t,n){var r=1;if(n.length){var o=tn(n,ai(Ca));r|=u}return Yo(e,r,t,n,o)})),Na=Gr((function(e,t,n){var r=3;if(n.length){var o=tn(n,ai(Na));r|=u}return Yo(t,r,e,n,o)}));function Aa(e,t,n){var r,a,s,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new Te(i);function v(t){var n=r,i=a;return r=a=o,f=t,u=e.apply(i,n)}function g(e){return f=e,c=Ci(m,t),p?v(e):u}function y(e){var n=e-l;return l===o||n>=t||n<0||d&&e-f>=s}function m(){var e=Ta();if(y(e))return b(e);c=Ci(m,function(e){var n=t-(e-l);return d?mn(n,s-(e-f)):n}(e))}function b(e){return c=o,h&&r?v(e):(r=a=o,u)}function w(){var e=Ta(),n=y(e);if(r=arguments,a=this,l=e,n){if(c===o)return g(l);if(d)return _o(c),c=Ci(m,t),v(l)}return c===o&&(c=Ci(m,t)),u}return t=ys(t)||0,ts(n)&&(p=!!n.leading,s=(d="maxWait"in n)?yn(ys(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),w.cancel=function(){c!==o&&_o(c),f=0,r=l=a=c=o},w.flush=function(){return c===o?u:b(Ta())},w}var Ia=Gr((function(e,t){return cr(e,1,t)})),Ra=Gr((function(e,t,n){return cr(e,ys(t)||0,n)}));function $a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(i);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($a.Cache||Hn),n}function Da(e){if("function"!=typeof e)throw new Te(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}$a.Cache=Hn;var La=bo((function(e,t){var n=(t=1==t.length&&Ka(t[0])?Ot(t[0],Vt(si())):Ot(gr(t,1),Vt(si()))).length;return Gr((function(r){for(var o=-1,i=mn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return yt(e,this,r)}))})),Ma=Gr((function(e,t){var n=tn(t,ai(Ma));return Yo(e,u,o,t,n)})),Ua=Gr((function(e,t){var n=tn(t,ai(Ua));return Yo(e,64,o,t,n)})),Fa=ti((function(e,t){return Yo(e,256,o,o,o,t)}));function Ba(e,t){return e===t||e!=e&&t!=t}var za=Ko(Or),Va=Ko((function(e,t){return e>=t})),Wa=Cr(function(){return arguments}())?Cr:function(e){return ns(e)&&Ie.call(e,"callee")&&!et.call(e,"callee")},Ka=r.isArray,Ha=ft?Vt(ft):function(e){return ns(e)&&Sr(e)==N};function qa(e){return null!=e&&es(e.length)&&!Ja(e)}function Ga(e){return ns(e)&&qa(e)}var Za=dn||yu,Ya=pt?Vt(pt):function(e){return ns(e)&&Sr(e)==m};function Qa(e){if(!ns(e))return!1;var t=Sr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Ja(e){if(!ts(e))return!1;var t=Sr(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xa(e){return"number"==typeof e&&e==vs(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=dt?Vt(dt):function(e){return ns(e)&&di(e)==E};function os(e){return"number"==typeof e||ns(e)&&Sr(e)==x}function is(e){if(!ns(e)||Sr(e)!=S)return!1;var t=He(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ae.call(n)==Le}var as=ht?Vt(ht):function(e){return ns(e)&&Sr(e)==k},ss=vt?Vt(vt):function(e){return ns(e)&&di(e)==T};function us(e){return"string"==typeof e||!Ka(e)&&ns(e)&&Sr(e)==P}function cs(e){return"symbol"==typeof e||ns(e)&&Sr(e)==j}var ls=gt?Vt(gt):function(e){return ns(e)&&es(e.length)&&!!Je[Sr(e)]},fs=Ko(Dr),ps=Ko((function(e,t){return e<=t}));function ds(e){if(!e)return[];if(qa(e))return us(e)?an(e):Po(e);if(at&&e[at])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[at]());var t=di(e);return(t==E?Xt:t==T?nn:Bs)(e)}function hs(e){return e?(e=ys(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function vs(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?ar(vs(e),0,d):0}function ys(e){if("number"==typeof e)return e;if(cs(e))return p;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=zt(e);var n=he.test(e);return n||ge.test(e)?nt(e.slice(2),n?2:8):de.test(e)?p:+e}function ms(e){return jo(e,Is(e))}function bs(e){return null==e?"":so(e)}var ws=No((function(e,t){if(Ei(t)||qa(t))jo(t,As(t),e);else for(var n in t)Ie.call(t,n)&&er(e,n,t[n])})),_s=No((function(e,t){jo(t,Is(t),e)})),Es=No((function(e,t,n,r){jo(t,Is(t),e,r)})),xs=No((function(e,t,n,r){jo(t,As(t),e,r)})),Ss=ti(ir),Os=Gr((function(e,t){e=Se(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&mi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],s=Is(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===o||Ba(f,Ce[l])&&!Ie.call(e,l))&&(e[l]=a[l])}return e})),ks=Gr((function(e){return e.push(o,Jo),yt($s,o,e)}));function Ts(e,t,n){var r=null==e?o:Er(e,t);return r===o?n:r}function Ps(e,t){return null!=e&&hi(e,t,Tr)}var js=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=n}),tu(ou)),Cs=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),Ie.call(e,t)?e[t].push(n):e[t]=[n]}),si),Ns=Gr(jr);function As(e){return qa(e)?Zn(e):$r(e)}function Is(e){return qa(e)?Zn(e,!0):function(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in Se(e))t.push(n);return t}(e);var t=Ei(e),n=[];for(var r in e)("constructor"!=r||!t&&Ie.call(e,r))&&n.push(r);return n}(e)}var Rs=No((function(e,t,n){Fr(e,t,n)})),$s=No((function(e,t,n,r){Fr(e,t,n,r)})),Ds=ti((function(e,t){var n={};if(null==e)return n;var r=!1;t=Ot(t,(function(t){return t=mo(t,e),r||(r=t.length>1),t})),jo(e,ri(e),n),r&&(n=sr(n,7,Xo));for(var o=t.length;o--;)co(n,t[o]);return n})),Ls=ti((function(e,t){return null==e?{}:function(e,t){return Vr(e,t,(function(t,n){return Ps(e,n)}))}(e,t)}));function Ms(e,t){if(null==e)return{};var n=Ot(ri(e),(function(e){return[e]}));return t=si(t),Vr(e,n,(function(e,n){return t(e,n[0])}))}var Us=Zo(As),Fs=Zo(Is);function Bs(e){return null==e?[]:Wt(e,As(e))}var zs=$o((function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)}));function Vs(e){return Qs(bs(e).toLowerCase())}function Ws(e){return(e=bs(e))&&e.replace(me,Zt).replace(Ke,"")}var Ks=$o((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Hs=$o((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qs=Ro("toLowerCase"),Gs=$o((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Zs=$o((function(e,t,n){return e+(n?" ":"")+Qs(t)})),Ys=$o((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qs=Ro("toUpperCase");function Js(e,t,n){return e=bs(e),(t=n?o:t)===o?function(e){return Ze.test(e)}(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xs=Gr((function(e,t){try{return yt(e,o,t)}catch(e){return Qa(e)?e:new _e(e)}})),eu=ti((function(e,t){return bt(t,(function(t){t=Mi(t),or(e,t,Ca(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Mo(),ru=Mo(!0);function ou(e){return e}function iu(e){return Rr("function"==typeof e?e:sr(e,1))}var au=Gr((function(e,t){return function(n){return jr(n,e,t)}})),su=Gr((function(e,t){return function(n){return jr(e,n,t)}}));function uu(e,t,n){var r=As(t),o=_r(t,r);null!=n||ts(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=_r(t,As(t)));var i=!(ts(n)&&"chain"in n&&!n.chain),a=Ja(e);return bt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=Po(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,kt([this.value()],arguments))})})),e}function cu(){}var lu=zo(Ot),fu=zo(_t),pu=zo(jt);function du(e){return bi(e)?Lt(Mi(e)):function(e){return function(t){return Er(t,e)}}(e)}var hu=Wo(),vu=Wo(!0);function gu(){return[]}function yu(){return!1}var mu,bu=Bo((function(e,t){return e+t}),0),wu=qo("ceil"),_u=Bo((function(e,t){return e/t}),1),Eu=qo("floor"),xu=Bo((function(e,t){return e*t}),1),Su=qo("round"),Ou=Bo((function(e,t){return e-t}),0);return Un.after=function(e,t){if("function"!=typeof t)throw new Te(i);return e=vs(e),function(){if(--e<1)return t.apply(this,arguments)}},Un.ary=Pa,Un.assign=ws,Un.assignIn=_s,Un.assignInWith=Es,Un.assignWith=xs,Un.at=Ss,Un.before=ja,Un.bind=Ca,Un.bindAll=eu,Un.bindKey=Na,Un.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ka(e)?e:[e]},Un.chain=da,Un.chunk=function(e,t,n){t=(n?mi(e,t,n):t===o)?1:yn(vs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=r(ln(i/t));a<i;)u[s++]=to(e,a,a+=t);return u},Un.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Un.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return kt(Ka(n)?Po(n):[n],gr(t,1))},Un.cond=function(e){var t=null==e?0:e.length,n=si();return e=t?Ot(e,(function(e){if("function"!=typeof e[1])throw new Te(i);return[n(e[0]),e[1]]})):[],Gr((function(n){for(var r=-1;++r<t;){var o=e[r];if(yt(o[0],this,n))return yt(o[1],this,n)}}))},Un.conforms=function(e){return function(e){var t=As(e);return function(n){return ur(n,e,t)}}(sr(e,1))},Un.constant=tu,Un.countBy=ga,Un.create=function(e,t){var n=Fn(e);return null==t?n:rr(n,t)},Un.curry=function e(t,n,r){var i=Yo(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Un.curryRight=function e(t,n,r){var i=Yo(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Un.debounce=Aa,Un.defaults=Os,Un.defaultsDeep=ks,Un.defer=Ia,Un.delay=Ra,Un.difference=Bi,Un.differenceBy=zi,Un.differenceWith=Vi,Un.drop=function(e,t,n){var r=null==e?0:e.length;return r?to(e,(t=n||t===o?1:vs(t))<0?0:t,r):[]},Un.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?to(e,0,(t=r-(t=n||t===o?1:vs(t)))<0?0:t):[]},Un.dropRightWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!0,!0):[]},Un.dropWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!0):[]},Un.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&mi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=vs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:vs(r))<0&&(r+=i),r=n>r?0:gs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Un.filter=function(e,t){return(Ka(e)?Et:vr)(e,si(t,3))},Un.flatMap=function(e,t){return gr(Sa(e,t),1)},Un.flatMapDeep=function(e,t){return gr(Sa(e,t),l)},Un.flatMapDepth=function(e,t,n){return n=n===o?1:vs(n),gr(Sa(e,t),n)},Un.flatten=Hi,Un.flattenDeep=function(e){return null!=e&&e.length?gr(e,l):[]},Un.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===o?1:vs(t)):[]},Un.flip=function(e){return Yo(e,512)},Un.flow=nu,Un.flowRight=ru,Un.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Un.functions=function(e){return null==e?[]:_r(e,As(e))},Un.functionsIn=function(e){return null==e?[]:_r(e,Is(e))},Un.groupBy=_a,Un.initial=function(e){return null!=e&&e.length?to(e,0,-1):[]},Un.intersection=Gi,Un.intersectionBy=Zi,Un.intersectionWith=Yi,Un.invert=js,Un.invertBy=Cs,Un.invokeMap=Ea,Un.iteratee=iu,Un.keyBy=xa,Un.keys=As,Un.keysIn=Is,Un.map=Sa,Un.mapKeys=function(e,t){var n={};return t=si(t,3),br(e,(function(e,r,o){or(n,t(e,r,o),e)})),n},Un.mapValues=function(e,t){var n={};return t=si(t,3),br(e,(function(e,r,o){or(n,r,t(e,r,o))})),n},Un.matches=function(e){return Mr(sr(e,1))},Un.matchesProperty=function(e,t){return Ur(e,sr(t,1))},Un.memoize=$a,Un.merge=Rs,Un.mergeWith=$s,Un.method=au,Un.methodOf=su,Un.mixin=uu,Un.negate=Da,Un.nthArg=function(e){return e=vs(e),Gr((function(t){return Br(t,e)}))},Un.omit=Ds,Un.omitBy=function(e,t){return Ms(e,Da(si(t)))},Un.once=function(e){return ja(2,e)},Un.orderBy=function(e,t,n,r){return null==e?[]:(Ka(t)||(t=null==t?[]:[t]),Ka(n=r?o:n)||(n=null==n?[]:[n]),zr(e,t,n))},Un.over=lu,Un.overArgs=La,Un.overEvery=fu,Un.overSome=pu,Un.partial=Ma,Un.partialRight=Ua,Un.partition=Oa,Un.pick=Ls,Un.pickBy=Ms,Un.property=du,Un.propertyOf=function(e){return function(t){return null==e?o:Er(e,t)}},Un.pull=Ji,Un.pullAll=Xi,Un.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,si(n,2)):e},Un.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,o,n):e},Un.pullAt=ea,Un.range=hu,Un.rangeRight=vu,Un.rearg=Fa,Un.reject=function(e,t){return(Ka(e)?Et:vr)(e,Da(si(t,3)))},Un.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=si(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Kr(e,o),n},Un.rest=function(e,t){if("function"!=typeof e)throw new Te(i);return Gr(e,t=t===o?t:vs(t))},Un.reverse=ta,Un.sampleSize=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:vs(t),(Ka(e)?Qn:Yr)(e,t)},Un.set=function(e,t,n){return null==e?e:Qr(e,t,n)},Un.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Qr(e,t,n,r)},Un.shuffle=function(e){return(Ka(e)?Jn:eo)(e)},Un.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&mi(e,t,n)?(t=0,n=r):(t=null==t?0:vs(t),n=n===o?r:vs(n)),to(e,t,n)):[]},Un.sortBy=ka,Un.sortedUniq=function(e){return e&&e.length?io(e):[]},Un.sortedUniqBy=function(e,t){return e&&e.length?io(e,si(t,2)):[]},Un.split=function(e,t,n){return n&&"number"!=typeof n&&mi(e,t,n)&&(t=n=o),(n=n===o?d:n>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=so(t))&&Jt(e)?wo(an(e),0,n):e.split(t,n):[]},Un.spread=function(e,t){if("function"!=typeof e)throw new Te(i);return t=null==t?0:yn(vs(t),0),Gr((function(n){var r=n[t],o=wo(n,0,t);return r&&kt(o,r),yt(e,this,o)}))},Un.tail=function(e){var t=null==e?0:e.length;return t?to(e,1,t):[]},Un.take=function(e,t,n){return e&&e.length?to(e,0,(t=n||t===o?1:vs(t))<0?0:t):[]},Un.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?to(e,(t=r-(t=n||t===o?1:vs(t)))<0?0:t,r):[]},Un.takeRightWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!1,!0):[]},Un.takeWhile=function(e,t){return e&&e.length?fo(e,si(t,3)):[]},Un.tap=function(e,t){return t(e),e},Un.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Te(i);return ts(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Aa(e,t,{leading:r,maxWait:t,trailing:o})},Un.thru=ha,Un.toArray=ds,Un.toPairs=Us,Un.toPairsIn=Fs,Un.toPath=function(e){return Ka(e)?Ot(e,Mi):cs(e)?[e]:Po(Li(bs(e)))},Un.toPlainObject=ms,Un.transform=function(e,t,n){var r=Ka(e),o=r||Za(e)||ls(e);if(t=si(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:ts(e)&&Ja(i)?Fn(He(e)):{}}return(o?bt:br)(e,(function(e,r,o){return t(n,e,r,o)})),n},Un.unary=function(e){return Pa(e,1)},Un.union=na,Un.unionBy=ra,Un.unionWith=oa,Un.uniq=function(e){return e&&e.length?uo(e):[]},Un.uniqBy=function(e,t){return e&&e.length?uo(e,si(t,2)):[]},Un.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?uo(e,o,t):[]},Un.unset=function(e,t){return null==e||co(e,t)},Un.unzip=ia,Un.unzipWith=aa,Un.update=function(e,t,n){return null==e?e:lo(e,t,yo(n))},Un.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:lo(e,t,yo(n),r)},Un.values=Bs,Un.valuesIn=function(e){return null==e?[]:Wt(e,Is(e))},Un.without=sa,Un.words=Js,Un.wrap=function(e,t){return Ma(yo(t),e)},Un.xor=ua,Un.xorBy=ca,Un.xorWith=la,Un.zip=fa,Un.zipObject=function(e,t){return vo(e||[],t||[],er)},Un.zipObjectDeep=function(e,t){return vo(e||[],t||[],Qr)},Un.zipWith=pa,Un.entries=Us,Un.entriesIn=Fs,Un.extend=_s,Un.extendWith=Es,uu(Un,Un),Un.add=bu,Un.attempt=Xs,Un.camelCase=zs,Un.capitalize=Vs,Un.ceil=wu,Un.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=ys(n))==n?n:0),t!==o&&(t=(t=ys(t))==t?t:0),ar(ys(e),t,n)},Un.clone=function(e){return sr(e,4)},Un.cloneDeep=function(e){return sr(e,5)},Un.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:o)},Un.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:o)},Un.conformsTo=function(e,t){return null==t||ur(e,t,As(t))},Un.deburr=Ws,Un.defaultTo=function(e,t){return null==e||e!=e?t:e},Un.divide=_u,Un.endsWith=function(e,t,n){e=bs(e),t=so(t);var r=e.length,i=n=n===o?r:ar(vs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Un.eq=Ba,Un.escape=function(e){return(e=bs(e))&&G.test(e)?e.replace(H,Yt):e},Un.escapeRegExp=function(e){return(e=bs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Un.every=function(e,t,n){var r=Ka(e)?_t:dr;return n&&mi(e,t,n)&&(t=o),r(e,si(t,3))},Un.find=ya,Un.findIndex=Wi,Un.findKey=function(e,t){return Nt(e,si(t,3),br)},Un.findLast=ma,Un.findLastIndex=Ki,Un.findLastKey=function(e,t){return Nt(e,si(t,3),wr)},Un.floor=Eu,Un.forEach=ba,Un.forEachRight=wa,Un.forIn=function(e,t){return null==e?e:yr(e,si(t,3),Is)},Un.forInRight=function(e,t){return null==e?e:mr(e,si(t,3),Is)},Un.forOwn=function(e,t){return e&&br(e,si(t,3))},Un.forOwnRight=function(e,t){return e&&wr(e,si(t,3))},Un.get=Ts,Un.gt=za,Un.gte=Va,Un.has=function(e,t){return null!=e&&hi(e,t,kr)},Un.hasIn=Ps,Un.head=qi,Un.identity=ou,Un.includes=function(e,t,n,r){e=qa(e)?e:Bs(e),n=n&&!r?vs(n):0;var o=e.length;return n<0&&(n=yn(o+n,0)),us(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&It(e,t,n)>-1},Un.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vs(n);return o<0&&(o=yn(r+o,0)),It(e,t,o)},Un.inRange=function(e,t,n){return t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n){return e>=mn(t,n)&&e<yn(t,n)}(e=ys(e),t,n)},Un.invoke=Ns,Un.isArguments=Wa,Un.isArray=Ka,Un.isArrayBuffer=Ha,Un.isArrayLike=qa,Un.isArrayLikeObject=Ga,Un.isBoolean=function(e){return!0===e||!1===e||ns(e)&&Sr(e)==y},Un.isBuffer=Za,Un.isDate=Ya,Un.isElement=function(e){return ns(e)&&1===e.nodeType&&!is(e)},Un.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ka(e)||"string"==typeof e||"function"==typeof e.splice||Za(e)||ls(e)||Wa(e)))return!e.length;var t=di(e);if(t==E||t==T)return!e.size;if(Ei(e))return!$r(e).length;for(var n in e)if(Ie.call(e,n))return!1;return!0},Un.isEqual=function(e,t){return Nr(e,t)},Un.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Nr(e,t,o,n):!!r},Un.isError=Qa,Un.isFinite=function(e){return"number"==typeof e&&hn(e)},Un.isFunction=Ja,Un.isInteger=Xa,Un.isLength=es,Un.isMap=rs,Un.isMatch=function(e,t){return e===t||Ar(e,t,ci(t))},Un.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Ar(e,t,ci(t),n)},Un.isNaN=function(e){return os(e)&&e!=+e},Un.isNative=function(e){if(_i(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ir(e)},Un.isNil=function(e){return null==e},Un.isNull=function(e){return null===e},Un.isNumber=os,Un.isObject=ts,Un.isObjectLike=ns,Un.isPlainObject=is,Un.isRegExp=as,Un.isSafeInteger=function(e){return Xa(e)&&e>=-9007199254740991&&e<=f},Un.isSet=ss,Un.isString=us,Un.isSymbol=cs,Un.isTypedArray=ls,Un.isUndefined=function(e){return e===o},Un.isWeakMap=function(e){return ns(e)&&di(e)==C},Un.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==Sr(e)},Un.join=function(e,t){return null==e?"":vn.call(e,t)},Un.kebabCase=Ks,Un.last=Qi,Un.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=vs(n))<0?yn(r+i,0):mn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):At(e,$t,i,!0)},Un.lowerCase=Hs,Un.lowerFirst=qs,Un.lt=fs,Un.lte=ps,Un.max=function(e){return e&&e.length?hr(e,ou,Or):o},Un.maxBy=function(e,t){return e&&e.length?hr(e,si(t,2),Or):o},Un.mean=function(e){return Dt(e,ou)},Un.meanBy=function(e,t){return Dt(e,si(t,2))},Un.min=function(e){return e&&e.length?hr(e,ou,Dr):o},Un.minBy=function(e,t){return e&&e.length?hr(e,si(t,2),Dr):o},Un.stubArray=gu,Un.stubFalse=yu,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=xu,Un.nth=function(e,t){return e&&e.length?Br(e,vs(t)):o},Un.noConflict=function(){return it._===this&&(it._=Me),this},Un.noop=cu,Un.now=Ta,Un.pad=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Vo(fn(o),n)+e+Vo(ln(o),n)},Un.padEnd=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?e+Vo(t-r,n):e},Un.padStart=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?Vo(t-r,n)+e:e},Un.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(bs(e).replace(re,""),t||0)},Un.random=function(e,t,n){if(n&&"boolean"!=typeof n&&mi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=hs(e),t===o?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=_n();return mn(e+i*(t-e+tt("1e-"+((i+"").length-1))),t)}return Hr(e,t)},Un.reduce=function(e,t,n){var r=Ka(e)?Tt:Ut,o=arguments.length<3;return r(e,si(t,4),n,o,fr)},Un.reduceRight=function(e,t,n){var r=Ka(e)?Pt:Ut,o=arguments.length<3;return r(e,si(t,4),n,o,pr)},Un.repeat=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:vs(t),qr(bs(e),t)},Un.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Un.result=function(e,t,n){var r=-1,i=(t=mo(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[Mi(t[r])];a===o&&(r=i,a=n),e=Ja(a)?a.call(e):a}return e},Un.round=Su,Un.runInContext=e,Un.sample=function(e){return(Ka(e)?Yn:Zr)(e)},Un.size=function(e){if(null==e)return 0;if(qa(e))return us(e)?on(e):e.length;var t=di(e);return t==E||t==T?e.size:$r(e).length},Un.snakeCase=Gs,Un.some=function(e,t,n){var r=Ka(e)?jt:no;return n&&mi(e,t,n)&&(t=o),r(e,si(t,3))},Un.sortedIndex=function(e,t){return ro(e,t)},Un.sortedIndexBy=function(e,t,n){return oo(e,t,si(n,2))},Un.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ro(e,t);if(r<n&&Ba(e[r],t))return r}return-1},Un.sortedLastIndex=function(e,t){return ro(e,t,!0)},Un.sortedLastIndexBy=function(e,t,n){return oo(e,t,si(n,2),!0)},Un.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ro(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},Un.startCase=Zs,Un.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:ar(vs(n),0,e.length),t=so(t),e.slice(n,n+t.length)==t},Un.subtract=Ou,Un.sum=function(e){return e&&e.length?Ft(e,ou):0},Un.sumBy=function(e,t){return e&&e.length?Ft(e,si(t,2)):0},Un.template=function(e,t,n){var r=Un.templateSettings;n&&mi(e,t,n)&&(t=o),e=bs(e),t=Es({},t,r,Qo);var i,a,s=Es({},t.imports,r.imports,Qo),u=As(s),c=Wt(s,u),l=0,f=t.interpolate||be,p="__p += '",d=Oe((t.escape||be).source+"|"+f.source+"|"+(f===Q?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),h="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Qe+"]")+"\n";e.replace(d,(function(t,n,r,o,s,u){return r||(r=o),p+=e.slice(l,u).replace(we,Qt),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var v=Ie.call(t,"variable")&&t.variable;if(v){if(ce.test(v))throw new _e("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(z,""):p).replace(V,"$1").replace(W,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Xs((function(){return Ee(u,h+"return "+p).apply(o,c)}));if(g.source=p,Qa(g))throw g;return g},Un.times=function(e,t){if((e=vs(e))<1||e>f)return[];var n=d,r=mn(e,d);t=si(t),e-=d;for(var o=Bt(r,t);++n<e;)t(n);return o},Un.toFinite=hs,Un.toInteger=vs,Un.toLength=gs,Un.toLower=function(e){return bs(e).toLowerCase()},Un.toNumber=ys,Un.toSafeInteger=function(e){return e?ar(vs(e),-9007199254740991,f):0===e?e:0},Un.toString=bs,Un.toUpper=function(e){return bs(e).toUpperCase()},Un.trim=function(e,t,n){if((e=bs(e))&&(n||t===o))return zt(e);if(!e||!(t=so(t)))return e;var r=an(e),i=an(t);return wo(r,Ht(r,i),qt(r,i)+1).join("")},Un.trimEnd=function(e,t,n){if((e=bs(e))&&(n||t===o))return e.slice(0,sn(e)+1);if(!e||!(t=so(t)))return e;var r=an(e);return wo(r,0,qt(r,an(t))+1).join("")},Un.trimStart=function(e,t,n){if((e=bs(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=so(t)))return e;var r=an(e);return wo(r,Ht(r,an(t))).join("")},Un.truncate=function(e,t){var n=30,r="...";if(ts(t)){var i="separator"in t?t.separator:i;n="length"in t?vs(t.length):n,r="omission"in t?so(t.omission):r}var a=(e=bs(e)).length;if(Jt(e)){var s=an(e);a=s.length}if(n>=a)return e;var u=n-on(r);if(u<1)return r;var c=s?wo(s,0,u).join(""):e.slice(0,u);if(i===o)return c+r;if(s&&(u+=c.length-u),as(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=Oe(i.source,bs(pe.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;c=c.slice(0,p===o?u:p)}}else if(e.indexOf(so(i),u)!=u){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r},Un.unescape=function(e){return(e=bs(e))&&q.test(e)?e.replace(K,un):e},Un.uniqueId=function(e){var t=++Re;return bs(e)+t},Un.upperCase=Ys,Un.upperFirst=Qs,Un.each=ba,Un.eachRight=wa,Un.first=qi,uu(Un,(mu={},br(Un,(function(e,t){Ie.call(Un.prototype,t)||(mu[t]=e)})),mu),{chain:!1}),Un.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Un[e].placeholder=Un})),bt(["drop","take"],(function(e,t){Vn.prototype[e]=function(n){n=n===o?1:yn(vs(n),0);var r=this.__filtered__&&!t?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:si(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(ou)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=Gr((function(e,t){return"function"==typeof e?new Vn(this):this.map((function(n){return jr(n,e,t)}))})),Vn.prototype.reject=function(e){return this.filter(Da(si(e)))},Vn.prototype.slice=function(e,t){e=vs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=vs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(d)},br(Vn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Un[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Un.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Vn,c=s[0],l=u||Ka(t),f=function(e){var t=i.apply(Un,kt([e],s));return r&&p?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,v=u&&!d;if(!a&&l){t=v?t:new Vn(this);var g=e.apply(t,s);return g.__actions__.push({func:ha,args:[f],thisArg:o}),new zn(g,p)}return h&&v?e.apply(this,s):(g=this.thru(f),h?r?g.value()[0]:g.value():g)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Un.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ka(o)?o:[],e)}return this[n]((function(n){return t.apply(Ka(n)?n:[],e)}))}})),br(Vn.prototype,(function(e,t){var n=Un[t];if(n){var r=n.name+"";Ie.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:t,func:n})}})),Cn[Uo(o,2).name]=[{name:"wrapper",func:o}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=Po(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Po(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Po(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ka(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mn(t,e+a);break;case"takeRight":e=yn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,d=mn(u,this.__takeCount__);if(!n||!r&&o==u&&d==u)return po(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var v=-1,g=e[c+=t];++v<f;){var y=l[v],m=y.iteratee,b=y.type,w=m(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}h[p++]=g}return h},Un.prototype.at=va,Un.prototype.chain=function(){return da(this)},Un.prototype.commit=function(){return new zn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===o&&(this.__values__=ds(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Un.prototype.plant=function(e){for(var t,n=this;n instanceof Bn;){var r=Fi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Un.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:o}),new zn(t,this.__chain__)}return this.thru(ta)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return po(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,at&&(Un.prototype[at]=function(){return this}),Un}();it._=cn,(r=function(){return cn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},651:(e,t,n)=>{!function(t){var n=function(e){return o(!0===e,!1,arguments)};function r(e,t){if("object"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function o(e,t,o){var a=o[0],s=o.length;(e||"object"!==i(a))&&(a={});for(var u=0;u<s;++u){var c=o[u];if("object"===i(c))for(var l in c)if("__proto__"!==l){var f=e?n.clone(c[l]):c[l];a[l]=t?r(a[l],f):f}}return a}function i(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return o(!0===e,!0,arguments)},n.clone=function(e){var t,r,o=e,a=i(e);if("array"===a)for(o=[],r=e.length,t=0;t<r;++t)o[t]=n.clone(e[t]);else if("object"===a)for(t in o={},e)o[t]=n.clone(e[t]);return o},t?e.exports=n:window.merge=n}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},4516:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,u=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))n.call(a,l)&&(u[l]=a[l]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},3975:(e,t,n)=>{"use strict";var r=n(2735),o=n(4516),i=n(9146);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(e,t,n,r,o,i,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var u=!1,c=null,l=!1,f=null,p={onError:function(e){u=!0,c=e}};function d(e,t,n,r,o,i,a,l,f){u=!1,c=null,s.apply(p,arguments)}var h=null,v=null,g=null;function y(e,t,n){var r=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,r,o,i,s,p,h){if(d.apply(this,arguments),u){if(!u)throw Error(a(198));var v=c;u=!1,c=null,l||(l=!0,f=v)}}(r,t,void 0,e),e.currentTarget=null}var m=null,b={};function w(){if(m)for(var e in b){var t=b[e],n=m.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!E[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in E[n]=t,n=t.eventTypes){var o=void 0,i=n[r],s=t,u=r;if(x.hasOwnProperty(u))throw Error(a(99,u));x[u]=i;var c=i.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&_(c[o],s,u);o=!0}else i.registrationName?(_(i.registrationName,s,u),o=!0):o=!1;if(!o)throw Error(a(98,r,e))}}}}function _(e,t,n){if(S[e])throw Error(a(100,e));S[e]=t,O[e]=t.eventTypes[n].dependencies}var E=[],x={},S={},O={};function k(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var T=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),P=null,j=null,C=null;function N(e){if(e=v(e)){if("function"!=typeof P)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),P(e.stateNode,e.type,t))}}function A(e){j?C?C.push(e):C=[e]:j=e}function I(){if(j){var e=j,t=C;if(C=j=null,N(e),t)for(e=0;e<t.length;e++)N(t[e])}}function R(e,t){return e(t)}function $(e,t,n,r,o){return e(t,n,r,o)}function D(){}var L=R,M=!1,U=!1;function F(){null===j&&null===C||(D(),I())}function B(e,t,n){if(U)return e(t,n);U=!0;try{return L(e,t,n)}finally{U=!1,F()}}var z=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,V=Object.prototype.hasOwnProperty,W={},K={};function H(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){q[e]=new H(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];q[t]=new H(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){q[e]=new H(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){q[e]=new H(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){q[e]=new H(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){q[e]=new H(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){q[e]=new H(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){q[e]=new H(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){q[e]=new H(e,5,!1,e.toLowerCase(),null,!1)}));var G=/[\-:]([a-z])/g;function Z(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(G,Z);q[t]=new H(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(G,Z);q[t]=new H(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(G,Z);q[t]=new H(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){q[e]=new H(e,1,!1,e.toLowerCase(),null,!1)})),q.xlinkHref=new H("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){q[e]=new H(e,1,!1,e.toLowerCase(),null,!0)}));var Y=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Q(e,t,n,r){var o=q.hasOwnProperty(t)?q[t]:null;(null!==o?0===o.type:!r&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!V.call(K,e)||!V.call(W,e)&&(z.test(e)?K[e]=!0:(W[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}Y.hasOwnProperty("ReactCurrentDispatcher")||(Y.ReactCurrentDispatcher={current:null}),Y.hasOwnProperty("ReactCurrentBatchConfig")||(Y.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,X="function"==typeof Symbol&&Symbol.for,ee=X?Symbol.for("react.element"):60103,te=X?Symbol.for("react.portal"):60106,ne=X?Symbol.for("react.fragment"):60107,re=X?Symbol.for("react.strict_mode"):60108,oe=X?Symbol.for("react.profiler"):60114,ie=X?Symbol.for("react.provider"):60109,ae=X?Symbol.for("react.context"):60110,se=X?Symbol.for("react.concurrent_mode"):60111,ue=X?Symbol.for("react.forward_ref"):60112,ce=X?Symbol.for("react.suspense"):60113,le=X?Symbol.for("react.suspense_list"):60120,fe=X?Symbol.for("react.memo"):60115,pe=X?Symbol.for("react.lazy"):60116,de=X?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;function ve(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case oe:return"Profiler";case re:return"StrictMode";case ce:return"Suspense";case le:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case ue:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ge(e.type);case de:return ge(e.render);case pe:if(e=1===e._status?e._result:null)return ge(e)}return null}function ye(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=ge(e.type);n=null,r&&(n=ge(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(J,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function me(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function _e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ee(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function xe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=me(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Se(e,t){null!=(t=t.checked)&&Q(e,"checked",t,!1)}function Oe(e,t){Se(e,t);var n=me(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Te(e,t.type,n):t.hasOwnProperty("defaultValue")&&Te(e,t.type,me(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ke(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Te(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Pe(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function je(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+me(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Ce(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ne(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:me(n)}}function Ae(e,t){var n=me(t.value),r=me(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Re(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $e(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Re(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var De,Le,Me=(Le=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((De=De||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=De.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return Le(e,t)}))}:Le);function Ue(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Fe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:Fe("Animation","AnimationEnd"),animationiteration:Fe("Animation","AnimationIteration"),animationstart:Fe("Animation","AnimationStart"),transitionend:Fe("Transition","TransitionEnd")},ze={},Ve={};function We(e){if(ze[e])return ze[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ve)return ze[e]=n[t];return e}T&&(Ve=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);var Ke=We("animationend"),He=We("animationiteration"),qe=We("animationstart"),Ge=We("transitionend"),Ze="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ye=new("function"==typeof WeakMap?WeakMap:Map);function Qe(e){var t=Ye.get(e);return void 0===t&&(t=new Map,Ye.set(e,t)),t}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function et(e){if(Je(e)!==e)throw Error(a(188))}function tt(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return et(o),e;if(i===r)return et(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function nt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function rt(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var ot=null;function it(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)y(e,t[r],n[r]);else t&&y(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function at(e){if(null!==e&&(ot=nt(ot,e)),e=ot,ot=null,e){if(rt(e,it),ot)throw Error(a(95));if(l)throw e=f,l=!1,f=null,e}}function st(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ut(e){if(!T)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var ct=[];function lt(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ct.length&&ct.push(e)}function ft(e,t,n,r){if(ct.length){var o=ct.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=jn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=st(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,u=0;u<E.length;u++){var c=E[u];c&&(c=c.extractEvents(r,t,i,o,a))&&(s=nt(s,c))}at(s)}}function dt(e,t,n){if(!n.has(e)){switch(e){case"scroll":qt(t,"scroll",!0);break;case"focus":case"blur":qt(t,"focus",!0),qt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ut(e)&&qt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ze.indexOf(e)&&Ht(e,t)}n.set(e,null)}}var ht,vt,gt,yt=!1,mt=[],bt=null,wt=null,_t=null,Et=new Map,xt=new Map,St=[],Ot="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),kt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Tt(e,t,n,r,o){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:o,container:r}}function Pt(e,t){switch(e){case"focus":case"blur":bt=null;break;case"dragenter":case"dragleave":wt=null;break;case"mouseover":case"mouseout":_t=null;break;case"pointerover":case"pointerout":Et.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xt.delete(t.pointerId)}}function jt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=Tt(t,n,r,o,i),null!==t&&null!==(t=Cn(t))&&vt(t),e):(e.eventSystemFlags|=r,e)}function Ct(e){var t=jn(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){gt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;var t=Qt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Cn(t);return null!==n&&vt(n),e.blockedOn=t,!1}return!0}function At(e,t,n){Nt(e)&&n.delete(t)}function It(){for(yt=!1;0<mt.length;){var e=mt[0];if(null!==e.blockedOn){null!==(e=Cn(e.blockedOn))&&ht(e);break}var t=Qt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:mt.shift()}null!==bt&&Nt(bt)&&(bt=null),null!==wt&&Nt(wt)&&(wt=null),null!==_t&&Nt(_t)&&(_t=null),Et.forEach(At),xt.forEach(At)}function Rt(e,t){e.blockedOn===t&&(e.blockedOn=null,yt||(yt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,It)))}function $t(e){function t(t){return Rt(t,e)}if(0<mt.length){Rt(mt[0],e);for(var n=1;n<mt.length;n++){var r=mt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==bt&&Rt(bt,e),null!==wt&&Rt(wt,e),null!==_t&&Rt(_t,e),Et.forEach(t),xt.forEach(t),n=0;n<St.length;n++)(r=St[n]).blockedOn===e&&(r.blockedOn=null);for(;0<St.length&&null===(n=St[0]).blockedOn;)Ct(n),null===n.blockedOn&&St.shift()}var Dt={},Lt=new Map,Mt=new Map,Ut=["abort","abort",Ke,"animationEnd",He,"animationIteration",qe,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ge,"transitionEnd","waiting","waiting"];function Ft(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},Mt.set(r,t),Lt.set(r,i),Dt[o]=i}}Ft("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ft("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ft(Ut,2);for(var Bt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),zt=0;zt<Bt.length;zt++)Mt.set(Bt[zt],0);var Vt=i.unstable_UserBlockingPriority,Wt=i.unstable_runWithPriority,Kt=!0;function Ht(e,t){qt(t,e,!1)}function qt(e,t,n){var r=Mt.get(t);switch(void 0===r?2:r){case 0:r=Gt.bind(null,t,1,e);break;case 1:r=Zt.bind(null,t,1,e);break;default:r=Yt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Gt(e,t,n,r){M||D();var o=Yt,i=M;M=!0;try{$(o,e,t,n,r)}finally{(M=i)||F()}}function Zt(e,t,n,r){Wt(Vt,Yt.bind(null,e,t,n,r))}function Yt(e,t,n,r){if(Kt)if(0<mt.length&&-1<Ot.indexOf(e))e=Tt(null,e,t,n,r),mt.push(e);else{var o=Qt(e,t,n,r);if(null===o)Pt(e,r);else if(-1<Ot.indexOf(e))e=Tt(o,e,t,n,r),mt.push(e);else if(!function(e,t,n,r,o){switch(t){case"focus":return bt=jt(bt,e,t,n,r,o),!0;case"dragenter":return wt=jt(wt,e,t,n,r,o),!0;case"mouseover":return _t=jt(_t,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Et.set(i,jt(Et.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,xt.set(i,jt(xt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r)){Pt(e,r),e=ft(e,r,null,t);try{B(pt,e)}finally{lt(e)}}}}function Qt(e,t,n,r){if(null!==(n=jn(n=st(r)))){var o=Je(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=Xe(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}e=ft(e,r,n,t);try{B(pt,e)}finally{lt(e)}return null}var Jt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xt=["Webkit","ms","Moz","O"];function en(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Jt.hasOwnProperty(e)&&Jt[e]?(""+t).trim():t+"px"}function tn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=en(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Jt).forEach((function(e){Xt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jt[t]=Jt[e]}))}));var nn=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function rn(e,t){if(t){if(nn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function on(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var an="http://www.w3.org/1999/xhtml";function sn(e,t){var n=Qe(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=O[t];for(var r=0;r<t.length;r++)dt(t[r],e,n)}function un(){}function cn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ln(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fn(e,t){var n,r=ln(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ln(r)}}function pn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?pn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var vn="$?",gn="$!",yn=null,mn=null;function bn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function wn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var _n="function"==typeof setTimeout?setTimeout:void 0,En="function"==typeof clearTimeout?clearTimeout:void 0;function xn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Sn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||n===gn||n===vn){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var On=Math.random().toString(36).slice(2),kn="__reactInternalInstance$"+On,Tn="__reactEventHandlers$"+On,Pn="__reactContainere$"+On;function jn(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pn]||n[kn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Sn(e);null!==e;){if(n=e[kn])return n;e=Sn(e)}return t}n=(e=n).parentNode}return null}function Cn(e){return!(e=e[kn]||e[Pn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Nn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function An(e){return e[Tn]||null}function In(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Rn(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function $n(e,t,n){(t=Rn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Dn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=In(t);for(t=n.length;0<t--;)$n(n[t],"captured",e);for(t=0;t<n.length;t++)$n(n[t],"bubbled",e)}}function Ln(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Rn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Mn(e){e&&e.dispatchConfig.registrationName&&Ln(e._targetInst,null,e)}function Un(e){rt(e,Dn)}var Fn=null,Bn=null,zn=null;function Vn(){if(zn)return zn;var e,t,n=Bn,r=n.length,o="value"in Fn?Fn.value:Fn.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return zn=o.slice(e,1<t?1-t:void 0)}function Wn(){return!0}function Kn(){return!1}function Hn(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Wn:Kn,this.isPropagationStopped=Kn,this}function qn(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function Gn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Zn(e){e.eventPool=[],e.getPooled=qn,e.release=Gn}o(Hn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Wn)},persist:function(){this.isPersistent=Wn},isPersistent:Kn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Kn,this._dispatchInstances=this._dispatchListeners=null}}),Hn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Hn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,Zn(n),n},Zn(Hn);var Yn=Hn.extend({data:null}),Qn=Hn.extend({data:null}),Jn=[9,13,27,32],Xn=T&&"CompositionEvent"in window,er=null;T&&"documentMode"in document&&(er=document.documentMode);var tr=T&&"TextEvent"in window&&!er,nr=T&&(!Xn||er&&8<er&&11>=er),rr=String.fromCharCode(32),or={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ir=!1;function ar(e,t){switch(e){case"keyup":return-1!==Jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function sr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ur=!1,cr={eventTypes:or,extractEvents:function(e,t,n,r){var o;if(Xn)e:{switch(e){case"compositionstart":var i=or.compositionStart;break e;case"compositionend":i=or.compositionEnd;break e;case"compositionupdate":i=or.compositionUpdate;break e}i=void 0}else ur?ar(e,n)&&(i=or.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=or.compositionStart);return i?(nr&&"ko"!==n.locale&&(ur||i!==or.compositionStart?i===or.compositionEnd&&ur&&(o=Vn()):(Bn="value"in(Fn=r)?Fn.value:Fn.textContent,ur=!0)),i=Yn.getPooled(i,t,n,r),(o||null!==(o=sr(n)))&&(i.data=o),Un(i),o=i):o=null,(e=tr?function(e,t){switch(e){case"compositionend":return sr(t);case"keypress":return 32!==t.which?null:(ir=!0,rr);case"textInput":return(e=t.data)===rr&&ir?null:e;default:return null}}(e,n):function(e,t){if(ur)return"compositionend"===e||!Xn&&ar(e,t)?(e=Vn(),zn=Bn=Fn=null,ur=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nr&&"ko"!==t.locale?null:t.data}}(e,n))?((t=Qn.getPooled(or.beforeInput,t,n,r)).data=e,Un(t)):t=null,null===o?t:null===t?o:[o,t]}},lr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!lr[e.type]:"textarea"===t}var pr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function dr(e,t,n){return(e=Hn.getPooled(pr.change,e,t,n)).type="change",A(n),Un(e),e}var hr=null,vr=null;function gr(e){at(e)}function yr(e){if(_e(Nn(e)))return e}function mr(e,t){if("change"===e)return t}var br=!1;function wr(){hr&&(hr.detachEvent("onpropertychange",_r),vr=hr=null)}function _r(e){if("value"===e.propertyName&&yr(vr))if(e=dr(vr,e,st(e)),M)at(e);else{M=!0;try{R(gr,e)}finally{M=!1,F()}}}function Er(e,t,n){"focus"===e?(wr(),vr=n,(hr=t).attachEvent("onpropertychange",_r)):"blur"===e&&wr()}function xr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return yr(vr)}function Sr(e,t){if("click"===e)return yr(t)}function Or(e,t){if("input"===e||"change"===e)return yr(t)}T&&(br=ut("input")&&(!document.documentMode||9<document.documentMode));var kr={eventTypes:pr,_isInputEventSupported:br,extractEvents:function(e,t,n,r){var o=t?Nn(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=mr;else if(fr(o))if(br)a=Or;else{a=xr;var s=Er}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=Sr);if(a&&(a=a(e,t)))return dr(a,n,r);s&&s(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&Te(o,"number",o.value)}},Tr=Hn.extend({view:null,detail:null}),Pr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pr[e])&&!!t[e]}function Cr(){return jr}var Nr=0,Ar=0,Ir=!1,Rr=!1,$r=Tr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Cr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Nr;return Nr=e.screenX,Ir?"mousemove"===e.type?e.screenX-t:0:(Ir=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ar;return Ar=e.screenY,Rr?"mousemove"===e.type?e.screenY-t:0:(Rr=!0,0)}}),Dr=$r.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Lr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Mr={eventTypes:Lr,extractEvents:function(e,t,n,r,o){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?jn(t):null)&&(t!==Je(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var s=$r,u=Lr.mouseLeave,c=Lr.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Dr,u=Lr.pointerLeave,c=Lr.pointerEnter,l="pointer");if(e=null==a?i:Nn(a),i=null==t?i:Nn(t),(u=s.getPooled(u,a,n,r)).type=l+"leave",u.target=e,u.relatedTarget=i,(n=s.getPooled(c,t,n,r)).type=l+"enter",n.target=i,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(c=l,a=0,e=s=r;e;e=In(e))a++;for(e=0,t=c;t;t=In(t))e++;for(;0<a-e;)s=In(s),a--;for(;0<e-a;)c=In(c),e--;for(;a--;){if(s===c||s===c.alternate)break e;s=In(s),c=In(c)}s=null}else s=null;for(c=s,s=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)s.push(r),r=In(r);for(r=[];l&&l!==c&&(null===(a=l.alternate)||a!==c);)r.push(l),l=In(l);for(l=0;l<s.length;l++)Ln(s[l],"bubbled",u);for(l=r.length;0<l--;)Ln(r[l],"captured",n);return 0==(64&o)?[u]:[u,n]}},Ur="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Fr=Object.prototype.hasOwnProperty;function Br(e,t){if(Ur(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Fr.call(t,n[r])||!Ur(e[n[r]],t[n[r]]))return!1;return!0}var zr=T&&"documentMode"in document&&11>=document.documentMode,Vr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Wr=null,Kr=null,Hr=null,qr=!1;function Gr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return qr||null==Wr||Wr!==cn(n)?null:(n="selectionStart"in(n=Wr)&&hn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Hr&&Br(Hr,n)?null:(Hr=n,(e=Hn.getPooled(Vr.select,Kr,e,t)).type="select",e.target=Wr,Un(e),e))}var Zr={eventTypes:Vr,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=Qe(o),i=O.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?Nn(t):window,e){case"focus":(fr(o)||"true"===o.contentEditable)&&(Wr=o,Kr=t,Hr=null);break;case"blur":Hr=Kr=Wr=null;break;case"mousedown":qr=!0;break;case"contextmenu":case"mouseup":case"dragend":return qr=!1,Gr(n,r);case"selectionchange":if(zr)break;case"keydown":case"keyup":return Gr(n,r)}return null}},Yr=Hn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Qr=Hn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jr=Tr.extend({relatedTarget:null});function Xr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var eo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},to={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},no=Tr.extend({key:function(e){if(e.key){var t=eo[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Xr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?to[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Cr,charCode:function(e){return"keypress"===e.type?Xr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Xr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ro=$r.extend({dataTransfer:null}),oo=Tr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Cr}),io=Hn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ao=$r.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),so={eventTypes:Dt,extractEvents:function(e,t,n,r){var o=Lt.get(e);if(!o)return null;switch(e){case"keypress":if(0===Xr(n))return null;case"keydown":case"keyup":e=no;break;case"blur":case"focus":e=Jr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=$r;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ro;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=oo;break;case Ke:case He:case qe:e=Yr;break;case Ge:e=io;break;case"scroll":e=Tr;break;case"wheel":e=ao;break;case"copy":case"cut":case"paste":e=Qr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Dr;break;default:e=Hn}return Un(t=e.getPooled(o,t,n,r)),t}};if(m)throw Error(a(101));m=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=An,v=Cn,g=Nn,k({SimpleEventPlugin:so,EnterLeaveEventPlugin:Mr,ChangeEventPlugin:kr,SelectEventPlugin:Zr,BeforeInputEventPlugin:cr});var uo=[],co=-1;function lo(e){0>co||(e.current=uo[co],uo[co]=null,co--)}function fo(e,t){co++,uo[co]=e.current,e.current=t}var po={},ho={current:po},vo={current:!1},go=po;function yo(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function mo(e){return null!=e.childContextTypes}function bo(){lo(vo),lo(ho)}function wo(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(vo,n)}function _o(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,ge(t)||"Unknown",i));return o({},n,{},r)}function Eo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,go=ho.current,fo(ho,e),fo(vo,vo.current),!0}function xo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=_o(e,t,go),r.__reactInternalMemoizedMergedChildContext=e,lo(vo),lo(ho),fo(ho,e)):lo(vo),fo(vo,n)}var So=i.unstable_runWithPriority,Oo=i.unstable_scheduleCallback,ko=i.unstable_cancelCallback,To=i.unstable_requestPaint,Po=i.unstable_now,jo=i.unstable_getCurrentPriorityLevel,Co=i.unstable_ImmediatePriority,No=i.unstable_UserBlockingPriority,Ao=i.unstable_NormalPriority,Io=i.unstable_LowPriority,Ro=i.unstable_IdlePriority,$o={},Do=i.unstable_shouldYield,Lo=void 0!==To?To:function(){},Mo=null,Uo=null,Fo=!1,Bo=Po(),zo=1e4>Bo?Po:function(){return Po()-Bo};function Vo(){switch(jo()){case Co:return 99;case No:return 98;case Ao:return 97;case Io:return 96;case Ro:return 95;default:throw Error(a(332))}}function Wo(e){switch(e){case 99:return Co;case 98:return No;case 97:return Ao;case 96:return Io;case 95:return Ro;default:throw Error(a(332))}}function Ko(e,t){return e=Wo(e),So(e,t)}function Ho(e,t,n){return e=Wo(e),Oo(e,t,n)}function qo(e){return null===Mo?(Mo=[e],Uo=Oo(Co,Zo)):Mo.push(e),$o}function Go(){if(null!==Uo){var e=Uo;Uo=null,ko(e)}Zo()}function Zo(){if(!Fo&&null!==Mo){Fo=!0;var e=0;try{var t=Mo;Ko(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Mo=null}catch(t){throw null!==Mo&&(Mo=Mo.slice(e+1)),Oo(Co,Go),t}finally{Fo=!1}}}function Yo(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Qo(e,t){if(e&&e.defaultProps)for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Jo={current:null},Xo=null,ei=null,ti=null;function ni(){ti=ei=Xo=null}function ri(e){var t=Jo.current;lo(Jo),e.type._context._currentValue=t}function oi(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ii(e,t){Xo=e,ti=ei=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Aa=!0),e.firstContext=null)}function ai(e,t){if(ti!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(ti=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ei){if(null===Xo)throw Error(a(308));ei=t,Xo.dependencies={expirationTime:0,firstContext:t,responders:null}}else ei=ei.next=t;return e._currentValue}var si=!1;function ui(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ci(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function li(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function fi(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.alternate;null!==n&&ci(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function di(e,t,n,r){var i=e.updateQueue;si=!1;var a=i.baseQueue,s=i.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,i.shared.pending=null,null!==(u=e.alternate)&&null!==(u=u.updateQueue)&&(u.baseQueue=s)}if(null!==a){u=a.next;var c=i.baseState,l=0,f=null,p=null,d=null;if(null!==u)for(var h=u;;){if((s=h.expirationTime)<r){var v={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===d?(p=d=v,f=c):d=d.next=v,s>l&&(l=s)}else{null!==d&&(d=d.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),cu(s,h.suspenseConfig);e:{var g=e,y=h;switch(s=t,v=n,y.tag){case 1:if("function"==typeof(g=y.payload)){c=g.call(v,c,s);break e}c=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(s="function"==typeof(g=y.payload)?g.call(v,c,s):g))break e;c=o({},c,s);break e;case 2:si=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=i.effects)?i.effects=[h]:s.push(h))}if(null===(h=h.next)||h===u){if(null===(s=i.shared.pending))break;h=a.next=s.next,s.next=u,i.baseQueue=a=s,i.shared.pending=null}}null===d?f=c:d.next=p,i.baseState=f,i.baseQueue=d,lu(l),e.expirationTime=l,e.memoizedState=c}}function hi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=o,o=n,"function"!=typeof r)throw Error(a(191,r));r.call(o)}}}var vi=Y.ReactCurrentBatchConfig,gi=(new r.Component).refs;function yi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var mi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Ys(),o=vi.suspense;(o=li(r=Qs(r,e,o),o)).payload=t,null!=n&&(o.callback=n),fi(e,o),Js(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Ys(),o=vi.suspense;(o=li(r=Qs(r,e,o),o)).tag=1,o.payload=t,null!=n&&(o.callback=n),fi(e,o),Js(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Ys(),r=vi.suspense;(r=li(n=Qs(n,e,r),r)).tag=2,null!=t&&(r.callback=t),fi(e,r),Js(e,n)}};function bi(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&Br(n,r)&&Br(o,i))}function wi(e,t,n){var r=!1,o=po,i=t.contextType;return"object"==typeof i&&null!==i?i=ai(i):(o=mo(t)?go:ho.current,i=(r=null!=(r=t.contextTypes))?yo(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=mi,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function _i(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mi.enqueueReplaceState(t,t.state,null)}function Ei(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=gi,ui(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=ai(i):(i=mo(t)?go:ho.current,o.context=yo(e,i)),di(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(yi(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&mi.enqueueReplaceState(o,o.state,null),di(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.effectTag|=4)}var xi=Array.isArray;function Si(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===gi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Oi(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function ki(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Cu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Iu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Si(e,t,n),r.return=e,r):((r=Nu(n.type,n.key,n.props,null,e.mode,r)).ref=Si(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ru(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Au(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Iu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Nu(t.type,t.key,t.props,null,e.mode,n)).ref=Si(e,null,t),n.return=e,n;case te:return(t=Ru(t,e.mode,n)).return=e,t}if(xi(t)||ve(t))return(t=Au(t,e.mode,n,null)).return=e,t;Oi(e,t)}return null}function d(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===o?n.type===ne?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case te:return n.key===o?l(e,t,n,r):null}if(xi(n)||ve(n))return null!==o?null:f(e,t,n,r,null);Oi(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case te:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(xi(r)||ve(r))return f(t,e=e.get(n)||null,r,o,null);Oi(t,r)}return null}function v(o,a,s,u){for(var c=null,l=null,f=a,v=a=0,g=null;null!==f&&v<s.length;v++){f.index>v?(g=f,f=null):g=f.sibling;var y=d(o,f,s[v],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(o,f),a=i(y,a,v),null===l?c=y:l.sibling=y,l=y,f=g}if(v===s.length)return n(o,f),c;if(null===f){for(;v<s.length;v++)null!==(f=p(o,s[v],u))&&(a=i(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(o,f);v<s.length;v++)null!==(g=h(f,o,v,s[v],u))&&(e&&null!==g.alternate&&f.delete(null===g.key?v:g.key),a=i(g,a,v),null===l?c=g:l.sibling=g,l=g);return e&&f.forEach((function(e){return t(o,e)})),c}function g(o,s,u,c){var l=ve(u);if("function"!=typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,g=s=0,y=null,m=u.next();null!==v&&!m.done;g++,m=u.next()){v.index>g?(y=v,v=null):y=v.sibling;var b=d(o,v,m.value,c);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(o,v),s=i(b,s,g),null===f?l=b:f.sibling=b,f=b,v=y}if(m.done)return n(o,v),l;if(null===v){for(;!m.done;g++,m=u.next())null!==(m=p(o,m.value,c))&&(s=i(m,s,g),null===f?l=m:f.sibling=m,f=m);return l}for(v=r(o,v);!m.done;g++,m=u.next())null!==(m=h(v,o,g,m.value,c))&&(e&&null!==m.alternate&&v.delete(null===m.key?g:m.key),s=i(m,s,g),null===f?l=m:f.sibling=m,f=m);return e&&v.forEach((function(e){return t(o,e)})),l}return function(e,r,i,u){var c="object"==typeof i&&null!==i&&i.type===ne&&null===i.key;c&&(i=i.props.children);var l="object"==typeof i&&null!==i;if(l)switch(i.$$typeof){case ee:e:{for(l=i.key,c=r;null!==c;){if(c.key===l){if(7===c.tag){if(i.type===ne){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Si(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===ne?((r=Au(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Nu(i.type,i.key,i.props,null,e.mode,u)).ref=Si(e,r,i),u.return=e,e=u)}return s(e);case te:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ru(i,e.mode,u)).return=e,e=r}return s(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Iu(i,e.mode,u)).return=e,e=r),s(e);if(xi(i))return v(e,r,i,u);if(ve(i))return g(e,r,i,u);if(l&&Oi(e,i),void 0===i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Ti=ki(!0),Pi=ki(!1),ji={},Ci={current:ji},Ni={current:ji},Ai={current:ji};function Ii(e){if(e===ji)throw Error(a(174));return e}function Ri(e,t){switch(fo(Ai,t),fo(Ni,e),fo(Ci,ji),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$e(null,"");break;default:t=$e(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}lo(Ci),fo(Ci,t)}function $i(){lo(Ci),lo(Ni),lo(Ai)}function Di(e){Ii(Ai.current);var t=Ii(Ci.current),n=$e(t,e.type);t!==n&&(fo(Ni,e),fo(Ci,n))}function Li(e){Ni.current===e&&(lo(Ci),lo(Ni))}var Mi={current:0};function Ui(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===vn||n.data===gn))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Fi(e,t){return{responder:e,props:t}}var Bi=Y.ReactCurrentDispatcher,zi=Y.ReactCurrentBatchConfig,Vi=0,Wi=null,Ki=null,Hi=null,qi=!1;function Gi(){throw Error(a(321))}function Zi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function Yi(e,t,n,r,o,i){if(Vi=i,Wi=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Bi.current=null===e||null===e.memoizedState?ba:wa,e=n(r,o),t.expirationTime===Vi){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(a(301));i+=1,Hi=Ki=null,t.updateQueue=null,Bi.current=_a,e=n(r,o)}while(t.expirationTime===Vi)}if(Bi.current=ma,t=null!==Ki&&null!==Ki.next,Vi=0,Hi=Ki=Wi=null,qi=!1,t)throw Error(a(300));return e}function Qi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Hi?Wi.memoizedState=Hi=e:Hi=Hi.next=e,Hi}function Ji(){if(null===Ki){var e=Wi.alternate;e=null!==e?e.memoizedState:null}else e=Ki.next;var t=null===Hi?Wi.memoizedState:Hi.next;if(null!==t)Hi=t,Ki=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Ki=e).memoizedState,baseState:Ki.baseState,baseQueue:Ki.baseQueue,queue:Ki.queue,next:null},null===Hi?Wi.memoizedState=Hi=e:Hi=Hi.next=e}return Hi}function Xi(e,t){return"function"==typeof t?t(e):t}function ea(e){var t=Ji(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Ki,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=s=i=null,c=o;do{var l=c.expirationTime;if(l<Vi){var f={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,i=r):u=u.next=f,l>Wi.expirationTime&&(Wi.expirationTime=l,lu(l))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),cu(l,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==o);null===u?i=r:u.next=s,Ur(r,t.memoizedState)||(Aa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ta(e){var t=Ji(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);Ur(i,t.memoizedState)||(Aa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function na(e){var t=Qi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:e}).dispatch=ya.bind(null,Wi,e),[t.memoizedState,e]}function ra(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Wi.updateQueue)?(t={lastEffect:null},Wi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function oa(){return Ji().memoizedState}function ia(e,t,n,r){var o=Qi();Wi.effectTag|=e,o.memoizedState=ra(1|t,n,void 0,void 0===r?null:r)}function aa(e,t,n,r){var o=Ji();r=void 0===r?null:r;var i=void 0;if(null!==Ki){var a=Ki.memoizedState;if(i=a.destroy,null!==r&&Zi(r,a.deps))return void ra(t,n,i,r)}Wi.effectTag|=e,o.memoizedState=ra(1|t,n,i,r)}function sa(e,t){return ia(516,4,e,t)}function ua(e,t){return aa(516,4,e,t)}function ca(e,t){return aa(4,2,e,t)}function la(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function fa(e,t,n){return n=null!=n?n.concat([e]):null,aa(4,2,la.bind(null,t,e),n)}function pa(){}function da(e,t){return Qi().memoizedState=[e,void 0===t?null:t],e}function ha(e,t){var n=Ji();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Zi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function va(e,t){var n=Ji();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Zi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ga(e,t,n){var r=Vo();Ko(98>r?98:r,(function(){e(!0)})),Ko(97<r?97:r,(function(){var r=zi.suspense;zi.suspense=void 0===t?null:t;try{e(!1),n()}finally{zi.suspense=r}}))}function ya(e,t,n){var r=Ys(),o=vi.suspense;o={expirationTime:r=Qs(r,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Wi||null!==i&&i===Wi)qi=!0,o.expirationTime=Vi,Wi.expirationTime=Vi;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.eagerReducer=i,o.eagerState=s,Ur(s,a))return}catch(e){}Js(e,r)}}var ma={readContext:ai,useCallback:Gi,useContext:Gi,useEffect:Gi,useImperativeHandle:Gi,useLayoutEffect:Gi,useMemo:Gi,useReducer:Gi,useRef:Gi,useState:Gi,useDebugValue:Gi,useResponder:Gi,useDeferredValue:Gi,useTransition:Gi},ba={readContext:ai,useCallback:da,useContext:ai,useEffect:sa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ia(4,2,la.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ia(4,2,e,t)},useMemo:function(e,t){var n=Qi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Qi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ya.bind(null,Wi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Qi().memoizedState=e},useState:na,useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=na(e),r=n[0],o=n[1];return sa((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=na(!1),n=t[0];return t=t[1],[da(ga.bind(null,t,e),[t,e]),n]}},wa={readContext:ai,useCallback:ha,useContext:ai,useEffect:ua,useImperativeHandle:fa,useLayoutEffect:ca,useMemo:va,useReducer:ea,useRef:oa,useState:function(){return ea(Xi)},useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=ea(Xi),r=n[0],o=n[1];return ua((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ea(Xi),n=t[0];return t=t[1],[ha(ga.bind(null,t,e),[t,e]),n]}},_a={readContext:ai,useCallback:ha,useContext:ai,useEffect:ua,useImperativeHandle:fa,useLayoutEffect:ca,useMemo:va,useReducer:ta,useRef:oa,useState:function(){return ta(Xi)},useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=ta(Xi),r=n[0],o=n[1];return ua((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ta(Xi),n=t[0];return t=t[1],[ha(ga.bind(null,t,e),[t,e]),n]}},Ea=null,xa=null,Sa=!1;function Oa(e,t){var n=Pu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ka(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Ta(e){if(Sa){var t=xa;if(t){var n=t;if(!ka(e,t)){if(!(t=xn(n.nextSibling))||!ka(e,t))return e.effectTag=-1025&e.effectTag|2,Sa=!1,void(Ea=e);Oa(Ea,n)}Ea=e,xa=xn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Sa=!1,Ea=e}}function Pa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ea=e}function ja(e){if(e!==Ea)return!1;if(!Sa)return Pa(e),Sa=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!wn(t,e.memoizedProps))for(t=xa;t;)Oa(e,t),t=xn(t.nextSibling);if(Pa(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){xa=xn(e.nextSibling);break e}t--}else"$"!==n&&n!==gn&&n!==vn||t++}e=e.nextSibling}xa=null}}else xa=Ea?xn(e.stateNode.nextSibling):null;return!0}function Ca(){xa=Ea=null,Sa=!1}var Na=Y.ReactCurrentOwner,Aa=!1;function Ia(e,t,n,r){t.child=null===e?Pi(t,null,n,r):Ti(t,e.child,n,r)}function Ra(e,t,n,r,o){n=n.render;var i=t.ref;return ii(t,o),r=Yi(e,t,n,r,i,o),null===e||Aa?(t.effectTag|=1,Ia(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ya(e,t,o))}function $a(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||ju(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Nu(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Da(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:Br)(o,r)&&e.ref===t.ref)?Ya(e,t,i):(t.effectTag|=1,(e=Cu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Da(e,t,n,r,o,i){return null!==e&&Br(e.memoizedProps,r)&&e.ref===t.ref&&(Aa=!1,o<i)?(t.expirationTime=e.expirationTime,Ya(e,t,i)):Ma(e,t,n,r,i)}function La(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ma(e,t,n,r,o){var i=mo(n)?go:ho.current;return i=yo(t,i),ii(t,o),n=Yi(e,t,n,r,i,o),null===e||Aa?(t.effectTag|=1,Ia(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ya(e,t,o))}function Ua(e,t,n,r,o){if(mo(n)){var i=!0;Eo(t)}else i=!1;if(ii(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),wi(t,n,r),Ei(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=n.contextType;c="object"==typeof c&&null!==c?ai(c):yo(t,c=mo(n)?go:ho.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==c)&&_i(t,a,r,c),si=!1;var p=t.memoizedState;a.state=p,di(t,r,a,o),u=t.memoizedState,s!==r||p!==u||vo.current||si?("function"==typeof l&&(yi(t,n,l,r),u=t.memoizedState),(s=si||bi(t,n,s,r,p,u,c))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ci(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Qo(t.type,s),u=a.context,c="object"==typeof(c=n.contextType)&&null!==c?ai(c):yo(t,c=mo(n)?go:ho.current),(f="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==c)&&_i(t,a,r,c),si=!1,u=t.memoizedState,a.state=u,di(t,r,a,o),p=t.memoizedState,s!==r||u!==p||vo.current||si?("function"==typeof l&&(yi(t,n,l,r),p=t.memoizedState),(l=si||bi(t,n,s,r,u,p,c))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,c)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=l):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return Fa(e,t,n,r,i,o)}function Fa(e,t,n,r,o,i){La(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return o&&xo(t,n,!1),Ya(e,t,i);r=t.stateNode,Na.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Ti(t,e.child,null,i),t.child=Ti(t,null,s,i)):Ia(e,t,s,i),t.memoizedState=r.state,o&&xo(t,n,!0),t.child}function Ba(e){var t=e.stateNode;t.pendingContext?wo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&wo(0,t.context,!1),Ri(e,t.containerInfo)}var za,Va,Wa,Ka={dehydrated:null,retryTime:0};function Ha(e,t,n){var r,o=t.mode,i=t.pendingProps,a=Mi.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),fo(Mi,1&a),null===e){if(void 0!==i.fallback&&Ta(t),s){if(s=i.fallback,(i=Au(null,o,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Au(s,o,n,null)).return=t,i.sibling=n,t.memoizedState=Ka,t.child=i,n}return o=i.children,t.memoizedState=null,t.child=Pi(t,null,o,n)}if(null!==e.memoizedState){if(o=(e=e.child).sibling,s){if(i=i.fallback,(n=Cu(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(o=Cu(o,i)).return=t,n.sibling=o,n.childExpirationTime=0,t.memoizedState=Ka,t.child=n,o}return n=Ti(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=i.fallback,(i=Au(null,o,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Au(s,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Ka,t.child=i,n}return t.memoizedState=null,t.child=Ti(t,e,i.children,n)}function qa(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),oi(e.return,t)}function Ga(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)}function Za(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ia(e,t,r.children,n),0!=(2&(r=Mi.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&qa(e,n);else if(19===e.tag)qa(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Mi,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Ui(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ga(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Ui(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ga(t,!0,n,null,i,t.lastEffect);break;case"together":Ga(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Ya(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&lu(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Cu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Cu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Qa(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ja(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return mo(t.type)&&bo(),null;case 3:return $i(),lo(vo),lo(ho),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!ja(t)||(t.effectTag|=4),null;case 5:Li(t),n=Ii(Ai.current);var i=t.type;if(null!==e&&null!=t.stateNode)Va(e,t,i,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ii(Ci.current),ja(t)){r=t.stateNode,i=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[Tn]=s,i){case"iframe":case"object":case"embed":Ht("load",r);break;case"video":case"audio":for(e=0;e<Ze.length;e++)Ht(Ze[e],r);break;case"source":Ht("error",r);break;case"img":case"image":case"link":Ht("error",r),Ht("load",r);break;case"form":Ht("reset",r),Ht("submit",r);break;case"details":Ht("toggle",r);break;case"input":xe(r,s),Ht("invalid",r),sn(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ht("invalid",r),sn(n,"onChange");break;case"textarea":Ne(r,s),Ht("invalid",r),sn(n,"onChange")}for(var u in rn(i,s),e=null,s)if(s.hasOwnProperty(u)){var c=s[u];"children"===u?"string"==typeof c?r.textContent!==c&&(e=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(e=["children",""+c]):S.hasOwnProperty(u)&&null!=c&&sn(n,u)}switch(i){case"input":we(r),ke(r,s,!0);break;case"textarea":we(r),Ie(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=un)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,e===an&&(e=Re(i)),e===an?"script"===i?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(i,{is:r.is}):(e=u.createElement(i),"select"===i&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,i),e[kn]=t,e[Tn]=r,za(e,t),t.stateNode=e,u=on(i,r),i){case"iframe":case"object":case"embed":Ht("load",e),c=r;break;case"video":case"audio":for(c=0;c<Ze.length;c++)Ht(Ze[c],e);c=r;break;case"source":Ht("error",e),c=r;break;case"img":case"image":case"link":Ht("error",e),Ht("load",e),c=r;break;case"form":Ht("reset",e),Ht("submit",e),c=r;break;case"details":Ht("toggle",e),c=r;break;case"input":xe(e,r),c=Ee(e,r),Ht("invalid",e),sn(n,"onChange");break;case"option":c=Pe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},c=o({},r,{value:void 0}),Ht("invalid",e),sn(n,"onChange");break;case"textarea":Ne(e,r),c=Ce(e,r),Ht("invalid",e),sn(n,"onChange");break;default:c=r}rn(i,c);var l=c;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?tn(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&Me(e,f):"children"===s?"string"==typeof f?("textarea"!==i||""!==f)&&Ue(e,f):"number"==typeof f&&Ue(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?null!=f&&sn(n,s):null!=f&&Q(e,s,f,u))}switch(i){case"input":we(e),ke(e,r,!1);break;case"textarea":we(e),Ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+me(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?je(e,!!r.multiple,n,!1):null!=r.defaultValue&&je(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=un)}bn(i,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Wa(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Ii(Ai.current),Ii(Ci.current),ja(t)?(n=t.stateNode,r=t.memoizedProps,n[kn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[kn]=t,t.stateNode=n)}return null;case 13:return lo(Mi),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&ja(t):(r=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=i,i.nextEffect=s):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Mi.current)?Ns===Ss&&(Ns=Os):(Ns!==Ss&&Ns!==Os||(Ns=ks),0!==Ds&&null!==Ps&&(Lu(Ps,Cs),Mu(Ps,Ds)))),(n||r)&&(t.effectTag|=4),null);case 4:return $i(),null;case 10:return ri(t),null;case 19:if(lo(Mi),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(s=r.rendering)){if(i)Qa(r,!1);else if(Ns!==Ss||null!==e&&0!=(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=Ui(s))){for(t.effectTag|=64,Qa(r,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)s=n,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=s,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,s=e.dependencies,i.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return fo(Mi,1&Mi.current|2),t.child}s=s.sibling}}else{if(!i)if(null!==(e=Ui(s))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Qa(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*zo()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Qa(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=zo()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=zo(),n.sibling=null,t=Mi.current,fo(Mi,i?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Xa(e){switch(e.tag){case 1:mo(e.type)&&bo();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if($i(),lo(vo),lo(ho),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Li(e),null;case 13:return lo(Mi),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return lo(Mi),null;case 4:return $i(),null;case 10:return ri(e),null;default:return null}}function es(e,t){return{value:e,source:t,stack:ye(t)}}za=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Va=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var s,u,c=t.stateNode;switch(Ii(Ci.current),e=null,n){case"input":a=Ee(c,a),r=Ee(c,r),e=[];break;case"option":a=Pe(c,a),r=Pe(c,r),e=[];break;case"select":a=o({},a,{value:void 0}),r=o({},r,{value:void 0}),e=[];break;case"textarea":a=Ce(c,a),r=Ce(c,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(c.onclick=un)}for(s in rn(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in c=a[s])c.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var l=r[s];if(c=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&l!==c&&(null!=l||null!=c))if("style"===s)if(c){for(u in c)!c.hasOwnProperty(u)||l&&l.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in l)l.hasOwnProperty(u)&&c[u]!==l[u]&&(n||(n={}),n[u]=l[u])}else n||(e||(e=[]),e.push(s,n)),n=l;else"dangerouslySetInnerHTML"===s?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(e=e||[]).push(s,l)):"children"===s?c===l||"string"!=typeof l&&"number"!=typeof l||(e=e||[]).push(s,""+l):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(S.hasOwnProperty(s)?(null!=l&&sn(i,s),e||c===l||(e=[])):(e=e||[]).push(s,l))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},Wa=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var ts="function"==typeof WeakSet?WeakSet:Set;function ns(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ye(n)),null!==n&&ge(n.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function rs(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Eu(e,t)}else t.current=null}function os(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Qo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return}throw Error(a(163))}function is(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function as(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ss(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void as(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Qo(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&hi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}hi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&bn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&$t(n)))))}throw Error(a(163))}function us(e,t,n){switch("function"==typeof ku&&ku(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Ko(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var o=t;try{n()}catch(e){Eu(o,e)}}e=e.next}while(e!==r)}))}break;case 1:rs(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Eu(e,t)}}(t,n);break;case 5:rs(t);break;case 4:hs(e,t,n)}}function cs(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&cs(t)}function ls(e){return 5===e.tag||3===e.tag||4===e.tag}function fs(e){e:{for(var t=e.return;null!==t;){if(ls(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Ue(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ls(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?ps(e,n,t):ds(e,n,t)}function ps(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=un));else if(4!==r&&null!==(e=e.child))for(ps(e,t,n),e=e.sibling;null!==e;)ps(e,t,n),e=e.sibling}function ds(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ds(e,t,n),e=e.sibling;null!==e;)ds(e,t,n),e=e.sibling}function hs(e,t,n){for(var r,o,i=t,s=!1;;){if(!s){s=i.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:o=!1;break e;case 3:case 4:r=r.containerInfo,o=!0;break e}s=s.return}s=!0}if(5===i.tag||6===i.tag){e:for(var u=e,c=i,l=n,f=c;;)if(us(u,f,l),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===c)break e;for(;null===f.sibling;){if(null===f.return||f.return===c)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}o?(u=r,c=i.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,o=!0,i.child.return=i,i=i.child;continue}}else if(us(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(s=!1)}i.sibling.return=i.return,i=i.sibling}}function vs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void is(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Tn]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Se(n,r),on(e,o),t=on(e,r),o=0;o<i.length;o+=2){var s=i[o],u=i[o+1];"style"===s?tn(n,u):"dangerouslySetInnerHTML"===s?Me(n,u):"children"===s?Ue(n,u):Q(n,s,u,t)}switch(e){case"input":Oe(n,r);break;case"textarea":Ae(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?je(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?je(n,!!r.multiple,r.defaultValue,!0):je(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,$t(t.containerInfo)));case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Ms=zo()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,o=null!=(o=e.memoizedProps.style)&&o.hasOwnProperty("display")?o.display:null,i.style.display=en("display",o));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void gs(t);case 19:return void gs(t)}throw Error(a(163))}function gs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ts),t.forEach((function(t){var r=Su.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var ys="function"==typeof WeakMap?WeakMap:Map;function ms(e,t,n){(n=li(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fs||(Fs=!0,Bs=r),ns(e,t)},n}function bs(e,t,n){(n=li(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return ns(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===zs?zs=new Set([this]):zs.add(this),ns(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var ws,_s=Math.ceil,Es=Y.ReactCurrentDispatcher,xs=Y.ReactCurrentOwner,Ss=0,Os=3,ks=4,Ts=0,Ps=null,js=null,Cs=0,Ns=Ss,As=null,Is=1073741823,Rs=1073741823,$s=null,Ds=0,Ls=!1,Ms=0,Us=null,Fs=!1,Bs=null,zs=null,Vs=!1,Ws=null,Ks=90,Hs=null,qs=0,Gs=null,Zs=0;function Ys(){return 0!=(48&Ts)?1073741821-(zo()/10|0):0!==Zs?Zs:Zs=1073741821-(zo()/10|0)}function Qs(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Vo();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Ts))return Cs;if(null!==n)e=Yo(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Yo(e,150,100);break;case 97:case 96:e=Yo(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Ps&&e===Cs&&--e,e}function Js(e,t){if(50<qs)throw qs=0,Gs=null,Error(a(185));if(null!==(e=Xs(e,t))){var n=Vo();1073741823===t?0!=(8&Ts)&&0==(48&Ts)?ru(e):(tu(e),0===Ts&&Go()):tu(e),0==(4&Ts)||98!==n&&99!==n||(null===Hs?Hs=new Map([[e,t]]):(void 0===(n=Hs.get(e))||n>t)&&Hs.set(e,t))}}function Xs(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(Ps===o&&(lu(t),Ns===ks&&Lu(o,Cs)),Mu(o,t)),o}function eu(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Du(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function tu(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=qo(ru.bind(null,e));else{var t=eu(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Ys();if(r=1073741823===t?99:1===t||2===t?95:0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==$o&&ko(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?qo(ru.bind(null,e)):Ho(r,nu.bind(null,e),{timeout:10*(1073741821-t)-zo()}),e.callbackNode=t}}}function nu(e,t){if(Zs=0,t)return Uu(e,t=Ys()),tu(e),null;var n=eu(e);if(0!==n){if(t=e.callbackNode,0!=(48&Ts))throw Error(a(327));if(bu(),e===Ps&&n===Cs||au(e,n),null!==js){var r=Ts;Ts|=16;for(var o=uu();;)try{pu();break}catch(t){su(e,t)}if(ni(),Ts=r,Es.current=o,1===Ns)throw t=As,au(e,n),Lu(e,n),tu(e),t;if(null===js)switch(o=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Ns,Ps=null,r){case Ss:case 1:throw Error(a(345));case 2:Uu(e,2<n?2:n);break;case Os:if(Lu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=vu(o)),1073741823===Is&&10<(o=Ms+500-zo())){if(Ls){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,au(e,n);break}}if(0!==(i=eu(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=_n(gu.bind(null,e),o);break}gu(e);break;case ks:if(Lu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=vu(o)),Ls&&(0===(o=e.lastPingedTime)||o>=n)){e.lastPingedTime=n,au(e,n);break}if(0!==(o=eu(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Rs?r=10*(1073741821-Rs)-zo():1073741823===Is?r=0:(r=10*(1073741821-Is)-5e3,0>(r=(o=zo())-r)&&(r=0),(n=10*(1073741821-n)-o)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_s(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=_n(gu.bind(null,e),r);break}gu(e);break;case 5:if(1073741823!==Is&&null!==$s){i=Is;var s=$s;if(0>=(r=0|s.busyMinDurationMs)?r=0:(o=0|s.busyDelayMs,r=(i=zo()-(10*(1073741821-i)-(0|s.timeoutMs||5e3)))<=o?0:o+r-i),10<r){Lu(e,n),e.timeoutHandle=_n(gu.bind(null,e),r);break}}gu(e);break;default:throw Error(a(329))}if(tu(e),e.callbackNode===t)return nu.bind(null,e)}}return null}function ru(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Ts))throw Error(a(327));if(bu(),e===Ps&&t===Cs||au(e,t),null!==js){var n=Ts;Ts|=16;for(var r=uu();;)try{fu();break}catch(t){su(e,t)}if(ni(),Ts=n,Es.current=r,1===Ns)throw n=As,au(e,t),Lu(e,t),tu(e),n;if(null!==js)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Ps=null,gu(e),tu(e)}return null}function ou(e,t){var n=Ts;Ts|=1;try{return e(t)}finally{0===(Ts=n)&&Go()}}function iu(e,t){var n=Ts;Ts&=-2,Ts|=8;try{return e(t)}finally{0===(Ts=n)&&Go()}}function au(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,En(n)),null!==js)for(n=js.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&bo();break;case 3:$i(),lo(vo),lo(ho);break;case 5:Li(r);break;case 4:$i();break;case 13:case 19:lo(Mi);break;case 10:ri(r)}n=n.return}Ps=e,js=Cu(e.current,null),Cs=t,Ns=Ss,As=null,Rs=Is=1073741823,$s=null,Ds=0,Ls=!1}function su(e,t){for(;;){try{if(ni(),Bi.current=ma,qi)for(var n=Wi.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Vi=0,Hi=Ki=Wi=null,qi=!1,null===js||null===js.return)return Ns=1,As=t,js=null;e:{var o=e,i=js.return,a=js,s=t;if(t=Cs,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var u=s;if(0==(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!=(1&Mi.current),f=i;do{var p;if(p=13===f.tag){var d=f.memoizedState;if(null!==d)p=null!==d.dehydrated;else{var h=f.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(p){var v=f.updateQueue;if(null===v){var g=new Set;g.add(u),f.updateQueue=g}else v.add(u);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var y=li(1073741823,null);y.tag=2,fi(a,y)}a.expirationTime=1073741823;break e}s=void 0,a=t;var m=o.pingCache;if(null===m?(m=o.pingCache=new ys,s=new Set,m.set(u,s)):void 0===(s=m.get(u))&&(s=new Set,m.set(u,s)),!s.has(a)){s.add(a);var b=xu.bind(null,o,u,a);u.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);s=Error((ge(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ye(a))}5!==Ns&&(Ns=2),s=es(s,a),f=i;do{switch(f.tag){case 3:u=s,f.effectTag|=4096,f.expirationTime=t,pi(f,ms(f,u,t));break e;case 1:u=s;var w=f.type,_=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===zs||!zs.has(_)))){f.effectTag|=4096,f.expirationTime=t,pi(f,bs(f,u,t));break e}}f=f.return}while(null!==f)}js=hu(js)}catch(e){t=e;continue}break}}function uu(){var e=Es.current;return Es.current=ma,null===e?ma:e}function cu(e,t){e<Is&&2<e&&(Is=e),null!==t&&e<Rs&&2<e&&(Rs=e,$s=t)}function lu(e){e>Ds&&(Ds=e)}function fu(){for(;null!==js;)js=du(js)}function pu(){for(;null!==js&&!Do();)js=du(js)}function du(e){var t=ws(e.alternate,e,Cs);return e.memoizedProps=e.pendingProps,null===t&&(t=hu(e)),xs.current=null,t}function hu(e){js=e;do{var t=js.alternate;if(e=js.return,0==(2048&js.effectTag)){if(t=Ja(t,js,Cs),1===Cs||1!==js.childExpirationTime){for(var n=0,r=js.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}js.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=js.firstEffect),null!==js.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=js.firstEffect),e.lastEffect=js.lastEffect),1<js.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=js:e.firstEffect=js,e.lastEffect=js))}else{if(null!==(t=Xa(js)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=js.sibling))return t;js=e}while(null!==js);return Ns===Ss&&(Ns=5),null}function vu(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function gu(e){var t=Vo();return Ko(99,yu.bind(null,e,t)),null}function yu(e,t){do{bu()}while(null!==Ws);if(0!=(48&Ts))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var o=vu(n);if(e.firstPendingTime=o,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Ps&&(js=Ps=null,Cs=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){var i=Ts;Ts|=32,xs.current=null,yn=Kt;var s=dn();if(hn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{var c=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(c&&0!==c.rangeCount){u=c.anchorNode;var l=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{u.nodeType,f.nodeType}catch(e){u=null;break e}var p=0,d=-1,h=-1,v=0,g=0,y=s,m=null;t:for(;;){for(var b;y!==u||0!==l&&3!==y.nodeType||(d=p+l),y!==f||0!==c&&3!==y.nodeType||(h=p+c),3===y.nodeType&&(p+=y.nodeValue.length),null!==(b=y.firstChild);)m=y,y=b;for(;;){if(y===s)break t;if(m===u&&++v===l&&(d=p),m===f&&++g===c&&(h=p),null!==(b=y.nextSibling))break;m=(y=m).parentNode}y=b}u=-1===d||-1===h?null:{start:d,end:h}}else u=null}u=u||{start:0,end:0}}else u=null;mn={activeElementDetached:null,focusedElem:s,selectionRange:u},Kt=!1,Us=o;do{try{mu()}catch(e){if(null===Us)throw Error(a(330));Eu(Us,e),Us=Us.nextEffect}}while(null!==Us);Us=o;do{try{for(s=e,u=t;null!==Us;){var w=Us.effectTag;if(16&w&&Ue(Us.stateNode,""),128&w){var _=Us.alternate;if(null!==_){var E=_.ref;null!==E&&("function"==typeof E?E(null):E.current=null)}}switch(1038&w){case 2:fs(Us),Us.effectTag&=-3;break;case 6:fs(Us),Us.effectTag&=-3,vs(Us.alternate,Us);break;case 1024:Us.effectTag&=-1025;break;case 1028:Us.effectTag&=-1025,vs(Us.alternate,Us);break;case 4:vs(Us.alternate,Us);break;case 8:hs(s,l=Us,u),cs(l)}Us=Us.nextEffect}}catch(e){if(null===Us)throw Error(a(330));Eu(Us,e),Us=Us.nextEffect}}while(null!==Us);if(E=mn,_=dn(),w=E.focusedElem,u=E.selectionRange,_!==w&&w&&w.ownerDocument&&pn(w.ownerDocument.documentElement,w)){null!==u&&hn(w)&&(_=u.start,void 0===(E=u.end)&&(E=_),"selectionStart"in w?(w.selectionStart=_,w.selectionEnd=Math.min(E,w.value.length)):(E=(_=w.ownerDocument||document)&&_.defaultView||window).getSelection&&(E=E.getSelection(),l=w.textContent.length,s=Math.min(u.start,l),u=void 0===u.end?s:Math.min(u.end,l),!E.extend&&s>u&&(l=u,u=s,s=l),l=fn(w,s),f=fn(w,u),l&&f&&(1!==E.rangeCount||E.anchorNode!==l.node||E.anchorOffset!==l.offset||E.focusNode!==f.node||E.focusOffset!==f.offset)&&((_=_.createRange()).setStart(l.node,l.offset),E.removeAllRanges(),s>u?(E.addRange(_),E.extend(f.node,f.offset)):(_.setEnd(f.node,f.offset),E.addRange(_))))),_=[];for(E=w;E=E.parentNode;)1===E.nodeType&&_.push({element:E,left:E.scrollLeft,top:E.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<_.length;w++)(E=_[w]).element.scrollLeft=E.left,E.element.scrollTop=E.top}Kt=!!yn,mn=yn=null,e.current=n,Us=o;do{try{for(w=e;null!==Us;){var x=Us.effectTag;if(36&x&&ss(w,Us.alternate,Us),128&x){_=void 0;var S=Us.ref;if(null!==S){var O=Us.stateNode;Us.tag,_=O,"function"==typeof S?S(_):S.current=_}}Us=Us.nextEffect}}catch(e){if(null===Us)throw Error(a(330));Eu(Us,e),Us=Us.nextEffect}}while(null!==Us);Us=null,Lo(),Ts=i}else e.current=n;if(Vs)Vs=!1,Ws=e,Ks=t;else for(Us=o;null!==Us;)t=Us.nextEffect,Us.nextEffect=null,Us=t;if(0===(t=e.firstPendingTime)&&(zs=null),1073741823===t?e===Gs?qs++:(qs=0,Gs=e):qs=0,"function"==typeof Ou&&Ou(n.stateNode,r),tu(e),Fs)throw Fs=!1,e=Bs,Bs=null,e;return 0!=(8&Ts)||Go(),null}function mu(){for(;null!==Us;){var e=Us.effectTag;0!=(256&e)&&os(Us.alternate,Us),0==(512&e)||Vs||(Vs=!0,Ho(97,(function(){return bu(),null}))),Us=Us.nextEffect}}function bu(){if(90!==Ks){var e=97<Ks?97:Ks;return Ks=90,Ko(e,wu)}}function wu(){if(null===Ws)return!1;var e=Ws;if(Ws=null,0!=(48&Ts))throw Error(a(331));var t=Ts;for(Ts|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:is(5,n),as(5,n)}}catch(t){if(null===e)throw Error(a(330));Eu(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Ts=t,Go(),!0}function _u(e,t,n){fi(e,t=ms(e,t=es(n,t),1073741823)),null!==(e=Xs(e,1073741823))&&tu(e)}function Eu(e,t){if(3===e.tag)_u(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){_u(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===zs||!zs.has(r))){fi(n,e=bs(n,e=es(t,e),1073741823)),null!==(n=Xs(n,1073741823))&&tu(n);break}}n=n.return}}function xu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Ps===e&&Cs===n?Ns===ks||Ns===Os&&1073741823===Is&&zo()-Ms<500?au(e,Cs):Ls=!0:Du(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,tu(e)))}function Su(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(t=Qs(t=Ys(),e,null)),null!==(e=Xs(e,t))&&tu(e)}ws=function(e,t,n){var r=t.expirationTime;if(null!==e){var o=t.pendingProps;if(e.memoizedProps!==o||vo.current)Aa=!0;else{if(r<n){switch(Aa=!1,t.tag){case 3:Ba(t),Ca();break;case 5:if(Di(t),4&t.mode&&1!==n&&o.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:mo(t.type)&&Eo(t);break;case 4:Ri(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,o=t.type._context,fo(Jo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Ha(e,t,n):(fo(Mi,1&Mi.current),null!==(t=Ya(e,t,n))?t.sibling:null);fo(Mi,1&Mi.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Za(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),fo(Mi,Mi.current),!r)return null}return Ya(e,t,n)}Aa=!1}}else Aa=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=yo(t,ho.current),ii(t,n),o=Yi(null,t,r,e,o,n),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,mo(r)){var i=!0;Eo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ui(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&yi(t,r,s,e),o.updater=mi,t.stateNode=o,o._reactInternalFiber=t,Ei(t,r,e,n),t=Fa(null,t,r,!0,i,n)}else t.tag=0,Ia(null,t,o,n),t=t.child;return t;case 16:e:{if(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(o),1!==o._status)throw o._result;switch(o=o._result,t.type=o,i=t.tag=function(e){if("function"==typeof e)return ju(e)?1:0;if(null!=e){if((e=e.$$typeof)===ue)return 11;if(e===fe)return 14}return 2}(o),e=Qo(o,e),i){case 0:t=Ma(null,t,o,e,n);break e;case 1:t=Ua(null,t,o,e,n);break e;case 11:t=Ra(null,t,o,e,n);break e;case 14:t=$a(null,t,o,Qo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ma(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ua(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 3:if(Ba(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ci(e,t),di(t,r,null,n),(r=t.memoizedState.element)===o)Ca(),t=Ya(e,t,n);else{if((o=t.stateNode.hydrate)&&(xa=xn(t.stateNode.containerInfo.firstChild),Ea=t,o=Sa=!0),o)for(n=Pi(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Ia(e,t,r,n),Ca();t=t.child}return t;case 5:return Di(t),null===e&&Ta(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,wn(r,o)?s=null:null!==i&&wn(r,i)&&(t.effectTag|=16),La(e,t),4&t.mode&&1!==n&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Ia(e,t,s,n),t=t.child),t;case 6:return null===e&&Ta(t),null;case 13:return Ha(e,t,n);case 4:return Ri(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ti(t,null,r,n):Ia(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ra(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 7:return Ia(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ia(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var u=t.type._context;if(fo(Jo,u._currentValue),u._currentValue=i,null!==s)if(u=s.value,0==(i=Ur(u,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(s.children===o.children&&!vo.current){t=Ya(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!=(l.observedBits&i)){1===u.tag&&((l=li(n,null)).tag=2,fi(u,l)),u.expirationTime<n&&(u.expirationTime=n),null!==(l=u.alternate)&&l.expirationTime<n&&(l.expirationTime=n),oi(u.return,n),c.expirationTime<n&&(c.expirationTime=n);break}l=l.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Ia(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ii(t,n),r=r(o=ai(o,i.unstable_observedBits)),t.effectTag|=1,Ia(e,t,r,n),t.child;case 14:return i=Qo(o=t.type,t.pendingProps),$a(e,t,o,i=Qo(o.type,i),r,n);case 15:return Da(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,mo(r)?(e=!0,Eo(t)):e=!1,ii(t,n),wi(t,r,o),Ei(t,r,o,n),Fa(null,t,r,!0,e,n);case 19:return Za(e,t,n)}throw Error(a(156,t.tag))};var Ou=null,ku=null;function Tu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Pu(e,t,n,r){return new Tu(e,t,n,r)}function ju(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Cu(e,t){var n=e.alternate;return null===n?((n=Pu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Nu(e,t,n,r,o,i){var s=2;if(r=e,"function"==typeof e)ju(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case ne:return Au(n.children,o,i,t);case se:s=8,o|=7;break;case re:s=8,o|=1;break;case oe:return(e=Pu(12,n,t,8|o)).elementType=oe,e.type=oe,e.expirationTime=i,e;case ce:return(e=Pu(13,n,t,o)).type=ce,e.elementType=ce,e.expirationTime=i,e;case le:return(e=Pu(19,n,t,o)).elementType=le,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ie:s=10;break e;case ae:s=9;break e;case ue:s=11;break e;case fe:s=14;break e;case pe:s=16,r=null;break e;case de:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Pu(s,n,t,o)).elementType=e,t.type=r,t.expirationTime=i,t}function Au(e,t,n,r){return(e=Pu(7,e,r,t)).expirationTime=n,e}function Iu(e,t,n){return(e=Pu(6,e,null,t)).expirationTime=n,e}function Ru(e,t,n){return(t=Pu(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $u(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Du(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Lu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Mu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Uu(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Fu(e,t,n,r){var o=t.current,i=Ys(),s=vi.suspense;i=Qs(i,o,s);e:if(n){t:{if(Je(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(mo(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(mo(c)){n=_o(n,c,u);break e}}n=u}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=li(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fi(o,t),Js(o,i),i}function Bu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function zu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Vu(e,t){zu(e,t),(e=e.alternate)&&zu(e,t)}function Wu(e,t,n){var r=new $u(e,t,n=null!=n&&!0===n.hydrate),o=Pu(3,null,null,2===t?7:1===t?3:0);r.current=o,o.stateNode=r,ui(o),e[Pn]=r.current,n&&0!==t&&function(e,t){var n=Qe(t);Ot.forEach((function(e){dt(e,t,n)})),kt.forEach((function(e){dt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Ku(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Hu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var s=o;o=function(){var e=Bu(a);s.call(e)}}Fu(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Wu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var u=o;o=function(){var e=Bu(a);u.call(e)}}iu((function(){Fu(t,a,e,o)}))}return Bu(a)}function qu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Gu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ku(t))throw Error(a(200));return qu(e,t,null,n)}Wu.prototype.render=function(e){Fu(e,this._internalRoot,null,null)},Wu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Fu(null,e,null,(function(){t[Pn]=null}))},ht=function(e){if(13===e.tag){var t=Yo(Ys(),150,100);Js(e,t),Vu(e,t)}},vt=function(e){13===e.tag&&(Js(e,3),Vu(e,3))},gt=function(e){if(13===e.tag){var t=Ys();Js(e,t=Qs(t,e,null)),Vu(e,t)}},P=function(e,t,n){switch(t){case"input":if(Oe(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=An(r);if(!o)throw Error(a(90));_e(r),Oe(r,o)}}}break;case"textarea":Ae(e,n);break;case"select":null!=(t=n.value)&&je(e,!!n.multiple,t,!1)}},R=ou,$=function(e,t,n,r,o){var i=Ts;Ts|=4;try{return Ko(98,e.bind(null,t,n,r,o))}finally{0===(Ts=i)&&Go()}},D=function(){0==(49&Ts)&&(function(){if(null!==Hs){var e=Hs;Hs=null,e.forEach((function(e,t){Uu(t,e),tu(t)})),Go()}}(),bu())},L=function(e,t){var n=Ts;Ts|=2;try{return e(t)}finally{0===(Ts=n)&&Go()}};var Zu={Events:[Cn,Nn,An,k,x,Un,function(e){rt(e,Mn)},A,I,Yt,at,bu,{current:!1}]};!function(e){var t=e.findFiberByHostInstance;!function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Ou=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},ku=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(o({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=tt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:jn,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zu,t.createPortal=Gu,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=tt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Ts))throw Error(a(187));var n=Ts;Ts|=1;try{return Ko(99,e.bind(null,t))}finally{Ts=n,Go()}},t.hydrate=function(e,t,n){if(!Ku(t))throw Error(a(200));return Hu(null,e,t,!0,n)},t.render=function(e,t,n){if(!Ku(t))throw Error(a(200));return Hu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ku(e))throw Error(a(40));return!!e._reactRootContainer&&(iu((function(){Hu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Pn]=null}))})),!0)},t.unstable_batchedUpdates=ou,t.unstable_createPortal=function(e,t){return Gu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ku(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Hu(e,t,n,!1,r)},t.version="16.14.0"},2788:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(3975)},8447:(e,t,n)=>{"use strict";var r=n(4516),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,d=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}function _(){}function E(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=w.prototype;var x=E.prototype=new _;x.constructor=E,r(x,w.prototype),x.isPureReactComponent=!0;var S={current:null},O=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)O.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:S.current}}function P(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var j=/\/+/g,C=[];function N(e,t,n,r){if(C.length){var o=C.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function A(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>C.length&&C.push(e)}function I(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var s=!1;if(null===e)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return n(r,e,""===t?"."+$(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=t+$(o=e[u],u);s+=I(o,c,n,r)}else if("function"==typeof(c=null===e||"object"!=typeof e?null:"function"==typeof(c=g&&e[g]||e["@@iterator"])?c:null))for(e=c.call(e),u=0;!(o=e.next()).done;)s+=I(o=o.value,c=t+$(o,u++),n,r);else if("object"===o)throw n=""+e,Error(y(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return s}function R(e,t,n){return null==e?0:I(e,"",t,n)}function $(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function D(e,t){e.func.call(e.context,t,e.count++)}function L(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?M(e,r,n,(function(e){return e})):null!=e&&(P(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(j,"$&/")+"/")+n)),r.push(e))}function M(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(j,"$&/")+"/"),R(e,L,t=N(t,i,r,o)),A(t)}var U={current:null};function F(){var e=U.current;if(null===e)throw Error(y(321));return e}var B={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return M(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;R(e,D,t=N(null,null,t,n)),A(t)},count:function(e){return R(e,(function(){return null}),null)},toArray:function(e){var t=[];return M(e,t,null,(function(e){return e})),t},only:function(e){if(!P(e))throw Error(y(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=c,t.PureComponent=E,t.StrictMode=u,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,t.cloneElement=function(e,t,n){if(null==e)throw Error(y(267,e));var o=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)O.call(t,l)&&!k.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=T,t.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=P,t.lazy=function(e){return{$$typeof:v,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.14.0"},2735:(e,t,n)=>{"use strict";e.exports=n(8447)},921:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});var r=n(7811),o=n(9714),i=n(2412),a=n(4002),s=n(7430);function u(e){return 0===e.length?s.y:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var c=n(5769),l=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 a=this.operator,s=function(e,t,n){if(e){if(e instanceof r.L)return e;if(e[o.b])return e[o.b]()}return e||t||n?new r.L(e,t,n):new r.L(i.c)}(e,t,n);if(a?s.add(a.call(s,this.source)):s.add(this.source||c.v.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),c.v.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){c.v.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),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.L?o:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=f(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[a.L]=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:u(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(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}();function f(e){if(e||(e=c.v.Promise||Promise),!e)throw new Error("no Promise impl found");return e}},2412:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});var r=n(5769),o=n(1450),i={closed:!0,next:function(e){},error:function(e){if(r.v.useDeprecatedSynchronousErrorHandling)throw e;(0,o.z)(e)},complete:function(){}}},2585:(e,t,n)=>{"use strict";n.d(t,{xQ:()=>f});var r=n(7080),o=n(921),i=n(7811),a=n(1098),s=n(7043),u=n(6362),c=n(9714),l=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return r.ZT(t,e),t}(i.L),f=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 r.ZT(t,e),t.prototype[c.b]=function(){return new l(this)},t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new s.N;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 s.N;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 s.N;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)throw new s.N;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new s.N;return this.hasError?(e.error(this.thrownError),a.w.EMPTY):this.isStopped?(e.complete(),a.w.EMPTY):(this.observers.push(e),new u.W(this,e))},t.prototype.asObservable=function(){var e=new o.y;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(o.y),p=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return r.ZT(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):a.w.EMPTY},t}(f)},6362:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(7080),o=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return r.ZT(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(1098).w)},7811:(e,t,n)=>{"use strict";n.d(t,{L:()=>l});var r=n(7080),o=n(9147),i=n(2412),a=n(1098),s=n(9714),u=n(5769),c=n(1450),l=function(e){function t(n,r,o){var a=e.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=i.c;break;case 1:if(!n){a.destination=i.c;break}if("object"==typeof n){n instanceof t?(a.syncErrorThrowable=n.syncErrorThrowable,a.destination=n,n.add(a)):(a.syncErrorThrowable=!0,a.destination=new f(a,n));break}default:a.syncErrorThrowable=!0,a.destination=new f(a,n,r,o)}return a}return r.ZT(t,e),t.prototype[s.b]=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}(a.w),f=function(e){function t(t,n,r,a){var s,u=e.call(this)||this;u._parentSubscriber=t;var c=u;return(0,o.m)(n)?s=n:n&&(s=n.next,r=n.error,a=n.complete,n!==i.c&&(c=Object.create(n),(0,o.m)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=s,u._error=r,u._complete=a,u}return r.ZT(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.v.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.v.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):(0,c.z)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;(0,c.z)(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.v.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(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.v.useDeprecatedSynchronousErrorHandling)throw e;(0,c.z)(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!u.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return u.v.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):((0,c.z)(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(l)},1098:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var r=function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}(),o=n(1167),i=n(9147),a=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}(),s=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,s=n._parentOrParents,c=n._ctorUnsubscribe,l=n._unsubscribe,f=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,s instanceof e)s.remove(this);else if(null!==s)for(var p=0;p<s.length;++p)s[p].remove(this);if((0,i.m)(l)){c&&(this._unsubscribe=void 0);try{l.call(this)}catch(e){t=e instanceof a?u(e.errors):[e]}}if(r(f)){p=-1;for(var d=f.length;++p<d;){var h=f[p];if((0,o.K)(h))try{h.unsubscribe()}catch(e){t=t||[],e instanceof a?t=t.concat(u(e.errors)):t.push(e)}}}if(t)throw new a(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof e){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},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=((t=new e).closed=!0,t),e}();function u(e){return e.reduce((function(e,t){return e.concat(t instanceof a?t.errors:t)}),[])}},5769:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,r=e},get useDeprecatedSynchronousErrorHandling(){return r}}},4002:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var r=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},9714:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},7043:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var r=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},1450:(e,t,n)=>{"use strict";function r(e){setTimeout((function(){throw e}),0)}n.d(t,{z:()=>r})},7430:(e,t,n)=>{"use strict";function r(e){return e}n.d(t,{y:()=>r})},9147:(e,t,n)=>{"use strict";function r(e){return"function"==typeof e}n.d(t,{m:()=>r})},1167:(e,t,n)=>{"use strict";function r(e){return null!==e&&"object"==typeof e}n.d(t,{K:()=>r})},7080:(e,t,n)=>{"use strict";n.d(t,{ZT:()=>o});var 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])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}},9666:(e,t)=>{"use strict";var n,r,o,i,a;if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,u=null,c=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(c,0),e}},l=Date.now();t.unstable_now=function(){return Date.now()-l},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(c,0))},r=function(e,t){u=setTimeout(e,t)},o=function(){clearTimeout(u)},i=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,p=window.Date,d=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var g=p.now();t.unstable_now=function(){return p.now()-g}}var y=!1,m=null,b=-1,w=5,_=0;i=function(){return t.unstable_now()>=_},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,x=E.port2;E.port1.onmessage=function(){if(null!==m){var e=t.unstable_now();_=e+w;try{m(!0,e)?x.postMessage(null):(y=!1,m=null)}catch(e){throw x.postMessage(null),e}}else y=!1},n=function(e){m=e,y||(y=!0,x.postMessage(null))},r=function(e,n){b=d((function(){e(t.unstable_now())}),n)},o=function(){h(b),b=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<T(o,t)))break e;e[r]=t,e[n]=o,n=r}}function O(e){return void 0===(e=e[0])?null:e}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,u=e[s];if(void 0!==a&&0>T(a,n))void 0!==u&&0>T(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>T(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],j=[],C=1,N=null,A=3,I=!1,R=!1,$=!1;function D(e){for(var t=O(j);null!==t;){if(null===t.callback)k(j);else{if(!(t.startTime<=e))break;k(j),t.sortIndex=t.expirationTime,S(P,t)}t=O(j)}}function L(e){if($=!1,D(e),!R)if(null!==O(P))R=!0,n(M);else{var t=O(j);null!==t&&r(L,t.startTime-e)}}function M(e,n){R=!1,$&&($=!1,o()),I=!0;var a=A;try{for(D(n),N=O(P);null!==N&&(!(N.expirationTime>n)||e&&!i());){var s=N.callback;if(null!==s){N.callback=null,A=N.priorityLevel;var u=s(N.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?N.callback=u:N===O(P)&&k(P),D(n)}else k(P);N=O(P)}if(null!==N)var c=!0;else{var l=O(j);null!==l&&r(L,l.startTime-n),c=!1}return c}finally{N=null,A=a,I=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||I||(R=!0,n(M))},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_getFirstCallbackNode=function(){return O(P)},t.unstable_next=function(e){switch(A){case 1:case 2:case 3:var t=3;break;default:t=A}var n=A;A=t;try{return e()}finally{A=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=A;A=e;try{return t()}finally{A=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0<u?s+u:s,a="number"==typeof a.timeout?a.timeout:U(e)}else a=U(e),u=s;return e={id:C++,callback:i,priorityLevel:e,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(e.sortIndex=u,S(j,e),null===O(P)&&e===O(j)&&($?o():$=!0,r(L,u-s))):(e.sortIndex=a,S(P,e),R||I||(R=!0,n(M))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();D(e);var n=O(P);return n!==N&&null!==N&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<N.expirationTime||i()},t.unstable_wrapCallback=function(e){var t=A;return function(){var n=A;A=t;try{return e.apply(this,arguments)}finally{A=n}}}},9146:(e,t,n)=>{"use strict";e.exports=n(9666)},3710:(e,t,n)=>{"use strict";n.d(t,{BP:()=>z,UO:()=>oe});var r=Object.freeze({__proto__:null,get start(){return Ue},get ensureJQuerySupport(){return de},get setBootstrapMaxTime(){return q},get setMountMaxTime(){return G},get setUnmountMaxTime(){return Z},get setUnloadMaxTime(){return Y},get registerApplication(){return Oe},get unregisterApplication(){return Te},get getMountedApps(){return Ee},get getAppStatus(){return Se},get unloadApplication(){return Pe},get checkActivityFunctions(){return ke},get getAppNames(){return xe},get pathToActiveWhen(){return Ne},get navigateToUrl(){return oe},get triggerAppChange(){return $e},get addErrorHandler(){return l},get removeErrorHandler(){return f},get mountRootParcel(){return z},get NOT_LOADED(){return h},get LOADING_SOURCE_CODE(){return v},get NOT_BOOTSTRAPPED(){return g},get BOOTSTRAPPING(){return y},get NOT_MOUNTED(){return m},get MOUNTING(){return b},get UPDATING(){return _},get LOAD_ERROR(){return x},get MOUNTED(){return w},get UNMOUNTING(){return E},get SKIP_BECAUSE_BROKEN(){return S}});function o(e){return(o="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 i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,s=function(){try{var e=new a("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?a:"undefined"!=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=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},u=[];function c(e,t,n){var r=d(e,t,n);u.length?u.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))}function l(e){if("function"!=typeof e)throw Error(p(28,!1));u.push(e)}function f(e){if("function"!=typeof e)throw Error(p(29,!1));var t=!1;return u=u.filter((function(n){var r=n===e;return t=t||r,!r})),t}function p(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function d(e,t,n){var r,o="".concat(j(t)," '").concat(T(t),"' died in status ").concat(t.status,": ");if(e instanceof Error){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(p(30,!1,t.status,T(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=T(t),t.status=n,r}var h="NOT_LOADED",v="LOADING_SOURCE_CODE",g="NOT_BOOTSTRAPPED",y="BOOTSTRAPPING",m="NOT_MOUNTED",b="MOUNTING",w="MOUNTED",_="UPDATING",E="UNMOUNTING",x="LOAD_ERROR",S="SKIP_BECAUSE_BROKEN";function O(e){return e.status===w}function k(e){try{return e.activeWhen(window.location)}catch(t){return c(t,e,S),!1}}function T(e){return e.name}function P(e){return Boolean(e.unmountThisParcel)}function j(e){return P(e)?"parcel":"application"}function C(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function N(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function A(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!N(t,(function(e){return"function"!=typeof e}))));var t}function I(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=j(e),o=T(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return R(n)?n:Promise.reject(p(15,!1,r,o,t,a))}))}),Promise.resolve())}}function R(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function $(e,t){return Promise.resolve().then((function(){return e.status!==g?e:(e.status=y,e.bootstrap?Q(e,"bootstrap").then(n).catch((function(n){if(t)throw d(n,e,S);return c(n,e,S),e})):Promise.resolve().then(n))}));function n(){return e.status=m,e}}function D(e,t){return Promise.resolve().then((function(){if(e.status!==w)return e;e.status=E;var n=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(t)throw d(r,e,S);c(r,e,S)}))})).then((function(){return e}));function r(){return Q(e,"unmount").then((function(){e.status=m})).catch((function(n){if(t)throw d(n,e,S);c(n,e,S)}))}}))}var L=!1,M=!1;function U(e,t){return Promise.resolve().then((function(){return e.status!==m?e:(L||(window.dispatchEvent(new s("single-spa:before-first-mount")),L=!0),Q(e,"mount").then((function(){return e.status=w,M||(window.dispatchEvent(new s("single-spa:first-mount")),M=!0),e})).catch((function(n){return e.status=w,D(e,!0).then(r,r);function r(){if(t)throw d(n,e,S);return c(n,e,S),e}})))}))}var F=0,B={parcels:{}};function z(){return V.apply(B,arguments)}function V(e,t){var n=this;if(!e||"object"!==o(e)&&"function"!=typeof e)throw Error(p(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(p(3,!1,o(e.name)));if("object"!==o(t))throw Error(p(4,!1,name,o(t)));if(!t.domElement)throw Error(p(5,!1,name));var r,i=F++,a="function"==typeof e,s=a?e:function(){return Promise.resolve(e)},u={id:i,parcels:{},status:a?v:g,customProps:t,parentName:T(n),unmountThisParcel:function(){return y.then((function(){if(u.status!==w)throw Error(p(6,!1,name,u.status));return D(u,!0)})).then((function(e){return u.parentName&&delete n.parcels[u.id],e})).then((function(e){return l(e),e})).catch((function(e){throw u.status=S,f(e),e}))}};n.parcels[i]=u;var c=s();if(!c||"function"!=typeof c.then)throw Error(p(7,!1));var l,f,h=(c=c.then((function(e){if(!e)throw Error(p(8,!1));var t=e.name||"parcel-".concat(i);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!A(e.bootstrap))throw Error(p(9,!1,t));if(!A(e.mount))throw Error(p(10,!1,t));if(!A(e.unmount))throw Error(p(11,!1,t));if(e.update&&!A(e.update))throw Error(p(12,!1,t));var n=I(e,"bootstrap"),o=I(e,"mount"),a=I(e,"unmount");u.status=g,u.name=t,u.bootstrap=n,u.mount=o,u.unmount=a,u.timeouts=J(e.timeouts),e.update&&(u.update=I(e,"update"),r.update=function(e){return u.customProps=e,W(function(e){return Promise.resolve().then((function(){if(e.status!==w)throw Error(p(32,!1,T(e)));return e.status=_,Q(e,"update").then((function(){return e.status=w,e})).catch((function(t){throw d(t,e,S)}))}))}(u))})}))).then((function(){return $(u,!0)})),y=h.then((function(){return U(u,!0)})),b=new Promise((function(e,t){l=e,f=t}));return r={mount:function(){return W(Promise.resolve().then((function(){if(u.status!==m)throw Error(p(13,!1,name,u.status));return n.parcels[i]=u,U(u)})))},unmount:function(){return W(u.unmountThisParcel())},getStatus:function(){return u.status},loadPromise:W(c),bootstrapPromise:W(h),mountPromise:W(y),unmountPromise:W(b)}}function W(e){return e.then((function(){return null}))}function K(e){var t=T(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==o(n)||null===n||Array.isArray(n))&&(n={},console.warn(p(40,!1),t,n));var i=C({},n,{name:t,mountParcel:V.bind(e),singleSpa:r});return P(e)&&(i.unmountSelf=e.unmountThisParcel),i}var H={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 q(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(16,!1));H.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function G(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(17,!1));H.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Z(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(18,!1));H.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Y(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(19,!1));H.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Q(e,t){var n=e.timeouts[t],r=n.warningMillis,o=j(e);return new Promise((function(i,a){var s=!1,u=!1;e[t](K(e)).then((function(e){s=!0,i(e)})).catch((function(e){s=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=p(31,!1,t,o,T(e),n.millis);function l(e){if(!s)if(!0===e)u=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!u){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))}function J(e){var t={};for(var n in H)t[n]=C({},H[n],e&&e[n]||{});return t}function X(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==h&&e.status!==x?e:(e.status=v,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(K(e));if(!R(r))throw n=!0,Error(p(33,!1,T(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==o(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!A(t.bootstrap)&&(r=35),A(t.mount)||(r=36),A(t.unmount)||(r=37);var i=j(t);if(r){var a;try{a=JSON.stringify(t)}catch(e){}return console.error(p(r,!1,i,T(e),a),t),c(void 0,e,S),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=C({},e.devtools.overlays,t.devtools.overlays)),e.status=g,e.bootstrap=I(t,"bootstrap"),e.mount=I(t,"mount"),e.unmount=I(t,"unmount"),e.unload=I(t,"unload"),e.timeouts=J(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=S:(r=x,e.loadErrorTime=(new Date).getTime()),c(t,e,r),e})));var t,n}))}var ee,te="undefined"!=typeof window,ne={hashchange:[],popstate:[]},re=["hashchange","popstate"];function oe(e){var 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(p(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=fe(window.location.href),r=fe(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 ie(e){var t=this;if(e){var n=e[0].type;re.indexOf(n)>=0&&ne[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}}function ae(){De([],arguments)}function se(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return ee&&n===o||(Fe()?window.dispatchEvent(ue(window.history.state,t)):De([])),r}}function ue(e,t){var 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}if(te){window.addEventListener("hashchange",ae),window.addEventListener("popstate",ae);var ce=window.addEventListener,le=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&re.indexOf(e)>=0)||N(ne[e],(function(e){return e===t})))return ce.apply(this,arguments);ne[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&re.indexOf(e)>=0))return le.apply(this,arguments);ne[e]=ne[e].filter((function(e){return e!==t}))},window.history.pushState=se(window.history.pushState,"pushState"),window.history.replaceState=se(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(p(41,!1)):window.singleSpaNavigate=oe}function fe(e){var t=document.createElement("a");return t.href=e,t}var pe=!1;function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!pe){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return he.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return he.call(this,n,window.removeEventListener,e,t,arguments)},pe=!0}}function he(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){re.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}var ve={};function ge(e){return Promise.resolve().then((function(){var t=ve[T(e)];if(!t)return e;if(e.status===h)return ye(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==m&&e.status!==x)return e;var n=e.status===x?Promise.resolve():Q(e,"unload");return e.status="UNLOADING",n.then((function(){return ye(e,t),e})).catch((function(n){return function(e,t,n){delete ve[T(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,c(n,e,S),t.reject(n)}(e,t,n),e}))}))}function ye(e,t){delete ve[T(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=h,t.resolve()}function me(e,t,n,r){ve[T(e)]={app:e,resolve:n,reject:r},Object.defineProperty(ve[T(e)],"promise",{get:t})}function be(e){return ve[e]}var we=[];function _e(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return we.forEach((function(i){var a=i.status!==S&&k(i);switch(i.status){case x:a&&o-i.loadErrorTime>=200&&n.push(i);break;case h:case v:a&&n.push(i);break;case g:case m:!a&&be(T(i))?e.push(i):a&&r.push(i);break;case w:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}function Ee(){return we.filter(O).map(T)}function xe(){return we.map(T)}function Se(e){var t=N(we,(function(t){return T(t)===e}));return t?t.status:null}function Oe(e,t,n,r){var i=function(e,t,n,r){var i,a={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===o(e)?(function(e){if(Array.isArray(e)||null===e)throw Error(p(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(p(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(p(20,!1));if("object"!==o(e.app)&&"function"!=typeof e.app)throw Error(p(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(p(24,!1));if(!Ce(e.customProps))throw Error(p(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(p(20,!1));if(!t)throw Error(p(23,!1));if("function"!=typeof n)throw Error(p(24,!1));if(!Ce(r))throw Error(p(22,!1))}(e,t,n,r),a.name=e,a.loadApp=t,a.activeWhen=n,a.customProps=r),a.loadApp="function"!=typeof(i=a.loadApp)?function(){return Promise.resolve(i)}:i,a.customProps=function(e){return e||{}}(a.customProps),a.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:Ne(e)})),function(e){return t.some((function(t){return t(e)}))}}(a.activeWhen),a}(e,t,n,r);if(-1!==xe().indexOf(i.name))throw Error(p(21,!1,i.name));we.push(C({loadErrorTime:null,status:h,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},i)),te&&(de(),De())}function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return we.filter((function(t){return t.activeWhen(e)})).map(T)}function Te(e){if(0===we.filter((function(t){return T(t)===e})).length)throw Error(p(25,!1,e));return Pe(e).then((function(){var t=we.map(T).indexOf(e);we.splice(t,1)}))}function Pe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(p(26,!1));var n=N(we,(function(t){return T(t)===e}));if(!n)throw Error(p(27,!1,e));var r,o=be(T(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){me(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,je(n,o.resolve,o.reject)):r=new Promise((function(e,t){me(n,(function(){return r}),e,t),je(n,e,t)})),r}function je(e,t,n){D(e).then(ge).then((function(){t(),setTimeout((function(){De()}))})).catch(n)}function Ce(e){return!e||"function"==typeof e||"object"===o(e)&&null!==e&&!Array.isArray(e)}function Ne(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&s(i)}return s(e.length),new RegExp(o,"i");function s(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var s=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(s,"$"):"".concat(o,"(/").concat(s,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}var Ae=!1,Ie=[],Re=te&&window.location.href;function $e(){return De()}function De(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(Ae)return new Promise((function(e,n){Ie.push({resolve:e,reject:n,eventArguments:t})}));var n,r=_e(),o=r.appsToUnload,a=r.appsToUnmount,u=r.appsToLoad,c=r.appsToMount,l=!1,f=Re,p=Re=window.location.href;return Fe()?(Ae=!0,n=o.concat(u,a,c),g()):(n=u,v());function d(){l=!0}function v(){return Promise.resolve().then((function(){var e=u.map(X);return Promise.all(e).then(b).then((function(){return[]})).catch((function(e){throw b(),e}))}))}function g(){return Promise.resolve().then((function(){if(window.dispatchEvent(new s(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",_(!0))),window.dispatchEvent(new s("single-spa:before-routing-event",_(!0,{cancelNavigation:d}))),l)return window.dispatchEvent(new s("single-spa:before-mount-routing-event",_(!0))),y(),void oe(f);var t=o.map(ge),r=a.map(D).map((function(e){return e.then(ge)})).concat(t),i=Promise.all(r);i.then((function(){window.dispatchEvent(new s("single-spa:before-mount-routing-event",_(!0)))}));var p=u.map((function(e){return X(e).then((function(e){return Le(e,i)}))})),h=c.filter((function(e){return u.indexOf(e)<0})).map((function(e){return Le(e,i)}));return i.catch((function(e){throw b(),e})).then((function(){return b(),Promise.all(p.concat(h)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(y)}))}))}function y(){var t=Ee();e.forEach((function(e){return e.resolve(t)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new s(r,_())),window.dispatchEvent(new s("single-spa:routing-event",_()))}catch(e){setTimeout((function(){throw e}))}if(Ae=!1,Ie.length>0){var o=Ie;Ie=[],De(o)}return t}function b(){e.forEach((function(e){ie(e.eventArguments)})),ie(t)}function _(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=arguments.length>1?arguments[1]:void 0,d={},v=(i(e={},w,[]),i(e,m,[]),i(e,h,[]),i(e,S,[]),e);r?(u.concat(c).forEach((function(e,t){y(e,w)})),o.forEach((function(e){y(e,h)})),a.forEach((function(e){y(e,m)}))):n.forEach((function(e){y(e)}));var g={detail:{newAppStatuses:d,appsByNewStatus:v,totalAppChanges:n.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:p,navigationIsCanceled:l}};return s&&C(g.detail,s),g;function y(e,t){var n=T(e);t=t||Se(n),d[n]=t,(v[t]=v[t]||[]).push(n)}}}function Le(e,t){return k(e)?$(e).then((function(e){return t.then((function(){return k(e)?U(e):e}))})):t.then((function(){return e}))}var Me=!1;function Ue(e){var t;Me=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,ee=t),te&&De()}function Fe(){return Me}te&&setTimeout((function(){Me||console.warn(p(1,!1))}),5e3);var Be={getRawAppData:function(){return[].concat(we)},reroute:De,NOT_LOADED:h,toLoadPromise:X,toBootstrapPromise:$,unregisterApplication:Te};te&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Be)},7968:(e,t,n)=>{const r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a};Number.isInteger},6763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(682),o=n(658);const i=(0,r.Z)(o.Z,"Map")},7851:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(658).Z.Symbol},963:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7851),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r.Z?r.Z.toStringTag:void 0;var u=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}(e):function(e){return u.call(e)}(e)}},9295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9494);const o=(0,n(6899).Z)(Object.keys,Object);var i=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,r.Z)(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},5852:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(3200);const o=n(658).Z["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var s=n(7275),u=n(9441),c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,p=l.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const v=function(e){return!(!(0,s.Z)(e)||(t=e,a&&a in t))&&((0,r.Z)(e)?h:c).test((0,u.Z)(e));var t},g=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return v(n)?n:void 0}},606:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(682),o=n(658);const i=(0,r.Z)(o.Z,"DataView");var a=n(6763);const s=(0,r.Z)(o.Z,"Promise"),u=(0,r.Z)(o.Z,"Set"),c=(0,r.Z)(o.Z,"WeakMap");var l=n(963),f=n(9441),p="[object Map]",d="[object Promise]",h="[object Set]",v="[object WeakMap]",g="[object DataView]",y=(0,f.Z)(i),m=(0,f.Z)(a.Z),b=(0,f.Z)(s),w=(0,f.Z)(u),_=(0,f.Z)(c),E=l.Z;(i&&E(new i(new ArrayBuffer(1)))!=g||a.Z&&E(new a.Z)!=p||s&&E(s.resolve())!=d||u&&E(new u)!=h||c&&E(new c)!=v)&&(E=function(e){var t=(0,l.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,f.Z)(n):"";if(r)switch(r){case y:return g;case m:return p;case b:return d;case w:return h;case _:return v}return t});const x=E},9494:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=Object.prototype;const o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},6899:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},658:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5852),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.Z||o||Function("return this")()},9441:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=Function.prototype.toString;const o=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},175:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(963),o=n(4897);const i=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,s=a.hasOwnProperty,u=a.propertyIsEnumerable,c=i(function(){return arguments}())?i:function(e){return(0,o.Z)(e)&&s.call(e,"callee")&&!u.call(e,"callee")};const l=c},6575:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},6905:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3200),o=n(3492);const i=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,r.Z)(e)}},7840:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(658);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?r.Z.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},3202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>X});const r=function(e,t){return e===t||e!=e&&t!=t},o=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1};var i=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=o(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const s=a;var u=n(6763);const c=(0,n(682).Z)(Object,"create");var l=Object.prototype.hasOwnProperty;var f=Object.prototype.hasOwnProperty;function p(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}p.prototype.clear=function(){this.__data__=c?c(null):{},this.size=0},p.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},p.prototype.get=function(e){var t=this.__data__;if(c){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return l.call(t,e)?t[e]:void 0},p.prototype.has=function(e){var t=this.__data__;return c?void 0!==t[e]:f.call(t,e)},p.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=c&&void 0===t?"__lodash_hash_undefined__":t,this};const d=p,h=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function v(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}v.prototype.clear=function(){this.size=0,this.__data__={hash:new d,map:new(u.Z||s),string:new d}},v.prototype.delete=function(e){var t=h(this,e).delete(e);return this.size-=t?1:0,t},v.prototype.get=function(e){return h(this,e).get(e)},v.prototype.has=function(e){return h(this,e).has(e)},v.prototype.set=function(e,t){var n=h(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const g=v;function y(e){var t=this.__data__=new s(e);this.size=t.size}y.prototype.clear=function(){this.__data__=new s,this.size=0},y.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},y.prototype.get=function(e){return this.__data__.get(e)},y.prototype.has=function(e){return this.__data__.has(e)},y.prototype.set=function(e,t){var n=this.__data__;if(n instanceof s){var r=n.__data__;if(!u.Z||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new g(r)}return n.set(e,t),this.size=n.size,this};const m=y;function b(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new g;++t<n;)this.add(e[t])}b.prototype.add=b.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},b.prototype.has=function(e){return this.__data__.has(e)};const w=b,_=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},E=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,d=2&n?new w:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],v=t[f];if(r)var g=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==g){if(g)continue;p=!1;break}if(d){if(!_(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p};var x=n(7851);const S=n(658).Z.Uint8Array,O=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},k=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var T=x.Z?x.Z.prototype:void 0,P=T?T.valueOf:void 0;var j=n(6575);var C=Object.prototype.propertyIsEnumerable,N=Object.getOwnPropertySymbols;const A=N?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(N(e),(function(t){return C.call(e,t)})))}:function(){return[]};var I=n(175),R=n(7840),$=/^(?:0|[1-9]\d*)$/;const D=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&$.test(e))&&e>-1&&e%1==0&&e<t};var L=n(8396),M=Object.prototype.hasOwnProperty;const U=function(e,t){var n=(0,j.Z)(e),r=!n&&(0,I.Z)(e),o=!n&&!r&&(0,R.Z)(e),i=!n&&!r&&!o&&(0,L.Z)(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var c in e)!t&&!M.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||D(c,u))||s.push(c);return s};var F=n(9295),B=n(6905);const z=function(e){return(0,B.Z)(e)?U(e):(0,F.Z)(e)},V=function(e){return function(e,t,n){var r=t(e);return(0,j.Z)(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,z,A)};var W=Object.prototype.hasOwnProperty;var K=n(606),H="[object Arguments]",q="[object Array]",G="[object Object]",Z=Object.prototype.hasOwnProperty;const Y=function(e,t,n,o,i,a){var s=(0,j.Z)(e),u=(0,j.Z)(t),c=s?q:(0,K.Z)(e),l=u?q:(0,K.Z)(t),f=(c=c==H?G:c)==G,p=(l=l==H?G:l)==G,d=c==l;if(d&&(0,R.Z)(e)){if(!(0,R.Z)(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new m),s||(0,L.Z)(e)?E(e,t,n,o,i,a):function(e,t,n,o,i,a,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new S(e),new S(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=O;case"[object Set]":var c=1&o;if(u||(u=k),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;o|=2,s.set(e,t);var f=E(u(e),u(t),o,i,a,s);return s.delete(e),f;case"[object Symbol]":if(P)return P.call(e)==P.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var h=f&&Z.call(e,"__wrapped__"),v=p&&Z.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,y=v?t.value():t;return a||(a=new m),i(g,y,n,o,a)}}return!!d&&(a||(a=new m),function(e,t,n,r,o,i){var a=1&n,s=V(e),u=s.length;if(u!=V(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:W.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var v=e[l=s[c]],g=t[l];if(r)var y=a?r(g,v,l,t,e,i):r(v,g,l,e,t,i);if(!(void 0===y?v===g||o(v,g,n,r,i):y)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,o,i,a))};var Q=n(4897);const J=function e(t,n,r,o,i){return t===n||(null==t||null==n||!(0,Q.Z)(t)&&!(0,Q.Z)(n)?t!=t&&n!=n:Y(t,n,r,o,e,i))},X=function(e,t){return J(e,t)}},3200:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(963),o=n(7275);const i=function(e){if(!(0,o.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3492:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7275:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},4897:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},8396:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(963),o=n(3492),i=n(4897),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=n(5852),u="object"==typeof exports&&exports&&!exports.nodeType&&exports,c=u&&"object"==typeof module&&module&&!module.nodeType&&module,l=c&&c.exports===u&&s.Z.process,f=function(){try{return c&&c.require&&c.require("util").types||l&&l.binding&&l.binding("util")}catch(e){}}(),p=f&&f.isTypedArray;const d=p?(h=p,function(e){return h(e)}):function(e){return(0,i.Z)(e)&&(0,o.Z)(e.length)&&!!a[(0,r.Z)(e)]};var h}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={id:t,loaded:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.y=t,r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(7968).s)(1),(()=>{"use strict";r.r(o),r.d(o,{AppState:()=>f.aB,AssignedExtension:()=>s.pv,CancelLoading:()=>s.x9,ConfigStore:()=>i.JU,ConfigurableLink:()=>l.w,ConnectedExtension:()=>s.uP,ConnectivityChangedEvent:()=>u.ac,Extension:()=>l.hj,ExtensionData:()=>l.g,ExtensionMeta:()=>s.uu,ExtensionRegistration:()=>s.tj,ExtensionSlot:()=>l.dT,ExtensionSlotState:()=>s.u_,ExtensionStore:()=>s.qN,InlineNotificationType:()=>p.iW,NotificationDescriptor:()=>p.MK,OfflineMode:()=>c.iC,OfflineModeResult:()=>c.Vm,OpenmrsFetchError:()=>e.nF,PrecacheStaticDependenciesEvent:()=>u.hM,QueueItemDescriptor:()=>c.Cg,ShowNotificationEvent:()=>u.Kj,ShowToastEvent:()=>u.P3,SyncItem:()=>c.we,SyncProcessOptions:()=>c.Ug,ToastDescriptor:()=>p.fU,ToastNotificationMeta:()=>p.yQ,ToastType:()=>p.pC,Type:()=>i.Dy,UserHasAccess:()=>l.Vz,VisitMode:()=>e.u4,VisitStatus:()=>e.Rx,attach:()=>s.ub,backendDependencies:()=>e.Wf,beginEditSynchronizationItem:()=>c.jp,canBeginEditSynchronizationItemsOfType:()=>c.Qd,createGlobalStore:()=>f.jk,createUseStore:()=>l.NV,defaultVisitCustomRepresentation:()=>e.I$,defineConfigSchema:()=>i.SH,defineExtensionConfigSchema:()=>i.Tj,deleteSynchronizationItem:()=>c.Gy,detach:()=>s.og,detachAll:()=>s.lW,fetchCurrentPatient:()=>e.Vy,fhir:()=>e.N$,fhirBaseUrl:()=>e.DN,generateOfflineUuid:()=>c.sF,getAppState:()=>f.W5,getAssignedExtensions:()=>s.h6,getAsyncExtensionLifecycle:()=>l.D$,getAsyncLifecycle:()=>l.Ae,getConfig:()=>i.iE,getConfigStore:()=>i.pR,getConnectedExtensions:()=>s.Kq,getCurrentOfflineMode:()=>c.vm,getCurrentUser:()=>e.ts,getExtensionNameFromId:()=>s.EB,getExtensionStore:()=>s.yw,getGlobalStore:()=>f.zJ,getLifecycle:()=>l.tl,getLocations:()=>e.JC,getLoggedInUser:()=>e.r,getOfflineDb:()=>c.aA,getOfflinePatientDataStore:()=>c.k1,getSessionLocation:()=>e.WK,getStartedVisit:()=>e.$X,getSyncLifecycle:()=>l.a$,getSynchronizationItem:()=>c.TI,getSynchronizationItems:()=>c.Q2,getVisitTypes:()=>e.P9,getVisitsForPatient:()=>e.nx,inRange:()=>i.Z2,interpolateString:()=>i.IT,interpolateUrl:()=>i.ll,isOfflineUuid:()=>c.z7,isUrl:()=>i.CB,isUrlWithTemplateParameters:()=>i.gZ,loadPersistedPatientDataSyncState:()=>c.nN,makeUrl:()=>e.bf,messageOmrsServiceWorker:()=>c.gp,navigate:()=>i.c4,offlineUuidPrefix:()=>c.a7,omrsOfflineCachingStrategyHttpHeaderName:()=>c.Rz,omrsOfflineResponseBodyHttpHeaderName:()=>c.QI,omrsOfflineResponseStatusHttpHeaderName:()=>c.$9,openmrsFetch:()=>e.vb,openmrsObservableFetch:()=>e.uj,provide:()=>i.JJ,queueSynchronizationItem:()=>c.X2,refetchCurrentUser:()=>e.VJ,registerExtension:()=>s.ix,registerExtensionSlot:()=>s.Qq,registerOfflinePatientHandler:()=>c.dt,renderExtension:()=>s.H8,saveVisit:()=>e.bX,sessionEndpoint:()=>e.z$,setSessionLocation:()=>e.jK,setupOfflineSync:()=>c.H_,showModal:()=>p.K4,showNotification:()=>p.c0,showToast:()=>p.CF,subscribeConnectivity:()=>u.BW,subscribeConnectivityChanged:()=>u.XS,subscribeNotificationShown:()=>u.NQ,subscribePrecacheStaticDependencies:()=>u.dY,subscribeTo:()=>f.se,subscribeToastShown:()=>u.id,syncOfflinePatientData:()=>c.MO,toLocationObject:()=>e.Lq,toVisitTypeObject:()=>e.VF,updateVisit:()=>e.ym,useAssignedExtensionIds:()=>l.YV,useAssignedExtensions:()=>l.P3,useBodyScrollLock:()=>l.yn,useConfig:()=>l.ZR,useConnectedExtensions:()=>l.BL,useConnectivity:()=>l.Y9,useCurrentPatient:()=>l.Yq,useExtensionSlot:()=>l.p8,useExtensionSlotMeta:()=>l.qd,useExtensionStore:()=>l.jf,useLayoutType:()=>l.mr,useLocations:()=>l.Z_,useOnClickOutside:()=>l.t$,usePagination:()=>l.h0,usePatient:()=>l.lm,useSessionUser:()=>l.Oy,useStore:()=>l.oR,useStoreWithActions:()=>l.xQ,useVisit:()=>l.JF,useVisitTypes:()=>l.NN,userHasAccess:()=>e.y9,validator:()=>i.sC,validators:()=>i.z2});var e=r(2199),t=r(3107),n={};for(const e in t)["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess"].indexOf(e)<0&&(n[e]=()=>t[e]);r.d(o,n);var i=r(5734),a=r(4729);n={};for(const e in a)["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess","ConfigStore","Type","defineConfigSchema","defineExtensionConfigSchema","getConfig","getConfigStore","inRange","interpolateString","interpolateUrl","isUrl","isUrlWithTemplateParameters","navigate","provide","validator","validators"].indexOf(e)<0&&(n[e]=()=>a[e]);r.d(o,n);var s=r(9187),u=r(5763),c=r(5614),l=r(4734),f=r(9850),p=r(7202),d=r(3315);n={};for(const e in d)["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess","ConfigStore","Type","defineConfigSchema","defineExtensionConfigSchema","getConfig","getConfigStore","inRange","interpolateString","interpolateUrl","isUrl","isUrlWithTemplateParameters","navigate","provide","validator","validators","AssignedExtension","CancelLoading","ConnectedExtension","ExtensionMeta","ExtensionRegistration","ExtensionSlotState","ExtensionStore","attach","detach","detachAll","getAssignedExtensions","getConnectedExtensions","getExtensionNameFromId","getExtensionStore","registerExtension","registerExtensionSlot","renderExtension","ConnectivityChangedEvent","PrecacheStaticDependenciesEvent","ShowNotificationEvent","ShowToastEvent","subscribeConnectivity","subscribeConnectivityChanged","subscribeNotificationShown","subscribePrecacheStaticDependencies","subscribeToastShown","OfflineMode","OfflineModeResult","QueueItemDescriptor","SyncItem","SyncProcessOptions","beginEditSynchronizationItem","canBeginEditSynchronizationItemsOfType","deleteSynchronizationItem","generateOfflineUuid","getCurrentOfflineMode","getOfflineDb","getOfflinePatientDataStore","getSynchronizationItem","getSynchronizationItems","isOfflineUuid","loadPersistedPatientDataSyncState","messageOmrsServiceWorker","offlineUuidPrefix","omrsOfflineCachingStrategyHttpHeaderName","omrsOfflineResponseBodyHttpHeaderName","omrsOfflineResponseStatusHttpHeaderName","queueSynchronizationItem","registerOfflinePatientHandler","setupOfflineSync","syncOfflinePatientData","ConfigurableLink","Extension","ExtensionData","ExtensionSlot","UserHasAccess","createUseStore","getAsyncExtensionLifecycle","getAsyncLifecycle","getLifecycle","getSyncLifecycle","useAssignedExtensionIds","useAssignedExtensions","useBodyScrollLock","useConfig","useConnectedExtensions","useConnectivity","useCurrentPatient","useExtensionSlot","useExtensionSlotMeta","useExtensionStore","useLayoutType","useLocations","useOnClickOutside","usePagination","usePatient","useSessionUser","useStore","useStoreWithActions","useVisit","useVisitTypes","AppState","createGlobalStore","getAppState","getGlobalStore","subscribeTo","InlineNotificationType","NotificationDescriptor","ToastDescriptor","ToastNotificationMeta","ToastType","showModal","showNotification","showToast"].indexOf(e)<0&&(n[e]=()=>d[e]);r.d(o,n)})(),o})())}}}));
2
+ System.register([],(function(e,t){return{execute:function(){e((()=>{var e={9672:(e,t)=>{!function(){var e=t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var t,o,i=String(e),a=0,s=n,u="";i.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&t>>8-a%1*8)){if((o=i.charCodeAt(a+=3/4))>255)throw new r("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|o}return u}),e.atob||(e.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,u="";i=t.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?u+=String.fromCharCode(255&o>>(-2*a&6)):0)i=n.indexOf(i);return u})}()},5426:(e,t,n)=>{System.register(["@openmrs/esm-config"],(function(e,t){var r={};return{setters:[function(e){r.Type=e.Type,r.defineConfigSchema=e.defineConfigSchema,r.getConfig=e.getConfig,r.navigate=e.navigate,r.validators=e.validators}],execute:function(){e((()=>{var e={672:(e,t)=>{!function(){var e=t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var t,o,i=String(e),a=0,s=n,u="";i.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&t>>8-a%1*8)){if((o=i.charCodeAt(a+=3/4))>255)throw new r("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|o}return u}),e.atob||(e.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,u="";i=t.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?u+=String.fromCharCode(255&o>>(-2*a&6)):0)i=n.indexOf(i);return u})}()},525:function(e){(function(){var t,n;function r(e,o){var i,a=e.data.entry||[],s=[];for(i=0;i<a.length;i++)s.push(a[i].resource);o(s);var u=n.defer();return t.nextPage({bundle:e.data}).then((function(e){r(e,o).then((function(e){u.resolve()}))}),(function(e){u.resolve()})),u.promise}function o(e,o,i,a){n.defer(),t.search(e).then((function(e){r(e,o).then((function(){i()}),(function(e){a(e)}))}),(function(e){a(e)}))}function i(e){var t=n.defer(),r=[];return o(e,(function(e){e.forEach((function(e){r.push(e)}))}),(function(){t.resolve(r)}),(function(e){t.reject(e)})),t.promise}function a(e,r){var o=n.defer();return t.search(e).then((function(e){var n={},i=[function(){o.resolve(e,n)}];function a(){i.pop()()}var s=e.data;s.entry&&s.entry.forEach((function(e){var o=e.resource,u=o.resourceType;r&&r.forEach((function(e){var r=e.split("."),c=r[0],l=r[1],f=o[l];if(u===c&&f){var p=f.reference;n[p]||function(e,r,o){i.push((function(){!function(e,r,o){var i=o.reference;t.resolve({bundle:e,resource:r,reference:o}).then((function(e){var t=e.data||e.content;n[i]=t,a()}))}(e,r,o)}))}(s,o,f)}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise}e.exports=function(e,r){return t=e,n=r,e.drain=o,e.fetchAll=i,e.fetchAllWithReferences=a,e}}).call(this)},256:function(e,t,n){(function(){n(454);var t=n(801),r=n(921),o=n(294),i=n(821),a=n(442),s=n(856),u=n(719),c=n(29),l=n(723),f=n(249),p=n(525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},g=function(e,t){return h("headers."+e,t)},y=d(a),m=d(s(e,n)).and(y).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(g("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(g("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=m.and(v("GET")),w=m.and(v("POST")),_=m.and(v("PUT")),E=m.and(v("DELETE")),x=m.and(v("PATCH")),S=i.Http(e,n),O=f.Path,k=O(e.baseUrl),T=k.slash(":type || :resource.resourceType"),P=T.slash("_history"),j=T.slash(":id || :resource.id"),C=j.slash("_history"),N=j.slash(":versionId || :resource.meta.versionId"),A=k.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=g("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(k.slash("metadata")).end(S),document:w.and(k.slash("Document")).end(S),profile:b.and(k.slash("Profile").slash(":type")).end(S),transaction:w.and(k).end(S),history:b.and(k.slash("_history")).and(R).end(S),typeHistory:b.and(P).and(R).end(S),resourceHistory:b.and(C).and(R).end(S),read:b.and(c.$WithPatient).and(j).end(S),vread:b.and(N).end(S),delete:E.and(j).and(I).end(S),create:w.and(T).and(I).end(S),validate:w.and(T.slash("_validate")).end(S),meta:{add:w.and(A.slash("$meta-add")).end(S),delete:w.and(A.slash("$meta-delete")).end(S),read:b.and(A.slash("$meta")).end(S)},search:b.and(T).and(c.$WithPatient).and(r.$SearchParams).and(R).end(S),update:_.and(j).and(I).end(S),conditionalUpdate:_.and(T).and(r.$SearchParams).and(I).end(S),conditionalDelete:E.and(T).and(r.$SearchParams).and(I).end(S),nextPage:b.and(u.$$BundleLinkUrl("next")).end(S),prevPage:b.and(u.$$BundleLinkUrl("previous")).and(u.$$BundleLinkUrl("prev")).end(S),getBundleByUrl:b.and(O(":url")).end(S),resolve:b.and(l.resolve).end(S),patch:x.and(j).and(g("Content-Type","application/json-patch+json")).end(S)},n)}}).call(this)},294:function(e,t,n){(function(){var e,r=n(801),o=n(672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},719:(e,t)=>{t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},801:function(e,t,n){(function(){var e=n(454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:e=>{e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},821:function(e,t,n){(function(){var e=n(454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},29:function(e,t,n){(function(){var e=n(801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},723:function(e,t,n){(function(){var t=n(454),r=/^#(.*)/,o=function(e){var n=e.cache,o=e.reference,i=e.bundle,a=o;if(!a.reference)return null;if(a.reference.match(r))return function(e,t){var n=e.match(r)[1],o=(t.contained||[]).filter((function(e){return(e.id||e._id)==n}))[0];return o&&{content:o}||null}(a.reference,e.resource);var s=t.absoluteUrl(e.baseUrl,a.reference);return(i&&i.entry||[]).filter((function(e){return e.id===s}))[0]||(null!=n?n[s]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,s=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return s.resolve(i),s.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},921:function(e,t,n){(function(){var e=n(454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,s={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},u={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},c=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n;switch(r(t)){case"object":return function(e,t){return i(t,(function(n,i){var a,l,f,p;return a=i[0],p=i[1],n.concat("$and"===a?o(p).reduce((function(t,n){return t.concat(c(e,n))}),[]):"$type"===a?[]:function(e){return 0===e.indexOf("$")}(a)?(l={param:e},"$or"===a?l.value=p:(s[a]&&(l.operator=s[a]),u[a]&&(l.modifier=u[a]),"object"===r(p)&&p.$or?l.value=p.$or:l.value=[p]),[l]):(t.$type&&(f=":"+t.$type),c(""+e+(f||"")+"."+a,p)))}))}(e,t);case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(c(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,s,u;for(u=[],o=0,i=(s=l(e)).length;o<i;o++)t=s[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,u.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return u}().join("&")};t._query=l,t.query=f;var p=n(801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},249:function(e,t,n){(function(){n(454);var e=n(801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n=function(e,t){return 0==e.indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(e,t):e}(e.trim(),t);if((null==n||void 0===n)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return n}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var s=function(){return Array.prototype.slice.call(arguments)};t.argsArray=s,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},s.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var u=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=u;var c=function(e,t,n){return t?u(c(e),e,t,n):function(t,n){return c(e,t,n)}};t.postwalk=c}).call(this)},651:(e,t,n)=>{!function(t){var n=function(e){return o(!0===e,!1,arguments)};function r(e,t){if("object"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function o(e,t,o){var a=o[0],s=o.length;(e||"object"!==i(a))&&(a={});for(var u=0;u<s;++u){var c=o[u];if("object"===i(c))for(var l in c)if("__proto__"!==l){var f=e?n.clone(c[l]):c[l];a[l]=t?r(a[l],f):f}}return a}function i(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return o(!0===e,!0,arguments)},n.clone=function(e){var t,r,o=e,a=i(e);if("array"===a)for(o=[],r=e.length,t=0;t<r;++t)o[t]=n.clone(e[t]);else if("object"===a)for(t in o={},e)o[t]=n.clone(e[t]);return o},t?e.exports=n:window.merge=n}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:e=>{"use strict";e.exports=r}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={id:t,loaded:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.y=t,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})();var a={};return(0,i(968).s)(1),(()=>{"use strict";i.r(a),i.d(a,{OpenmrsFetchError:()=>H,VisitMode:()=>tt,VisitStatus:()=>nt,backendDependencies:()=>st,defaultVisitCustomRepresentation:()=>Ye,fetchCurrentPatient:()=>We,fhir:()=>G,fhirBaseUrl:()=>q,getCurrentUser:()=>De,getLocations:()=>at,getLoggedInUser:()=>Fe,getSessionLocation:()=>Be,getStartedVisit:()=>et,getVisitTypes:()=>ot,getVisitsForPatient:()=>Qe,makeUrl:()=>V,openmrsFetch:()=>W,openmrsObservableFetch:()=>K,refetchCurrentUser:()=>Me,saveVisit:()=>Je,sessionEndpoint:()=>z,setSessionLocation:()=>ze,setupApiModule:()=>Ve,toLocationObject:()=>it,toVisitTypeObject:()=>rt,updateVisit:()=>Xe,userHasAccess:()=>Ue});var e=function(t,n){return e=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,n)};function t(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function r(e){return"function"==typeof e}var o=!1,s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,o=e},get useDeprecatedSynchronousErrorHandling(){return o}};function u(e){setTimeout((function(){throw e}),0)}var c={closed:!0,next:function(e){},error:function(e){if(s.useDeprecatedSynchronousErrorHandling)throw e;u(e)},complete:function(){}},l=Array.isArray||function(e){return e&&"number"==typeof e.length};function f(e){return null!==e&&"object"==typeof e}var p=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}(),d=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,o=n._parentOrParents,i=n._ctorUnsubscribe,a=n._unsubscribe,s=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,o instanceof e)o.remove(this);else if(null!==o)for(var u=0;u<o.length;++u)o[u].remove(this);if(r(a)){i&&(this._unsubscribe=void 0);try{a.call(this)}catch(e){t=e instanceof p?h(e.errors):[e]}}if(l(s)){u=-1;for(var c=s.length;++u<c;){var d=s[u];if(f(d))try{d.unsubscribe()}catch(e){t=t||[],e instanceof p?t=t.concat(h(e.errors)):t.push(e)}}}if(t)throw new p(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof e){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},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function h(e){return e.reduce((function(e,t){return e.concat(t instanceof p?t.errors:t)}),[])}var v="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),g=function(e){function n(t,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=c;break;case 1:if(!t){i.destination=c;break}if("object"==typeof t){t instanceof n?(i.syncErrorThrowable=t.syncErrorThrowable,i.destination=t,t.add(i)):(i.syncErrorThrowable=!0,i.destination=new y(i,t));break}default:i.syncErrorThrowable=!0,i.destination=new y(i,t,r,o)}return i}return t(n,e),n.prototype[v]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(d),y=function(e){function n(t,n,o,i){var a,s=e.call(this)||this;s._parentSubscriber=t;var u=s;return r(n)?a=n:n&&(a=n.next,o=n.error,i=n.complete,n!==c&&(r((u=Object.create(n)).unsubscribe)&&s.add(u.unsubscribe.bind(u)),u.unsubscribe=s.unsubscribe.bind(s))),s._context=u,s._next=a,s._error=o,s._complete=i,s}return t(n,e),n.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},n.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=s.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):u(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;u(e)}}},n.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)};s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},n.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw e;u(e)}},n.prototype.__tryOrSetError=function(e,t,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return s.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(u(t),!0)}return!1},n.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},n}(g),m="function"==typeof Symbol&&Symbol.observable||"@@observable";function b(e){return e}function w(e){return 0===e.length?b:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var _=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,o=function(e,t,n){if(e){if(e instanceof g)return e;if(e[v])return e[v]()}return e||t||n?new g(e,t,n):new g(c)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||s.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),s.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&r instanceof g?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=E(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[m]=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:w(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=E(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}();function E(e){if(e||(e=s.Promise||Promise),!e)throw new Error("no Promise impl found");return e}const x="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var S="object"==typeof self&&self&&self.Object===Object&&self;const O=(x||S||Function("return this")()).Symbol;var k=Object.prototype,T=k.hasOwnProperty,P=k.toString,j=O?O.toStringTag:void 0,C=Object.prototype.toString,N=O?O.toStringTag:void 0;const A=(I=Object.getPrototypeOf,R=Object,function(e){return I(R(e))});var I,R,$=Function.prototype,D=Object.prototype,L=$.toString,M=D.hasOwnProperty,U=L.call(Object);const F=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":N&&N in Object(e)?function(e){var t=T.call(e,j),n=e[j];try{e[j]=void 0;var r=!0}catch(e){}var o=P.call(e);return r&&(t?e[j]=n:delete e[j]),o}(e):function(e){return C.call(e)}(e)}(e))return!1;var t=A(e);if(null===t)return!0;var n=M.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&L.call(n)==U};var B=i(824);const z="/ws/rest/v1/session";function V(e){return window.openmrsBase+e}function W(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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.");const n=V(e);t.headers||(t.headers={}),F(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;const r=Error();return window.fetch(n,t).then((async e=>{const t=e;if(t.ok)return 204===t.status?(t.data=null,t):t.text().then((e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t}));{const{redirectAuthFailure:e}=await(0,B.getConfig)("@openmrs/esm-api");return n===V(z)&&403===t.status||e.enabled&&e.errors.includes(t.status)?((0,B.navigate)({to:e.url}),e.resolvePromise?Promise.resolve():new Promise((()=>{}))):t.text().then((e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new H(n,t,o,r)}),(e=>{throw new H(n,t,null,r)}))}}))}function K(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");const n=new AbortController;return t.signal=n.signal,new _((r=>{let o=!1;return W(e,t).then((e=>{o=!0,r.next(e),r.complete()}),(e=>{o=!0,r.error(e)})),()=>{o||n.abort()}}))}class H extends Error{constructor(e,t,n,r){super(),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:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}}const q="/ws/fhir2/R4",G=i(256)({baseUrl:q},{http:e=>W(e.url,{method:e.method,headers:e.headers}).then((t=>({status:t.status,headers:t.headers,data:t.data,config:e})),(t=>({status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e})))});var Z=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),Y=function(e){function n(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return t(n,e),n.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)}}},n}(d),Q=function(e){function n(t){var n=e.call(this,t)||this;return n.destination=t,n}return t(n,e),n}(g),J=function(e){function n(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t(n,e),n.prototype[v]=function(){return new Q(this)},n.prototype.lift=function(e){var t=new X(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Z;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new Z;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},n.prototype.complete=function(){if(this.closed)throw new Z;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},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(t){if(this.closed)throw new Z;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(e){if(this.closed)throw new Z;return this.hasError?(e.error(this.thrownError),d.EMPTY):this.isStopped?(e.complete(),d.EMPTY):(this.observers.push(e),new Y(this,e))},n.prototype.asObservable=function(){var e=new _;return e.source=this,e},n.create=function(e,t){return new X(e,t)},n}(_),X=function(e){function n(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t(n,e),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):d.EMPTY},n}(J),ee=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t(n,e),n.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)},n.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},n.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)},n}(function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t(n,e),n.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},n.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},n.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},n.prototype.execute=function(e,t){if(this.closed)return new 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))},n.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},n.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},n}(function(e){function n(t,n){return e.call(this)||this}return t(n,e),n.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},n}(d))),te=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}(),ne=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n}(function(e){function n(t,r){void 0===r&&(r=te.now);var o=e.call(this,t,(function(){return n.delegate&&n.delegate!==o?n.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return t(n,e),n.prototype.schedule=function(t,r,o){return void 0===r&&(r=0),n.delegate&&n.delegate!==this?n.delegate.schedule(t,r,o):e.prototype.schedule.call(this,t,r,o)},n.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},n}(te)),re=new ne(ee),oe=new _((function(e){return e.complete()}));function ie(e){return e?function(e){return new _((function(t){return e.schedule((function(){return t.complete()}))}))}(e):oe}function ae(e){return e&&"function"==typeof e.schedule}var se,ue=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}};function ce(e,t){return new _((function(n){var r=new d,o=0;return r.add(t.schedule((function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function le(e,t){return t?ce(e,t):new _(ue(e))}se||(se={});var fe=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(){var e;switch(this.kind){case"N":return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return ae(n)?(e.pop(),ce(e,n)):le(e)}(this.value);case"E":return e=this.error,new _((function(t){return t.error(e)}));case"C":return ie()}throw new 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}(),pe=function(e){function n(t,n,r){void 0===r&&(r=0);var o=e.call(this,t)||this;return o.scheduler=n,o.delay=r,o}return t(n,e),n.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},n.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new de(e,this.destination)))},n.prototype._next=function(e){this.scheduleMessage(fe.createNext(e))},n.prototype._error=function(e){this.scheduleMessage(fe.createError(e)),this.unsubscribe()},n.prototype._complete=function(){this.scheduleMessage(fe.createComplete()),this.unsubscribe()},n}(g),de=function(e,t){this.notification=e,this.destination=t},he=function(e){function n(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);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===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return t(n,e),n.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)},n.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new ve(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},n.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 Z;if(this.isStopped||this.hasError?t=d.EMPTY:(this.observers.push(e),t=new Y(this,e)),o&&e.add(e=new pe(e,o)),n)for(var a=0;a<i&&!e.closed;a++)e.next(r[a]);else for(a=0;a<i&&!e.closed;a++)e.next(r[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},n.prototype._getNow=function(){return(this.scheduler||re).now()},n.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},n}(J),ve=function(e,t){this.time=e,this.value=t};function ge(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new ye(e,t))}}var ye=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new me(e,this.project,this.thisArg))},e}(),me=function(e){function n(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return t(n,e),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(g),be="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",we=function(e){if(e&&"function"==typeof e[m])return r=e,function(e){var t=r[m]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}(e))return ue(e);if(function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,u),e};if(e&&"function"==typeof e[be])return t=e,function(e){for(var n=t[be]();;){var r=void 0;try{r=n.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,r,o=f(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")},_e=function(e){function n(t){var n=e.call(this)||this;return n.parent=t,n}return t(n,e),n.prototype._next=function(e){this.parent.notifyNext(e)},n.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},n.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},n}(g),Ee=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.notifyNext=function(e){this.destination.next(e)},n.prototype.notifyError=function(e){this.destination.error(e)},n.prototype.notifyComplete=function(){this.destination.complete()},n}(g);function xe(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(r){return r.pipe(xe((function(n,r){return(o=e(n,r),o instanceof _?o:new _(we(o))).pipe(ge((function(e,o){return t(n,e,r,o)})));var o}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new Se(e,n))})}var Se=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new Oe(e,this.project,this.concurrent))},e}(),Oe=function(e){function n(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);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 t(n,e),n.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},n.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t)},n.prototype._innerSub=function(e){var t=new _e(this),n=this.destination;n.add(t);var r=function(e,t){if(!t.closed){if(e instanceof _)return e.subscribe(t);var n;try{n=we(e)(t)}catch(e){t.error(e)}return n}}(e,t);r!==t&&n.add(r)},n.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},n.prototype.notifyNext=function(e){this.destination.next(e)},n.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},n}(Ee);function ke(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),xe(b,e)}function Te(){}function Pe(e,t,n){return function(r){return r.lift(new je(e,t,n))}}var je=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 Ce(e,this.nextOrObserver,this.error,this.complete))},e}(),Ce=function(e){function n(t,n,o,i){var a=e.call(this,t)||this;return a._tapNext=Te,a._tapError=Te,a._tapComplete=Te,a._tapError=o||Te,a._tapComplete=i||Te,r(n)?(a._context=a,a._tapNext=n):n&&(a._context=n,a._tapNext=n.next||Te,a._tapError=n.error||Te,a._tapComplete=n.complete||Te),a}return t(n,e),n.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},n.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},n.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},n}(g);function Ne(e,t){return function(n){return n.lift(new Ae(e,t))}}var Ae=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Ie(e,this.predicate,this.thisArg))},e}(),Ie=function(e){function n(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=r,o.count=0,o}return t(n,e),n.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},n}(g);const Re=new he(1);let $e=0;function De(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!1};return $e<Date.now()-6e4&&Me(),Re.asObservable().pipe(ke(),Pe(Le),ge((t=>e.includeAuthStatus?t:t.user)),Ne(Boolean))}function Le(e){if(e?.user?.userProperties?.defaultLocale){const t=e.user.userProperties.defaultLocale;t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}}function Me(){$e=Date.now(),Re.next(W(z).then((e=>"object"==typeof e.data?e.data:Promise.reject())).catch((()=>({sessionId:"",authenticated:!1}))))}function Ue(e,t){return function(e,t){return t.privileges.find((t=>e===t.display))}(e,t)||function(e){return e.roles.find((e=>"System Developer"===e.display))}(t)}function Fe(){return new Promise(((e,t)=>{const n=De().subscribe((t=>{e(t),n.unsubscribe()}),t)}))}function Be(){return new Promise(((e,t)=>{const n=De({includeAuthStatus:!0}).subscribe((t=>{e(t.sessionLocation),n.unsubscribe()}),t)}))}async function ze(e,t){await W(z,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}),Me()}function Ve(){(0,B.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:B.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:B.Type.String,_default:"${openmrsSpaBase}/login",_validators:[B.validators.isUrl]},errors:{_type:B.Type.Array,_default:[401],_elements:{_type:B.Type.Number,_validators:[B.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:B.Type.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."}}}),Me()}function We(e,t){return e?G.read({type:"Patient",patient:e,...t}):Promise.resolve(null)}var Ke=function(e){function n(t){var n=e.call(this)||this;return n._value=t,n}return t(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Z;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(J),He=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}();function qe(e){return function(t){return 0===e?ie():t.lift(new Ge(e))}}var Ge=function(){function e(e){if(this.total=e,this.total<0)throw new He}return e.prototype.call=function(e,t){return t.subscribe(new Ze(e,this.total))},e}(),Ze=function(e){function n(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return t(n,e),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(g);const Ye="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)";function Qe(e,t,n){return K(`/ws/rest/v1/visit?patient=${e}&v=${n??Ye}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(qe(1)).pipe(ge((e=>e)))}function Je(e,t){return K("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function Xe(e,t,n){return K(`/ws/rest/v1/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}const et=new Ke(null);let tt,nt;function rt(e){return{uuid:e.uuid,display:e.display,name:e.name}}function ot(){return K("/ws/rest/v1/visittype").pipe(ge((e=>e.data.results.map(rt)))).pipe(qe(1))}function it(e){return{uuid:e.uuid,display:e.display}}function at(){return K("/ws/rest/v1/location").pipe(ge((e=>e.data.results.map(it)))).pipe(qe(1))}!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(tt||(tt={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(nt||(nt={}));const st={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}})(),a})())}}}))},2199:(e,t,n)=>{"use strict";n.d(t,{nF:()=>m,u4:()=>$e,Rx:()=>De,Wf:()=>Be,I$:()=>Ce,Vy:()=>Se,N$:()=>w,DN:()=>b,ts:()=>ye,JC:()=>Fe,r:()=>_e,WK:()=>Ee,$X:()=>Re,P9:()=>Me,nx:()=>Ne,bf:()=>v,vb:()=>g,uj:()=>y,VJ:()=>be,bX:()=>Ae,z$:()=>h,jK:()=>xe,Lq:()=>Ue,VF:()=>Le,ym:()=>Ie,y9:()=>we});var r=n(921),o=n(963);const i=(0,n(6899).Z)(Object.getPrototypeOf,Object);var a=n(4897),s=Function.prototype,u=Object.prototype,c=s.toString,l=u.hasOwnProperty,f=c.call(Object);const p=function(e){if(!(0,a.Z)(e)||"[object Object]"!=(0,o.Z)(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f};var d=n(7179);const h="/ws/rest/v1/session";function v(e){return window.openmrsBase+e}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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.");const n=v(e);t.headers||(t.headers={}),p(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;const r=Error();return window.fetch(n,t).then((async e=>{const t=e;if(t.ok)return 204===t.status?(t.data=null,t):t.text().then((e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t}));{const{redirectAuthFailure:e}=await(0,d.getConfig)("@openmrs/esm-api");return n===v(h)&&403===t.status||e.enabled&&e.errors.includes(t.status)?((0,d.navigate)({to:e.url}),e.resolvePromise?Promise.resolve():new Promise((()=>{}))):t.text().then((e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new m(n,t,o,r)}),(e=>{throw new m(n,t,null,r)}))}}))}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");const n=new AbortController;return t.signal=n.signal,new r.y((r=>{let o=!1;return g(e,t).then((e=>{o=!0,r.next(e),r.complete()}),(e=>{o=!0,r.error(e)})),()=>{o||n.abort()}}))}class m extends Error{constructor(e,t,n,r){super(),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:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}}const b="/ws/fhir2/R4",w=n(1256)({baseUrl:b},{http:e=>g(e.url,{method:e.method,headers:e.headers}).then((t=>({status:t.status,headers:t.headers,data:t.data,config:e})),(t=>({status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e})))});var _=n(7080),E=n(2585),x=n(1098),S=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return _.ZT(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}(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 _.ZT(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 new 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||new 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}(function(e){function t(t,n){return e.call(this)||this}return _.ZT(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(x.w))),O=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}(),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _.ZT(t,e),t}(function(e){function t(n,r){void 0===r&&(r=O.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 _.ZT(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=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(O)),T=new k(S),P=n(7811),j=new r.y((function(e){return e.complete()}));function C(e){return e?function(e){return new r.y((function(t){return e.schedule((function(){return t.complete()}))}))}(e):j}function N(e){return e&&"function"==typeof e.schedule}var A,I=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}};function R(e,t){return new r.y((function(n){var r=new x.w,o=0;return r.add(t.schedule((function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function $(e,t){return t?R(e,t):new r.y(I(e))}A||(A={});var D=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(){var e;switch(this.kind){case"N":return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return N(n)?(e.pop(),R(e,n)):$(e)}(this.value);case"E":return e=this.error,new r.y((function(t){return t.error(e)}));case"C":return C()}throw new 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}(),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 _.ZT(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 M(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(D.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(D.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(D.createComplete()),this.unsubscribe()},t}(P.L),M=function(){return function(e,t){this.notification=e,this.destination=t}}(),U=n(7043),F=n(6362),B=function(e){function t(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);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===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return _.ZT(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 z(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.N;if(this.isStopped||this.hasError?t=x.w.EMPTY:(this.observers.push(e),t=new F.W(this,e)),o&&e.add(e=new L(e,o)),n)for(var a=0;a<i&&!e.closed;a++)e.next(r[a]);else for(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||T).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}(E.xQ),z=function(){return function(e,t){this.time=e,this.value=t}}();function V(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new W(e,t))}}var W=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new K(e,this.project,this.thisArg))},e}(),K=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 _.ZT(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(P.L),H=n(1450);function q(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var G=q(),Z=n(4002),Y=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Q(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var J=n(1167),X=function(e){if(e&&"function"==typeof e[Z.L])return r=e,function(e){var t=r[Z.L]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(Y(e))return I(e);if(Q(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,H.z),e};if(e&&"function"==typeof e[G])return t=e,function(e){for(var n=t[G]();;){var r=void 0;try{r=n.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,r,o=(0,J.K)(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};var ee=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,n}return _.ZT(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}(P.L),te=(P.L,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _.ZT(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}(P.L));function ne(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(o){return o.pipe(ne((function(n,o){return(i=e(n,o),i instanceof r.y?i:new r.y(X(i))).pipe(V((function(e,r){return t(n,e,o,r)})));var i}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new re(e,n))})}P.L;var re=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new oe(e,this.project,this.concurrent))},e}(),oe=function(e){function t(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);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 _.ZT(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){return void this.destination.error(e)}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new ee(this),n=this.destination;n.add(t);var o=function(e,t){if(!t.closed){if(e instanceof r.y)return e.subscribe(t);var n;try{n=X(e)(t)}catch(e){t.error(e)}return n}}(e,t);o!==t&&n.add(o)},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}(te),ie=n(7430);function ae(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),ne(ie.y,e)}function se(){}var ue=n(9147);function ce(e,t,n){return function(r){return r.lift(new le(e,t,n))}}var le=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 fe(e,this.nextOrObserver,this.error,this.complete))},e}(),fe=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i._tapNext=se,i._tapError=se,i._tapComplete=se,i._tapError=r||se,i._tapComplete=o||se,(0,ue.m)(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||se,i._tapError=n.error||se,i._tapComplete=n.complete||se),i}return _.ZT(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},t}(P.L);function pe(e,t){return function(n){return n.lift(new de(e,t))}}var de=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new he(e,this.predicate,this.thisArg))},e}(),he=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 _.ZT(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(P.L);const ve=new B(1);let ge=0;function ye(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!1};return ge<Date.now()-6e4&&be(),ve.asObservable().pipe(ae(),ce(me),V((t=>e.includeAuthStatus?t:t.user)),pe(Boolean))}function me(e){if(e?.user?.userProperties?.defaultLocale){const t=e.user.userProperties.defaultLocale;t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}}function be(){ge=Date.now(),ve.next(g(h).then((e=>"object"==typeof e.data?e.data:Promise.reject())).catch((()=>({sessionId:"",authenticated:!1}))))}function we(e,t){return function(e,t){return t.privileges.find((t=>e===t.display))}(e,t)||function(e){return e.roles.find((e=>"System Developer"===e.display))}(t)}function _e(){return new Promise(((e,t)=>{const n=ye().subscribe((t=>{e(t),n.unsubscribe()}),t)}))}function Ee(){return new Promise(((e,t)=>{const n=ye({includeAuthStatus:!0}).subscribe((t=>{e(t.sessionLocation),n.unsubscribe()}),t)}))}async function xe(e,t){await g(h,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}),be()}function Se(e,t){return e?w.read({type:"Patient",patient:e,...t}):Promise.resolve(null)}var Oe=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return _.ZT(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)throw new U.N;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(E.xQ),ke=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}();function Te(e){return function(t){return 0===e?C():t.lift(new Pe(e))}}var Pe=function(){function e(e){if(this.total=e,this.total<0)throw new ke}return e.prototype.call=function(e,t){return t.subscribe(new je(e,this.total))},e}(),je=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return _.ZT(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}(P.L);const Ce="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)";function Ne(e,t,n){return y(`/ws/rest/v1/visit?patient=${e}&v=${n??Ce}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(Te(1)).pipe(V((e=>e)))}function Ae(e,t){return y("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function Ie(e,t,n){return y(`/ws/rest/v1/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}const Re=new Oe(null);let $e,De;function Le(e){return{uuid:e.uuid,display:e.display,name:e.name}}function Me(){return y("/ws/rest/v1/visittype").pipe(V((e=>e.data.results.map(Le)))).pipe(Te(1))}function Ue(e){return{uuid:e.uuid,display:e.display}}function Fe(){return y("/ws/rest/v1/location").pipe(V((e=>e.data.results.map(Ue)))).pipe(Te(1))}!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}($e||($e={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(De||(De={}));const Be={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}},3107:()=>{System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.createGlobalStore=e.createGlobalStore}],execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:e=>{"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=t,o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i={};return(0,o(968).s)(1),(()=>{"use strict";function e(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function t(e){return e&&e.sensitive?"":"i"}function n(n,r,o){return function(n,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,s=o.start,u=void 0===s||s,c=o.end,l=void 0===c||c,f=o.encode,p=void 0===f?function(e){return e}:f,d="["+e(o.endsWith||"")+"]|$",h="["+e(o.delimiter||"/#?")+"]",v=u?"^":"",g=0,y=n;g<y.length;g++){var m=y[g];if("string"==typeof m)v+=e(p(m));else{var b=e(p(m.prefix)),w=e(p(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";v+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else v+="("+m.pattern+")"+m.modifier;else v+="(?:"+b+w+")"+m.modifier}}if(l)a||(v+=h+"?"),v+=o.endsWith?"(?="+d+")":"$";else{var E=n[n.length-1],x="string"==typeof E?h.indexOf(E[E.length-1])>-1:void 0===E;a||(v+="(?:"+h+"(?="+d+"))?"),x||(v+="(?="+h+"|"+d+")")}return new RegExp(v,t(o))}(function(t,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '+s);for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at "+s);i+=e[s++]}else i+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=s}else{for(var a="",s=n+1;s<e.length;){var u=e.charCodeAt(s);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(t),o=n.prefixes,i=void 0===o?"./":o,a="[^"+e(n.delimiter||"/#?")+"]+?",s=[],u=0,c=0,l="",f=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=f(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var h=f("CHAR"),v=f("NAME"),g=f("PATTERN");if(v||g){var y=h||"";-1===i.indexOf(y)&&(l+=y,y=""),l&&(s.push(l),l=""),s.push({name:v||u++,prefix:y,suffix:"",pattern:g||a,modifier:f("MODIFIER")||""})}else{var m=h||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(s.push(l),l=""),f("OPEN")){y=d();var b=f("NAME")||"",w=f("PATTERN")||"",_=d();p("CLOSE"),s.push({name:b||(w?u++:""),pattern:b&&!w?a:w,prefix:y,suffix:_,modifier:f("MODIFIER")||""})}else p("END")}}return s}(n,o),r,o)}function r(e,o,i){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(e,o):Array.isArray(e)?function(e,n,o){var i=e.map((function(e){return r(e,n,o).source}));return new RegExp("(?:"+i.join("|")+")",t(o))}(e,o,i):n(e,o,i)}o.r(i),o.d(i,{filterBreadcrumbs:()=>p,getBreadcrumbs:()=>l,getBreadcrumbsFor:()=>d,registerBreadcrumb:()=>u,registerBreadcrumbs:()=>c});const a=(0,o(685).createGlobalStore)("breadcrumbs",[]);function s(e){return e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?r(e.matcher):r(e.path)}function u(e){return c([e])}function c(e){const t=[...l(),...e.map((e=>({matcher:s(e),settings:e})))];a.setState(t,!0)}function l(){return a.getState()}function f(e,t){if(t)return function(e,t){const[n]=e.filter((e=>e.matcher.test(t)));return n}(e,t)||function(e,t){const n=t.split("/");for(;n.length>1;){n.pop();const t=f(e,n.join("/"));if(t)return t}}(e,t)}function p(e,t){if(e.length>0){const n=f(e,t);if(n){const t=[n];let r=f(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=f(e,r.settings.parent);return t.reverse()}}return[]}function d(e){return p(l(),e)}})(),i})())}}}))},7179:()=>{System.register(["@openmrs/esm-state","single-spa"],(function(e,t){var n={},r={};return{setters:[function(e){n.createGlobalStore=e.createGlobalStore,n.getGlobalStore=e.getGlobalStore},function(e){r.navigateToUrl=e.navigateToUrl}],execute:function(){e((()=>{var e={712:(e,t,n)=>{var r=n(823),o=n(773)((function(e,t){return r(e.length,(function(){return e.apply(t,arguments)}))}));e.exports=o},122:(e,t,n)=>{var r=n(918),o=n(764)((function(e){return null!=e&&"function"==typeof e.clone?e.clone():r(e,[],[],!0)}));e.exports=o},102:(e,t,n)=>{var r=n(773),o=n(968),i=r((function(e,t){return o(e,t,[],[])}));e.exports=i},823:e=>{e.exports=function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}},340:e=>{e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},918:(e,t,n)=>{var r=n(259),o=n(704);e.exports=function e(t,n,i,a){var s=function(r){for(var o=n.length,s=0;s<o;){if(t===n[s])return i[s];s+=1}for(var u in n[s+1]=t,i[s+1]=r,t)r[u]=a?e(t[u],n,i,!0):t[u];return r};switch(o(t)){case"Object":return s({});case"Array":return s([]);case"Date":return new Date(t.valueOf());case"RegExp":return r(t);default:return t}}},259:e=>{e.exports=function(e){return new RegExp(e.source,(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":""))}},764:(e,t,n)=>{var r=n(230);e.exports=function(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}},773:(e,t,n)=>{var r=n(764),o=n(230);e.exports=function(e){return function t(n,i){switch(arguments.length){case 0:return t;case 1:return o(n)?t:r((function(t){return e(n,t)}));default:return o(n)&&o(i)?t:o(n)?r((function(t){return e(t,i)})):o(i)?r((function(t){return e(n,t)})):e(n,i)}}}},138:(e,t,n)=>{var r=n(764),o=n(773),i=n(230);e.exports=function(e){return function t(n,a,s){switch(arguments.length){case 0:return t;case 1:return i(n)?t:o((function(t,r){return e(n,t,r)}));case 2:return i(n)&&i(a)?t:i(n)?o((function(t,n){return e(t,a,n)})):i(a)?o((function(t,r){return e(n,t,r)})):r((function(t){return e(n,a,t)}));default:return i(n)&&i(a)&&i(s)?t:i(n)&&i(a)?o((function(t,n){return e(t,n,s)})):i(n)&&i(s)?o((function(t,n){return e(t,a,n)})):i(a)&&i(s)?o((function(t,r){return e(n,t,r)})):i(n)?r((function(t){return e(t,a,s)})):i(a)?r((function(t){return e(n,t,s)})):i(s)?r((function(t){return e(n,a,t)})):e(n,a,s)}}}},968:(e,t,n)=>{var r=n(340),o=n(587),i=n(168),a=n(673),s=n(784),u=n(478),c=n(704);function l(e,t,n,i){var a=r(e),s=r(t);function u(e,t){return f(e,t,n.slice(),i.slice())}return!o((function(e,t){return!o(u,t,e)}),s,a)}function f(e,t,n,r){if(s(e,t))return!0;var o=c(e);if(o!==c(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===i(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!s(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!s(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var p=n.length-1;p>=0;){if(n[p]===e)return r[p]===t;p-=1}switch(o){case"Map":return e.size===t.size&&l(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&l(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var d=u(e);if(d.length!==u(t).length)return!1;var h=n.concat([e]),v=r.concat([t]);for(p=d.length-1;p>=0;){var g=d[p];if(!a(g,t)||!f(t[g],e[g],h,v))return!1;p-=1}return!0}e.exports=f},168:e=>{e.exports=function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}},673:e=>{e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}},587:e=>{e.exports=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}},640:(e,t,n)=>{var r=n(673),o=Object.prototype.toString,i=function(){return"[object Arguments]"===o.call(arguments)?function(e){return"[object Arguments]"===o.call(e)}:function(e){return r("callee",e)}}();e.exports=i},726:e=>{e.exports=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)}},534:(e,t,n)=>{var r=n(764),o=n(726),i=n(468),a=r((function(e){return!!o(e)||!!e&&"object"==typeof e&&!i(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));e.exports=a},78:e=>{e.exports=function(e){return"[object Object]"===Object.prototype.toString.call(e)}},230:e=>{e.exports=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}},468:e=>{e.exports=function(e){return"[object String]"===Object.prototype.toString.call(e)}},784:e=>{e.exports="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},623:(e,t,n)=>{var r=n(534),o=n(782),i=n(712);function a(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function s(e,t,n,r){return e["@@transducer/result"](n[r](i(e["@@transducer/step"],e),t))}var u="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";e.exports=function(e,t,n){if("function"==typeof e&&(e=o(e)),r(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return s(e,t,n,"fantasy-land/reduce");if(null!=n[u])return a(e,t,n[u]());if("function"==typeof n.next)return a(e,t,n);if("function"==typeof n.reduce)return s(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}},782:e=>{var t=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();e.exports=function(e){return new t(e)}},478:(e,t,n)=>{var r=n(764),o=n(673),i=n(640),a=!{toString:null}.propertyIsEnumerable("toString"),s=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],u=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),c=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},l="function"!=typeof Object.keys||u?r((function(e){if(Object(e)!==e)return[];var t,n,r=[],l=u&&i(e);for(t in e)!o(t,e)||l&&"length"===t||(r[r.length]=t);if(a)for(n=s.length-1;n>=0;)o(t=s[n],e)&&!c(r,t)&&(r[r.length]=t),n-=1;return r})):r((function(e){return Object(e)!==e?[]:Object.keys(e)}));e.exports=l},317:(e,t,n)=>{var r=n(773),o=n(937),i=r((function(e,t){return o((function(e,t,n){return n}),e,t)}));e.exports=i},937:(e,t,n)=>{var r=n(138),o=n(78),i=n(145),a=r((function e(t,n,r){return i((function(n,r,i){return o(r)&&o(i)?e(t,r,i):t(n,r,i)}),n,r)}));e.exports=a},145:(e,t,n)=>{var r=n(138),o=n(673),i=r((function(e,t,n){var r,i={};for(r in t)o(r,t)&&(i[r]=o(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)o(r,n)&&!o(r,i)&&(i[r]=n[r]);return i}));e.exports=i},61:(e,t,n)=>{var r=n(138)(n(623));e.exports=r},704:(e,t,n)=>{var r=n(764)((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));e.exports=r},685:e=>{"use strict";e.exports=n},645:e=>{"use strict";e.exports=r}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";o.r(i),o.d(i,{Type:()=>l,configExtensionStore:()=>S,configInternalStore:()=>w,defineConfigSchema:()=>L,defineExtensionConfigSchema:()=>M,getConfig:()=>F,getConfigStore:()=>O,getExtensionConfig:()=>C,getExtensionConfigFromStore:()=>N,getExtensionSlotConfig:()=>T,getExtensionSlotConfigFromStore:()=>P,getExtensionSlotsConfigStore:()=>k,getExtensionsConfigStore:()=>j,implementerToolsConfigStore:()=>A,inRange:()=>ce,interpolateString:()=>se,interpolateUrl:()=>ae,isUrl:()=>fe,isUrlWithTemplateParameters:()=>le,navigate:()=>ue,processConfig:()=>B,provide:()=>U,temporaryConfigStore:()=>x,validator:()=>f,validators:()=>pe});var e=o(317),t=o.n(e),n=o(61),r=o.n(n),a=o(122),s=o.n(a),u=o(102),c=o.n(u);let l;function f(e,t){return n=>{if(!e(n))return t}}!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(l||(l={}));const p=f((e=>Array.isArray(e)),"must be an array"),d=f((e=>"boolean"==typeof e),"must be a boolean"),h=f((e=>"number"==typeof e),"must be a number"),v=f((e=>"string"==typeof e),"must be a string"),g=f((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e),"must be an object (not an array or null)"),y=f((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");var m=o(685);const b={providedConfigs:[],schemas:{},devDefaultsAreOn:E()},w=(0,m.createGlobalStore)("config-internal",b);let _=E();function E(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}}w.subscribe((e=>{var t;e.devDefaultsAreOn!=_&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),_=e.devDefaultsAreOn)}));const x=(0,m.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});x.subscribe((e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));const S=(0,m.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function O(e){return(0,m.getGlobalStore)(`config-module-${e}`,{config:null,loaded:!1})}function k(){return(0,m.getGlobalStore)("config-extension-slots",{slots:{}})}function T(e){return P(k().getState(),e)}function P(e,t){return e.slots[t]??{loaded:!1,config:{}}}function j(){return(0,m.getGlobalStore)("config-extensions",{configs:{}})}function C(e,t){return N(j().getState(),e,t)}function N(e,t,n){const r=e.configs[t]?.[n];return r??{loaded:!1,config:null}}const A=(0,m.createGlobalStore)("config-implementer-tools",{config:{}});function I(e,t){for(let n of Object.keys(e.schemas)){const r=G(n,e,t);O(n).setState({loaded:!0,config:r})}}function R(e,t){const n=function(e,t){const n=Y(H(e,t)),r=Object.keys(n).reduce(((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e)),{});return function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))K(r,t,e)}(r),Object.keys(r).reduce(((e,t)=>({...e,...r[t]})),{})}(e,t),r=Object.fromEntries(Object.entries(n).map((e=>{let[t,n]=e;return[t,{loaded:!0,config:n}]}))),o=k(),i=o.getState(),a={slots:{...i.slots,...r}};c()(i,a)||o.setState(a)}function $(e,t){const n=function(e,t){let n=V(s()(e.schemas));const r=[...e.providedConfigs.map((e=>[e.config,e.source])),[t.config,"temporary config"]];for(let[e,t]of r)n=Y([n,W(e,t)]);return n}(e,t);A.setState({config:n})}function D(e,t,n){const r={};for(let o of t.mountedExtensions){const t=z(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]={...r[o.slotName],[o.extensionId]:{config:t,loaded:!0}}}j().setState({configs:r})}function L(e,t){q(e,t);const n=w.getState();w.setState({schemas:{...n.schemas,[e]:t}})}function M(e,t){q(e,t);const n=w.getState();n.schemas[e]&&console.warn(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),w.setState({schemas:{...n.schemas,[e]:t}})}function U(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided";const n=w.getState();w.setState({providedConfigs:[...n.providedConfigs,{source:t,config:e}]})}function F(e){return new Promise((t=>{const n=O(e);function r(e){e.loaded&&e.config&&(t(e.config),o&&o())}r(n.getState());const o=n.subscribe(r)}))}function B(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Q(e,t,n);const o=ne(e,t,r);return o}function z(e,t,n,r,o,i){const a=function(e){const[t]=e.split("#");return t}(r),s=o.schemas[a],u=s?a:t,c=H(o,i),l=Z(e,c)?.extensionSlots?.[n]?.configure?.[r]??{},f=Y([Z(u,c),l]),p=s??o.schemas[t];Q(p,f,u);const d=ne(p,f,o.devDefaultsAreOn);return delete d.extensionSlots,d}function V(e){return e.hasOwnProperty("_default")?{...e,_value:e._default,_source:"default"}:oe(e)?Object.keys(e).reduce(((t,n)=>(t[n]=V(e[n]),t)),{}):{}}function W(e,t){return oe(e)?Object.keys(e).reduce(((n,r)=>(n[r]=W(e[r],t),n)),{}):{_value:e,_source:t}}function K(e,t,n){const r=`Extension slot config '${t}.extensionSlots.${n}`,o=Object.keys(e).filter((e=>!["add","remove","order","configure"].includes(e)));o.length&&console.error(r+`' contains invalid keys '${o.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every((e=>"string"==typeof e))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((e=>"string"==typeof e))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((e=>"string"==typeof e))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(oe(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function H(e,t){return[...e.providedConfigs.map((e=>e.config)),t.config]}function q(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const o of Object.keys(t).filter((e=>!e.startsWith("_")))){const i=n+(n&&".")+o,a=t[o];if(!oe(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}a.hasOwnProperty("_default")||q(e,a,i);const s=a._elements;if(re(s)&&q(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}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const u=a._type;u&&!Object.values(l).includes(u)&&console.error(`${e} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(l).join(", ")}. Received '${u}'`),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}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),s&&u&&![l.Array,l.Object].includes(u)&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(u)}`)}}function G(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);const r=t.schemas[e],o=Z(e,H(t,n));Q(r,o,e);const i=ne(r,o,t.devDefaultsAreOn);return delete i.extensionSlots,i}function Z(e,t){return Y(t.map((t=>{let{[e]:n}=t;return n})).filter((e=>!!e)))}function Y(e){return r()(t())({},e)}I(w.getState(),x.getState()),w.subscribe((e=>I(e,x.getState()))),x.subscribe((e=>I(w.getState(),e))),$(w.getState(),x.getState()),w.subscribe((e=>$(e,x.getState()))),x.subscribe((e=>$(w.getState(),e))),R(w.getState(),x.getState()),w.subscribe((e=>R(e,x.getState()))),x.subscribe((e=>R(w.getState(),e))),D(w.getState(),S.getState(),x.getState()),w.subscribe((e=>{D(e,S.getState(),x.getState())})),S.subscribe((e=>{D(w.getState(),e,x.getState())})),x.subscribe((e=>{D(w.getState(),S.getState(),e)}));const Q=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e.hasOwnProperty(r)?(ee(i,a._type,o),te(i,a._validators,o),oe(o)?a._type===l.Object?J(a,o,i):a.hasOwnProperty("_default")||Q(a,o,i):a._type===l.Array&&X(a,o,i)):"extensionSlots"!==r&&console.error(`Unknown config key '${i}' provided. Ignoring.`)}};function J(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];Q(e._elements,o,`${n}.${r}`)}}function X(e,t,n){if(re(e._elements))for(let r=0;r<t.length;r++)Q(e._elements,t[r],`${n}[${r}]`);for(let r=0;r<t.length;r++)ee(`${n}[${r}]`,e._elements?._type,t[r]),te(`${n}[${r}]`,e._elements?._validators,t[r])}function ee(e,t,n){t&&te(e,[{Array:p,Boolean:d,ConceptUuid:y,Number:h,Object:g,String:v,UUID:y,PersonAttributeTypeUuid:y,PatientIdentifierTypeUuid:y}[t]],n)}function te(e,t,n){if(t)try{for(let r of t){const t=r(n);if("string"==typeof t){const r="object"==typeof n?JSON.stringify(n):n;console.error(`Invalid configuration value ${r} for ${e}: ${t}`)}}}catch(t){console.error(`Skipping invalid validator at "${e}".`)}}const ne=(e,t,n)=>{const r=s()(t);if(!e)return r;for(const t of Object.keys(e)){const o=r[t],i=e[t];if(i&&i.hasOwnProperty("_default")){if(!r.hasOwnProperty(t)){const e=i._devDefault||i._default;r[t]=n?e:i._default}const e=i._elements;if(o&&re(e))if(i._type===l.Array){const i=o.map((t=>ne(e,t,n)));r[t]=i}else if(i._type===l.Object)for(let t of Object.keys(o))o[t]=ne(e,o[t],n)}else if(oe(i)){const e=r.hasOwnProperty(t)?o:{};oe(e)&&(r[t]=ne(i,e,n))}}return r};function re(e){return!!e&&Object.keys(e).filter((e=>!["_default","_validators"].includes(e))).length>0}function oe(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}var ie=o(645);function ae(e){const t=window.getOpenmrsSpaBase().replace(/\/$/,"");return se(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:t}).replace(/^\/\//,"/")}function se(e,t){return Object.keys(t).reduce(((e,n)=>e.split("${"+n+"}").join(t[n])),e)}function ue(e){let{to:t}=e;const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=ae(t);r.startsWith(n)?(0,ie.navigateToUrl)(r):window.location.assign(r)}const ce=(e,t)=>f((n=>e<=n&&n<=t),`must be between ${e} and ${t}`),le=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return f((e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let 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(", "))},fe=le([]),pe={inRange:ce,isUrl:fe,isUrlWithTemplateParameters:le}})(),i})())}}}))},5734:(e,t,n)=>{"use strict";n.d(t,{JU:()=>r.ConfigStore,Dy:()=>o,SH:()=>ye,Tj:()=>me,iE:()=>we,pR:()=>ce,Z2:()=>l,IT:()=>a,ll:()=>i,CB:()=>p,gZ:()=>f,c4:()=>u,JJ:()=>be,sC:()=>c,z2:()=>d});var r={};let o;function i(e){const t=window.getOpenmrsSpaBase().replace(/\/$/,"");return a(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:t}).replace(/^\/\//,"/")}function a(e,t){return Object.keys(t).reduce(((e,n)=>e.split("${"+n+"}").join(t[n])),e)}n.r(r),n.d(r,{R2:()=>ue,hv:()=>oe,pR:()=>ce,Gr:()=>le,_z:()=>fe,HN:()=>pe,DK:()=>se}),function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(o||(o={}));var s=n(3710);function u(e){let{to:t}=e;const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=i(t);r.startsWith(n)?(0,s.UO)(r):window.location.assign(r)}function c(e,t){return n=>{if(!e(n))return t}}const l=(e,t)=>c((n=>e<=n&&n<=t),`must be between ${e} and ${t}`),f=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return c((e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let 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(", "))},p=f([]),d={inRange:l,isUrl:p,isUrlWithTemplateParameters:f};function h(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function v(e){return function t(n){return 0===arguments.length||h(n)?t:e.apply(this,arguments)}}function g(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return h(n)?t:v((function(t){return e(n,t)}));default:return h(n)&&h(r)?t:h(n)?v((function(t){return e(t,r)})):h(r)?v((function(t){return e(n,t)})):e(n,r)}}}function y(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function m(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function b(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const w="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var _=Object.prototype.toString,E=function(){return"[object Arguments]"===_.call(arguments)?function(e){return"[object Arguments]"===_.call(e)}:function(e){return b("callee",e)}}();const x=E;var S=!{toString:null}.propertyIsEnumerable("toString"),O=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=function(){return arguments.propertyIsEnumerable("length")}(),T=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const P="function"!=typeof Object.keys||k?v((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=k&&x(e);for(t in e)!b(t,e)||o&&"length"===t||(r[r.length]=t);if(S)for(n=O.length-1;n>=0;)b(t=O[n],e)&&!T(r,t)&&(r[r.length]=t),n-=1;return r})):v((function(e){return Object(e)!==e?[]:Object.keys(e)})),j=v((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function C(e,t,n,r){var o=y(e);function i(e,t){return N(e,t,n.slice(),r.slice())}return!m((function(e,t){return!m(i,t,e)}),y(t),o)}function N(e,t,n,r){if(w(e,t))return!0;var o,i,a=j(e);if(a!==j(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!w(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!w(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var s=n.length-1;s>=0;){if(n[s]===e)return r[s]===t;s-=1}switch(a){case"Map":return e.size===t.size&&C(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&C(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=P(e);if(u.length!==P(t).length)return!1;var c=n.concat([e]),l=r.concat([t]);for(s=u.length-1;s>=0;){var f=u[s];if(!b(f,t)||!N(t[f],e[f],c,l))return!1;s-=1}return!0}const A=g((function(e,t){return N(e,t,[],[])}));function I(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?I(e[s],t,n,!0):e[s];return o};switch(j(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const R=v((function(e){return null!=e&&"function"==typeof e.clone?e.clone():I(e,[],[],!0)}));function $(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return h(n)?t:g((function(t,r){return e(n,t,r)}));case 2:return h(n)&&h(r)?t:h(n)?g((function(t,n){return e(t,r,n)})):h(r)?g((function(t,r){return e(n,t,r)})):v((function(t){return e(n,r,t)}));default:return h(n)&&h(r)&&h(o)?t:h(n)&&h(r)?g((function(t,n){return e(t,n,o)})):h(n)&&h(o)?g((function(t,n){return e(t,r,n)})):h(r)&&h(o)?g((function(t,r){return e(n,t,r)})):h(n)?v((function(t){return e(t,r,o)})):h(r)?v((function(t){return e(n,t,o)})):h(o)?v((function(t){return e(n,r,t)})):e(n,r,o)}}}const D=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},L=v((function(e){return!!D(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));var M=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),U=g((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))}));const F=U;function B(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function z(e,t,n,r){return e["@@transducer/result"](n[r](F(e["@@transducer/step"],e),t))}var V="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function W(e,t,n){if("function"==typeof e&&(e=function(e){return new M(e)}(e)),L(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return z(e,t,n,"fantasy-land/reduce");if(null!=n[V])return B(e,t,n[V]());if("function"==typeof n.next)return B(e,t,n);if("function"==typeof n.reduce)return z(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}const K=$(W);function H(e){return"[object Object]"===Object.prototype.toString.call(e)}const q=$((function(e,t,n){var r,o={};for(r in t)b(r,t)&&(o[r]=b(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)b(r,n)&&!b(r,o)&&(o[r]=n[r]);return o})),G=$((function e(t,n,r){return q((function(n,r,o){return H(r)&&H(o)?e(t,r,o):t(n,r,o)}),n,r)})),Z=g((function(e,t){return G((function(e,t,n){return n}),e,t)})),Y=c((e=>Array.isArray(e)),"must be an array"),Q=c((e=>"boolean"==typeof e),"must be a boolean"),J=c((e=>"number"==typeof e),"must be a number"),X=c((e=>"string"==typeof e),"must be a string"),ee=c((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e),"must be an object (not an array or null)"),te=c((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");var ne=n(8748);const re={providedConfigs:[],schemas:{},devDefaultsAreOn:ae()},oe=(0,ne.createGlobalStore)("config-internal",re);let ie=ae();function ae(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}}oe.subscribe((e=>{var t;e.devDefaultsAreOn!=ie&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),ie=e.devDefaultsAreOn)}));const se=(0,ne.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});se.subscribe((e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));const ue=(0,ne.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function ce(e){return(0,ne.getGlobalStore)(`config-module-${e}`,{config:null,loaded:!1})}function le(){return(0,ne.getGlobalStore)("config-extension-slots",{slots:{}})}function fe(){return(0,ne.getGlobalStore)("config-extensions",{configs:{}})}const pe=(0,ne.createGlobalStore)("config-implementer-tools",{config:{}});function de(e,t){for(let n of Object.keys(e.schemas)){const r=Te(n,e,t);ce(n).setState({loaded:!0,config:r})}}function he(e,t){const n=function(e,t){const n=je(Oe(e,t)),r=Object.keys(n).reduce(((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e)),{});return function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))Se(r,t,e)}(r),Object.keys(r).reduce(((e,t)=>({...e,...r[t]})),{})}(e,t),r=Object.fromEntries(Object.entries(n).map((e=>{let[t,n]=e;return[t,{loaded:!0,config:n}]}))),o=le(),i=o.getState(),a={slots:{...i.slots,...r}};A(i,a)||o.setState(a)}function ve(e,t){const n=function(e,t){let n=Ee(R(e.schemas));const r=[...e.providedConfigs.map((e=>[e.config,e.source])),[t.config,"temporary config"]];for(let[e,t]of r)n=je([n,xe(e,t)]);return n}(e,t);pe.setState({config:n})}function ge(e,t,n){const r={};for(let o of t.mountedExtensions){const t=_e(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]={...r[o.slotName],[o.extensionId]:{config:t,loaded:!0}}}fe().setState({configs:r})}function ye(e,t){ke(e,t);const n=oe.getState();oe.setState({schemas:{...n.schemas,[e]:t}})}function me(e,t){ke(e,t);const n=oe.getState();n.schemas[e]&&console.warn(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),oe.setState({schemas:{...n.schemas,[e]:t}})}function be(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided";const n=oe.getState();oe.setState({providedConfigs:[...n.providedConfigs,{source:t,config:e}]})}function we(e){return new Promise((t=>{const n=ce(e);function r(e){e.loaded&&e.config&&(t(e.config),o&&o())}r(n.getState());const o=n.subscribe(r)}))}function _e(e,t,n,r,o,i){const a=function(e){const[t]=e.split("#");return t}(r),s=o.schemas[a],u=s?a:t,c=Oe(o,i),l=Pe(e,c)?.extensionSlots?.[n]?.configure?.[r]??{},f=je([Pe(u,c),l]),p=s??o.schemas[t];Ce(p,f,u);const d=$e(p,f,o.devDefaultsAreOn);return delete d.extensionSlots,d}function Ee(e){return e.hasOwnProperty("_default")?{...e,_value:e._default,_source:"default"}:Le(e)?Object.keys(e).reduce(((t,n)=>(t[n]=Ee(e[n]),t)),{}):{}}function xe(e,t){return Le(e)?Object.keys(e).reduce(((n,r)=>(n[r]=xe(e[r],t),n)),{}):{_value:e,_source:t}}function Se(e,t,n){const r=`Extension slot config '${t}.extensionSlots.${n}`,o=Object.keys(e).filter((e=>!["add","remove","order","configure"].includes(e)));o.length&&console.error(r+`' contains invalid keys '${o.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every((e=>"string"==typeof e))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((e=>"string"==typeof e))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((e=>"string"==typeof e))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Le(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function Oe(e,t){return[...e.providedConfigs.map((e=>e.config)),t.config]}function ke(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const i of Object.keys(t).filter((e=>!e.startsWith("_")))){const a=n+(n&&".")+i,s=t[i];if(!Le(s)){console.error(`${e} has bad config schema definition for key '${a}'. ${r}`);continue}s.hasOwnProperty("_default")||ke(e,s,a);const u=s._elements;if(De(u)&&ke(e,u,a+"._elements"),s._validators)for(let t of s._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${a}' ${r}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const c=s._type;c&&!Object.values(o).includes(c)&&console.error(`${e} has invalid type for key '${a}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(o).join(", ")}. Received '${c}'`),Object.keys(s).every((e=>["_description","_validators","_elements","_type"].includes(e)))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${a}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(s)}`),u&&c&&![o.Array,o.Object].includes(c)&&console.error(`${e} has bad config schema definition for key '${a}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(c)}`)}}function Te(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);const r=t.schemas[e],o=Pe(e,Oe(t,n));Ce(r,o,e);const i=$e(r,o,t.devDefaultsAreOn);return delete i.extensionSlots,i}function Pe(e,t){return je(t.map((t=>{let{[e]:n}=t;return n})).filter((e=>!!e)))}function je(e){return K(Z)({},e)}de(oe.getState(),se.getState()),oe.subscribe((e=>de(e,se.getState()))),se.subscribe((e=>de(oe.getState(),e))),ve(oe.getState(),se.getState()),oe.subscribe((e=>ve(e,se.getState()))),se.subscribe((e=>ve(oe.getState(),e))),he(oe.getState(),se.getState()),oe.subscribe((e=>he(e,se.getState()))),se.subscribe((e=>he(oe.getState(),e))),ge(oe.getState(),ue.getState(),se.getState()),oe.subscribe((e=>{ge(e,ue.getState(),se.getState())})),ue.subscribe((e=>{ge(oe.getState(),e,se.getState())})),se.subscribe((e=>{ge(oe.getState(),ue.getState(),e)}));const Ce=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";for(const r of Object.keys(t)){const i=t[r],a=n+"."+r,s=e[r];e.hasOwnProperty(r)?(Ie(a,s._type,i),Re(a,s._validators,i),Le(i)?s._type===o.Object?Ne(s,i,a):s.hasOwnProperty("_default")||Ce(s,i,a):s._type===o.Array&&Ae(s,i,a)):"extensionSlots"!==r&&console.error(`Unknown config key '${a}' provided. Ignoring.`)}};function Ne(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];Ce(e._elements,o,`${n}.${r}`)}}function Ae(e,t,n){if(De(e._elements))for(let r=0;r<t.length;r++)Ce(e._elements,t[r],`${n}[${r}]`);for(let r=0;r<t.length;r++)Ie(`${n}[${r}]`,e._elements?._type,t[r]),Re(`${n}[${r}]`,e._elements?._validators,t[r])}function Ie(e,t,n){t&&Re(e,[{Array:Y,Boolean:Q,ConceptUuid:te,Number:J,Object:ee,String:X,UUID:te,PersonAttributeTypeUuid:te,PatientIdentifierTypeUuid:te}[t]],n)}function Re(e,t,n){if(t)try{for(let r of t){const t=r(n);if("string"==typeof t){const r="object"==typeof n?JSON.stringify(n):n;console.error(`Invalid configuration value ${r} for ${e}: ${t}`)}}}catch(t){console.error(`Skipping invalid validator at "${e}".`)}}const $e=(e,t,n)=>{const r=R(t);if(!e)return r;for(const t of Object.keys(e)){const i=r[t],a=e[t];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(t)){const e=a._devDefault||a._default;r[t]=n?e:a._default}const e=a._elements;if(i&&De(e))if(a._type===o.Array){const o=i.map((t=>$e(e,t,n)));r[t]=o}else if(a._type===o.Object)for(let t of Object.keys(i))i[t]=$e(e,i[t],n)}else if(Le(a)){const e=r.hasOwnProperty(t)?i:{};Le(e)&&(r[t]=$e(a,e,n))}}return r};function De(e){return!!e&&Object.keys(e).filter((e=>!["_default","_validators"].includes(e))).length>0}function Le(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}},4729:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:e=>{"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=t,o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i={};return(0,o(968).s)(1),(()=>{"use strict";o.r(i),o.d(i,{createErrorHandler:()=>n,reportError:()=>t});var e=o(728);function t(e){const t=r(e);setTimeout((()=>{throw t}))}function n(){const e=Error();return n=>{r(n).stack+=`\nAsync stacktrace:\n${e.stack}`,t(n)}}function r(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)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())}window.onerror=function(){return(0,e.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,e.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}})(),i})())}}}))},2465:(e,t,n)=>{e=n.nmd(e),System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(r,o){var i={},a={},s={};return{setters:[function(e){i.configExtensionStore=e.configExtensionStore,i.getExtensionConfigFromStore=e.getExtensionConfigFromStore,i.getExtensionSlotConfig=e.getExtensionSlotConfig,i.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,i.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,i.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){a.createGlobalStore=e.createGlobalStore,a.getGlobalStore=e.getGlobalStore},function(e){s.mountRootParcel=e.mountRootParcel}],execute:function(){r((()=>{var r={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:e=>{"use strict";e.exports=i},685:e=>{"use strict";e.exports=a},645:e=>{"use strict";e.exports=s}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return r[e](n,n.exports,c),n.exports}c.y=o,c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e})();var l={};return(0,c(968).s)(1),(()=>{"use strict";c.r(l),c.d(l,{attach:()=>wt,checkStatus:()=>jt,checkStatusFor:()=>Ct,detach:()=>_t,detachAll:()=>Et,extensionStore:()=>Rt,getAssignedExtensions:()=>kt,getConnectedExtensions:()=>St,getCustomProps:()=>Nt,getExtensionInternalStore:()=>at,getExtensionNameFromId:()=>gt,getExtensionRegistration:()=>mt,getExtensionRegistrationFrom:()=>yt,getExtensionStore:()=>ut,registerExtension:()=>bt,registerExtensionSlot:()=>Tt,renderExtension:()=>It,reset:()=>Pt,updateInternalExtensionStore:()=>st});const r=function(e,t){return e===t||e!=e&&t!=t},o=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1};var i=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=o(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const s=a,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var f="object"==typeof self&&self&&self.Object===Object&&self;const p=u||f||Function("return this")(),d=p.Symbol;var h=Object.prototype,v=h.hasOwnProperty,g=h.toString,y=d?d.toStringTag:void 0,m=Object.prototype.toString,b=d?d.toStringTag:void 0;const w=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":b&&b in Object(e)?function(e){var t=v.call(e,y),n=e[y];try{e[y]=void 0;var r=!0}catch(e){}var o=g.call(e);return r&&(t?e[y]=n:delete e[y]),o}(e):function(e){return m.call(e)}(e)},_=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},E=function(e){if(!_(e))return!1;var t=w(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},x=p["__core-js_shared__"];var S,O=(S=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",k=Function.prototype.toString;const T=function(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var P=/^\[object .+?Constructor\]$/,j=Function.prototype,C=Object.prototype,N=j.toString,A=C.hasOwnProperty,I=RegExp("^"+N.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const R=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!_(e)||(t=e,O&&O in t))&&(E(e)?I:P).test(T(e));var t}(n)?n:void 0},$=R(p,"Map"),D=R(Object,"create");var L=Object.prototype.hasOwnProperty,M=Object.prototype.hasOwnProperty;function U(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}U.prototype.clear=function(){this.__data__=D?D(null):{},this.size=0},U.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},U.prototype.get=function(e){var t=this.__data__;if(D){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return L.call(t,e)?t[e]:void 0},U.prototype.has=function(e){var t=this.__data__;return D?void 0!==t[e]:M.call(t,e)},U.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=D&&void 0===t?"__lodash_hash_undefined__":t,this};const F=U,B=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}z.prototype.clear=function(){this.size=0,this.__data__={hash:new F,map:new($||s),string:new F}},z.prototype.delete=function(e){var t=B(this,e).delete(e);return this.size-=t?1:0,t},z.prototype.get=function(e){return B(this,e).get(e)},z.prototype.has=function(e){return B(this,e).has(e)},z.prototype.set=function(e,t){var n=B(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const V=z;function W(e){var t=this.__data__=new s(e);this.size=t.size}W.prototype.clear=function(){this.__data__=new s,this.size=0},W.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},W.prototype.get=function(e){return this.__data__.get(e)},W.prototype.has=function(e){return this.__data__.has(e)},W.prototype.set=function(e,t){var n=this.__data__;if(n instanceof s){var r=n.__data__;if(!$||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new V(r)}return n.set(e,t),this.size=n.size,this};const K=W;function H(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new V;++t<n;)this.add(e[t])}H.prototype.add=H.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},H.prototype.has=function(e){return this.__data__.has(e)};const q=H,G=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Z=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,d=2&n?new q:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],v=t[f];if(r)var g=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==g){if(g)continue;p=!1;break}if(d){if(!G(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},Y=p.Uint8Array,Q=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},J=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var X=d?d.prototype:void 0,ee=X?X.valueOf:void 0;const te=Array.isArray;var ne=Object.prototype.propertyIsEnumerable,re=Object.getOwnPropertySymbols;const oe=re?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(re(e),(function(t){return ne.call(e,t)})))}:function(){return[]},ie=function(e){return null!=e&&"object"==typeof e},ae=function(e){return ie(e)&&"[object Arguments]"==w(e)};var se=Object.prototype,ue=se.hasOwnProperty,ce=se.propertyIsEnumerable,le=ae(function(){return arguments}())?ae:function(e){return ie(e)&&ue.call(e,"callee")&&!ce.call(e,"callee")};const fe=le;var pe=t&&!t.nodeType&&t,de=pe&&e&&!e.nodeType&&e,he=de&&de.exports===pe?p.Buffer:void 0;const ve=(he?he.isBuffer:void 0)||function(){return!1};var ge=/^(?:0|[1-9]\d*)$/;const ye=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t},me=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var be={};be["[object Float32Array]"]=be["[object Float64Array]"]=be["[object Int8Array]"]=be["[object Int16Array]"]=be["[object Int32Array]"]=be["[object Uint8Array]"]=be["[object Uint8ClampedArray]"]=be["[object Uint16Array]"]=be["[object Uint32Array]"]=!0,be["[object Arguments]"]=be["[object Array]"]=be["[object ArrayBuffer]"]=be["[object Boolean]"]=be["[object DataView]"]=be["[object Date]"]=be["[object Error]"]=be["[object Function]"]=be["[object Map]"]=be["[object Number]"]=be["[object Object]"]=be["[object RegExp]"]=be["[object Set]"]=be["[object String]"]=be["[object WeakMap]"]=!1;var we=t&&!t.nodeType&&t,_e=we&&e&&!e.nodeType&&e,Ee=_e&&_e.exports===we&&u.process,xe=function(){try{return _e&&_e.require&&_e.require("util").types||Ee&&Ee.binding&&Ee.binding("util")}catch(e){}}(),Se=xe&&xe.isTypedArray;const Oe=Se?(ke=Se,function(e){return ke(e)}):function(e){return ie(e)&&me(e.length)&&!!be[w(e)]};var ke,Te=Object.prototype.hasOwnProperty,Pe=Object.prototype;const je=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var Ce=Object.prototype.hasOwnProperty;const Ne=function(e){return null!=(t=e)&&me(t.length)&&!E(t)?function(e,t){var n=te(e),r=!n&&fe(e),o=!n&&!r&&ve(e),i=!n&&!r&&!o&&Oe(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var c in e)!Te.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ye(c,u))||s.push(c);return s}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Pe))return je(e);var t,n,r=[];for(var o in Object(e))Ce.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},Ae=function(e){return function(e,t,n){var r=t(e);return te(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ne,oe)};var Ie=Object.prototype.hasOwnProperty;const Re=R(p,"DataView"),$e=R(p,"Promise"),De=R(p,"Set"),Le=R(p,"WeakMap");var Me="[object Map]",Ue="[object Promise]",Fe="[object Set]",Be="[object WeakMap]",ze="[object DataView]",Ve=T(Re),We=T($),Ke=T($e),He=T(De),qe=T(Le),Ge=w;(Re&&Ge(new Re(new ArrayBuffer(1)))!=ze||$&&Ge(new $)!=Me||$e&&Ge($e.resolve())!=Ue||De&&Ge(new De)!=Fe||Le&&Ge(new Le)!=Be)&&(Ge=function(e){var t=w(e),n="[object Object]"==t?e.constructor:void 0,r=n?T(n):"";if(r)switch(r){case Ve:return ze;case We:return Me;case Ke:return Ue;case He:return Fe;case qe:return Be}return t});const Ze=Ge;var Ye="[object Arguments]",Qe="[object Array]",Je="[object Object]",Xe=Object.prototype.hasOwnProperty;const et=function(e,t,n,o,i,a){var s=te(e),u=te(t),c=s?Qe:Ze(e),l=u?Qe:Ze(t),f=(c=c==Ye?Je:c)==Je,p=(l=l==Ye?Je:l)==Je,d=c==l;if(d&&ve(e)){if(!ve(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new K),s||Oe(e)?Z(e,t,n,o,i,a):function(e,t,n,o,i,a,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new Y(e),new Y(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=Q;case"[object Set]":var c=1&o;if(u||(u=J),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;o|=2,s.set(e,t);var f=Z(u(e),u(t),o,i,a,s);return s.delete(e),f;case"[object Symbol]":if(ee)return ee.call(e)==ee.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var h=f&&Xe.call(e,"__wrapped__"),v=p&&Xe.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,y=v?t.value():t;return a||(a=new K),i(g,y,n,o,a)}}return!!d&&(a||(a=new K),function(e,t,n,r,o,i){var a=1&n,s=Ae(e),u=s.length;if(u!=Ae(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:Ie.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var v=e[l=s[c]],g=t[l];if(r)var y=a?r(g,v,l,t,e,i):r(v,g,l,e,t,i);if(!(void 0===y?v===g||o(v,g,n,r,i):y)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,o,i,a))},tt=function e(t,n,r,o,i){return t===n||(null==t||null==n||!ie(t)&&!ie(n)?t!=t&&n!=n:et(t,n,r,o,e,i))},nt=function(e,t){return tt(e,t)};var rt=c(824),ot=c(685);const it=(0,ot.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),at=()=>(0,ot.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}});function st(e){const t=it.getState(),n=e(t);n!==t&&it.setState(n)}const ut=()=>(0,ot.getGlobalStore)("extensions",{slots:{}});function ct(e){const t=[];for(let n of Object.values(e.extensions))for(let e of n.instances)t.push({slotModuleName:e.slotModuleName,extensionModuleName:n.moduleName,slotName:e.slotName,extensionId:e.id});nt(rt.configExtensionStore.getState().mountedExtensions,t)||rt.configExtensionStore.setState({mountedExtensions:t})}ct(it.getState()),it.subscribe(ct);const lt=at(),ft=ut(),pt=(0,rt.getExtensionSlotsConfigStore)(),dt=(0,rt.getExtensionsConfigStore)();function ht(e,t,n){const r={};for(let[o,i]of Object.entries(e.slots)){const{config:a}=(0,rt.getExtensionSlotConfigFromStore)(t,i.name),s=Ot(o,e,a,n);r[o]={moduleName:i.moduleName,assignedExtensions:s}}nt(ft.getState().slots,r)||ft.setState({slots:r})}function vt(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function gt(e){const[t]=e.split("#");return t}function yt(e,t){const n=gt(t);return e.extensions[n]}function mt(e){return yt(lt.getState(),e)}lt.subscribe((e=>{ht(e,pt.getState(),dt.getState())})),pt.subscribe((e=>{ht(lt.getState(),e,dt.getState())})),dt.subscribe((e=>{ht(lt.getState(),pt.getState(),e)}));const bt=lt.action(((e,t)=>{e.extensions[t.name]={...t,instances:[]}}));function wt(e,t){st((n=>{const r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...vt(e),attachedIds:[t]}}}}))}function _t(e,t){st((n=>{const 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 Et(e){st((t=>{const n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t}))}function xt(e,t,n,r){const o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;{const t=r.indexOf(e);return-1!==t?2e3+t:-1}}function St(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t??navigator.onLine;return e.filter((e=>Ct(n,e.online,e.offline)))}function Ot(e,t,n,r){const o=function(e,t){const n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=lt.getState();return[...t,...n].filter((e=>!r.includes(e))).sort(((e,n)=>{const r=xt(e,o,i[gt(e)].order,t),a=xt(n,o,i[gt(n)].order,t);return-1===a?-1:-1===r?1:r-a}))}(n,t.slots[e].attachedIds),i=[];for(let n of o){const{config:o}=(0,rt.getExtensionConfigFromStore)(r,e,n),a=gt(n),s=t.extensions[a];i.push({id:n,name:a,moduleName:s.moduleName,config:o,meta:s.meta,online:s.online,offline:s.offline})}return i}function kt(e){const t=lt.getState(),{config:n}=(0,rt.getExtensionSlotConfig)(e);return Ot(e,t,n,dt.getState())}const Tt=lt.action(((e,t,n)=>{const r=e.slots[n]?.moduleName;if(r&&r!=t)return console.warn(`An extension slot with the name '${n}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${r}.`),e;if(r&&r==t)return e;if(e.slots[n])return{...e,slots:{...e.slots,[n]:{...e.slots[n],moduleName:t}}};const o=vt(n,t);return{...e,slots:{...e.slots,[n]:o}}})),Pt=ft.action((()=>({slots:{},extensions:{}})));function jt(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=navigator.onLine;return Ct(n,e,t)}function Ct(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)}function Nt(e,t){const n=navigator.onLine?e:t;return"object"==typeof n?n:{}}var At=c(645);function It(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e=>e,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const a=gt(r),s=mt(r);let u=!0,c=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);const{load:l,online:f,offline:p,meta:d,moduleName:h}=s;jt(f,p)&&(l().then((a=>{let{default:s,...l}=a;u&&(c=(0,At.mountRootParcel)(o(s??l),{...Nt(f,p),...i,_meta:d,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:h},domElement:e}))})),st((o=>{const i={domElement:e,id:r,slotName:t,slotModuleName:n};return{...o,extensions:{...o.extensions,[a]:{...o.extensions[a],instances:[...o.extensions[a].instances,i]}}}})))}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return()=>{u=!1,c&&("MOUNTED"!==c.getStatus()?c.mountPromise.then((()=>{c&&c.unmount()})):c.unmount())}}const Rt=at()})(),l})())}}}))},9187:(e,t,n)=>{"use strict";n.d(t,{pv:()=>r.AssignedExtension,x9:()=>o.CancelLoading,uP:()=>r.ConnectedExtension,uu:()=>r.ExtensionMeta,tj:()=>r.ExtensionRegistration,u_:()=>r.ExtensionSlotState,qN:()=>r.ExtensionStore,ub:()=>T,og:()=>P,lW:()=>j,h6:()=>I,Kq:()=>N,EB:()=>S,yw:()=>f,ix:()=>k,Qq:()=>R,H8:()=>y});var r={};n.r(r),n.d(r,{Co:()=>c,yw:()=>f,qO:()=>l});var o={};n.r(o),n.d(o,{H:()=>y});var i=n(7179),a=n(3202),s=n(8748);const u=(0,s.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),c=()=>(0,s.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}});function l(e){const t=u.getState(),n=e(t);n!==t&&u.setState(n)}const f=()=>(0,s.getGlobalStore)("extensions",{slots:{}});function p(e){const t=[];for(let n of Object.values(e.extensions))for(let e of n.instances)t.push({slotModuleName:e.slotModuleName,extensionModuleName:n.moduleName,slotName:e.slotName,extensionId:e.id});(0,a.Z)(i.configExtensionStore.getState().mountedExtensions,t)||i.configExtensionStore.setState({mountedExtensions:t})}function d(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=navigator.onLine;return h(n,e,t)}function h(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)}function v(e,t){const n=navigator.onLine?e:t;return"object"==typeof n?n:{}}p(u.getState()),u.subscribe(p);var g=n(3710);function y(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e=>e,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const a=S(r),s=O(r);let u=!0,c=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);const{load:f,online:p,offline:h,meta:y,moduleName:m}=s;d(p,h)&&(f().then((a=>{let{default:s,...l}=a;u&&(c=(0,g.BP)(o(s??l),{...v(p,h),...i,_meta:y,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:m},domElement:e}))})),l((o=>{const i={domElement:e,id:r,slotName:t,slotModuleName:n};return{...o,extensions:{...o.extensions,[a]:{...o.extensions[a],instances:[...o.extensions[a].instances,i]}}}})))}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return()=>{u=!1,c&&("MOUNTED"!==c.getStatus()?c.mountPromise.then((()=>{c&&c.unmount()})):c.unmount())}}c();const m=c(),b=f(),w=(0,i.getExtensionSlotsConfigStore)(),_=(0,i.getExtensionsConfigStore)();function E(e,t,n){const r={};for(let[o,a]of Object.entries(e.slots)){const{config:s}=(0,i.getExtensionSlotConfigFromStore)(t,a.name),u=A(o,e,s,n);r[o]={moduleName:a.moduleName,assignedExtensions:u}}(0,a.Z)(b.getState().slots,r)||b.setState({slots:r})}function x(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function S(e){const[t]=e.split("#");return t}function O(e){return function(e,t){const n=S(t);return e.extensions[n]}(m.getState(),e)}m.subscribe((e=>{E(e,w.getState(),_.getState())})),w.subscribe((e=>{E(m.getState(),e,_.getState())})),_.subscribe((e=>{E(m.getState(),w.getState(),e)}));const k=m.action(((e,t)=>{e.extensions[t.name]={...t,instances:[]}}));function T(e,t){l((n=>{const r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...x(e),attachedIds:[t]}}}}))}function P(e,t){l((n=>{const 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 j(e){l((t=>{const n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t}))}function C(e,t,n,r){const o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;{const t=r.indexOf(e);return-1!==t?2e3+t:-1}}function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t??navigator.onLine;return e.filter((e=>h(n,e.online,e.offline)))}function A(e,t,n,r){const o=function(e,t){const n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=m.getState();return[...t,...n].filter((e=>!r.includes(e))).sort(((e,n)=>{const r=C(e,o,i[S(e)].order,t),a=C(n,o,i[S(n)].order,t);return-1===a?-1:-1===r?1:r-a}))}(n,t.slots[e].attachedIds),a=[];for(let n of o){const{config:o}=(0,i.getExtensionConfigFromStore)(r,e,n),s=S(n),u=t.extensions[s];a.push({id:n,name:s,moduleName:u.moduleName,config:o,meta:u.meta,online:u.online,offline:u.offline})}return a}function I(e){const t=m.getState(),{config:n}=(0,i.getExtensionSlotConfig)(e);return A(e,t,n,_.getState())}const R=m.action(((e,t,n)=>{const r=e.slots[n]?.moduleName;if(r&&r!=t)return console.warn(`An extension slot with the name '${n}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${r}.`),e;if(r&&r==t)return e;if(e.slots[n])return{...e,slots:{...e.slots,[n]:{...e.slots[n],moduleName:t}}};const o=x(n,t);return{...e,slots:{...e.slots,[n]:o}}}));b.action((()=>({slots:{},extensions:{}})))},9976:()=>{System.register([],(function(e,t){return{execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(968).s)(1),(()=>{"use strict";r.r(o),r.d(o,{dispatchConnectivityChanged:()=>t,dispatchNotificationShown:()=>f,dispatchPrecacheStaticDependencies:()=>s,setupPaths:()=>h,setupUtils:()=>v,subscribeConnectivity:()=>i,subscribeConnectivityChanged:()=>n,subscribeNotificationShown:()=>p,subscribePrecacheStaticDependencies:()=>u,subscribeToastShown:()=>d});const e="openmrs:connectivity-changed";function t(t){window.dispatchEvent(new CustomEvent(e,{detail:{online:t}}))}function n(t){const n=e=>t(e.detail);return window.addEventListener(e,n),()=>window.removeEventListener(e,n)}function i(e){return e({online:navigator.onLine}),n(e)}const a="openmrs:precache-static-dependencies";function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(a,{detail:e}))}function u(e){const t=t=>e(t.detail);return window.addEventListener(a,t),()=>window.removeEventListener(a,t)}const c="openmrs:notification-shown",l="openmrs:toast-shown";function f(e){window.dispatchEvent(new CustomEvent(c,{detail:e}))}function p(e){const t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function d(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}function h(e){window.openmrsBase=e.apiUrl,window.spaBase=e.spaPath,window.spaEnv=e.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=()=>`${window.spaBase}/`}function v(){window.copyText=e=>{const t=window.getSelection();if(t){const n=document.createRange();n.selectNode(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges()}}}})(),o})())}}}))},5763:(e,t,n)=>{"use strict";n.d(t,{ac:()=>r.ConnectivityChangedEvent,hM:()=>r.PrecacheStaticDependenciesEvent,Kj:()=>r.ShowNotificationEvent,P3:()=>r.ShowToastEvent,BW:()=>a,XS:()=>i,NQ:()=>f,dY:()=>u,id:()=>p});var r={};n.r(r),n.d(r,{BW:()=>a,XS:()=>i,NQ:()=>f,dY:()=>u,id:()=>p});const o="openmrs:connectivity-changed";function i(e){const t=t=>e(t.detail);return window.addEventListener(o,t),()=>window.removeEventListener(o,t)}function a(e){return e({online:navigator.onLine}),i(e)}const s="openmrs:precache-static-dependencies";function u(e){const t=t=>e(t.detail);return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}const c="openmrs:notification-shown",l="openmrs:toast-shown";function f(e){const t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function p(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}},5614:(e,t,n)=>{"use strict";n.d(t,{iC:()=>r.OfflineMode,Vm:()=>r.OfflineModeResult,Cg:()=>o.QueueItemDescriptor,we:()=>o.SyncItem,Ug:()=>o.SyncProcessOptions,jp:()=>zr,Qd:()=>Br,Gy:()=>Vr,sF:()=>Nr,vm:()=>a,aA:()=>Dr,k1:()=>rr,TI:()=>Fr,Q2:()=>Ur,z7:()=>Ar,nN:()=>sr,gp:()=>mr,a7:()=>Cr,Rz:()=>_r,QI:()=>br,$9:()=>wr,X2:()=>Mr,dt:()=>or,H_:()=>Wr,MO:()=>ir});var r={};n.r(r),n.d(r,{vm:()=>a});var o={};n.r(o),n.d(o,{jp:()=>zr,Qd:()=>Br,Gy:()=>Vr,aA:()=>Dr,TI:()=>Fr,Q2:()=>Ur,X2:()=>Mr,H_:()=>Wr});let i="unavailable";function a(){return{current:i,notAvailable:!0,active:!1}}const s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,u=Object.keys,c=Array.isArray;function l(e,t){return"object"!=typeof t||u(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||s.Promise||(s.Promise=Promise);const f=Object.getPrototypeOf,p={}.hasOwnProperty;function d(e,t){return p.call(e,t)}function h(e,t){"function"==typeof t&&(t=t(f(e))),("undefined"==typeof Reflect?u:Reflect.ownKeys)(t).forEach((n=>{g(e,n,t[n])}))}const v=Object.defineProperty;function g(e,t,n,r){v(e,t,l(n&&d(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function y(e){return{from:function(t){return e.prototype=Object.create(t.prototype),g(e.prototype,"constructor",e),{extend:h.bind(null,e.prototype)}}}}const m=Object.getOwnPropertyDescriptor;function b(e,t){let n;return m(e,t)||(n=f(e))&&b(n,t)}const w=[].slice;function E(e,t,n){return w.call(e,t,n)}function x(e,t){return t(e)}function S(e){if(!e)throw new Error("Assertion Failed")}function O(e){s.setImmediate?setImmediate(e):setTimeout(e,0)}function k(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function T(e,t){if(d(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=T(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:T(s,t.substr(a+1))}}function P(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){S("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)P(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?c(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u||(u=e[a]={}),P(u,s,n)}}else void 0===n?c(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function j(e){var t={};for(var n in e)d(e,n)&&(t[n]=e[n]);return t}const C=[].concat;function N(e){return C.apply([],e)}const A="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(N([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>s[e])),I=A.map((e=>s[e]));k(A,(e=>[e,!0]));let R=null;function $(e){R="undefined"!=typeof WeakMap&&new WeakMap;const t=D(e);return R=null,t}function D(e){if(!e||"object"!=typeof e)return e;let t=R&&R.get(e);if(t)return t;if(c(e)){t=[],R&&R.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(D(e[n]))}else if(I.indexOf(e.constructor)>=0)t=e;else{const n=f(e);for(var o in t=n===Object.prototype?{}:Object.create(n),R&&R.set(e,t),e)d(e,o)&&(t[o]=D(e[o]))}return t}const{toString:L}={};function M(e){return L.call(e).slice(8,-1)}const U="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",F="symbol"==typeof U?function(e){var t;return null!=e&&(t=e[U])&&t.apply(e)}:function(){return null},B={};function z(e){var t,n,r,o;if(1===arguments.length){if(c(e))return e.slice();if(this===B&&"string"==typeof e)return[e];if(o=F(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=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const V="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var W="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function K(e,t){W=e,H=t}var H=()=>!0;const q=!new Error("").stack;function G(){if(q)try{throw G.arguments,new Error}catch(e){return e}return new Error}function Z(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(H).map((e=>"\n"+e)).join("")):""}var Y=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Q=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Y),J={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 X(e,t){this._e=G(),this.name=e,this.message=t}function ee(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function te(e,t,n,r){this._e=G(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ee(e,t)}function ne(e,t){this._e=G(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=ee(e,t)}y(X).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Z(this._e,2))}},toString:function(){return this.name+": "+this.message}}),y(te).from(X),y(ne).from(X);var re=Q.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const oe=X;var ie=Q.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=G(),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=J[t]||n,this.inner=null)}return y(r).from(oe),e[t]=r,e}),{});ie.Syntax=SyntaxError,ie.Type=TypeError,ie.Range=RangeError;var ae=Y.reduce(((e,t)=>(e[t+"Error"]=ie[t],e)),{}),se=Q.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=ie[t]),e)),{});function ue(){}function ce(e){return e}function le(e,t){return null==e||e===ce?t:function(n){return t(e(n))}}function fe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function pe(e,t){return e===ue?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?fe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?fe(o,this.onerror):o),void 0!==i?i:n}}function de(e,t){return e===ue?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?fe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?fe(r,this.onerror):r)}}function he(e,t){return e===ue?t:function(n){var r=e.apply(this,arguments);l(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?fe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?fe(i,this.onerror):i),void 0===r?void 0===a?void 0:a:l(r,a)}}function ve(e,t){return e===ue?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function ge(e,t){return e===ue?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}}se.ModifyError=te,se.DexieError=X,se.BulkError=ne;var ye={};const[me,be,we]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,f(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,f(t),e]})(),_e=be&&be.then,Ee=me&&me.constructor,xe=!!we;var Se=!1,Oe=we?()=>{we.then(Ge)}:s.setImmediate?setImmediate.bind(null,Ge):s.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Ge(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Ge,0)},ke=function(e,t){$e.push([e,t]),Pe&&(Oe(),Pe=!1)},Te=!0,Pe=!0,je=[],Ce=[],Ne=null,Ae=ce,Ie={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:mt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{mt(e[0],e[1])}catch(e){}}))}},Re=Ie,$e=[],De=0,Le=[];function Me(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=ue,this._lib=!1;var t=this._PSD=Re;if(W&&(this._stackHolder=G(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ye)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&ze(this,this._value))}this._state=null,this._value=null,++t.ref,Be(this,e)}const Ue={get:function(){var e=Re,t=ot;function n(n,r){var o=!e.global&&(e!==Re||t!==ot);const i=o&&!ut();var a=new Me(((t,a)=>{We(this,new Fe(gt(n,e,o,i),gt(r,e,o,i),t,a,e))}));return W&&qe(a,this),a}return n.prototype=ye,n},set:function(e){g(this,"then",e&&e.prototype===ye?Ue:{get:function(){return e},set:Ue.set})}};function Fe(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 Be(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&Ze();t&&"function"==typeof t.then?Be(e,((e,n)=>{t instanceof Me?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,Ve(e)),n&&Ye()}}),ze.bind(null,e))}catch(t){ze(e,t)}}function ze(e,t){if(Ce.push(t),null===e._state){var n=e._lib&&Ze();t=Ae(t),e._state=!1,e._value=t,W&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=b(t,"stack");t._promise=e,g(t,"stack",{get:()=>Se?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){je.some((t=>t._value===e._value))||je.push(e)}(e),Ve(e),n&&Ye()}}function Ve(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)We(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===De&&(++De,ke((()=>{0==--De&&Qe()}),[]))}function We(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,++De,ke(Ke,[n,e,t])}else e._listeners.push(t)}function Ke(e,t,n){try{Ne=t;var r,o=t._value;t._state?r=e(o):(Ce.length&&(Ce=[]),r=e(o),-1===Ce.indexOf(o)&&function(e){for(var t=je.length;t;)if(je[--t]._value===e._value)return void je.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Ne=null,0==--De&&Qe(),--n.psd.ref||n.psd.finalize()}}function He(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Z(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return W&&((r=Z(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&He(e._prev,t,n)),t}function qe(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Ge(){Ze()&&Ye()}function Ze(){var e=Te;return Te=!1,Pe=!1,e}function Ye(){var e,t,n;do{for(;$e.length>0;)for(e=$e,$e=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while($e.length>0);Te=!0,Pe=!0}function Qe(){var e=je;je=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Le.slice(0),n=t.length;n;)t[--n]()}function Je(e){return new Me(ye,!1,e)}function Xe(e,t){var n=Re;return function(){var r=Ze(),o=Re;try{return pt(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{pt(o,!1),r&&Ye()}}}h(Me.prototype,{then:Ue,_then:function(e,t){We(this,new Fe(null,null,e,t,Re))},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):Je(e))):this.then(null,(e=>e&&e.name===t?n(e):Je(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),Je(t))))},stack:{get:function(){if(this._stack)return this._stack;try{Se=!0;var e=He(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Se=!1}}},timeout:function(e,t){return e<1/0?new Me(((n,r)=>{var o=setTimeout((()=>r(new ie.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&g(Me.prototype,Symbol.toStringTag,"Dexie.Promise"),Ie.env=dt(),h(Me,{all:function(){var e=z.apply(null,arguments).map(ct);return new Me((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>Me.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof Me)return e;if(e&&"function"==typeof e.then)return new Me(((t,n)=>{e.then(t,n)}));var t=new Me(ye,!0,e);return qe(t,Ne),t},reject:Je,race:function(){var e=z.apply(null,arguments).map(ct);return new Me(((t,n)=>{e.map((e=>Me.resolve(e).then(t,n)))}))},PSD:{get:()=>Re,set:e=>Re=e},totalEchoes:{get:()=>ot},newPSD:at,usePSD:ht,scheduler:{get:()=>ke,set:e=>{ke=e}},rejectionMapper:{get:()=>Ae,set:e=>{Ae=e}},follow:(e,t)=>new Me(((n,r)=>at(((t,n)=>{var r=Re;r.unhandleds=[],r.onunhandled=n,r.finalize=fe((function(){!function(e){Le.push((function t(){e(),Le.splice(Le.indexOf(t),1)})),++De,ke((()=>{0==--De&&Qe()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),Ee&&(Ee.allSettled&&g(Me,"allSettled",(function(){const e=z.apply(null,arguments).map(ct);return new Me((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>Me.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),Ee.any&&"undefined"!=typeof AggregateError&&g(Me,"any",(function(){const e=z.apply(null,arguments).map(ct);return new Me(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>Me.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const et={awaits:0,echoes:0,id:0};var tt=0,nt=[],rt=0,ot=0,it=0;function at(e,t,n,r){var o=Re,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++it;var a=Ie.env;i.env=xe?{Promise:Me,PromiseProp:{value:Me,configurable:!0,writable:!0},all:Me.all,race:Me.race,allSettled:Me.allSettled,any:Me.any,resolve:Me.resolve,reject:Me.reject,nthen:yt(a.nthen,i),gthen:yt(a.gthen,i)}:{},t&&l(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=ht(i,e,n,r);return 0===i.ref&&i.finalize(),s}function st(){return et.id||(et.id=++tt),++et.awaits,et.echoes+=100,et.id}function ut(){return!!et.awaits&&(0==--et.awaits&&(et.id=0),et.echoes=100*et.awaits,!0)}function ct(e){return et.echoes&&e&&e.constructor===Ee?(st(),e.then((e=>(ut(),e)),(e=>(ut(),bt(e))))):e}function lt(e){++ot,et.echoes&&0!=--et.echoes||(et.echoes=et.id=0),nt.push(Re),pt(e,!0)}function ft(){var e=nt[nt.length-1];nt.pop(),pt(e,!1)}function pt(e,t){var n=Re;if((t?!et.echoes||rt++&&e===Re:!rt||--rt&&e===Re)||vt(t?lt.bind(null,e):ft),e!==Re&&(Re=e,n===Ie&&(Ie.env=dt()),xe)){var r=Ie.env.Promise,o=e.env;be.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(s,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function dt(){var e=s.Promise;return xe?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:be.then,gthen:e.prototype.then}:{}}function ht(e,t,n,r,o){var i=Re;try{return pt(e,!0),t(n,r,o)}finally{pt(i,!1)}}function vt(e){_e.call(me,e)}function gt(e,t,n,r){return"function"!=typeof e?e:function(){var o=Re;n&&st(),pt(t,!0);try{return e.apply(this,arguments)}finally{pt(o,!1),r&&vt(ut)}}}function yt(e,t){return function(n,r){return e.call(this,gt(n,t),gt(r,t))}}function mt(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(s.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),l(r,o)):s.CustomEvent&&l(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&s.dispatchEvent&&(dispatchEvent(r),!s.PromiseRejectionEvent&&s.onunhandledrejection))try{s.onunhandledrejection(r)}catch(e){}W&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+_e).indexOf("[native code]")&&(st=ut=ue);var bt=Me.reject;function wt(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Re.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===re.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>wt(e,t,n,r)))):bt(o)}return o._promise(t,((e,t)=>at((()=>(Re.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return bt(new ie.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return bt(new ie.DatabaseClosed);e.open().catch(ue)}return e._state.dbReadyPromise.then((()=>wt(e,t,n,r)))}const _t=String.fromCharCode(65535),Et="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",xt=[],St="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Ot=St,kt=St,Tt=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function Pt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const jt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ct(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=$(t))[e],t)}class Nt{_trans(e,t,n){const r=this._tx||Re.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new ie.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=Ze();try{return r&&r.db===this.db?r===Re.trans?r._promise(e,i,n):at((()=>r._promise(e,i,n)),{trans:r,transless:Re.transless||Re}):wt(this.db,e,[this.name],i)}finally{a&&Ye()}}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(c(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=u(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const 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!==_t)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&W&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?Pt(n,a&&a.multi?e=>{const t=T(e,o);return c(t)&&t.some((e=>i(s,e)))}:e=>i(s,T(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,c(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(d(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){l(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Ct(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?Me.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{P(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||c(e))return this.where(":id").equals(e).modify(t);{const n=T(e,this.schema.primKey.keyPath);if(void 0===n)return bt(new ie.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?u(t).forEach((n=>{P(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Ct(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Me.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{P(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?Me.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:jt}))).then((e=>e.numFailures?Me.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){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new ie.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ie.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Ct(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 ne(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new ie.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ie.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Ct(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 ne(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const 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 ne(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function At(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new 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)return a(e);r||(r=ve),o||(o=ue);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){u(e).forEach((function(t){var n=e[t];if(c(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new ie.InvalidArgument("Invalid event config");var r=i(t,ce,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){O((function(){e.apply(null,t)}))}))}))}}))}}function It(e,t){return y(t).from({prototype:e}),t}function Rt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function $t(e,t){e.filter=Pt(e.filter,t)}function Dt(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>Pt(r(),t()):t,e.justLimit=n&&!r}function Lt(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new ie.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Mt(e,t,n){const r=Lt(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 Ut(e,t,n,r){const o=e.replayFilter?Pt(e.filter,e.replayFilter()):e.filter;if(e.or){const 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)),d(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),Ft(Mt(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Ft(Mt(e,r,n),Pt(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function Ft(e,t,n,r){var o=Xe(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=ue}),(t=>{e.fail(t),n=ue}))||o(e.value,e,(e=>n=e)),n()}))}))}function Bt(e,t){try{const n=zt(e),r=zt(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){const 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}(Vt(e),Vt(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Bt(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function zt(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=M(e);return"ArrayBuffer"===n?"binary":n}function Vt(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class Wt{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,bt.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,bt.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=Pt(t.algorithm,e)}_iterate(e,t){return Ut(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&l(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Ut(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Rt(t,!0))return n.count({trans:e,query:{index:Lt(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Ut(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const 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&&Rt(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=Lt(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))}{const n=[];return Ut(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Rt(t)?Dt(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Dt(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Dt(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return $t(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,n;return $t(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Pt(t.isMatch,n),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&&Rt(t,!0)&&t.limit>0)return this._read((e=>{var n=Lt(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 $t(this._ctx,(function(e){var t=e.primaryKey.toString(),r=d(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=u(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];T(t,a)!==s&&(P(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:c}=a.schema.primaryKey,l=this.db._options.modifyChunkSize||200,f=[];let p=0;const d=[],h=(e,t)=>{const{failures:n,numFailures:r}=t;p+=e-r;for(let e of u(n))f.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=u=>{const f=Math.min(l,o.length-u);return a.getMany({trans:n,keys:o.slice(u,u+f),cache:"immutable"}).then((p=>{const d=[],v=[],g=s?[]:null,y=[];for(let e=0;e<f;++e){const t=p[e],n={value:$(t),primKey:o[u+e]};!1!==r.call(n,n.value,n)&&(null==n.value?y.push(o[u+e]):s||0===Bt(c(t),c(n.value))?(v.push(n.value),s&&g.push(o[u+e])):(y.push(o[u+e]),d.push(n.value)))}const m=Rt(t)&&t.limit===1/0&&("function"!=typeof e||e===Kt)&&{index:t.index,range:t.range};return Promise.resolve(d.length>0&&a.mutate({trans:n,type:"add",values:d}).then((e=>{for(let t in e.failures)y.splice(parseInt(t),1);h(d.length,e)}))).then((()=>(v.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:g,values:v,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>h(v.length,e))))).then((()=>(y.length>0||m&&e===Kt)&&a.mutate({trans:n,type:"delete",keys:y,criteria:m}).then((e=>h(y.length,e))))).then((()=>o.length>u+f&&i(u+l)))}))};return i(0).then((()=>{if(f.length>0)throw new te("Error modifying one or more objects",f,p,d);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Rt(e)&&(e.isPrimKey&&!kt||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new te("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Kt)}}const Kt=(e,t)=>t.value=null;function Ht(e,t){return e<t?-1:e===t?0:1}function qt(e,t){return e>t?-1:e===t?0:1}function Gt(e,t,n){var r=e instanceof en?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Zt(e){return new e.Collection(e,(()=>Xt(""))).limit(0)}function Yt(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}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)}function Qt(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return Gt(e,"String expected.");function p(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?Ht:qt;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})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}p("next");var d=new e.Collection(e,(()=>Jt(s[0],u[f-1]+r)));d._ondirectionchange=function(e){p(e)};var h=0;return d._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,u,h))return!0;for(var d=null,v=h;v<f;++v){var g=Yt(o,p,s[v],u[v],a,c);null===g&&null===d?h=v+1:(null===d||a(d,g)>0)&&(d=g)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d}function Jt(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Xt(e){return{type:1,lower:e,upper:e}}class en{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)?Zt(this):new this.Collection(this,(()=>Jt(e,t,!n,!r)))}catch(e){return Gt(this,Et)}}equals(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Xt(e)))}above(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(e,void 0,!0)))}aboveOrEqual(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(e,void 0,!1)))}below(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(void 0,e)))}startsWith(e){return"string"!=typeof e?Gt(this,"String expected."):this.between(e,e+_t,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Qt(this,((e,t)=>0===e.indexOf(t[0])),[e],_t)}equalsIgnoreCase(e){return Qt(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=z.apply(B,arguments);return 0===e.length?Zt(this):Qt(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=z.apply(B,arguments);return 0===e.length?Zt(this):Qt(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,_t)}anyOf(){const e=z.apply(B,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Gt(this,Et)}if(0===e.length)return Zt(this);const n=new this.Collection(this,(()=>Jt(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)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,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(){const e=z.apply(B,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Gt(this,Et)}const 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){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return Zt(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return Gt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ie.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&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}),[]),c.sort(f)}catch(e){return Gt(this,Et)}let p=0;const d=u?e=>r(e,c[p][1])>0:e=>r(e,c[p][1])>=0,h=s?e=>o(e,c[p][0])>0:e=>o(e,c[p][0])>=0;let v=d;const g=new this.Collection(this,(()=>Jt(c[0][0],c[c.length-1][1],!s,!u)));return g._ondirectionchange=e=>{"next"===e?(v=d,l=r):(v=h,l=o),c.sort(f)},g._addAlgorithm(((e,t,n)=>{for(var o=e.key;v(o);)if(++p,p===c.length)return t(n),!1;return!!function(e){return!d(e)&&!h(e)}(o)||(0===this._cmp(o,c[p][1])||0===this._cmp(o,c[p][0])||t((()=>{l===r?e.continue(c[p][0]):e.continue(c[p][1])})),!1)})),g}startsWithAnyOf(){const e=z.apply(B,arguments);return e.every((e=>"string"==typeof e))?0===e.length?Zt(this):this.inAnyRange(e.map((e=>[e,e+_t]))):Gt(this,"startsWithAnyOf() only works with strings")}}function tn(e){return Xe((function(t){return nn(t),e(t.target.error),!1}))}function nn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const rn=At(null,"storagemutated");class on{_lock(){return S(!Re.global),++this._reculock,1!==this._reculock||Re.global||(Re.lockOwnerFor=this),this}_unlock(){if(S(!Re.global),0==--this._reculock)for(Re.global||(Re.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{ht(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Re.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(S(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new ie.DatabaseClosed(n);case"MissingAPIError":throw new ie.MissingAPI(n.message,n);default:throw new ie.OpenFailed(n)}if(!this.active)throw new ie.TransactionInactive;return S(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=Xe((t=>{nn(t),this._reject(e.error)})),e.onabort=Xe((t=>{nn(t),this.active&&this._reject(new ie.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Xe((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&rn.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return bt(new ie.ReadOnly("Transaction is readonly"));if(!this.active)return bt(new ie.TransactionInactive);if(this._locked())return new Me(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},Re])}));if(n)return at((()=>{var e=new Me(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new Me(((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();const n=Me.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 Me(((e,r)=>{n.then((n=>t._waitingQueue.push(Xe(e.bind(null,n)))),(e=>t._waitingQueue.push(Xe(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 ie.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(d(t,e))return t[e];const n=this.schema[e];if(!n)throw new ie.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function an(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?"++":"")+sn(t)}}function sn(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function un(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:k(n,(e=>[e.name,e]))}}let cn=e=>{try{return e.only([[]]),cn=()=>[[]],[[]]}catch(e){return cn=()=>_t,_t}};function ln(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>T(t,e)}(e):t=>T(t,e)}function fn(e){return[].slice.call(e)}let pn=0;function dn(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function hn(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{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)}const{schema:o,hasGetAll:i}=function(e,t){const n=fn(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=c(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:ln(t)},indexes:fn(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:c(o),keyPath:o,unique:n,multiEntry:r,extractKey:ln(o)};return i[dn(o)]=a,a})),getIndexByKeyPath:e=>i[dn(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[dn(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=Xe(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:p}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let d;const h=[],v=[];let g=0;const y=e=>{++g,nn(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:g,failures:v,results:[],lastResult:void 0});3===a.type?h.push(d=c.clear()):h.push(d=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<p;++r)h.push(d=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),d.onerror=y;else for(let t=0;t<p;++t)h.push(d=c[n](e[t])),d.onerror=y}const m=e=>{const t=e.target.result;h.forEach(((e,t)=>null!=e.error&&(v[t]=e.error))),s({numFailures:g,failures:v,results:"delete"===n?o:h.map((e=>e.result)),lastResult:t})};d.onerror=e=>{y(e),m(e)},d.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=Xe(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},p=tn(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=p,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=Xe(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=tn(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=Xe(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:p}=c,d=a.objectStore(t),h=f.isPrimaryKey?d:d.index(f.name),v=r(p);if(0===u)return o({result:[]});if(e){const e=s?h.getAll(v,l):h.getAllKeys(v,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=tn(i)}else{let e=0;const t=s||!("openKeyCursor"in h)?h.openCursor(v):h.openKeyCursor(v),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=tn(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=Xe(s);const{index:c,range:l}=o,f=e.objectStore(t),p=c.isPrimaryKey?f:f.index(c.name),d=i?a?"prevunique":"prev":a?"nextunique":"next",h=n||!("openKeyCursor"in p)?p.openCursor(r(l),d):p.openKeyCursor(r(l),d);h.onerror=tn(u),h.onsuccess=Xe((t=>{const n=h.result;if(!n)return void s(null);n.___id=++pn,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Xe(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=Xe(e),h.onerror=tn(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 new Error("Cursor behind last entry")},n.stop()};return h.onsuccess=Xe((e=>{h.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=Xe((t=>e(t.target.result))),l.onerror=tn(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:cn(t),schema:o}}function vn({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(hn(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const 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 gn({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=b(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?g(t,n,{get(){return this.table(n)},set(e){v(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function yn({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function mn(e,t){return e._cfg.version-t._cfg.version}function bn(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=Re.transless||Re;at((()=>{Re.trans=i,Re.transless=s,0===t?(u(o).forEach((e=>{_n(n,e,o[e].primKey,o[e].indexes)})),vn(e,n),Me.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=xn(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,c=i._cfg.dbschema;Sn(e,o,r),Sn(e,c,r),a=e._dbSchema=c;const l=wn(o,c);l.add.forEach((e=>{_n(r,e[0],e[1].primKey,e[1].indexes)})),l.change.forEach((e=>{if(e.recreate)throw new ie.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>En(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),En(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const f=i._cfg.contentUpgrade;if(f&&i._cfg.version>t){vn(e,r),n._memoizedTables={},s=!0;let t=j(c);l.del.forEach((e=>{t[e]=o[e]})),yn(e,[e.Transaction.prototype]),gn(e,[e.Transaction.prototype],u(t),t),n.schema=t;const i=V(f);let a;i&&st();const p=Me.follow((()=>{if(a=f(n),a&&i){var e=ut.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?Me.resolve(a):p.then((()=>a))}})),o.push((t=>{s&&Ot||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),yn(e,[e.Transaction.prototype]),gn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?Me.resolve(o.shift()(n.idbtrans)).then(e):Me.resolve()}().then((()=>{var e,t;t=r,u(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||_n(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}function wn(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!St)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function _n(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>En(o,e))),o}function En(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function xn(e,t,n){const r={};return E(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=an(sn(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=an(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=un(e,i,a)})),r}function Sn({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+E(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class On{_parseStoresSpec(e,t){u(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return an(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),c(r),0===t)})),o=r.shift();if(o.multi)throw new ie.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new ie.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new ie.Schema("Index must have a name and cannot be an empty string")})),t[n]=un(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{l(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,yn(t,[t._allTables,t,t.Transaction.prototype]),gn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],u(o),o),t._storeNames=u(o),this}upgrade(e){return this._cfg.contentUpgrade=ge(this._cfg.contentUpgrade||ue,e),this}}function kn(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new qn("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Tn(e){return e&&"function"==typeof e.databases}function Pn(e){return at((function(){return Re.letThrough=!0,e()}))}function jn(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function Cn(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):c(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function Nn(e,t,n){var r=arguments.length;if(r<2)throw new ie.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=N(o);return[e,i,n]}function An(e,t,n,r,o){return Me.resolve().then((()=>{const i=Re.transless||Re,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===re.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>An(e,t,n,null,o)))):bt(r)}const u=V(o);let c;u&&st();const l=Me.follow((()=>{if(c=o.call(a,a),c)if(u){var e=ut.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=Cn(c))}),s);return(c&&"function"==typeof c.then?Me.resolve(c).then((e=>a.active?e:bt(new ie.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),bt(e))))}))}function In(e,t,n){const r=c(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Rn={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=dn(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:ln(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:In(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:In(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[dn(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(In(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(In(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return c}}}};function $n(e,t,n,r){return n=n||{},r=r||"",u(e).forEach((o=>{if(d(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=M(i);e!==M(a)?n[r+o]=t[o]:"Object"===e?$n(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})),u(t).forEach((o=>{d(e,o)||(n[r+o]=t[o])})),n}const Dn={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=Re.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===ue)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===ue&&s.fire===ue)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===ue)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===ue)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=Re.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||P(e.values[o],r.keyPath,n))}else{const r=$n(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{d(t,e)?t[e]=i[e]:P(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Ln(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Bt(t.keys[o],e[i])&&(r.push(n?$(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const Mn={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Ln(e.keys,e.trans._cache,"clone"===e.cache);return t?Me.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?$(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Un(e){return!("from"in e)}const Fn=function(e,t){if(!this){const t=new Fn;return e&&"d"in e&&l(t,e),t}l(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Bn(e,t,n){const r=Bt(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Un(e))return l(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Bt(n,e.from)<0)return o?Bn(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Wn(e);if(Bt(t,e.to)>0)return i?Bn(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Wn(e);Bt(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Bt(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&zn(e,o),i&&a&&zn(e,i)}function zn(e,t){Un(t)||function e(t,{from:n,to:r,l:o,r:i}){Bn(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Vn(e){let t=Un(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Bt(e,t.n.from)<0;)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||Bt(e,t.n.to)<=0)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 Wn(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const 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=Kn(n)}e.d=Kn(e)}function Kn({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}h(Fn.prototype,{add(e){return zn(this,e),this},addKey(e){return Bn(this,e,e),this},addKeys(e){return e.forEach((e=>Bn(this,e,e))),this},[U](){return Vn(this)}});const Hn={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new Fn(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,f={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new Fn)},l=u(""),f=u(":dels"),{type:p}=e;let[d,h]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const v=e.trans._cache;return o.mutate(e).then((e=>{if(c(d)){"delete"!==p&&(d=e.results),l.addKeys(d);const t=Ln(d,v);t||"add"===p||f.addKeys(d),(t||h)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&c(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==Bt(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,h)}else if(d){const e={from:d.lower,to:d.upper};f.add(e),l.add(e)}else l.add(n),f.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},p=({query:{index:t,range:n}})=>{var r,o;return[t,new Fn(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},d={get:e=>[a,new Fn(e.key)],getMany:e=>[a,(new Fn).addKeys(e.keys)],count:p,query:p,openCursor:p};return u(d).forEach((e=>{f[e]=function(i){const{subscr:a}=Re;if(a){const u=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new Fn)},c=u(""),f=u(":dels"),[p,h]=d[e](i);if(u(p.name||"").add(h),!p.isPrimaryKey){if("count"!==e){const 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)));const e=i.values?n.result.map(s):n.result;i.values?c.addKeys(e):f.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(f.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return f.addKey(t),t}},value:{get:()=>(t&&c.addKey(e.primaryKey),e.value)}})}return n}))}f.add(n)}}return o[e].apply(this,arguments)}})),f}}}};class qn{constructor(e,t){this._middlewares={},this.verno=0;const n=qn.dependencies;this._options=t={addons:qn.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ue,dbReadyPromise:null,cancelOpen:ue,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new Me((e=>{o.dbReadyResolve=e})),o.openCanceller=new Me(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=At(this,"populate","blocked","versionchange","close",{ready:[ge,ue]}),this.on.ready.subscribe=x(this.on.ready.subscribe,(e=>(t,n)=>{qn.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||Me.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,It(Wt.prototype,(function(e,t){this.db=i;let n=jt,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==ce?s:null}}))),this.Table=function(e){return It(Nt.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:At(null,{creating:[pe,ue],reading:[le,ce],updating:[he,ue],deleting:[de,ue]})}))}(this),this.Transaction=function(e){return It(on.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=At(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 Me(((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(),bt(e)}))}))}(this),this.Version=function(e){return It(On.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return It(en.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new ie.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)=>o.cmp(e,t)<0?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=cn(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),xt.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Rn),this.use(Dn),this.use(Hn),this.use(Mn),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new ie.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new ie.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const 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(mn),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||Re.letThrough||this._vip)?e():new Me(((e,t)=>{if(this._state.openComplete)return t(new ie.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new ie.DatabaseClosed);this.open().catch(ue)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const 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){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?bt(t.dbOpenError):e));W&&(t.openCanceller._stackHolder=G()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new ie.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return Me.race([r,("undefined"==typeof navigator?Me.resolve():jn()).then((()=>new Me(((r,i)=>{if(o(),!n)throw new ie.MissingAPI;const c=e.name,l=t.autoSchema?n.open(c):n.open(c,Math.round(10*e.verno));if(!l)throw new ie.MissingAPI;l.onerror=tn(i),l.onblocked=Xe(e._fireOnBlocked),l.onupgradeneeded=Xe((r=>{if(a=l.transaction,t.autoSchema&&!e._options.allowEmptyDB){l.onerror=nn,a.abort(),l.result.close();const e=n.deleteDatabase(c);e.onsuccess=e.onerror=Xe((()=>{i(new ie.NoSuchDatabase(`Database ${c} doesnt exist`))}))}else{a.onerror=tn(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=l.result,bn(e,o/10,a,i)}}),i),l.onsuccess=Xe((()=>{a=null;const n=e._novip.idbdb=l.result,o=E(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=xn(0,t,n);e._storeNames=E(t.objectStoreNames,0),gn(e,[e._allTables],u(r),r)}(e,n,r):(Sn(e,e._dbSchema,r),function(e,t){const n=wn(xn(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),vn(e,r)}catch(e){}var i;xt.push(e),n.onversionchange=Xe((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=Xe((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!Tn(e)&&"__dbnames"!==n&&kn(e,t).put({name:n}).catch(ue)}(e._deps,c),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],Me.resolve(Pn((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(ge,ue);return t.onReadyBeingFired=[],Me.resolve(Pn((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),bt(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=xt.indexOf(this);if(t>=0&&xt.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Me((t=>{e.dbReadyResolve=t})),e.openCanceller=new Me(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new ie.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Me(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Xe((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Tn(e)&&"__dbnames"!==n&&kn(e,t).delete(n).catch(ue)}(this._deps,this.name),n()})),e.onerror=tn(r),e.onblocked=this._fireOnBlocked};if(e)throw new ie.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return u(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Nn.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=Re.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new ie.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new ie.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new ie.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):bt(e)}const s=An.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):Re.trans?ht(Re.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!d(this._allTables,e))throw new ie.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const Gn="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Zn{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[Gn](){return this}}function Yn(e,t){return u(t).forEach((n=>{zn(e[n]||(e[n]=new Fn),t[n])})),e}let Qn;try{Qn={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch(s){Qn={indexedDB:null,IDBKeyRange:null}}const Jn=qn;function Xn(e){let t=er;try{er=!0,rn.storagemutated.fire(e)}finally{er=t}}h(Jn,{...se,delete:e=>new Jn(e,{addons:[]}).delete(),exists:e=>new Jn(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Tn(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):kn(e,t).toCollection().primaryKeys()}(Jn.dependencies).then(e)}catch(e){return bt(new ie.MissingAPI)}},defineClass:()=>function(e){l(this,e)},ignoreTransaction:e=>Re.trans?ht(Re.transless,e):e(),vip:Pn,async:function(e){return function(){try{var t=Cn(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Me.resolve(t)}catch(e){return bt(e)}}},spawn:function(e,t,n){try{var r=Cn(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:Me.resolve(r)}catch(e){return bt(e)}},currentTransaction:{get:()=>Re.trans||null},waitFor:function(e,t){const n=Me.resolve("function"==typeof e?Jn.ignoreTransaction(e):e).timeout(t||6e4);return Re.trans?Re.trans.waitFor(n):n},Promise:Me,debug:{get:()=>W,set:e=>{K(e,"dexie"===e?()=>!0:Tt)}},derive:y,extend:l,props:h,override:x,Events:At,on:rn,liveQuery:function(e){return new Zn((t=>{const n=V(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,rn.storagemutated.unsubscribe(f)}};t.start&&t.start(a);let s=!1,c=!1;function l(){return u(i).some((e=>o[e]&&function(e,t){const n=Vn(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Vn(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(Bt(s.from,o.to)<=0&&Bt(s.to,o.from)>=0)return!0;Bt(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const f=e=>{Yn(o,e),l()&&p()},p=()=>{if(s||r)return;o={};const u={},d=function(t){n&&st();const r=()=>at(e,{subscr:t,trans:null}),o=Re.trans?ht(Re.transless,r):r();return n&&o.then(ut,ut),o}(u);c||(rn("storagemutated",f),c=!0),s=!0,Promise.resolve(d).then((e=>{s=!1,r||(l()?p():(o={},i=u,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return p(),a}))},extendObservabilitySet:Yn,getByKeyPath:T,setByKeyPath:P,delByKeyPath:function(e,t){"string"==typeof t?P(e,t,void 0):"length"in t&&[].map.call(t,(function(t){P(e,t,void 0)}))},shallowClone:j,deepClone:$,getObjectDiff:$n,cmp:Bt,asap:O,minKey:-1/0,addons:[],connections:xt,errnames:re,dependencies:Qn,semVer:"3.2.1",version:"3.2.1".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),Jn.maxKey=cn(Jn.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(rn("storagemutated",(e=>{if(!er){let t;St?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),er=!0,dispatchEvent(t),er=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{er||Xn(e)})));let er=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");rn("storagemutated",(t=>{er||e.postMessage(t)})),e.onmessage=e=>{e.data&&Xn(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){rn("storagemutated",(e=>{try{er||("undefined"!=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){}})),addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&Xn(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&Xn(e.changedParts)}))}Me.rejectionMapper=function(e,t){if(!e||e instanceof X||e instanceof TypeError||e instanceof SyntaxError||!e.name||!ae[e.name])return e;var n=new ae[e.name](t||e.message,e);return"stack"in e&&g(n,"stack",{get:function(){return this.inner.stack}}),n},K(W,Tt);var tr=n(8748);const nr=(0,tr.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function rr(){return nr}function or(e,t){const n=nr.getState();nr.setState({handlers:{...n.handlers,[e]:t}})}async function ir(e){const t=Object.entries(nr.getState().handlers),n=t.map((e=>{let[t]=e;return t})),r=[],o=[],i={},a=new AbortController;await ar(e,{timestamp:new Date,syncingHandlers:n,syncedHandlers:r,failedHandlers:o,errors:i,abort:()=>(a.abort(),!0)}),await Promise.all(t.map((async t=>{let[n,s]=t;try{await s.onOfflinePatientAdded({patientUuid:e,signal:a.signal}),console.debug(`Offline patient handler ${n} successfully synchronized patient data.`),r.push(n)}catch(e){console.error(`Offline patient handler ${n} failed. Error: `,e),o.push(n),i[n]=e?.message??e?.toString()??""}}))),await ar(e,{timestamp:new Date,syncingHandlers:[],syncedHandlers:r,failedHandlers:o,errors:i,abort:()=>!1})}async function ar(e,t){const n=nr.getState();nr.setState({offlinePatientDataSyncState:{...n.offlinePatientDataSyncState,[e]:t}});const r=new ur,o={id:(await r.offlinePatientDataSyncStates.get({patientUuid:e}))?.id,patientUuid:e,state:{timestamp:t.timestamp,syncedHandlers:t.syncedHandlers,failedHandlers:[...t.failedHandlers,...t.syncingHandlers],errors:t.errors}};await r.offlinePatientDataSyncStates.put(o)}async function sr(){const e=new ur,t=await e.offlinePatientDataSyncStates.toArray(),n=nr.getState().offlinePatientDataSyncState;for(const e of t)n[e.patientUuid]={...e.state,syncingHandlers:[],abort:()=>!1};nr.setState({offlinePatientDataSyncState:n})}class ur extends qn{constructor(){super("EsmOfflinePatientData"),this.version(1).stores({offlinePatientDataSyncStates:"++id,&patientUuid"}),this.offlinePatientDataSyncStates=this.table("offlinePatientDataSyncStates")}}try{self["workbox:window:6.5.1"]&&_()}catch(c){}function cr(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 lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}try{self["workbox:core:6.5.1"]&&_()}catch(c){}var fr=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function pr(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var dr=function(e,t){this.type=e,Object.assign(this,t)};function hr(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function vr(){}var gr={type:"SKIP_WAITING"};function yr(e,t){if(!t)return e&&e.then?e.then(vr):Promise.resolve()}async function mr(e){const t=await Promise.resolve(void 0);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."}}!function(e){var t,n;function r(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new fr,r.en=new fr,r.on=new fr,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!pr(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 dr(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new dr("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 dr("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return hr(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new dr("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},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}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return yr(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),hr(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&pr(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new dr("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},i.update=function(){try{return this.fn?yr(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return hr(this.getSW(),(function(t){return cr(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&cr(this.fn.waiting,gr)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&pr(e.scriptURL,this.sn.toString())?e:void 0},i.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 hr(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)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(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)}}(r.prototype,o)}(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,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return lr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lr(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(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}());const br="x-omrs-offline-response-body",wr="x-omrs-offline-response-status",_r="x-omrs-offline-caching-strategy";var Er,xr=new Uint8Array(16);function Sr(){if(!Er&&!(Er="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Er(xr)}const Or=/^(?:[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,kr=function(e){return"string"==typeof e&&Or.test(e)};for(var Tr=[],Pr=0;Pr<256;++Pr)Tr.push((Pr+256).toString(16).substr(1));const jr=function(e,t,n){var r=(e=e||{}).random||(e.rng||Sr)();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 function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Tr[e[t+0]]+Tr[e[t+1]]+Tr[e[t+2]]+Tr[e[t+3]]+"-"+Tr[e[t+4]]+Tr[e[t+5]]+"-"+Tr[e[t+6]]+Tr[e[t+7]]+"-"+Tr[e[t+8]]+Tr[e[t+9]]+"-"+Tr[e[t+10]]+Tr[e[t+11]]+Tr[e[t+12]]+Tr[e[t+13]]+Tr[e[t+14]]+Tr[e[t+15]]).toLowerCase();if(!kr(n))throw TypeError("Stringified UUID is invalid");return n}(r)},Cr="OFFLINE+";function Nr(){return Cr+jr()}function Ar(e){return e.startsWith(Cr)}var Ir=n(5426);const Rr=new class extends qn{constructor(){super("EsmOffline"),this.version(3).stores({syncQueue:"++id,userId,type,[userId+type]"}),this.syncQueue=this.table("syncQueue")}},$r={};function Dr(){return Rr}async function Lr(){return(await(0,Ir.getLoggedInUser)())?.uuid||"*"}async function Mr(e,t,n){const r=await Lr();return await async function(e,t,n,r){const o=Rr.syncQueue,i=r&&r.id;return void 0!==i&&await o.where({type:t,userId:e}).filter((e=>e?.descriptor.id===i)).delete(),await o.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date})}(r,e,t,n)}async function Ur(e){const t=await Lr();return await async function(e,t){const n=Rr.syncQueue,r=[];return await n.where({type:t,userId:e}).each((e=>{r.push(e.content)})),r}(t,e)}async function Fr(e){return await Rr.syncQueue.get(e)}function Br(e){return!!$r[e]?.options.onBeginEditSyncItem}async function zr(e){const t=await Fr(e);if(!t)throw new Error(`No sync item with the ID ${e} exists.`);const n=$r[t.type]?.options.onBeginEditSyncItem;if(!n)throw new 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 Vr(e){await Rr.syncQueue.delete(e)}function Wr(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};$r[e]={type:e,dependsOn:t,process:n,options:r}}(0,tr.createGlobalStore)("offline-synchronization",{})},4734:(e,t,n)=>{"use strict";n.d(t,{w:()=>u,hj:()=>fn,g:()=>r.ExtensionData,dT:()=>b,Vz:()=>ot,NV:()=>c,D$:()=>Re,Ae:()=>Ae,tl:()=>Ne,a$:()=>Ie,YV:()=>$e,P3:()=>h,yn:()=>De,ZR:()=>Fe,BL:()=>v,Y9:()=>p,Yq:()=>Qe,p8:()=>g,qd:()=>Je,jf:()=>Xe,mr:()=>tt,Z_:()=>nt,t$:()=>rt,h0:()=>ln,lm:()=>He,Oy:()=>it,oR:()=>ct,xQ:()=>lt,JF:()=>un,NN:()=>cn});var r={};n.r(r),n.d(r,{s:()=>i});var o=n(2735);const i=o.createContext({moduleName:""});var a=n(7179);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const u=e=>{let{to:t,children:n,...r}=e;return o.createElement("a",s({onClick:e=>function(e,t){e.metaKey||e.ctrlKey||e.shiftKey||0!=e.button||(e.preventDefault(),(0,a.navigate)({to:t}))}(e,t),href:(0,a.interpolateUrl)(t)},r),n)};function c(e){return function(t){const[n,r]=(0,o.useState)(e.getState());(0,o.useEffect)((()=>e.subscribe((e=>r(e)))),[]);let i={};return t&&(i=(0,o.useMemo)((()=>function(e,t){"function"==typeof t&&(t=t(e));const n={};for(let r in t)n[r]=e.action(t[r]);return n}(e,t)),[e,t])),{...n,...i}}}var l=n(2465),f=n(9976);function p(){let[e,t]=(0,o.useState)(window.navigator.onLine);return(0,o.useEffect)((()=>(0,f.subscribeConnectivityChanged)((e=>{let{online:n}=e;return t(n)}))),[]),e}var d=n(2891);function h(e){const[t,n]=(0,o.useState)([]);return(0,o.useEffect)((()=>{function r(r){const o=r.slots[e]?.assignedExtensions??[];(0,d.isEqual)(o,t)||n(o)}return r((0,l.getExtensionStore)().getState()),(0,l.getExtensionStore)().subscribe(r)}),[e,t]),t}function v(e){const t=p(),n=h(e);return(0,o.useMemo)((()=>(0,l.getConnectedExtensions)(n,t)),[n,t])}function g(e){const{moduleName:t}=(0,o.useContext)(i);if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,o.useEffect)((()=>{(0,l.registerExtensionSlot)(t,e)}),[]),{extensions:v(e),extensionSlotName:e,extensionSlotModuleName:t}}function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function m(e){return e}const b=e=>{let{extensionSlotName:t,select:n=m,children:r,state:a,style:s,...u}=e;const c=(0,o.useRef)(null),{extensions:l,extensionSlotModuleName:f}=g(t),p=(0,o.useRef)(a);(function(e,t){if(e===t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){const o=n[r];if(!(o in t)||t[o]!==e[o])return!1}return!0})(p.current,a)||(p.current=a);const d=(0,o.useMemo)((()=>t&&n(l).map((e=>o.createElement(i.Provider,{key:e.id,value:{moduleName:f,extension:{extensionId:e.id,extensionSlotName:t,extensionSlotModuleName:f}}},r??o.createElement(fn,{state:p.current}))))),[n,l,t,p.current]);return o.createElement("div",y({ref:c,"data-extension-slot-name":t,"data-extension-slot-module-name":f,style:{...s,position:"relative"}},u),d)};var w=n(2788);function _(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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e){return(x="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 S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e){return(O="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 k(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(O(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(O(e)));return e}}var T=null;try{T=require("react").createContext()}catch(_){}var P={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}};function j(e){if("object"!==x(e))throw new Error("single-spa-react requires a configuration object");var t=E(E({},P),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!T&&t.React.createContext&&(T=t.React.createContext()),t.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}(t);var n={bootstrap:C.bind(null,t),mount:N.bind(null,t),unmount:A.bind(null,t)};return t.parcelCanUpdate&&(n.update=I.bind(null,t)),n}function C(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))}function N(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.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=R(e,t,(function(){n(this)})),i=k(e,t)(),a=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=t.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:e});e.domElements[t.name]=i,e.renderResults[t.name]=a}))}function A(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))}function I(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=R(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=k(e,t)();e.ReactDOM.render(r,i)}}))}function R(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=T?e.React.createElement(T.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)),e.React.createElement(e.SingleSpaRoot,E(E({},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(){setTimeout(e.unmountFinished)}}),o)}function $(e){return $="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 D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){D(e,t,n[t])}))}return e}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(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 F(e,t,n){return t&&U(e.prototype,t),n&&U(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function B(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(e,t){if(t&&("object"===$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return B(e)}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function W(e,t){return W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},W(e,t)}function K(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}var H={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},q=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};M(this,e),this.init(t,n)}return F(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||H,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,L({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),G=new q,Z=function(){function e(){M(this,e),this.observers={}}return F(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function Y(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function Q(e){return null==e?"":""+e}function J(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function X(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function ee(e,t,n){var r=X(e,t,Object);r.obj[r.k]=n}function te(e,t){var n=X(e,t),r=n.obj,o=n.k;if(r)return r[o]}function ne(e,t,n){var r=te(e,n);return void 0!==r?r:te(t,n)}function re(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):re(e[r],t[r],n):e[r]=t[r]);return e}function oe(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var ie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ae(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return ie[e]})):e}var se="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,ue=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return M(this,t),n=z(this,V(t).call(this)),se&&Z.call(B(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return K(t,e),F(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),te(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),ee(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=te(this.data,a)||{};r?re(s,n,o):s=L({},s,n),ee(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?L({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(Z),ce={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},le={},fe=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return M(this,t),n=z(this,V(t).call(this)),se&&Z.call(B(n)),J(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,B(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=G.create("translator"),n}return K(t,e),F(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==$(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),s=a.key,u=a.namespaces,c=u[u.length-1],l=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(f){var p=n.nsSeparator||this.options.nsSeparator;return c+p+s}return s}var d=this.resolve(e,n),h=d&&d.res,v=d&&d.usedKey||s,g=d&&d.exactUsedKey||s,y=Object.prototype.toString.apply(h),m=["[object Number]","[object Function]","[object RegExp]"],b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&_&&m.indexOf(y)<0&&("string"!=typeof b||"[object Array]"!==y)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,h,n):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(i){var E="[object Array]"===y,x=E?[]:{},S=E?g:v;for(var O in h)if(Object.prototype.hasOwnProperty.call(h,O)){var k="".concat(S).concat(i).concat(O);x[O]=this.translate(k,L({},n,{joinArrays:!1,ns:u})),x[O]===k&&(x[O]=h[O])}h=x}}else if(w&&"string"==typeof b&&"[object Array]"===y)(h=h.join(b))&&(h=this.extendTranslation(h,e,n,r));else{var T=!1,P=!1,j=void 0!==n.count&&"string"!=typeof n.count,C=t.hasDefaultValue(n),N=j?this.pluralResolver.getSuffix(l,n.count):"",A=n["defaultValue".concat(N)]||n.defaultValue;!this.isValidLookup(h)&&C&&(T=!0,h=A),this.isValidLookup(h)||(P=!0,h=s);var I=C&&A!==h&&this.options.updateMissing;if(P||T||I){if(this.logger.log(I?"updateKey":"missingKey",l,c,s,I?A:h),i){var R=this.resolve(s,L({},n,{keySeparator:!1}));R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var D=[],M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&M&&M[0])for(var U=0;U<M.length;U++)D.push(M[U]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(n.lng||this.language):D.push(n.lng||this.language);var F=function(e,t,r){o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,t,I?r:h,I,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,t,I?r:h,I,n),o.emit("missingKey",e,c,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?D.forEach((function(e){o.pluralResolver.getSuffixes(e).forEach((function(t){F([e],s+t,n["defaultValue".concat(t)]||A)}))})):F(D,s,A))}h=this.extendTranslation(h,e,n,d,r),P&&h===s&&this.options.appendNamespaceToMissingKey&&(h="".concat(c,":").concat(s)),P&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(L({},n,{interpolation:L({},this.options.interpolation,n.interpolation)}));var a,s=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=L({},this.options.interpolation.defaultVariables,c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=ce.handle(p,e,t,this.options&&this.options.postProcessPassResolved?L({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,p=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,d=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!le["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(le["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" 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!!!")),d.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u,l=c,d=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(d,c,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&p&&d.push(l+i),p&&d.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&d.push(l+=i));u=d.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(Z);function pe(e){return e.charAt(0).toUpperCase()+e.slice(1)}var de=function(){function e(t){M(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=G.create("languageUtils")}return F(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=pe(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=pe(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=pe(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var 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||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),he=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ve={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function ge(){var e={};return he.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:ve[t.fc]}}))})),e}var ye=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};M(this,e),this.languageUtils=t,this.options=n,this.logger=G.create("pluralResolver"),this.rules=ge()}return F(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),me=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};M(this,e),this.logger=G.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return F(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:ae,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?oe(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?oe(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?oe(t.nestingPrefix):t.nestingPrefixEscaped||oe("$t("),this.nestingSuffix=t.nestingSuffix?oe(t.nestingSuffix):t.nestingSuffixEscaped||oe(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=ne(t,u,e);return s.alwaysFormat?s.format(o,void 0,n):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(ne(t,u,a),c,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(p){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=Q(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=L({},i);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,a)).replace(/'/g,'"');try{a=JSON.parse(o),t&&(a=L({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var u=[],c=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),u=l,c=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Q(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=u.reduce((function(e,t){return o.format(e,t,i.lng,i)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),be=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return M(this,t),o=z(this,V(t).call(this)),se&&Z.call(B(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=G.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return K(t,e),F(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=X(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,L({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(Z);function we(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===$(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===$(e[2])||"object"===$(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function _e(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ee(){}var xe=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(M(this,t),e=z(this,V(t).call(this)),se&&Z.call(B(e)),e.options=_e(n),e.services={},e.logger=G,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),z(e,B(e));setTimeout((function(){e.init(n,r)}),0)}return e}return K(t,e),F(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=L({},we(),this.options,_e(t)),this.format=this.options.interpolation.format,n||(n=Ee),!this.options.isClone){this.modules.logger?G.init(r(this.modules.logger),this.options):G.init(null,this.options);var o=new de(this.options);this.store=new ue(this.options.resources,this.options);var i=this.services;i.logger=G,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new ye(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new me(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new be(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new fe(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var s=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var c=Y(),l=function(){var t=function(t,r){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),c.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),c}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=Y();return e||(e=this.languages),t||(t=this.options.ns),n||(n=Ee),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new 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&&ce.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=Y();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,r=function e(t,r){var o;if("object"!==$(r)){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];o=n.options.overloadTranslationOptionHandler([t,r].concat(a))}else o=L({},r);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=Y();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=Y();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee,o=L({},this.options,n,{isClone:!0}),i=new t(o),a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=L({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new fe(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}}]),t}(Z);const Se=new xe;var Oe=o.createContext();function ke(e){var t=e.i18n,n=e.defaultNS,r=e.children,i=(0,o.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return(0,o.createElement)(Oe.Provider,{value:i},r)}F((function e(){M(this,e),this.usedNamespaces={}}),[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]);const Te=Se.default||Se,Pe={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},je=e=>{(0,o.useEffect)((()=>(Te.on("languageChanged",e.forceUpdate),()=>Te.off("languageChanged",e.forceUpdate))),[e.forceUpdate]);const t=(0,o.useRef)(null);if(t.current)throw t.current;if(!Te.hasLoadedNamespace(e.ns)){const n=setTimeout((()=>{console.warn(`openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['${e.ns}']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects.`)}),3e3);throw Te.loadNamespaces([e.ns]).then((()=>clearTimeout(n))).catch((e=>{clearTimeout(n),t.current=e}))}return o.createElement(o.Fragment,null,e.children)};function Ce(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");const t=Object.assign({},Pe,e);return function(e){var n,r,a,s;return r=n=class extends o.Component{constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}}}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 o.createElement("div",null,"An error has occurred. Please try reloading the page.");{const n=o.createElement(i.Provider,{value:this.state.config},o.createElement(o.Suspense,{fallback:null},t.disableTranslations?o.createElement(e,this.props):o.createElement(je,{ns:t.moduleName,forceUpdate:()=>this.forceUpdate()},o.createElement(ke,{i18n:Te,defaultNS:t.moduleName},o.createElement(e,this.props)))));return t.strictMode||!o.StrictMode?n:o.createElement(o.StrictMode,null,n)}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in r?Object.defineProperty(r,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[a]=s,n}}function Ne(e,t){return j({React:o,ReactDOM:w,rootComponent:Ce(t)(e)})}function Ae(e,t){return()=>e().then((e=>{let{default:n}=e;return Ne(n,t)}))}function Ie(e,t){return()=>Promise.resolve(Ne(e,t))}const Re=Ae;function $e(e){const[t,n]=(0,o.useState)([]);return(0,o.useEffect)((()=>(0,l.getExtensionStore)().subscribe((r=>{const o=r.slots[e]?.assignedExtensions.map((e=>e.id))??[];(0,d.isEqual)(o,t)||n(o)}))),[]),t}function De(e){(0,o.useEffect)((()=>{if(e){const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}}),[e])}var Le=n(3202);const Me={};function Ue(e){const t=(0,o.useMemo)(a.getExtensionsConfigStore,[]),n=function(e,t){const[n,r]=(0,o.useState)(function(e,t){return t?()=>{const n=e.getState(),r=(0,a.getExtensionConfigFromStore)(n,t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null}(e,t));return(0,o.useEffect)((()=>{if(t)return e.subscribe((e=>{const o=(0,a.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!(0,Le.Z)(o.config,n)&&r(o.config)}))}),[e,t,n]),n}(t,e);if(!n&&e){const n=`${e.extensionSlotName}-${e.extensionId}`;throw!Me[n]&&t&&(Me[n]=function(e,t){return new Promise((n=>{const r=e.subscribe((e=>{const o=(0,a.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(t,e)),Me[n]}return n||{}}function Fe(){const{moduleName:e,extension:t}=(0,o.useContext)(i);if(!e&&!t)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');const n=function(e){const t=(0,o.useMemo)((()=>(0,a.getConfigStore)(e)),[e]),n=e,r=function(e){const[t,n]=(0,o.useState)(function(e){return()=>{const t=e.getState();return t.loaded&&t.config?t.config:null}}(e));return(0,o.useEffect)((()=>e?.subscribe((e=>{e.loaded&&e.config&&n(e.config)}))),[e]),t}(t);if(!r)throw Me[n]||(Me[n]=function(e){return new Promise((t=>{const n=e.subscribe((e=>{e.loaded&&e.config&&(t(e.config),n())}))}))}(t)),Me[n];return r}(e),r=Ue(t);return(0,o.useMemo)((()=>({...n,...r})),[n,r])}var Be,ze=n(5426);!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(Be||(Be={}));const Ve={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};function We(){const e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function Ke(e,t){switch(t.type){case Be.loadPatient:return{...e,patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null};case Be.newPatient:return{...e,patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null};case Be.loadError:return{...e,patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err};default:return e}}function He(e){const[t,n]=(0,o.useReducer)(Ke,{...Ve,patientUuid:e??null,isPendingUuid:!e,isLoadingPatient:!!e});return(0,o.useEffect)((()=>{if(t.isPendingUuid){const e=We();n(e?{type:Be.loadPatient,patientUuid:e}:{type:Be.newPatient,patient:null})}let e=!0;return t.isLoadingPatient&&t.patientUuid&&(0,ze.fetchCurrentPatient)(t.patientUuid).then((t=>e&&n({patient:t.data,type:Be.newPatient})),(t=>e&&n({err:t,type:Be.loadError}))),()=>{e=!1}}),[t.isPendingUuid,t.isLoadingPatient,t.patientUuid]),(0,o.useEffect)((()=>{const e=e=>{const r=We();r!=t.patientUuid&&n({type:Be.loadPatient,patientUuid:r})};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)}),[t.patientUuid]),{isLoading:t.isPendingUuid||t.isLoadingPatient,patient:t.patient,patientUuid:e??t.patientUuid,error:t.err}}var qe;!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLloadErroroadError"}(qe||(qe={}));const Ge={patient:null,isLoadingPatient:!0,err:null};function Ze(){const e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function Ye(e,t){switch(t.type){case qe.loadPatient:return{...e,patient:null,isLoadingPatient:!0,err:null};case qe.newPatient:return{...e,patient:t.patient,isLoadingPatient:!1,err:null};case qe.loadError:return{...e,patient:null,isLoadingPatient:!1,err:t.err};default:return e}}function Qe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ze();const[t,n]=(0,o.useReducer)(Ye,Ge);return(0,o.useEffect)((()=>{let t=!0;return e?((0,ze.fetchCurrentPatient)(e).then((e=>t&&n({patient:e.data,type:qe.newPatient})),(e=>t&&n({err:e,type:qe.loadError}))),n({type:qe.loadPatient})):n({type:qe.newPatient,patient:null}),()=>{t=!1}}),[e]),[t.isLoadingPatient,t.patient,e,t.err]}function Je(e){const t=v(e);return(0,o.useMemo)((()=>Object.fromEntries(t.map((e=>[e.name,e.meta])))),[t])}c((0,l.getExtensionInternalStore)());const Xe=c((0,l.getExtensionStore)());function et(){let e="tablet";return document.body.classList.forEach((t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-tablet":e="desktop"}})),e}function tt(){const[e,t]=(0,o.useState)(et);return(0,o.useEffect)((()=>{const e=()=>{t(et())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e}function nt(){const[e,t]=(0,o.useState)([]);return(0,o.useEffect)((()=>{const e=(0,ze.getLocations)().subscribe((e=>{t(e)}),(e=>{console.error(e)}));return()=>e.unsubscribe()}),[]),e}function rt(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(t){const t=t=>{n?.current?.contains(t.target)||e(t)};return window.addEventListener("click",t),()=>window.removeEventListener("click",t)}}),[e,t]),n}const ot=e=>{let{privilege:t,children:n}=e;const[r,i]=(0,o.useState)(null);return(0,o.useEffect)((()=>{const e=(0,ze.getCurrentUser)({includeAuthStatus:!1}).subscribe(i);return()=>e.unsubscribe()}),[]),r&&(0,ze.userHasAccess)(t,r)?o.createElement(o.Fragment,null,n):null};function it(){const[e,t]=(0,o.useState)(null);return(0,o.useEffect)((()=>{if(null===e){const e=(0,ze.openmrsObservableFetch)("/ws/rest/v1/session").subscribe((e=>{t(e.data)}));return()=>e.unsubscribe()}}),[e]),e}var at=n(8748);function st(e,t){"function"==typeof t&&(t=t(e));const n={};for(let r in t)n[r]=e.action(t[r]);return n}const ut=e=>e;function ct(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ut,n=arguments.length>2?arguments[2]:void 0;const[r,i]=(0,o.useState)((()=>t(e.getState())));(0,o.useEffect)((()=>(0,at.subscribeTo)(e,t,i)),[e,t]);let a={};return n&&(a=(0,o.useMemo)((()=>st(e,n)),[e,n])),{...r,...a}}function lt(e,t){return ct(e,ut,t)}function ft(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function pt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var dt,ht=function(){},vt=ht(),gt=Object,yt=function(e){return e===vt},mt=function(e){return"function"==typeof e},bt=function(e,t){return gt.assign({},e,t)},wt="undefined",_t=function(){return typeof window!=wt},Et=new WeakMap,xt=0,St=function(e){var t,n,r=typeof e,o=e&&e.constructor,i=o==Date;if(gt(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=Et.get(e))return t;if(t=++xt+"~",Et.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=St(e[n])+",";Et.set(e,t)}if(o==gt){t="#";for(var a=gt.keys(e).sort();!yt(n=a.pop());)yt(e[n])||(t+=n+":"+St(e[n])+",");Et.set(e,t)}}return t},Ot=!0,kt=_t(),Tt=typeof document!=wt,Pt=kt&&window.addEventListener?window.addEventListener.bind(window):ht,jt=Tt?document.addEventListener.bind(document):ht,Ct=kt&&window.removeEventListener?window.removeEventListener.bind(window):ht,Nt=Tt?document.removeEventListener.bind(document):ht,At={isOnline:function(){return Ot},isVisible:function(){var e=Tt&&document.visibilityState;return yt(e)||"hidden"!==e}},It={initFocus:function(e){return jt("visibilitychange",e),Pt("focus",e),function(){Nt("visibilitychange",e),Ct("focus",e)}},initReconnect:function(e){var t=function(){Ot=!0,e()},n=function(){Ot=!1};return Pt("online",t),Pt("offline",n),function(){Ct("online",t),Ct("offline",n)}}},Rt=!_t()||"Deno"in window,$t=Rt?o.useEffect:o.useLayoutEffect,Dt="undefined"!=typeof navigator&&navigator.connection,Lt=!Rt&&Dt&&(["slow-2g","2g"].includes(Dt.effectiveType)||Dt.saveData),Mt=function(e){if(mt(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?St(e):"",t,e?"$swr$"+e:""]},Ut=new WeakMap,Ft=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var s=Ut.get(e),u=s[0],c=s[1],l=s[3],f=u[t],p=c[t];if(a&&p)for(var d=0;d<p.length;++d)p[d](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},Bt=0,zt=function(){return++Bt},Vt=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ft(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,c,l,f,p,d,h,v,g,y,m,b,w;return pt(this,(function(_){switch(_.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!yt((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,s=!1!==i.revalidate,u=!1!==i.rollbackOnError,c=i.optimisticData,l=Mt(n),f=l[0],p=l[2],!f)return[2];if(d=Ut.get(t),h=d[2],e.length<3)return[2,Ft(t,f,t.get(f),vt,vt,s,!0)];if(v=r,y=zt(),h[f]=[y,0],m=!yt(c),b=t.get(f),m&&(t.set(f,c),Ft(t,f,c)),mt(v))try{v=v(t.get(f))}catch(e){g=e}return v&&mt(v.then)?[4,v.catch((function(e){g=e}))]:[3,2];case 1:if(v=_.sent(),y!==h[f][0]){if(g)throw g;return[2,v]}g&&m&&u&&(a=!0,v=b,t.set(f,b)),_.label=2;case 2:return a&&(g||(mt(a)&&(v=a(v,b)),t.set(f,v)),t.set(p,bt(t.get(p),{error:g}))),h[f][1]=zt(),[4,Ft(t,f,v,g,vt,s,!!a)];case 3:if(w=_.sent(),g)throw g;return[2,a?w:v]}}))}))},Wt=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Kt=function(e,t){if(!Ut.has(e)){var n=bt(It,t),r={},o=Vt.bind(vt,e),i=ht;if(Ut.set(e,[r,{},{},{},o]),!Rt){var a=n.initFocus(setTimeout.bind(vt,Wt.bind(vt,r,0))),s=n.initReconnect(setTimeout.bind(vt,Wt.bind(vt,r,1)));i=function(){a&&a(),s&&s(),Ut.delete(e)}}return[e,o,i]}return[e,Ut.get(e)[4]]},Ht=Kt(new Map),qt=Ht[0],Gt=Ht[1],Zt=bt({onLoadingSlow:ht,onSuccess:ht,onError:ht,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!yt(i)&&a>i||setTimeout(r,s,o)},onDiscarded:ht,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Lt?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Lt?5e3:3e3,compare:function(e,t){return St(e)==St(t)},isPaused:function(){return!1},cache:qt,mutate:Gt,fallback:{}},At),Yt=function(e,t){var n=bt(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=bt(o,a))}return n},Qt=(0,o.createContext)({}),Jt=function(e){return mt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},Xt=function(){return bt(Zt,(0,o.useContext)(Qt))},en=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},tn={dedupe:!0},nn=(gt.defineProperty((function(e){var t=e.value,n=Yt((0,o.useContext)(Qt),t),r=t&&t.provider,i=(0,o.useState)((function(){return r?Kt(r(n.cache||qt),t):vt}))[0];return i&&(n.cache=i[0],n.mutate=i[1]),$t((function(){return i?i[2]:vt}),[]),(0,o.createElement)(Qt.Provider,bt(e,{value:n}))}),"default",{value:Zt}),dt=function(e,t,n){var r=n.cache,i=n.compare,a=n.fallbackData,s=n.suspense,u=n.revalidateOnMount,c=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,p=Ut.get(r),d=p[0],h=p[1],v=p[2],g=p[3],y=Mt(e),m=y[0],b=y[1],w=y[2],_=(0,o.useRef)(!1),E=(0,o.useRef)(!1),x=(0,o.useRef)(m),S=(0,o.useRef)(t),O=(0,o.useRef)(n),k=function(){return O.current},T=function(){return k().isVisible()&&k().isOnline()},P=function(e){return r.set(w,bt(r.get(w),e))},j=r.get(m),C=yt(a)?n.fallback[m]:a,N=yt(j)?C:j,A=r.get(w)||{},I=A.error,R=!_.current,$=function(){return R&&!yt(u)?u:!k().isPaused()&&(s?!yt(N):yt(N)||n.revalidateIfStale)},D=!(!m||!t)&&(!!A.isValidating||R&&$()),L=function(e,t){var n=(0,o.useState)({})[1],r=(0,o.useRef)(e),i=(0,o.useRef)({data:!1,error:!1,isValidating:!1}),a=(0,o.useCallback)((function(e){var o=!1,a=r.current;for(var s in e){var u=s;a[u]!==e[u]&&(a[u]=e[u],i.current[u]&&(o=!0))}o&&!t.current&&n({})}),[]);return $t((function(){r.current=e})),[r,i.current,a]}({data:N,error:I,isValidating:D},E),M=L[0],U=L[1],F=L[2],B=(0,o.useCallback)((function(e){return ft(void 0,void 0,void 0,(function(){var t,o,a,s,u,c,l,f,p,d,h,y,w;return pt(this,(function(O){switch(O.label){case 0:if(t=S.current,!m||!t||E.current||k().isPaused())return[2,!1];s=!0,u=e||{},c=!g[m]||!u.dedupe,l=function(){return!E.current&&m===x.current&&_.current},f=function(){var e=g[m];e&&e[1]===a&&delete g[m]},p={isValidating:!1},d=function(){P({isValidating:!1}),l()&&F(p)},P({isValidating:!0}),F({isValidating:!0}),O.label=1;case 1:return O.trys.push([1,3,,4]),c&&(Ft(r,m,M.current.data,M.current.error,!0),n.loadingTimeout&&!r.get(m)&&setTimeout((function(){s&&l()&&k().onLoadingSlow(m,n)}),n.loadingTimeout),g[m]=[t.apply(void 0,b),zt()]),w=g[m],o=w[0],a=w[1],[4,o];case 2:return o=O.sent(),c&&setTimeout(f,n.dedupingInterval),g[m]&&g[m][1]===a?(P({error:vt}),p.error=vt,h=v[m],!yt(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(d(),c&&l()&&k().onDiscarded(m),[2,!1]):(i(M.current.data,o)?p.data=M.current.data:p.data=o,i(r.get(m),o)||r.set(m,o),c&&l()&&k().onSuccess(o,m,n),[3,4])):(c&&l()&&k().onDiscarded(m),[2,!1]);case 3:return y=O.sent(),f(),k().isPaused()||(P({error:y}),p.error=y,c&&l()&&(k().onError(y,m,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||mt(n.shouldRetryOnError)&&n.shouldRetryOnError(y))&&T()&&k().onErrorRetry(y,m,n,B,{retryCount:(u.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return s=!1,d(),l()&&c&&Ft(r,m,p.data,p.error,!1),[2,!0]}}))}))}),[m]),z=(0,o.useCallback)(Vt.bind(vt,r,(function(){return x.current})),[]);if($t((function(){S.current=t,O.current=n})),$t((function(){if(m){var e=m!==x.current,t=B.bind(vt,tn),n=0,r=en(m,h,(function(e,t,n){F(bt({error:t,isValidating:n},i(M.current.data,e)?vt:{data:e}))})),o=en(m,d,(function(e){if(0==e){var r=Date.now();k().revalidateOnFocus&&r>n&&T()&&(n=r+k().focusThrottleInterval,t())}else if(1==e)k().revalidateOnReconnect&&T()&&t();else if(2==e)return B()}));return E.current=!1,x.current=m,_.current=!0,e&&F({data:N,error:I,isValidating:D}),$()&&(yt(N)||Rt?t():(a=t,_t()&&typeof window.requestAnimationFrame!=wt?window.requestAnimationFrame(a):setTimeout(a,1))),function(){E.current=!0,r(),o()}}var a}),[m,B]),$t((function(){var e;function t(){var t=mt(c)?c(N):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){M.current.error||!l&&!k().isVisible()||!f&&!k().isOnline()?t():B(tn).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[c,l,f,B]),(0,o.useDebugValue)(N),s&&yt(N)&&m)throw S.current=t,O.current=n,E.current=!1,yt(I)?B(tn):I;return{mutate:z,get data(){return U.data=!0,N},get error(){return U.error=!0,I},get isValidating(){return U.isValidating=!0,D}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Xt(),r=Jt(e),o=r[0],i=r[1],a=r[2],s=Yt(n,a),u=dt,c=s.use;if(c)for(var l=c.length;l-- >0;)u=c[l](u);return u(o,i||s.fetcher,s)}),rn=n(7530),on=n.n(rn),an=n(4332),sn=n.n(an);function un(e){const{data:t,error:n,mutate:r,isValidating:o}=nn(`/ws/rest/v1/visit?patient=${e}&v=${ze.defaultVisitCustomRepresentation}&includeInactive=false`,ze.openmrsFetch);return{error:n,mutate:r,isValidating:o,currentVisit:t?.data.results.find((e=>null===e.stopDatetime&&on()(e.startDatetime).isToday()))??null}}function cn(){const[e,t]=(0,o.useState)([]);return(0,o.useEffect)((()=>{const e=(0,ze.getVisitTypes)().subscribe((e=>{t(e)}),(e=>console.error(e)));return()=>e.unsubscribe()}),[]),e}function ln(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const[n,r]=(0,o.useState)(1),i=(0,o.useMemo)((()=>Math.max(1,Math.ceil(e.length/t))),[e.length,t]),a=(0,o.useMemo)((()=>{const r=(n-1)*t,o=(n+0)*t;return e.slice(r,o)}),[e,n,t]);return{results:a,totalPages:i,currentPage:n,paginated:e.length>t,showNextButton:n<i,showPreviousButton:n>1,goTo(e){r(Math.max(1,Math.min(i,e)))},goToNext(){n<i&&r(n+1)},goToPrevious(){n>1&&r(n-1)}}}on().extend(sn());const fn=e=>{let{state:t,wrap:n}=e;const[r,a]=(0,o.useState)(),{extension:s}=(0,o.useContext)(i),u=(0,o.useCallback)((e=>{a(e)}),[]);(0,o.useEffect)((()=>{if(null!=r&&s)return(0,l.renderExtension)(r,s.extensionSlotName,s.extensionSlotModuleName,s.extensionId,void 0,t)}),[s?.extensionSlotName,s?.extensionId,s?.extensionSlotModuleName,t,r]);const c=o.createElement("div",{ref:u,"data-extension-id":s?.extensionId,style:{position:"relative"}});return s&&n?n(c,s):c}},8748:()=>{System.register([],(function(e,t){return{execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(968).s)(1),(()=>{"use strict";function e(e,t){for(var n in t)e[n]=t[n];return e}function t(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,s=0;s<a.length;s++)a[s](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}}r.r(o),r.d(o,{createAppState:()=>s,createGlobalStore:()=>i,getAppState:()=>u,getGlobalStore:()=>a,subscribeTo:()=>c});const n={};function i(e,r){const o=n[e];if(o)return o.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):o.value.setState(r,!0),o.active=!0,o.value;{const o=t(r);return n[e]={value:o,active:!0},o}}function a(e,r){const o=n[e];if(!o){const o=t(r);return n[e]={value:o,active:!1},o}return o.value}function s(e){return i("app",e)}function u(){return a("app",{})}function c(e,t,n){let r=t(e.getState());return e.subscribe((e=>{const o=t(e);o!==r&&(r=o,n(o))}))}})(),o})())}}}))},9850:(e,t,n)=>{"use strict";n.d(t,{aB:()=>r.AppState,jk:()=>s,W5:()=>c,zJ:()=>u,se:()=>l});var r={};function o(e,t){for(var n in t)e[n]=t[n];return e}function i(e){var t=[];function n(e){for(var n=[],r=0;r<t.length;r++)t[r]===e?e=null:n.push(t[r]);t=n}function r(n,r,i){e=r?n:o(o({},e),n);for(var a=t,s=0;s<a.length;s++)a[s](e,i)}return e=e||{},{action:function(t){function n(e){r(e,!1,t)}return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var a=t.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return t.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return e}}}n.r(r),n.d(r,{jk:()=>s,W5:()=>c,zJ:()=>u,se:()=>l});const a={};function s(e,t){const n=a[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;{const n=i(t);return a[e]={value:n,active:!0},n}}function u(e,t){const n=a[e];if(!n){const n=i(t);return a[e]={value:n,active:!1},n}return n.value}function c(){return u("app",{})}function l(e,t,n){let r=t(e.getState());return e.subscribe((e=>{const o=t(e);o!==r&&(r=o,n(o))}))}},7202:(e,t,n)=>{"use strict";n.d(t,{iW:()=>r.InlineNotificationType,MK:()=>r.NotificationDescriptor,fU:()=>o.ToastDescriptor,yQ:()=>o.ToastNotificationMeta,pC:()=>o.ToastType,K4:()=>O,c0:()=>m,CF:()=>_});var r={};n.r(r);var o={};n.r(o),n(2735),n(2788);var i=n(2585),a=n(9295),s=n(606),u=n(175),c=n(6575),l=n(6905),f=n(7840),p=n(9494),d=n(8396),h=Object.prototype.hasOwnProperty;const v=function(e){if(null==e)return!0;if((0,l.Z)(e)&&((0,c.Z)(e)||"string"==typeof e||"function"==typeof e.splice||(0,f.Z)(e)||(0,d.Z)(e)||(0,u.Z)(e)))return!e.length;var t=(0,s.Z)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,p.Z)(e))return!(0,a.Z)(e).length;for(var n in e)if(h.call(e,n))return!1;return!0},g=new i.xQ;let y=0;function m(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!v(t))?setTimeout((()=>{g.next({...e,id:y++})}),0):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}const b=new i.xQ;let w=0;function _(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!v(t))?setTimeout((()=>{b.next({...e,id:w++})}),0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}n(2465);const E=(0,n(8748).createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]});function x(e){const t=E.getState(),n=[e,...t.modalStack];E.setState({...t,modalStack:n})}function S(e){const t=E.getState(),n=t.modalStack.map((t=>t===e?{...t,state:"TO_BE_DELETED"}:t));E.setState({...t,modalStack:n})}function O(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const r=()=>{const e=E.getState().modalStack.find((e=>e.onClose===n));e&&S(e)};return x({state:"NEW",onClose:n,extensionId:e,props:{extensionId:e,close:r,...t}}),r}window.getComputedStyle(document.body).overflow},3315:()=>{System.register(["dayjs","i18next"],(function(e,t){var n={},r={};return{setters:[function(e){n.default=e.default},function(e){r.default=e.default}],execute:function(){e((()=>{var e={4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},9014:function(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){return new o({date:e,utc:!0,args:arguments})},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 u=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 u.call(this)};var c=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(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),null===r))return this;var a=Math.abs(r)<=16?60*r:r,s=this;if(o)return s.$offset=a,s.$u=0===r,s;if(0!==r){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+u,e)).$offset=a,s.$x.$localOffset=u}else s=this.utc();return s};var l=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).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 f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.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)}}}()},5923:(e,t,n)=>{"use strict";const r=n(2138),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),p=Symbol("cache"),d=Symbol("updateAgeOnGet"),h=()=>1,v=(e,t,n)=>{const r=e[p].get(t);if(r){const t=r.value;if(g(e,t)){if(m(e,r),!e[s])return}else n&&(e[d]&&(r.value.now=Date.now()),e[f].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[u]&&n>e[u]},y=e=>{if(e[i]>e[o])for(let t=e[f].tail;e[i]>e[o]&&null!==t;){const n=t.prev;m(e,t),t=n}},m=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[i]-=n.length,e[p].delete(n.key),e[f].removeNode(t)}};class b{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const w=(e,t,n,r)=>{let o=n.value;g(e,o)&&(m(e,n),e[s]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,y(this)}get max(){return this[o]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,y(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[i]=0,this[f].forEach((e=>{e.length=this[a](e.value,e.key),this[i]+=e.length}))),y(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let n=this[f].tail;null!==n;){const r=n.prev;w(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[f].head;null!==n;){const r=n.next;w(this,e,n,t),n=r}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[c]&&this[f]&&this[f].length&&this[f].forEach((e=>this[c](e.key,e.value))),this[p]=new Map,this[f]=new r,this[i]=0}dump(){return this[f].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,n){if((n=n||this[u])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[a](t,e);if(this[p].has(e)){if(s>this[o])return m(this,this[p].get(e)),!1;const a=this[p].get(e).value;return this[c]&&(this[l]||this[c](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[i]+=s-a.length,a.length=s,this.get(e),y(this),!0}const d=new b(e,t,s,r,n);return d.length>this[o]?(this[c]&&this[c](e,t),!1):(this[i]+=d.length,this[f].unshift(d),this[p].set(e,this[f].head),y(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!g(this,t)}get(e){return v(this,e,!0)}peek(e){return v(this,e,!1)}pop(){const e=this[f].tail;return e?(m(this,e),e.value):null}del(e){m(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[p].forEach(((e,t)=>v(this,t,!1)))}}},4074:(e,t,n)=>{const r=Symbol("SemVer ANY");class o{static get ANY(){return r}constructor(e,t){if(t=i(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return u(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new f(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new f(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=u(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=u(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||i&&a||s||c}}e.exports=o;const i=n(156),{re:a,t:s}=n(887),u=n(2401),c=n(3843),l=n(9405),f=n(4355)},4355:(e,t,n)=>{class r{constructor(e,t){if(t=i(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=o.get(t);if(n)return n;const r=this.options.loose,i=r?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(i,T(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[l.COMPARATORTRIM],f),s("comparator trim",e,c[l.COMPARATORTRIM]),e=(e=(e=e.replace(c[l.TILDETRIM],p)).replace(c[l.CARETTRIM],d)).split(/\s+/).join(" ");const u=r?c[l.COMPARATORLOOSE]:c[l.COMPARATOR],v=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>k(e,this.options))).filter(this.options.loose?e=>!!e.match(u):()=>!0).map((e=>new a(e,this.options))),g=(v.length,new Map);for(const e of v){if(h(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const m=[...g.values()];return o.set(t,m),m}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>g(n,t)&&e.set.some((e=>g(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const o=new(n(5923))({max:1e3}),i=n(156),a=n(4074),s=n(3843),u=n(9405),{re:c,t:l,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:d}=n(887),h=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},y=(e,t)=>(s("comp",e,t),e=_(e,t),s("caret",e),e=b(e,t),s("tildes",e),e=x(e,t),s("xrange",e),e=O(e,t),s("stars",e),e),m=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{const n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,((t,n,r,o,i)=>{let a;return s("tilde",e,t,n,r,o,i),m(n)?a="":m(r)?a=`>=${n}.0.0 <${+n+1}.0.0-0`:m(o)?a=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:i?(s("replaceTilde pr",i),a=`>=${n}.${r}.${o}-${i} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${o} <${n}.${+r+1}.0-0`,s("tilde return",a),a}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{s("caret",e,t);const n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,i,a)=>{let u;return s("caret",e,t,n,o,i,a),m(n)?u="":m(o)?u=`>=${n}.0.0${r} <${+n+1}.0.0-0`:m(i)?u="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(s("replaceCaret pr",a),u="0"===n?"0"===o?`>=${n}.${o}.${i}-${a} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}-${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i}-${a} <${+n+1}.0.0-0`):(s("no pr"),u="0"===n?"0"===o?`>=${n}.${o}.${i}${r} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i} <${+n+1}.0.0-0`),s("caret return",u),u}))},x=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>S(e,t))).join(" ")),S=(e,t)=>{e=e.trim();const n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,((n,r,o,i,a,u)=>{s("xRange",e,n,r,o,i,a,u);const c=m(o),l=c||m(i),f=l||m(a),p=f;return"="===r&&p&&(r=""),u=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(l&&(i=0),a=0,">"===r?(r=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):"<="===r&&(r="<",l?o=+o+1:i=+i+1),"<"===r&&(u="-0"),n=`${r+o}.${i}.${a}${u}`):l?n=`>=${o}.0.0${u} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${u} <${o}.${+i+1}.0-0`),s("xRange return",n),n}))},O=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[l.STAR],"")),k=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),T=e=>(t,n,r,o,i,a,s,u,c,l,f,p,d)=>`${n=m(r)?"":m(o)?`>=${r}.0.0${e?"-0":""}`:m(i)?`>=${r}.${o}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${u=m(c)?"":m(l)?`<${+c+1}.0.0-0`:m(f)?`<${c}.${+l+1}.0-0`:p?`<=${c}.${l}.${f}-${p}`:e?`<${c}.${l}.${+f+1}-0`:`<=${u}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},9405:(e,t,n)=>{const r=n(3843),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=n(8202),{re:a,t:s}=n(887),u=n(156),{compareIdentifiers:c}=n(1630);class l{constructor(e,t){if(t=u(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],o=e.prerelease[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return c(n,o)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const n=this.build[t],o=e.build[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return c(n,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=l},953:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},2401:(e,t,n)=>{const r=n(8896),o=n(8378),i=n(9261),a=n(6647),s=n(3433),u=n(4622);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return o(e,n,c);case">":return i(e,n,c);case">=":return a(e,n,c);case"<":return s(e,n,c);case"<=":return u(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},6839:(e,t,n)=>{const r=n(9405),o=n(5497),{re:i,t:a}=n(887);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=i[a.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),i[a.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[a.COERCERTL].lastIndex=-1}else n=e.match(i[a.COERCE]);return null===n?null:o(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},6218:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n)=>{const o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},9643:(e,t,n)=>{const r=n(3308);e.exports=(e,t)=>r(e,t,!0)},3308:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},3948:(e,t,n)=>{const r=n(5497),o=n(8896);e.exports=(e,t)=>{if(o(e,t))return null;{const n=r(e),o=r(t),i=n.prerelease.length||o.prerelease.length,a=i?"pre":"",s=i?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==o[e])return a+e;return s}}},8896:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>0===r(e,t,n)},9261:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)>0},6647:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)>=0},5791:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n,o)=>{"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},3433:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)<0},4622:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)<=0},629:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).major},9986:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).minor},8378:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>0!==r(e,t,n)},5497:(e,t,n)=>{const{MAX_LENGTH:r}=n(8202),{re:o,t:i}=n(887),a=n(9405),s=n(156);e.exports=(e,t)=>{if(t=s(t),e instanceof a)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[i.LOOSE]:o[i.FULL]).test(e))return null;try{return new a(e,t)}catch(e){return null}}},9800:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).patch},4408:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},762:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(t,e,n)},2743:(e,t,n)=>{const r=n(6218);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},5312:(e,t,n)=>{const r=n(4355);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},2354:(e,t,n)=>{const r=n(6218);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},4512:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},4770:(e,t,n)=>{const r=n(887);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(8202).SEMVER_SPEC_VERSION,SemVer:n(9405),compareIdentifiers:n(1630).compareIdentifiers,rcompareIdentifiers:n(1630).rcompareIdentifiers,parse:n(5497),valid:n(4512),clean:n(953),inc:n(5791),diff:n(3948),major:n(629),minor:n(9986),patch:n(9800),prerelease:n(4408),compare:n(3308),rcompare:n(762),compareLoose:n(9643),compareBuild:n(6218),sort:n(2354),rsort:n(2743),gt:n(9261),lt:n(3433),eq:n(8896),neq:n(8378),gte:n(6647),lte:n(4622),cmp:n(2401),coerce:n(6839),Comparator:n(4074),Range:n(4355),satisfies:n(5312),toComparators:n(9663),maxSatisfying:n(4931),minSatisfying:n(5891),minVersion:n(4925),validRange:n(9965),outside:n(3260),gtr:n(715),ltr:n(6),intersects:n(9560),simplifyRange:n(7795),subset:n(7732)}},8202:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},3843:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error("SEMVER",...t)}:()=>{};e.exports=t},1630:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},156:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},887:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(8202),o=n(3843),i=(t=e.exports={}).re=[],a=t.src=[],s=t.t={};let u=0;const c=(e,t,n)=>{const r=u++;o(r,t),s[e]=r,a[r]=t,i[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),c("FULL",`^${a[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),c("LOOSE",`^${a[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),c("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",a[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},715:(e,t,n)=>{const r=n(3260);e.exports=(e,t,n)=>r(e,t,">",n)},9560:(e,t,n)=>{const r=n(4355);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},6:(e,t,n)=>{const r=n(3260);e.exports=(e,t,n)=>r(e,t,"<",n)},4931:(e,t,n)=>{const r=n(9405),o=n(4355);e.exports=(e,t,n)=>{let i=null,a=null,s=null;try{s=new o(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(i&&-1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},5891:(e,t,n)=>{const r=n(9405),o=n(4355);e.exports=(e,t,n)=>{let i=null,a=null,s=null;try{s=new o(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(i&&1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},4925:(e,t,n)=>{const r=n(9405),o=n(4355),i=n(9261);e.exports=(e,t)=>{e=new o(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let a=null;o.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":a&&!i(t,a)||(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!a||n&&!i(n,a)||(n=a)}return n&&e.test(n)?n:null}},3260:(e,t,n)=>{const r=n(9405),o=n(4074),{ANY:i}=o,a=n(4355),s=n(5312),u=n(9261),c=n(3433),l=n(4622),f=n(6647);e.exports=(e,t,n,p)=>{let d,h,v,g,y;switch(e=new r(e,p),t=new a(t,p),n){case">":d=u,h=l,v=c,g=">",y=">=";break;case"<":d=c,h=f,v=u,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,p))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let a=null,s=null;if(r.forEach((e=>{e.semver===i&&(e=new o(">=0.0.0")),a=a||e,s=s||e,d(e.semver,a.semver,p)?a=e:v(e.semver,s.semver,p)&&(s=e)})),a.operator===g||a.operator===y)return!1;if((!s.operator||s.operator===g)&&h(e,s.semver))return!1;if(s.operator===y&&v(e,s.semver))return!1}return!0}},7795:(e,t,n)=>{const r=n(5312),o=n(3308);e.exports=(e,t,n)=>{const i=[];let a=null,s=null;const u=e.sort(((e,t)=>o(e,t,n)));for(const e of u)r(e,t,n)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);const c=[];for(const[e,t]of i)e===t?c.push(e):t||e!==u[0]?t?e===u[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const l=c.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length<f.length?l:t}},7732:(e,t,n)=>{const r=n(4355),o=n(4074),{ANY:i}=o,a=n(5312),s=n(3308),u=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=n.includePrerelease?[new o(">=0.0.0-0")]:[new o(">=0.0.0")]}if(1===t.length&&t[0].semver===i){if(n.includePrerelease)return!0;t=[new o(">=0.0.0")]}const r=new Set;let u,f,p,d,h,v,g;for(const t of e)">"===t.operator||">="===t.operator?u=c(u,t,n):"<"===t.operator||"<="===t.operator?f=l(f,t,n):r.add(t.semver);if(r.size>1)return null;if(u&&f){if(p=s(u.semver,f.semver,n),p>0)return null;if(0===p&&(">="!==u.operator||"<="!==f.operator))return null}for(const e of r){if(u&&!a(e,String(u),n))return null;if(f&&!a(e,String(f),n))return null;for(const r of t)if(!a(e,String(r),n))return!1;return!0}let y=!(!f||n.includePrerelease||!f.semver.prerelease.length)&&f.semver,m=!(!u||n.includePrerelease||!u.semver.prerelease.length)&&u.semver;y&&1===y.prerelease.length&&"<"===f.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,v=v||"<"===e.operator||"<="===e.operator,u)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),">"===e.operator||">="===e.operator){if(d=c(u,e,n),d===e&&d!==u)return!1}else if(">="===u.operator&&!a(u.semver,String(e),n))return!1;if(f)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(h=l(f,e,n),h===e&&h!==f)return!1}else if("<="===f.operator&&!a(f.semver,String(e),n))return!1;if(!e.operator&&(f||u)&&0!==p)return!1}return!(u&&v&&!f&&0!==p||f&&g&&!u&&0!==p||m||y)},c=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},l=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e===t)return!0;e=new r(e,n),t=new r(t,n);let o=!1;e:for(const r of e.set){for(const e of t.set){const t=u(r,e,n);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},9663:(e,t,n)=>{const r=n(4355);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},9965:(e,t,n)=>{const r=n(4355);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},7968:(e,t,n)=>{const r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},9961:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},2138:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n<o;n++)t.push(arguments[n]);return t}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function i(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,r){if(!(this instanceof a))return new a(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,o=this.head;null!==o;)n.push(e.call(t,o.value,this)),o=o.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,o=this.tail;null!==o;)n.push(e.call(t,o.value,this)),o=o.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)n.push(i.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n<e;n++)r=r.next;var o,i,s,u,c=[];for(n=0;r&&n<t;n++)c.push(r.value),r=this.removeNode(r);for(null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev),n=0;n<(arguments.length<=2?0:arguments.length-2);n++)s=n+2<2||arguments.length<=n+2?void 0:arguments[n+2],u=void 0,null===(u=(i=r)===(o=this).head?new a(s,null,i,o):new a(s,i,i.next,o)).next&&(o.tail=u),null===u.prev&&(o.head=u),o.length++,r=u;return c},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(9961)(r)}catch(e){}},9688:e=>{"use strict";e.exports=n},7064:e=>{"use strict";e.exports=r}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={exports:{}};return e[t].call(r.exports,r,r.exports,i),r.exports}i.y=t,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})();var a={};return(0,i(7968).s)(1),(()=>{"use strict";function e(e){return(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())-Date.UTC(e.getUTCFullYear(),0,0))/24/60/60/1e3}function t(e,t){const n=e.toISOString(),r=t.toISOString();return n.slice(0,n.indexOf("T"))===r.slice(0,r.indexOf("T"))}function n(n){const r=new Date,o=new Date(n),i=r.getUTCMonth()-o.getUTCMonth(),a=r.getUTCDate()-o.getUTCDate();let s=r.getUTCFullYear()-o.getUTCFullYear();(i<0||0===i&&a<0)&&s--;let u=i>=0?i:i+12;a<0&&u--;const c=u>0?`${u} mo`:"";let l=e(r)-e(o);l<0&&(l+=365);const f=Math.floor(l/7),p=l-7*f;return 0===s?t(r,o)?"Today":f<4||0===f?`${l} day`:p>0?`${f} wk ${p} d`:`${f} week`:s<2?`${c} ${s} yr`.trim():s<18?`${s} yr ${c}`.trim():`${s} years`}i.r(a),i.d(a,{age:()=>n,daysIntoYear:()=>e,formatDate:()=>E,formatDatetime:()=>S,formatTime:()=>x,isOmrsDateStrict:()=>f,isOmrsDateToday:()=>p,isSameDay:()=>t,isVersionSatisfied:()=>C,parseDate:()=>w,retry:()=>N,toDateObjectStrict:()=>d,toOmrsDateFormat:()=>b,toOmrsDayDateFormat:()=>y,toOmrsIsoString:()=>h,toOmrsTimeString:()=>g,toOmrsTimeString24:()=>v,toOmrsYearlessDateFormat:()=>m,translateFrom:()=>T});var r=i(9688),o=i(9014),s=i.n(o),u=i(4332),c=i.n(u);r.default.extend(s()),r.default.extend(c());const l="YYYY-MM-DDTHH:mm:ss.SSSZZ";function f(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&"+"===e[23]&&":"!==e[26]&&(0,r.default)(e,l).isValid()}function p(e){return(0,r.default)(e).isToday()}function d(e){return f(e)?(0,r.default)(e,l).toDate():null}function h(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,r.default)(e);return t&&(n=n.utc()),n.format(l)}function v(e){return(0,r.default)(e).format("HH:mm")}function g(e){return r.default.utc(e).format("HH:mm A")}function y(e){return b(e,"DD - MMM - YYYY")}function m(e){return b(e,"DD-MMM")}function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MMM-DD";return(0,r.default)(e).format(t)}function w(e){return(0,r.default)(e).toDate()}const _={mode:"standard",time:"for today",day:!0,year:!0};function E(e,t){const{mode:n,time:o,day:i,year:a}={..._,...t},s={year:a?"numeric":void 0,month:"short",day:i?"2-digit":void 0};let u,c=O();const l=(0,r.default)(e).isToday();if(l)u=new Intl.RelativeTimeFormat(c,{numeric:"auto"}).format(0,"day"),u=u[0].toLocaleUpperCase(c)+u.slice(1);else if("en"==c&&(c="en-GB"),u=e.toLocaleDateString(c,s),"en-GB"==c&&"standard"==n&&a&&i&&(u=u.replace(/ /g,"-")),"wide"==n&&(u=u.replace(/ /g," — "),/ru.*/.test(c))){const e=u.length;u=u.slice(0,e-5)+u.slice(e-5).replace(" — "," ")}return(!0===o||l&&"for today"===o)&&(u+=`, ${x(e)}`),u}function x(e){return e.toLocaleTimeString(O(),{hour:"2-digit",minute:"2-digit"})}function S(e,t){return E(e,{...t,time:!0})}function O(){let e=window.i18next.language;return e=e.replace("_","-"),"ht"===e&&(e="fr-HT"),e}var k=i(7064);function T(e,t,n,r){return(k.default.default||k.default).t(t,{ns:e,defaultValue:n,...r})}var P=i(4770);function j(e){const[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function C(e,t){const n=function(e){const t=e.indexOf("-");return t>=0?`${j(e.slice(0,t))}-${e.slice(t+1)}`:j(e)}(t);return P.satisfies(n,e,{includePrerelease:!0})}async function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{shouldRetry:n,getDelay:r,onError:o}=t;n=n??(e=>A(e,5)),r=r??(e=>I(e,1e3));let i,a=0;do{try{return await R(r(a)),await e()}catch(e){o?.(e,a),i=e}}while(n(a++));throw i}function A(e,t){return e<=t}function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=n?e+1:e;return t*Math.pow(2,r)}async function R(e){if(!(e<=0))return new Promise((t=>setTimeout(t,e)))}})(),a})())}}}))},7530:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",o="minute",i="hour",a="day",s="week",u="month",c="quarter",l="year",f="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,u),i=n-o<0,a=t.clone().add(r+(i?-1:1),u);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:l,w:s,d:a,D:f,h:i,m:o,s:r,ms:n,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},m="en",b={};b[m]=v;var w=function(e){return e instanceof S},_=function e(t,n,r){var o;if(!t)return m;if("string"==typeof t){var i=t.toLowerCase();b[i]&&(o=i),n&&(b[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,o=s}return!r&&o&&(m=o),o||!r&&m},E=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new S(n)},x=y;x.l=_,x.i=w,x.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){function v(e){this.$L=_(e.locale,null,!0),this.parse(e)}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(d);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return x},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=E(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return E(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<E(e)},g.$g=function(e,t,n){return x.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,c=!!x.u(t)||t,p=x.p(e),d=function(e,t){var r=x.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return c?r:r.endOf(a)},h=function(e,t){return x.w(n.toDate()[e].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},v=this.$W,g=this.$M,y=this.$D,m="set"+(this.$u?"UTC":"");switch(p){case l:return c?d(1,0):d(31,11);case u:return c?d(1,g):d(0,g+1);case s:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return d(c?y-w:y+(6-w),g);case a:case f:return h(m+"Hours",0);case i:return h(m+"Minutes",1);case o:return h(m+"Seconds",2);case r:return h(m+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var s,c=x.p(e),p="set"+(this.$u?"UTC":""),d=(s={},s[a]=p+"Date",s[f]=p+"Date",s[u]=p+"Month",s[l]=p+"FullYear",s[i]=p+"Hours",s[o]=p+"Minutes",s[r]=p+"Seconds",s[n]=p+"Milliseconds",s)[c],h=c===a?this.$D+(t-this.$W):t;if(c===u||c===l){var v=this.clone().set(f,1);v.$d[d](h),v.init(),this.$d=v.set(f,Math.min(this.$D,v.daysInMonth())).$d}else d&&this.$d[d](h);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[x.p(e)]()},g.add=function(n,c){var f,p=this;n=Number(n);var d=x.p(c),h=function(e){var t=E(p);return x.w(t.date(t.date()+Math.round(e*n)),p)};if(d===u)return this.set(u,this.$M+n);if(d===l)return this.set(l,this.$y+n);if(d===a)return h(1);if(d===s)return h(7);var v=(f={},f[o]=e,f[i]=t,f[r]=1e3,f)[d]||1,g=this.$d.getTime()+n*v;return x.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=x.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].substr(0,i)},f=function(e){return x.s(i%12||12,e,"0")},d=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},v={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:x.s(s+1,2,"0"),MMM:l(n.monthsShort,s,c,3),MMMM:l(c,s),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:x.s(i,2,"0"),h:f(1),hh:f(2),a:d(i,a,!0),A:d(i,a,!1),m:String(a),mm:x.s(a,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:o};return r.replace(h,(function(e,t){return t||v[e]||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,f,p){var d,h=x.p(f),v=E(n),g=(v.utcOffset()-this.utcOffset())*e,y=this-v,m=x.m(this,v);return m=(d={},d[l]=m/12,d[u]=m,d[c]=m/3,d[s]=(y-g)/6048e5,d[a]=(y-g)/864e5,d[i]=y/t,d[o]=y/e,d[r]=y/1e3,d)[h]||y,p?m:x.a(m)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return b[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=_(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return x.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),O=S.prototype;return E.prototype=O,[["$ms",n],["$s",r],["$m",o],["$H",i],["$W",a],["$M",u],["$y",l],["$D",f]].forEach((function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),E.extend=function(e,t){return e.$i||(e(t,S,E),e.$i=!0),E},E.locale=_,E.isDayjs=w,E.unix=function(e){return E(1e3*e)},E.en=b[m],E.Ls=b,E.p={},E}()},4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},4525:function(e){(function(){var t,n;function r(e,o){var i,a=e.data.entry||[],s=[];for(i=0;i<a.length;i++)s.push(a[i].resource);o(s);var u=n.defer();return t.nextPage({bundle:e.data}).then((function(e){r(e,o).then((function(e){u.resolve()}))}),(function(e){u.resolve()})),u.promise}function o(e,o,i,a){n.defer(),t.search(e).then((function(e){r(e,o).then((function(){i()}),(function(e){a(e)}))}),(function(e){a(e)}))}function i(e){var t=n.defer(),r=[];return o(e,(function(e){e.forEach((function(e){r.push(e)}))}),(function(){t.resolve(r)}),(function(e){t.reject(e)})),t.promise}function a(e,r){var o=n.defer();return t.search(e).then((function(e){var n={},i=[function(){o.resolve(e,n)}];function a(){i.pop()()}var s=e.data;s.entry&&s.entry.forEach((function(e){var o=e.resource,u=o.resourceType;r&&r.forEach((function(e){var r=e.split("."),c=r[0],l=r[1],f=o[l];if(u===c&&f){var p=f.reference;n[p]||function(e,r,o){i.push((function(){!function(e,r,o){var i=o.reference;t.resolve({bundle:e,resource:r,reference:o}).then((function(e){var t=e.data||e.content;n[i]=t,a()}))}(e,r,o)}))}(s,o,f)}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise}e.exports=function(e,r){return t=e,n=r,e.drain=o,e.fetchAll=i,e.fetchAllWithReferences=a,e}}).call(this)},1256:function(e,t,n){(function(){n(5454);var t=n(4801),r=n(7921),o=n(8294),i=n(8821),a=n(442),s=n(856),u=n(7719),c=n(3029),l=n(2723),f=n(4249),p=n(4525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},g=function(e,t){return h("headers."+e,t)},y=d(a),m=d(s(e,n)).and(y).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(g("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(g("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=m.and(v("GET")),w=m.and(v("POST")),_=m.and(v("PUT")),E=m.and(v("DELETE")),x=m.and(v("PATCH")),S=i.Http(e,n),O=f.Path,k=O(e.baseUrl),T=k.slash(":type || :resource.resourceType"),P=T.slash("_history"),j=T.slash(":id || :resource.id"),C=j.slash("_history"),N=j.slash(":versionId || :resource.meta.versionId"),A=k.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=g("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(k.slash("metadata")).end(S),document:w.and(k.slash("Document")).end(S),profile:b.and(k.slash("Profile").slash(":type")).end(S),transaction:w.and(k).end(S),history:b.and(k.slash("_history")).and(R).end(S),typeHistory:b.and(P).and(R).end(S),resourceHistory:b.and(C).and(R).end(S),read:b.and(c.$WithPatient).and(j).end(S),vread:b.and(N).end(S),delete:E.and(j).and(I).end(S),create:w.and(T).and(I).end(S),validate:w.and(T.slash("_validate")).end(S),meta:{add:w.and(A.slash("$meta-add")).end(S),delete:w.and(A.slash("$meta-delete")).end(S),read:b.and(A.slash("$meta")).end(S)},search:b.and(T).and(c.$WithPatient).and(r.$SearchParams).and(R).end(S),update:_.and(j).and(I).end(S),conditionalUpdate:_.and(T).and(r.$SearchParams).and(I).end(S),conditionalDelete:E.and(T).and(r.$SearchParams).and(I).end(S),nextPage:b.and(u.$$BundleLinkUrl("next")).end(S),prevPage:b.and(u.$$BundleLinkUrl("previous")).and(u.$$BundleLinkUrl("prev")).end(S),getBundleByUrl:b.and(O(":url")).end(S),resolve:b.and(l.resolve).end(S),patch:x.and(j).and(g("Content-Type","application/json-patch+json")).end(S)},n)}}).call(this)},8294:function(e,t,n){(function(){var e,r=n(4801),o=n(9672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},7719:(e,t)=>{t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},4801:function(e,t,n){(function(){var e=n(5454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:e=>{e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},8821:function(e,t,n){(function(){var e=n(5454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},3029:function(e,t,n){(function(){var e=n(4801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},2723:function(e,t,n){(function(){var t=n(5454),r=/^#(.*)/,o=function(e){var n=e.cache,o=e.reference,i=e.bundle,a=o;if(!a.reference)return null;if(a.reference.match(r))return function(e,t){var n=e.match(r)[1],o=(t.contained||[]).filter((function(e){return(e.id||e._id)==n}))[0];return o&&{content:o}||null}(a.reference,e.resource);var s=t.absoluteUrl(e.baseUrl,a.reference);return(i&&i.entry||[]).filter((function(e){return e.id===s}))[0]||(null!=n?n[s]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,s=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return s.resolve(i),s.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},7921:function(e,t,n){(function(){var e=n(5454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,s={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},u={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},c=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n;switch(r(t)){case"object":return function(e,t){return i(t,(function(n,i){var a,l,f,p;return a=i[0],p=i[1],n.concat("$and"===a?o(p).reduce((function(t,n){return t.concat(c(e,n))}),[]):"$type"===a?[]:function(e){return 0===e.indexOf("$")}(a)?(l={param:e},"$or"===a?l.value=p:(s[a]&&(l.operator=s[a]),u[a]&&(l.modifier=u[a]),"object"===r(p)&&p.$or?l.value=p.$or:l.value=[p]),[l]):(t.$type&&(f=":"+t.$type),c(""+e+(f||"")+"."+a,p)))}))}(e,t);case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(c(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,s,u;for(u=[],o=0,i=(s=l(e)).length;o<i;o++)t=s[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,u.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return u}().join("&")};t._query=l,t.query=f;var p=n(4801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},4249:function(e,t,n){(function(){n(5454);var e=n(4801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n=function(e,t){return 0==e.indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(e,t):e}(e.trim(),t);if((null==n||void 0===n)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return n}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},5454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var s=function(){return Array.prototype.slice.call(arguments)};t.argsArray=s,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},s.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var u=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=u;var c=function(e,t,n){return t?u(c(e),e,t,n):function(t,n){return c(e,t,n)}};t.postwalk=c}).call(this)},2891:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],v="[object Arguments]",g="[object Array]",y="[object Boolean]",m="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",E="[object Map]",x="[object Number]",S="[object Object]",O="[object Promise]",k="[object RegExp]",T="[object Set]",P="[object String]",j="[object Symbol]",C="[object WeakMap]",N="[object ArrayBuffer]",A="[object DataView]",I="[object Float32Array]",R="[object Float64Array]",$="[object Int8Array]",D="[object Int16Array]",L="[object Int32Array]",M="[object Uint8Array]",U="[object Uint8ClampedArray]",F="[object Uint16Array]",B="[object Uint32Array]",z=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,q=RegExp(K.source),G=RegExp(H.source),Z=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="["+Se+"]",ke="["+_e+"]",Te="\\d+",Pe="["+Ee+"]",je="[^\\ud800-\\udfff"+Se+Te+"\\u2700-\\u27bf"+Ee+xe+"]",Ce="\\ud83c[\\udffb-\\udfff]",Ne="[^\\ud800-\\udfff]",Ae="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",Re="["+xe+"]",$e="(?:"+Pe+"|"+je+")",De="(?:"+Re+"|"+je+")",Le="(?:['’](?:d|ll|m|re|s|t|ve))?",Me="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ue="(?:"+ke+"|"+Ce+")?",Fe="[\\ufe0e\\ufe0f]?",Be=Fe+Ue+"(?:\\u200d(?:"+[Ne,Ae,Ie].join("|")+")"+Fe+Ue+")*",ze="(?:"+["[\\u2700-\\u27bf]",Ae,Ie].join("|")+")"+Be,Ve="(?:"+[Ne+ke+"?",ke,Ae,Ie,"[\\ud800-\\udfff]"].join("|")+")",We=RegExp("['’]","g"),Ke=RegExp(ke,"g"),He=RegExp(Ce+"(?="+Ce+")|"+Ve+Be,"g"),qe=RegExp([Re+"?"+Pe+"+"+Le+"(?="+[Oe,Re,"$"].join("|")+")",De+"+"+Me+"(?="+[Oe,Re+$e,"$"].join("|")+")",Re+"?"+$e+"+"+Le,Re+"+"+Me,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,ze].join("|"),"g"),Ge=RegExp("[\\u200d\\ud800-\\udfff"+_e+"\\ufe0e\\ufe0f]"),Ze=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ye=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Qe=-1,Je={};Je[I]=Je[R]=Je[$]=Je[D]=Je[L]=Je[M]=Je[U]=Je[F]=Je[B]=!0,Je[v]=Je[g]=Je[N]=Je[y]=Je[A]=Je[m]=Je[b]=Je[w]=Je[E]=Je[x]=Je[S]=Je[k]=Je[T]=Je[P]=Je[C]=!1;var Xe={};Xe[v]=Xe[g]=Xe[N]=Xe[A]=Xe[y]=Xe[m]=Xe[I]=Xe[R]=Xe[$]=Xe[D]=Xe[L]=Xe[E]=Xe[x]=Xe[S]=Xe[k]=Xe[T]=Xe[P]=Xe[j]=Xe[M]=Xe[U]=Xe[F]=Xe[B]=!0,Xe[b]=Xe[w]=Xe[C]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ot="object"==typeof self&&self&&self.Object===Object&&self,it=rt||ot||Function("return this")(),at=t&&!t.nodeType&&t,st=at&&e&&!e.nodeType&&e,ut=st&&st.exports===at,ct=ut&&rt.process,lt=function(){try{return st&&st.require&&st.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ft=lt&&lt.isArrayBuffer,pt=lt&&lt.isDate,dt=lt&&lt.isMap,ht=lt&&lt.isRegExp,vt=lt&&lt.isSet,gt=lt&&lt.isTypedArray;function yt(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)}function mt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function wt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Et(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function xt(e,t){return!(null==e||!e.length)&&It(e,t,0)>-1}function St(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Ot(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}function kt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Tt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Pt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ct=Lt("length");function Nt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function At(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function It(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):At(e,$t,n)}function Rt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function $t(e){return e!=e}function Dt(e,t){var n=null==e?0:e.length;return n?Ft(e,t)/n:p}function Lt(e){return function(t){return null==t?o:t[e]}}function Mt(e){return function(t){return null==e?o:e[t]}}function Ut(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Ft(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Bt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function zt(e){return e?e.slice(0,sn(e)+1).replace(re,""):e}function Vt(e){return function(t){return e(t)}}function Wt(e,t){return Ot(t,(function(t){return e[t]}))}function Kt(e,t){return e.has(t)}function Ht(e,t){for(var n=-1,r=e.length;++n<r&&It(t,e[n],0)>-1;);return n}function qt(e,t){for(var n=e.length;n--&&It(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Zt=Mt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yt=Mt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Qt(e){return"\\"+et[e]}function Jt(e){return Ge.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,i[o++]=n)}return i}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Jt(e)?function(e){for(var t=He.lastIndex=0;He.test(e);)++t;return t}(e):Ct(e)}function an(e){return Jt(e)?function(e){return e.match(He)||[]}(e):function(e){return e.split("")}(e)}function sn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var un=Mt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),cn=function e(t){var n,r=(t=null==t?it:cn.defaults(it.Object(),t,cn.pick(it,Ye))).Array,oe=t.Date,_e=t.Error,Ee=t.Function,xe=t.Math,Se=t.Object,Oe=t.RegExp,ke=t.String,Te=t.TypeError,Pe=r.prototype,je=Ee.prototype,Ce=Se.prototype,Ne=t["__core-js_shared__"],Ae=je.toString,Ie=Ce.hasOwnProperty,Re=0,$e=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=Ce.toString,Le=Ae.call(Se),Me=it._,Ue=Oe("^"+Ae.call(Ie).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=ut?t.Buffer:o,Be=t.Symbol,ze=t.Uint8Array,Ve=Fe?Fe.allocUnsafe:o,He=en(Se.getPrototypeOf,Se),Ge=Se.create,et=Ce.propertyIsEnumerable,rt=Pe.splice,ot=Be?Be.isConcatSpreadable:o,at=Be?Be.iterator:o,st=Be?Be.toStringTag:o,ct=function(){try{var e=li(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==it.clearTimeout&&t.clearTimeout,Ct=oe&&oe.now!==it.Date.now&&oe.now,Mt=t.setTimeout!==it.setTimeout&&t.setTimeout,ln=xe.ceil,fn=xe.floor,pn=Se.getOwnPropertySymbols,dn=Fe?Fe.isBuffer:o,hn=t.isFinite,vn=Pe.join,gn=en(Se.keys,Se),yn=xe.max,mn=xe.min,bn=oe.now,wn=t.parseInt,_n=xe.random,En=Pe.reverse,xn=li(t,"DataView"),Sn=li(t,"Map"),On=li(t,"Promise"),kn=li(t,"Set"),Tn=li(t,"WeakMap"),Pn=li(Se,"create"),jn=Tn&&new Tn,Cn={},Nn=Ui(xn),An=Ui(Sn),In=Ui(On),Rn=Ui(kn),$n=Ui(Tn),Dn=Be?Be.prototype:o,Ln=Dn?Dn.valueOf:o,Mn=Dn?Dn.toString:o;function Un(e){if(ns(e)&&!Ka(e)&&!(e instanceof Vn)){if(e instanceof zn)return e;if(Ie.call(e,"__wrapped__"))return Fi(e)}return new zn(e)}var Fn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Bn(){}function zn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}function Gn(e){var t=this.__data__=new Kn(e);this.size=t.size}function Zn(e,t){var n=Ka(e),r=!n&&Wa(e),o=!n&&!r&&Za(e),i=!n&&!r&&!o&&ls(e),a=n||r||o||i,s=a?Bt(e.length,ke):[],u=s.length;for(var c in e)!t&&!Ie.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yi(c,u))||s.push(c);return s}function Yn(e){var t=e.length;return t?e[Hr(0,t-1)]:o}function Qn(e,t){return Ri(Po(e),ar(t,0,e.length))}function Jn(e){return Ri(Po(e))}function Xn(e,t,n){(n!==o&&!Ba(e[t],n)||n===o&&!(t in e))&&or(e,t,n)}function er(e,t,n){var r=e[t];Ie.call(e,t)&&Ba(r,n)&&(n!==o||t in e)||or(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function rr(e,t){return e&&jo(t,As(t),e)}function or(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,i=t.length,a=r(i),s=null==e;++n<i;)a[n]=s?o:Ts(e,t[n]);return a}function ar(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function sr(e,t,n,r,i,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!ts(e))return e;var f=Ka(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Po(e,s)}else{var p=di(e),d=p==w||p==_;if(Za(e))return Eo(e,u);if(p==S||p==v||d&&!i){if(s=c||d?{}:vi(e),!u)return c?function(e,t){return jo(e,pi(e),t)}(e,function(e,t){return e&&jo(t,Is(t),e)}(s,e)):function(e,t){return jo(e,fi(e),t)}(e,rr(s,e))}else{if(!Xe[p])return i?e:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case N:return xo(e);case y:case m:return new o(+e);case A:return function(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case I:case R:case $:case D:case L:case M:case U:case F:case B:return So(e,n);case E:return new o;case x:case P:return new o(e);case k:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new o;case j:return r=e,Ln?Se(Ln.call(r)):{}}}(e,p,u)}}a||(a=new Gn);var h=a.get(e);if(h)return h;a.set(e,s),ss(e)?e.forEach((function(r){s.add(sr(r,t,n,r,e,a))})):rs(e)&&e.forEach((function(r,o){s.set(o,sr(r,t,n,o,e,a))}));var g=f?o:(l?c?ri:ni:c?Is:As)(e);return bt(g||e,(function(r,o){g&&(r=e[o=r]),er(s,o,sr(r,t,n,o,e,a))})),s}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Se(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new Te(i);return Ci((function(){e.apply(o,n)}),t)}function lr(e,t,n,r){var o=-1,i=xt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Ot(t,Vt(n))),r?(i=St,a=!1):t.length>=200&&(i=Kt,a=!1,t=new qn(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else i(t,f,r)||u.push(l)}return u}Un.templateSettings={escape:Z,evaluate:Y,interpolate:Q,variable:"",imports:{_:Un}},Un.prototype=Bn.prototype,Un.prototype.constructor=Un,zn.prototype=Fn(Bn.prototype),zn.prototype.constructor=zn,Vn.prototype=Fn(Bn.prototype),Vn.prototype.constructor=Vn,Wn.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(Pn){var n=t[e];return n===a?o:n}return Ie.call(t,e)?t[e]:o},Wn.prototype.has=function(e){var t=this.__data__;return Pn?t[e]!==o:Ie.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pn&&t===o?a:t,this},Kn.prototype.clear=function(){this.__data__=[],this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Kn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?o:t[n][1]},Kn.prototype.has=function(e){return tr(this.__data__,e)>-1},Kn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Sn||Kn),string:new Wn}},Hn.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return ui(this,e).get(e)},Hn.prototype.has=function(e){return ui(this,e).has(e)},Hn.prototype.set=function(e,t){var n=ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,a),this},qn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.clear=function(){this.__data__=new Kn,this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.__data__.get(e)},Gn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Kn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ao(br),pr=Ao(wr,!0);function dr(e,t){var n=!0;return fr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function hr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],s=t(a);if(null!=s&&(u===o?s==s&&!cs(s):n(s,u)))var u=s,c=a}return c}function vr(e,t){var n=[];return fr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function gr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=gi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?gr(s,t-1,n,r,o):kt(o,s):r||(o[o.length]=s)}return o}var yr=Io(),mr=Io(!0);function br(e,t){return e&&yr(e,t,As)}function wr(e,t){return e&&mr(e,t,As)}function _r(e,t){return Et(t,(function(t){return Ja(e[t])}))}function Er(e,t){for(var n=0,r=(t=mo(t,e)).length;null!=e&&n<r;)e=e[Mi(t[n++])];return n&&n==r?e:o}function xr(e,t,n){var r=t(e);return Ka(e)?r:kt(r,n(e))}function Sr(e){return null==e?e===o?"[object Undefined]":"[object Null]":st&&st in Se(e)?function(e){var t=Ie.call(e,st),n=e[st];try{e[st]=o;var r=!0}catch(e){}var i=De.call(e);return r&&(t?e[st]=n:delete e[st]),i}(e):function(e){return De.call(e)}(e)}function Or(e,t){return e>t}function kr(e,t){return null!=e&&Ie.call(e,t)}function Tr(e,t){return null!=e&&t in Se(e)}function Pr(e,t,n){for(var i=n?St:xt,a=e[0].length,s=e.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=Ot(p,Vt(t))),l=mn(p.length,l),c[u]=!n&&(t||a>=120&&p.length>=120)?new qn(u&&p):o}p=e[0];var d=-1,h=c[0];e:for(;++d<a&&f.length<l;){var v=p[d],g=t?t(v):v;if(v=n||0!==v?v:0,!(h?Kt(h,g):i(f,g,n))){for(u=s;--u;){var y=c[u];if(!(y?Kt(y,g):i(e[u],g,n)))continue e}h&&h.push(g),f.push(v)}}return f}function jr(e,t,n){var r=null==(e=ki(e,t=mo(t,e)))?e:e[Mi(Qi(t))];return null==r?o:yt(r,e,n)}function Cr(e){return ns(e)&&Sr(e)==v}function Nr(e,t,n,r,i){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var s=Ka(e),u=Ka(t),c=s?g:di(e),l=u?g:di(t),f=(c=c==v?S:c)==S,p=(l=l==v?S:l)==S,d=c==l;if(d&&Za(e)){if(!Za(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Gn),s||ls(e)?ei(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!i(new ze(e),new ze(t)));case y:case m:case x:return Ba(+e,+t);case b:return e.name==t.name&&e.message==t.message;case k:case P:return e==t+"";case E:var s=Xt;case T:var u=1&r;if(s||(s=nn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=ei(s(e),s(t),r,o,i,a);return a.delete(e),l;case j:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,n,r,i,a);if(!(1&n)){var h=f&&Ie.call(e,"__wrapped__"),w=p&&Ie.call(t,"__wrapped__");if(h||w){var _=h?e.value():e,O=w?t.value():t;return a||(a=new Gn),i(_,O,n,r,a)}}return!!d&&(a||(a=new Gn),function(e,t,n,r,i,a){var s=1&n,u=ni(e),c=u.length;if(c!=ni(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:Ie.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=s;++l<c;){var g=e[f=u[l]],y=t[f];if(r)var m=s?r(y,g,f,t,e,a):r(g,y,f,e,t,a);if(!(m===o?g===y||i(g,y,n,r,a):m)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,i,a))}(e,t,n,r,Nr,i))}function Ar(e,t,n,r){var i=n.length,a=i,s=!r;if(null==e)return!a;for(e=Se(e);i--;){var u=n[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){var c=(u=n[i])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===o&&!(c in e))return!1}else{var p=new Gn;if(r)var d=r(l,f,c,e,t,p);if(!(d===o?Nr(f,l,3,r,p):d))return!1}}return!0}function Ir(e){return!(!ts(e)||(t=e,$e&&$e in t))&&(Ja(e)?Ue:ve).test(Ui(e));var t}function Rr(e){return"function"==typeof e?e:null==e?ou:"object"==typeof e?Ka(e)?Ur(e[0],e[1]):Mr(e):du(e)}function $r(e){if(!Ei(e))return gn(e);var t=[];for(var n in Se(e))Ie.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Dr(e,t){return e<t}function Lr(e,t){var n=-1,o=qa(e)?r(e.length):[];return fr(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Mr(e){var t=ci(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(n){return n===e||Ar(n,e,t)}}function Ur(e,t){return bi(e)&&xi(t)?Si(Mi(e),t):function(n){var r=Ts(n,e);return r===o&&r===t?Ps(n,e):Nr(t,r,3)}}function Fr(e,t,n,r,i){e!==t&&yr(t,(function(a,s){if(i||(i=new Gn),ts(a))!function(e,t,n,r,i,a,s){var u=Pi(e,n),c=Pi(t,n),l=s.get(c);if(l)Xn(e,n,l);else{var f=a?a(u,c,n+"",e,t,s):o,p=f===o;if(p){var d=Ka(c),h=!d&&Za(c),v=!d&&!h&&ls(c);f=c,d||h||v?Ka(u)?f=u:Ga(u)?f=Po(u):h?(p=!1,f=Eo(c,!0)):v?(p=!1,f=So(c,!0)):f=[]:is(c)||Wa(c)?(f=u,Wa(u)?f=ms(u):ts(u)&&!Ja(u)||(f=vi(c))):p=!1}p&&(s.set(c,f),i(f,c,r,a,s),s.delete(c)),Xn(e,n,f)}}(e,t,s,n,Fr,r,i);else{var u=r?r(Pi(e,s),a,s+"",e,t,i):o;u===o&&(u=a),Xn(e,s,u)}}),Is)}function Br(e,t){var n=e.length;if(n)return yi(t+=t<0?n:0,n)?e[t]:o}function zr(e,t,n){t=t.length?Ot(t,(function(e){return Ka(e)?function(t){return Er(t,1===e.length?e[0]:e)}:e})):[ou];var r=-1;t=Ot(t,Vt(si()));var o=Lr(e,(function(e,n,o){var i=Ot(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var u=Oo(o[r],i[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(o)}function Vr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Er(e,a);n(s,a)&&Qr(i,mo(a,e),s)}return i}function Wr(e,t,n,r){var o=r?Rt:It,i=-1,a=t.length,s=e;for(e===t&&(t=Po(t)),n&&(s=Ot(e,Vt(n)));++i<a;)for(var u=0,c=t[i],l=n?n(c):c;(u=o(s,l,u,r))>-1;)s!==e&&rt.call(s,u,1),rt.call(e,u,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;yi(o)?rt.call(e,o,1):co(e,o)}}return e}function Hr(e,t){return e+fn(_n()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Gr(e,t){return Ni(Oi(e,t,ou),e+"")}function Zr(e){return Yn(Bs(e))}function Yr(e,t){var n=Bs(e);return Ri(n,ar(t,0,n.length))}function Qr(e,t,n,r){if(!ts(e))return e;for(var i=-1,a=(t=mo(t,e)).length,s=a-1,u=e;null!=u&&++i<a;){var c=Mi(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var f=u[c];(l=r?r(f,c,u):o)===o&&(l=ts(f)?f:yi(t[i+1])?[]:{})}er(u,c,l),u=u[c]}return e}var Jr=jn?function(e,t){return jn.set(e,t),e}:ou,Xr=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:ou;function eo(e){return Ri(Bs(e))}function to(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function no(e,t){var n;return fr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function ro(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!cs(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return oo(e,t,ou,n)}function oo(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=cs(t),l=t===o;i<a;){var f=fn((i+a)/2),p=n(e[f]),d=p!==o,h=null===p,v=p==p,g=cs(p);if(s)var y=r||v;else y=l?v&&(r||d):u?v&&d&&(r||!h):c?v&&d&&!h&&(r||!g):!h&&!g&&(r?p<=t:p<t);y?i=f+1:a=f}return mn(a,4294967294)}function io(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Ba(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function ao(e){return"number"==typeof e?e:cs(e)?p:+e}function so(e){if("string"==typeof e)return e;if(Ka(e))return Ot(e,so)+"";if(cs(e))return Mn?Mn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function uo(e,t,n){var r=-1,o=xt,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=St;else if(i>=200){var c=t?null:Go(e);if(c)return nn(c);a=!1,o=Kt,u=new qn}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function co(e,t){return null==(e=ki(e,t=mo(t,e)))||delete e[Mi(Qi(t))]}function lo(e,t,n,r){return Qr(e,t,n(Er(e,t)),r)}function fo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?to(e,r?0:i,r?i+1:o):to(e,r?i+1:0,r?o:i)}function po(e,t){var n=e;return n instanceof Vn&&(n=n.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,kt([e],t.args))}),n)}function ho(e,t,n){var o=e.length;if(o<2)return o?uo(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var s=e[i],u=-1;++u<o;)u!=i&&(a[i]=lr(a[i]||s,e[u],t,n));return uo(gr(a,1),t,n)}function vo(e,t,n){for(var r=-1,i=e.length,a=t.length,s={};++r<i;){var u=r<a?t[r]:o;n(s,e[r],u)}return s}function go(e){return Ga(e)?e:[]}function yo(e){return"function"==typeof e?e:ou}function mo(e,t){return Ka(e)?e:bi(e,t)?[e]:Li(bs(e))}var bo=Gr;function wo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:to(e,t,n)}var _o=lt||function(e){return it.clearTimeout(e)};function Eo(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function xo(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function So(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=cs(e),s=t!==o,u=null===t,c=t==t,l=cs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}function ko(e,t,n,o){for(var i=-1,a=e.length,s=n.length,u=-1,c=t.length,l=yn(a-s,0),f=r(c+l),p=!o;++u<c;)f[u]=t[u];for(;++i<s;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[u++]=e[i++];return f}function To(e,t,n,o){for(var i=-1,a=e.length,s=-1,u=n.length,c=-1,l=t.length,f=yn(a-u,0),p=r(f+l),d=!o;++i<f;)p[i]=e[i];for(var h=i;++c<l;)p[h+c]=t[c];for(;++s<u;)(d||i<a)&&(p[h+n[s]]=e[i++]);return p}function Po(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function jo(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):o;c===o&&(c=e[u]),i?or(n,u,c):er(n,u,c)}return n}function Co(e,t){return function(n,r){var o=Ka(n)?mt:nr,i=t?t():{};return o(n,e,si(r,2),i)}}function No(e){return Gr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&mi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Se(t);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Ao(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Se(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Io(e){return function(t,n,r){for(var o=-1,i=Se(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}function Ro(e){return function(t){var n=Jt(t=bs(t))?an(t):o,r=n?n[0]:t.charAt(0),i=n?wo(n,1).join(""):t.slice(1);return r[e]()+i}}function $o(e){return function(t){return Tt(Js(Ws(t).replace(We,"")),e,"")}}function Do(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function Lo(e){return function(t,n,r){var i=Se(t);if(!qa(t)){var a=si(n,3);t=As(t),n=function(e){return a(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[a?t[s]:s]:o}}function Mo(e){return ti((function(t){var n=t.length,r=n,a=zn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Te(i);if(a&&!u&&"wrapper"==ii(s))var u=new zn([],!0)}for(r=u?r:n;++r<n;){var c=ii(s=t[r]),l="wrapper"==c?oi(s):o;u=l&&wi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[ii(l[0])].apply(u,l[3]):1==s.length&&wi(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ka(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Uo(e,t,n,i,a,s,u,l,f,p){var d=t&c,h=1&t,v=2&t,g=24&t,y=512&t,m=v?o:Do(e);return function o(){for(var c=arguments.length,b=r(c),w=c;w--;)b[w]=arguments[w];if(g)var _=ai(o),E=Gt(b,_);if(i&&(b=ko(b,i,a,g)),s&&(b=To(b,s,u,g)),c-=E,g&&c<p){var x=tn(b,_);return Ho(e,t,Uo,o.placeholder,n,b,x,l,f,p-c)}var S=h?n:this,O=v?S[e]:e;return c=b.length,l?b=Ti(b,l):y&&c>1&&b.reverse(),d&&f<c&&(b.length=f),this&&this!==it&&this instanceof o&&(O=m||Do(O)),O.apply(S,b)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Bo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=so(n),r=so(r)):(n=ao(n),r=ao(r)),i=e(n,r)}return i}}function zo(e){return ti((function(t){return t=Ot(t,Vt(si())),Gr((function(n){var r=this;return e(t,(function(e){return yt(e,r,n)}))}))}))}function Vo(e,t){var n=(t=t===o?" ":so(t)).length;if(n<2)return n?qr(t,e):t;var r=qr(t,ln(e/on(t)));return Jt(t)?wo(an(r),0,e).join(""):r.slice(0,e)}function Wo(e){return function(t,n,i){return i&&"number"!=typeof i&&mi(t,n,i)&&(n=i=o),t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n,o){for(var i=-1,a=yn(ln((t-e)/(n||1)),0),s=r(a);a--;)s[o?a:++i]=e,e+=n;return s}(t,n,i=i===o?t<n?1:-1:hs(i),e)}}function Ko(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Ho(e,t,n,r,i,a,s,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var d=[e,t,i,p?a:o,p?s:o,p?o:a,p?o:s,c,l,f],h=n.apply(o,d);return wi(e)&&ji(h,d),h.placeholder=r,Ai(h,e,t)}function qo(e){var t=xe[e];return function(e,n){if(e=ys(e),(n=null==n?0:mn(vs(n),292))&&hn(e)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Go=kn&&1/nn(new kn([,-0]))[1]==l?function(e){return new kn(e)}:cu;function Zo(e){return function(t){var n=di(t);return n==E?Xt(t):n==T?rn(t):function(e,t){return Ot(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yo(e,t,n,a,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(i);var v=a?a.length:0;if(v||(t&=-97,a=l=o),p=p===o?p:yn(vs(p),0),d=d===o?d:vs(d),v-=l?l.length:0,64&t){var g=a,y=l;a=l=o}var m=h?o:oi(e),b=[e,t,n,a,l,g,y,f,p,d];if(m&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?ko(l,u,t[4]):u,e[4]=l?tn(e[3],s):t[4]}(u=t[5])&&(l=e[5],e[5]=l?To(l,u,t[6]):u,e[6]=l?tn(e[5],s):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(b,m),e=b[0],t=b[1],n=b[2],a=b[3],l=b[4],!(d=b[9]=b[9]===o?h?0:e.length:yn(b[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var i=Do(e);return function a(){for(var s=arguments.length,u=r(s),c=s,l=ai(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:tn(u,l);return(s-=f.length)<n?Ho(e,t,Uo,a.placeholder,o,u,f,o,o,n-s):yt(this&&this!==it&&this instanceof a?i:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?Uo.apply(o,b):function(e,t,n,o){var i=1&t,a=Do(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=o.length,f=r(l+u),p=this&&this!==it&&this instanceof t?a:e;++c<l;)f[c]=o[c];for(;u--;)f[c++]=arguments[++s];return yt(p,i?n:this,f)}}(e,t,n,a);else var w=function(e,t,n){var r=1&t,o=Do(e);return function t(){return(this&&this!==it&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Ai((m?Jr:ji)(w,b),e,t)}function Qo(e,t,n,r){return e===o||Ba(e,Ce[n])&&!Ie.call(r,n)?t:e}function Jo(e,t,n,r,i,a){return ts(e)&&ts(t)&&(a.set(t,e),Fr(e,t,o,Jo,a),a.delete(t)),e}function Xo(e){return is(e)?o:e}function ei(e,t,n,r,i,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&n?new qn:o;for(a.set(e,t),a.set(t,e);++p<u;){var v=e[p],g=t[p];if(r)var y=s?r(g,v,p,t,e,a):r(v,g,p,e,t,a);if(y!==o){if(y)continue;d=!1;break}if(h){if(!jt(t,(function(e,t){if(!Kt(h,t)&&(v===e||i(v,e,n,r,a)))return h.push(t)}))){d=!1;break}}else if(v!==g&&!i(v,g,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function ti(e){return Ni(Oi(e,o,Hi),e+"")}function ni(e){return xr(e,As,fi)}function ri(e){return xr(e,Is,pi)}var oi=jn?function(e){return jn.get(e)}:cu;function ii(e){for(var t=e.name+"",n=Cn[t],r=Ie.call(Cn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ai(e){return(Ie.call(Un,"placeholder")?Un:e).placeholder}function si(){var e=Un.iteratee||iu;return e=e===iu?Rr:e,arguments.length?e(arguments[0],arguments[1]):e}function ui(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ci(e){for(var t=As(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,xi(o)]}return t}function li(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Ir(n)?n:o}var fi=pn?function(e){return null==e?[]:(e=Se(e),Et(pn(e),(function(t){return et.call(e,t)})))}:gu,pi=pn?function(e){for(var t=[];e;)kt(t,fi(e)),e=He(e);return t}:gu,di=Sr;function hi(e,t,n){for(var r=-1,o=(t=mo(t,e)).length,i=!1;++r<o;){var a=Mi(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&es(o)&&yi(a,o)&&(Ka(e)||Wa(e))}function vi(e){return"function"!=typeof e.constructor||Ei(e)?{}:Fn(He(e))}function gi(e){return Ka(e)||Wa(e)||!!(ot&&e&&e[ot])}function yi(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function mi(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&yi(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function bi(e,t){if(Ka(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||X.test(e)||!J.test(e)||null!=t&&e in Se(t)}function wi(e){var t=ii(e),n=Un[t];if("function"!=typeof n||!(t in Vn.prototype))return!1;if(e===n)return!0;var r=oi(n);return!!r&&e===r[0]}(xn&&di(new xn(new ArrayBuffer(1)))!=A||Sn&&di(new Sn)!=E||On&&di(On.resolve())!=O||kn&&di(new kn)!=T||Tn&&di(new Tn)!=C)&&(di=function(e){var t=Sr(e),n=t==S?e.constructor:o,r=n?Ui(n):"";if(r)switch(r){case Nn:return A;case An:return E;case In:return O;case Rn:return T;case $n:return C}return t});var _i=Ne?Ja:yu;function Ei(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ce)}function xi(e){return e==e&&!ts(e)}function Si(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in Se(n))}}function Oi(e,t,n){return t=yn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=yn(o.length-t,0),s=r(a);++i<a;)s[i]=o[t+i];i=-1;for(var u=r(t+1);++i<t;)u[i]=o[i];return u[t]=n(s),yt(e,this,u)}}function ki(e,t){return t.length<2?e:Er(e,to(t,0,-1))}function Ti(e,t){for(var n=e.length,r=mn(t.length,n),i=Po(e);r--;){var a=t[r];e[r]=yi(a,n)?i[a]:o}return e}function Pi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ji=Ii(Jr),Ci=Mt||function(e,t){return it.setTimeout(e,t)},Ni=Ii(Xr);function Ai(e,t,n){var r=t+"";return Ni(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return bt(h,(function(n){var r="_."+n[0];t&n[1]&&!xt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function Ii(e){var t=0,n=0;return function(){var r=bn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ri(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=Hr(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var $i,Di,Li=($i=$a((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,o){t.push(r?o.replace(le,"$1"):n||e)})),t}),(function(e){return 500===Di.size&&Di.clear(),e})),Di=$i.cache,$i);function Mi(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ui(e){if(null!=e){try{return Ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fi(e){if(e instanceof Vn)return e.clone();var t=new zn(e.__wrapped__,e.__chain__);return t.__actions__=Po(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bi=Gr((function(e,t){return Ga(e)?lr(e,gr(t,1,Ga,!0)):[]})),zi=Gr((function(e,t){var n=Qi(t);return Ga(n)&&(n=o),Ga(e)?lr(e,gr(t,1,Ga,!0),si(n,2)):[]})),Vi=Gr((function(e,t){var n=Qi(t);return Ga(n)&&(n=o),Ga(e)?lr(e,gr(t,1,Ga,!0),o,n):[]}));function Wi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vs(n);return o<0&&(o=yn(r+o,0)),At(e,si(t,3),o)}function Ki(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=vs(n),i=n<0?yn(r+i,0):mn(i,r-1)),At(e,si(t,3),i,!0)}function Hi(e){return null!=e&&e.length?gr(e,1):[]}function qi(e){return e&&e.length?e[0]:o}var Gi=Gr((function(e){var t=Ot(e,go);return t.length&&t[0]===e[0]?Pr(t):[]})),Zi=Gr((function(e){var t=Qi(e),n=Ot(e,go);return t===Qi(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Pr(n,si(t,2)):[]})),Yi=Gr((function(e){var t=Qi(e),n=Ot(e,go);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Pr(n,o,t):[]}));function Qi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Ji=Gr(Xi);function Xi(e,t){return e&&e.length&&t&&t.length?Wr(e,t):e}var ea=ti((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Kr(e,Ot(t,(function(e){return yi(e,n)?+e:e})).sort(Oo)),r}));function ta(e){return null==e?e:En.call(e)}var na=Gr((function(e){return uo(gr(e,1,Ga,!0))})),ra=Gr((function(e){var t=Qi(e);return Ga(t)&&(t=o),uo(gr(e,1,Ga,!0),si(t,2))})),oa=Gr((function(e){var t=Qi(e);return t="function"==typeof t?t:o,uo(gr(e,1,Ga,!0),o,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Et(e,(function(e){if(Ga(e))return t=yn(e.length,t),!0})),Bt(t,(function(t){return Ot(e,Lt(t))}))}function aa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Ot(n,(function(e){return yt(t,o,e)}))}var sa=Gr((function(e,t){return Ga(e)?lr(e,t):[]})),ua=Gr((function(e){return ho(Et(e,Ga))})),ca=Gr((function(e){var t=Qi(e);return Ga(t)&&(t=o),ho(Et(e,Ga),si(t,2))})),la=Gr((function(e){var t=Qi(e);return t="function"==typeof t?t:o,ho(Et(e,Ga),o,t)})),fa=Gr(ia),pa=Gr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,aa(e,n)}));function da(e){var t=Un(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var va=ti((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vn&&yi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:o}),new zn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),ga=Co((function(e,t,n){Ie.call(e,n)?++e[n]:or(e,n,1)})),ya=Lo(Wi),ma=Lo(Ki);function ba(e,t){return(Ka(e)?bt:fr)(e,si(t,3))}function wa(e,t){return(Ka(e)?wt:pr)(e,si(t,3))}var _a=Co((function(e,t,n){Ie.call(e,n)?e[n].push(t):or(e,n,[t])})),Ea=Gr((function(e,t,n){var o=-1,i="function"==typeof t,a=qa(e)?r(e.length):[];return fr(e,(function(e){a[++o]=i?yt(t,e,n):jr(e,t,n)})),a})),xa=Co((function(e,t,n){or(e,n,t)}));function Sa(e,t){return(Ka(e)?Ot:Lr)(e,si(t,3))}var Oa=Co((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ka=Gr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&mi(e,t[0],t[1])?t=[]:n>2&&mi(t[0],t[1],t[2])&&(t=[t[0]]),zr(e,gr(t,1),[])})),Ta=Ct||function(){return it.Date.now()};function Pa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Yo(e,c,o,o,o,o,t)}function ja(e,t){var n;if("function"!=typeof t)throw new Te(i);return e=vs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ca=Gr((function(e,t,n){var r=1;if(n.length){var o=tn(n,ai(Ca));r|=u}return Yo(e,r,t,n,o)})),Na=Gr((function(e,t,n){var r=3;if(n.length){var o=tn(n,ai(Na));r|=u}return Yo(t,r,e,n,o)}));function Aa(e,t,n){var r,a,s,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new Te(i);function v(t){var n=r,i=a;return r=a=o,f=t,u=e.apply(i,n)}function g(e){return f=e,c=Ci(m,t),p?v(e):u}function y(e){var n=e-l;return l===o||n>=t||n<0||d&&e-f>=s}function m(){var e=Ta();if(y(e))return b(e);c=Ci(m,function(e){var n=t-(e-l);return d?mn(n,s-(e-f)):n}(e))}function b(e){return c=o,h&&r?v(e):(r=a=o,u)}function w(){var e=Ta(),n=y(e);if(r=arguments,a=this,l=e,n){if(c===o)return g(l);if(d)return _o(c),c=Ci(m,t),v(l)}return c===o&&(c=Ci(m,t)),u}return t=ys(t)||0,ts(n)&&(p=!!n.leading,s=(d="maxWait"in n)?yn(ys(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),w.cancel=function(){c!==o&&_o(c),f=0,r=l=a=c=o},w.flush=function(){return c===o?u:b(Ta())},w}var Ia=Gr((function(e,t){return cr(e,1,t)})),Ra=Gr((function(e,t,n){return cr(e,ys(t)||0,n)}));function $a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(i);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($a.Cache||Hn),n}function Da(e){if("function"!=typeof e)throw new Te(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}$a.Cache=Hn;var La=bo((function(e,t){var n=(t=1==t.length&&Ka(t[0])?Ot(t[0],Vt(si())):Ot(gr(t,1),Vt(si()))).length;return Gr((function(r){for(var o=-1,i=mn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return yt(e,this,r)}))})),Ma=Gr((function(e,t){var n=tn(t,ai(Ma));return Yo(e,u,o,t,n)})),Ua=Gr((function(e,t){var n=tn(t,ai(Ua));return Yo(e,64,o,t,n)})),Fa=ti((function(e,t){return Yo(e,256,o,o,o,t)}));function Ba(e,t){return e===t||e!=e&&t!=t}var za=Ko(Or),Va=Ko((function(e,t){return e>=t})),Wa=Cr(function(){return arguments}())?Cr:function(e){return ns(e)&&Ie.call(e,"callee")&&!et.call(e,"callee")},Ka=r.isArray,Ha=ft?Vt(ft):function(e){return ns(e)&&Sr(e)==N};function qa(e){return null!=e&&es(e.length)&&!Ja(e)}function Ga(e){return ns(e)&&qa(e)}var Za=dn||yu,Ya=pt?Vt(pt):function(e){return ns(e)&&Sr(e)==m};function Qa(e){if(!ns(e))return!1;var t=Sr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Ja(e){if(!ts(e))return!1;var t=Sr(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xa(e){return"number"==typeof e&&e==vs(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=dt?Vt(dt):function(e){return ns(e)&&di(e)==E};function os(e){return"number"==typeof e||ns(e)&&Sr(e)==x}function is(e){if(!ns(e)||Sr(e)!=S)return!1;var t=He(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ae.call(n)==Le}var as=ht?Vt(ht):function(e){return ns(e)&&Sr(e)==k},ss=vt?Vt(vt):function(e){return ns(e)&&di(e)==T};function us(e){return"string"==typeof e||!Ka(e)&&ns(e)&&Sr(e)==P}function cs(e){return"symbol"==typeof e||ns(e)&&Sr(e)==j}var ls=gt?Vt(gt):function(e){return ns(e)&&es(e.length)&&!!Je[Sr(e)]},fs=Ko(Dr),ps=Ko((function(e,t){return e<=t}));function ds(e){if(!e)return[];if(qa(e))return us(e)?an(e):Po(e);if(at&&e[at])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[at]());var t=di(e);return(t==E?Xt:t==T?nn:Bs)(e)}function hs(e){return e?(e=ys(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function vs(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?ar(vs(e),0,d):0}function ys(e){if("number"==typeof e)return e;if(cs(e))return p;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=zt(e);var n=he.test(e);return n||ge.test(e)?nt(e.slice(2),n?2:8):de.test(e)?p:+e}function ms(e){return jo(e,Is(e))}function bs(e){return null==e?"":so(e)}var ws=No((function(e,t){if(Ei(t)||qa(t))jo(t,As(t),e);else for(var n in t)Ie.call(t,n)&&er(e,n,t[n])})),_s=No((function(e,t){jo(t,Is(t),e)})),Es=No((function(e,t,n,r){jo(t,Is(t),e,r)})),xs=No((function(e,t,n,r){jo(t,As(t),e,r)})),Ss=ti(ir),Os=Gr((function(e,t){e=Se(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&mi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],s=Is(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===o||Ba(f,Ce[l])&&!Ie.call(e,l))&&(e[l]=a[l])}return e})),ks=Gr((function(e){return e.push(o,Jo),yt($s,o,e)}));function Ts(e,t,n){var r=null==e?o:Er(e,t);return r===o?n:r}function Ps(e,t){return null!=e&&hi(e,t,Tr)}var js=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=n}),tu(ou)),Cs=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),Ie.call(e,t)?e[t].push(n):e[t]=[n]}),si),Ns=Gr(jr);function As(e){return qa(e)?Zn(e):$r(e)}function Is(e){return qa(e)?Zn(e,!0):function(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in Se(e))t.push(n);return t}(e);var t=Ei(e),n=[];for(var r in e)("constructor"!=r||!t&&Ie.call(e,r))&&n.push(r);return n}(e)}var Rs=No((function(e,t,n){Fr(e,t,n)})),$s=No((function(e,t,n,r){Fr(e,t,n,r)})),Ds=ti((function(e,t){var n={};if(null==e)return n;var r=!1;t=Ot(t,(function(t){return t=mo(t,e),r||(r=t.length>1),t})),jo(e,ri(e),n),r&&(n=sr(n,7,Xo));for(var o=t.length;o--;)co(n,t[o]);return n})),Ls=ti((function(e,t){return null==e?{}:function(e,t){return Vr(e,t,(function(t,n){return Ps(e,n)}))}(e,t)}));function Ms(e,t){if(null==e)return{};var n=Ot(ri(e),(function(e){return[e]}));return t=si(t),Vr(e,n,(function(e,n){return t(e,n[0])}))}var Us=Zo(As),Fs=Zo(Is);function Bs(e){return null==e?[]:Wt(e,As(e))}var zs=$o((function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)}));function Vs(e){return Qs(bs(e).toLowerCase())}function Ws(e){return(e=bs(e))&&e.replace(me,Zt).replace(Ke,"")}var Ks=$o((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Hs=$o((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qs=Ro("toLowerCase"),Gs=$o((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Zs=$o((function(e,t,n){return e+(n?" ":"")+Qs(t)})),Ys=$o((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qs=Ro("toUpperCase");function Js(e,t,n){return e=bs(e),(t=n?o:t)===o?function(e){return Ze.test(e)}(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xs=Gr((function(e,t){try{return yt(e,o,t)}catch(e){return Qa(e)?e:new _e(e)}})),eu=ti((function(e,t){return bt(t,(function(t){t=Mi(t),or(e,t,Ca(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Mo(),ru=Mo(!0);function ou(e){return e}function iu(e){return Rr("function"==typeof e?e:sr(e,1))}var au=Gr((function(e,t){return function(n){return jr(n,e,t)}})),su=Gr((function(e,t){return function(n){return jr(e,n,t)}}));function uu(e,t,n){var r=As(t),o=_r(t,r);null!=n||ts(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=_r(t,As(t)));var i=!(ts(n)&&"chain"in n&&!n.chain),a=Ja(e);return bt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=Po(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,kt([this.value()],arguments))})})),e}function cu(){}var lu=zo(Ot),fu=zo(_t),pu=zo(jt);function du(e){return bi(e)?Lt(Mi(e)):function(e){return function(t){return Er(t,e)}}(e)}var hu=Wo(),vu=Wo(!0);function gu(){return[]}function yu(){return!1}var mu,bu=Bo((function(e,t){return e+t}),0),wu=qo("ceil"),_u=Bo((function(e,t){return e/t}),1),Eu=qo("floor"),xu=Bo((function(e,t){return e*t}),1),Su=qo("round"),Ou=Bo((function(e,t){return e-t}),0);return Un.after=function(e,t){if("function"!=typeof t)throw new Te(i);return e=vs(e),function(){if(--e<1)return t.apply(this,arguments)}},Un.ary=Pa,Un.assign=ws,Un.assignIn=_s,Un.assignInWith=Es,Un.assignWith=xs,Un.at=Ss,Un.before=ja,Un.bind=Ca,Un.bindAll=eu,Un.bindKey=Na,Un.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ka(e)?e:[e]},Un.chain=da,Un.chunk=function(e,t,n){t=(n?mi(e,t,n):t===o)?1:yn(vs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=r(ln(i/t));a<i;)u[s++]=to(e,a,a+=t);return u},Un.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Un.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return kt(Ka(n)?Po(n):[n],gr(t,1))},Un.cond=function(e){var t=null==e?0:e.length,n=si();return e=t?Ot(e,(function(e){if("function"!=typeof e[1])throw new Te(i);return[n(e[0]),e[1]]})):[],Gr((function(n){for(var r=-1;++r<t;){var o=e[r];if(yt(o[0],this,n))return yt(o[1],this,n)}}))},Un.conforms=function(e){return function(e){var t=As(e);return function(n){return ur(n,e,t)}}(sr(e,1))},Un.constant=tu,Un.countBy=ga,Un.create=function(e,t){var n=Fn(e);return null==t?n:rr(n,t)},Un.curry=function e(t,n,r){var i=Yo(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Un.curryRight=function e(t,n,r){var i=Yo(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Un.debounce=Aa,Un.defaults=Os,Un.defaultsDeep=ks,Un.defer=Ia,Un.delay=Ra,Un.difference=Bi,Un.differenceBy=zi,Un.differenceWith=Vi,Un.drop=function(e,t,n){var r=null==e?0:e.length;return r?to(e,(t=n||t===o?1:vs(t))<0?0:t,r):[]},Un.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?to(e,0,(t=r-(t=n||t===o?1:vs(t)))<0?0:t):[]},Un.dropRightWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!0,!0):[]},Un.dropWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!0):[]},Un.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&mi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=vs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:vs(r))<0&&(r+=i),r=n>r?0:gs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Un.filter=function(e,t){return(Ka(e)?Et:vr)(e,si(t,3))},Un.flatMap=function(e,t){return gr(Sa(e,t),1)},Un.flatMapDeep=function(e,t){return gr(Sa(e,t),l)},Un.flatMapDepth=function(e,t,n){return n=n===o?1:vs(n),gr(Sa(e,t),n)},Un.flatten=Hi,Un.flattenDeep=function(e){return null!=e&&e.length?gr(e,l):[]},Un.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===o?1:vs(t)):[]},Un.flip=function(e){return Yo(e,512)},Un.flow=nu,Un.flowRight=ru,Un.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Un.functions=function(e){return null==e?[]:_r(e,As(e))},Un.functionsIn=function(e){return null==e?[]:_r(e,Is(e))},Un.groupBy=_a,Un.initial=function(e){return null!=e&&e.length?to(e,0,-1):[]},Un.intersection=Gi,Un.intersectionBy=Zi,Un.intersectionWith=Yi,Un.invert=js,Un.invertBy=Cs,Un.invokeMap=Ea,Un.iteratee=iu,Un.keyBy=xa,Un.keys=As,Un.keysIn=Is,Un.map=Sa,Un.mapKeys=function(e,t){var n={};return t=si(t,3),br(e,(function(e,r,o){or(n,t(e,r,o),e)})),n},Un.mapValues=function(e,t){var n={};return t=si(t,3),br(e,(function(e,r,o){or(n,r,t(e,r,o))})),n},Un.matches=function(e){return Mr(sr(e,1))},Un.matchesProperty=function(e,t){return Ur(e,sr(t,1))},Un.memoize=$a,Un.merge=Rs,Un.mergeWith=$s,Un.method=au,Un.methodOf=su,Un.mixin=uu,Un.negate=Da,Un.nthArg=function(e){return e=vs(e),Gr((function(t){return Br(t,e)}))},Un.omit=Ds,Un.omitBy=function(e,t){return Ms(e,Da(si(t)))},Un.once=function(e){return ja(2,e)},Un.orderBy=function(e,t,n,r){return null==e?[]:(Ka(t)||(t=null==t?[]:[t]),Ka(n=r?o:n)||(n=null==n?[]:[n]),zr(e,t,n))},Un.over=lu,Un.overArgs=La,Un.overEvery=fu,Un.overSome=pu,Un.partial=Ma,Un.partialRight=Ua,Un.partition=Oa,Un.pick=Ls,Un.pickBy=Ms,Un.property=du,Un.propertyOf=function(e){return function(t){return null==e?o:Er(e,t)}},Un.pull=Ji,Un.pullAll=Xi,Un.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,si(n,2)):e},Un.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,o,n):e},Un.pullAt=ea,Un.range=hu,Un.rangeRight=vu,Un.rearg=Fa,Un.reject=function(e,t){return(Ka(e)?Et:vr)(e,Da(si(t,3)))},Un.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=si(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Kr(e,o),n},Un.rest=function(e,t){if("function"!=typeof e)throw new Te(i);return Gr(e,t=t===o?t:vs(t))},Un.reverse=ta,Un.sampleSize=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:vs(t),(Ka(e)?Qn:Yr)(e,t)},Un.set=function(e,t,n){return null==e?e:Qr(e,t,n)},Un.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Qr(e,t,n,r)},Un.shuffle=function(e){return(Ka(e)?Jn:eo)(e)},Un.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&mi(e,t,n)?(t=0,n=r):(t=null==t?0:vs(t),n=n===o?r:vs(n)),to(e,t,n)):[]},Un.sortBy=ka,Un.sortedUniq=function(e){return e&&e.length?io(e):[]},Un.sortedUniqBy=function(e,t){return e&&e.length?io(e,si(t,2)):[]},Un.split=function(e,t,n){return n&&"number"!=typeof n&&mi(e,t,n)&&(t=n=o),(n=n===o?d:n>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=so(t))&&Jt(e)?wo(an(e),0,n):e.split(t,n):[]},Un.spread=function(e,t){if("function"!=typeof e)throw new Te(i);return t=null==t?0:yn(vs(t),0),Gr((function(n){var r=n[t],o=wo(n,0,t);return r&&kt(o,r),yt(e,this,o)}))},Un.tail=function(e){var t=null==e?0:e.length;return t?to(e,1,t):[]},Un.take=function(e,t,n){return e&&e.length?to(e,0,(t=n||t===o?1:vs(t))<0?0:t):[]},Un.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?to(e,(t=r-(t=n||t===o?1:vs(t)))<0?0:t,r):[]},Un.takeRightWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!1,!0):[]},Un.takeWhile=function(e,t){return e&&e.length?fo(e,si(t,3)):[]},Un.tap=function(e,t){return t(e),e},Un.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Te(i);return ts(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Aa(e,t,{leading:r,maxWait:t,trailing:o})},Un.thru=ha,Un.toArray=ds,Un.toPairs=Us,Un.toPairsIn=Fs,Un.toPath=function(e){return Ka(e)?Ot(e,Mi):cs(e)?[e]:Po(Li(bs(e)))},Un.toPlainObject=ms,Un.transform=function(e,t,n){var r=Ka(e),o=r||Za(e)||ls(e);if(t=si(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:ts(e)&&Ja(i)?Fn(He(e)):{}}return(o?bt:br)(e,(function(e,r,o){return t(n,e,r,o)})),n},Un.unary=function(e){return Pa(e,1)},Un.union=na,Un.unionBy=ra,Un.unionWith=oa,Un.uniq=function(e){return e&&e.length?uo(e):[]},Un.uniqBy=function(e,t){return e&&e.length?uo(e,si(t,2)):[]},Un.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?uo(e,o,t):[]},Un.unset=function(e,t){return null==e||co(e,t)},Un.unzip=ia,Un.unzipWith=aa,Un.update=function(e,t,n){return null==e?e:lo(e,t,yo(n))},Un.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:lo(e,t,yo(n),r)},Un.values=Bs,Un.valuesIn=function(e){return null==e?[]:Wt(e,Is(e))},Un.without=sa,Un.words=Js,Un.wrap=function(e,t){return Ma(yo(t),e)},Un.xor=ua,Un.xorBy=ca,Un.xorWith=la,Un.zip=fa,Un.zipObject=function(e,t){return vo(e||[],t||[],er)},Un.zipObjectDeep=function(e,t){return vo(e||[],t||[],Qr)},Un.zipWith=pa,Un.entries=Us,Un.entriesIn=Fs,Un.extend=_s,Un.extendWith=Es,uu(Un,Un),Un.add=bu,Un.attempt=Xs,Un.camelCase=zs,Un.capitalize=Vs,Un.ceil=wu,Un.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=ys(n))==n?n:0),t!==o&&(t=(t=ys(t))==t?t:0),ar(ys(e),t,n)},Un.clone=function(e){return sr(e,4)},Un.cloneDeep=function(e){return sr(e,5)},Un.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:o)},Un.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:o)},Un.conformsTo=function(e,t){return null==t||ur(e,t,As(t))},Un.deburr=Ws,Un.defaultTo=function(e,t){return null==e||e!=e?t:e},Un.divide=_u,Un.endsWith=function(e,t,n){e=bs(e),t=so(t);var r=e.length,i=n=n===o?r:ar(vs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Un.eq=Ba,Un.escape=function(e){return(e=bs(e))&&G.test(e)?e.replace(H,Yt):e},Un.escapeRegExp=function(e){return(e=bs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Un.every=function(e,t,n){var r=Ka(e)?_t:dr;return n&&mi(e,t,n)&&(t=o),r(e,si(t,3))},Un.find=ya,Un.findIndex=Wi,Un.findKey=function(e,t){return Nt(e,si(t,3),br)},Un.findLast=ma,Un.findLastIndex=Ki,Un.findLastKey=function(e,t){return Nt(e,si(t,3),wr)},Un.floor=Eu,Un.forEach=ba,Un.forEachRight=wa,Un.forIn=function(e,t){return null==e?e:yr(e,si(t,3),Is)},Un.forInRight=function(e,t){return null==e?e:mr(e,si(t,3),Is)},Un.forOwn=function(e,t){return e&&br(e,si(t,3))},Un.forOwnRight=function(e,t){return e&&wr(e,si(t,3))},Un.get=Ts,Un.gt=za,Un.gte=Va,Un.has=function(e,t){return null!=e&&hi(e,t,kr)},Un.hasIn=Ps,Un.head=qi,Un.identity=ou,Un.includes=function(e,t,n,r){e=qa(e)?e:Bs(e),n=n&&!r?vs(n):0;var o=e.length;return n<0&&(n=yn(o+n,0)),us(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&It(e,t,n)>-1},Un.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vs(n);return o<0&&(o=yn(r+o,0)),It(e,t,o)},Un.inRange=function(e,t,n){return t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n){return e>=mn(t,n)&&e<yn(t,n)}(e=ys(e),t,n)},Un.invoke=Ns,Un.isArguments=Wa,Un.isArray=Ka,Un.isArrayBuffer=Ha,Un.isArrayLike=qa,Un.isArrayLikeObject=Ga,Un.isBoolean=function(e){return!0===e||!1===e||ns(e)&&Sr(e)==y},Un.isBuffer=Za,Un.isDate=Ya,Un.isElement=function(e){return ns(e)&&1===e.nodeType&&!is(e)},Un.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ka(e)||"string"==typeof e||"function"==typeof e.splice||Za(e)||ls(e)||Wa(e)))return!e.length;var t=di(e);if(t==E||t==T)return!e.size;if(Ei(e))return!$r(e).length;for(var n in e)if(Ie.call(e,n))return!1;return!0},Un.isEqual=function(e,t){return Nr(e,t)},Un.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Nr(e,t,o,n):!!r},Un.isError=Qa,Un.isFinite=function(e){return"number"==typeof e&&hn(e)},Un.isFunction=Ja,Un.isInteger=Xa,Un.isLength=es,Un.isMap=rs,Un.isMatch=function(e,t){return e===t||Ar(e,t,ci(t))},Un.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Ar(e,t,ci(t),n)},Un.isNaN=function(e){return os(e)&&e!=+e},Un.isNative=function(e){if(_i(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ir(e)},Un.isNil=function(e){return null==e},Un.isNull=function(e){return null===e},Un.isNumber=os,Un.isObject=ts,Un.isObjectLike=ns,Un.isPlainObject=is,Un.isRegExp=as,Un.isSafeInteger=function(e){return Xa(e)&&e>=-9007199254740991&&e<=f},Un.isSet=ss,Un.isString=us,Un.isSymbol=cs,Un.isTypedArray=ls,Un.isUndefined=function(e){return e===o},Un.isWeakMap=function(e){return ns(e)&&di(e)==C},Un.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==Sr(e)},Un.join=function(e,t){return null==e?"":vn.call(e,t)},Un.kebabCase=Ks,Un.last=Qi,Un.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=vs(n))<0?yn(r+i,0):mn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):At(e,$t,i,!0)},Un.lowerCase=Hs,Un.lowerFirst=qs,Un.lt=fs,Un.lte=ps,Un.max=function(e){return e&&e.length?hr(e,ou,Or):o},Un.maxBy=function(e,t){return e&&e.length?hr(e,si(t,2),Or):o},Un.mean=function(e){return Dt(e,ou)},Un.meanBy=function(e,t){return Dt(e,si(t,2))},Un.min=function(e){return e&&e.length?hr(e,ou,Dr):o},Un.minBy=function(e,t){return e&&e.length?hr(e,si(t,2),Dr):o},Un.stubArray=gu,Un.stubFalse=yu,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=xu,Un.nth=function(e,t){return e&&e.length?Br(e,vs(t)):o},Un.noConflict=function(){return it._===this&&(it._=Me),this},Un.noop=cu,Un.now=Ta,Un.pad=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Vo(fn(o),n)+e+Vo(ln(o),n)},Un.padEnd=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?e+Vo(t-r,n):e},Un.padStart=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?Vo(t-r,n)+e:e},Un.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(bs(e).replace(re,""),t||0)},Un.random=function(e,t,n){if(n&&"boolean"!=typeof n&&mi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=hs(e),t===o?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=_n();return mn(e+i*(t-e+tt("1e-"+((i+"").length-1))),t)}return Hr(e,t)},Un.reduce=function(e,t,n){var r=Ka(e)?Tt:Ut,o=arguments.length<3;return r(e,si(t,4),n,o,fr)},Un.reduceRight=function(e,t,n){var r=Ka(e)?Pt:Ut,o=arguments.length<3;return r(e,si(t,4),n,o,pr)},Un.repeat=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:vs(t),qr(bs(e),t)},Un.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Un.result=function(e,t,n){var r=-1,i=(t=mo(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[Mi(t[r])];a===o&&(r=i,a=n),e=Ja(a)?a.call(e):a}return e},Un.round=Su,Un.runInContext=e,Un.sample=function(e){return(Ka(e)?Yn:Zr)(e)},Un.size=function(e){if(null==e)return 0;if(qa(e))return us(e)?on(e):e.length;var t=di(e);return t==E||t==T?e.size:$r(e).length},Un.snakeCase=Gs,Un.some=function(e,t,n){var r=Ka(e)?jt:no;return n&&mi(e,t,n)&&(t=o),r(e,si(t,3))},Un.sortedIndex=function(e,t){return ro(e,t)},Un.sortedIndexBy=function(e,t,n){return oo(e,t,si(n,2))},Un.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ro(e,t);if(r<n&&Ba(e[r],t))return r}return-1},Un.sortedLastIndex=function(e,t){return ro(e,t,!0)},Un.sortedLastIndexBy=function(e,t,n){return oo(e,t,si(n,2),!0)},Un.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ro(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},Un.startCase=Zs,Un.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:ar(vs(n),0,e.length),t=so(t),e.slice(n,n+t.length)==t},Un.subtract=Ou,Un.sum=function(e){return e&&e.length?Ft(e,ou):0},Un.sumBy=function(e,t){return e&&e.length?Ft(e,si(t,2)):0},Un.template=function(e,t,n){var r=Un.templateSettings;n&&mi(e,t,n)&&(t=o),e=bs(e),t=Es({},t,r,Qo);var i,a,s=Es({},t.imports,r.imports,Qo),u=As(s),c=Wt(s,u),l=0,f=t.interpolate||be,p="__p += '",d=Oe((t.escape||be).source+"|"+f.source+"|"+(f===Q?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),h="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Qe+"]")+"\n";e.replace(d,(function(t,n,r,o,s,u){return r||(r=o),p+=e.slice(l,u).replace(we,Qt),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var v=Ie.call(t,"variable")&&t.variable;if(v){if(ce.test(v))throw new _e("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(z,""):p).replace(V,"$1").replace(W,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Xs((function(){return Ee(u,h+"return "+p).apply(o,c)}));if(g.source=p,Qa(g))throw g;return g},Un.times=function(e,t){if((e=vs(e))<1||e>f)return[];var n=d,r=mn(e,d);t=si(t),e-=d;for(var o=Bt(r,t);++n<e;)t(n);return o},Un.toFinite=hs,Un.toInteger=vs,Un.toLength=gs,Un.toLower=function(e){return bs(e).toLowerCase()},Un.toNumber=ys,Un.toSafeInteger=function(e){return e?ar(vs(e),-9007199254740991,f):0===e?e:0},Un.toString=bs,Un.toUpper=function(e){return bs(e).toUpperCase()},Un.trim=function(e,t,n){if((e=bs(e))&&(n||t===o))return zt(e);if(!e||!(t=so(t)))return e;var r=an(e),i=an(t);return wo(r,Ht(r,i),qt(r,i)+1).join("")},Un.trimEnd=function(e,t,n){if((e=bs(e))&&(n||t===o))return e.slice(0,sn(e)+1);if(!e||!(t=so(t)))return e;var r=an(e);return wo(r,0,qt(r,an(t))+1).join("")},Un.trimStart=function(e,t,n){if((e=bs(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=so(t)))return e;var r=an(e);return wo(r,Ht(r,an(t))).join("")},Un.truncate=function(e,t){var n=30,r="...";if(ts(t)){var i="separator"in t?t.separator:i;n="length"in t?vs(t.length):n,r="omission"in t?so(t.omission):r}var a=(e=bs(e)).length;if(Jt(e)){var s=an(e);a=s.length}if(n>=a)return e;var u=n-on(r);if(u<1)return r;var c=s?wo(s,0,u).join(""):e.slice(0,u);if(i===o)return c+r;if(s&&(u+=c.length-u),as(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=Oe(i.source,bs(pe.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;c=c.slice(0,p===o?u:p)}}else if(e.indexOf(so(i),u)!=u){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r},Un.unescape=function(e){return(e=bs(e))&&q.test(e)?e.replace(K,un):e},Un.uniqueId=function(e){var t=++Re;return bs(e)+t},Un.upperCase=Ys,Un.upperFirst=Qs,Un.each=ba,Un.eachRight=wa,Un.first=qi,uu(Un,(mu={},br(Un,(function(e,t){Ie.call(Un.prototype,t)||(mu[t]=e)})),mu),{chain:!1}),Un.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Un[e].placeholder=Un})),bt(["drop","take"],(function(e,t){Vn.prototype[e]=function(n){n=n===o?1:yn(vs(n),0);var r=this.__filtered__&&!t?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:si(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(ou)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=Gr((function(e,t){return"function"==typeof e?new Vn(this):this.map((function(n){return jr(n,e,t)}))})),Vn.prototype.reject=function(e){return this.filter(Da(si(e)))},Vn.prototype.slice=function(e,t){e=vs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=vs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(d)},br(Vn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Un[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Un.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Vn,c=s[0],l=u||Ka(t),f=function(e){var t=i.apply(Un,kt([e],s));return r&&p?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,v=u&&!d;if(!a&&l){t=v?t:new Vn(this);var g=e.apply(t,s);return g.__actions__.push({func:ha,args:[f],thisArg:o}),new zn(g,p)}return h&&v?e.apply(this,s):(g=this.thru(f),h?r?g.value()[0]:g.value():g)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Un.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ka(o)?o:[],e)}return this[n]((function(n){return t.apply(Ka(n)?n:[],e)}))}})),br(Vn.prototype,(function(e,t){var n=Un[t];if(n){var r=n.name+"";Ie.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:t,func:n})}})),Cn[Uo(o,2).name]=[{name:"wrapper",func:o}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=Po(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Po(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Po(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ka(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mn(t,e+a);break;case"takeRight":e=yn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,d=mn(u,this.__takeCount__);if(!n||!r&&o==u&&d==u)return po(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var v=-1,g=e[c+=t];++v<f;){var y=l[v],m=y.iteratee,b=y.type,w=m(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}h[p++]=g}return h},Un.prototype.at=va,Un.prototype.chain=function(){return da(this)},Un.prototype.commit=function(){return new zn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===o&&(this.__values__=ds(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Un.prototype.plant=function(e){for(var t,n=this;n instanceof Bn;){var r=Fi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Un.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:o}),new zn(t,this.__chain__)}return this.thru(ta)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return po(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,at&&(Un.prototype[at]=function(){return this}),Un}();it._=cn,(r=function(){return cn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},651:(e,t,n)=>{!function(t){var n=function(e){return o(!0===e,!1,arguments)};function r(e,t){if("object"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function o(e,t,o){var a=o[0],s=o.length;(e||"object"!==i(a))&&(a={});for(var u=0;u<s;++u){var c=o[u];if("object"===i(c))for(var l in c)if("__proto__"!==l){var f=e?n.clone(c[l]):c[l];a[l]=t?r(a[l],f):f}}return a}function i(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return o(!0===e,!0,arguments)},n.clone=function(e){var t,r,o=e,a=i(e);if("array"===a)for(o=[],r=e.length,t=0;t<r;++t)o[t]=n.clone(e[t]);else if("object"===a)for(t in o={},e)o[t]=n.clone(e[t]);return o},t?e.exports=n:window.merge=n}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},4516:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,u=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))n.call(a,l)&&(u[l]=a[l]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},3975:(e,t,n)=>{"use strict";var r=n(2735),o=n(4516),i=n(9146);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(e,t,n,r,o,i,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var u=!1,c=null,l=!1,f=null,p={onError:function(e){u=!0,c=e}};function d(e,t,n,r,o,i,a,l,f){u=!1,c=null,s.apply(p,arguments)}var h=null,v=null,g=null;function y(e,t,n){var r=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,r,o,i,s,p,h){if(d.apply(this,arguments),u){if(!u)throw Error(a(198));var v=c;u=!1,c=null,l||(l=!0,f=v)}}(r,t,void 0,e),e.currentTarget=null}var m=null,b={};function w(){if(m)for(var e in b){var t=b[e],n=m.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!E[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in E[n]=t,n=t.eventTypes){var o=void 0,i=n[r],s=t,u=r;if(x.hasOwnProperty(u))throw Error(a(99,u));x[u]=i;var c=i.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&_(c[o],s,u);o=!0}else i.registrationName?(_(i.registrationName,s,u),o=!0):o=!1;if(!o)throw Error(a(98,r,e))}}}}function _(e,t,n){if(S[e])throw Error(a(100,e));S[e]=t,O[e]=t.eventTypes[n].dependencies}var E=[],x={},S={},O={};function k(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var T=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),P=null,j=null,C=null;function N(e){if(e=v(e)){if("function"!=typeof P)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),P(e.stateNode,e.type,t))}}function A(e){j?C?C.push(e):C=[e]:j=e}function I(){if(j){var e=j,t=C;if(C=j=null,N(e),t)for(e=0;e<t.length;e++)N(t[e])}}function R(e,t){return e(t)}function $(e,t,n,r,o){return e(t,n,r,o)}function D(){}var L=R,M=!1,U=!1;function F(){null===j&&null===C||(D(),I())}function B(e,t,n){if(U)return e(t,n);U=!0;try{return L(e,t,n)}finally{U=!1,F()}}var z=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,V=Object.prototype.hasOwnProperty,W={},K={};function H(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){q[e]=new H(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];q[t]=new H(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){q[e]=new H(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){q[e]=new H(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){q[e]=new H(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){q[e]=new H(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){q[e]=new H(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){q[e]=new H(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){q[e]=new H(e,5,!1,e.toLowerCase(),null,!1)}));var G=/[\-:]([a-z])/g;function Z(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(G,Z);q[t]=new H(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(G,Z);q[t]=new H(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(G,Z);q[t]=new H(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){q[e]=new H(e,1,!1,e.toLowerCase(),null,!1)})),q.xlinkHref=new H("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){q[e]=new H(e,1,!1,e.toLowerCase(),null,!0)}));var Y=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Q(e,t,n,r){var o=q.hasOwnProperty(t)?q[t]:null;(null!==o?0===o.type:!r&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!V.call(K,e)||!V.call(W,e)&&(z.test(e)?K[e]=!0:(W[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}Y.hasOwnProperty("ReactCurrentDispatcher")||(Y.ReactCurrentDispatcher={current:null}),Y.hasOwnProperty("ReactCurrentBatchConfig")||(Y.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,X="function"==typeof Symbol&&Symbol.for,ee=X?Symbol.for("react.element"):60103,te=X?Symbol.for("react.portal"):60106,ne=X?Symbol.for("react.fragment"):60107,re=X?Symbol.for("react.strict_mode"):60108,oe=X?Symbol.for("react.profiler"):60114,ie=X?Symbol.for("react.provider"):60109,ae=X?Symbol.for("react.context"):60110,se=X?Symbol.for("react.concurrent_mode"):60111,ue=X?Symbol.for("react.forward_ref"):60112,ce=X?Symbol.for("react.suspense"):60113,le=X?Symbol.for("react.suspense_list"):60120,fe=X?Symbol.for("react.memo"):60115,pe=X?Symbol.for("react.lazy"):60116,de=X?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;function ve(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case oe:return"Profiler";case re:return"StrictMode";case ce:return"Suspense";case le:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case ue:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ge(e.type);case de:return ge(e.render);case pe:if(e=1===e._status?e._result:null)return ge(e)}return null}function ye(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=ge(e.type);n=null,r&&(n=ge(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(J,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function me(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function _e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ee(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function xe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=me(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Se(e,t){null!=(t=t.checked)&&Q(e,"checked",t,!1)}function Oe(e,t){Se(e,t);var n=me(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Te(e,t.type,n):t.hasOwnProperty("defaultValue")&&Te(e,t.type,me(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ke(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Te(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Pe(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function je(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+me(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Ce(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ne(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:me(n)}}function Ae(e,t){var n=me(t.value),r=me(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Re(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $e(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Re(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var De,Le,Me=(Le=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((De=De||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=De.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return Le(e,t)}))}:Le);function Ue(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Fe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:Fe("Animation","AnimationEnd"),animationiteration:Fe("Animation","AnimationIteration"),animationstart:Fe("Animation","AnimationStart"),transitionend:Fe("Transition","TransitionEnd")},ze={},Ve={};function We(e){if(ze[e])return ze[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ve)return ze[e]=n[t];return e}T&&(Ve=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);var Ke=We("animationend"),He=We("animationiteration"),qe=We("animationstart"),Ge=We("transitionend"),Ze="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ye=new("function"==typeof WeakMap?WeakMap:Map);function Qe(e){var t=Ye.get(e);return void 0===t&&(t=new Map,Ye.set(e,t)),t}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function et(e){if(Je(e)!==e)throw Error(a(188))}function tt(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return et(o),e;if(i===r)return et(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function nt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function rt(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var ot=null;function it(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)y(e,t[r],n[r]);else t&&y(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function at(e){if(null!==e&&(ot=nt(ot,e)),e=ot,ot=null,e){if(rt(e,it),ot)throw Error(a(95));if(l)throw e=f,l=!1,f=null,e}}function st(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ut(e){if(!T)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var ct=[];function lt(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ct.length&&ct.push(e)}function ft(e,t,n,r){if(ct.length){var o=ct.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=jn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=st(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,u=0;u<E.length;u++){var c=E[u];c&&(c=c.extractEvents(r,t,i,o,a))&&(s=nt(s,c))}at(s)}}function dt(e,t,n){if(!n.has(e)){switch(e){case"scroll":qt(t,"scroll",!0);break;case"focus":case"blur":qt(t,"focus",!0),qt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ut(e)&&qt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ze.indexOf(e)&&Ht(e,t)}n.set(e,null)}}var ht,vt,gt,yt=!1,mt=[],bt=null,wt=null,_t=null,Et=new Map,xt=new Map,St=[],Ot="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),kt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Tt(e,t,n,r,o){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:o,container:r}}function Pt(e,t){switch(e){case"focus":case"blur":bt=null;break;case"dragenter":case"dragleave":wt=null;break;case"mouseover":case"mouseout":_t=null;break;case"pointerover":case"pointerout":Et.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xt.delete(t.pointerId)}}function jt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=Tt(t,n,r,o,i),null!==t&&null!==(t=Cn(t))&&vt(t),e):(e.eventSystemFlags|=r,e)}function Ct(e){var t=jn(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){gt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;var t=Qt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Cn(t);return null!==n&&vt(n),e.blockedOn=t,!1}return!0}function At(e,t,n){Nt(e)&&n.delete(t)}function It(){for(yt=!1;0<mt.length;){var e=mt[0];if(null!==e.blockedOn){null!==(e=Cn(e.blockedOn))&&ht(e);break}var t=Qt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:mt.shift()}null!==bt&&Nt(bt)&&(bt=null),null!==wt&&Nt(wt)&&(wt=null),null!==_t&&Nt(_t)&&(_t=null),Et.forEach(At),xt.forEach(At)}function Rt(e,t){e.blockedOn===t&&(e.blockedOn=null,yt||(yt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,It)))}function $t(e){function t(t){return Rt(t,e)}if(0<mt.length){Rt(mt[0],e);for(var n=1;n<mt.length;n++){var r=mt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==bt&&Rt(bt,e),null!==wt&&Rt(wt,e),null!==_t&&Rt(_t,e),Et.forEach(t),xt.forEach(t),n=0;n<St.length;n++)(r=St[n]).blockedOn===e&&(r.blockedOn=null);for(;0<St.length&&null===(n=St[0]).blockedOn;)Ct(n),null===n.blockedOn&&St.shift()}var Dt={},Lt=new Map,Mt=new Map,Ut=["abort","abort",Ke,"animationEnd",He,"animationIteration",qe,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ge,"transitionEnd","waiting","waiting"];function Ft(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},Mt.set(r,t),Lt.set(r,i),Dt[o]=i}}Ft("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ft("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ft(Ut,2);for(var Bt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),zt=0;zt<Bt.length;zt++)Mt.set(Bt[zt],0);var Vt=i.unstable_UserBlockingPriority,Wt=i.unstable_runWithPriority,Kt=!0;function Ht(e,t){qt(t,e,!1)}function qt(e,t,n){var r=Mt.get(t);switch(void 0===r?2:r){case 0:r=Gt.bind(null,t,1,e);break;case 1:r=Zt.bind(null,t,1,e);break;default:r=Yt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Gt(e,t,n,r){M||D();var o=Yt,i=M;M=!0;try{$(o,e,t,n,r)}finally{(M=i)||F()}}function Zt(e,t,n,r){Wt(Vt,Yt.bind(null,e,t,n,r))}function Yt(e,t,n,r){if(Kt)if(0<mt.length&&-1<Ot.indexOf(e))e=Tt(null,e,t,n,r),mt.push(e);else{var o=Qt(e,t,n,r);if(null===o)Pt(e,r);else if(-1<Ot.indexOf(e))e=Tt(o,e,t,n,r),mt.push(e);else if(!function(e,t,n,r,o){switch(t){case"focus":return bt=jt(bt,e,t,n,r,o),!0;case"dragenter":return wt=jt(wt,e,t,n,r,o),!0;case"mouseover":return _t=jt(_t,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Et.set(i,jt(Et.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,xt.set(i,jt(xt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r)){Pt(e,r),e=ft(e,r,null,t);try{B(pt,e)}finally{lt(e)}}}}function Qt(e,t,n,r){if(null!==(n=jn(n=st(r)))){var o=Je(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=Xe(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}e=ft(e,r,n,t);try{B(pt,e)}finally{lt(e)}return null}var Jt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xt=["Webkit","ms","Moz","O"];function en(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Jt.hasOwnProperty(e)&&Jt[e]?(""+t).trim():t+"px"}function tn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=en(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Jt).forEach((function(e){Xt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jt[t]=Jt[e]}))}));var nn=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function rn(e,t){if(t){if(nn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function on(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var an="http://www.w3.org/1999/xhtml";function sn(e,t){var n=Qe(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=O[t];for(var r=0;r<t.length;r++)dt(t[r],e,n)}function un(){}function cn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ln(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fn(e,t){var n,r=ln(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ln(r)}}function pn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?pn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var vn="$?",gn="$!",yn=null,mn=null;function bn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function wn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var _n="function"==typeof setTimeout?setTimeout:void 0,En="function"==typeof clearTimeout?clearTimeout:void 0;function xn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Sn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||n===gn||n===vn){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var On=Math.random().toString(36).slice(2),kn="__reactInternalInstance$"+On,Tn="__reactEventHandlers$"+On,Pn="__reactContainere$"+On;function jn(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pn]||n[kn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Sn(e);null!==e;){if(n=e[kn])return n;e=Sn(e)}return t}n=(e=n).parentNode}return null}function Cn(e){return!(e=e[kn]||e[Pn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Nn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function An(e){return e[Tn]||null}function In(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Rn(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function $n(e,t,n){(t=Rn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Dn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=In(t);for(t=n.length;0<t--;)$n(n[t],"captured",e);for(t=0;t<n.length;t++)$n(n[t],"bubbled",e)}}function Ln(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Rn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Mn(e){e&&e.dispatchConfig.registrationName&&Ln(e._targetInst,null,e)}function Un(e){rt(e,Dn)}var Fn=null,Bn=null,zn=null;function Vn(){if(zn)return zn;var e,t,n=Bn,r=n.length,o="value"in Fn?Fn.value:Fn.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return zn=o.slice(e,1<t?1-t:void 0)}function Wn(){return!0}function Kn(){return!1}function Hn(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Wn:Kn,this.isPropagationStopped=Kn,this}function qn(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function Gn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Zn(e){e.eventPool=[],e.getPooled=qn,e.release=Gn}o(Hn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Wn)},persist:function(){this.isPersistent=Wn},isPersistent:Kn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Kn,this._dispatchInstances=this._dispatchListeners=null}}),Hn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Hn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,Zn(n),n},Zn(Hn);var Yn=Hn.extend({data:null}),Qn=Hn.extend({data:null}),Jn=[9,13,27,32],Xn=T&&"CompositionEvent"in window,er=null;T&&"documentMode"in document&&(er=document.documentMode);var tr=T&&"TextEvent"in window&&!er,nr=T&&(!Xn||er&&8<er&&11>=er),rr=String.fromCharCode(32),or={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ir=!1;function ar(e,t){switch(e){case"keyup":return-1!==Jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function sr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ur=!1,cr={eventTypes:or,extractEvents:function(e,t,n,r){var o;if(Xn)e:{switch(e){case"compositionstart":var i=or.compositionStart;break e;case"compositionend":i=or.compositionEnd;break e;case"compositionupdate":i=or.compositionUpdate;break e}i=void 0}else ur?ar(e,n)&&(i=or.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=or.compositionStart);return i?(nr&&"ko"!==n.locale&&(ur||i!==or.compositionStart?i===or.compositionEnd&&ur&&(o=Vn()):(Bn="value"in(Fn=r)?Fn.value:Fn.textContent,ur=!0)),i=Yn.getPooled(i,t,n,r),(o||null!==(o=sr(n)))&&(i.data=o),Un(i),o=i):o=null,(e=tr?function(e,t){switch(e){case"compositionend":return sr(t);case"keypress":return 32!==t.which?null:(ir=!0,rr);case"textInput":return(e=t.data)===rr&&ir?null:e;default:return null}}(e,n):function(e,t){if(ur)return"compositionend"===e||!Xn&&ar(e,t)?(e=Vn(),zn=Bn=Fn=null,ur=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nr&&"ko"!==t.locale?null:t.data}}(e,n))?((t=Qn.getPooled(or.beforeInput,t,n,r)).data=e,Un(t)):t=null,null===o?t:null===t?o:[o,t]}},lr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!lr[e.type]:"textarea"===t}var pr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function dr(e,t,n){return(e=Hn.getPooled(pr.change,e,t,n)).type="change",A(n),Un(e),e}var hr=null,vr=null;function gr(e){at(e)}function yr(e){if(_e(Nn(e)))return e}function mr(e,t){if("change"===e)return t}var br=!1;function wr(){hr&&(hr.detachEvent("onpropertychange",_r),vr=hr=null)}function _r(e){if("value"===e.propertyName&&yr(vr))if(e=dr(vr,e,st(e)),M)at(e);else{M=!0;try{R(gr,e)}finally{M=!1,F()}}}function Er(e,t,n){"focus"===e?(wr(),vr=n,(hr=t).attachEvent("onpropertychange",_r)):"blur"===e&&wr()}function xr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return yr(vr)}function Sr(e,t){if("click"===e)return yr(t)}function Or(e,t){if("input"===e||"change"===e)return yr(t)}T&&(br=ut("input")&&(!document.documentMode||9<document.documentMode));var kr={eventTypes:pr,_isInputEventSupported:br,extractEvents:function(e,t,n,r){var o=t?Nn(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=mr;else if(fr(o))if(br)a=Or;else{a=xr;var s=Er}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=Sr);if(a&&(a=a(e,t)))return dr(a,n,r);s&&s(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&Te(o,"number",o.value)}},Tr=Hn.extend({view:null,detail:null}),Pr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pr[e])&&!!t[e]}function Cr(){return jr}var Nr=0,Ar=0,Ir=!1,Rr=!1,$r=Tr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Cr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Nr;return Nr=e.screenX,Ir?"mousemove"===e.type?e.screenX-t:0:(Ir=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ar;return Ar=e.screenY,Rr?"mousemove"===e.type?e.screenY-t:0:(Rr=!0,0)}}),Dr=$r.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Lr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Mr={eventTypes:Lr,extractEvents:function(e,t,n,r,o){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?jn(t):null)&&(t!==Je(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var s=$r,u=Lr.mouseLeave,c=Lr.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Dr,u=Lr.pointerLeave,c=Lr.pointerEnter,l="pointer");if(e=null==a?i:Nn(a),i=null==t?i:Nn(t),(u=s.getPooled(u,a,n,r)).type=l+"leave",u.target=e,u.relatedTarget=i,(n=s.getPooled(c,t,n,r)).type=l+"enter",n.target=i,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(c=l,a=0,e=s=r;e;e=In(e))a++;for(e=0,t=c;t;t=In(t))e++;for(;0<a-e;)s=In(s),a--;for(;0<e-a;)c=In(c),e--;for(;a--;){if(s===c||s===c.alternate)break e;s=In(s),c=In(c)}s=null}else s=null;for(c=s,s=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)s.push(r),r=In(r);for(r=[];l&&l!==c&&(null===(a=l.alternate)||a!==c);)r.push(l),l=In(l);for(l=0;l<s.length;l++)Ln(s[l],"bubbled",u);for(l=r.length;0<l--;)Ln(r[l],"captured",n);return 0==(64&o)?[u]:[u,n]}},Ur="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Fr=Object.prototype.hasOwnProperty;function Br(e,t){if(Ur(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Fr.call(t,n[r])||!Ur(e[n[r]],t[n[r]]))return!1;return!0}var zr=T&&"documentMode"in document&&11>=document.documentMode,Vr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Wr=null,Kr=null,Hr=null,qr=!1;function Gr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return qr||null==Wr||Wr!==cn(n)?null:(n="selectionStart"in(n=Wr)&&hn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Hr&&Br(Hr,n)?null:(Hr=n,(e=Hn.getPooled(Vr.select,Kr,e,t)).type="select",e.target=Wr,Un(e),e))}var Zr={eventTypes:Vr,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=Qe(o),i=O.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?Nn(t):window,e){case"focus":(fr(o)||"true"===o.contentEditable)&&(Wr=o,Kr=t,Hr=null);break;case"blur":Hr=Kr=Wr=null;break;case"mousedown":qr=!0;break;case"contextmenu":case"mouseup":case"dragend":return qr=!1,Gr(n,r);case"selectionchange":if(zr)break;case"keydown":case"keyup":return Gr(n,r)}return null}},Yr=Hn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Qr=Hn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jr=Tr.extend({relatedTarget:null});function Xr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var eo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},to={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},no=Tr.extend({key:function(e){if(e.key){var t=eo[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Xr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?to[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Cr,charCode:function(e){return"keypress"===e.type?Xr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Xr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ro=$r.extend({dataTransfer:null}),oo=Tr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Cr}),io=Hn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ao=$r.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),so={eventTypes:Dt,extractEvents:function(e,t,n,r){var o=Lt.get(e);if(!o)return null;switch(e){case"keypress":if(0===Xr(n))return null;case"keydown":case"keyup":e=no;break;case"blur":case"focus":e=Jr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=$r;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ro;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=oo;break;case Ke:case He:case qe:e=Yr;break;case Ge:e=io;break;case"scroll":e=Tr;break;case"wheel":e=ao;break;case"copy":case"cut":case"paste":e=Qr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Dr;break;default:e=Hn}return Un(t=e.getPooled(o,t,n,r)),t}};if(m)throw Error(a(101));m=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=An,v=Cn,g=Nn,k({SimpleEventPlugin:so,EnterLeaveEventPlugin:Mr,ChangeEventPlugin:kr,SelectEventPlugin:Zr,BeforeInputEventPlugin:cr});var uo=[],co=-1;function lo(e){0>co||(e.current=uo[co],uo[co]=null,co--)}function fo(e,t){co++,uo[co]=e.current,e.current=t}var po={},ho={current:po},vo={current:!1},go=po;function yo(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function mo(e){return null!=e.childContextTypes}function bo(){lo(vo),lo(ho)}function wo(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(vo,n)}function _o(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,ge(t)||"Unknown",i));return o({},n,{},r)}function Eo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,go=ho.current,fo(ho,e),fo(vo,vo.current),!0}function xo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=_o(e,t,go),r.__reactInternalMemoizedMergedChildContext=e,lo(vo),lo(ho),fo(ho,e)):lo(vo),fo(vo,n)}var So=i.unstable_runWithPriority,Oo=i.unstable_scheduleCallback,ko=i.unstable_cancelCallback,To=i.unstable_requestPaint,Po=i.unstable_now,jo=i.unstable_getCurrentPriorityLevel,Co=i.unstable_ImmediatePriority,No=i.unstable_UserBlockingPriority,Ao=i.unstable_NormalPriority,Io=i.unstable_LowPriority,Ro=i.unstable_IdlePriority,$o={},Do=i.unstable_shouldYield,Lo=void 0!==To?To:function(){},Mo=null,Uo=null,Fo=!1,Bo=Po(),zo=1e4>Bo?Po:function(){return Po()-Bo};function Vo(){switch(jo()){case Co:return 99;case No:return 98;case Ao:return 97;case Io:return 96;case Ro:return 95;default:throw Error(a(332))}}function Wo(e){switch(e){case 99:return Co;case 98:return No;case 97:return Ao;case 96:return Io;case 95:return Ro;default:throw Error(a(332))}}function Ko(e,t){return e=Wo(e),So(e,t)}function Ho(e,t,n){return e=Wo(e),Oo(e,t,n)}function qo(e){return null===Mo?(Mo=[e],Uo=Oo(Co,Zo)):Mo.push(e),$o}function Go(){if(null!==Uo){var e=Uo;Uo=null,ko(e)}Zo()}function Zo(){if(!Fo&&null!==Mo){Fo=!0;var e=0;try{var t=Mo;Ko(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Mo=null}catch(t){throw null!==Mo&&(Mo=Mo.slice(e+1)),Oo(Co,Go),t}finally{Fo=!1}}}function Yo(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Qo(e,t){if(e&&e.defaultProps)for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Jo={current:null},Xo=null,ei=null,ti=null;function ni(){ti=ei=Xo=null}function ri(e){var t=Jo.current;lo(Jo),e.type._context._currentValue=t}function oi(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ii(e,t){Xo=e,ti=ei=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Aa=!0),e.firstContext=null)}function ai(e,t){if(ti!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(ti=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ei){if(null===Xo)throw Error(a(308));ei=t,Xo.dependencies={expirationTime:0,firstContext:t,responders:null}}else ei=ei.next=t;return e._currentValue}var si=!1;function ui(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ci(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function li(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function fi(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.alternate;null!==n&&ci(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function di(e,t,n,r){var i=e.updateQueue;si=!1;var a=i.baseQueue,s=i.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,i.shared.pending=null,null!==(u=e.alternate)&&null!==(u=u.updateQueue)&&(u.baseQueue=s)}if(null!==a){u=a.next;var c=i.baseState,l=0,f=null,p=null,d=null;if(null!==u)for(var h=u;;){if((s=h.expirationTime)<r){var v={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===d?(p=d=v,f=c):d=d.next=v,s>l&&(l=s)}else{null!==d&&(d=d.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),cu(s,h.suspenseConfig);e:{var g=e,y=h;switch(s=t,v=n,y.tag){case 1:if("function"==typeof(g=y.payload)){c=g.call(v,c,s);break e}c=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(s="function"==typeof(g=y.payload)?g.call(v,c,s):g))break e;c=o({},c,s);break e;case 2:si=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=i.effects)?i.effects=[h]:s.push(h))}if(null===(h=h.next)||h===u){if(null===(s=i.shared.pending))break;h=a.next=s.next,s.next=u,i.baseQueue=a=s,i.shared.pending=null}}null===d?f=c:d.next=p,i.baseState=f,i.baseQueue=d,lu(l),e.expirationTime=l,e.memoizedState=c}}function hi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=o,o=n,"function"!=typeof r)throw Error(a(191,r));r.call(o)}}}var vi=Y.ReactCurrentBatchConfig,gi=(new r.Component).refs;function yi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var mi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Ys(),o=vi.suspense;(o=li(r=Qs(r,e,o),o)).payload=t,null!=n&&(o.callback=n),fi(e,o),Js(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Ys(),o=vi.suspense;(o=li(r=Qs(r,e,o),o)).tag=1,o.payload=t,null!=n&&(o.callback=n),fi(e,o),Js(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Ys(),r=vi.suspense;(r=li(n=Qs(n,e,r),r)).tag=2,null!=t&&(r.callback=t),fi(e,r),Js(e,n)}};function bi(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&Br(n,r)&&Br(o,i))}function wi(e,t,n){var r=!1,o=po,i=t.contextType;return"object"==typeof i&&null!==i?i=ai(i):(o=mo(t)?go:ho.current,i=(r=null!=(r=t.contextTypes))?yo(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=mi,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function _i(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mi.enqueueReplaceState(t,t.state,null)}function Ei(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=gi,ui(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=ai(i):(i=mo(t)?go:ho.current,o.context=yo(e,i)),di(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(yi(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&mi.enqueueReplaceState(o,o.state,null),di(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.effectTag|=4)}var xi=Array.isArray;function Si(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===gi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Oi(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function ki(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Cu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Iu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Si(e,t,n),r.return=e,r):((r=Nu(n.type,n.key,n.props,null,e.mode,r)).ref=Si(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ru(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Au(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Iu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Nu(t.type,t.key,t.props,null,e.mode,n)).ref=Si(e,null,t),n.return=e,n;case te:return(t=Ru(t,e.mode,n)).return=e,t}if(xi(t)||ve(t))return(t=Au(t,e.mode,n,null)).return=e,t;Oi(e,t)}return null}function d(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===o?n.type===ne?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case te:return n.key===o?l(e,t,n,r):null}if(xi(n)||ve(n))return null!==o?null:f(e,t,n,r,null);Oi(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case te:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(xi(r)||ve(r))return f(t,e=e.get(n)||null,r,o,null);Oi(t,r)}return null}function v(o,a,s,u){for(var c=null,l=null,f=a,v=a=0,g=null;null!==f&&v<s.length;v++){f.index>v?(g=f,f=null):g=f.sibling;var y=d(o,f,s[v],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(o,f),a=i(y,a,v),null===l?c=y:l.sibling=y,l=y,f=g}if(v===s.length)return n(o,f),c;if(null===f){for(;v<s.length;v++)null!==(f=p(o,s[v],u))&&(a=i(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(o,f);v<s.length;v++)null!==(g=h(f,o,v,s[v],u))&&(e&&null!==g.alternate&&f.delete(null===g.key?v:g.key),a=i(g,a,v),null===l?c=g:l.sibling=g,l=g);return e&&f.forEach((function(e){return t(o,e)})),c}function g(o,s,u,c){var l=ve(u);if("function"!=typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,g=s=0,y=null,m=u.next();null!==v&&!m.done;g++,m=u.next()){v.index>g?(y=v,v=null):y=v.sibling;var b=d(o,v,m.value,c);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(o,v),s=i(b,s,g),null===f?l=b:f.sibling=b,f=b,v=y}if(m.done)return n(o,v),l;if(null===v){for(;!m.done;g++,m=u.next())null!==(m=p(o,m.value,c))&&(s=i(m,s,g),null===f?l=m:f.sibling=m,f=m);return l}for(v=r(o,v);!m.done;g++,m=u.next())null!==(m=h(v,o,g,m.value,c))&&(e&&null!==m.alternate&&v.delete(null===m.key?g:m.key),s=i(m,s,g),null===f?l=m:f.sibling=m,f=m);return e&&v.forEach((function(e){return t(o,e)})),l}return function(e,r,i,u){var c="object"==typeof i&&null!==i&&i.type===ne&&null===i.key;c&&(i=i.props.children);var l="object"==typeof i&&null!==i;if(l)switch(i.$$typeof){case ee:e:{for(l=i.key,c=r;null!==c;){if(c.key===l){if(7===c.tag){if(i.type===ne){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Si(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===ne?((r=Au(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Nu(i.type,i.key,i.props,null,e.mode,u)).ref=Si(e,r,i),u.return=e,e=u)}return s(e);case te:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ru(i,e.mode,u)).return=e,e=r}return s(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Iu(i,e.mode,u)).return=e,e=r),s(e);if(xi(i))return v(e,r,i,u);if(ve(i))return g(e,r,i,u);if(l&&Oi(e,i),void 0===i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Ti=ki(!0),Pi=ki(!1),ji={},Ci={current:ji},Ni={current:ji},Ai={current:ji};function Ii(e){if(e===ji)throw Error(a(174));return e}function Ri(e,t){switch(fo(Ai,t),fo(Ni,e),fo(Ci,ji),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$e(null,"");break;default:t=$e(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}lo(Ci),fo(Ci,t)}function $i(){lo(Ci),lo(Ni),lo(Ai)}function Di(e){Ii(Ai.current);var t=Ii(Ci.current),n=$e(t,e.type);t!==n&&(fo(Ni,e),fo(Ci,n))}function Li(e){Ni.current===e&&(lo(Ci),lo(Ni))}var Mi={current:0};function Ui(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===vn||n.data===gn))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Fi(e,t){return{responder:e,props:t}}var Bi=Y.ReactCurrentDispatcher,zi=Y.ReactCurrentBatchConfig,Vi=0,Wi=null,Ki=null,Hi=null,qi=!1;function Gi(){throw Error(a(321))}function Zi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function Yi(e,t,n,r,o,i){if(Vi=i,Wi=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Bi.current=null===e||null===e.memoizedState?ba:wa,e=n(r,o),t.expirationTime===Vi){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(a(301));i+=1,Hi=Ki=null,t.updateQueue=null,Bi.current=_a,e=n(r,o)}while(t.expirationTime===Vi)}if(Bi.current=ma,t=null!==Ki&&null!==Ki.next,Vi=0,Hi=Ki=Wi=null,qi=!1,t)throw Error(a(300));return e}function Qi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Hi?Wi.memoizedState=Hi=e:Hi=Hi.next=e,Hi}function Ji(){if(null===Ki){var e=Wi.alternate;e=null!==e?e.memoizedState:null}else e=Ki.next;var t=null===Hi?Wi.memoizedState:Hi.next;if(null!==t)Hi=t,Ki=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Ki=e).memoizedState,baseState:Ki.baseState,baseQueue:Ki.baseQueue,queue:Ki.queue,next:null},null===Hi?Wi.memoizedState=Hi=e:Hi=Hi.next=e}return Hi}function Xi(e,t){return"function"==typeof t?t(e):t}function ea(e){var t=Ji(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Ki,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=s=i=null,c=o;do{var l=c.expirationTime;if(l<Vi){var f={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,i=r):u=u.next=f,l>Wi.expirationTime&&(Wi.expirationTime=l,lu(l))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),cu(l,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==o);null===u?i=r:u.next=s,Ur(r,t.memoizedState)||(Aa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ta(e){var t=Ji(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);Ur(i,t.memoizedState)||(Aa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function na(e){var t=Qi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:e}).dispatch=ya.bind(null,Wi,e),[t.memoizedState,e]}function ra(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Wi.updateQueue)?(t={lastEffect:null},Wi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function oa(){return Ji().memoizedState}function ia(e,t,n,r){var o=Qi();Wi.effectTag|=e,o.memoizedState=ra(1|t,n,void 0,void 0===r?null:r)}function aa(e,t,n,r){var o=Ji();r=void 0===r?null:r;var i=void 0;if(null!==Ki){var a=Ki.memoizedState;if(i=a.destroy,null!==r&&Zi(r,a.deps))return void ra(t,n,i,r)}Wi.effectTag|=e,o.memoizedState=ra(1|t,n,i,r)}function sa(e,t){return ia(516,4,e,t)}function ua(e,t){return aa(516,4,e,t)}function ca(e,t){return aa(4,2,e,t)}function la(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function fa(e,t,n){return n=null!=n?n.concat([e]):null,aa(4,2,la.bind(null,t,e),n)}function pa(){}function da(e,t){return Qi().memoizedState=[e,void 0===t?null:t],e}function ha(e,t){var n=Ji();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Zi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function va(e,t){var n=Ji();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Zi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ga(e,t,n){var r=Vo();Ko(98>r?98:r,(function(){e(!0)})),Ko(97<r?97:r,(function(){var r=zi.suspense;zi.suspense=void 0===t?null:t;try{e(!1),n()}finally{zi.suspense=r}}))}function ya(e,t,n){var r=Ys(),o=vi.suspense;o={expirationTime:r=Qs(r,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Wi||null!==i&&i===Wi)qi=!0,o.expirationTime=Vi,Wi.expirationTime=Vi;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.eagerReducer=i,o.eagerState=s,Ur(s,a))return}catch(e){}Js(e,r)}}var ma={readContext:ai,useCallback:Gi,useContext:Gi,useEffect:Gi,useImperativeHandle:Gi,useLayoutEffect:Gi,useMemo:Gi,useReducer:Gi,useRef:Gi,useState:Gi,useDebugValue:Gi,useResponder:Gi,useDeferredValue:Gi,useTransition:Gi},ba={readContext:ai,useCallback:da,useContext:ai,useEffect:sa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ia(4,2,la.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ia(4,2,e,t)},useMemo:function(e,t){var n=Qi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Qi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ya.bind(null,Wi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Qi().memoizedState=e},useState:na,useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=na(e),r=n[0],o=n[1];return sa((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=na(!1),n=t[0];return t=t[1],[da(ga.bind(null,t,e),[t,e]),n]}},wa={readContext:ai,useCallback:ha,useContext:ai,useEffect:ua,useImperativeHandle:fa,useLayoutEffect:ca,useMemo:va,useReducer:ea,useRef:oa,useState:function(){return ea(Xi)},useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=ea(Xi),r=n[0],o=n[1];return ua((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ea(Xi),n=t[0];return t=t[1],[ha(ga.bind(null,t,e),[t,e]),n]}},_a={readContext:ai,useCallback:ha,useContext:ai,useEffect:ua,useImperativeHandle:fa,useLayoutEffect:ca,useMemo:va,useReducer:ta,useRef:oa,useState:function(){return ta(Xi)},useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=ta(Xi),r=n[0],o=n[1];return ua((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ta(Xi),n=t[0];return t=t[1],[ha(ga.bind(null,t,e),[t,e]),n]}},Ea=null,xa=null,Sa=!1;function Oa(e,t){var n=Pu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ka(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Ta(e){if(Sa){var t=xa;if(t){var n=t;if(!ka(e,t)){if(!(t=xn(n.nextSibling))||!ka(e,t))return e.effectTag=-1025&e.effectTag|2,Sa=!1,void(Ea=e);Oa(Ea,n)}Ea=e,xa=xn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Sa=!1,Ea=e}}function Pa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ea=e}function ja(e){if(e!==Ea)return!1;if(!Sa)return Pa(e),Sa=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!wn(t,e.memoizedProps))for(t=xa;t;)Oa(e,t),t=xn(t.nextSibling);if(Pa(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){xa=xn(e.nextSibling);break e}t--}else"$"!==n&&n!==gn&&n!==vn||t++}e=e.nextSibling}xa=null}}else xa=Ea?xn(e.stateNode.nextSibling):null;return!0}function Ca(){xa=Ea=null,Sa=!1}var Na=Y.ReactCurrentOwner,Aa=!1;function Ia(e,t,n,r){t.child=null===e?Pi(t,null,n,r):Ti(t,e.child,n,r)}function Ra(e,t,n,r,o){n=n.render;var i=t.ref;return ii(t,o),r=Yi(e,t,n,r,i,o),null===e||Aa?(t.effectTag|=1,Ia(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ya(e,t,o))}function $a(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||ju(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Nu(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Da(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:Br)(o,r)&&e.ref===t.ref)?Ya(e,t,i):(t.effectTag|=1,(e=Cu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Da(e,t,n,r,o,i){return null!==e&&Br(e.memoizedProps,r)&&e.ref===t.ref&&(Aa=!1,o<i)?(t.expirationTime=e.expirationTime,Ya(e,t,i)):Ma(e,t,n,r,i)}function La(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ma(e,t,n,r,o){var i=mo(n)?go:ho.current;return i=yo(t,i),ii(t,o),n=Yi(e,t,n,r,i,o),null===e||Aa?(t.effectTag|=1,Ia(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ya(e,t,o))}function Ua(e,t,n,r,o){if(mo(n)){var i=!0;Eo(t)}else i=!1;if(ii(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),wi(t,n,r),Ei(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=n.contextType;c="object"==typeof c&&null!==c?ai(c):yo(t,c=mo(n)?go:ho.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==c)&&_i(t,a,r,c),si=!1;var p=t.memoizedState;a.state=p,di(t,r,a,o),u=t.memoizedState,s!==r||p!==u||vo.current||si?("function"==typeof l&&(yi(t,n,l,r),u=t.memoizedState),(s=si||bi(t,n,s,r,p,u,c))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ci(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Qo(t.type,s),u=a.context,c="object"==typeof(c=n.contextType)&&null!==c?ai(c):yo(t,c=mo(n)?go:ho.current),(f="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==c)&&_i(t,a,r,c),si=!1,u=t.memoizedState,a.state=u,di(t,r,a,o),p=t.memoizedState,s!==r||u!==p||vo.current||si?("function"==typeof l&&(yi(t,n,l,r),p=t.memoizedState),(l=si||bi(t,n,s,r,u,p,c))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,c)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=l):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return Fa(e,t,n,r,i,o)}function Fa(e,t,n,r,o,i){La(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return o&&xo(t,n,!1),Ya(e,t,i);r=t.stateNode,Na.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Ti(t,e.child,null,i),t.child=Ti(t,null,s,i)):Ia(e,t,s,i),t.memoizedState=r.state,o&&xo(t,n,!0),t.child}function Ba(e){var t=e.stateNode;t.pendingContext?wo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&wo(0,t.context,!1),Ri(e,t.containerInfo)}var za,Va,Wa,Ka={dehydrated:null,retryTime:0};function Ha(e,t,n){var r,o=t.mode,i=t.pendingProps,a=Mi.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),fo(Mi,1&a),null===e){if(void 0!==i.fallback&&Ta(t),s){if(s=i.fallback,(i=Au(null,o,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Au(s,o,n,null)).return=t,i.sibling=n,t.memoizedState=Ka,t.child=i,n}return o=i.children,t.memoizedState=null,t.child=Pi(t,null,o,n)}if(null!==e.memoizedState){if(o=(e=e.child).sibling,s){if(i=i.fallback,(n=Cu(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(o=Cu(o,i)).return=t,n.sibling=o,n.childExpirationTime=0,t.memoizedState=Ka,t.child=n,o}return n=Ti(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=i.fallback,(i=Au(null,o,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Au(s,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Ka,t.child=i,n}return t.memoizedState=null,t.child=Ti(t,e,i.children,n)}function qa(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),oi(e.return,t)}function Ga(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)}function Za(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ia(e,t,r.children,n),0!=(2&(r=Mi.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&qa(e,n);else if(19===e.tag)qa(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Mi,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Ui(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ga(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Ui(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ga(t,!0,n,null,i,t.lastEffect);break;case"together":Ga(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Ya(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&lu(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Cu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Cu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Qa(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ja(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return mo(t.type)&&bo(),null;case 3:return $i(),lo(vo),lo(ho),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!ja(t)||(t.effectTag|=4),null;case 5:Li(t),n=Ii(Ai.current);var i=t.type;if(null!==e&&null!=t.stateNode)Va(e,t,i,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ii(Ci.current),ja(t)){r=t.stateNode,i=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[Tn]=s,i){case"iframe":case"object":case"embed":Ht("load",r);break;case"video":case"audio":for(e=0;e<Ze.length;e++)Ht(Ze[e],r);break;case"source":Ht("error",r);break;case"img":case"image":case"link":Ht("error",r),Ht("load",r);break;case"form":Ht("reset",r),Ht("submit",r);break;case"details":Ht("toggle",r);break;case"input":xe(r,s),Ht("invalid",r),sn(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ht("invalid",r),sn(n,"onChange");break;case"textarea":Ne(r,s),Ht("invalid",r),sn(n,"onChange")}for(var u in rn(i,s),e=null,s)if(s.hasOwnProperty(u)){var c=s[u];"children"===u?"string"==typeof c?r.textContent!==c&&(e=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(e=["children",""+c]):S.hasOwnProperty(u)&&null!=c&&sn(n,u)}switch(i){case"input":we(r),ke(r,s,!0);break;case"textarea":we(r),Ie(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=un)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,e===an&&(e=Re(i)),e===an?"script"===i?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(i,{is:r.is}):(e=u.createElement(i),"select"===i&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,i),e[kn]=t,e[Tn]=r,za(e,t),t.stateNode=e,u=on(i,r),i){case"iframe":case"object":case"embed":Ht("load",e),c=r;break;case"video":case"audio":for(c=0;c<Ze.length;c++)Ht(Ze[c],e);c=r;break;case"source":Ht("error",e),c=r;break;case"img":case"image":case"link":Ht("error",e),Ht("load",e),c=r;break;case"form":Ht("reset",e),Ht("submit",e),c=r;break;case"details":Ht("toggle",e),c=r;break;case"input":xe(e,r),c=Ee(e,r),Ht("invalid",e),sn(n,"onChange");break;case"option":c=Pe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},c=o({},r,{value:void 0}),Ht("invalid",e),sn(n,"onChange");break;case"textarea":Ne(e,r),c=Ce(e,r),Ht("invalid",e),sn(n,"onChange");break;default:c=r}rn(i,c);var l=c;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?tn(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&Me(e,f):"children"===s?"string"==typeof f?("textarea"!==i||""!==f)&&Ue(e,f):"number"==typeof f&&Ue(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?null!=f&&sn(n,s):null!=f&&Q(e,s,f,u))}switch(i){case"input":we(e),ke(e,r,!1);break;case"textarea":we(e),Ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+me(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?je(e,!!r.multiple,n,!1):null!=r.defaultValue&&je(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=un)}bn(i,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Wa(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Ii(Ai.current),Ii(Ci.current),ja(t)?(n=t.stateNode,r=t.memoizedProps,n[kn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[kn]=t,t.stateNode=n)}return null;case 13:return lo(Mi),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&ja(t):(r=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=i,i.nextEffect=s):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Mi.current)?Ns===Ss&&(Ns=Os):(Ns!==Ss&&Ns!==Os||(Ns=ks),0!==Ds&&null!==Ps&&(Lu(Ps,Cs),Mu(Ps,Ds)))),(n||r)&&(t.effectTag|=4),null);case 4:return $i(),null;case 10:return ri(t),null;case 19:if(lo(Mi),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(s=r.rendering)){if(i)Qa(r,!1);else if(Ns!==Ss||null!==e&&0!=(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=Ui(s))){for(t.effectTag|=64,Qa(r,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)s=n,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=s,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,s=e.dependencies,i.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return fo(Mi,1&Mi.current|2),t.child}s=s.sibling}}else{if(!i)if(null!==(e=Ui(s))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Qa(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*zo()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Qa(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=zo()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=zo(),n.sibling=null,t=Mi.current,fo(Mi,i?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Xa(e){switch(e.tag){case 1:mo(e.type)&&bo();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if($i(),lo(vo),lo(ho),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Li(e),null;case 13:return lo(Mi),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return lo(Mi),null;case 4:return $i(),null;case 10:return ri(e),null;default:return null}}function es(e,t){return{value:e,source:t,stack:ye(t)}}za=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Va=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var s,u,c=t.stateNode;switch(Ii(Ci.current),e=null,n){case"input":a=Ee(c,a),r=Ee(c,r),e=[];break;case"option":a=Pe(c,a),r=Pe(c,r),e=[];break;case"select":a=o({},a,{value:void 0}),r=o({},r,{value:void 0}),e=[];break;case"textarea":a=Ce(c,a),r=Ce(c,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(c.onclick=un)}for(s in rn(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in c=a[s])c.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var l=r[s];if(c=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&l!==c&&(null!=l||null!=c))if("style"===s)if(c){for(u in c)!c.hasOwnProperty(u)||l&&l.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in l)l.hasOwnProperty(u)&&c[u]!==l[u]&&(n||(n={}),n[u]=l[u])}else n||(e||(e=[]),e.push(s,n)),n=l;else"dangerouslySetInnerHTML"===s?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(e=e||[]).push(s,l)):"children"===s?c===l||"string"!=typeof l&&"number"!=typeof l||(e=e||[]).push(s,""+l):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(S.hasOwnProperty(s)?(null!=l&&sn(i,s),e||c===l||(e=[])):(e=e||[]).push(s,l))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},Wa=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var ts="function"==typeof WeakSet?WeakSet:Set;function ns(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ye(n)),null!==n&&ge(n.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function rs(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Eu(e,t)}else t.current=null}function os(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Qo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return}throw Error(a(163))}function is(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function as(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ss(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void as(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Qo(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&hi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}hi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&bn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&$t(n)))))}throw Error(a(163))}function us(e,t,n){switch("function"==typeof ku&&ku(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Ko(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var o=t;try{n()}catch(e){Eu(o,e)}}e=e.next}while(e!==r)}))}break;case 1:rs(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Eu(e,t)}}(t,n);break;case 5:rs(t);break;case 4:hs(e,t,n)}}function cs(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&cs(t)}function ls(e){return 5===e.tag||3===e.tag||4===e.tag}function fs(e){e:{for(var t=e.return;null!==t;){if(ls(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Ue(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ls(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?ps(e,n,t):ds(e,n,t)}function ps(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=un));else if(4!==r&&null!==(e=e.child))for(ps(e,t,n),e=e.sibling;null!==e;)ps(e,t,n),e=e.sibling}function ds(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ds(e,t,n),e=e.sibling;null!==e;)ds(e,t,n),e=e.sibling}function hs(e,t,n){for(var r,o,i=t,s=!1;;){if(!s){s=i.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:o=!1;break e;case 3:case 4:r=r.containerInfo,o=!0;break e}s=s.return}s=!0}if(5===i.tag||6===i.tag){e:for(var u=e,c=i,l=n,f=c;;)if(us(u,f,l),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===c)break e;for(;null===f.sibling;){if(null===f.return||f.return===c)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}o?(u=r,c=i.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,o=!0,i.child.return=i,i=i.child;continue}}else if(us(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(s=!1)}i.sibling.return=i.return,i=i.sibling}}function vs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void is(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Tn]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Se(n,r),on(e,o),t=on(e,r),o=0;o<i.length;o+=2){var s=i[o],u=i[o+1];"style"===s?tn(n,u):"dangerouslySetInnerHTML"===s?Me(n,u):"children"===s?Ue(n,u):Q(n,s,u,t)}switch(e){case"input":Oe(n,r);break;case"textarea":Ae(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?je(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?je(n,!!r.multiple,r.defaultValue,!0):je(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,$t(t.containerInfo)));case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Ms=zo()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,o=null!=(o=e.memoizedProps.style)&&o.hasOwnProperty("display")?o.display:null,i.style.display=en("display",o));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void gs(t);case 19:return void gs(t)}throw Error(a(163))}function gs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ts),t.forEach((function(t){var r=Su.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var ys="function"==typeof WeakMap?WeakMap:Map;function ms(e,t,n){(n=li(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fs||(Fs=!0,Bs=r),ns(e,t)},n}function bs(e,t,n){(n=li(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return ns(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===zs?zs=new Set([this]):zs.add(this),ns(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var ws,_s=Math.ceil,Es=Y.ReactCurrentDispatcher,xs=Y.ReactCurrentOwner,Ss=0,Os=3,ks=4,Ts=0,Ps=null,js=null,Cs=0,Ns=Ss,As=null,Is=1073741823,Rs=1073741823,$s=null,Ds=0,Ls=!1,Ms=0,Us=null,Fs=!1,Bs=null,zs=null,Vs=!1,Ws=null,Ks=90,Hs=null,qs=0,Gs=null,Zs=0;function Ys(){return 0!=(48&Ts)?1073741821-(zo()/10|0):0!==Zs?Zs:Zs=1073741821-(zo()/10|0)}function Qs(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Vo();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Ts))return Cs;if(null!==n)e=Yo(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Yo(e,150,100);break;case 97:case 96:e=Yo(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Ps&&e===Cs&&--e,e}function Js(e,t){if(50<qs)throw qs=0,Gs=null,Error(a(185));if(null!==(e=Xs(e,t))){var n=Vo();1073741823===t?0!=(8&Ts)&&0==(48&Ts)?ru(e):(tu(e),0===Ts&&Go()):tu(e),0==(4&Ts)||98!==n&&99!==n||(null===Hs?Hs=new Map([[e,t]]):(void 0===(n=Hs.get(e))||n>t)&&Hs.set(e,t))}}function Xs(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(Ps===o&&(lu(t),Ns===ks&&Lu(o,Cs)),Mu(o,t)),o}function eu(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Du(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function tu(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=qo(ru.bind(null,e));else{var t=eu(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Ys();if(r=1073741823===t?99:1===t||2===t?95:0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==$o&&ko(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?qo(ru.bind(null,e)):Ho(r,nu.bind(null,e),{timeout:10*(1073741821-t)-zo()}),e.callbackNode=t}}}function nu(e,t){if(Zs=0,t)return Uu(e,t=Ys()),tu(e),null;var n=eu(e);if(0!==n){if(t=e.callbackNode,0!=(48&Ts))throw Error(a(327));if(bu(),e===Ps&&n===Cs||au(e,n),null!==js){var r=Ts;Ts|=16;for(var o=uu();;)try{pu();break}catch(t){su(e,t)}if(ni(),Ts=r,Es.current=o,1===Ns)throw t=As,au(e,n),Lu(e,n),tu(e),t;if(null===js)switch(o=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Ns,Ps=null,r){case Ss:case 1:throw Error(a(345));case 2:Uu(e,2<n?2:n);break;case Os:if(Lu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=vu(o)),1073741823===Is&&10<(o=Ms+500-zo())){if(Ls){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,au(e,n);break}}if(0!==(i=eu(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=_n(gu.bind(null,e),o);break}gu(e);break;case ks:if(Lu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=vu(o)),Ls&&(0===(o=e.lastPingedTime)||o>=n)){e.lastPingedTime=n,au(e,n);break}if(0!==(o=eu(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Rs?r=10*(1073741821-Rs)-zo():1073741823===Is?r=0:(r=10*(1073741821-Is)-5e3,0>(r=(o=zo())-r)&&(r=0),(n=10*(1073741821-n)-o)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_s(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=_n(gu.bind(null,e),r);break}gu(e);break;case 5:if(1073741823!==Is&&null!==$s){i=Is;var s=$s;if(0>=(r=0|s.busyMinDurationMs)?r=0:(o=0|s.busyDelayMs,r=(i=zo()-(10*(1073741821-i)-(0|s.timeoutMs||5e3)))<=o?0:o+r-i),10<r){Lu(e,n),e.timeoutHandle=_n(gu.bind(null,e),r);break}}gu(e);break;default:throw Error(a(329))}if(tu(e),e.callbackNode===t)return nu.bind(null,e)}}return null}function ru(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Ts))throw Error(a(327));if(bu(),e===Ps&&t===Cs||au(e,t),null!==js){var n=Ts;Ts|=16;for(var r=uu();;)try{fu();break}catch(t){su(e,t)}if(ni(),Ts=n,Es.current=r,1===Ns)throw n=As,au(e,t),Lu(e,t),tu(e),n;if(null!==js)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Ps=null,gu(e),tu(e)}return null}function ou(e,t){var n=Ts;Ts|=1;try{return e(t)}finally{0===(Ts=n)&&Go()}}function iu(e,t){var n=Ts;Ts&=-2,Ts|=8;try{return e(t)}finally{0===(Ts=n)&&Go()}}function au(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,En(n)),null!==js)for(n=js.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&bo();break;case 3:$i(),lo(vo),lo(ho);break;case 5:Li(r);break;case 4:$i();break;case 13:case 19:lo(Mi);break;case 10:ri(r)}n=n.return}Ps=e,js=Cu(e.current,null),Cs=t,Ns=Ss,As=null,Rs=Is=1073741823,$s=null,Ds=0,Ls=!1}function su(e,t){for(;;){try{if(ni(),Bi.current=ma,qi)for(var n=Wi.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Vi=0,Hi=Ki=Wi=null,qi=!1,null===js||null===js.return)return Ns=1,As=t,js=null;e:{var o=e,i=js.return,a=js,s=t;if(t=Cs,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var u=s;if(0==(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!=(1&Mi.current),f=i;do{var p;if(p=13===f.tag){var d=f.memoizedState;if(null!==d)p=null!==d.dehydrated;else{var h=f.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(p){var v=f.updateQueue;if(null===v){var g=new Set;g.add(u),f.updateQueue=g}else v.add(u);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var y=li(1073741823,null);y.tag=2,fi(a,y)}a.expirationTime=1073741823;break e}s=void 0,a=t;var m=o.pingCache;if(null===m?(m=o.pingCache=new ys,s=new Set,m.set(u,s)):void 0===(s=m.get(u))&&(s=new Set,m.set(u,s)),!s.has(a)){s.add(a);var b=xu.bind(null,o,u,a);u.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);s=Error((ge(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ye(a))}5!==Ns&&(Ns=2),s=es(s,a),f=i;do{switch(f.tag){case 3:u=s,f.effectTag|=4096,f.expirationTime=t,pi(f,ms(f,u,t));break e;case 1:u=s;var w=f.type,_=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===zs||!zs.has(_)))){f.effectTag|=4096,f.expirationTime=t,pi(f,bs(f,u,t));break e}}f=f.return}while(null!==f)}js=hu(js)}catch(e){t=e;continue}break}}function uu(){var e=Es.current;return Es.current=ma,null===e?ma:e}function cu(e,t){e<Is&&2<e&&(Is=e),null!==t&&e<Rs&&2<e&&(Rs=e,$s=t)}function lu(e){e>Ds&&(Ds=e)}function fu(){for(;null!==js;)js=du(js)}function pu(){for(;null!==js&&!Do();)js=du(js)}function du(e){var t=ws(e.alternate,e,Cs);return e.memoizedProps=e.pendingProps,null===t&&(t=hu(e)),xs.current=null,t}function hu(e){js=e;do{var t=js.alternate;if(e=js.return,0==(2048&js.effectTag)){if(t=Ja(t,js,Cs),1===Cs||1!==js.childExpirationTime){for(var n=0,r=js.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}js.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=js.firstEffect),null!==js.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=js.firstEffect),e.lastEffect=js.lastEffect),1<js.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=js:e.firstEffect=js,e.lastEffect=js))}else{if(null!==(t=Xa(js)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=js.sibling))return t;js=e}while(null!==js);return Ns===Ss&&(Ns=5),null}function vu(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function gu(e){var t=Vo();return Ko(99,yu.bind(null,e,t)),null}function yu(e,t){do{bu()}while(null!==Ws);if(0!=(48&Ts))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var o=vu(n);if(e.firstPendingTime=o,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Ps&&(js=Ps=null,Cs=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){var i=Ts;Ts|=32,xs.current=null,yn=Kt;var s=dn();if(hn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{var c=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(c&&0!==c.rangeCount){u=c.anchorNode;var l=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{u.nodeType,f.nodeType}catch(e){u=null;break e}var p=0,d=-1,h=-1,v=0,g=0,y=s,m=null;t:for(;;){for(var b;y!==u||0!==l&&3!==y.nodeType||(d=p+l),y!==f||0!==c&&3!==y.nodeType||(h=p+c),3===y.nodeType&&(p+=y.nodeValue.length),null!==(b=y.firstChild);)m=y,y=b;for(;;){if(y===s)break t;if(m===u&&++v===l&&(d=p),m===f&&++g===c&&(h=p),null!==(b=y.nextSibling))break;m=(y=m).parentNode}y=b}u=-1===d||-1===h?null:{start:d,end:h}}else u=null}u=u||{start:0,end:0}}else u=null;mn={activeElementDetached:null,focusedElem:s,selectionRange:u},Kt=!1,Us=o;do{try{mu()}catch(e){if(null===Us)throw Error(a(330));Eu(Us,e),Us=Us.nextEffect}}while(null!==Us);Us=o;do{try{for(s=e,u=t;null!==Us;){var w=Us.effectTag;if(16&w&&Ue(Us.stateNode,""),128&w){var _=Us.alternate;if(null!==_){var E=_.ref;null!==E&&("function"==typeof E?E(null):E.current=null)}}switch(1038&w){case 2:fs(Us),Us.effectTag&=-3;break;case 6:fs(Us),Us.effectTag&=-3,vs(Us.alternate,Us);break;case 1024:Us.effectTag&=-1025;break;case 1028:Us.effectTag&=-1025,vs(Us.alternate,Us);break;case 4:vs(Us.alternate,Us);break;case 8:hs(s,l=Us,u),cs(l)}Us=Us.nextEffect}}catch(e){if(null===Us)throw Error(a(330));Eu(Us,e),Us=Us.nextEffect}}while(null!==Us);if(E=mn,_=dn(),w=E.focusedElem,u=E.selectionRange,_!==w&&w&&w.ownerDocument&&pn(w.ownerDocument.documentElement,w)){null!==u&&hn(w)&&(_=u.start,void 0===(E=u.end)&&(E=_),"selectionStart"in w?(w.selectionStart=_,w.selectionEnd=Math.min(E,w.value.length)):(E=(_=w.ownerDocument||document)&&_.defaultView||window).getSelection&&(E=E.getSelection(),l=w.textContent.length,s=Math.min(u.start,l),u=void 0===u.end?s:Math.min(u.end,l),!E.extend&&s>u&&(l=u,u=s,s=l),l=fn(w,s),f=fn(w,u),l&&f&&(1!==E.rangeCount||E.anchorNode!==l.node||E.anchorOffset!==l.offset||E.focusNode!==f.node||E.focusOffset!==f.offset)&&((_=_.createRange()).setStart(l.node,l.offset),E.removeAllRanges(),s>u?(E.addRange(_),E.extend(f.node,f.offset)):(_.setEnd(f.node,f.offset),E.addRange(_))))),_=[];for(E=w;E=E.parentNode;)1===E.nodeType&&_.push({element:E,left:E.scrollLeft,top:E.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<_.length;w++)(E=_[w]).element.scrollLeft=E.left,E.element.scrollTop=E.top}Kt=!!yn,mn=yn=null,e.current=n,Us=o;do{try{for(w=e;null!==Us;){var x=Us.effectTag;if(36&x&&ss(w,Us.alternate,Us),128&x){_=void 0;var S=Us.ref;if(null!==S){var O=Us.stateNode;Us.tag,_=O,"function"==typeof S?S(_):S.current=_}}Us=Us.nextEffect}}catch(e){if(null===Us)throw Error(a(330));Eu(Us,e),Us=Us.nextEffect}}while(null!==Us);Us=null,Lo(),Ts=i}else e.current=n;if(Vs)Vs=!1,Ws=e,Ks=t;else for(Us=o;null!==Us;)t=Us.nextEffect,Us.nextEffect=null,Us=t;if(0===(t=e.firstPendingTime)&&(zs=null),1073741823===t?e===Gs?qs++:(qs=0,Gs=e):qs=0,"function"==typeof Ou&&Ou(n.stateNode,r),tu(e),Fs)throw Fs=!1,e=Bs,Bs=null,e;return 0!=(8&Ts)||Go(),null}function mu(){for(;null!==Us;){var e=Us.effectTag;0!=(256&e)&&os(Us.alternate,Us),0==(512&e)||Vs||(Vs=!0,Ho(97,(function(){return bu(),null}))),Us=Us.nextEffect}}function bu(){if(90!==Ks){var e=97<Ks?97:Ks;return Ks=90,Ko(e,wu)}}function wu(){if(null===Ws)return!1;var e=Ws;if(Ws=null,0!=(48&Ts))throw Error(a(331));var t=Ts;for(Ts|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:is(5,n),as(5,n)}}catch(t){if(null===e)throw Error(a(330));Eu(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Ts=t,Go(),!0}function _u(e,t,n){fi(e,t=ms(e,t=es(n,t),1073741823)),null!==(e=Xs(e,1073741823))&&tu(e)}function Eu(e,t){if(3===e.tag)_u(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){_u(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===zs||!zs.has(r))){fi(n,e=bs(n,e=es(t,e),1073741823)),null!==(n=Xs(n,1073741823))&&tu(n);break}}n=n.return}}function xu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Ps===e&&Cs===n?Ns===ks||Ns===Os&&1073741823===Is&&zo()-Ms<500?au(e,Cs):Ls=!0:Du(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,tu(e)))}function Su(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(t=Qs(t=Ys(),e,null)),null!==(e=Xs(e,t))&&tu(e)}ws=function(e,t,n){var r=t.expirationTime;if(null!==e){var o=t.pendingProps;if(e.memoizedProps!==o||vo.current)Aa=!0;else{if(r<n){switch(Aa=!1,t.tag){case 3:Ba(t),Ca();break;case 5:if(Di(t),4&t.mode&&1!==n&&o.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:mo(t.type)&&Eo(t);break;case 4:Ri(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,o=t.type._context,fo(Jo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Ha(e,t,n):(fo(Mi,1&Mi.current),null!==(t=Ya(e,t,n))?t.sibling:null);fo(Mi,1&Mi.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Za(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),fo(Mi,Mi.current),!r)return null}return Ya(e,t,n)}Aa=!1}}else Aa=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=yo(t,ho.current),ii(t,n),o=Yi(null,t,r,e,o,n),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,mo(r)){var i=!0;Eo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ui(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&yi(t,r,s,e),o.updater=mi,t.stateNode=o,o._reactInternalFiber=t,Ei(t,r,e,n),t=Fa(null,t,r,!0,i,n)}else t.tag=0,Ia(null,t,o,n),t=t.child;return t;case 16:e:{if(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(o),1!==o._status)throw o._result;switch(o=o._result,t.type=o,i=t.tag=function(e){if("function"==typeof e)return ju(e)?1:0;if(null!=e){if((e=e.$$typeof)===ue)return 11;if(e===fe)return 14}return 2}(o),e=Qo(o,e),i){case 0:t=Ma(null,t,o,e,n);break e;case 1:t=Ua(null,t,o,e,n);break e;case 11:t=Ra(null,t,o,e,n);break e;case 14:t=$a(null,t,o,Qo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ma(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ua(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 3:if(Ba(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ci(e,t),di(t,r,null,n),(r=t.memoizedState.element)===o)Ca(),t=Ya(e,t,n);else{if((o=t.stateNode.hydrate)&&(xa=xn(t.stateNode.containerInfo.firstChild),Ea=t,o=Sa=!0),o)for(n=Pi(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Ia(e,t,r,n),Ca();t=t.child}return t;case 5:return Di(t),null===e&&Ta(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,wn(r,o)?s=null:null!==i&&wn(r,i)&&(t.effectTag|=16),La(e,t),4&t.mode&&1!==n&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Ia(e,t,s,n),t=t.child),t;case 6:return null===e&&Ta(t),null;case 13:return Ha(e,t,n);case 4:return Ri(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ti(t,null,r,n):Ia(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ra(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 7:return Ia(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ia(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var u=t.type._context;if(fo(Jo,u._currentValue),u._currentValue=i,null!==s)if(u=s.value,0==(i=Ur(u,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(s.children===o.children&&!vo.current){t=Ya(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!=(l.observedBits&i)){1===u.tag&&((l=li(n,null)).tag=2,fi(u,l)),u.expirationTime<n&&(u.expirationTime=n),null!==(l=u.alternate)&&l.expirationTime<n&&(l.expirationTime=n),oi(u.return,n),c.expirationTime<n&&(c.expirationTime=n);break}l=l.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Ia(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ii(t,n),r=r(o=ai(o,i.unstable_observedBits)),t.effectTag|=1,Ia(e,t,r,n),t.child;case 14:return i=Qo(o=t.type,t.pendingProps),$a(e,t,o,i=Qo(o.type,i),r,n);case 15:return Da(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,mo(r)?(e=!0,Eo(t)):e=!1,ii(t,n),wi(t,r,o),Ei(t,r,o,n),Fa(null,t,r,!0,e,n);case 19:return Za(e,t,n)}throw Error(a(156,t.tag))};var Ou=null,ku=null;function Tu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Pu(e,t,n,r){return new Tu(e,t,n,r)}function ju(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Cu(e,t){var n=e.alternate;return null===n?((n=Pu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Nu(e,t,n,r,o,i){var s=2;if(r=e,"function"==typeof e)ju(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case ne:return Au(n.children,o,i,t);case se:s=8,o|=7;break;case re:s=8,o|=1;break;case oe:return(e=Pu(12,n,t,8|o)).elementType=oe,e.type=oe,e.expirationTime=i,e;case ce:return(e=Pu(13,n,t,o)).type=ce,e.elementType=ce,e.expirationTime=i,e;case le:return(e=Pu(19,n,t,o)).elementType=le,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ie:s=10;break e;case ae:s=9;break e;case ue:s=11;break e;case fe:s=14;break e;case pe:s=16,r=null;break e;case de:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Pu(s,n,t,o)).elementType=e,t.type=r,t.expirationTime=i,t}function Au(e,t,n,r){return(e=Pu(7,e,r,t)).expirationTime=n,e}function Iu(e,t,n){return(e=Pu(6,e,null,t)).expirationTime=n,e}function Ru(e,t,n){return(t=Pu(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $u(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Du(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Lu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Mu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Uu(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Fu(e,t,n,r){var o=t.current,i=Ys(),s=vi.suspense;i=Qs(i,o,s);e:if(n){t:{if(Je(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(mo(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(mo(c)){n=_o(n,c,u);break e}}n=u}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=li(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fi(o,t),Js(o,i),i}function Bu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function zu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Vu(e,t){zu(e,t),(e=e.alternate)&&zu(e,t)}function Wu(e,t,n){var r=new $u(e,t,n=null!=n&&!0===n.hydrate),o=Pu(3,null,null,2===t?7:1===t?3:0);r.current=o,o.stateNode=r,ui(o),e[Pn]=r.current,n&&0!==t&&function(e,t){var n=Qe(t);Ot.forEach((function(e){dt(e,t,n)})),kt.forEach((function(e){dt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Ku(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Hu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var s=o;o=function(){var e=Bu(a);s.call(e)}}Fu(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Wu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var u=o;o=function(){var e=Bu(a);u.call(e)}}iu((function(){Fu(t,a,e,o)}))}return Bu(a)}function qu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Gu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ku(t))throw Error(a(200));return qu(e,t,null,n)}Wu.prototype.render=function(e){Fu(e,this._internalRoot,null,null)},Wu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Fu(null,e,null,(function(){t[Pn]=null}))},ht=function(e){if(13===e.tag){var t=Yo(Ys(),150,100);Js(e,t),Vu(e,t)}},vt=function(e){13===e.tag&&(Js(e,3),Vu(e,3))},gt=function(e){if(13===e.tag){var t=Ys();Js(e,t=Qs(t,e,null)),Vu(e,t)}},P=function(e,t,n){switch(t){case"input":if(Oe(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=An(r);if(!o)throw Error(a(90));_e(r),Oe(r,o)}}}break;case"textarea":Ae(e,n);break;case"select":null!=(t=n.value)&&je(e,!!n.multiple,t,!1)}},R=ou,$=function(e,t,n,r,o){var i=Ts;Ts|=4;try{return Ko(98,e.bind(null,t,n,r,o))}finally{0===(Ts=i)&&Go()}},D=function(){0==(49&Ts)&&(function(){if(null!==Hs){var e=Hs;Hs=null,e.forEach((function(e,t){Uu(t,e),tu(t)})),Go()}}(),bu())},L=function(e,t){var n=Ts;Ts|=2;try{return e(t)}finally{0===(Ts=n)&&Go()}};var Zu={Events:[Cn,Nn,An,k,x,Un,function(e){rt(e,Mn)},A,I,Yt,at,bu,{current:!1}]};!function(e){var t=e.findFiberByHostInstance;!function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Ou=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},ku=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(o({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=tt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:jn,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zu,t.createPortal=Gu,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=tt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Ts))throw Error(a(187));var n=Ts;Ts|=1;try{return Ko(99,e.bind(null,t))}finally{Ts=n,Go()}},t.hydrate=function(e,t,n){if(!Ku(t))throw Error(a(200));return Hu(null,e,t,!0,n)},t.render=function(e,t,n){if(!Ku(t))throw Error(a(200));return Hu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ku(e))throw Error(a(40));return!!e._reactRootContainer&&(iu((function(){Hu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Pn]=null}))})),!0)},t.unstable_batchedUpdates=ou,t.unstable_createPortal=function(e,t){return Gu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ku(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Hu(e,t,n,!1,r)},t.version="16.14.0"},2788:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(3975)},8447:(e,t,n)=>{"use strict";var r=n(4516),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,d=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}function _(){}function E(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=w.prototype;var x=E.prototype=new _;x.constructor=E,r(x,w.prototype),x.isPureReactComponent=!0;var S={current:null},O=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)O.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:S.current}}function P(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var j=/\/+/g,C=[];function N(e,t,n,r){if(C.length){var o=C.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function A(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>C.length&&C.push(e)}function I(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var s=!1;if(null===e)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return n(r,e,""===t?"."+$(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=t+$(o=e[u],u);s+=I(o,c,n,r)}else if("function"==typeof(c=null===e||"object"!=typeof e?null:"function"==typeof(c=g&&e[g]||e["@@iterator"])?c:null))for(e=c.call(e),u=0;!(o=e.next()).done;)s+=I(o=o.value,c=t+$(o,u++),n,r);else if("object"===o)throw n=""+e,Error(y(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return s}function R(e,t,n){return null==e?0:I(e,"",t,n)}function $(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function D(e,t){e.func.call(e.context,t,e.count++)}function L(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?M(e,r,n,(function(e){return e})):null!=e&&(P(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(j,"$&/")+"/")+n)),r.push(e))}function M(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(j,"$&/")+"/"),R(e,L,t=N(t,i,r,o)),A(t)}var U={current:null};function F(){var e=U.current;if(null===e)throw Error(y(321));return e}var B={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return M(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;R(e,D,t=N(null,null,t,n)),A(t)},count:function(e){return R(e,(function(){return null}),null)},toArray:function(e){var t=[];return M(e,t,null,(function(e){return e})),t},only:function(e){if(!P(e))throw Error(y(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=c,t.PureComponent=E,t.StrictMode=u,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,t.cloneElement=function(e,t,n){if(null==e)throw Error(y(267,e));var o=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)O.call(t,l)&&!k.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=T,t.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=P,t.lazy=function(e){return{$$typeof:v,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.14.0"},2735:(e,t,n)=>{"use strict";e.exports=n(8447)},921:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});var r=n(7811),o=n(9714),i=n(2412),a=n(4002),s=n(7430);function u(e){return 0===e.length?s.y:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var c=n(5769),l=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 a=this.operator,s=function(e,t,n){if(e){if(e instanceof r.L)return e;if(e[o.b])return e[o.b]()}return e||t||n?new r.L(e,t,n):new r.L(i.c)}(e,t,n);if(a?s.add(a.call(s,this.source)):s.add(this.source||c.v.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),c.v.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){c.v.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),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.L?o:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=f(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[a.L]=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:u(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(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}();function f(e){if(e||(e=c.v.Promise||Promise),!e)throw new Error("no Promise impl found");return e}},2412:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});var r=n(5769),o=n(1450),i={closed:!0,next:function(e){},error:function(e){if(r.v.useDeprecatedSynchronousErrorHandling)throw e;(0,o.z)(e)},complete:function(){}}},2585:(e,t,n)=>{"use strict";n.d(t,{xQ:()=>f});var r=n(7080),o=n(921),i=n(7811),a=n(1098),s=n(7043),u=n(6362),c=n(9714),l=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return r.ZT(t,e),t}(i.L),f=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 r.ZT(t,e),t.prototype[c.b]=function(){return new l(this)},t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new s.N;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 s.N;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 s.N;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)throw new s.N;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new s.N;return this.hasError?(e.error(this.thrownError),a.w.EMPTY):this.isStopped?(e.complete(),a.w.EMPTY):(this.observers.push(e),new u.W(this,e))},t.prototype.asObservable=function(){var e=new o.y;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(o.y),p=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return r.ZT(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):a.w.EMPTY},t}(f)},6362:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(7080),o=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return r.ZT(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(1098).w)},7811:(e,t,n)=>{"use strict";n.d(t,{L:()=>l});var r=n(7080),o=n(9147),i=n(2412),a=n(1098),s=n(9714),u=n(5769),c=n(1450),l=function(e){function t(n,r,o){var a=e.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=i.c;break;case 1:if(!n){a.destination=i.c;break}if("object"==typeof n){n instanceof t?(a.syncErrorThrowable=n.syncErrorThrowable,a.destination=n,n.add(a)):(a.syncErrorThrowable=!0,a.destination=new f(a,n));break}default:a.syncErrorThrowable=!0,a.destination=new f(a,n,r,o)}return a}return r.ZT(t,e),t.prototype[s.b]=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}(a.w),f=function(e){function t(t,n,r,a){var s,u=e.call(this)||this;u._parentSubscriber=t;var c=u;return(0,o.m)(n)?s=n:n&&(s=n.next,r=n.error,a=n.complete,n!==i.c&&(c=Object.create(n),(0,o.m)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=s,u._error=r,u._complete=a,u}return r.ZT(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.v.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.v.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):(0,c.z)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;(0,c.z)(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.v.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(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.v.useDeprecatedSynchronousErrorHandling)throw e;(0,c.z)(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!u.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return u.v.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):((0,c.z)(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(l)},1098:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var r=function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}(),o=n(1167),i=n(9147),a=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}(),s=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,s=n._parentOrParents,c=n._ctorUnsubscribe,l=n._unsubscribe,f=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,s instanceof e)s.remove(this);else if(null!==s)for(var p=0;p<s.length;++p)s[p].remove(this);if((0,i.m)(l)){c&&(this._unsubscribe=void 0);try{l.call(this)}catch(e){t=e instanceof a?u(e.errors):[e]}}if(r(f)){p=-1;for(var d=f.length;++p<d;){var h=f[p];if((0,o.K)(h))try{h.unsubscribe()}catch(e){t=t||[],e instanceof a?t=t.concat(u(e.errors)):t.push(e)}}}if(t)throw new a(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof e){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},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=((t=new e).closed=!0,t),e}();function u(e){return e.reduce((function(e,t){return e.concat(t instanceof a?t.errors:t)}),[])}},5769:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,r=e},get useDeprecatedSynchronousErrorHandling(){return r}}},4002:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var r=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},9714:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},7043:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var r=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},1450:(e,t,n)=>{"use strict";function r(e){setTimeout((function(){throw e}),0)}n.d(t,{z:()=>r})},7430:(e,t,n)=>{"use strict";function r(e){return e}n.d(t,{y:()=>r})},9147:(e,t,n)=>{"use strict";function r(e){return"function"==typeof e}n.d(t,{m:()=>r})},1167:(e,t,n)=>{"use strict";function r(e){return null!==e&&"object"==typeof e}n.d(t,{K:()=>r})},7080:(e,t,n)=>{"use strict";n.d(t,{ZT:()=>o});var 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])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}},9666:(e,t)=>{"use strict";var n,r,o,i,a;if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,u=null,c=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(c,0),e}},l=Date.now();t.unstable_now=function(){return Date.now()-l},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(c,0))},r=function(e,t){u=setTimeout(e,t)},o=function(){clearTimeout(u)},i=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,p=window.Date,d=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var g=p.now();t.unstable_now=function(){return p.now()-g}}var y=!1,m=null,b=-1,w=5,_=0;i=function(){return t.unstable_now()>=_},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,x=E.port2;E.port1.onmessage=function(){if(null!==m){var e=t.unstable_now();_=e+w;try{m(!0,e)?x.postMessage(null):(y=!1,m=null)}catch(e){throw x.postMessage(null),e}}else y=!1},n=function(e){m=e,y||(y=!0,x.postMessage(null))},r=function(e,n){b=d((function(){e(t.unstable_now())}),n)},o=function(){h(b),b=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<T(o,t)))break e;e[r]=t,e[n]=o,n=r}}function O(e){return void 0===(e=e[0])?null:e}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,u=e[s];if(void 0!==a&&0>T(a,n))void 0!==u&&0>T(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>T(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],j=[],C=1,N=null,A=3,I=!1,R=!1,$=!1;function D(e){for(var t=O(j);null!==t;){if(null===t.callback)k(j);else{if(!(t.startTime<=e))break;k(j),t.sortIndex=t.expirationTime,S(P,t)}t=O(j)}}function L(e){if($=!1,D(e),!R)if(null!==O(P))R=!0,n(M);else{var t=O(j);null!==t&&r(L,t.startTime-e)}}function M(e,n){R=!1,$&&($=!1,o()),I=!0;var a=A;try{for(D(n),N=O(P);null!==N&&(!(N.expirationTime>n)||e&&!i());){var s=N.callback;if(null!==s){N.callback=null,A=N.priorityLevel;var u=s(N.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?N.callback=u:N===O(P)&&k(P),D(n)}else k(P);N=O(P)}if(null!==N)var c=!0;else{var l=O(j);null!==l&&r(L,l.startTime-n),c=!1}return c}finally{N=null,A=a,I=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||I||(R=!0,n(M))},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_getFirstCallbackNode=function(){return O(P)},t.unstable_next=function(e){switch(A){case 1:case 2:case 3:var t=3;break;default:t=A}var n=A;A=t;try{return e()}finally{A=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=A;A=e;try{return t()}finally{A=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0<u?s+u:s,a="number"==typeof a.timeout?a.timeout:U(e)}else a=U(e),u=s;return e={id:C++,callback:i,priorityLevel:e,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(e.sortIndex=u,S(j,e),null===O(P)&&e===O(j)&&($?o():$=!0,r(L,u-s))):(e.sortIndex=a,S(P,e),R||I||(R=!0,n(M))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();D(e);var n=O(P);return n!==N&&null!==N&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<N.expirationTime||i()},t.unstable_wrapCallback=function(e){var t=A;return function(){var n=A;A=t;try{return e.apply(this,arguments)}finally{A=n}}}},9146:(e,t,n)=>{"use strict";e.exports=n(9666)},3710:(e,t,n)=>{"use strict";n.d(t,{BP:()=>z,UO:()=>oe});var r=Object.freeze({__proto__:null,get start(){return Ue},get ensureJQuerySupport(){return de},get setBootstrapMaxTime(){return q},get setMountMaxTime(){return G},get setUnmountMaxTime(){return Z},get setUnloadMaxTime(){return Y},get registerApplication(){return Oe},get unregisterApplication(){return Te},get getMountedApps(){return Ee},get getAppStatus(){return Se},get unloadApplication(){return Pe},get checkActivityFunctions(){return ke},get getAppNames(){return xe},get pathToActiveWhen(){return Ne},get navigateToUrl(){return oe},get triggerAppChange(){return $e},get addErrorHandler(){return l},get removeErrorHandler(){return f},get mountRootParcel(){return z},get NOT_LOADED(){return h},get LOADING_SOURCE_CODE(){return v},get NOT_BOOTSTRAPPED(){return g},get BOOTSTRAPPING(){return y},get NOT_MOUNTED(){return m},get MOUNTING(){return b},get UPDATING(){return _},get LOAD_ERROR(){return x},get MOUNTED(){return w},get UNMOUNTING(){return E},get SKIP_BECAUSE_BROKEN(){return S}});function o(e){return(o="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 i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,s=function(){try{var e=new a("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?a:"undefined"!=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=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},u=[];function c(e,t,n){var r=d(e,t,n);u.length?u.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))}function l(e){if("function"!=typeof e)throw Error(p(28,!1));u.push(e)}function f(e){if("function"!=typeof e)throw Error(p(29,!1));var t=!1;return u=u.filter((function(n){var r=n===e;return t=t||r,!r})),t}function p(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function d(e,t,n){var r,o="".concat(j(t)," '").concat(T(t),"' died in status ").concat(t.status,": ");if(e instanceof Error){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(p(30,!1,t.status,T(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=T(t),t.status=n,r}var h="NOT_LOADED",v="LOADING_SOURCE_CODE",g="NOT_BOOTSTRAPPED",y="BOOTSTRAPPING",m="NOT_MOUNTED",b="MOUNTING",w="MOUNTED",_="UPDATING",E="UNMOUNTING",x="LOAD_ERROR",S="SKIP_BECAUSE_BROKEN";function O(e){return e.status===w}function k(e){try{return e.activeWhen(window.location)}catch(t){return c(t,e,S),!1}}function T(e){return e.name}function P(e){return Boolean(e.unmountThisParcel)}function j(e){return P(e)?"parcel":"application"}function C(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function N(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function A(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!N(t,(function(e){return"function"!=typeof e}))));var t}function I(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=j(e),o=T(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return R(n)?n:Promise.reject(p(15,!1,r,o,t,a))}))}),Promise.resolve())}}function R(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function $(e,t){return Promise.resolve().then((function(){return e.status!==g?e:(e.status=y,e.bootstrap?Q(e,"bootstrap").then(n).catch((function(n){if(t)throw d(n,e,S);return c(n,e,S),e})):Promise.resolve().then(n))}));function n(){return e.status=m,e}}function D(e,t){return Promise.resolve().then((function(){if(e.status!==w)return e;e.status=E;var n=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(t)throw d(r,e,S);c(r,e,S)}))})).then((function(){return e}));function r(){return Q(e,"unmount").then((function(){e.status=m})).catch((function(n){if(t)throw d(n,e,S);c(n,e,S)}))}}))}var L=!1,M=!1;function U(e,t){return Promise.resolve().then((function(){return e.status!==m?e:(L||(window.dispatchEvent(new s("single-spa:before-first-mount")),L=!0),Q(e,"mount").then((function(){return e.status=w,M||(window.dispatchEvent(new s("single-spa:first-mount")),M=!0),e})).catch((function(n){return e.status=w,D(e,!0).then(r,r);function r(){if(t)throw d(n,e,S);return c(n,e,S),e}})))}))}var F=0,B={parcels:{}};function z(){return V.apply(B,arguments)}function V(e,t){var n=this;if(!e||"object"!==o(e)&&"function"!=typeof e)throw Error(p(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(p(3,!1,o(e.name)));if("object"!==o(t))throw Error(p(4,!1,name,o(t)));if(!t.domElement)throw Error(p(5,!1,name));var r,i=F++,a="function"==typeof e,s=a?e:function(){return Promise.resolve(e)},u={id:i,parcels:{},status:a?v:g,customProps:t,parentName:T(n),unmountThisParcel:function(){return y.then((function(){if(u.status!==w)throw Error(p(6,!1,name,u.status));return D(u,!0)})).then((function(e){return u.parentName&&delete n.parcels[u.id],e})).then((function(e){return l(e),e})).catch((function(e){throw u.status=S,f(e),e}))}};n.parcels[i]=u;var c=s();if(!c||"function"!=typeof c.then)throw Error(p(7,!1));var l,f,h=(c=c.then((function(e){if(!e)throw Error(p(8,!1));var t=e.name||"parcel-".concat(i);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!A(e.bootstrap))throw Error(p(9,!1,t));if(!A(e.mount))throw Error(p(10,!1,t));if(!A(e.unmount))throw Error(p(11,!1,t));if(e.update&&!A(e.update))throw Error(p(12,!1,t));var n=I(e,"bootstrap"),o=I(e,"mount"),a=I(e,"unmount");u.status=g,u.name=t,u.bootstrap=n,u.mount=o,u.unmount=a,u.timeouts=J(e.timeouts),e.update&&(u.update=I(e,"update"),r.update=function(e){return u.customProps=e,W(function(e){return Promise.resolve().then((function(){if(e.status!==w)throw Error(p(32,!1,T(e)));return e.status=_,Q(e,"update").then((function(){return e.status=w,e})).catch((function(t){throw d(t,e,S)}))}))}(u))})}))).then((function(){return $(u,!0)})),y=h.then((function(){return U(u,!0)})),b=new Promise((function(e,t){l=e,f=t}));return r={mount:function(){return W(Promise.resolve().then((function(){if(u.status!==m)throw Error(p(13,!1,name,u.status));return n.parcels[i]=u,U(u)})))},unmount:function(){return W(u.unmountThisParcel())},getStatus:function(){return u.status},loadPromise:W(c),bootstrapPromise:W(h),mountPromise:W(y),unmountPromise:W(b)}}function W(e){return e.then((function(){return null}))}function K(e){var t=T(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==o(n)||null===n||Array.isArray(n))&&(n={},console.warn(p(40,!1),t,n));var i=C({},n,{name:t,mountParcel:V.bind(e),singleSpa:r});return P(e)&&(i.unmountSelf=e.unmountThisParcel),i}var H={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 q(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(16,!1));H.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function G(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(17,!1));H.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Z(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(18,!1));H.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Y(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(19,!1));H.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Q(e,t){var n=e.timeouts[t],r=n.warningMillis,o=j(e);return new Promise((function(i,a){var s=!1,u=!1;e[t](K(e)).then((function(e){s=!0,i(e)})).catch((function(e){s=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=p(31,!1,t,o,T(e),n.millis);function l(e){if(!s)if(!0===e)u=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!u){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))}function J(e){var t={};for(var n in H)t[n]=C({},H[n],e&&e[n]||{});return t}function X(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==h&&e.status!==x?e:(e.status=v,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(K(e));if(!R(r))throw n=!0,Error(p(33,!1,T(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==o(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!A(t.bootstrap)&&(r=35),A(t.mount)||(r=36),A(t.unmount)||(r=37);var i=j(t);if(r){var a;try{a=JSON.stringify(t)}catch(e){}return console.error(p(r,!1,i,T(e),a),t),c(void 0,e,S),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=C({},e.devtools.overlays,t.devtools.overlays)),e.status=g,e.bootstrap=I(t,"bootstrap"),e.mount=I(t,"mount"),e.unmount=I(t,"unmount"),e.unload=I(t,"unload"),e.timeouts=J(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=S:(r=x,e.loadErrorTime=(new Date).getTime()),c(t,e,r),e})));var t,n}))}var ee,te="undefined"!=typeof window,ne={hashchange:[],popstate:[]},re=["hashchange","popstate"];function oe(e){var 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(p(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=fe(window.location.href),r=fe(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 ie(e){var t=this;if(e){var n=e[0].type;re.indexOf(n)>=0&&ne[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}}function ae(){De([],arguments)}function se(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return ee&&n===o||(Fe()?window.dispatchEvent(ue(window.history.state,t)):De([])),r}}function ue(e,t){var 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}if(te){window.addEventListener("hashchange",ae),window.addEventListener("popstate",ae);var ce=window.addEventListener,le=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&re.indexOf(e)>=0)||N(ne[e],(function(e){return e===t})))return ce.apply(this,arguments);ne[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&re.indexOf(e)>=0))return le.apply(this,arguments);ne[e]=ne[e].filter((function(e){return e!==t}))},window.history.pushState=se(window.history.pushState,"pushState"),window.history.replaceState=se(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(p(41,!1)):window.singleSpaNavigate=oe}function fe(e){var t=document.createElement("a");return t.href=e,t}var pe=!1;function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!pe){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return he.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return he.call(this,n,window.removeEventListener,e,t,arguments)},pe=!0}}function he(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){re.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}var ve={};function ge(e){return Promise.resolve().then((function(){var t=ve[T(e)];if(!t)return e;if(e.status===h)return ye(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==m&&e.status!==x)return e;var n=e.status===x?Promise.resolve():Q(e,"unload");return e.status="UNLOADING",n.then((function(){return ye(e,t),e})).catch((function(n){return function(e,t,n){delete ve[T(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,c(n,e,S),t.reject(n)}(e,t,n),e}))}))}function ye(e,t){delete ve[T(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=h,t.resolve()}function me(e,t,n,r){ve[T(e)]={app:e,resolve:n,reject:r},Object.defineProperty(ve[T(e)],"promise",{get:t})}function be(e){return ve[e]}var we=[];function _e(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return we.forEach((function(i){var a=i.status!==S&&k(i);switch(i.status){case x:a&&o-i.loadErrorTime>=200&&n.push(i);break;case h:case v:a&&n.push(i);break;case g:case m:!a&&be(T(i))?e.push(i):a&&r.push(i);break;case w:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}function Ee(){return we.filter(O).map(T)}function xe(){return we.map(T)}function Se(e){var t=N(we,(function(t){return T(t)===e}));return t?t.status:null}function Oe(e,t,n,r){var i=function(e,t,n,r){var i,a={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===o(e)?(function(e){if(Array.isArray(e)||null===e)throw Error(p(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(p(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(p(20,!1));if("object"!==o(e.app)&&"function"!=typeof e.app)throw Error(p(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(p(24,!1));if(!Ce(e.customProps))throw Error(p(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(p(20,!1));if(!t)throw Error(p(23,!1));if("function"!=typeof n)throw Error(p(24,!1));if(!Ce(r))throw Error(p(22,!1))}(e,t,n,r),a.name=e,a.loadApp=t,a.activeWhen=n,a.customProps=r),a.loadApp="function"!=typeof(i=a.loadApp)?function(){return Promise.resolve(i)}:i,a.customProps=function(e){return e||{}}(a.customProps),a.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:Ne(e)})),function(e){return t.some((function(t){return t(e)}))}}(a.activeWhen),a}(e,t,n,r);if(-1!==xe().indexOf(i.name))throw Error(p(21,!1,i.name));we.push(C({loadErrorTime:null,status:h,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},i)),te&&(de(),De())}function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return we.filter((function(t){return t.activeWhen(e)})).map(T)}function Te(e){if(0===we.filter((function(t){return T(t)===e})).length)throw Error(p(25,!1,e));return Pe(e).then((function(){var t=we.map(T).indexOf(e);we.splice(t,1)}))}function Pe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(p(26,!1));var n=N(we,(function(t){return T(t)===e}));if(!n)throw Error(p(27,!1,e));var r,o=be(T(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){me(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,je(n,o.resolve,o.reject)):r=new Promise((function(e,t){me(n,(function(){return r}),e,t),je(n,e,t)})),r}function je(e,t,n){D(e).then(ge).then((function(){t(),setTimeout((function(){De()}))})).catch(n)}function Ce(e){return!e||"function"==typeof e||"object"===o(e)&&null!==e&&!Array.isArray(e)}function Ne(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&s(i)}return s(e.length),new RegExp(o,"i");function s(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var s=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(s,"$"):"".concat(o,"(/").concat(s,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}var Ae=!1,Ie=[],Re=te&&window.location.href;function $e(){return De()}function De(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(Ae)return new Promise((function(e,n){Ie.push({resolve:e,reject:n,eventArguments:t})}));var n,r=_e(),o=r.appsToUnload,a=r.appsToUnmount,u=r.appsToLoad,c=r.appsToMount,l=!1,f=Re,p=Re=window.location.href;return Fe()?(Ae=!0,n=o.concat(u,a,c),g()):(n=u,v());function d(){l=!0}function v(){return Promise.resolve().then((function(){var e=u.map(X);return Promise.all(e).then(b).then((function(){return[]})).catch((function(e){throw b(),e}))}))}function g(){return Promise.resolve().then((function(){if(window.dispatchEvent(new s(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",_(!0))),window.dispatchEvent(new s("single-spa:before-routing-event",_(!0,{cancelNavigation:d}))),l)return window.dispatchEvent(new s("single-spa:before-mount-routing-event",_(!0))),y(),void oe(f);var t=o.map(ge),r=a.map(D).map((function(e){return e.then(ge)})).concat(t),i=Promise.all(r);i.then((function(){window.dispatchEvent(new s("single-spa:before-mount-routing-event",_(!0)))}));var p=u.map((function(e){return X(e).then((function(e){return Le(e,i)}))})),h=c.filter((function(e){return u.indexOf(e)<0})).map((function(e){return Le(e,i)}));return i.catch((function(e){throw b(),e})).then((function(){return b(),Promise.all(p.concat(h)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(y)}))}))}function y(){var t=Ee();e.forEach((function(e){return e.resolve(t)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new s(r,_())),window.dispatchEvent(new s("single-spa:routing-event",_()))}catch(e){setTimeout((function(){throw e}))}if(Ae=!1,Ie.length>0){var o=Ie;Ie=[],De(o)}return t}function b(){e.forEach((function(e){ie(e.eventArguments)})),ie(t)}function _(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=arguments.length>1?arguments[1]:void 0,d={},v=(i(e={},w,[]),i(e,m,[]),i(e,h,[]),i(e,S,[]),e);r?(u.concat(c).forEach((function(e,t){y(e,w)})),o.forEach((function(e){y(e,h)})),a.forEach((function(e){y(e,m)}))):n.forEach((function(e){y(e)}));var g={detail:{newAppStatuses:d,appsByNewStatus:v,totalAppChanges:n.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:p,navigationIsCanceled:l}};return s&&C(g.detail,s),g;function y(e,t){var n=T(e);t=t||Se(n),d[n]=t,(v[t]=v[t]||[]).push(n)}}}function Le(e,t){return k(e)?$(e).then((function(e){return t.then((function(){return k(e)?U(e):e}))})):t.then((function(){return e}))}var Me=!1;function Ue(e){var t;Me=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,ee=t),te&&De()}function Fe(){return Me}te&&setTimeout((function(){Me||console.warn(p(1,!1))}),5e3);var Be={getRawAppData:function(){return[].concat(we)},reroute:De,NOT_LOADED:h,toLoadPromise:X,toBootstrapPromise:$,unregisterApplication:Te};te&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Be)},7968:(e,t,n)=>{const r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a};Number.isInteger},6763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(682),o=n(658);const i=(0,r.Z)(o.Z,"Map")},7851:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(658).Z.Symbol},963:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7851),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r.Z?r.Z.toStringTag:void 0;var u=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}(e):function(e){return u.call(e)}(e)}},9295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9494);const o=(0,n(6899).Z)(Object.keys,Object);var i=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,r.Z)(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},5852:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(3200);const o=n(658).Z["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var s=n(7275),u=n(9441),c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,p=l.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const v=function(e){return!(!(0,s.Z)(e)||(t=e,a&&a in t))&&((0,r.Z)(e)?h:c).test((0,u.Z)(e));var t},g=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return v(n)?n:void 0}},606:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(682),o=n(658);const i=(0,r.Z)(o.Z,"DataView");var a=n(6763);const s=(0,r.Z)(o.Z,"Promise"),u=(0,r.Z)(o.Z,"Set"),c=(0,r.Z)(o.Z,"WeakMap");var l=n(963),f=n(9441),p="[object Map]",d="[object Promise]",h="[object Set]",v="[object WeakMap]",g="[object DataView]",y=(0,f.Z)(i),m=(0,f.Z)(a.Z),b=(0,f.Z)(s),w=(0,f.Z)(u),_=(0,f.Z)(c),E=l.Z;(i&&E(new i(new ArrayBuffer(1)))!=g||a.Z&&E(new a.Z)!=p||s&&E(s.resolve())!=d||u&&E(new u)!=h||c&&E(new c)!=v)&&(E=function(e){var t=(0,l.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,f.Z)(n):"";if(r)switch(r){case y:return g;case m:return p;case b:return d;case w:return h;case _:return v}return t});const x=E},9494:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=Object.prototype;const o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},6899:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},658:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5852),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.Z||o||Function("return this")()},9441:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=Function.prototype.toString;const o=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},175:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(963),o=n(4897);const i=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,s=a.hasOwnProperty,u=a.propertyIsEnumerable,c=i(function(){return arguments}())?i:function(e){return(0,o.Z)(e)&&s.call(e,"callee")&&!u.call(e,"callee")};const l=c},6575:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},6905:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3200),o=n(3492);const i=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,r.Z)(e)}},7840:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(658);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?r.Z.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},3202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>X});const r=function(e,t){return e===t||e!=e&&t!=t},o=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1};var i=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=o(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const s=a;var u=n(6763);const c=(0,n(682).Z)(Object,"create");var l=Object.prototype.hasOwnProperty;var f=Object.prototype.hasOwnProperty;function p(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}p.prototype.clear=function(){this.__data__=c?c(null):{},this.size=0},p.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},p.prototype.get=function(e){var t=this.__data__;if(c){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return l.call(t,e)?t[e]:void 0},p.prototype.has=function(e){var t=this.__data__;return c?void 0!==t[e]:f.call(t,e)},p.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=c&&void 0===t?"__lodash_hash_undefined__":t,this};const d=p,h=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function v(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}v.prototype.clear=function(){this.size=0,this.__data__={hash:new d,map:new(u.Z||s),string:new d}},v.prototype.delete=function(e){var t=h(this,e).delete(e);return this.size-=t?1:0,t},v.prototype.get=function(e){return h(this,e).get(e)},v.prototype.has=function(e){return h(this,e).has(e)},v.prototype.set=function(e,t){var n=h(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const g=v;function y(e){var t=this.__data__=new s(e);this.size=t.size}y.prototype.clear=function(){this.__data__=new s,this.size=0},y.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},y.prototype.get=function(e){return this.__data__.get(e)},y.prototype.has=function(e){return this.__data__.has(e)},y.prototype.set=function(e,t){var n=this.__data__;if(n instanceof s){var r=n.__data__;if(!u.Z||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new g(r)}return n.set(e,t),this.size=n.size,this};const m=y;function b(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new g;++t<n;)this.add(e[t])}b.prototype.add=b.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},b.prototype.has=function(e){return this.__data__.has(e)};const w=b,_=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},E=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,d=2&n?new w:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],v=t[f];if(r)var g=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==g){if(g)continue;p=!1;break}if(d){if(!_(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p};var x=n(7851);const S=n(658).Z.Uint8Array,O=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},k=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var T=x.Z?x.Z.prototype:void 0,P=T?T.valueOf:void 0;var j=n(6575);var C=Object.prototype.propertyIsEnumerable,N=Object.getOwnPropertySymbols;const A=N?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(N(e),(function(t){return C.call(e,t)})))}:function(){return[]};var I=n(175),R=n(7840),$=/^(?:0|[1-9]\d*)$/;const D=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&$.test(e))&&e>-1&&e%1==0&&e<t};var L=n(8396),M=Object.prototype.hasOwnProperty;const U=function(e,t){var n=(0,j.Z)(e),r=!n&&(0,I.Z)(e),o=!n&&!r&&(0,R.Z)(e),i=!n&&!r&&!o&&(0,L.Z)(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var c in e)!t&&!M.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||D(c,u))||s.push(c);return s};var F=n(9295),B=n(6905);const z=function(e){return(0,B.Z)(e)?U(e):(0,F.Z)(e)},V=function(e){return function(e,t,n){var r=t(e);return(0,j.Z)(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,z,A)};var W=Object.prototype.hasOwnProperty;var K=n(606),H="[object Arguments]",q="[object Array]",G="[object Object]",Z=Object.prototype.hasOwnProperty;const Y=function(e,t,n,o,i,a){var s=(0,j.Z)(e),u=(0,j.Z)(t),c=s?q:(0,K.Z)(e),l=u?q:(0,K.Z)(t),f=(c=c==H?G:c)==G,p=(l=l==H?G:l)==G,d=c==l;if(d&&(0,R.Z)(e)){if(!(0,R.Z)(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new m),s||(0,L.Z)(e)?E(e,t,n,o,i,a):function(e,t,n,o,i,a,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new S(e),new S(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=O;case"[object Set]":var c=1&o;if(u||(u=k),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;o|=2,s.set(e,t);var f=E(u(e),u(t),o,i,a,s);return s.delete(e),f;case"[object Symbol]":if(P)return P.call(e)==P.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var h=f&&Z.call(e,"__wrapped__"),v=p&&Z.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,y=v?t.value():t;return a||(a=new m),i(g,y,n,o,a)}}return!!d&&(a||(a=new m),function(e,t,n,r,o,i){var a=1&n,s=V(e),u=s.length;if(u!=V(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:W.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var v=e[l=s[c]],g=t[l];if(r)var y=a?r(g,v,l,t,e,i):r(v,g,l,e,t,i);if(!(void 0===y?v===g||o(v,g,n,r,i):y)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,o,i,a))};var Q=n(4897);const J=function e(t,n,r,o,i){return t===n||(null==t||null==n||!(0,Q.Z)(t)&&!(0,Q.Z)(n)?t!=t&&n!=n:Y(t,n,r,o,e,i))},X=function(e,t){return J(e,t)}},3200:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(963),o=n(7275);const i=function(e){if(!(0,o.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3492:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7275:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},4897:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},8396:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(963),o=n(3492),i=n(4897),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=n(5852),u="object"==typeof exports&&exports&&!exports.nodeType&&exports,c=u&&"object"==typeof module&&module&&!module.nodeType&&module,l=c&&c.exports===u&&s.Z.process,f=function(){try{return c&&c.require&&c.require("util").types||l&&l.binding&&l.binding("util")}catch(e){}}(),p=f&&f.isTypedArray;const d=p?(h=p,function(e){return h(e)}):function(e){return(0,i.Z)(e)&&(0,o.Z)(e.length)&&!!a[(0,r.Z)(e)]};var h}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={id:t,loaded:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.y=t,r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(7968).s)(1),(()=>{"use strict";r.r(o),r.d(o,{AppState:()=>f.aB,AssignedExtension:()=>s.pv,CancelLoading:()=>s.x9,ConfigStore:()=>i.JU,ConfigurableLink:()=>l.w,ConnectedExtension:()=>s.uP,ConnectivityChangedEvent:()=>u.ac,Extension:()=>l.hj,ExtensionData:()=>l.g,ExtensionMeta:()=>s.uu,ExtensionRegistration:()=>s.tj,ExtensionSlot:()=>l.dT,ExtensionSlotState:()=>s.u_,ExtensionStore:()=>s.qN,InlineNotificationType:()=>p.iW,NotificationDescriptor:()=>p.MK,OfflineMode:()=>c.iC,OfflineModeResult:()=>c.Vm,OpenmrsFetchError:()=>e.nF,PrecacheStaticDependenciesEvent:()=>u.hM,QueueItemDescriptor:()=>c.Cg,ShowNotificationEvent:()=>u.Kj,ShowToastEvent:()=>u.P3,SyncItem:()=>c.we,SyncProcessOptions:()=>c.Ug,ToastDescriptor:()=>p.fU,ToastNotificationMeta:()=>p.yQ,ToastType:()=>p.pC,Type:()=>i.Dy,UserHasAccess:()=>l.Vz,VisitMode:()=>e.u4,VisitStatus:()=>e.Rx,attach:()=>s.ub,backendDependencies:()=>e.Wf,beginEditSynchronizationItem:()=>c.jp,canBeginEditSynchronizationItemsOfType:()=>c.Qd,createGlobalStore:()=>f.jk,createUseStore:()=>l.NV,defaultVisitCustomRepresentation:()=>e.I$,defineConfigSchema:()=>i.SH,defineExtensionConfigSchema:()=>i.Tj,deleteSynchronizationItem:()=>c.Gy,detach:()=>s.og,detachAll:()=>s.lW,fetchCurrentPatient:()=>e.Vy,fhir:()=>e.N$,fhirBaseUrl:()=>e.DN,generateOfflineUuid:()=>c.sF,getAppState:()=>f.W5,getAssignedExtensions:()=>s.h6,getAsyncExtensionLifecycle:()=>l.D$,getAsyncLifecycle:()=>l.Ae,getConfig:()=>i.iE,getConfigStore:()=>i.pR,getConnectedExtensions:()=>s.Kq,getCurrentOfflineMode:()=>c.vm,getCurrentUser:()=>e.ts,getExtensionNameFromId:()=>s.EB,getExtensionStore:()=>s.yw,getGlobalStore:()=>f.zJ,getLifecycle:()=>l.tl,getLocations:()=>e.JC,getLoggedInUser:()=>e.r,getOfflineDb:()=>c.aA,getOfflinePatientDataStore:()=>c.k1,getSessionLocation:()=>e.WK,getStartedVisit:()=>e.$X,getSyncLifecycle:()=>l.a$,getSynchronizationItem:()=>c.TI,getSynchronizationItems:()=>c.Q2,getVisitTypes:()=>e.P9,getVisitsForPatient:()=>e.nx,inRange:()=>i.Z2,interpolateString:()=>i.IT,interpolateUrl:()=>i.ll,isOfflineUuid:()=>c.z7,isUrl:()=>i.CB,isUrlWithTemplateParameters:()=>i.gZ,loadPersistedPatientDataSyncState:()=>c.nN,makeUrl:()=>e.bf,messageOmrsServiceWorker:()=>c.gp,navigate:()=>i.c4,offlineUuidPrefix:()=>c.a7,omrsOfflineCachingStrategyHttpHeaderName:()=>c.Rz,omrsOfflineResponseBodyHttpHeaderName:()=>c.QI,omrsOfflineResponseStatusHttpHeaderName:()=>c.$9,openmrsFetch:()=>e.vb,openmrsObservableFetch:()=>e.uj,provide:()=>i.JJ,queueSynchronizationItem:()=>c.X2,refetchCurrentUser:()=>e.VJ,registerExtension:()=>s.ix,registerExtensionSlot:()=>s.Qq,registerOfflinePatientHandler:()=>c.dt,renderExtension:()=>s.H8,saveVisit:()=>e.bX,sessionEndpoint:()=>e.z$,setSessionLocation:()=>e.jK,setupOfflineSync:()=>c.H_,showModal:()=>p.K4,showNotification:()=>p.c0,showToast:()=>p.CF,subscribeConnectivity:()=>u.BW,subscribeConnectivityChanged:()=>u.XS,subscribeNotificationShown:()=>u.NQ,subscribePrecacheStaticDependencies:()=>u.dY,subscribeTo:()=>f.se,subscribeToastShown:()=>u.id,syncOfflinePatientData:()=>c.MO,toLocationObject:()=>e.Lq,toVisitTypeObject:()=>e.VF,updateVisit:()=>e.ym,useAssignedExtensionIds:()=>l.YV,useAssignedExtensions:()=>l.P3,useBodyScrollLock:()=>l.yn,useConfig:()=>l.ZR,useConnectedExtensions:()=>l.BL,useConnectivity:()=>l.Y9,useCurrentPatient:()=>l.Yq,useExtensionSlot:()=>l.p8,useExtensionSlotMeta:()=>l.qd,useExtensionStore:()=>l.jf,useLayoutType:()=>l.mr,useLocations:()=>l.Z_,useOnClickOutside:()=>l.t$,usePagination:()=>l.h0,usePatient:()=>l.lm,useSessionUser:()=>l.Oy,useStore:()=>l.oR,useStoreWithActions:()=>l.xQ,useVisit:()=>l.JF,useVisitTypes:()=>l.NN,userHasAccess:()=>e.y9,validator:()=>i.sC,validators:()=>i.z2});var e=r(2199),t=r(3107),n={};for(const e in t)["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess"].indexOf(e)<0&&(n[e]=()=>t[e]);r.d(o,n);var i=r(5734),a=r(4729);n={};for(const e in a)["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess","ConfigStore","Type","defineConfigSchema","defineExtensionConfigSchema","getConfig","getConfigStore","inRange","interpolateString","interpolateUrl","isUrl","isUrlWithTemplateParameters","navigate","provide","validator","validators"].indexOf(e)<0&&(n[e]=()=>a[e]);r.d(o,n);var s=r(9187),u=r(5763),c=r(5614),l=r(4734),f=r(9850),p=r(7202),d=r(3315);n={};for(const e in d)["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess","ConfigStore","Type","defineConfigSchema","defineExtensionConfigSchema","getConfig","getConfigStore","inRange","interpolateString","interpolateUrl","isUrl","isUrlWithTemplateParameters","navigate","provide","validator","validators","AssignedExtension","CancelLoading","ConnectedExtension","ExtensionMeta","ExtensionRegistration","ExtensionSlotState","ExtensionStore","attach","detach","detachAll","getAssignedExtensions","getConnectedExtensions","getExtensionNameFromId","getExtensionStore","registerExtension","registerExtensionSlot","renderExtension","ConnectivityChangedEvent","PrecacheStaticDependenciesEvent","ShowNotificationEvent","ShowToastEvent","subscribeConnectivity","subscribeConnectivityChanged","subscribeNotificationShown","subscribePrecacheStaticDependencies","subscribeToastShown","OfflineMode","OfflineModeResult","QueueItemDescriptor","SyncItem","SyncProcessOptions","beginEditSynchronizationItem","canBeginEditSynchronizationItemsOfType","deleteSynchronizationItem","generateOfflineUuid","getCurrentOfflineMode","getOfflineDb","getOfflinePatientDataStore","getSynchronizationItem","getSynchronizationItems","isOfflineUuid","loadPersistedPatientDataSyncState","messageOmrsServiceWorker","offlineUuidPrefix","omrsOfflineCachingStrategyHttpHeaderName","omrsOfflineResponseBodyHttpHeaderName","omrsOfflineResponseStatusHttpHeaderName","queueSynchronizationItem","registerOfflinePatientHandler","setupOfflineSync","syncOfflinePatientData","ConfigurableLink","Extension","ExtensionData","ExtensionSlot","UserHasAccess","createUseStore","getAsyncExtensionLifecycle","getAsyncLifecycle","getLifecycle","getSyncLifecycle","useAssignedExtensionIds","useAssignedExtensions","useBodyScrollLock","useConfig","useConnectedExtensions","useConnectivity","useCurrentPatient","useExtensionSlot","useExtensionSlotMeta","useExtensionStore","useLayoutType","useLocations","useOnClickOutside","usePagination","usePatient","useSessionUser","useStore","useStoreWithActions","useVisit","useVisitTypes","AppState","createGlobalStore","getAppState","getGlobalStore","subscribeTo","InlineNotificationType","NotificationDescriptor","ToastDescriptor","ToastNotificationMeta","ToastType","showModal","showNotification","showToast"].indexOf(e)<0&&(n[e]=()=>d[e]);r.d(o,n)})(),o})())}}}));
3
3
  //# sourceMappingURL=openmrs-esm-framework.js.map