@openmrs/esm-patient-programs-app 3.2.1-pre.166 → 3.2.1-pre.197
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +35 -35
- package/dist/145.js +1 -1
- package/dist/337.js +1 -0
- package/dist/45.js +1 -1
- package/dist/499.js +1 -0
- package/dist/858.js +1 -1
- package/dist/858.js.LICENSE.txt +2 -0
- package/dist/openmrs-esm-patient-programs-app.js +1 -1
- package/dist/openmrs-esm-patient-programs-app.js.buildmanifest.json +55 -55
- package/dist/openmrs-esm-patient-programs-app.old +1 -1
- package/package.json +3 -3
- package/src/programs/programs-detailed-summary.component.tsx +1 -1
- package/src/programs/programs-form.component.tsx +11 -1
- package/dist/373.js +0 -1
- package/dist/932.js +0 -1
package/dist/858.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 858.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_openmrs_esm_patient_programs_app=self.webpackChunk_openmrs_esm_patient_programs_app||[]).push([[858],{560:(t,e,n)=>{System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(t,e){var r={},o={};return{setters:[function(t){r.Type=t.Type,r.defineConfigSchema=t.defineConfigSchema,r.getConfig=t.getConfig,r.navigate=t.navigate,r.validators=t.validators},function(t){o.reportError=t.reportError}],execute:function(){t((()=>{var t={672:(t,e)=>{!function(){var t=e,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(t){this.message=t}r.prototype=new Error,r.prototype.name="InvalidCharacterError",t.btoa||(t.btoa=function(t){for(var e,o,i=String(t),a=0,u=n,s="";i.charAt(0|a)||(u="=",a%1);s+=u.charAt(63&e>>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.");e=e<<8|o}return s}),t.atob||(t.atob=function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,u=0,s="";i=e.charAt(u++);~i&&(o=a%4?64*o+i:i,a++%4)?s+=String.fromCharCode(255&o>>(-2*a&6)):0)i=n.indexOf(i);return s})}()},525:function(t){(function(){var e,n;function r(t,o){var i,a=t.data.entry||[],u=[];for(i=0;i<a.length;i++)u.push(a[i].resource);o(u);var s=n.defer();return e.nextPage({bundle:t.data}).then((function(t){r(t,o).then((function(t){s.resolve()}))}),(function(t){s.resolve()})),s.promise}function o(t,o,i,a){n.defer(),e.search(t).then((function(t){r(t,o).then((function(){i()}),(function(t){a(t)}))}),(function(t){a(t)}))}function i(t){var e=n.defer(),r=[];return o(t,(function(t){t.forEach((function(t){r.push(t)}))}),(function(){e.resolve(r)}),(function(t){e.reject(t)})),e.promise}function a(t,r){var o=n.defer();return e.search(t).then((function(t){var n={},i=[function(){o.resolve(t,n)}];function a(){i.pop()()}var u=t.data;u.entry&&u.entry.forEach((function(t){var o=t.resource,s=o.resourceType;r&&r.forEach((function(t){var r=t.split("."),c=r[0],l=r[1],f=o[l];if(s===c&&f){var h=f.reference;n[h]||function(t,r,o){i.push((function(){!function(t,r,o){var i=o.reference;e.resolve({bundle:t,resource:r,reference:o}).then((function(t){var e=t.data||t.content;n[i]=e,a()}))}(t,r,o)}))}(u,o,f)}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise}t.exports=function(t,r){return e=t,n=r,t.drain=o,t.fetchAll=i,t.fetchAllWithReferences=a,t}}).call(this)},256:function(t,e,n){(function(){n(454);var e=n(801),r=n(921),o=n(294),i=n(821),a=n(442),u=n(856),s=n(719),c=n(29),l=n(723),f=n(249),h=n(525);t.exports=function(t,n){var p=e.Middleware,d=e.$$Attr,v=function(t){return d("method",t)},y=function(t,e){return d("headers."+t,e)},g=p(a),m=p(u(t,n)).and(g).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(y("Accept",t.headers&&t.headers.Accept?t.headers.Accept:"application/json")).and(y("Content-Type",t.headers&&t.headers["Content-Type"]?t.headers["Content-Type"]:"application/json")),b=m.and(v("GET")),w=m.and(v("POST")),_=m.and(v("PUT")),x=m.and(v("DELETE")),S=m.and(v("PATCH")),E=i.Http(t,n),O=f.Path,j=O(t.baseUrl),C=j.slash(":type || :resource.resourceType"),A=C.slash("_history"),P=C.slash(":id || :resource.id"),k=P.slash("_history"),I=P.slash(":versionId || :resource.meta.versionId"),T=j.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),R=y("Prefer","return=representation"),L=p(r.$Paging);return h({conformance:b.and(j.slash("metadata")).end(E),document:w.and(j.slash("Document")).end(E),profile:b.and(j.slash("Profile").slash(":type")).end(E),transaction:w.and(j).end(E),history:b.and(j.slash("_history")).and(L).end(E),typeHistory:b.and(A).and(L).end(E),resourceHistory:b.and(k).and(L).end(E),read:b.and(c.$WithPatient).and(P).end(E),vread:b.and(I).end(E),delete:x.and(P).and(R).end(E),create:w.and(C).and(R).end(E),validate:w.and(C.slash("_validate")).end(E),meta:{add:w.and(T.slash("$meta-add")).end(E),delete:w.and(T.slash("$meta-delete")).end(E),read:b.and(T.slash("$meta")).end(E)},search:b.and(C).and(c.$WithPatient).and(r.$SearchParams).and(L).end(E),update:_.and(P).and(R).end(E),conditionalUpdate:_.and(C).and(r.$SearchParams).and(R).end(E),conditionalDelete:x.and(C).and(r.$SearchParams).and(R).end(E),nextPage:b.and(s.$$BundleLinkUrl("next")).end(E),prevPage:b.and(s.$$BundleLinkUrl("previous")).and(s.$$BundleLinkUrl("prev")).end(E),getBundleByUrl:b.and(O(":url")).end(E),resolve:b.and(l.resolve).end(E),patch:S.and(P).and(y("Content-Type","application/json-patch+json")).end(E)},n)}}).call(this)},294:function(t,e,n){(function(){var t,r=n(801),o=n(672).btoa;e.$Basic=r.$$Attr("headers.Authorization",(function(t){if(t.auth&&t.auth.user&&t.auth.pass)return"Basic "+o(t.auth.user+":"+t.auth.pass)})),e.$Bearer=r.$$Attr("headers.Authorization",(function(t){if(t.auth&&t.auth.bearer)return"Bearer "+t.auth.bearer})),e.$Credentials=r.Middleware(r.$$Attr("credentials",(function(e){return t=e.credentials,""}))).and(r.$$Attr("credentials",(function(e){if(["same-origin","include"].indexOf(t)>-1)return t})))}).call(this)},719:(t,e)=>{e.$$BundleLinkUrl=function(t){return function(e){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(e){return e.relation&&e.relation===t}))[0];return r&&r.url&&(n.url=r.url,n.data=null),e(n)}}}},856:function(t){(function(){var e=function(t,e,n){var r=t[n];return r&&!e[n]&&(e[n]=r),t};t.exports=function(t,n){return function(r){return function(o){return e(t,o,"baseUrl"),e(t,o,"cache"),e(t,o,"auth"),e(t,o,"patient"),e(t,o,"debug"),e(t,o,"credentials"),e(t,o,"headers"),e(t,o,"agentOptions"),e(n,o,"defer"),e(n,o,"http"),r(o)}}}}).call(this)},801:function(t,e,n){(function(){var t=n(454),r=function(t){return t.and=function(e){return r((n=t,o=e,function(t){return n(o(t))}));var n,o},t.end=function(e){return t(e)},t};e.$$Simple=function(t){return function(e){return function(n){return e(t(n))}}},e.$$Attr=function(e,n){return r((function(r){return function(o){var i;return i="function"==t.type(n)?n(o):n,r(null==i&&null==i?o:function(t,e,n){for(var r=e.split("."),o=t,i=0;i<r.length-1;i++){var a=r[i];(o=t[a])||(o={},t[a]=o)}return o[r[r.length-1]]=n,t}(o,e,i))}}))};var o=function(t,e){return r((function(n){return function(r){return r[t]=e(r),n(r)}}))};e.Middleware=r,e.Attribute=o,e.Method=function(t){return o("method",(e=t,function(){return e}));var e}}).call(this)},442:t=>{t.exports=function(t){return function(e){try{return t(e)}catch(t){if(e.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(t.message),console.log(t.stack)),!e.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(t.message),console.log(t.stack),new Error("I need adapter.defer");var n=e.defer();return n.reject(t),n.promise}}}},821:function(t,e,n){(function(){var t=n(454);e.Http=function(t,e){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||e.http||t.http)(n);return n.debug&&r&&r.then&&r.then((function(t){console.log("\nDEBUG: (responce)",t)})),r}},e.$JsonData=function(e){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==t.type(r)||"array"==t.type(r)?JSON.stringify(r):r)),e(n)}}}).call(this)},29:function(t,e,n){(function(){var t=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"];e.$WithPatient=t.$$Simple((function(t){var e=t.type;return t.patient&&("Patient"===e?(t.query=t.query||{},t.query._id=t.patient,t.id=t.patient):r.indexOf(e)>=0&&(t.query=t.query||{},t.query.patient=t.patient)),t}))}).call(this)},723:function(t,e,n){(function(){var e=n(454),r=/^#(.*)/,o=function(t){var n=t.cache,o=t.reference,i=t.bundle,a=o;if(!a.reference)return null;if(a.reference.match(r))return function(t,e){var n=t.match(r)[1],o=(e.contained||[]).filter((function(t){return(t.id||t._id)==n}))[0];return o&&{content:o}||null}(a.reference,t.resource);var u=e.absoluteUrl(t.baseUrl,a.reference);return(i&&i.entry||[]).filter((function(t){return t.id===u}))[0]||(null!=n?n[u]:void 0)||null};t.exports.sync=o,t.exports.resolve=function(t){return function(n){var i=o(n),a=n.reference,u=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return u.resolve(i),u.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=e.absoluteUrl(n.baseUrl,a.reference),n.data=null,t(n)}}}).call(this)},921:function(t,e,n){(function(){var t=n(454),r=t.type,o=t.assertArray,i=(t.assertObject,t.reduceMap),a=t.identity,u={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},s={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},c=function(t,e){if("$sort"===t)return function(t){var e,n,i,a;for(o(t),i=[],e=0,n=t.length;e<n;e++)switch(a=t[e],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}(e);if("$has"===t)return i(e,(function(t,e){var n,o;return n=e[0],o=e[1],t.concat(function(){switch(r(o)){case"array":return o.map((function(t){return{param:"_has",value:n+"="+t}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===t||"$revInclude"===t)return n=t,i(e,(function(t,e){var o,i;return o=e[0],i=e[1],t.concat(function(){switch(r(i)){case"array":return i.map((function(t){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+t}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n;switch(r(e)){case"object":return function(t,e){return i(e,(function(n,i){var a,l,f,h;return a=i[0],h=i[1],n.concat("$and"===a?o(h).reduce((function(e,n){return e.concat(c(t,n))}),[]):"$type"===a?[]:function(t){return 0===t.indexOf("$")}(a)?(l={param:t},"$or"===a?l.value=h:(u[a]&&(l.operator=u[a]),s[a]&&(l.modifier=s[a]),"object"===r(h)&&h.$or?l.value=h.$or:l.value=[h]),[l]):(e.$type&&(f=":"+e.$type),c(""+t+(f||"")+"."+a,h)))}))}(t,e);case"string":case"number":return[{param:t,value:[e]}];case"array":return[{param:t,value:[e.join("|")]}];default:throw"could not linearizeParams "+r(e)}},l=function(t){return i(t,(function(t,e){var n,r;return n=e[0],r=e[1],t.concat(c(n,r))}))},f=function(t){var e,n,r=["_include","_revinclude","_has"];return function(){var o,i,u,s;for(s=[],o=0,i=(u=l(t)).length;o<i;o++)e=u[o],n=-1===r.indexOf(e.param)?encodeURIComponent(e.value):e.value,s.push([e.param,e.modifier,"_has"==e.param?":":"=",e.operator,n].filter(a).join(""));return s}().join("&")};e._query=l,e.query=f;var h=n(801);e.$SearchParams=h.$$Attr("url",(function(t){var e=t.url;return t.query?e+"?"+f(t.query):e})),e.$Paging=function(t){return function(e){var n=e.params||{};return e.since&&(n._since=e.since),e.count&&(n._count=e.count),e.params=n,t(e)}}}).call(this)},249:function(t,e,n){(function(){n(454);var t=n(801),r=function(e,n){var o=function(t){return n&&e.includes("target.versionId")&&!t.target.versionId?n(t):(n&&n(t)+"/"||"")+function(t,e){var n=function(t,e){return 0==t.indexOf(":")?function(t,e){for(var n,r=t.split("||").map((function(t){return t.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=e,r[o].split(".").reduce((function(t,e){return"versionId"===e&&t[e]?"_history/"+t[e]:null==t||null==t?null:t[e]}),n));if(i)return i}return null}(t,e):t}(t.trim(),e);if((null==n||void 0===n)&&0==t.includes("target.versionId"))throw new Error("Parameter "+t+" is required: "+JSON.stringify(e));return n}(e,t)},i=t.Attribute("url",o);return i.slash=function(t){return r(t,o)},i};e.Path=r}).call(this)},454:function(t,e,n){(function(){var t=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;e.trim=function(t){return t?t.toString().replace(r,""):""};var o=function(t){return null==t&&void 0===t?String(t):{"[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(t)]};e.type=o,e.assertArray=function(t){if("array"!==o(t))throw"not array";return t};var i=function(t){if("object"!==o(t))throw"not object";return t};e.assertObject=i;var a=function(t,e,n){var r,o;return n||(n=[]),i(t),function(){var e;for(r in e=[],t)o=t[r],e.push([r,o]);return e}().reduce(e,n)};e.reduceMap=a,e.identity=function(t){return t};var u=function(){return Array.prototype.slice.call(arguments)};e.argsArray=u,e.mergeLists=function(){var e;return e=function(e,n){var r,o,i;for(r in o=t(!0,e),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},u.apply(null,arguments).reduce(e,{})},e.absoluteUrl=function(t,e){return e.match(/https?:\/\/./)?e:t+"/"+e},e.relativeUrl=function(t,e){return e.slice(e,t.length+1)===t+"/"?e.slice(t.length+1):e},e.resourceIdToUrl=function(t,e,n){return e=e.replace(/\/$/,""),(t=t.replace(/^\//,"")).indexOf("/")<0?e+"/"+n+"/"+t:0!==t.indexOf(e)?e+"/"+t:t};var s=function(t,e,n,r){var i;switch(o(n)){case"array":return e(n.map((function(e){return t(e,[n,r])})),r);case"object":return i=function(e,o){var i,a;return i=o[0],a=o[1],e[i]=t(a,[n].concat(r)),e},e(a(n,i,{}),r);default:return e(n,r)}};e.walk=s;var c=function(t,e,n){return e?s(c(t),t,e,n):function(e,n){return c(t,e,n)}};e.postwalk=c}).call(this)},651:(t,e,n)=>{!function(e){var n=function(t){return o(!0===t,!1,arguments)};function r(t,e){if("object"!==i(t))return e;for(var n in e)"object"===i(t[n])&&"object"===i(e[n])?t[n]=r(t[n],e[n]):t[n]=e[n];return t}function o(t,e,o){var a=o[0],u=o.length;(t||"object"!==i(a))&&(a={});for(var s=0;s<u;++s){var c=o[s];if("object"===i(c))for(var l in c)if("__proto__"!==l){var f=t?n.clone(c[l]):c[l];a[l]=e?r(a[l],f):f}}return a}function i(t){return{}.toString.call(t).slice(8,-1).toLowerCase()}n.recursive=function(t){return o(!0===t,!0,arguments)},n.clone=function(t){var e,r,o=t,a=i(t);if("array"===a)for(o=[],r=t.length,e=0;e<r;++e)o[e]=n.clone(t[e]);else if("object"===a)for(e in o={},t)o[e]=n.clone(t[e]);return o},e?t.exports=n:window.merge=n}((t=n.nmd(t))&&"object"==typeof t.exports&&t.exports)},602:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new A(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=l(t,e,n);if("normal"===s.type){if(r=n.done?d:h,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=d,n.method="throw",n.arg=s.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function g(){}function m(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,i)&&(b=_);var x=m.prototype=y.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(o,i,a,u){var s=l(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function P(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return g.prototype=m,s(x,"constructor",m),s(m,"constructor",g),g.displayName=s(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},S(E.prototype),s(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(x),s(x,u,"Generator"),s(x,i,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},385:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=[];function r(t){for(var e=[],r=0;r<n.length;r++)n[r]===t?t=null:e.push(n[r]);n=e}function o(r,o,i){e=o?r:t(t({},e),r);for(var a=n,u=0;u<a.length;u++)a[u](e,i)}return e=e||{},{action:function(t){function n(e){o(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:o,subscribe:function(t){return n.push(t),function(){r(t)}},unsubscribe:r,getState:function(){return e}}},n=function(t,n){var r=c[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return c[t]={value:o,active:!0},o},i=function(t,n){var r=c[t];if(!r){var o=e(n);return c[t]={value:o,active:!1},o}return r.value},a=function(t){return n("app",t)},u=function(){return i("app",{})},s=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return s}});var c={}}(),o}())}}}))},968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:t=>{"use strict";t.exports=r},254:t=>{"use strict";t.exports=o}},i={};function a(e){var n=i[e];if(void 0!==n)return n.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return t[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.y=e,a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})();var u={};return(0,a(968).s)(1),(()=>{"use strict";a.r(u),a.d(u,{OpenmrsFetchError:()=>nt,VisitMode:()=>Bt,VisitStatus:()=>Ft,backendDependencies:()=>qt,clearCurrentUser:()=>pt,defaultVisitCustomRepresentation:()=>$t,fetchCurrentPatient:()=>_t,fhir:()=>ot,fhirBaseUrl:()=>rt,getCurrentUser:()=>lt,getLocations:()=>Kt,getLoggedInUser:()=>vt,getSessionLocation:()=>yt,getSessionStore:()=>ft,getStartedVisit:()=>Ht,getVisitTypes:()=>zt,getVisitsForPatient:()=>Mt,makeUrl:()=>Q,openmrsFetch:()=>tt,openmrsObservableFetch:()=>et,refetchCurrentUser:()=>ht,saveVisit:()=>Nt,sessionEndpoint:()=>J,setSessionLocation:()=>gt,setupApiModule:()=>bt,toLocationObject:()=>Gt,toVisitTypeObject:()=>Vt,updateVisit:()=>Ut,userHasAccess:()=>dt});var t=a(602),e=a.n(t),r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function i(t){return"function"==typeof t}var s=!1,c={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,s=t},get useDeprecatedSynchronousErrorHandling(){return s}};function l(t){setTimeout((function(){throw t}),0)}var f={closed:!0,next:function(t){},error:function(t){if(c.useDeprecatedSynchronousErrorHandling)throw t;l(t)},complete:function(){}},h=Array.isArray||function(t){return t&&"number"==typeof t.length},p=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}(),d=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n,r=this,o=r._parentOrParents,a=r._ctorUnsubscribe,u=r._unsubscribe,s=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,o instanceof t)o.remove(this);else if(null!==o)for(var c=0;c<o.length;++c)o[c].remove(this);if(i(u)){a&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof p?v(t.errors):[t]}}if(h(s)){c=-1;for(var l=s.length;++c<l;){var f=s[c];if(null!==(n=f)&&"object"==typeof n)try{f.unsubscribe()}catch(t){e=e||[],t instanceof p?e=e.concat(v(t.errors)):e.push(t)}}}if(e)throw new p(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof t){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();function v(t){return t.reduce((function(t,e){return t.concat(e instanceof p?e.errors:e)}),[])}var y="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),g=function(t){function e(n,r,o){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=f;break;case 1:if(!n){i.destination=f;break}if("object"==typeof n){n instanceof e?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new m(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new m(i,n,r,o)}return i}return o(e,t),e.prototype[y]=function(){return this},e.create=function(t,n,r){var o=new e(t,n,r);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(d),m=function(t){function e(e,n,r,o){var a,u=t.call(this)||this;u._parentSubscriber=e;var s=u;return i(n)?a=n:n&&(a=n.next,r=n.error,o=n.complete,n!==f&&(i((s=Object.create(n)).unsubscribe)&&u.add(s.unsubscribe.bind(s)),s.unsubscribe=u.unsubscribe.bind(u))),u._context=s,u._next=a,u._error=r,u._complete=o,u}return o(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;c.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=c.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):l(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;l(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};c.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),c.useDeprecatedSynchronousErrorHandling)throw t;l(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!c.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return c.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(l(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(g),b="function"==typeof Symbol&&Symbol.observable||"@@observable";function w(t){return t}function _(t){return 0===t.length?w:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var x=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,o=function(t,e,n){if(t){if(t instanceof g)return t;if(t[y])return t[y]()}return t||e||n?new g(t,e,n):new g(f)}(t,e,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||c.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),c.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){c.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,r=e.destination,o=e.isStopped;if(n||o)return!1;t=r&&r instanceof g?r:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=S(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[b]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:_(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=S(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function S(t){if(t||(t=c.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const E="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var O="object"==typeof self&&self&&self.Object===Object&&self;const j=(E||O||Function("return this")()).Symbol;var C=Object.prototype,A=C.hasOwnProperty,P=C.toString,k=j?j.toStringTag:void 0,I=Object.prototype.toString,T=j?j.toStringTag:void 0;const R=(L=Object.getPrototypeOf,D=Object,function(t){return L(D(t))});var L,D,$=Function.prototype,M=Object.prototype,N=$.toString,U=M.hasOwnProperty,B=N.call(Object);const F=function(t){if(!function(t){return null!=t&&"object"==typeof t}(t)||"[object Object]"!=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":T&&T in Object(t)?function(t){var e=A.call(t,k),n=t[k];try{t[k]=void 0;var r=!0}catch(t){}var o=P.call(t);return r&&(e?t[k]=n:delete t[k]),o}(t):function(t){return I.call(t)}(t)}(t))return!1;var e=R(t);if(null===e)return!0;var n=U.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&N.call(n)==B};var H=a(824);function V(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function z(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){V(i,r,o,a,u,"next",t)}function u(t){V(i,r,o,a,u,"throw",t)}a(void 0)}))}}function G(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function K(t,e,n){return K=G()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&W(o,n.prototype),o},K.apply(null,arguments)}function q(t){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},q(t)}function Z(t,e){return!e||"object"!==Y(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function W(t,e){return W=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},W(t,e)}var Y=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function X(t){var e="function"==typeof Map?new Map:void 0;return X=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return K(t,arguments,q(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),W(r,t)},X(t)}var J="/ws/rest/v1/session";function Q(t){return window.openmrsBase+t}function tt(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof n)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.");var r=Q(t);n.headers||(n.headers={}),F(n.body)&&(n.body=JSON.stringify(n.body)),void 0===n.headers.Accept&&(n.headers.Accept="application/json"),null===n.headers.Accept&&delete n.headers.Accept;var o,i=Error();return window.fetch(r,n).then((o=z(e().mark((function t(n){var o,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o=n).ok){t.next=10;break}if(204!==o.status){t.next=7;break}return o.data=null,t.abrupt("return",o);case 7:return t.abrupt("return",o.text().then((function(t){try{t&&(o.data=JSON.parse(t))}catch(t){}return o})));case 8:t.next=19;break;case 10:return t.next=12,(0,H.getConfig)("@openmrs/esm-api");case 12:if(a=t.sent.redirectAuthFailure,!(r===Q(J)&&403===o.status||a.enabled&&a.errors.includes(o.status))){t.next=18;break}return(0,H.navigate)({to:a.url}),t.abrupt("return",a.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return t.abrupt("return",o.text().then((function(t){var e=t;try{e=JSON.parse(t)}catch(t){}throw new nt(r,o,e,i)}),(function(t){throw new nt(r,o,null,i)})));case 19:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)}))}function et(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof e)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return e.signal=n.signal,new x((function(r){var o=!1;return tt(t,e).then((function(t){o=!0,r.next(t),r.complete()}),(function(t){o=!0,r.error(t)})),function(){o||n.abort()}}))}var nt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&W(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=q(e);if(n){var o=q(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Z(this,t)});function o(t,e,n,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(a=r.call(this)).message="Server responded with ".concat(e.status," (").concat(e.statusText,") for url ").concat(t,". Check err.responseBody or network tab in dev tools for more info"),i.message=a.message,a.responseBody=n,a.response=e,a.stack="Stacktrace for outgoing request:\n".concat(i.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return o}(X(Error)),rt="/ws/fhir2/R4",ot=a(256)({baseUrl:rt},{http:function(t){return tt(t.url,{method:t.method,headers:t.headers}).then((function(e){return{status:e.status,headers:e.headers,data:e.data,config:t}}),(function(e){return{status:e.response.status,headers:e.response.headers,data:e.responseBody,config:t}}))}}),it=a(254);function at(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function ut(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){at(i,r,o,a,u,"next",t)}function u(t){at(i,r,o,a,u,"throw",t)}a(void 0)}))}}var st=(0,a(385).createGlobalStore)("session",{loaded:!1,session:null}),ct=0;function lt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(ct<Date.now()-6e4||!st.getState().loaded)&&ht(),new x((function(e){var n=function(n){var r;n.loaded&&(t.includeAuthStatus?e.next(n.session):e.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(st.getState()),st.subscribe(n)}))}function ft(){return(ct<Date.now()-6e4||!st.getState().loaded)&&ht(),st}function ht(){return new Promise((function(t,e){ct=Date.now(),tt(J).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return e(),Promise.reject();var r,o,i,a,u;(u=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",u),t(n.data),st.setState({loaded:!0,session:n.data})})).catch((function(t){return(0,it.reportError)("Failed to fetch new session information: ".concat(t)),e(t),{sessionId:"",authenticated:!1}}))}))}function pt(){st.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function dt(t,e){return function(t,e){return e.privileges.find((function(e){return t===e.display}))}(t,e)||function(t){return t.roles.find((function(t){return"System Developer"===t.display}))}(e)}function vt(){var t,e;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(t=r.session.user,n(r.session.user),e&&e())};o(st.getState()),t||(e=st.subscribe(o))}))}function yt(){return new Promise((function(t,e){var n=lt().subscribe((function(e){t(e.sessionLocation),n.unsubscribe()}),e)}))}function gt(t,e){return mt.apply(this,arguments)}function mt(){return(mt=ut(e().mark((function t(n,r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,tt(J,{method:"POST",body:{sessionLocation:n},headers:{"Content-Type":"application/json"},signal:r.signal});case 2:ht();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function bt(){(0,H.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:H.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:H.Type.String,_default:"${openmrsSpaBase}/login",_validators:[H.validators.isUrl]},errors:{_type:H.Type.Array,_default:[401],_elements:{_type:H.Type.Number,_validators:[H.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:H.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."}}}),ht()}function wt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _t(t,e){return t?ot.read(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){wt(t,e,n[e])}))}return t}({type:"Patient",patient:t},e)):Promise.resolve(null)}var xt=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}(),St=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return o(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(d),Et=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return o(e,t),e}(g),Ot=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return o(e,t),e.prototype[y]=function(){return new Et(this)},e.prototype.lift=function(t){var e=new jt(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new xt;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new xt;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new xt;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new xt;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new xt;return this.hasError?(t.error(this.thrownError),d.EMPTY):this.isStopped?(t.complete(),d.EMPTY):(this.observers.push(t),new St(this,t))},e.prototype.asObservable=function(){var t=new x;return t.source=this,t},e.create=function(t,e){return new jt(t,e)},e}(x),jt=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return o(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):d.EMPTY},e}(Ot),Ct=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return o(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new xt;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(Ot),At=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}(),Pt=new x((function(t){return t.complete()}));function kt(t){return function(e){return 0===t?Pt:e.lift(new It(t))}}var It=function(){function t(t){if(this.total=t,this.total<0)throw new At}return t.prototype.call=function(t,e){return e.subscribe(new Tt(t,this.total))},t}(),Tt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return o(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(g);function Rt(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Lt(t,e))}}var Lt=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Dt(t,this.project,this.thisArg))},t}(),Dt=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return o(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(g),$t="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 Mt(t,e,n){var r=null!=n?n:$t;return et("/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(r),{signal:e.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(kt(1)).pipe(Rt((function(t){return t})))}function Nt(t,e){return et("/ws/rest/v1/visit",{signal:e.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function Ut(t,e,n){return et("/ws/rest/v1/visit/".concat(t),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}var Bt,Ft,Ht=new Ct(null);function Vt(t){return{uuid:t.uuid,display:t.display,name:t.name}}function zt(){return et("/ws/rest/v1/visittype").pipe(Rt((function(t){return t.data.results.map(Vt)}))).pipe(kt(1))}function Gt(t){return{uuid:t.uuid,display:t.display}}function Kt(){return et("/ws/rest/v1/location").pipe(Rt((function(t){return t.data.results.map(Gt)}))).pipe(kt(1))}!function(t){t.NEWVISIT="startVisit",t.EDITVISIT="editVisit",t.LOADING="loadingVisit"}(Bt||(Bt={})),function(t){t.NOTSTARTED="notStarted",t.ONGOING="ongoing"}(Ft||(Ft={}));var qt={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}})(),u})())}}}))},6560:()=>{System.register(["@openmrs/esm-state"],(function(t,e){var n={};return{setters:[function(t){n.createGlobalStore=t.createGlobalStore}],execute:function(){t((()=>{var t={968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:t=>{"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})();var i={};return(0,o(968).s)(1),(()=>{"use strict";function t(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function e(t){return t&&t.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,u=o.start,s=void 0===u||u,c=o.end,l=void 0===c||c,f=o.encode,h=void 0===f?function(t){return t}:f,p="["+t(o.endsWith||"")+"]|$",d="["+t(o.delimiter||"/#?")+"]",v=s?"^":"",y=0,g=n;y<g.length;y++){var m=g[y];if("string"==typeof m)v+=t(h(m));else{var b=t(h(m.prefix)),w=t(h(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+=d+"?"),v+=o.endsWith?"(?="+p+")":"$";else{var x=n[n.length-1],S="string"==typeof x?d.indexOf(x[x.length-1])>-1:void 0===x;a||(v+="(?:"+d+"(?="+p+"))?"),S||(v+="(?="+d+"|"+p+")")}return new RegExp(v,e(o))}(function(e,n){void 0===n&&(n={});for(var r=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var o=1,i="";if("?"===t[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<t.length;)if("\\"!==t[u]){if(")"===t[u]){if(0==--o){u++;break}}else if("("===t[u]&&(o++,"?"!==t[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=t[u++]}else i+=t[u++]+t[u++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);e.push({type:"PATTERN",index:n,value:i}),n=u}else{for(var a="",u=n+1;u<t.length;){var s=t.charCodeAt(u);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=t[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);e.push({type:"NAME",index:n,value:a}),n=u}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(e),o=n.prefixes,i=void 0===o?"./":o,a="[^"+t(n.delimiter||"/#?")+"]+?",u=[],s=0,c=0,l="",f=function(t){if(c<r.length&&r[c].type===t)return r[c++].value},h=function(t){var e=f(t);if(void 0!==e)return e;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+t)},p=function(){for(var t,e="";t=f("CHAR")||f("ESCAPED_CHAR");)e+=t;return e};c<r.length;){var d=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var g=d||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(u.push(l),l=""),u.push({name:v||s++,prefix:g,suffix:"",pattern:y||a,modifier:f("MODIFIER")||""})}else{var m=d||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(u.push(l),l=""),f("OPEN")){g=p();var b=f("NAME")||"",w=f("PATTERN")||"",_=p();h("CLOSE"),u.push({name:b||(w?s++:""),pattern:b&&!w?a:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else h("END")}}return u}(n,o),r,o)}function r(t,o,i){return t instanceof RegExp?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return t}(t,o):Array.isArray(t)?function(t,n,o){var i=t.map((function(t){return r(t,n,o).source}));return new RegExp("(?:"+i.join("|")+")",e(o))}(t,o,i):n(t,o,i)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}o.r(i),o.d(i,{filterBreadcrumbs:()=>v,getBreadcrumbs:()=>h,getBreadcrumbsFor:()=>y,registerBreadcrumb:()=>l,registerBreadcrumbs:()=>f});var s=(0,o(685).createGlobalStore)("breadcrumbs",[]);function c(t){return e=t.matcher,(null!=(n=RegExp)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](e):e instanceof n)?t.matcher:"string"==typeof t.matcher?r(t.matcher):r(t.path);var e,n}function l(t){return f([t])}function f(t){var e=h(),n=t.map((function(t){return{matcher:c(t),settings:t}})),r=u(e).concat(u(n));s.setState(r,!0)}function h(){return s.getState()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){if(e)return function(t,e){return(n=t.filter((function(t){return t.matcher.test(e)})),function(t){if(Array.isArray(t))return t}(n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(t,e){if(t){if("string"==typeof t)return p(t,1);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,1):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];var n}(t,e)||function(t,e){for(var n=e.split("/");n.length>1;){n.pop();var r=d(t,n.join("/"));if(r)return r}}(t,e)}function v(t,e){if(t.length>0){var n=d(t,e);if(n){for(var r=[n],o=d(t,n.settings.parent);void 0!==o;)r.push(o),o=d(t,o.settings.parent);return r.reverse()}}return[]}function y(t){return v(h(),t)}})(),i})())}}}))},7538:()=>{System.register(["@openmrs/esm-state","single-spa"],(function(t,e){var n={},r={};return{setters:[function(t){n.createGlobalStore=t.createGlobalStore,n.getGlobalStore=t.getGlobalStore},function(t){r.navigateToUrl=t.navigateToUrl}],execute:function(){t((()=>{"use strict";var t={685:t=>{t.exports=n},645:t=>{t.exports=r}},e={};function o(n){var r=e[n];if(void 0!==r)return r.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,o),i.exports}o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{function t(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}function e(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}}function n(n){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:e((function(t){return n(o,t)}));default:return t(o)&&t(i)?r:t(o)?e((function(t){return n(t,i)})):t(i)?e((function(t){return n(o,t)})):n(o,i)}}}function r(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function a(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1}function u(t,e){return Object.prototype.hasOwnProperty.call(e,t)}o.r(i),o.d(i,{Type:()=>M,configExtensionStore:()=>X,configInternalStore:()=>q,defineConfigSchema:()=>yt,defineExtensionConfigSchema:()=>gt,getConfig:()=>bt,getConfigStore:()=>J,getExtensionConfig:()=>rt,getExtensionConfigFromStore:()=>ot,getExtensionSlotConfig:()=>tt,getExtensionSlotConfigFromStore:()=>et,getExtensionSlotsConfigStore:()=>Q,getExtensionsConfigStore:()=>nt,implementerToolsConfigStore:()=>it,inRange:()=>Ht,interpolateString:()=>Bt,interpolateUrl:()=>Ut,isUrl:()=>zt,isUrlWithTemplateParameters:()=>Vt,navigate:()=>Ft,oneOf:()=>Gt,processConfig:()=>wt,provide:()=>mt,temporaryConfigStore:()=>Y,validator:()=>N,validators:()=>Kt});const s="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};var c=Object.prototype.toString,l=function(){return"[object Arguments]"===c.call(arguments)?function(t){return"[object Arguments]"===c.call(t)}:function(t){return u("callee",t)}}();const f=l;var h=!{toString:null}.propertyIsEnumerable("toString"),p=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],d=function(){return arguments.propertyIsEnumerable("length")}(),v=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1};const y="function"!=typeof Object.keys||d?e((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=d&&f(t);for(e in t)!u(e,t)||o&&"length"===e||(r[r.length]=e);if(h)for(n=p.length-1;n>=0;)u(e=p[n],t)&&!v(r,e)&&(r[r.length]=e),n-=1;return r})):e((function(t){return Object(t)!==t?[]:Object.keys(t)})),g=e((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function m(t,e,n,o){var i=r(t);function u(t,e){return b(t,e,n.slice(),o.slice())}return!a((function(t,e){return!a(u,e,t)}),r(e),i)}function b(t,e,n,r){if(s(t,e))return!0;var o,i,a=g(t);if(a!==g(e))return!1;if(null==t||null==e)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof e["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof e.equals)return"function"==typeof t.equals&&t.equals(e)&&"function"==typeof e.equals&&e.equals(t);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(o=t.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return t===e;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof e||!s(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!s(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var c=n.length-1;c>=0;){if(n[c]===t)return r[c]===e;c-=1}switch(a){case"Map":return t.size===e.size&&m(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&m(t.values(),e.values(),n.concat([t]),r.concat([e]));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 l=y(t);if(l.length!==y(e).length)return!1;var f=n.concat([t]),h=r.concat([e]);for(c=l.length-1;c>=0;){var p=l[c];if(!u(p,e)||!b(e[p],t[p],f,h))return!1;c-=1}return!0}const w=n((function(t,e){return b(t,e,[],[])}));function _(t,e,n,r){var o,i=function(o){for(var i=e.length,a=0;a<i;){if(t===e[a])return n[a];a+=1}for(var u in e[a+1]=t,n[a+1]=o,t)o[u]=r?_(t[u],e,n,!0):t[u];return o};switch(g(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}const x=e((function(t){return null!=t&&"function"==typeof t.clone?t.clone():_(t,[],[],!0)}));function S(r){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:n((function(t,e){return r(i,t,e)}));case 2:return t(i)&&t(a)?o:t(i)?n((function(t,e){return r(t,a,e)})):t(a)?n((function(t,e){return r(i,t,e)})):e((function(t){return r(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?n((function(t,e){return r(t,e,u)})):t(i)&&t(u)?n((function(t,e){return r(t,a,e)})):t(a)&&t(u)?n((function(t,e){return r(i,t,e)})):t(i)?e((function(t){return r(t,a,u)})):t(a)?e((function(t){return r(i,t,u)})):t(u)?e((function(t){return r(i,a,t)})):r(i,a,u)}}}const E=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},O=e((function(t){return!!E(t)||!!t&&"object"==typeof t&&!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))}));var j=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),C=n((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,a){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,a,u){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,a,u,s){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,a,u,s,c){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,a,u,s,c,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))}));const A=C;function P(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)}function k(t,e,n,r){return t["@@transducer/result"](n[r](A(t["@@transducer/step"],t),e))}var I="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";const T=S((function(t,e,n){if("function"==typeof t&&(t=function(t){return new j(t)}(t)),O(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return k(t,e,n,"fantasy-land/reduce");if(null!=n[I])return P(t,e,n[I]());if("function"==typeof n.next)return P(t,e,n);if("function"==typeof n.reduce)return k(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));function R(t){return"[object Object]"===Object.prototype.toString.call(t)}const L=S((function(t,e,n){var r,o={};for(r in e)u(r,e)&&(o[r]=u(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)u(r,n)&&!u(r,o)&&(o[r]=n[r]);return o})),D=S((function t(e,n,r){return L((function(n,r,o){return R(r)&&R(o)?t(e,r,o):e(n,r,o)}),n,r)})),$=n((function(t,e){return D((function(t,e,n){return n}),t,e)}));var M;function N(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}}!function(t){t.Array="Array",t.Boolean="Boolean",t.ConceptUuid="ConceptUuid",t.Number="Number",t.Object="Object",t.String="String",t.UUID="UUID",t.PersonAttributeTypeUuid="PersonAttributeTypeUuid",t.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(M||(M={}));var U=N((function(t){return Array.isArray(t)}),"must be an array"),B=N((function(t){return"boolean"==typeof t}),"must be a boolean"),F=N((function(t){return"number"==typeof t}),"must be a number"),H=N((function(t){return"string"==typeof t}),"must be a string"),V=N((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),z=N((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),G=o(685),K={providedConfigs:[],schemas:{},devDefaultsAreOn:W()},q=(0,G.createGlobalStore)("config-internal",K),Z=W();function W(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}}q.subscribe((function(t){var e;t.devDefaultsAreOn!=Z&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Z=t.devDefaultsAreOn)}));var Y=(0,G.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Y.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var X=(0,G.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function J(t){return(0,G.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})}function Q(){return(0,G.getGlobalStore)("config-extension-slots",{slots:{}})}function tt(t){return et(Q().getState(),t)}function et(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}}function nt(){return(0,G.getGlobalStore)("config-extensions",{configs:{}})}function rt(t,e){return ot(nt().getState(),t,e)}function ot(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}}var it=(0,G.createGlobalStore)("config-implementer-tools",{config:{}});function at(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ut(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function st(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){ut(t,e,n[e])}))}return t}function ct(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||ft(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lt(t){return function(t){if(Array.isArray(t))return at(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ft(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ft(t,e){if(t){if("string"==typeof t)return at(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?at(t,e):void 0}}function ht(t,e){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=Ct(u,t,e);J(u).setState({loaded:!0,config:s})}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}function pt(t,e){var n,r,o=(n=Pt(Ot(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=ct(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var h,p=Object.entries(s)[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var d=ct(h.value,2),v=d[0];Et(d[1],u,v)}}catch(t){l=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return st({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=ct(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),a=Q(),u=a.getState(),s={slots:st({},u.slots,i)};w(u,s)||a.setState(s)}function dt(t,e){var n=function(t,e){var n=xt(x(t.schemas)),r=lt(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=ct(u.value,2);n=Pt([n,St(c[0],c[1])])}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(t,e);it.setState({config:n})}function vt(t,e,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=e.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=_t(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,t,n);r[c.slotName]=st({},r[c.slotName],ut({},c.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}nt().setState({configs:r})}function yt(t,e){jt(t,e);var n=q.getState();q.setState({schemas:st({},n.schemas,ut({},t,e))})}function gt(t,e){jt(t,e);var n=q.getState();n.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),q.setState({schemas:st({},n.schemas,ut({},t,e))})}function mt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=q.getState();q.setState({providedConfigs:lt(n.providedConfigs).concat([{source:e,config:t}])})}function bt(t){return new Promise((function(e){var n=function(t){t.loaded&&t.config&&(e(t.config),o&&o())},r=J(t);n(r.getState());var o=r.subscribe(n)}))}function wt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];kt(t,e,n);var o=Dt(t,e,r);return Tt(t,o,n),o}function _t(t,e,n,r,o,i){var a,u,s,c,l=function(t){return ct(t.split("#"),1)[0]}(r),f=o.schemas[l],h=f?l:e,p=Ot(o,i),d=At(t,p),v=null!==(c=null==d||null===(a=d.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},y=Pt([At(h,p),v]),g=null!=f?f:o.schemas[e];kt(g,y,h);var m=Dt(g,y,o.devDefaultsAreOn);return Tt(g,m,h),delete m.extensionSlots,m}function xt(t){return t.hasOwnProperty("_default")?st({},t,{_value:t._default,_source:"default"}):Mt(t)?Object.keys(t).reduce((function(e,n){return e[n]=xt(t[n]),e}),{}):{}}function St(t,e){return Mt(t)?Object.keys(t).reduce((function(n,r){return n[r]=St(t[r],e),n}),{}):{_value:t,_source:e}}function Et(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(Mt(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function Ot(t,e){return lt(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])}function jt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,s=function(o,i){var a=i.value,u=n+(n&&".")+a,s=e[a];if(!Mt(s))return console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";s.hasOwnProperty("_default")||jt(t,s,u);var c=s._elements;if($t(c)&&jt(t,c,u+"._elements"),s._validators){var l=!0,f=!1,h=void 0;try{for(var p,d=s._validators[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}}var y=s._type;y&&!Object.values(M).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(M).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(s).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(s))),c&&y&&![M.Array,M.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s(c,u)}catch(t){i=!0,a=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Ct(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=At(t,Ot(e,n));kt(r,o,t);var i=Dt(r,o,e.devDefaultsAreOn);return Tt(r,i,t),delete i.extensionSlots,i}function At(t,e){return Pt(e.map((function(e){return e[t]})).filter((function(t){return!!t})))}function Pt(t){return T($)({},t)}function kt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s],l=n+"."+s,f=t[s];t.hasOwnProperty(s)?It(f,c,l):"extensionSlots"===s&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}function It(t,e,n){Rt(n,t._type,e),Mt(e)?t._type===M.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s];kt(t._elements,c,"".concat(n,".").concat(s))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||kt(t,e,n):t._type===M.Array&&function(t,e,n){if($t(t._elements))for(var r=0;r<e.length;r++)It(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;Rt("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function Tt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&Lt(n,t._validators,e),Mt(e)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s],l=n+"."+s,f=t[s];t._type===M.Object&&t._elements?Tt(t._elements,c,l):Tt(f,c,l)}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)Tt(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}function Rt(t,e,n){e&&Lt(t,[{Array:U,Boolean:B,ConceptUuid:z,Number:F,Object:V,String:H,UUID:z,PersonAttributeTypeUuid:z,PatientIdentifierTypeUuid:z}[e]],n)}function Lt(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=(0,a.value)(n);"string"==typeof s&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(s)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(s)))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}}ht(q.getState(),Y.getState()),q.subscribe((function(t){return ht(t,Y.getState())})),Y.subscribe((function(t){return ht(q.getState(),t)})),dt(q.getState(),Y.getState()),q.subscribe((function(t){return dt(t,Y.getState())})),Y.subscribe((function(t){return dt(q.getState(),t)})),pt(q.getState(),Y.getState()),q.subscribe((function(t){return pt(t,Y.getState())})),Y.subscribe((function(t){return pt(q.getState(),t)})),vt(q.getState(),X.getState(),Y.getState()),q.subscribe((function(t){vt(t,X.getState(),Y.getState())})),X.subscribe((function(t){vt(q.getState(),t,Y.getState())})),Y.subscribe((function(t){vt(q.getState(),X.getState(),t)}));var Dt=function(t,e,n){var r=x(e);if(!t)return r;var o=!0,i=!1,a=void 0;try{for(var u,s=function(e,o){var i=o.value,a=r[i],u=t[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var s=u._devDefault||u._default;r[i]=n?s:u._default}var c=u._elements;if(a&&$t(c))if(u._type===M.Array&&Array.isArray(a)){var l=a.map((function(t){return Dt(c,t,n)}));r[i]=l}else if(u._type===M.Object){var f=!0,h=!1,p=void 0;try{for(var d,v=Object.keys(a)[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){var y=d.value;a[y]=Dt(c,a[y],n)}}catch(t){h=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw p}}}}else if(Mt(u)){var g=r.hasOwnProperty(i)?a:{};Mt(g)&&(r[i]=Dt(u,g,n))}},c=Object.keys(t)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s(0,u)}catch(t){i=!0,a=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return r};function $t(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0}function Mt(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}var Nt=o(645);function Ut(t){var e=window.getOpenmrsSpaBase().replace(/\/$/,"");return Bt(t,{openmrsBase:window.openmrsBase,openmrsSpaBase:e}).replace(/^\/\//,"/")}function Bt(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)}function Ft(t){var e=t.to,n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=Ut(e);r.startsWith(n)?(0,Nt.navigateToUrl)(r):window.location.assign(r)}var Ht=function(t,e){return N((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},Vt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return N((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},zt=Vt([]),Gt=function(t){return N((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Kt={inRange:Ht,isUrl:zt,isUrlWithTemplateParameters:Vt,oneOf:Gt}})(),i})())}}}))},2041:()=>{System.register(["@openmrs/esm-globals"],(function(t,e){var n={};return{setters:[function(t){n.dispatchNotificationShown=t.dispatchNotificationShown}],execute:function(){t((()=>{var t={968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:t=>{"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})();var i={};return(0,o(968).s)(1),(()=>{"use strict";o.r(i),o.d(i,{createErrorHandler:()=>n,reportError:()=>e});var t=o(728);function e(t){var e=r(t);setTimeout((function(){throw e}))}function n(){var t=Error();return function(n){r(n).stack+="\nAsync stacktrace:\n".concat(t.stack),e(n)}}function r(t){var e,n,r;if(n=t,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)return t;if(null===t)return Error("'null' was thrown as an error");if("object"==typeof t){try{e="Object thrown as error: ".concat(JSON.stringify(t))}catch(n){e="Object thrown as error with the following properties: ".concat(Object.keys(t))}return Error(e)}return void 0===t?Error("'undefined' was thrown as an error"):Error(t.toString())}window.onerror=function(){return(0,t.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,t.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}})(),i})())}}}))},8282:(t,e,n)=>{t=n.nmd(t),System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(r,o){var i={},a={},u={};return{setters:[function(t){i.configExtensionStore=t.configExtensionStore,i.getExtensionConfigFromStore=t.getExtensionConfigFromStore,i.getExtensionSlotConfig=t.getExtensionSlotConfig,i.getExtensionSlotConfigFromStore=t.getExtensionSlotConfigFromStore,i.getExtensionSlotsConfigStore=t.getExtensionSlotsConfigStore,i.getExtensionsConfigStore=t.getExtensionsConfigStore},function(t){a.createGlobalStore=t.createGlobalStore,a.getGlobalStore=t.getGlobalStore},function(t){u.mountRootParcel=t.mountRootParcel}],execute:function(){r((()=>{var r={968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:t=>{"use strict";t.exports=i},685:t=>{"use strict";t.exports=a},645:t=>{"use strict";t.exports=u}},s={};function c(t){var e=s[t];if(void 0!==e)return e.exports;var n=s[t]={exports:{}};return r[t](n,n.exports,c),n.exports}c.y=o,c.d=(t,e)=>{for(var n in e)c.o(e,n)&&!c.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),c.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t})();var l={};return(0,c(968).s)(1),(()=>{"use strict";c.r(l),c.d(l,{attach:()=>je,checkStatus:()=>De,checkStatusFor:()=>$e,detach:()=>Ce,detachAll:()=>Ae,extensionStore:()=>Ge,getAssignedExtensions:()=>Te,getConnectedExtensions:()=>ke,getCustomProps:()=>Me,getExtensionInternalStore:()=>ae,getExtensionNameFromId:()=>xe,getExtensionRegistration:()=>Ee,getExtensionRegistrationFrom:()=>Se,getExtensionStore:()=>se,registerExtension:()=>Oe,registerExtensionSlot:()=>Re,renderExtension:()=>ze,reset:()=>Le,updateInternalExtensionStore:()=>ue});const r=function(t,e){return t===e||t!=t&&e!=e},o=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1};var i=Array.prototype.splice;function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(t){var e=this.__data__,n=o(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))},a.prototype.get=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]},a.prototype.has=function(t){return o(this.__data__,t)>-1},a.prototype.set=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};const u=a,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var f="object"==typeof self&&self&&self.Object===Object&&self;const h=s||f||Function("return this")(),p=h.Symbol;var d=Object.prototype,v=d.hasOwnProperty,y=d.toString,g=p?p.toStringTag:void 0,m=Object.prototype.toString,b=p?p.toStringTag:void 0;const w=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":b&&b in Object(t)?function(t){var e=v.call(t,g),n=t[g];try{t[g]=void 0;var r=!0}catch(t){}var o=y.call(t);return r&&(e?t[g]=n:delete t[g]),o}(t):function(t){return m.call(t)}(t)},_=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},x=function(t){if(!_(t))return!1;var e=w(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},S=h["__core-js_shared__"];var E,O=(E=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",j=Function.prototype.toString;const C=function(t){if(null!=t){try{return j.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var A=/^\[object .+?Constructor\]$/,P=Function.prototype,k=Object.prototype,I=P.toString,T=k.hasOwnProperty,R=RegExp("^"+I.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const L=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!_(t)||(e=t,O&&O in e))&&(x(t)?R:A).test(C(t));var e}(n)?n:void 0},D=L(h,"Map"),$=L(Object,"create");var M=Object.prototype.hasOwnProperty,N=Object.prototype.hasOwnProperty;function U(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}U.prototype.clear=function(){this.__data__=$?$(null):{},this.size=0},U.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},U.prototype.get=function(t){var e=this.__data__;if($){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return M.call(e,t)?e[t]:void 0},U.prototype.has=function(t){var e=this.__data__;return $?void 0!==e[t]:N.call(e,t)},U.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=$&&void 0===e?"__lodash_hash_undefined__":e,this};const B=U,F=function(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map};function H(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}H.prototype.clear=function(){this.size=0,this.__data__={hash:new B,map:new(D||u),string:new B}},H.prototype.delete=function(t){var e=F(this,t).delete(t);return this.size-=e?1:0,e},H.prototype.get=function(t){return F(this,t).get(t)},H.prototype.has=function(t){return F(this,t).has(t)},H.prototype.set=function(t,e){var n=F(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};const V=H;function z(t){var e=this.__data__=new u(t);this.size=e.size}z.prototype.clear=function(){this.__data__=new u,this.size=0},z.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},z.prototype.get=function(t){return this.__data__.get(t)},z.prototype.has=function(t){return this.__data__.has(t)},z.prototype.set=function(t,e){var n=this.__data__;if(n instanceof u){var r=n.__data__;if(!D||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new V(r)}return n.set(t,e),this.size=n.size,this};const G=z;function K(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new V;++e<n;)this.add(t[e])}K.prototype.add=K.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},K.prototype.has=function(t){return this.__data__.has(t)};const q=K,Z=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},W=function(t,e,n,r,o,i){var a=1&n,u=t.length,s=e.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var f=-1,h=!0,p=2&n?new q:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var d=t[f],v=e[f];if(r)var y=a?r(v,d,f,e,t,i):r(d,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!Z(e,(function(t,e){if(a=e,!p.has(a)&&(d===t||o(d,t,n,r,i)))return p.push(e);var a}))){h=!1;break}}else if(d!==v&&!o(d,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},Y=h.Uint8Array,X=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},J=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n};var Q=p?p.prototype:void 0,tt=Q?Q.valueOf:void 0;const et=Array.isArray;var nt=Object.prototype.propertyIsEnumerable,rt=Object.getOwnPropertySymbols;const ot=rt?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a)&&(i[o++]=a)}return i}(rt(t),(function(e){return nt.call(t,e)})))}:function(){return[]},it=function(t){return null!=t&&"object"==typeof t},at=function(t){return it(t)&&"[object Arguments]"==w(t)};var ut=Object.prototype,st=ut.hasOwnProperty,ct=ut.propertyIsEnumerable,lt=at(function(){return arguments}())?at:function(t){return it(t)&&st.call(t,"callee")&&!ct.call(t,"callee")};const ft=lt;var ht=e&&!e.nodeType&&e,pt=ht&&t&&!t.nodeType&&t,dt=pt&&pt.exports===ht?h.Buffer:void 0;const vt=(dt?dt.isBuffer:void 0)||function(){return!1};var yt=/^(?:0|[1-9]\d*)$/;const gt=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e},mt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var bt={};bt["[object Float32Array]"]=bt["[object Float64Array]"]=bt["[object Int8Array]"]=bt["[object Int16Array]"]=bt["[object Int32Array]"]=bt["[object Uint8Array]"]=bt["[object Uint8ClampedArray]"]=bt["[object Uint16Array]"]=bt["[object Uint32Array]"]=!0,bt["[object Arguments]"]=bt["[object Array]"]=bt["[object ArrayBuffer]"]=bt["[object Boolean]"]=bt["[object DataView]"]=bt["[object Date]"]=bt["[object Error]"]=bt["[object Function]"]=bt["[object Map]"]=bt["[object Number]"]=bt["[object Object]"]=bt["[object RegExp]"]=bt["[object Set]"]=bt["[object String]"]=bt["[object WeakMap]"]=!1;var wt=e&&!e.nodeType&&e,_t=wt&&t&&!t.nodeType&&t,xt=_t&&_t.exports===wt&&s.process,St=function(){try{return _t&&_t.require&&_t.require("util").types||xt&&xt.binding&&xt.binding("util")}catch(t){}}(),Et=St&&St.isTypedArray;const Ot=Et?(jt=Et,function(t){return jt(t)}):function(t){return it(t)&&mt(t.length)&&!!bt[w(t)]};var jt,Ct=Object.prototype.hasOwnProperty,At=Object.prototype;const Pt=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object);var kt=Object.prototype.hasOwnProperty;const It=function(t){return null!=(e=t)&&mt(e.length)&&!x(e)?function(t,e){var n=et(t),r=!n&&ft(t),o=!n&&!r&&vt(t),i=!n&&!r&&!o&&Ot(t),a=n||r||o||i,u=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],s=u.length;for(var c in t)!Ct.call(t,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||gt(c,s))||u.push(c);return u}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||At))return Pt(t);var e,n,r=[];for(var o in Object(t))kt.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e},Tt=function(t){return function(t,e,n){var r=e(t);return et(t)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(t))}(t,It,ot)};var Rt=Object.prototype.hasOwnProperty;const Lt=L(h,"DataView"),Dt=L(h,"Promise"),$t=L(h,"Set"),Mt=L(h,"WeakMap");var Nt="[object Map]",Ut="[object Promise]",Bt="[object Set]",Ft="[object WeakMap]",Ht="[object DataView]",Vt=C(Lt),zt=C(D),Gt=C(Dt),Kt=C($t),qt=C(Mt),Zt=w;(Lt&&Zt(new Lt(new ArrayBuffer(1)))!=Ht||D&&Zt(new D)!=Nt||Dt&&Zt(Dt.resolve())!=Ut||$t&&Zt(new $t)!=Bt||Mt&&Zt(new Mt)!=Ft)&&(Zt=function(t){var e=w(t),n="[object Object]"==e?t.constructor:void 0,r=n?C(n):"";if(r)switch(r){case Vt:return Ht;case zt:return Nt;case Gt:return Ut;case Kt:return Bt;case qt:return Ft}return e});const Wt=Zt;var Yt="[object Arguments]",Xt="[object Array]",Jt="[object Object]",Qt=Object.prototype.hasOwnProperty;const te=function(t,e,n,o,i,a){var u=et(t),s=et(e),c=u?Xt:Wt(t),l=s?Xt:Wt(e),f=(c=c==Yt?Jt:c)==Jt,h=(l=l==Yt?Jt:l)==Jt,p=c==l;if(p&&vt(t)){if(!vt(e))return!1;u=!0,f=!1}if(p&&!f)return a||(a=new G),u||Ot(t)?W(t,e,n,o,i,a):function(t,e,n,o,i,a,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new Y(t),new Y(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=X;case"[object Set]":var c=1&o;if(s||(s=J),t.size!=e.size&&!c)return!1;var l=u.get(t);if(l)return l==e;o|=2,u.set(t,e);var f=W(s(t),s(e),o,i,a,u);return u.delete(t),f;case"[object Symbol]":if(tt)return tt.call(t)==tt.call(e)}return!1}(t,e,c,n,o,i,a);if(!(1&n)){var d=f&&Qt.call(t,"__wrapped__"),v=h&&Qt.call(e,"__wrapped__");if(d||v){var y=d?t.value():t,g=v?e.value():e;return a||(a=new G),i(y,g,n,o,a)}}return!!p&&(a||(a=new G),function(t,e,n,r,o,i){var a=1&n,u=Tt(t),s=u.length;if(s!=Tt(e).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in e:Rt.call(e,l)))return!1}var f=i.get(t),h=i.get(e);if(f&&h)return f==e&&h==t;var p=!0;i.set(t,e),i.set(e,t);for(var d=a;++c<s;){var v=t[l=u[c]],y=e[l];if(r)var g=a?r(y,v,l,e,t,i):r(v,y,l,t,e,i);if(!(void 0===g?v===y||o(v,y,n,r,i):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,o,i,a))},ee=function t(e,n,r,o,i){return e===n||(null==e||null==n||!it(e)&&!it(n)?e!=e&&n!=n:te(e,n,r,o,t,i))},ne=function(t,e){return ee(t,e)};var re=c(824),oe=c(685),ie=(0,oe.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),ae=function(){return(0,oe.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};function ue(t){var e=ie.getState(),n=t(e);n!==e&&ie.setState(n)}var se=function(){return(0,oe.getGlobalStore)("extensions",{slots:{}})};function ce(t){var e=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(t.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=!0,c=!1,l=void 0;try{for(var f,h=u.instances[Symbol.iterator]();!(s=(f=h.next()).done);s=!0){var p=f.value;e.push({slotModuleName:p.slotModuleName,extensionModuleName:u.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(t){c=!0,l=t}finally{try{s||null==h.return||h.return()}finally{if(c)throw l}}}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}ne(re.configExtensionStore.getState().mountedExtensions,e)||re.configExtensionStore.setState({mountedExtensions:e})}function le(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function fe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function he(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){fe(t,e,n[e])}))}return t}function pe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||ve(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function de(t){return function(t){if(Array.isArray(t))return le(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ve(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(t,e){if(t){if("string"==typeof t)return le(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(t,e):void 0}}ce(ie.getState()),ie.subscribe(ce);var ye=ae(),ge=se(),me=(0,re.getExtensionSlotsConfigStore)(),be=(0,re.getExtensionsConfigStore)();function we(t,e,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=Object.entries(t.slots)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=pe(u.value,2),l=c[0],f=c[1],h=Ie(l,t,(0,re.getExtensionSlotConfigFromStore)(e,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:h}}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}ne(ge.getState().slots,r)||ge.setState({slots:r})}function _e(t,e){return{moduleName:e,name:t,attachedIds:[],config:null}}function xe(t){return pe(t.split("#"),1)[0]}function Se(t,e){var n=xe(e);return t.extensions[n]}function Ee(t){return Se(ye.getState(),t)}ye.subscribe((function(t){we(t,me.getState(),be.getState())})),me.subscribe((function(t){we(ye.getState(),t,be.getState())})),be.subscribe((function(t){we(ye.getState(),me.getState(),t)}));var Oe=ye.action((function(t,e){t.extensions[e.name]=he({},e,{instances:[]})}));function je(t,e){ue((function(n){var r=n.slots[t];return he({},n,r?{slots:he({},n.slots,fe({},t,he({},r,{attachedIds:de(r.attachedIds).concat([e])})))}:{slots:he({},n.slots,fe({},t,he({},_e(t),{attachedIds:[e]})))})}))}function Ce(t,e){ue((function(n){var r=n.slots[t];return r&&r.attachedIds.includes(e)?he({},n,{slots:he({},n.slots,fe({},t,he({},r,{attachedIds:r.attachedIds.filter((function(t){return t!==e}))})))}):n}))}function Ae(t){ue((function(e){var n=e.slots[t];return n?he({},e,{slots:he({},e.slots,fe({},t,he({},n,{attachedIds:[]})))}):e}))}function Pe(t,e,n,r){var o=e.indexOf(t);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(t);return-1!==i?2e3+i:-1}function ke(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=e?e:navigator.onLine;return t.filter((function(t){return $e(n,t.online,t.offline)}))}function Ie(t,e,n,r){var o=function(t,e){var n=t.add||[],r=t.remove||[],o=t.order||[],i=ye.getState().extensions;return de(e).concat(de(n)).filter((function(t){return!r.includes(t)})).sort((function(t,n){var r,a,u=Pe(t,o,null===(r=i[xe(t)])||void 0===r?void 0:r.order,e),s=Pe(n,o,null===(a=i[xe(n)])||void 0===a?void 0:a.order,e);return-1===s?-1:-1===u?1:u-s}))}(n,e.slots[t].attachedIds),i=[],a=!0,u=!1,s=void 0;try{for(var c,l=o[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var f=c.value,h=(0,re.getExtensionConfigFromStore)(r,t,f).config,p=xe(f),d=e.extensions[p];d&&i.push({id:f,name:p,moduleName:d.moduleName,config:h,meta:d.meta,online:d.online,offline:d.offline})}}catch(t){u=!0,s=t}finally{try{a||null==l.return||l.return()}finally{if(u)throw s}}return i}function Te(t){return Ie(t,ye.getState(),(0,re.getExtensionSlotConfig)(t).config,be.getState())}var Re=ye.action((function(t,e,n){var r,o=null===(r=t.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=e)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),t;if(o&&o==e)return t;if(t.slots[n])return he({},t,{slots:he({},t.slots,fe({},n,he({},t.slots[n],{moduleName:e})))});var i=_e(n,e);return he({},t,{slots:he({},t.slots,fe({},n,i))})})),Le=ge.action((function(){return{slots:{},extensions:{}}}));function De(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return $e(n,t,e)}function $e(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(t?e:n)}function Me(t,e){var n=navigator.onLine?t:e;return"object"==typeof n?n:{}}var Ne=c(645);function Ue(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Be(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Fe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Be(t,e,n[e])}))}return t}function He(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function Ve(t){return function(t){if(Array.isArray(t))return Ue(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ue(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ue(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ze(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(t){return t},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=xe(r),u=Ee(r),s=!0,c=null;if(t){if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(e,"'"));var l=u.load,f=u.online,h=u.offline,p=u.meta,d=u.moduleName;De(f,h)&&(l().then((function(a){var u=a.default,l=He(a,["default"]);s&&(c=(0,Ne.mountRootParcel)(o(null!=u?u:l),Fe({},Me(f,h),i,{_meta:p,_extensionContext:{extensionId:r,extensionSlotName:e,extensionSlotModuleName:n,extensionModuleName:d},domElement:t})))})),ue((function(o){var i={domElement:t,id:r,slotName:e,slotModuleName:n};return Fe({},o,{extensions:Fe({},o.extensions,Be({},a,Fe({},o.extensions[a],{instances:Ve(o.extensions[a].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(e," but no DOM element was available."));return function(){s=!1,c&&("MOUNTED"!==c.getStatus()?c.mountPromise.then((function(){c&&c.unmount()})):c.unmount())}}var Ge=ae()})(),l})())}}}))},6858:(t,e,n)=>{"use strict";n.r(e);var r=n(560),o={};for(const t in r)"default"!==t&&(o[t]=()=>r[t]);n.d(e,o);var i=n(6560);o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);n.d(e,o);var a=n(7538);o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);n.d(e,o);var u=n(2041);o={};for(const t in u)"default"!==t&&(o[t]=()=>u[t]);n.d(e,o);var s=n(8282);o={};for(const t in s)"default"!==t&&(o[t]=()=>s[t]);n.d(e,o);var c=n(4875);o={};for(const t in c)"default"!==t&&(o[t]=()=>c[t]);n.d(e,o);var l=n(7212);o={};for(const t in l)"default"!==t&&(o[t]=()=>l[t]);n.d(e,o);var f=n(4211);o={};for(const t in f)"default"!==t&&(o[t]=()=>f[t]);n.d(e,o);var h=n(5435);o={};for(const t in h)"default"!==t&&(o[t]=()=>h[t]);n.d(e,o);var p=n(2742);o={};for(const t in p)"default"!==t&&(o[t]=()=>p[t]);n.d(e,o);var d=n(8540);o={};for(const t in d)"default"!==t&&(o[t]=()=>d[t]);n.d(e,o)},4875:()=>{System.register([],(function(t,e){return{execute:function(){t((()=>{var t={968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})();var o={};return(0,r(968).s)(1),(()=>{"use strict";r.r(o),r.d(o,{dispatchConnectivityChanged:()=>e,dispatchNotificationShown:()=>f,dispatchPrecacheStaticDependencies:()=>u,setupPaths:()=>d,setupUtils:()=>v,subscribeConnectivity:()=>i,subscribeConnectivityChanged:()=>n,subscribeNotificationShown:()=>h,subscribePrecacheStaticDependencies:()=>s,subscribeToastShown:()=>p});var t="openmrs:connectivity-changed";function e(e){window.dispatchEvent(new CustomEvent(t,{detail:{online:e}}))}function n(e){var n=function(t){return e(t.detail)};return window.addEventListener(t,n),function(){return window.removeEventListener(t,n)}}function i(t){return t({online:navigator.onLine}),n(t)}var a="openmrs:precache-static-dependencies";function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(a,{detail:t}))}function s(t){var e=function(e){return t(e.detail)};return window.addEventListener(a,e),function(){return window.removeEventListener(a,e)}}var c="openmrs:notification-shown",l="openmrs:toast-shown";function f(t){window.dispatchEvent(new CustomEvent(c,{detail:t}))}function h(t){var e=function(e){return t(e.detail)};return window.addEventListener(c,e),function(){return window.removeEventListener(c,e)}}function p(t){var e=function(e){return t(e.detail)};return window.addEventListener(l,e),function(){return window.removeEventListener(l,e)}}function d(t){window.openmrsBase=t.apiUrl,window.spaBase=t.spaPath,window.spaEnv=t.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}}function v(){window.copyText=function(t){var e=window.getSelection();if(e){var n=document.createRange();n.selectNode(t),e.removeAllRanges(),e.addRange(n),document.execCommand("copy"),e.removeAllRanges()}}}})(),o})())}}}))},7212:(t,e,n)=>{System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(t,e){var r={},o={};return{setters:[function(t){r.getLoggedInUser=t.getLoggedInUser},function(t){o.createGlobalStore=t.createGlobalStore}],execute:function(){t((()=>{var t={602:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new A(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=l(t,e,n);if("normal"===s.type){if(r=n.done?d:h,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=d,n.method="throw",n.arg=s.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function g(){}function m(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,i)&&(b=_);var x=m.prototype=y.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(o,i,a,u){var s=l(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function P(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return g.prototype=m,s(x,"constructor",m),s(m,"constructor",g),g.displayName=s(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},S(E.prototype),s(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(x),s(x,u,"Generator"),s(x,i,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:t=>{"use strict";t.exports=r},685:t=>{"use strict";t.exports=o}},i={};function a(e){var n=i[e];if(void 0!==n)return n.exports;var r=i[e]={exports:{}};return t[e](r,r.exports,a),r.exports}a.y=e,a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})();var u={};return(0,a(968).s)(1),(()=>{"use strict";a.r(u),a.d(u,{activateOfflineCapability:()=>F,beginEditSynchronizationItem:()=>_o,canBeginEditSynchronizationItemsOfType:()=>wo,deleteSynchronizationItem:()=>So,generateOfflineUuid:()=>Lo,getCurrentOfflineMode:()=>U,getDynamicOfflineDataEntries:()=>Vo,getDynamicOfflineDataEntriesFor:()=>Go,getDynamicOfflineDataHandlers:()=>Fo,getFullSynchronizationItems:()=>yo,getFullSynchronizationItemsFor:()=>fo,getOfflineDb:()=>Fr,getOfflinePatientDataStore:()=>li,getOfflineSynchronizationStore:()=>Jr,getOmrsServiceWorker:()=>y,getSynchronizationItem:()=>mo,getSynchronizationItems:()=>po,getSynchronizationItemsFor:()=>co,isOfflineUuid:()=>Do,messageOmrsServiceWorker:()=>O,offlineUuidPrefix:()=>Ro,omrsOfflineCachingStrategyHttpHeaderName:()=>b,omrsOfflineResponseBodyHttpHeaderName:()=>g,omrsOfflineResponseStatusHttpHeaderName:()=>m,putDynamicOfflineData:()=>qo,putDynamicOfflineDataFor:()=>Wo,queueSynchronizationItem:()=>uo,queueSynchronizationItemFor:()=>io,registerOfflinePatientHandler:()=>fi,registerOmrsServiceWorker:()=>v,removeDynamicOfflineData:()=>Xo,removeDynamicOfflineDataFor:()=>Qo,runSynchronization:()=>Qr,setCurrentOfflineMode:()=>B,setupDynamicOfflineDataHandler:()=>Ho,setupOfflineSync:()=>Oo,syncAllDynamicOfflineData:()=>ei,syncDynamicOfflineData:()=>ri,syncOfflinePatientData:()=>hi});try{self["workbox:window:6.5.1"]&&_()}catch(t){}function t(t,e){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(t){n(t.data)},t.postMessage(e,[r.port2])}))}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function r(t,n){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}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(r=t[Symbol.iterator]()).next.bind(r)}try{self["workbox:core:6.5.1"]&&_()}catch(t){}var o=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))};function i(t,e){var n=location.href;return new URL(t,n).href===new URL(e,n).href}var s=function(t,e){this.type=t,Object.assign(this,e)};function c(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function l(){}var f={type:"SKIP_WAITING"};function h(t,e){if(!e)return t&&t.then?t.then(l):Promise.resolve()}var p=function(e){var n,r;function a(t,n){var r,a;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new o,r.en=new o,r.on=new o,r.un=0,r.an=new Set,r.cn=function(){var t=r.fn,e=t.installing;r.tn>0||!i(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,t.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(t){var e=r.fn,n=t.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:t};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new s(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===n&&r.dispatchEvent(new s("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(t){var e=r.hn,n=e!==navigator.serviceWorker.controller;r.dispatchEvent(new s("controlling",{isExternal:n,originalEvent:t,sw:e,isUpdate:r.mn})),n||r.on.resolve(e)},r.gn=(a=function(t){var e=t.data,n=t.ports,o=t.source;return c(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new s("message",{data:e,originalEvent:t,ports:n,sw:o}))}))},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(a.apply(this,t))}catch(t){return Promise.reject(t)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}r=e,(n=a).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var u,l=a.prototype;return l.register=function(t){var e=(void 0===t?{}:t).immediate,n=void 0!==e&&e;try{var r=this;return function(t,e){var n=t();return n&&n.then?n.then(e):e()}((function(){if(!n&&"complete"!==document.readyState)return h(new Promise((function(t){return window.addEventListener("load",t)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),c(r.bn(),(function(t){r.fn=t,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 e=r.fn.waiting;return e&&i(e.scriptURL,r.sn.toString())&&(r.hn=e,Promise.resolve().then((function(){r.dispatchEvent(new s("waiting",{sw:e,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(t){return Promise.reject(t)}},l.update=function(){try{return this.fn?h(this.fn.update()):void 0}catch(t){return Promise.reject(t)}},l.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},l.messageSW=function(e){try{return c(this.getSW(),(function(n){return t(n,e)}))}catch(t){return Promise.reject(t)}},l.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&t(this.fn.waiting,f)},l.pn=function(){var t=navigator.serviceWorker.controller;return t&&i(t.scriptURL,this.sn.toString())?t:void 0},l.bn=function(){try{var t=this;return function(t,e){try{var n=t()}catch(t){return e(t)}return n&&n.then?n.then(void 0,e):n}((function(){return c(navigator.serviceWorker.register(t.sn,t.nn),(function(e){return t.un=performance.now(),e}))}),(function(t){throw t}))}catch(t){return Promise.reject(t)}},(u=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(a.prototype,u),a}(function(){function t(){this.Pn=new Map}var e=t.prototype;return e.addEventListener=function(t,e){this.Sn(t).add(e)},e.removeEventListener=function(t,e){this.Sn(t).delete(e)},e.dispatchEvent=function(t){t.target=this;for(var e,n=r(this.Sn(t.type));!(e=n()).done;)(0,e.value)(t)},e.Sn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},t}()),d=void 0;function v(t,e){if(void 0!==d)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(t," will not be registered.")),d;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new p(t,e);return d=n.register().then((function(){return n.controlling.then((function(){return n}))}))}function y(){return null!=d?d:Promise.resolve(void 0)}var g="x-omrs-offline-response-body",m="x-omrs-offline-response-status",b="x-omrs-offline-caching-strategy",w=a(602),x=a.n(w);function S(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function E(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){S(i,r,o,a,u,"next",t)}function u(t){S(i,r,o,a,u,"throw",t)}a(void 0)}))}}function O(t){return j.apply(this,arguments)}function j(){return(j=E(x().mark((function t(e){var n;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y();case 2:if(!(n=t.sent)){t.next=9;break}return t.next=6,n.messageSW(e);case 6:t.t0=t.sent,t.next=10;break;case 9:t.t0={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."};case 10:return t.abrupt("return",t.t0);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function A(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){C(i,r,o,a,u,"next",t)}function u(t){C(i,r,o,a,u,"throw",t)}a(void 0)}))}}function P(){return k.apply(this,arguments)}function k(){return(k=A(x().mark((function t(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=window.sessionStorage,t.prev=1,e.setItem("someKeyHere","test"),e.removeItem("someKeyHere"),t.next=10;break;case 6:if(t.prev=6,t.t0=t.catch(1),t.t0.code!==DOMException.QUOTA_EXCEEDED_ERR||0!==e.length){t.next=10;break}return t.abrupt("return",!0);case 10:return t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function I(){return T.apply(this,arguments)}function T(){return(T=A(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!window.indexedDB);case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function R(){return L.apply(this,arguments)}function L(){return L=A(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){var e=indexedDB.open("test");e.onerror=function(){return t(!0)},e.onsuccess=function(){return t(!1)}})));case 1:case"end":return t.stop()}}),t)}))),L.apply(this,arguments)}function D(){return $.apply(this,arguments)}function $(){return($=A(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,R();case 2:if(t.t1=t.sent,t.t1){t.next=7;break}return t.next=6,I();case 6:t.t1=t.sent;case 7:if(t.t0=t.t1,t.t0){t.next=12;break}return t.next=11,P();case 11:t.t0=t.sent;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var M="openmrs3:offline-mode",N="unavailable";function U(){return{current:N,notAvailable:"unavailable"===N,active:"on"===N}}function B(t){"unavailable"!==N&&"unavailable"!==t&&(localStorage.setItem(M,"on"===t?"active":"disabled"),N=t)}function F(){return H.apply(this,arguments)}function H(){return(H=A(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,D();case 2:t.sent||(N="active"===localStorage.getItem(M)?"on":"off"),navigator.onLine;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}const V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,z=Object.keys,G=Array.isArray;function K(t,e){return"object"!=typeof e||z(e).forEach((function(n){t[n]=e[n]})),t}"undefined"==typeof Promise||V.Promise||(V.Promise=Promise);const q=Object.getPrototypeOf,Z={}.hasOwnProperty;function W(t,e){return Z.call(t,e)}function Y(t,e){"function"==typeof e&&(e=e(q(t))),("undefined"==typeof Reflect?z:Reflect.ownKeys)(e).forEach((n=>{J(t,n,e[n])}))}const X=Object.defineProperty;function J(t,e,n,r){X(t,e,K(n&&W(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Q(t){return{from:function(e){return t.prototype=Object.create(e.prototype),J(t.prototype,"constructor",t),{extend:Y.bind(null,t.prototype)}}}}const tt=Object.getOwnPropertyDescriptor;function et(t,e){let n;return tt(t,e)||(n=q(t))&&et(n,e)}const nt=[].slice;function rt(t,e,n){return nt.call(t,e,n)}function ot(t,e){return e(t)}function it(t){if(!t)throw new Error("Assertion Failed")}function at(t){V.setImmediate?setImmediate(t):setTimeout(t,0)}function ut(t,e){return t.reduce(((t,n,r)=>{var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})}function st(t,e){if(W(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=st(t,e[r]);n.push(i)}return n}var a=e.indexOf(".");if(-1!==a){var u=t[e.substr(0,a)];return void 0===u?void 0:st(u,e.substr(a+1))}}function ct(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){it("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)ct(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var a=e.substr(0,i),u=e.substr(i+1);if(""===u)void 0===n?G(t)&&!isNaN(parseInt(a))?t.splice(a,1):delete t[a]:t[a]=n;else{var s=t[a];s||(s=t[a]={}),ct(s,u,n)}}else void 0===n?G(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}function lt(t){var e={};for(var n in t)W(t,n)&&(e[n]=t[n]);return e}const ft=[].concat;function ht(t){return ft.apply([],t)}const pt="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ht([8,16,32,64].map((t=>["Int","Uint","Float"].map((e=>e+t+"Array")))))).filter((t=>V[t])),dt=pt.map((t=>V[t]));ut(pt,(t=>[t,!0]));let vt=null;function yt(t){vt="undefined"!=typeof WeakMap&&new WeakMap;const e=gt(t);return vt=null,e}function gt(t){if(!t||"object"!=typeof t)return t;let e=vt&&vt.get(t);if(e)return e;if(G(t)){e=[],vt&&vt.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(gt(t[n]))}else if(dt.indexOf(t.constructor)>=0)e=t;else{const n=q(t);for(var o in e=n===Object.prototype?{}:Object.create(n),vt&&vt.set(t,e),t)W(t,o)&&(e[o]=gt(t[o]))}return e}const{toString:mt}={};function bt(t){return mt.call(t).slice(8,-1)}const wt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_t="symbol"==typeof wt?function(t){var e;return null!=t&&(e=t[wt])&&e.apply(t)}:function(){return null},xt={};function St(t){var e,n,r,o;if(1===arguments.length){if(G(t))return t.slice();if(this===xt&&"string"==typeof t)return[t];if(o=_t(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n}const Et="undefined"!=typeof Symbol?t=>"AsyncFunction"===t[Symbol.toStringTag]:()=>!1;var Ot="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function jt(t,e){Ot=t,Ct=e}var Ct=()=>!0;const At=!new Error("").stack;function Pt(){if(At)try{throw Pt.arguments,new Error}catch(t){return t}return new Error}function kt(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\n").length),n.split("\n").slice(e).filter(Ct).map((t=>"\n"+t)).join("")):""}var It=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Tt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(It),Rt={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 Lt(t,e){this._e=Pt(),this.name=t,this.message=e}function Dt(t,e){return t+". Errors: "+Object.keys(e).map((t=>e[t].toString())).filter(((t,e,n)=>n.indexOf(t)===e)).join("\n")}function $t(t,e,n,r){this._e=Pt(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=Dt(t,e)}function Mt(t,e){this._e=Pt(),this.name="BulkError",this.failures=Object.keys(e).map((t=>e[t])),this.failuresByPos=e,this.message=Dt(t,e)}Q(Lt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+kt(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Q($t).from(Lt),Q(Mt).from(Lt);var Nt=Tt.reduce(((t,e)=>(t[e]=e+"Error",t)),{});const Ut=Lt;var Bt=Tt.reduce(((t,e)=>{var n=e+"Error";function r(t,r){this._e=Pt(),this.name=n,t?"string"==typeof t?(this.message=`${t}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof t&&(this.message=`${t.name} ${t.message}`,this.inner=t):(this.message=Rt[e]||n,this.inner=null)}return Q(r).from(Ut),t[e]=r,t}),{});Bt.Syntax=SyntaxError,Bt.Type=TypeError,Bt.Range=RangeError;var Ft=It.reduce(((t,e)=>(t[e+"Error"]=Bt[e],t)),{}),Ht=Tt.reduce(((t,e)=>(-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=Bt[e]),t)),{});function Vt(){}function zt(t){return t}function Gt(t,e){return null==t||t===zt?e:function(n){return e(t(n))}}function Kt(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function qt(t,e){return t===Vt?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Kt(r,this.onsuccess):r),o&&(this.onerror=this.onerror?Kt(o,this.onerror):o),void 0!==i?i:n}}function Zt(t,e){return t===Vt?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Kt(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Kt(r,this.onerror):r)}}function Wt(t,e){return t===Vt?e:function(n){var r=t.apply(this,arguments);K(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Kt(o,this.onsuccess):o),i&&(this.onerror=this.onerror?Kt(i,this.onerror):i),void 0===r?void 0===a?void 0:a:K(r,a)}}function Yt(t,e){return t===Vt?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}}function Xt(t,e){return t===Vt?e:function(){var n=t.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 e.apply(r,i)}))}return e.apply(this,arguments)}}Ht.ModifyError=$t,Ht.DexieError=Lt,Ht.BulkError=Mt;var Jt={};const[Qt,te,ee]="undefined"==typeof Promise?[]:(()=>{let t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,q(t),t];const e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,q(e),t]})(),ne=te&&te.then,re=Qt&&Qt.constructor,oe=!!ee;var ie=!1,ae=ee?()=>{ee.then(Pe)}:V.setImmediate?setImmediate.bind(null,Pe):V.MutationObserver?()=>{var t=document.createElement("div");new MutationObserver((()=>{Pe(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:()=>{setTimeout(Pe,0)},ue=function(t,e){ye.push([t,e]),ce&&(ae(),ce=!1)},se=!0,ce=!0,le=[],fe=[],he=null,pe=zt,de={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Qe,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((t=>{try{Qe(t[0],t[1])}catch(t){}}))}},ve=de,ye=[],ge=0,me=[];function be(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Vt,this._lib=!1;var e=this._PSD=ve;if(Ot&&(this._stackHolder=Pt(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==Jt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Se(this,this._value))}this._state=null,this._value=null,++e.ref,xe(this,t)}const we={get:function(){var t=ve,e=Ue;function n(n,r){var o=!t.global&&(t!==ve||e!==Ue);const i=o&&!Ve();var a=new be(((e,a)=>{Oe(this,new _e(Xe(n,t,o,i),Xe(r,t,o,i),e,a,t))}));return Ot&&Ae(a,this),a}return n.prototype=Jt,n},set:function(t){J(this,"then",t&&t.prototype===Jt?we:{get:function(){return t},set:we.set})}};function _e(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o}function xe(t,e){try{e((e=>{if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&ke();e&&"function"==typeof e.then?xe(t,((t,n)=>{e instanceof be?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,Ee(t)),n&&Ie()}}),Se.bind(null,t))}catch(e){Se(t,e)}}function Se(t,e){if(fe.push(e),null===t._state){var n=t._lib&&ke();e=pe(e),t._state=!1,t._value=e,Ot&&null!==e&&"object"==typeof e&&!e._promise&&function(t,e,n){try{t.apply(null,void 0)}catch(t){}}((()=>{var n=et(e,"stack");e._promise=t,J(e,"stack",{get:()=>ie?n&&(n.get?n.get.apply(e):n.value):t.stack})})),function(t){le.some((e=>e._value===t._value))||le.push(t)}(t),Ee(t),n&&Ie()}}function Ee(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)Oe(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===ge&&(++ge,ue((()=>{0==--ge&&Te()}),[]))}function Oe(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++ge,ue(je,[n,t,e])}else t._listeners.push(e)}function je(t,e,n){try{he=e;var r,o=e._value;e._state?r=t(o):(fe.length&&(fe=[]),r=t(o),-1===fe.indexOf(o)&&function(t){for(var e=le.length;e;)if(le[--e]._value===t._value)return void le.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{he=null,0==--ge&&Te(),--n.psd.ref||n.psd.finalize()}}function Ce(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,a=t._value;null!=a?(o=a.name||"Error",i=a.message||a,r=kt(a,0)):(o=a,i=""),e.push(o+(i?": "+i:"")+r)}return Ot&&((r=kt(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&Ce(t._prev,e,n)),e}function Ae(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)}function Pe(){ke()&&Ie()}function ke(){var t=se;return se=!1,ce=!1,t}function Ie(){var t,e,n;do{for(;ye.length>0;)for(t=ye,ye=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(ye.length>0);se=!0,ce=!0}function Te(){var t=le;le=[],t.forEach((t=>{t._PSD.onunhandled.call(null,t._value,t)}));for(var e=me.slice(0),n=e.length;n;)e[--n]()}function Re(t){return new be(Jt,!1,t)}function Le(t,e){var n=ve;return function(){var r=ke(),o=ve;try{return qe(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{qe(o,!1),r&&Ie()}}}Y(be.prototype,{then:we,_then:function(t,e){Oe(this,new _e(null,null,t,e,ve))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(t=>t instanceof e?n(t):Re(t))):this.then(null,(t=>t&&t.name===e?n(t):Re(t)))},finally:function(t){return this.then((e=>(t(),e)),(e=>(t(),Re(e))))},stack:{get:function(){if(this._stack)return this._stack;try{ie=!0;var t=Ce(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{ie=!1}}},timeout:function(t,e){return t<1/0?new be(((n,r)=>{var o=setTimeout((()=>r(new Bt.Timeout(e))),t);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&J(be.prototype,Symbol.toStringTag,"Dexie.Promise"),de.env=Ze(),Y(be,{all:function(){var t=St.apply(null,arguments).map(ze);return new be((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach(((o,i)=>be.resolve(o).then((n=>{t[i]=n,--r||e(t)}),n)))}))},resolve:t=>{if(t instanceof be)return t;if(t&&"function"==typeof t.then)return new be(((e,n)=>{t.then(e,n)}));var e=new be(Jt,!0,t);return Ae(e,he),e},reject:Re,race:function(){var t=St.apply(null,arguments).map(ze);return new be(((e,n)=>{t.map((t=>be.resolve(t).then(e,n)))}))},PSD:{get:()=>ve,set:t=>ve=t},totalEchoes:{get:()=>Ue},newPSD:Fe,usePSD:We,scheduler:{get:()=>ue,set:t=>{ue=t}},rejectionMapper:{get:()=>pe,set:t=>{pe=t}},follow:(t,e)=>new be(((n,r)=>Fe(((e,n)=>{var r=ve;r.unhandleds=[],r.onunhandled=n,r.finalize=Kt((function(){!function(t){me.push((function e(){t(),me.splice(me.indexOf(e),1)})),++ge,ue((()=>{0==--ge&&Te()}),[])}((()=>{0===this.unhandleds.length?e():n(this.unhandleds[0])}))}),r.finalize),t()}),e,n,r)))}),re&&(re.allSettled&&J(be,"allSettled",(function(){const t=St.apply(null,arguments).map(ze);return new be((e=>{0===t.length&&e([]);let n=t.length;const r=new Array(n);t.forEach(((t,o)=>be.resolve(t).then((t=>r[o]={status:"fulfilled",value:t}),(t=>r[o]={status:"rejected",reason:t})).then((()=>--n||e(r)))))}))})),re.any&&"undefined"!=typeof AggregateError&&J(be,"any",(function(){const t=St.apply(null,arguments).map(ze);return new be(((e,n)=>{0===t.length&&n(new AggregateError([]));let r=t.length;const o=new Array(r);t.forEach(((t,i)=>be.resolve(t).then((t=>e(t)),(t=>{o[i]=t,--r||n(new AggregateError(o))}))))}))})));const De={awaits:0,echoes:0,id:0};var $e=0,Me=[],Ne=0,Ue=0,Be=0;function Fe(t,e,n,r){var o=ve,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Be;var a=de.env;i.env=oe?{Promise:be,PromiseProp:{value:be,configurable:!0,writable:!0},all:be.all,race:be.race,allSettled:be.allSettled,any:be.any,resolve:be.resolve,reject:be.reject,nthen:Je(a.nthen,i),gthen:Je(a.gthen,i)}:{},e&&K(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=We(i,t,n,r);return 0===i.ref&&i.finalize(),u}function He(){return De.id||(De.id=++$e),++De.awaits,De.echoes+=100,De.id}function Ve(){return!!De.awaits&&(0==--De.awaits&&(De.id=0),De.echoes=100*De.awaits,!0)}function ze(t){return De.echoes&&t&&t.constructor===re?(He(),t.then((t=>(Ve(),t)),(t=>(Ve(),tn(t))))):t}function Ge(t){++Ue,De.echoes&&0!=--De.echoes||(De.echoes=De.id=0),Me.push(ve),qe(t,!0)}function Ke(){var t=Me[Me.length-1];Me.pop(),qe(t,!1)}function qe(t,e){var n=ve;if((e?!De.echoes||Ne++&&t===ve:!Ne||--Ne&&t===ve)||Ye(e?Ge.bind(null,t):Ke),t!==ve&&(ve=t,n===de&&(de.env=Ze()),oe)){var r=de.env.Promise,o=t.env;te.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(V,"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 Ze(){var t=V.Promise;return oe?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(V,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:te.then,gthen:t.prototype.then}:{}}function We(t,e,n,r,o){var i=ve;try{return qe(t,!0),e(n,r,o)}finally{qe(i,!1)}}function Ye(t){ne.call(Qt,t)}function Xe(t,e,n,r){return"function"!=typeof t?t:function(){var o=ve;n&&He(),qe(e,!0);try{return t.apply(this,arguments)}finally{qe(o,!1),r&&Ye(Ve)}}}function Je(t,e){return function(n,r){return t.call(this,Xe(n,e),Xe(r,e))}}function Qe(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(V.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),K(r,o)):V.CustomEvent&&K(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&V.dispatchEvent&&(dispatchEvent(r),!V.PromiseRejectionEvent&&V.onunhandledrejection))try{V.onunhandledrejection(r)}catch(t){}Ot&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${t.stack||t}`)}catch(t){}}-1===(""+ne).indexOf("[native code]")&&(He=Ve=Vt);var tn=be.reject;function en(t,e,n,r){if(t.idbdb&&(t._state.openComplete||ve.letThrough||t._vip)){var o=t._createTransaction(e,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===Nt.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((()=>en(t,e,n,r)))):tn(o)}return o._promise(e,((t,e)=>Fe((()=>(ve.trans=o,r(t,e,o)))))).then((t=>o._completion.then((()=>t))))}if(t._state.openComplete)return tn(new Bt.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return tn(new Bt.DatabaseClosed);t.open().catch(Vt)}return t._state.dbReadyPromise.then((()=>en(t,e,n,r)))}const nn=String.fromCharCode(65535),rn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",on=[],an="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),un=an,sn=an,cn=t=>!/(dexie\.js|dexie\.min\.js)/.test(t);function ln(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e}const fn={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function hn(t){return"string"!=typeof t||/\./.test(t)?t=>t:e=>(void 0===e[t]&&t in e&&delete(e=yt(e))[t],e)}class pn{_trans(t,e,n){const r=this._tx||ve.trans,o=this.name;function i(t,n,r){if(!r.schema[o])throw new Bt.NotFound("Table "+o+" not part of transaction");return e(r.idbtrans,r)}const a=ke();try{return r&&r.db===this.db?r===ve.trans?r._promise(t,i,n):Fe((()=>r._promise(t,i,n)),{trans:r,transless:ve.transless||ve}):en(this.db,t,[this.name],i)}finally{a&&Ie()}}get(t,e){return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(e=>this.core.get({trans:e,key:t}).then((t=>this.hook.reading.fire(t))))).then(e)}where(t){if("string"==typeof t)return new this.db.WhereClause(this,t);if(G(t))return new this.db.WhereClause(this,`[${t.join("+")}]`);const e=z(t);if(1===e.length)return this.where(e[0]).equals(t[e[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((t=>t.compound&&e.every((e=>t.keyPath.indexOf(e)>=0))&&t.keyPath.every((t=>e.indexOf(t)>=0))))[0];if(n&&this.db._maxKey!==nn)return this.where(n.name).equals(n.keyPath.map((e=>t[e])));!n&&Ot&&console.warn(`The query ${JSON.stringify(t)} on ${this.name} would benefit of a compound index [${e.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(t,e){try{return 0===o.cmp(t,e)}catch(t){return!1}}const[a,u]=e.reduce((([e,n],o)=>{const a=r[o],u=t[o];return[e||a,e||!a?ln(n,a&&a.multi?t=>{const e=st(t,o);return G(e)&&e.some((t=>i(u,t)))}:t=>i(u,st(t,o))):n]}),[null,null]);return a?this.where(a.name).equals(t[a.keyPath]).filter(u):n?this.filter(u):this.where(e).equals("")}filter(t){return this.toCollection().and(t)}count(t){return this.toCollection().count(t)}offset(t){return this.toCollection().offset(t)}limit(t){return this.toCollection().limit(t)}each(t){return this.toCollection().each(t)}toArray(t){return this.toCollection().toArray(t)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(t){return new this.db.Collection(new this.db.WhereClause(this,G(t)?`[${t.join("+")}]`:t))}reverse(){return this.toCollection().reverse()}mapToClass(t){this.schema.mappedClass=t;const e=e=>{if(!e)return e;const n=Object.create(t.prototype);for(var r in e)if(W(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t}defineClass(){return this.mapToClass((function(t){K(this,t)}))}add(t,e){const{auto:n,keyPath:r}=this.schema.primKey;let o=t;return r&&n&&(o=hn(r)(t)),this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[o]}))).then((t=>t.numFailures?be.reject(t.failures[0]):t.lastResult)).then((e=>{if(r)try{ct(t,r,e)}catch(t){}return e}))}update(t,e){if("object"!=typeof t||G(t))return this.where(":id").equals(t).modify(e);{const n=st(t,this.schema.primKey.keyPath);if(void 0===n)return tn(new Bt.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof e?z(e).forEach((n=>{ct(t,n,e[n])})):e(t,{value:t,primKey:n})}catch(t){}return this.where(":id").equals(n).modify(e)}}put(t,e){const{auto:n,keyPath:r}=this.schema.primKey;let o=t;return r&&n&&(o=hn(r)(t)),this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"put",values:[o],keys:null!=e?[e]:null}))).then((t=>t.numFailures?be.reject(t.failures[0]):t.lastResult)).then((e=>{if(r)try{ct(t,r,e)}catch(t){}return e}))}delete(t){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"delete",keys:[t]}))).then((t=>t.numFailures?be.reject(t.failures[0]):void 0))}clear(){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"deleteRange",range:fn}))).then((t=>t.numFailures?be.reject(t.failures[0]):void 0))}bulkGet(t){return this._trans("readonly",(e=>this.core.getMany({keys:t,trans:e}).then((t=>t.map((t=>this.hook.reading.fire(t)))))))}bulkAdd(t,e,n){const r=Array.isArray(e)?e:void 0,o=(n=n||(r?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(e=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Bt.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==t.length)throw new Bt.InvalidArgument("Arguments objects and keys must have the same length");const a=t.length;let u=i&&n?t.map(hn(i)):t;return this.core.mutate({trans:e,type:"add",keys:r,values:u,wantResults:o}).then((({numFailures:t,results:e,lastResult:n,failures:r})=>{if(0===t)return o?e:n;throw new Mt(`${this.name}.bulkAdd(): ${t} of ${a} operations failed`,r)}))}))}bulkPut(t,e,n){const r=Array.isArray(e)?e:void 0,o=(n=n||(r?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(e=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Bt.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==t.length)throw new Bt.InvalidArgument("Arguments objects and keys must have the same length");const a=t.length;let u=i&&n?t.map(hn(i)):t;return this.core.mutate({trans:e,type:"put",keys:r,values:u,wantResults:o}).then((({numFailures:t,results:e,lastResult:n,failures:r})=>{if(0===t)return o?e:n;throw new Mt(`${this.name}.bulkPut(): ${t} of ${a} operations failed`,r)}))}))}bulkDelete(t){const e=t.length;return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"delete",keys:t}))).then((({numFailures:t,lastResult:n,failures:r})=>{if(0===t)return n;throw new Mt(`${this.name}.bulkDelete(): ${t} of ${e} operations failed`,r)}))}}function dn(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return a(t);r||(r=Yt),o||(o=Vt);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function a(t){z(t).forEach((function(e){var n=t[e];if(G(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new Bt.InvalidArgument("Invalid event config");var r=i(e,zt,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){at((function(){t.apply(null,e)}))}))}))}}))}}function vn(t,e){return Q(e).from({prototype:t}),e}function yn(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)}function gn(t,e){t.filter=ln(t.filter,e)}function mn(t,e,n){var r=t.replayFilter;t.replayFilter=r?()=>ln(r(),e()):e,t.justLimit=n&&!r}function bn(t,e){if(t.isPrimKey)return e.primaryKey;const n=e.getIndexByKeyPath(t.index);if(!n)throw new Bt.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n}function wn(t,e,n){const r=bn(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})}function _n(t,e,n,r){const o=t.replayFilter?ln(t.filter,t.replayFilter()):t.filter;if(t.or){const i={},a=(t,n,r)=>{if(!o||o(n,r,(t=>n.stop(t)),(t=>n.fail(t)))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),W(i,u)||(i[u]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(a,n),xn(wn(t,r,n),t.algorithm,a,!t.keysOnly&&t.valueMapper)])}return xn(wn(t,r,n),ln(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)}function xn(t,e,n,r){var o=Le(r?(t,e,o)=>n(r(t),e,o):n);return t.then((t=>{if(t)return t.start((()=>{var n=()=>t.continue();e&&!e(t,(t=>n=t),(e=>{t.stop(e),n=Vt}),(e=>{t.fail(e),n=Vt}))||o(t.value,t,(t=>n=t)),n()}))}))}function Sn(t,e){try{const n=En(t),r=En(e);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 t>e?1:t<e?-1:0;case"binary":return function(t,e){const n=t.length,r=e.length,o=n<r?n:r;for(let n=0;n<o;++n)if(t[n]!==e[n])return t[n]<e[n]?-1:1;return n===r?0:n<r?-1:1}(On(t),On(e));case"Array":return function(t,e){const n=t.length,r=e.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Sn(t[n],e[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(t,e)}}catch(t){}return NaN}function En(t){const e=typeof t;if("object"!==e)return e;if(ArrayBuffer.isView(t))return"binary";const n=bt(t);return"ArrayBuffer"===n?"binary":n}function On(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)}class jn{_read(t,e){var n=this._ctx;return n.error?n.table._trans(null,tn.bind(null,n.error)):n.table._trans("readonly",t).then(e)}_write(t){var e=this._ctx;return e.error?e.table._trans(null,tn.bind(null,e.error)):e.table._trans("readwrite",t,"locked")}_addAlgorithm(t){var e=this._ctx;e.algorithm=ln(e.algorithm,t)}_iterate(t,e){return _n(this._ctx,t,e,this._ctx.table.core)}clone(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&K(n,t),e._ctx=n,e}raw(){return this._ctx.valueMapper=null,this}each(t){var e=this._ctx;return this._read((n=>_n(e,t,n,e.table.core)))}count(t){return this._read((t=>{const e=this._ctx,n=e.table.core;if(yn(e,!0))return n.count({trans:t,query:{index:bn(e,n.schema),range:e.range}}).then((t=>Math.min(t,e.limit)));var r=0;return _n(e,(()=>(++r,!1)),t,n).then((()=>r))})).then(t)}sortBy(t,e){const n=t.split(".").reverse(),r=n[0],o=n.length-1;function i(t,e){return e?i(t[n[e]],e-1):t[r]}var a="next"===this._ctx.dir?1:-1;function u(t,e){var n=i(t,o),r=i(e,o);return n<r?-a:n>r?a:0}return this.toArray((function(t){return t.sort(u)})).then(e)}toArray(t){return this._read((t=>{var e=this._ctx;if("next"===e.dir&&yn(e,!0)&&e.limit>0){const{valueMapper:n}=e,r=bn(e,e.table.core.schema);return e.table.core.query({trans:t,limit:e.limit,values:!0,query:{index:r,range:e.range}}).then((({result:t})=>n?t.map(n):t))}{const n=[];return _n(e,(t=>n.push(t)),t,e.table.core).then((()=>n))}}),t)}offset(t){var e=this._ctx;return t<=0||(e.offset+=t,yn(e)?mn(e,(()=>{var e=t;return(t,n)=>0===e||(1===e?(--e,!1):(n((()=>{t.advance(e),e=0})),!1))})):mn(e,(()=>{var e=t;return()=>--e<0}))),this}limit(t){return this._ctx.limit=Math.min(this._ctx.limit,t),mn(this._ctx,(()=>{var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this}until(t,e){return gn(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this}first(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)}last(t){return this.reverse().first(t)}filter(t){var e,n;return gn(this._ctx,(function(e){return t(e.value)})),e=this._ctx,n=t,e.isMatch=ln(e.isMatch,n),this}and(t){return this.filter(t)}or(t){return new this.db.WhereClause(this._ctx.table,t,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(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))}eachUniqueKey(t){return this._ctx.unique="unique",this.eachKey(t)}eachPrimaryKey(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))}keys(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)}primaryKeys(t){var e=this._ctx;if("next"===e.dir&&yn(e,!0)&&e.limit>0)return this._read((t=>{var n=bn(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((({result:t})=>t)).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)}uniqueKeys(t){return this._ctx.unique="unique",this.keys(t)}firstKey(t){return this.limit(1).keys((function(t){return t[0]})).then(t)}lastKey(t){return this.reverse().firstKey(t)}distinct(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return gn(this._ctx,(function(t){var e=t.primaryKey.toString(),r=W(n,e);return n[e]=!0,!r})),this}modify(t){var e=this._ctx;return this._write((n=>{var r;if("function"==typeof t)r=t;else{var o=z(t),i=o.length;r=function(e){for(var n=!1,r=0;r<i;++r){var a=o[r],u=t[a];st(e,a)!==u&&(ct(e,a,u),n=!0)}return n}}const a=e.table.core,{outbound:u,extractKey:s}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const h=[],p=(t,e)=>{const{failures:n,numFailures:r}=e;f+=t-r;for(let t of z(n))l.push(n[t])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((h=>{const d=[],v=[],y=u?[]:null,g=[];for(let t=0;t<f;++t){const e=h[t],n={value:yt(e),primKey:o[l+t]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[l+t]):u||0===Sn(s(e),s(n.value))?(v.push(n.value),u&&y.push(o[l+t])):(g.push(o[l+t]),d.push(n.value)))}const m=yn(e)&&e.limit===1/0&&("function"!=typeof t||t===Cn)&&{index:e.index,range:e.range};return Promise.resolve(d.length>0&&a.mutate({trans:n,type:"add",values:d}).then((t=>{for(let e in t.failures)g.splice(parseInt(e),1);p(d.length,t)}))).then((()=>(v.length>0||m&&"object"==typeof t)&&a.mutate({trans:n,type:"put",keys:y,values:v,criteria:m,changeSpec:"function"!=typeof t&&t}).then((t=>p(v.length,t))))).then((()=>(g.length>0||m&&t===Cn)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((t=>p(g.length,t))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new $t("Error modifying one or more objects",l,f,h);return o.length}))}))}))}delete(){var t=this._ctx,e=t.range;return yn(t)&&(t.isPrimKey&&!sn||3===e.type)?this._write((n=>{const{primaryKey:r}=t.table.core.schema,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((e=>t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:t,lastResult:n,results:r,numFailures:o})=>{if(o)throw new $t("Could not delete some values",Object.keys(t).map((e=>t[e])),e-o);return e-o}))))})):this.modify(Cn)}}const Cn=(t,e)=>e.value=null;function An(t,e){return t<e?-1:t===e?0:1}function Pn(t,e){return t>e?-1:t===e?0:1}function kn(t,e,n){var r=t instanceof $n?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r}function In(t){return new t.Collection(t,(()=>Dn(""))).limit(0)}function Tn(t,e,n,r,o,i){for(var a=Math.min(t.length,r.length),u=-1,s=0;s<a;++s){var c=e[s];if(c!==r[s])return o(t[s],n[s])<0?t.substr(0,s)+n[s]+n.substr(s+1):o(t[s],r[s])<0?t.substr(0,s)+r[s]+n.substr(s+1):u>=0?t.substr(0,u)+e[u]+n.substr(u+1):null;o(t[s],c)<0&&(u=s)}return a<r.length&&"next"===i?t+n.substr(t.length):a<t.length&&"prev"===i?t.substr(0,n.length):u<0?null:t.substr(0,u)+r[u]+n.substr(u+1)}function Rn(t,e,n,r){var o,i,a,u,s,c,l,f=n.length;if(!n.every((t=>"string"==typeof t)))return kn(t,"String expected.");function h(t){o=function(t){return"next"===t?t=>t.toUpperCase():t=>t.toLowerCase()}(t),i=function(t){return"next"===t?t=>t.toLowerCase():t=>t.toUpperCase()}(t),a="next"===t?An:Pn;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return a(t.lower,e.lower)}));u=e.map((function(t){return t.upper})),s=e.map((function(t){return t.lower})),c=t,l="next"===t?"":r}h("next");var p=new t.Collection(t,(()=>Ln(u[0],s[f-1]+r)));p._ondirectionchange=function(t){h(t)};var d=0;return p._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var h=i(o);if(e(h,s,d))return!0;for(var p=null,v=d;v<f;++v){var y=Tn(o,h,u[v],s[v],a,c);null===y&&null===p?d=v+1:(null===p||a(p,y)>0)&&(p=y)}return n(null!==p?function(){t.continue(p+l)}:r),!1})),p}function Ln(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}}function Dn(t){return{type:1,lower:t,upper:t}}class $n{get Collection(){return this._ctx.table.db.Collection}between(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?In(this):new this.Collection(this,(()=>Ln(t,e,!n,!r)))}catch(t){return kn(this,rn)}}equals(t){return null==t?kn(this,rn):new this.Collection(this,(()=>Dn(t)))}above(t){return null==t?kn(this,rn):new this.Collection(this,(()=>Ln(t,void 0,!0)))}aboveOrEqual(t){return null==t?kn(this,rn):new this.Collection(this,(()=>Ln(t,void 0,!1)))}below(t){return null==t?kn(this,rn):new this.Collection(this,(()=>Ln(void 0,t,!1,!0)))}belowOrEqual(t){return null==t?kn(this,rn):new this.Collection(this,(()=>Ln(void 0,t)))}startsWith(t){return"string"!=typeof t?kn(this,"String expected."):this.between(t,t+nn,!0,!0)}startsWithIgnoreCase(t){return""===t?this.startsWith(t):Rn(this,((t,e)=>0===t.indexOf(e[0])),[t],nn)}equalsIgnoreCase(t){return Rn(this,((t,e)=>t===e[0]),[t],"")}anyOfIgnoreCase(){var t=St.apply(xt,arguments);return 0===t.length?In(this):Rn(this,((t,e)=>-1!==e.indexOf(t)),t,"")}startsWithAnyOfIgnoreCase(){var t=St.apply(xt,arguments);return 0===t.length?In(this):Rn(this,((t,e)=>e.some((e=>0===t.indexOf(e)))),t,nn)}anyOf(){const t=St.apply(xt,arguments);let e=this._cmp;try{t.sort(e)}catch(t){return kn(this,rn)}if(0===t.length)return In(this);const n=new this.Collection(this,(()=>Ln(t[0],t[t.length-1])));n._ondirectionchange=n=>{e="next"===n?this._ascending:this._descending,t.sort(e)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;e(a,t[r])>0;)if(++r,r===t.length)return o(i),!1;return 0===e(a,t[r])||(o((()=>{n.continue(t[r])})),!1)})),n}notEqual(t){return this.inAnyRange([[-1/0,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const t=St.apply(xt,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return kn(this,rn)}const e=t.reduce(((t,e)=>t?t.concat([[t[t.length-1][1],e]]):[[-1/0,e]]),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})}inAnyRange(t,e){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===t.length)return In(this);if(!t.every((t=>void 0!==t[0]&&void 0!==t[1]&&r(t[0],t[1])<=0)))return kn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Bt.InvalidArgument);const u=!e||!1!==e.includeLowers,s=e&&!0===e.includeUppers;let c,l=r;function f(t,e){return l(t[0],e[0])}try{c=t.reduce((function(t,e){let r=0,o=t.length;for(;r<o;++r){const o=t[r];if(n(e[0],o[1])<0&&n(e[1],o[0])>0){o[0]=i(o[0],e[0]),o[1]=a(o[1],e[1]);break}}return r===o&&t.push(e),t}),[]),c.sort(f)}catch(t){return kn(this,rn)}let h=0;const p=s?t=>r(t,c[h][1])>0:t=>r(t,c[h][1])>=0,d=u?t=>o(t,c[h][0])>0:t=>o(t,c[h][0])>=0;let v=p;const y=new this.Collection(this,(()=>Ln(c[0][0],c[c.length-1][1],!u,!s)));return y._ondirectionchange=t=>{"next"===t?(v=p,l=r):(v=d,l=o),c.sort(f)},y._addAlgorithm(((t,e,n)=>{for(var o=t.key;v(o);)if(++h,h===c.length)return e(n),!1;return!!function(t){return!p(t)&&!d(t)}(o)||(0===this._cmp(o,c[h][1])||0===this._cmp(o,c[h][0])||e((()=>{l===r?t.continue(c[h][0]):t.continue(c[h][1])})),!1)})),y}startsWithAnyOf(){const t=St.apply(xt,arguments);return t.every((t=>"string"==typeof t))?0===t.length?In(this):this.inAnyRange(t.map((t=>[t,t+nn]))):kn(this,"startsWithAnyOf() only works with strings")}}function Mn(t){return Le((function(e){return Nn(e),t(e.target.error),!1}))}function Nn(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()}const Un=dn(null,"storagemutated");class Bn{_lock(){return it(!ve.global),++this._reculock,1!==this._reculock||ve.global||(ve.lockOwnerFor=this),this}_unlock(){if(it(!ve.global),0==--this._reculock)for(ve.global||(ve.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{We(t[1],t[0])}catch(t){}}return this}_locked(){return this._reculock&&ve.lockOwnerFor!==this}create(t){if(!this.mode)return this;const e=this.db.idbdb,n=this.db._state.dbOpenError;if(it(!this.idbtrans),!t&&!e)switch(n&&n.name){case"DatabaseClosedError":throw new Bt.DatabaseClosed(n);case"MissingAPIError":throw new Bt.MissingAPI(n.message,n);default:throw new Bt.OpenFailed(n)}if(!this.active)throw new Bt.TransactionInactive;return it(null===this._completion._state),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):e.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Le((e=>{Nn(e),this._reject(t.error)})),t.onabort=Le((e=>{Nn(e),this.active&&this._reject(new Bt.Abort(t.error)),this.active=!1,this.on("abort").fire(e)})),t.oncomplete=Le((()=>{this.active=!1,this._resolve(),"mutatedParts"in t&&Un.storagemutated.fire(t.mutatedParts)})),this}_promise(t,e,n){if("readwrite"===t&&"readwrite"!==this.mode)return tn(new Bt.ReadOnly("Transaction is readonly"));if(!this.active)return tn(new Bt.TransactionInactive);if(this._locked())return new be(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(t,e,n).then(r,o)},ve])}));if(n)return Fe((()=>{var t=new be(((t,n)=>{this._lock();const r=e(t,n,this);r&&r.then&&r.then(t,n)}));return t.finally((()=>this._unlock())),t._lib=!0,t}));var r=new be(((t,n)=>{var r=e(t,n,this);r&&r.then&&r.then(t,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(t){var e=this._root();const n=be.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((()=>n));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new be(((t,r)=>{n.then((n=>e._waitingQueue.push(Le(t.bind(null,n)))),(t=>e._waitingQueue.push(Le(r.bind(null,t))))).finally((()=>{e._waitingFor===o&&(e._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Bt.Abort))}table(t){const e=this._memoizedTables||(this._memoizedTables={});if(W(e,t))return e[t];const n=this.schema[t];if(!n)throw new Bt.NotFound("Table "+t+" not part of transaction");const r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r}}function Fn(t,e,n,r,o,i,a){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+Hn(e)}}function Hn(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""}function Vn(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:ut(n,(t=>[t.name,t]))}}let zn=t=>{try{return t.only([[]]),zn=()=>[[]],[[]]}catch(t){return zn=()=>nn,nn}};function Gn(t){return null==t?()=>{}:"string"==typeof t?function(t){return 1===t.split(".").length?e=>e[t]:e=>st(e,t)}(t):e=>st(e,t)}function Kn(t){return[].slice.call(t)}let qn=0;function Zn(t){return null==t?":id":"string"==typeof t?t:`[${t.join("+")}]`}function Wn({_novip:t},e){const n=e.db,r=function(t,e,{IDBKeyRange:n,indexedDB:r},o){const i=function(t,e){return e.reduce(((t,{create:e})=>({...t,...e(t)})),t)}(function(t,e,n){function r(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=t;return void 0===n?void 0===r?null:e.upperBound(r,!!i):void 0===r?e.lowerBound(n,!!o):e.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(t,e){const n=Kn(t.objectStoreNames);return{schema:{name:t.name,tables:n.map((t=>e.objectStore(t))).map((t=>{const{keyPath:e,autoIncrement:n}=t,r=G(e),o=null==e,i={},a={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:Gn(e)},indexes:Kn(t.indexNames).map((e=>t.index(e))).map((t=>{const{name:e,unique:n,multiEntry:r,keyPath:o}=t,a={name:e,compound:G(o),keyPath:o,unique:n,multiEntry:r,extractKey:Gn(o)};return i[Zn(o)]=a,a})),getIndexByKeyPath:t=>i[Zn(t)]};return i[":id"]=a.primaryKey,null!=e&&(i[Zn(e)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in e.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(t,n),a=o.tables.map((t=>function(t){const e=t.name;return{name:e,schema:t,mutate:function({trans:t,type:n,keys:o,values:i,range:a}){return new Promise(((u,s)=>{u=Le(u);const c=t.objectStore(e),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:h}=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===h)return u({numFailures:0,failures:{},results:[],lastResult:void 0});let p;const d=[],v=[];let y=0;const g=t=>{++y,Nn(t)};if("deleteRange"===n){if(4===a.type)return u({numFailures:y,failures:v,results:[],lastResult:void 0});3===a.type?d.push(p=c.clear()):d.push(p=c.delete(r(a)))}else{const[t,e]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<h;++r)d.push(p=e&&void 0!==e[r]?c[n](t[r],e[r]):c[n](t[r])),p.onerror=g;else for(let e=0;e<h;++e)d.push(p=c[n](t[e])),p.onerror=g}const m=t=>{const e=t.target.result;d.forEach(((t,e)=>null!=t.error&&(v[e]=t.error))),u({numFailures:y,failures:v,results:"delete"===n?o:d.map((t=>t.result)),lastResult:e})};p.onerror=t=>{g(t),m(t)},p.onsuccess=m}))},getMany:({trans:t,keys:n})=>new Promise(((r,o)=>{r=Le(r);const i=t.objectStore(e),a=n.length,u=new Array(a);let s,c=0,l=0;const f=t=>{const e=t.target;u[e._pos]=e.result,++l===c&&r(u)},h=Mn(o);for(let t=0;t<a;++t)null!=n[t]&&(s=i.get(n[t]),s._pos=t,s.onsuccess=f,s.onerror=h,++c);0===c&&r(u)})),get:({trans:t,key:n})=>new Promise(((r,o)=>{r=Le(r);const i=t.objectStore(e).get(n);i.onsuccess=t=>r(t.target.result),i.onerror=Mn(o)})),query:function(t){return n=>new Promise(((o,i)=>{o=Le(o);const{trans:a,values:u,limit:s,query:c}=n,l=s===1/0?void 0:s,{index:f,range:h}=c,p=a.objectStore(e),d=f.isPrimaryKey?p:p.index(f.name),v=r(h);if(0===s)return o({result:[]});if(t){const t=u?d.getAll(v,l):d.getAllKeys(v,l);t.onsuccess=t=>o({result:t.target.result}),t.onerror=Mn(i)}else{let t=0;const e=u||!("openKeyCursor"in d)?d.openCursor(v):d.openKeyCursor(v),n=[];e.onsuccess=r=>{const i=e.result;return i?(n.push(u?i.value:i.primaryKey),++t===s?o({result:n}):void i.continue()):o({result:n})},e.onerror=Mn(i)}}))}(i),openCursor:function({trans:t,values:n,query:o,reverse:i,unique:a}){return new Promise(((u,s)=>{u=Le(u);const{index:c,range:l}=o,f=t.objectStore(e),h=c.isPrimaryKey?f:f.index(c.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in h)?h.openCursor(r(l),p):h.openKeyCursor(r(l),p);d.onerror=Mn(s),d.onsuccess=Le((e=>{const n=d.result;if(!n)return void u(null);n.___id=++qn,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=t,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Le(s),n.next=function(){let t=1;return this.start((()=>t--?this.continue():this.stop())).then((()=>this))},n.start=t=>{const e=new Promise(((t,e)=>{t=Le(t),d.onerror=Mn(e),n.fail=e,n.stop=e=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,t(e)}})),u=()=>{if(d.result)try{t()}catch(t){n.fail(t)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return d.onsuccess=Le((t=>{d.onsuccess=u,u()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,u(),e},u(n)}),s)}))},count({query:t,trans:n}){const{index:o,range:i}=t;return new Promise(((t,a)=>{const u=n.objectStore(e),s=o.isPrimaryKey?u:u.index(o.name),c=r(i),l=c?s.count(c):s.count();l.onsuccess=Le((e=>t(e.target.result))),l.onerror=Mn(a)}))}}}(t))),u={};return a.forEach((t=>u[t.name]=t)),{stack:"dbcore",transaction:t.transaction.bind(t),table(t){if(!u[t])throw new Error(`Table '${t}' not found`);return u[t]},MIN_KEY:-1/0,MAX_KEY:zn(e),schema:o}}(e,n,o),t.dbcore);return{dbcore:i}}(t._middlewares,n,t._deps,e);t.core=r.dbcore,t.tables.forEach((e=>{const n=e.name;t.core.schema.tables.some((t=>t.name===n))&&(e.core=t.core.table(n),t[n]instanceof t.Table&&(t[n].core=e.core))}))}function Yn({_novip:t},e,n,r){n.forEach((n=>{const o=r[n];e.forEach((e=>{const r=et(e,n);(!r||"value"in r&&void 0===r.value)&&(e===t.Transaction.prototype||e instanceof t.Transaction?J(e,n,{get(){return this.table(n)},set(t){X(this,n,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):e[n]=new t.Table(n,o))}))}))}function Xn({_novip:t},e){e.forEach((e=>{for(let n in e)e[n]instanceof t.Table&&delete e[n]}))}function Jn(t,e){return t._cfg.version-e._cfg.version}function Qn(t,e){const n={del:[],add:[],change:[]};let r;for(r in t)e[r]||n.del.push(r);for(r in e){const o=t[r],i=e[r];if(o){const t={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!an)t.recreate=!0,n.change.push(t);else{const e=o.idxByName,r=i.idxByName;let a;for(a in e)r[a]||t.del.push(a);for(a in r){const n=e[a],o=r[a];n?n.src!==o.src&&t.change.push(o):t.add.push(o)}(t.del.length>0||t.add.length>0||t.change.length>0)&&n.change.push(t)}}else n.add.push([r,i])}return n}function tr(t,e,n,r){const o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((t=>er(o,t))),o}function er(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})}function nr(t,e,n){const r={};return rt(e.objectStoreNames,0).forEach((t=>{const e=n.objectStore(t);let o=e.keyPath;const i=Fn(Hn(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let t=0;t<e.indexNames.length;++t){const n=e.index(e.indexNames[t]);o=n.keyPath;var u=Fn(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(u)}r[t]=Vn(t,i,a)})),r}function rr({_novip:t},e,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);t._hasGetAll="getAll"in a;for(let t=0;t<a.indexNames.length;++t){const n=a.indexNames[t],r=a.index(n).keyPath,o="string"==typeof r?r:"["+rt(r).join("+")+"]";if(e[i]){const t=e[i].idxByName[o];t&&(t.name=n,delete e[i].idxByName[o],e[i].idxByName[n]=t)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&V.WorkerGlobalScope&&V instanceof V.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(t._hasGetAll=!1)}class or{_parseStoresSpec(t,e){z(t).forEach((n=>{if(null!==t[n]){var r=t[n].split(",").map(((t,e)=>{const n=(t=t.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Fn(n,r||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),G(r),0===e)})),o=r.shift();if(o.multi)throw new Bt.Schema("Primary key cannot be multi-valued");r.forEach((t=>{if(t.auto)throw new Bt.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new Bt.Schema("Index must have a name and cannot be an empty string")})),e[n]=Vn(n,o,r)}}))}stores(t){const e=this.db;this._cfg.storesSource=this._cfg.storesSource?K(this._cfg.storesSource,t):t;const n=e._versions,r={};let o={};return n.forEach((t=>{K(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,Xn(e,[e._allTables,e,e.Transaction.prototype]),Yn(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],z(o),o),e._storeNames=z(o),this}upgrade(t){return this._cfg.contentUpgrade=Xt(this._cfg.contentUpgrade||Vt,t),this}}function ir(t,e){let n=t._dbNamesDB;return n||(n=t._dbNamesDB=new jr("__dbnames",{addons:[],indexedDB:t,IDBKeyRange:e}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function ar(t){return t&&"function"==typeof t.databases}function ur(t){return Fe((function(){return ve.letThrough=!0,t()}))}function sr(){var t;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()})).finally((function(){return clearInterval(t)})):Promise.resolve()}function cr(t){var e=e=>t.next(e),n=o(e),r=o((e=>t.throw(e)));function o(t){return e=>{var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):G(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()}function lr(t,e,n){var r=arguments.length;if(r<2)throw new Bt.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=ht(o);return[t,i,n]}function fr(t,e,n,r,o){return be.resolve().then((()=>{const i=ve.transless||ve,a=t._createTransaction(e,n,t._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===Nt.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((()=>fr(t,e,n,null,o)))):tn(r)}const s=Et(o);let c;s&&He();const l=be.follow((()=>{if(c=o.call(a,a),c)if(s){var t=Ve.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=cr(c))}),u);return(c&&"function"==typeof c.then?be.resolve(c).then((t=>a.active?t:tn(new Bt.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((t=>(r&&a._resolve(),a._completion.then((()=>t))))).catch((t=>(a._reject(t),tn(t))))}))}function hr(t,e,n){const r=G(t)?t.slice():[t];for(let t=0;t<n;++t)r.push(e);return r}const pr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return{...t,table(e){const n=t.table(e),{schema:r}=n,o={},i=[];function a(t,e,n){const r=Zn(t),u=o[r]=o[r]||[],s=null==t?0:"string"==typeof t?1:t.length,c=e>0,l={...n,isVirtual:c,keyTail:e,keyLength:s,extractKey:Gn(t),unique:!c&&n.unique};return u.push(l),l.isPrimaryKey||i.push(l),s>1&&a(2===s?t[0]:t.slice(0,s-1),e+1,n),u.sort(((t,e)=>t.keyTail-e.keyTail)),l}const u=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[u];for(const t of r.indexes)a(t.keyPath,0,t);function s(e){const n=e.query.index;return n.isVirtual?{...e,query:{index:n,range:(r=e.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:hr(r.lower,r.lowerOpen?t.MAX_KEY:t.MIN_KEY,o),lowerOpen:!0,upper:hr(r.upper,r.upperOpen?t.MIN_KEY:t.MAX_KEY,o),upperOpen:!0})}}:e;var r,o}const c={...n,schema:{...r,primaryKey:u,indexes:i,getIndexByKeyPath:function(t){const e=o[Zn(t)];return e&&e[0]}},count:t=>n.count(s(t)),query:t=>n.query(s(t)),openCursor(e){const{keyTail:r,isVirtual:o,keyLength:i}=e.query.index;return o?n.openCursor(s(e)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(hr(o,e.reverse?t.MAX_KEY:t.MIN_KEY,r)):e.unique?n.continue(n.key.slice(0,i).concat(e.reverse?t.MIN_KEY:t.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(e,o){n.continuePrimaryKey(hr(e,t.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const t=n.key;return 1===i?t[0]:t.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(e)}};return c}}}};function dr(t,e,n,r){return n=n||{},r=r||"",z(t).forEach((o=>{if(W(e,o)){var i=t[o],a=e[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const t=bt(i);t!==bt(a)?n[r+o]=e[o]:"Object"===t?dr(i,a,n,r+o+"."):i!==a&&(n[r+o]=e[o])}else i!==a&&(n[r+o]=e[o])}else n[r+o]=void 0})),z(e).forEach((o=>{W(t,o)||(n[r+o]=e[o])})),n}const vr={stack:"dbcore",name:"HooksMiddleware",level:2,create:t=>({...t,table(e){const n=t.table(e),{primaryKey:r}=n.schema,o={...n,mutate(t){const o=ve.trans,{deleting:i,creating:a,updating:u}=o.table(e).hook;switch(t.type){case"add":if(a.fire===Vt)break;return o._promise("readwrite",(()=>s(t)),!0);case"put":if(a.fire===Vt&&u.fire===Vt)break;return o._promise("readwrite",(()=>s(t)),!0);case"delete":if(i.fire===Vt)break;return o._promise("readwrite",(()=>s(t)),!0);case"deleteRange":if(i.fire===Vt)break;return o._promise("readwrite",(()=>function(t){return c(t.trans,t.range,1e4)}(t)),!0)}return n.mutate(t);function s(t){const e=ve.trans,o=t.keys||function(t,e){return"delete"===e.type?e.keys:e.keys||e.values.map(t.extractKey)}(r,t);if(!o)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?{...t,keys:o}:{...t}).type&&(t.values=[...t.values]),t.keys&&(t.keys=[...t.keys]),function(t,e,n){return"add"===e.type?Promise.resolve([]):t.getMany({trans:e.trans,keys:n,cache:"immutable"})}(n,t,o).then((s=>{const c=o.map(((n,o)=>{const c=s[o],l={onerror:null,onsuccess:null};if("delete"===t.type)i.fire.call(l,n,c,e);else if("add"===t.type||void 0===c){const i=a.fire.call(l,n,t.values[o],e);null==n&&null!=i&&(n=i,t.keys[o]=n,r.outbound||ct(t.values[o],r.keyPath,n))}else{const r=dr(c,t.values[o]),i=u.fire.call(l,r,n,c,e);if(i){const e=t.values[o];Object.keys(i).forEach((t=>{W(e,t)?e[t]=i[t]:ct(e,t,i[t])}))}}return l}));return n.mutate(t).then((({failures:e,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(e[r]):a.onsuccess&&a.onsuccess("put"===t.type&&s[r]?t.values[r]:i)}return{failures:e,results:n,numFailures:r,lastResult:i}})).catch((t=>(c.forEach((e=>e.onerror&&e.onerror(t))),Promise.reject(t))))}))}function c(t,e,o){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:o}).then((({result:n})=>s({type:"delete",keys:n,trans:t}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(t,{...e,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function yr(t,e,n){try{if(!e)return null;if(e.keys.length<t.length)return null;const r=[];for(let o=0,i=0;o<e.keys.length&&i<t.length;++o)0===Sn(e.keys[o],t[i])&&(r.push(n?yt(e.values[o]):e.values[o]),++i);return r.length===t.length?r:null}catch(t){return null}}const gr={stack:"dbcore",level:-1,create:t=>({table:e=>{const n=t.table(e);return{...n,getMany:t=>{if(!t.cache)return n.getMany(t);const e=yr(t.keys,t.trans._cache,"clone"===t.cache);return e?be.resolve(e):n.getMany(t).then((e=>(t.trans._cache={keys:t.keys,values:"clone"===t.cache?yt(e):e},e)))},mutate:t=>("add"!==t.type&&(t.trans._cache=null),n.mutate(t))}}})};function mr(t){return!("from"in t)}const br=function(t,e){if(!this){const e=new br;return t&&"d"in t&&K(e,t),e}K(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0})};function wr(t,e,n){const r=Sn(e,n);if(isNaN(r))return;if(r>0)throw RangeError();if(mr(t))return K(t,{from:e,to:n,d:1});const o=t.l,i=t.r;if(Sn(n,t.from)<0)return o?wr(o,e,n):t.l={from:e,to:n,d:1,l:null,r:null},Sr(t);if(Sn(e,t.to)>0)return i?wr(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},Sr(t);Sn(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),Sn(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);const a=!t.r;o&&!t.l&&_r(t,o),i&&a&&_r(t,i)}function _r(t,e){mr(e)||function t(e,{from:n,to:r,l:o,r:i}){wr(e,n,r),o&&t(e,o),i&&t(e,i)}(t,e)}function xr(t){let e=mr(t)?null:{s:0,n:t};return{next(t){const n=arguments.length>0;for(;e;)switch(e.s){case 0:if(e.s=1,n)for(;e.n.l&&Sn(t,e.n.from)<0;)e={up:e,n:e.n.l,s:1};else for(;e.n.l;)e={up:e,n:e.n.l,s:1};case 1:if(e.s=2,!n||Sn(t,e.n.to)<=0)return{value:e.n,done:!1};case 2:if(e.n.r){e.s=3,e={up:e,n:e.n.r,s:0};continue}case 3:e=e.up}return{done:!0}}}}function Sr(t){var e,n;const r=((null===(e=t.r)||void 0===e?void 0:e.d)||0)-((null===(n=t.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const e="r"===o?"l":"r",n={...t},r=t[o];t.from=r.from,t.to=r.to,t[o]=r[o],n[o]=r[e],t[e]=n,n.d=Er(n)}t.d=Er(t)}function Er({r:t,l:e}){return(t?e?Math.max(t.d,e.d):t.d:e?e.d:0)+1}Y(br.prototype,{add(t){return _r(this,t),this},addKey(t){return wr(this,t,t),this},addKeys(t){return t.forEach((t=>wr(this,t,t))),this},[wt](){return xr(this)}});const Or={stack:"dbcore",level:0,create:t=>{const e=t.schema.name,n=new br(t.MIN_KEY,t.MAX_KEY);return{...t,table:r=>{const o=t.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:u,outbound:s}=a,c={...o,mutate:t=>{const a=t.trans,u=a.mutatedParts||(a.mutatedParts={}),s=t=>{const n=`idb://${e}/${r}/${t}`;return u[n]||(u[n]=new br)},c=s(""),l=s(":dels"),{type:f}=t;let[h,p]="deleteRange"===t.type?[t.range]:"delete"===t.type?[t.keys]:t.values.length<50?[[],t.values]:[];const d=t.trans._cache;return o.mutate(t).then((t=>{if(G(h)){"delete"!==f&&(h=t.results),c.addKeys(h);const e=yr(h,d);e||"add"===f||l.addKeys(h),(e||p)&&function(t,e,n,r){e.indexes.forEach((function(e){const o=t(e.name||"");function i(t){return null!=t?e.extractKey(t):null}const a=t=>e.multiEntry&&G(t)?t.forEach((t=>o.addKey(t))):o.addKey(t);(n||r).forEach(((t,e)=>{const o=n&&i(n[e]),u=r&&i(r[e]);0!==Sn(o,u)&&(null!=o&&a(o),null!=u&&a(u))}))}))}(s,i,e,p)}else if(h){const t={from:h.lower,to:h.upper};l.add(t),c.add(t)}else c.add(n),l.add(n),i.indexes.forEach((t=>s(t.name).add(n)));return t}))}},l=({query:{index:e,range:n}})=>{var r,o;return[e,new br(null!==(r=n.lower)&&void 0!==r?r:t.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:t.MAX_KEY)]},f={get:t=>[a,new br(t.key)],getMany:t=>[a,(new br).addKeys(t.keys)],count:l,query:l,openCursor:l};return z(f).forEach((t=>{c[t]=function(i){const{subscr:a}=ve;if(a){const c=t=>{const n=`idb://${e}/${r}/${t}`;return a[n]||(a[n]=new br)},l=c(""),h=c(":dels"),[p,d]=f[t](i);if(c(p.name||"").add(d),!p.isPrimaryKey){if("count"!==t){const e="query"===t&&s&&i.values&&o.query({...i,values:!1});return o[t].apply(this,arguments).then((n=>{if("query"===t){if(s&&i.values)return e.then((({result:t})=>(l.addKeys(t),n)));const t=i.values?n.result.map(u):n.result;i.values?l.addKeys(t):h.addKeys(t)}else if("openCursor"===t){const t=n,e=i.values;return t&&Object.create(t,{key:{get:()=>(h.addKey(t.primaryKey),t.key)},primaryKey:{get(){const e=t.primaryKey;return h.addKey(e),e}},value:{get:()=>(e&&l.addKey(t.primaryKey),t.value)}})}return n}))}h.add(n)}}return o[t].apply(this,arguments)}})),c}}}};class jr{constructor(t,e){this._middlewares={},this.verno=0;const n=jr.dependencies;this._options=e={addons:jr.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...e},this._deps={indexedDB:e.indexedDB,IDBKeyRange:e.IDBKeyRange};const{addons:r}=e;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:Vt,dbReadyPromise:null,cancelOpen:Vt,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new be((t=>{o.dbReadyResolve=t})),o.openCanceller=new be(((t,e)=>{o.cancelOpen=e})),this._state=o,this.name=t,this.on=dn(this,"populate","blocked","versionchange","close",{ready:[Xt,Vt]}),this.on.ready.subscribe=ot(this.on.ready.subscribe,(t=>(e,n)=>{jr.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||be.resolve().then(e),n&&t(e);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(e),n&&t(e);else{t(e);const r=this;n||t((function t(){r.on.ready.unsubscribe(e),r.on.ready.unsubscribe(t)}))}}))})),this.Collection=(i=this,vn(jn.prototype,(function(t,e){this.db=i;let n=fn,r=null;if(e)try{n=e()}catch(t){r=t}const o=t._ctx,a=o.table,u=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:u!==zt?u:null}}))),this.Table=function(t){return vn(pn.prototype,(function(e,n,r){this.db=t,this._tx=r,this.name=e,this.schema=n,this.hook=t._allTables[e]?t._allTables[e].hook:dn(null,{creating:[qt,Vt],reading:[Gt,zt],updating:[Wt,Vt],deleting:[Zt,Vt]})}))}(this),this.Transaction=function(t){return vn(Bn.prototype,(function(e,n,r,o,i){this.db=t,this.mode=e,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=dn(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 be(((t,e)=>{this._resolve=t,this._reject=e})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(t=>{var e=this.active;return this.active=!1,this.on.error.fire(t),this.parent?this.parent._reject(t):e&&this.idbtrans&&this.idbtrans.abort(),tn(t)}))}))}(this),this.Version=function(t){return vn(or.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(t){return vn($n.prototype,(function(e,n,r){this.db=t,this._ctx={table:e,index:":id"===n?null:n,or:r};const o=t._deps.indexedDB;if(!o)throw new Bt.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(t,e)=>o.cmp(e,t),this._max=(t,e)=>o.cmp(t,e)>0?t:e,this._min=(t,e)=>o.cmp(t,e)<0?t:e,this._IDBKeyRange=t._deps.IDBKeyRange}))}(this),this.on("versionchange",(t=>{t.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",(t=>{!t.newVersion||t.newVersion<t.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${t.oldVersion/10}`)})),this._maxKey=zn(e.IDBKeyRange),this._createTransaction=(t,e,n,r)=>new this.Transaction(t,e,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=t=>{this.on("blocked").fire(t),on.filter((t=>t.name===this.name&&t!==this&&!t._state.vcFired)).map((e=>e.on("versionchange").fire(t)))},this.use(pr),this.use(vr),this.use(Or),this.use(gr),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((t=>t(this)))}version(t){if(isNaN(t)||t<.1)throw new Bt.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new Bt.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);const e=this._versions;var n=e.filter((e=>e._cfg.version===t))[0];return n||(n=new this.Version(t),e.push(n),e.sort(Jn),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(t){return this.idbdb&&(this._state.openComplete||ve.letThrough||this._vip)?t():new be(((t,e)=>{if(this._state.openComplete)return e(new Bt.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void e(new Bt.DatabaseClosed);this.open().catch(Vt)}this._state.dbReadyPromise.then(t,e)})).then(t)}use({stack:t,create:e,level:n,name:r}){r&&this.unuse({stack:t,name:r});const o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:e,level:null==n?10:n,name:r}),o.sort(((t,e)=>t.level-e.level)),this}unuse({stack:t,name:e,create:n}){return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((t=>n?t.create!==n:!!e&&t.name!==e))),this}open(){return function(t){const e=t._state,{indexedDB:n}=t._deps;if(e.isBeingOpened||t.idbdb)return e.dbReadyPromise.then((()=>e.dbOpenError?tn(e.dbOpenError):t));Ot&&(e.openCanceller._stackHolder=Pt()),e.isBeingOpened=!0,e.dbOpenError=null,e.openComplete=!1;const r=e.openCanceller;function o(){if(e.openCanceller!==r)throw new Bt.DatabaseClosed("db.open() was cancelled")}let i=e.dbReadyResolve,a=null,u=!1;return be.race([r,("undefined"==typeof navigator?be.resolve():sr()).then((()=>new be(((r,i)=>{if(o(),!n)throw new Bt.MissingAPI;const s=t.name,c=e.autoSchema?n.open(s):n.open(s,Math.round(10*t.verno));if(!c)throw new Bt.MissingAPI;c.onerror=Mn(i),c.onblocked=Le(t._fireOnBlocked),c.onupgradeneeded=Le((r=>{if(a=c.transaction,e.autoSchema&&!t._options.allowEmptyDB){c.onerror=Nn,a.abort(),c.result.close();const t=n.deleteDatabase(s);t.onsuccess=t.onerror=Le((()=>{i(new Bt.NoSuchDatabase(`Database ${s} doesnt exist`))}))}else{a.onerror=Mn(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;u=o<1,t._novip.idbdb=c.result,function(t,e,n,r){const o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),u=ve.transless||ve;Fe((()=>{ve.trans=i,ve.transless=u,0===e?(z(o).forEach((t=>{tr(n,t,o[t].primKey,o[t].indexes)})),Wn(t,n),be.follow((()=>t.on.populate.fire(i))).catch(a)):function({_novip:t},e,n,r){const o=[],i=t._versions;let a=t._dbSchema=nr(0,t.idbdb,r),u=!1;return i.filter((t=>t._cfg.version>=e)).forEach((i=>{o.push((()=>{const o=a,s=i._cfg.dbschema;rr(t,o,r),rr(t,s,r),a=t._dbSchema=s;const c=Qn(o,s);c.add.forEach((t=>{tr(r,t[0],t[1].primKey,t[1].indexes)})),c.change.forEach((t=>{if(t.recreate)throw new Bt.Upgrade("Not yet support for changing primary key");{const e=r.objectStore(t.name);t.add.forEach((t=>er(e,t))),t.change.forEach((t=>{e.deleteIndex(t.name),er(e,t)})),t.del.forEach((t=>e.deleteIndex(t)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>e){Wn(t,r),n._memoizedTables={},u=!0;let e=lt(s);c.del.forEach((t=>{e[t]=o[t]})),Xn(t,[t.Transaction.prototype]),Yn(t,[t.Transaction.prototype],z(e),e),n.schema=e;const i=Et(l);let a;i&&He();const f=be.follow((()=>{if(a=l(n),a&&i){var t=Ve.bind(null,null);a.then(t,t)}}));return a&&"function"==typeof a.then?be.resolve(a):f.then((()=>a))}})),o.push((e=>{u&&un||function(t,e){[].slice.call(e.db.objectStoreNames).forEach((n=>null==t[n]&&e.db.deleteObjectStore(n)))}(i._cfg.dbschema,e),Xn(t,[t.Transaction.prototype]),Yn(t,[t.Transaction.prototype],t._storeNames,t._dbSchema),n.schema=t._dbSchema}))})),function t(){return o.length?be.resolve(o.shift()(n.idbtrans)).then(t):be.resolve()}().then((()=>{var t,e;e=r,z(t=a).forEach((n=>{e.db.objectStoreNames.contains(n)||tr(e,n,t[n].primKey,t[n].indexes)}))}))}(t,e,i,n).catch(a)}))}(t,o/10,a,i)}}),i),c.onsuccess=Le((()=>{a=null;const n=t._novip.idbdb=c.result,o=rt(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");e.autoSchema?function({_novip:t},e,n){t.verno=e.version/10;const r=t._dbSchema=nr(0,e,n);t._storeNames=rt(e.objectStoreNames,0),Yn(t,[t._allTables],z(r),r)}(t,n,r):(rr(t,t._dbSchema,r),function(t,e){const n=Qn(nr(0,t.idbdb,e),t._dbSchema);return!(n.add.length||n.change.some((t=>t.add.length||t.change.length)))}(t,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Wn(t,r)}catch(t){}var i;on.push(t),n.onversionchange=Le((n=>{e.vcFired=!0,t.on("versionchange").fire(n)})),n.onclose=Le((e=>{t.on("close").fire(e)})),u&&function({indexedDB:t,IDBKeyRange:e},n){!ar(t)&&"__dbnames"!==n&&ir(t,e).put({name:n}).catch(Vt)}(t._deps,s),r()}),i)}))))]).then((()=>(o(),e.onReadyBeingFired=[],be.resolve(ur((()=>t.on.ready.fire(t.vip)))).then((function n(){if(e.onReadyBeingFired.length>0){let r=e.onReadyBeingFired.reduce(Xt,Vt);return e.onReadyBeingFired=[],be.resolve(ur((()=>r(t.vip)))).then(n)}}))))).finally((()=>{e.onReadyBeingFired=null,e.isBeingOpened=!1})).then((()=>t)).catch((n=>{e.dbOpenError=n;try{a&&a.abort()}catch(t){}return r===e.openCanceller&&t._close(),tn(n)})).finally((()=>{e.openComplete=!0,i()}))}(this)}_close(){const t=this._state,e=on.indexOf(this);if(e>=0&&on.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(t){}this._novip.idbdb=null}t.dbReadyPromise=new be((e=>{t.dbReadyResolve=e})),t.openCanceller=new be(((e,n)=>{t.cancelOpen=n}))}close(){this._close();const t=this._state;this._options.autoOpen=!1,t.dbOpenError=new Bt.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}delete(){const t=arguments.length>0,e=this._state;return new be(((n,r)=>{const o=()=>{this.close();var t=this._deps.indexedDB.deleteDatabase(this.name);t.onsuccess=Le((()=>{!function({indexedDB:t,IDBKeyRange:e},n){!ar(t)&&"__dbnames"!==n&&ir(t,e).delete(n).catch(Vt)}(this._deps,this.name),n()})),t.onerror=Mn(r),t.onblocked=this._fireOnBlocked};if(t)throw new Bt.InvalidArgument("Arguments not allowed in db.delete()");e.isBeingOpened?e.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return z(this._allTables).map((t=>this._allTables[t]))}transaction(){const t=lr.apply(this,arguments);return this._transaction.apply(this,t)}_transaction(t,e,n){let r=ve.trans;r&&r.db===this&&-1===t.indexOf("!")||(r=null);const o=-1!==t.indexOf("?");let i,a;t=t.replace("!","").replace("?","");try{if(a=e.map((t=>{var e=t instanceof this.Table?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||"readonly"===t)i="readonly";else{if("rw"!=t&&"readwrite"!=t)throw new Bt.InvalidArgument("Invalid transaction mode: "+t);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Bt.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((t=>{if(r&&-1===r.storeNames.indexOf(t)){if(!o)throw new Bt.SubTransaction("Table "+t+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(t){return r?r._promise(null,((e,n)=>{n(t)})):tn(t)}const u=fr.bind(null,this,i,a,r,n);return r?r._promise(i,u,"lock"):ve.trans?We(ve.transless,(()=>this._whenReady(u))):this._whenReady(u)}table(t){if(!W(this._allTables,t))throw new Bt.InvalidTable(`Table ${t} does not exist`);return this._allTables[t]}}const Cr="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Ar{constructor(t){this._subscribe=t}subscribe(t,e,n){return this._subscribe(t&&"function"!=typeof t?t:{next:t,error:e,complete:n})}[Cr](){return this}}function Pr(t,e){return z(e).forEach((n=>{_r(t[n]||(t[n]=new br),e[n])})),t}let kr;try{kr={indexedDB:V.indexedDB||V.mozIndexedDB||V.webkitIndexedDB||V.msIndexedDB,IDBKeyRange:V.IDBKeyRange||V.webkitIDBKeyRange}}catch(r){kr={indexedDB:null,IDBKeyRange:null}}const Ir=jr;function Tr(t){let e=Rr;try{Rr=!0,Un.storagemutated.fire(t)}finally{Rr=e}}Y(Ir,{...Ht,delete:t=>new Ir(t,{addons:[]}).delete(),exists:t=>new Ir(t,{addons:[]}).open().then((t=>(t.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(t){try{return function({indexedDB:t,IDBKeyRange:e}){return ar(t)?Promise.resolve(t.databases()).then((t=>t.map((t=>t.name)).filter((t=>"__dbnames"!==t)))):ir(t,e).toCollection().primaryKeys()}(Ir.dependencies).then(t)}catch(t){return tn(new Bt.MissingAPI)}},defineClass:()=>function(t){K(this,t)},ignoreTransaction:t=>ve.trans?We(ve.transless,t):t(),vip:ur,async:function(t){return function(){try{var e=cr(t.apply(this,arguments));return e&&"function"==typeof e.then?e:be.resolve(e)}catch(t){return tn(t)}}},spawn:function(t,e,n){try{var r=cr(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:be.resolve(r)}catch(t){return tn(t)}},currentTransaction:{get:()=>ve.trans||null},waitFor:function(t,e){const n=be.resolve("function"==typeof t?Ir.ignoreTransaction(t):t).timeout(e||6e4);return ve.trans?ve.trans.waitFor(n):n},Promise:be,debug:{get:()=>Ot,set:t=>{jt(t,"dexie"===t?()=>!0:cn)}},derive:Q,extend:K,props:Y,override:ot,Events:dn,on:Un,liveQuery:function(t){return new Ar((e=>{const n=Et(t);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,Un.storagemutated.unsubscribe(l)}};e.start&&e.start(a);let u=!1,s=!1;function c(){return z(i).some((t=>o[t]&&function(t,e){const n=xr(e);let r=n.next();if(r.done)return!1;let o=r.value;const i=xr(t);let a=i.next(o.from),u=a.value;for(;!r.done&&!a.done;){if(Sn(u.from,o.to)<=0&&Sn(u.to,o.from)>=0)return!0;Sn(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(o[t],i[t])))}const l=t=>{Pr(o,t),c()&&f()},f=()=>{if(u||r)return;o={};const h={},p=function(e){n&&He();const r=()=>Fe(t,{subscr:e,trans:null}),o=ve.trans?We(ve.transless,r):r();return n&&o.then(Ve,Ve),o}(h);s||(Un("storagemutated",l),s=!0),u=!0,Promise.resolve(p).then((t=>{u=!1,r||(c()?f():(o={},i=h,e.next&&e.next(t)))}),(t=>{u=!1,e.error&&e.error(t),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Pr,getByKeyPath:st,setByKeyPath:ct,delByKeyPath:function(t,e){"string"==typeof e?ct(t,e,void 0):"length"in e&&[].map.call(e,(function(e){ct(t,e,void 0)}))},shallowClone:lt,deepClone:yt,getObjectDiff:dr,cmp:Sn,asap:at,minKey:-1/0,addons:[],connections:on,errnames:Nt,dependencies:kr,semVer:"3.2.1",version:"3.2.1".split(".").map((t=>parseInt(t))).reduce(((t,e,n)=>t+e/Math.pow(10,2*n)))}),Ir.maxKey=zn(Ir.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Un("storagemutated",(t=>{if(!Rr){let e;an?(e=document.createEvent("CustomEvent"),e.initCustomEvent("x-storagemutated-1",!0,!0,t)):e=new CustomEvent("x-storagemutated-1",{detail:t}),Rr=!0,dispatchEvent(e),Rr=!1}})),addEventListener("x-storagemutated-1",(({detail:t})=>{Rr||Tr(t)})));let Rr=!1;if("undefined"!=typeof BroadcastChannel){const t=new BroadcastChannel("x-storagemutated-1");Un("storagemutated",(e=>{Rr||t.postMessage(e)})),t.onmessage=t=>{t.data&&Tr(t.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Un("storagemutated",(t=>{try{Rr||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:t})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((e=>e.postMessage({type:"x-storagemutated-1",changedParts:t}))))}catch(t){}})),addEventListener("storage",(t=>{if("x-storagemutated-1"===t.key){const e=JSON.parse(t.newValue);e&&Tr(e.changedParts)}}));const t=self.document&&navigator.serviceWorker;t&&t.addEventListener("message",(function({data:t}){t&&"x-storagemutated-1"===t.type&&Tr(t.changedParts)}))}be.rejectionMapper=function(t,e){if(!t||t instanceof Lt||t instanceof TypeError||t instanceof SyntaxError||!t.name||!Ft[t.name])return t;var n=new Ft[t.name](e||t.message,t);return"stack"in t&&J(n,"stack",{get:function(){return this.inner.stack}}),n},jt(Ot,cn);var Lr=a(766),Dr=a(685);function $r(t){return $r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$r(t)}function Mr(t,e){return!e||"object"!==Ur(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Nr(t,e){return Nr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Nr(t,e)}var Ur=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},Br=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Nr(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=$r(e);if(n){var o=$r(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Mr(this,t)});function o(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),t.syncQueue=t.table("syncQueue"),t.dynamicOfflineData=t.table("dynamicOfflineData"),t}return o}(jr);function Fr(){return new Br}function Hr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Vr(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function zr(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Vr(i,r,o,a,u,"next",t)}function u(t){Vr(i,r,o,a,u,"throw",t)}a(void 0)}))}}function Gr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Kr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Gr(t,e,n[e])}))}return t}function qr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Hr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hr(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Zr,Wr=new Br,Yr={},Xr=(0,Dr.createGlobalStore)("offline-synchronization",{});function Jr(){return Xr}function Qr(){return to.apply(this,arguments)}function to(){return to=zr(x().mark((function t(){var e,n,r,o,i,a,u,s,c,l,f,h,p;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Xr.getState().synchronization){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,Wr.syncQueue.count();case 4:e=t.sent,n={},r=Object.entries(Yr),o=r.length,i={},a=new AbortController,u=function(){var t=Xr.getState().synchronization;Xr.setState({synchronization:Kr({},t,{pendingCount:t.pendingCount-1})})},t.prev=11,Xr.setState({synchronization:{totalCount:e,pendingCount:e,abortController:a}}),s=0;case 14:if(!(s<o&&r.length>0)){t.next=30;break}c=r.length;case 16:if(!c--){t.next=27;break}if(l=qr(r[c],2),f=l[0],h=l[1],!(p=h.dependsOn.map((function(t){return n[t]}))).every(Boolean)){t.next=25;break}return i[f]={},t.next=23,Promise.all(p);case 23:n[f]=eo(h,i,a,u),r.splice(c,1);case 25:t.next=16;break;case 27:s++,t.next=14;break;case 30:return t.next=32,Promise.allSettled(Object.values(n));case 32:return t.prev=32,Xr.setState({synchronization:void 0}),t.finish(32);case 35:case"end":return t.stop()}}),t,null,[[11,,32,35]])}))),to.apply(this,arguments)}function eo(t,e,n,r){return no.apply(this,arguments)}function no(){return no=zr(x().mark((function t(e,n,r,o){var i,a,u,s,c,l,f,h,p,d,v,y,g,m,b,w;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.type,a=e.dependsOn,u=e.process,s=[],c=[],t.next=5,ro();case 5:return l=t.sent,t.next=8,Wr.syncQueue.where({type:i,userId:l}).each((function(t,e){s.push([e.primaryKey,t.content,t.descriptor]),c.push(t.content)}));case 8:f=0;case 9:if(!(f<s.length)){t.next=31;break}return h=qr(s[f],3),p=h[0],d=h[1],v=h[2],y=v.id,g=v.dependencies,m=void 0===g?[]:g,t.prev=11,t.next=14,u(d,{abort:r,index:f,items:c,userId:l,dependencies:m.map((function(t){var e=t.id,r=t.type;return a.includes(r)?n[r][e]:void 0}))});case 14:return b=t.sent,void 0!==y&&(n[i][y]=b),t.next=18,Wr.syncQueue.delete(p);case 18:t.next=25;break;case 20:return t.prev=20,t.t0=t.catch(11),t.next=25,Wr.syncQueue.update(p,{lastError:{name:null===t.t0||void 0===t.t0?void 0:t.t0.name,message:null!==(w=null===t.t0||void 0===t.t0?void 0:t.t0.message)&&void 0!==w?w:null===t.t0||void 0===t.t0?void 0:t.t0.toString()}});case 25:return t.prev=25,o(),t.finish(25);case 28:f++,t.next=9;break;case 31:case"end":return t.stop()}}),t,null,[[11,20,25,28]])}))),no.apply(this,arguments)}function ro(){return oo.apply(this,arguments)}function oo(){return(oo=zr(x().mark((function t(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Lr.getLoggedInUser)();case 2:return e=t.sent,t.abrupt("return",(null==e?void 0:e.uuid)||"*");case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function io(t,e,n,r){return ao.apply(this,arguments)}function ao(){return(ao=zr(x().mark((function t(e,n,r,o){var i,a;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===(i=o&&o.id)){t.next=4;break}return t.next=4,Wr.syncQueue.where({type:n,userId:e}).filter((function(t){return(null==t?void 0:t.descriptor.id)===i})).delete().catch(jr.errnames.DatabaseClosed);case 4:return t.next=6,Wr.syncQueue.add({type:n,content:r,userId:e,descriptor:o||{},createdOn:new Date}).catch(jr.errnames.DatabaseClosed,(function(){return-1}));case 6:return a=t.sent,t.abrupt("return",a);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function uo(t,e,n){return so.apply(this,arguments)}function so(){return(so=zr(x().mark((function t(e,n,r){var o;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ro();case 2:return o=t.sent,t.next=5,io(o,e,n,r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function co(t,e){return lo.apply(this,arguments)}function lo(){return(lo=zr(x().mark((function t(e,n){var r;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fo(e,n);case 2:return r=t.sent,t.abrupt("return",r.map((function(t){return t.content})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function fo(t,e){return ho.apply(this,arguments)}function ho(){return(ho=zr(x().mark((function t(e,n){var r;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,userId:e}:{userId:e},t.next=3,Wr.syncQueue.where(r).toArray().catch(jr.errnames.DatabaseClosed,(function(){return[]}));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function po(t){return vo.apply(this,arguments)}function vo(){return(vo=zr(x().mark((function t(e){var n;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ro();case 2:return n=t.sent,t.next=5,co(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yo(t){return go.apply(this,arguments)}function go(){return(go=zr(x().mark((function t(e){var n;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ro();case 2:return n=t.sent,t.next=5,fo(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mo(t){return bo.apply(this,arguments)}function bo(){return(bo=zr(x().mark((function t(e){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Wr.syncQueue.get(e).catch(jr.errnames.DatabaseClosed,(function(){}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function wo(t){var e;return!!(null===(e=Yr[t])||void 0===e?void 0:e.options.onBeginEditSyncItem)}function _o(t){return xo.apply(this,arguments)}function xo(){return(xo=zr(x().mark((function t(e){var n,r,o;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,mo(e);case 3:if(r=t.sent){t.next=6;break}throw new Error("No sync item with the ID ".concat(e," exists."));case 6:if(o=null===(n=Yr[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){t.next=9;break}throw new Error("A sync item with the ID ".concat(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 "').concat(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function So(t){return Eo.apply(this,arguments)}function Eo(){return(Eo=zr(x().mark((function t(e){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Wr.syncQueue.delete(e).catch(jr.errnames.DatabaseClosed);case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Oo(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Yr[t]={type:t,dependsOn:e,process:n,options:r}}var jo=new Uint8Array(16);function Co(){if(!Zr&&!(Zr="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 Zr(jo)}const Ao=/^(?:[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,Po=function(t){return"string"==typeof t&&Ao.test(t)};for(var ko=[],Io=0;Io<256;++Io)ko.push((Io+256).toString(16).substr(1));const To=function(t,e,n){var r=(t=t||{}).random||(t.rng||Co)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ko[t[e+0]]+ko[t[e+1]]+ko[t[e+2]]+ko[t[e+3]]+"-"+ko[t[e+4]]+ko[t[e+5]]+"-"+ko[t[e+6]]+ko[t[e+7]]+"-"+ko[t[e+8]]+ko[t[e+9]]+"-"+ko[t[e+10]]+ko[t[e+11]]+ko[t[e+12]]+ko[t[e+13]]+ko[t[e+14]]+ko[t[e+15]]).toLowerCase();if(!Po(n))throw TypeError("Stringified UUID is invalid");return n}(r)};var Ro="OFFLINE+";function Lo(){return Ro+To()}function Do(t){return t.startsWith(Ro)}function $o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Mo(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function No(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Mo(i,r,o,a,u,"next",t)}function u(t){Mo(i,r,o,a,u,"throw",t)}a(void 0)}))}}function Uo(t){return function(t){if(Array.isArray(t))return $o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return $o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Bo={};function Fo(){return Object.values(Bo)}function Ho(t){Bo[t.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(t.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),Bo[t.id]=t}function Vo(t){return zo.apply(this,arguments)}function zo(){return(zo=No(x().mark((function t(e){var n;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ii();case 2:return n=t.sent,t.next=5,Go(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Go(t,e){return Ko.apply(this,arguments)}function Ko(){return Ko=No(x().mark((function t(e,n){var r,o;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,users:e}:{users:e},o=new Br,t.next=4,o.dynamicOfflineData.where(r).toArray().catch(jr.errnames.DatabaseClosed,(function(){return[]}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)}))),Ko.apply(this,arguments)}function qo(t,e){return Zo.apply(this,arguments)}function Zo(){return(Zo=No(x().mark((function t(e,n){var r;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ii();case 2:return r=t.sent,t.next=5,Wo(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Wo(t,e,n){return Yo.apply(this,arguments)}function Yo(){return Yo=No(x().mark((function t(e,n,r){var o,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Br,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r}).catch(jr.errnames.DatabaseClosed,(function(){}));case 3:if(i=t.sent){t.next=9;break}return t.next=7,o.dynamicOfflineData.add({users:[e],type:n,identifier:r}).catch(jr.errnames.DatabaseClosed);case 7:t.next=12;break;case 9:if(i.users.includes(e)){t.next=12;break}return t.next=12,o.dynamicOfflineData.update(i.id,{users:Uo(i.users).concat([e])}).catch(jr.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)}))),Yo.apply(this,arguments)}function Xo(t,e){return Jo.apply(this,arguments)}function Jo(){return(Jo=No(x().mark((function t(e,n){var r;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ii();case 2:return r=t.sent,t.next=5,Qo(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qo(t,e,n){return ti.apply(this,arguments)}function ti(){return ti=No(x().mark((function t(e,n,r){var o,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Br,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r,users:e}).catch(jr.errnames.DatabaseClosed,(function(){}));case 3:if(!(i=t.sent)){t.next=12;break}if(!(i.users.length>1)){t.next=10;break}return t.next=8,o.dynamicOfflineData.update(i.id,{users:i.users.filter((function(t){return t!==e}))}).catch(jr.errnames.DatabaseClosed);case 8:t.next=12;break;case 10:return t.next=12,o.dynamicOfflineData.delete(i.id).catch(jr.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)}))),ti.apply(this,arguments)}function ei(t,e){return ni.apply(this,arguments)}function ni(){return ni=No(x().mark((function t(e,n){var r;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Vo(e);case 2:return r=t.sent,t.next=5,Promise.all(r.map(function(){var t=No(x().mark((function t(e){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",ri(e.type,e.identifier,n));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:case"end":return t.stop()}}),t)}))),ni.apply(this,arguments)}function ri(t,e,n){return oi.apply(this,arguments)}function oi(){return oi=No(x().mark((function t(e,n,r){var o,i,a,u,s,c,l,f,h;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qo(e,n);case 2:return o=new Br,t.next=5,ii();case 5:return i=t.sent,t.next=8,o.dynamicOfflineData.get({type:e,identifier:n}).catch(jr.errnames.DatabaseClosed,(function(){}));case 8:if(a=t.sent,u=Fo().filter((function(t){return t.type===e})),a){t.next=12;break}return t.abrupt("return");case 12:return t.next=14,Promise.all(u.map(function(){var t=No(x().mark((function t(e){var o,i,a;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.sync(n,r),t.abrupt("return",{id:e.id,error:void 0});case 5:return t.prev=5,t.t0=t.catch(0),a=null!==(i=null===(o=t.t0.message)||void 0===o?void 0:o.toString())&&void 0!==i?i:t.t0.toString(),t.abrupt("return",{id:e.id,error:a});case 11:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 14:if(s=t.sent,c=s.filter((function(t){return!t.error})).map((function(t){return t.id})),l=s.filter((function(t){return t.error})).map((function(t){return t.id})),f=s.filter((function(t){return t.error})).map((function(t){return{handlerId:t.id,message:t.error}})),h={syncedOn:new Date,syncedBy:i,succeededHandlers:c,erroredHandlers:l,errors:f},!a.id){t.next=22;break}return t.next=22,o.dynamicOfflineData.update(a.id,{syncState:h}).catch(jr.errnames.DatabaseClosed);case 22:case"end":return t.stop()}}),t)}))),oi.apply(this,arguments)}function ii(){return ai.apply(this,arguments)}function ai(){return(ai=No(x().mark((function t(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Lr.getLoggedInUser)();case 2:if(e=t.sent.uuid){t.next=5;break}throw new Error("Using the dynamic offline data API requires a logged in user.");case 5:return t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ui(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function si(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){ui(i,r,o,a,u,"next",t)}function u(t){ui(i,r,o,a,u,"throw",t)}a(void 0)}))}}var ci=(0,Dr.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function li(){return di(),ci}function fi(t,e){di(),Ho({type:"patient",displayName:e.displayName,id:t,isSynced:function(){return Promise.resolve(!0)},sync:function(t,n){return e.onOfflinePatientAdded({patientUuid:t,signal:null!=n?n:(new AbortController).signal})}})}function hi(t){return pi.apply(this,arguments)}function pi(){return(pi=si(x().mark((function t(e){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return di(),t.next=3,ri("patient",e);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function di(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}})(),u})())}}}))},4211:(t,e,n)=>{t=n.nmd(t),System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(r,o){var i={},a={},u={},s={},c={},l={},f={},h={},p={};return{setters:[function(t){i.createContext=t.createContext,i.createElement=t.createElement,i.default=t.default,i.useCallback=t.useCallback,i.useContext=t.useContext,i.useDebugValue=t.useDebugValue,i.useEffect=t.useEffect,i.useLayoutEffect=t.useLayoutEffect,i.useMemo=t.useMemo,i.useReducer=t.useReducer,i.useRef=t.useRef,i.useState=t.useState},function(t){a.getConfigStore=t.getConfigStore,a.getExtensionConfigFromStore=t.getExtensionConfigFromStore,a.getExtensionsConfigStore=t.getExtensionsConfigStore,a.interpolateUrl=t.interpolateUrl,a.navigate=t.navigate},function(t){u.getConnectedExtensions=t.getConnectedExtensions,u.getExtensionInternalStore=t.getExtensionInternalStore,u.getExtensionStore=t.getExtensionStore,u.registerExtensionSlot=t.registerExtensionSlot,u.renderExtension=t.renderExtension},function(t){s.subscribeConnectivityChanged=t.subscribeConnectivityChanged},function(t){c.default=t.default},function(t){l.default=t.default},function(t){f.I18nextProvider=t.I18nextProvider},function(t){h.defaultVisitCustomRepresentation=t.defaultVisitCustomRepresentation,h.fetchCurrentPatient=t.fetchCurrentPatient,h.getCurrentUser=t.getCurrentUser,h.getLocations=t.getLocations,h.getSessionStore=t.getSessionStore,h.getVisitTypes=t.getVisitTypes,h.openmrsFetch=t.openmrsFetch,h.userHasAccess=t.userHasAccess},function(t){p.default=t.default}],execute:function(){r((()=>{var r={332:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},891:function(t,e,n){var r;t=n.nmd(t),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",s=32,c=128,l=1/0,f=9007199254740991,h=NaN,p=4294967295,d=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],v="[object Arguments]",y="[object Array]",g="[object Boolean]",m="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",x="[object Map]",S="[object Number]",E="[object Object]",O="[object Promise]",j="[object RegExp]",C="[object Set]",A="[object String]",P="[object Symbol]",k="[object WeakMap]",I="[object ArrayBuffer]",T="[object DataView]",R="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",$="[object Int16Array]",M="[object Int32Array]",N="[object Uint8Array]",U="[object Uint8ClampedArray]",B="[object Uint16Array]",F="[object Uint32Array]",H=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,q=RegExp(G.source),Z=RegExp(K.source),W=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,st=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,lt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,pt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="a-z\\xdf-\\xf6\\xf8-\\xff",St="A-Z\\xc0-\\xd6\\xd8-\\xde",Et="\\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",Ot="["+Et+"]",jt="["+_t+"]",Ct="\\d+",At="["+xt+"]",Pt="[^\\ud800-\\udfff"+Et+Ct+"\\u2700-\\u27bf"+xt+St+"]",kt="\\ud83c[\\udffb-\\udfff]",It="[^\\ud800-\\udfff]",Tt="(?:\\ud83c[\\udde6-\\uddff]){2}",Rt="[\\ud800-\\udbff][\\udc00-\\udfff]",Lt="["+St+"]",Dt="(?:"+At+"|"+Pt+")",$t="(?:"+Lt+"|"+Pt+")",Mt="(?:['’](?:d|ll|m|re|s|t|ve))?",Nt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+jt+"|"+kt+")?",Bt="[\\ufe0e\\ufe0f]?",Ft=Bt+Ut+"(?:\\u200d(?:"+[It,Tt,Rt].join("|")+")"+Bt+Ut+")*",Ht="(?:"+["[\\u2700-\\u27bf]",Tt,Rt].join("|")+")"+Ft,Vt="(?:"+[It+jt+"?",jt,Tt,Rt,"[\\ud800-\\udfff]"].join("|")+")",zt=RegExp("['’]","g"),Gt=RegExp(jt,"g"),Kt=RegExp(kt+"(?="+kt+")|"+Vt+Ft,"g"),qt=RegExp([Lt+"?"+At+"+"+Mt+"(?="+[Ot,Lt,"$"].join("|")+")",$t+"+"+Nt+"(?="+[Ot,Lt+Dt,"$"].join("|")+")",Lt+"?"+Dt+"+"+Mt,Lt+"+"+Nt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ct,Ht].join("|"),"g"),Zt=RegExp("[\\u200d\\ud800-\\udfff"+_t+"\\ufe0e\\ufe0f]"),Wt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yt=["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"],Xt=-1,Jt={};Jt[R]=Jt[L]=Jt[D]=Jt[$]=Jt[M]=Jt[N]=Jt[U]=Jt[B]=Jt[F]=!0,Jt[v]=Jt[y]=Jt[I]=Jt[g]=Jt[T]=Jt[m]=Jt[b]=Jt[w]=Jt[x]=Jt[S]=Jt[E]=Jt[j]=Jt[C]=Jt[A]=Jt[k]=!1;var Qt={};Qt[v]=Qt[y]=Qt[I]=Qt[T]=Qt[g]=Qt[m]=Qt[R]=Qt[L]=Qt[D]=Qt[$]=Qt[M]=Qt[x]=Qt[S]=Qt[E]=Qt[j]=Qt[C]=Qt[A]=Qt[P]=Qt[N]=Qt[U]=Qt[B]=Qt[F]=!0,Qt[b]=Qt[w]=Qt[k]=!1;var te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ee=parseFloat,ne=parseInt,re="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,oe="object"==typeof self&&self&&self.Object===Object&&self,ie=re||oe||Function("return this")(),ae=e&&!e.nodeType&&e,ue=ae&&t&&!t.nodeType&&t,se=ue&&ue.exports===ae,ce=se&&re.process,le=function(){try{return ue&&ue.require&&ue.require("util").types||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),fe=le&&le.isArrayBuffer,he=le&&le.isDate,pe=le&&le.isMap,de=le&&le.isRegExp,ve=le&&le.isSet,ye=le&&le.isTypedArray;function ge(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function me(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var a=t[o];e(r,a,n(a),t)}return r}function be(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function we(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function _e(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function xe(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}function Se(t,e){return!(null==t||!t.length)&&Re(t,e,0)>-1}function Ee(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Oe(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function je(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Ce(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function Ae(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function Pe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var ke=Me("length");function Ie(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function Te(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Re(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Te(t,De,n)}function Le(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function De(t){return t!=t}function $e(t,e){var n=null==t?0:t.length;return n?Be(t,e)/n:h}function Me(t){return function(e){return null==e?o:e[t]}}function Ne(t){return function(e){return null==t?o:t[e]}}function Ue(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function Be(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function Fe(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function He(t){return t?t.slice(0,an(t)+1).replace(rt,""):t}function Ve(t){return function(e){return t(e)}}function ze(t,e){return Oe(e,(function(e){return t[e]}))}function Ge(t,e){return t.has(e)}function Ke(t,e){for(var n=-1,r=t.length;++n<r&&Re(e,t[n],0)>-1;);return n}function qe(t,e){for(var n=t.length;n--&&Re(e,t[n],0)>-1;);return n}function Ze(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var We=Ne({À:"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"}),Ye=Ne({"&":"&","<":"<",">":">",'"':""","'":"'"});function Xe(t){return"\\"+te[t]}function Je(t){return Zt.test(t)}function Qe(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function tn(t,e){return function(n){return t(e(n))}}function en(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var a=t[n];a!==e&&a!==u||(t[n]=u,i[o++]=n)}return i}function nn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function rn(t){return Je(t)?function(t){for(var e=Kt.lastIndex=0;Kt.test(t);)++e;return e}(t):ke(t)}function on(t){return Je(t)?function(t){return t.match(Kt)||[]}(t):function(t){return t.split("")}(t)}function an(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var un=Ne({"&":"&","<":"<",">":">",""":'"',"'":"'"}),sn=function t(e){var n,r=(e=null==e?ie:sn.defaults(ie.Object(),e,sn.pick(ie,Yt))).Array,ot=e.Date,_t=e.Error,xt=e.Function,St=e.Math,Et=e.Object,Ot=e.RegExp,jt=e.String,Ct=e.TypeError,At=r.prototype,Pt=xt.prototype,kt=Et.prototype,It=e["__core-js_shared__"],Tt=Pt.toString,Rt=kt.hasOwnProperty,Lt=0,Dt=(n=/[^.]+$/.exec(It&&It.keys&&It.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",$t=kt.toString,Mt=Tt.call(Et),Nt=ie._,Ut=Ot("^"+Tt.call(Rt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bt=se?e.Buffer:o,Ft=e.Symbol,Ht=e.Uint8Array,Vt=Bt?Bt.allocUnsafe:o,Kt=tn(Et.getPrototypeOf,Et),Zt=Et.create,te=kt.propertyIsEnumerable,re=At.splice,oe=Ft?Ft.isConcatSpreadable:o,ae=Ft?Ft.iterator:o,ue=Ft?Ft.toStringTag:o,ce=function(){try{var t=ci(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),le=e.clearTimeout!==ie.clearTimeout&&e.clearTimeout,ke=ot&&ot.now!==ie.Date.now&&ot.now,Ne=e.setTimeout!==ie.setTimeout&&e.setTimeout,cn=St.ceil,ln=St.floor,fn=Et.getOwnPropertySymbols,hn=Bt?Bt.isBuffer:o,pn=e.isFinite,dn=At.join,vn=tn(Et.keys,Et),yn=St.max,gn=St.min,mn=ot.now,bn=e.parseInt,wn=St.random,_n=At.reverse,xn=ci(e,"DataView"),Sn=ci(e,"Map"),En=ci(e,"Promise"),On=ci(e,"Set"),jn=ci(e,"WeakMap"),Cn=ci(Et,"create"),An=jn&&new jn,Pn={},kn=Ni(xn),In=Ni(Sn),Tn=Ni(En),Rn=Ni(On),Ln=Ni(jn),Dn=Ft?Ft.prototype:o,$n=Dn?Dn.valueOf:o,Mn=Dn?Dn.toString:o;function Nn(t){if(eu(t)&&!za(t)&&!(t instanceof Hn)){if(t instanceof Fn)return t;if(Rt.call(t,"__wrapped__"))return Ui(t)}return new Fn(t)}var Un=function(){function t(){}return function(e){if(!tu(e))return{};if(Zt)return Zt(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function Bn(){}function Fn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function Hn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Kn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Gn;++e<n;)this.add(t[e])}function qn(t){var e=this.__data__=new zn(t);this.size=e.size}function Zn(t,e){var n=za(t),r=!n&&Va(t),o=!n&&!r&&Za(t),i=!n&&!r&&!o&&cu(t),a=n||r||o||i,u=a?Fe(t.length,jt):[],s=u.length;for(var c in t)!e&&!Rt.call(t,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yi(c,s))||u.push(c);return u}function Wn(t){var e=t.length;return e?t[Gr(0,e-1)]:o}function Yn(t,e){return Ri(Co(t),ir(e,0,t.length))}function Xn(t){return Ri(Co(t))}function Jn(t,e,n){(n!==o&&!Ba(t[e],n)||n===o&&!(e in t))&&rr(t,e,n)}function Qn(t,e,n){var r=t[e];Rt.call(t,e)&&Ba(r,n)&&(n!==o||e in t)||rr(t,e,n)}function tr(t,e){for(var n=t.length;n--;)if(Ba(t[n][0],e))return n;return-1}function er(t,e,n,r){return lr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function nr(t,e){return t&&Ao(e,Iu(e),t)}function rr(t,e,n){"__proto__"==e&&ce?ce(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function or(t,e){for(var n=-1,i=e.length,a=r(i),u=null==t;++n<i;)a[n]=u?o:ju(t,e[n]);return a}function ir(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function ar(t,e,n,r,i,a){var u,s=1&e,c=2&e,l=4&e;if(n&&(u=i?n(t,r,i,a):n(t)),u!==o)return u;if(!tu(t))return t;var f=za(t);if(f){if(u=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Co(t,u)}else{var h=hi(t),p=h==w||h==_;if(Za(t))return _o(t,s);if(h==E||h==v||p&&!i){if(u=c||p?{}:di(t),!s)return c?function(t,e){return Ao(t,fi(t),e)}(t,function(t,e){return t&&Ao(e,Tu(e),t)}(u,t)):function(t,e){return Ao(t,li(t),e)}(t,nr(u,t))}else{if(!Qt[h])return i?t:{};u=function(t,e,n){var r,o=t.constructor;switch(e){case I:return xo(t);case g:case m:return new o(+t);case T:return function(t,e){var n=e?xo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case L:case D:case $:case M:case N:case U:case B:case F:return So(t,n);case x:return new o;case S:case A:return new o(t);case j:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case C:return new o;case P:return r=t,$n?Et($n.call(r)):{}}}(t,h,s)}}a||(a=new qn);var d=a.get(t);if(d)return d;a.set(t,u),au(t)?t.forEach((function(r){u.add(ar(r,e,n,r,t,a))})):nu(t)&&t.forEach((function(r,o){u.set(o,ar(r,e,n,o,t,a))}));var y=f?o:(l?c?ni:ei:c?Tu:Iu)(t);return be(y||t,(function(r,o){y&&(r=t[o=r]),Qn(u,o,ar(r,e,n,o,t,a))})),u}function ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=Et(t);r--;){var i=n[r],a=e[i],u=t[i];if(u===o&&!(i in t)||!a(u))return!1}return!0}function sr(t,e,n){if("function"!=typeof t)throw new Ct(i);return Pi((function(){t.apply(o,n)}),e)}function cr(t,e,n,r){var o=-1,i=Se,a=!0,u=t.length,s=[],c=e.length;if(!u)return s;n&&(e=Oe(e,Ve(n))),r?(i=Ee,a=!1):e.length>=200&&(i=Ge,a=!1,e=new Kn(e));t:for(;++o<u;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var h=c;h--;)if(e[h]===f)continue t;s.push(l)}else i(e,f,r)||s.push(l)}return s}Nn.templateSettings={escape:W,evaluate:Y,interpolate:X,variable:"",imports:{_:Nn}},Nn.prototype=Bn.prototype,Nn.prototype.constructor=Nn,Fn.prototype=Un(Bn.prototype),Fn.prototype.constructor=Fn,Hn.prototype=Un(Bn.prototype),Hn.prototype.constructor=Hn,Vn.prototype.clear=function(){this.__data__=Cn?Cn(null):{},this.size=0},Vn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Vn.prototype.get=function(t){var e=this.__data__;if(Cn){var n=e[t];return n===a?o:n}return Rt.call(e,t)?e[t]:o},Vn.prototype.has=function(t){var e=this.__data__;return Cn?e[t]!==o:Rt.call(e,t)},Vn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Cn&&e===o?a:e,this},zn.prototype.clear=function(){this.__data__=[],this.size=0},zn.prototype.delete=function(t){var e=this.__data__,n=tr(e,t);return!(n<0||(n==e.length-1?e.pop():re.call(e,n,1),--this.size,0))},zn.prototype.get=function(t){var e=this.__data__,n=tr(e,t);return n<0?o:e[n][1]},zn.prototype.has=function(t){return tr(this.__data__,t)>-1},zn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(Sn||zn),string:new Vn}},Gn.prototype.delete=function(t){var e=ui(this,t).delete(t);return this.size-=e?1:0,e},Gn.prototype.get=function(t){return ui(this,t).get(t)},Gn.prototype.has=function(t){return ui(this,t).has(t)},Gn.prototype.set=function(t,e){var n=ui(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(t){return this.__data__.set(t,a),this},Kn.prototype.has=function(t){return this.__data__.has(t)},qn.prototype.clear=function(){this.__data__=new zn,this.size=0},qn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},qn.prototype.get=function(t){return this.__data__.get(t)},qn.prototype.has=function(t){return this.__data__.has(t)},qn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof zn){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(t,e),this.size=n.size,this};var lr=Io(mr),fr=Io(br,!0);function hr(t,e){var n=!0;return lr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function pr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],u=e(a);if(null!=u&&(s===o?u==u&&!su(u):n(u,s)))var s=u,c=a}return c}function dr(t,e){var n=[];return lr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function vr(t,e,n,r,o){var i=-1,a=t.length;for(n||(n=vi),o||(o=[]);++i<a;){var u=t[i];e>0&&n(u)?e>1?vr(u,e-1,n,r,o):je(o,u):r||(o[o.length]=u)}return o}var yr=To(),gr=To(!0);function mr(t,e){return t&&yr(t,e,Iu)}function br(t,e){return t&&gr(t,e,Iu)}function wr(t,e){return xe(e,(function(e){return Xa(t[e])}))}function _r(t,e){for(var n=0,r=(e=go(e,t)).length;null!=t&&n<r;)t=t[Mi(e[n++])];return n&&n==r?t:o}function xr(t,e,n){var r=e(t);return za(t)?r:je(r,n(t))}function Sr(t){return null==t?t===o?"[object Undefined]":"[object Null]":ue&&ue in Et(t)?function(t){var e=Rt.call(t,ue),n=t[ue];try{t[ue]=o;var r=!0}catch(t){}var i=$t.call(t);return r&&(e?t[ue]=n:delete t[ue]),i}(t):function(t){return $t.call(t)}(t)}function Er(t,e){return t>e}function Or(t,e){return null!=t&&Rt.call(t,e)}function jr(t,e){return null!=t&&e in Et(t)}function Cr(t,e,n){for(var i=n?Ee:Se,a=t[0].length,u=t.length,s=u,c=r(u),l=1/0,f=[];s--;){var h=t[s];s&&e&&(h=Oe(h,Ve(e))),l=gn(h.length,l),c[s]=!n&&(e||a>=120&&h.length>=120)?new Kn(s&&h):o}h=t[0];var p=-1,d=c[0];t:for(;++p<a&&f.length<l;){var v=h[p],y=e?e(v):v;if(v=n||0!==v?v:0,!(d?Ge(d,y):i(f,y,n))){for(s=u;--s;){var g=c[s];if(!(g?Ge(g,y):i(t[s],y,n)))continue t}d&&d.push(y),f.push(v)}}return f}function Ar(t,e,n){var r=null==(t=Oi(t,e=go(e,t)))?t:t[Mi(Yi(e))];return null==r?o:ge(r,t,n)}function Pr(t){return eu(t)&&Sr(t)==v}function kr(t,e,n,r,i){return t===e||(null==t||null==e||!eu(t)&&!eu(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var u=za(t),s=za(e),c=u?y:hi(t),l=s?y:hi(e),f=(c=c==v?E:c)==E,h=(l=l==v?E:l)==E,p=c==l;if(p&&Za(t)){if(!Za(e))return!1;u=!0,f=!1}if(p&&!f)return a||(a=new qn),u||cu(t)?Qo(t,e,n,r,i,a):function(t,e,n,r,o,i,a){switch(n){case T:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case I:return!(t.byteLength!=e.byteLength||!i(new Ht(t),new Ht(e)));case g:case m:case S:return Ba(+t,+e);case b:return t.name==e.name&&t.message==e.message;case j:case A:return t==e+"";case x:var u=Qe;case C:var s=1&r;if(u||(u=nn),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=Qo(u(t),u(e),r,o,i,a);return a.delete(t),l;case P:if($n)return $n.call(t)==$n.call(e)}return!1}(t,e,c,n,r,i,a);if(!(1&n)){var d=f&&Rt.call(t,"__wrapped__"),w=h&&Rt.call(e,"__wrapped__");if(d||w){var _=d?t.value():t,O=w?e.value():e;return a||(a=new qn),i(_,O,n,r,a)}}return!!p&&(a||(a=new qn),function(t,e,n,r,i,a){var u=1&n,s=ei(t),c=s.length;if(c!=ei(e).length&&!u)return!1;for(var l=c;l--;){var f=s[l];if(!(u?f in e:Rt.call(e,f)))return!1}var h=a.get(t),p=a.get(e);if(h&&p)return h==e&&p==t;var d=!0;a.set(t,e),a.set(e,t);for(var v=u;++l<c;){var y=t[f=s[l]],g=e[f];if(r)var m=u?r(g,y,f,e,t,a):r(y,g,f,t,e,a);if(!(m===o?y===g||i(y,g,n,r,a):m)){d=!1;break}v||(v="constructor"==f)}if(d&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(d=!1)}return a.delete(t),a.delete(e),d}(t,e,n,r,i,a))}(t,e,n,r,kr,i))}function Ir(t,e,n,r){var i=n.length,a=i,u=!r;if(null==t)return!a;for(t=Et(t);i--;){var s=n[i];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var c=(s=n[i])[0],l=t[c],f=s[1];if(u&&s[2]){if(l===o&&!(c in t))return!1}else{var h=new qn;if(r)var p=r(l,f,c,t,e,h);if(!(p===o?kr(f,l,3,r,h):p))return!1}}return!0}function Tr(t){return!(!tu(t)||(e=t,Dt&&Dt in e))&&(Xa(t)?Ut:vt).test(Ni(t));var e}function Rr(t){return"function"==typeof t?t:null==t?rs:"object"==typeof t?za(t)?Nr(t[0],t[1]):Mr(t):hs(t)}function Lr(t){if(!_i(t))return vn(t);var e=[];for(var n in Et(t))Rt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Dr(t,e){return t<e}function $r(t,e){var n=-1,o=Ka(t)?r(t.length):[];return lr(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}function Mr(t){var e=si(t);return 1==e.length&&e[0][2]?Si(e[0][0],e[0][1]):function(n){return n===t||Ir(n,t,e)}}function Nr(t,e){return mi(t)&&xi(e)?Si(Mi(t),e):function(n){var r=ju(n,t);return r===o&&r===e?Cu(n,t):kr(e,r,3)}}function Ur(t,e,n,r,i){t!==e&&yr(e,(function(a,u){if(i||(i=new qn),tu(a))!function(t,e,n,r,i,a,u){var s=Ci(t,n),c=Ci(e,n),l=u.get(c);if(l)Jn(t,n,l);else{var f=a?a(s,c,n+"",t,e,u):o,h=f===o;if(h){var p=za(c),d=!p&&Za(c),v=!p&&!d&&cu(c);f=c,p||d||v?za(s)?f=s:qa(s)?f=Co(s):d?(h=!1,f=_o(c,!0)):v?(h=!1,f=So(c,!0)):f=[]:ou(c)||Va(c)?(f=s,Va(s)?f=gu(s):tu(s)&&!Xa(s)||(f=di(c))):h=!1}h&&(u.set(c,f),i(f,c,r,a,u),u.delete(c)),Jn(t,n,f)}}(t,e,u,n,Ur,r,i);else{var s=r?r(Ci(t,u),a,u+"",t,e,i):o;s===o&&(s=a),Jn(t,u,s)}}),Tu)}function Br(t,e){var n=t.length;if(n)return yi(e+=e<0?n:0,n)?t[e]:o}function Fr(t,e,n){e=e.length?Oe(e,(function(t){return za(t)?function(e){return _r(e,1===t.length?t[0]:t)}:t})):[rs];var r=-1;e=Oe(e,Ve(ai()));var o=$r(t,(function(t,n,o){var i=Oe(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,a=o.length,u=n.length;++r<a;){var s=Eo(o[r],i[r]);if(s)return r>=u?s:s*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(o)}function Hr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var a=e[r],u=_r(t,a);n(u,a)&&Yr(i,go(a,t),u)}return i}function Vr(t,e,n,r){var o=r?Le:Re,i=-1,a=e.length,u=t;for(t===e&&(e=Co(e)),n&&(u=Oe(t,Ve(n)));++i<a;)for(var s=0,c=e[i],l=n?n(c):c;(s=o(u,l,s,r))>-1;)u!==t&&re.call(u,s,1),re.call(t,s,1);return t}function zr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;yi(o)?re.call(t,o,1):so(t,o)}}return t}function Gr(t,e){return t+ln(wn()*(e-t+1))}function Kr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=ln(e/2))&&(t+=t)}while(e);return n}function qr(t,e){return ki(Ei(t,e,rs),t+"")}function Zr(t){return Wn(Bu(t))}function Wr(t,e){var n=Bu(t);return Ri(n,ir(e,0,n.length))}function Yr(t,e,n,r){if(!tu(t))return t;for(var i=-1,a=(e=go(e,t)).length,u=a-1,s=t;null!=s&&++i<a;){var c=Mi(e[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=u){var f=s[c];(l=r?r(f,c,s):o)===o&&(l=tu(f)?f:yi(e[i+1])?[]:{})}Qn(s,c,l),s=s[c]}return t}var Xr=An?function(t,e){return An.set(t,e),t}:rs,Jr=ce?function(t,e){return ce(t,"toString",{configurable:!0,enumerable:!1,value:ts(e),writable:!0})}:rs;function Qr(t){return Ri(Bu(t))}function to(t,e,n){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=r(i);++o<i;)a[o]=t[o+e];return a}function eo(t,e){var n;return lr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function no(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=t[i];null!==a&&!su(a)&&(n?a<=e:a<e)?r=i+1:o=i}return o}return ro(t,e,rs,n)}function ro(t,e,n,r){var i=0,a=null==t?0:t.length;if(0===a)return 0;for(var u=(e=n(e))!=e,s=null===e,c=su(e),l=e===o;i<a;){var f=ln((i+a)/2),h=n(t[f]),p=h!==o,d=null===h,v=h==h,y=su(h);if(u)var g=r||v;else g=l?v&&(r||p):s?v&&p&&(r||!d):c?v&&p&&!d&&(r||!y):!d&&!y&&(r?h<=e:h<e);g?i=f+1:a=f}return gn(a,4294967294)}function oo(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var a=t[n],u=e?e(a):a;if(!n||!Ba(u,s)){var s=u;i[o++]=0===a?0:a}}return i}function io(t){return"number"==typeof t?t:su(t)?h:+t}function ao(t){if("string"==typeof t)return t;if(za(t))return Oe(t,ao)+"";if(su(t))return Mn?Mn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function uo(t,e,n){var r=-1,o=Se,i=t.length,a=!0,u=[],s=u;if(n)a=!1,o=Ee;else if(i>=200){var c=e?null:qo(t);if(c)return nn(c);a=!1,o=Ge,s=new Kn}else s=e?[]:u;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=s.length;h--;)if(s[h]===f)continue t;e&&s.push(f),u.push(l)}else o(s,f,n)||(s!==u&&s.push(f),u.push(l))}return u}function so(t,e){return null==(t=Oi(t,e=go(e,t)))||delete t[Mi(Yi(e))]}function co(t,e,n,r){return Yr(t,e,n(_r(t,e)),r)}function lo(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?to(t,r?0:i,r?i+1:o):to(t,r?i+1:0,r?o:i)}function fo(t,e){var n=t;return n instanceof Hn&&(n=n.value()),Ce(e,(function(t,e){return e.func.apply(e.thisArg,je([t],e.args))}),n)}function ho(t,e,n){var o=t.length;if(o<2)return o?uo(t[0]):[];for(var i=-1,a=r(o);++i<o;)for(var u=t[i],s=-1;++s<o;)s!=i&&(a[i]=cr(a[i]||u,t[s],e,n));return uo(vr(a,1),e,n)}function po(t,e,n){for(var r=-1,i=t.length,a=e.length,u={};++r<i;){var s=r<a?e[r]:o;n(u,t[r],s)}return u}function vo(t){return qa(t)?t:[]}function yo(t){return"function"==typeof t?t:rs}function go(t,e){return za(t)?t:mi(t,e)?[t]:$i(mu(t))}var mo=qr;function bo(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:to(t,e,n)}var wo=le||function(t){return ie.clearTimeout(t)};function _o(t,e){if(e)return t.slice();var n=t.length,r=Vt?Vt(n):new t.constructor(n);return t.copy(r),r}function xo(t){var e=new t.constructor(t.byteLength);return new Ht(e).set(new Ht(t)),e}function So(t,e){var n=e?xo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Eo(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=su(t),u=e!==o,s=null===e,c=e==e,l=su(e);if(!s&&!l&&!a&&t>e||a&&u&&c&&!s&&!l||r&&u&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||s&&n&&i||!u&&i||!c)return-1}return 0}function Oo(t,e,n,o){for(var i=-1,a=t.length,u=n.length,s=-1,c=e.length,l=yn(a-u,0),f=r(c+l),h=!o;++s<c;)f[s]=e[s];for(;++i<u;)(h||i<a)&&(f[n[i]]=t[i]);for(;l--;)f[s++]=t[i++];return f}function jo(t,e,n,o){for(var i=-1,a=t.length,u=-1,s=n.length,c=-1,l=e.length,f=yn(a-s,0),h=r(f+l),p=!o;++i<f;)h[i]=t[i];for(var d=i;++c<l;)h[d+c]=e[c];for(;++u<s;)(p||i<a)&&(h[d+n[u]]=t[i++]);return h}function Co(t,e){var n=-1,o=t.length;for(e||(e=r(o));++n<o;)e[n]=t[n];return e}function Ao(t,e,n,r){var i=!n;n||(n={});for(var a=-1,u=e.length;++a<u;){var s=e[a],c=r?r(n[s],t[s],s,n,t):o;c===o&&(c=t[s]),i?rr(n,s,c):Qn(n,s,c)}return n}function Po(t,e){return function(n,r){var o=za(n)?me:er,i=e?e():{};return o(n,t,ai(r,2),i)}}function ko(t){return qr((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,u=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,u&&gi(n[0],n[1],u)&&(a=i<3?o:a,i=1),e=Et(e);++r<i;){var s=n[r];s&&t(e,s,r,a)}return e}))}function Io(t,e){return function(n,r){if(null==n)return n;if(!Ka(n))return t(n,r);for(var o=n.length,i=e?o:-1,a=Et(n);(e?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function To(t){return function(e,n,r){for(var o=-1,i=Et(e),a=r(e),u=a.length;u--;){var s=a[t?u:++o];if(!1===n(i[s],s,i))break}return e}}function Ro(t){return function(e){var n=Je(e=mu(e))?on(e):o,r=n?n[0]:e.charAt(0),i=n?bo(n,1).join(""):e.slice(1);return r[t]()+i}}function Lo(t){return function(e){return Ce(Xu(Vu(e).replace(zt,"")),t,"")}}function Do(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Un(t.prototype),r=t.apply(n,e);return tu(r)?r:n}}function $o(t){return function(e,n,r){var i=Et(e);if(!Ka(e)){var a=ai(n,3);e=Iu(e),n=function(t){return a(i[t],t,i)}}var u=t(e,n,r);return u>-1?i[a?e[u]:u]:o}}function Mo(t){return ti((function(e){var n=e.length,r=n,a=Fn.prototype.thru;for(t&&e.reverse();r--;){var u=e[r];if("function"!=typeof u)throw new Ct(i);if(a&&!s&&"wrapper"==oi(u))var s=new Fn([],!0)}for(r=s?r:n;++r<n;){var c=oi(u=e[r]),l="wrapper"==c?ri(u):o;s=l&&bi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?s[oi(l[0])].apply(s,l[3]):1==u.length&&bi(u)?s[c]():s.thru(u)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&za(r))return s.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))}function No(t,e,n,i,a,u,s,l,f,h){var p=e&c,d=1&e,v=2&e,y=24&e,g=512&e,m=v?o:Do(t);return function o(){for(var c=arguments.length,b=r(c),w=c;w--;)b[w]=arguments[w];if(y)var _=ii(o),x=Ze(b,_);if(i&&(b=Oo(b,i,a,y)),u&&(b=jo(b,u,s,y)),c-=x,y&&c<h){var S=en(b,_);return Go(t,e,No,o.placeholder,n,b,S,l,f,h-c)}var E=d?n:this,O=v?E[t]:t;return c=b.length,l?b=ji(b,l):g&&c>1&&b.reverse(),p&&f<c&&(b.length=f),this&&this!==ie&&this instanceof o&&(O=m||Do(O)),O.apply(E,b)}}function Uo(t,e){return function(n,r){return function(t,e,n,r){return mr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function Bo(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ao(n),r=ao(r)):(n=io(n),r=io(r)),i=t(n,r)}return i}}function Fo(t){return ti((function(e){return e=Oe(e,Ve(ai())),qr((function(n){var r=this;return t(e,(function(t){return ge(t,r,n)}))}))}))}function Ho(t,e){var n=(e=e===o?" ":ao(e)).length;if(n<2)return n?Kr(e,t):e;var r=Kr(e,cn(t/rn(e)));return Je(e)?bo(on(r),0,t).join(""):r.slice(0,t)}function Vo(t){return function(e,n,i){return i&&"number"!=typeof i&&gi(e,n,i)&&(n=i=o),e=pu(e),n===o?(n=e,e=0):n=pu(n),function(t,e,n,o){for(var i=-1,a=yn(cn((e-t)/(n||1)),0),u=r(a);a--;)u[o?a:++i]=t,t+=n;return u}(e,n,i=i===o?e<n?1:-1:pu(i),t)}}function zo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=yu(e),n=yu(n)),t(e,n)}}function Go(t,e,n,r,i,a,u,c,l,f){var h=8&e;e|=h?s:64,4&(e&=~(h?64:s))||(e&=-4);var p=[t,e,i,h?a:o,h?u:o,h?o:a,h?o:u,c,l,f],d=n.apply(o,p);return bi(t)&&Ai(d,p),d.placeholder=r,Ii(d,t,e)}function Ko(t){var e=St[t];return function(t,n){if(t=yu(t),(n=null==n?0:gn(du(n),292))&&pn(t)){var r=(mu(t)+"e").split("e");return+((r=(mu(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var qo=On&&1/nn(new On([,-0]))[1]==l?function(t){return new On(t)}:ss;function Zo(t){return function(e){var n=hi(e);return n==x?Qe(e):n==C?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):function(t,e){return Oe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Wo(t,e,n,a,l,f,h,p){var d=2&e;if(!d&&"function"!=typeof t)throw new Ct(i);var v=a?a.length:0;if(v||(e&=-97,a=l=o),h=h===o?h:yn(du(h),0),p=p===o?p:du(p),v-=l?l.length:0,64&e){var y=a,g=l;a=l=o}var m=d?o:ri(t),b=[t,e,n,a,l,y,g,f,h,p];if(m&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,a=r==c&&8==n||r==c&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!a)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var s=e[3];if(s){var l=t[3];t[3]=l?Oo(l,s,e[4]):s,t[4]=l?en(t[3],u):e[4]}(s=e[5])&&(l=t[5],t[5]=l?jo(l,s,e[6]):s,t[6]=l?en(t[5],u):e[6]),(s=e[7])&&(t[7]=s),r&c&&(t[8]=null==t[8]?e[8]:gn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(b,m),t=b[0],e=b[1],n=b[2],a=b[3],l=b[4],!(p=b[9]=b[9]===o?d?0:t.length:yn(b[9]-v,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,n){var i=Do(t);return function a(){for(var u=arguments.length,s=r(u),c=u,l=ii(a);c--;)s[c]=arguments[c];var f=u<3&&s[0]!==l&&s[u-1]!==l?[]:en(s,l);return(u-=f.length)<n?Go(t,e,No,a.placeholder,o,s,f,o,o,n-u):ge(this&&this!==ie&&this instanceof a?i:t,this,s)}}(t,e,p):e!=s&&33!=e||l.length?No.apply(o,b):function(t,e,n,o){var i=1&e,a=Do(t);return function e(){for(var u=-1,s=arguments.length,c=-1,l=o.length,f=r(l+s),h=this&&this!==ie&&this instanceof e?a:t;++c<l;)f[c]=o[c];for(;s--;)f[c++]=arguments[++u];return ge(h,i?n:this,f)}}(t,e,n,a);else var w=function(t,e,n){var r=1&e,o=Do(t);return function e(){return(this&&this!==ie&&this instanceof e?o:t).apply(r?n:this,arguments)}}(t,e,n);return Ii((m?Xr:Ai)(w,b),t,e)}function Yo(t,e,n,r){return t===o||Ba(t,kt[n])&&!Rt.call(r,n)?e:t}function Xo(t,e,n,r,i,a){return tu(t)&&tu(e)&&(a.set(e,t),Ur(t,e,o,Xo,a),a.delete(e)),t}function Jo(t){return ou(t)?o:t}function Qo(t,e,n,r,i,a){var u=1&n,s=t.length,c=e.length;if(s!=c&&!(u&&c>s))return!1;var l=a.get(t),f=a.get(e);if(l&&f)return l==e&&f==t;var h=-1,p=!0,d=2&n?new Kn:o;for(a.set(t,e),a.set(e,t);++h<s;){var v=t[h],y=e[h];if(r)var g=u?r(y,v,h,e,t,a):r(v,y,h,t,e,a);if(g!==o){if(g)continue;p=!1;break}if(d){if(!Pe(e,(function(t,e){if(!Ge(d,e)&&(v===t||i(v,t,n,r,a)))return d.push(e)}))){p=!1;break}}else if(v!==y&&!i(v,y,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function ti(t){return ki(Ei(t,o,Gi),t+"")}function ei(t){return xr(t,Iu,li)}function ni(t){return xr(t,Tu,fi)}var ri=An?function(t){return An.get(t)}:ss;function oi(t){for(var e=t.name+"",n=Pn[e],r=Rt.call(Pn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ii(t){return(Rt.call(Nn,"placeholder")?Nn:t).placeholder}function ai(){var t=Nn.iteratee||os;return t=t===os?Rr:t,arguments.length?t(arguments[0],arguments[1]):t}function ui(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function si(t){for(var e=Iu(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,xi(o)]}return e}function ci(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Tr(n)?n:o}var li=fn?function(t){return null==t?[]:(t=Et(t),xe(fn(t),(function(e){return te.call(t,e)})))}:vs,fi=fn?function(t){for(var e=[];t;)je(e,li(t)),t=Kt(t);return e}:vs,hi=Sr;function pi(t,e,n){for(var r=-1,o=(e=go(e,t)).length,i=!1;++r<o;){var a=Mi(e[r]);if(!(i=null!=t&&n(t,a)))break;t=t[a]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Qa(o)&&yi(a,o)&&(za(t)||Va(t))}function di(t){return"function"!=typeof t.constructor||_i(t)?{}:Un(Kt(t))}function vi(t){return za(t)||Va(t)||!!(oe&&t&&t[oe])}function yi(t,e){var n=typeof t;return!!(e=null==e?f:e)&&("number"==n||"symbol"!=n&>.test(t))&&t>-1&&t%1==0&&t<e}function gi(t,e,n){if(!tu(n))return!1;var r=typeof e;return!!("number"==r?Ka(n)&&yi(e,n.length):"string"==r&&e in n)&&Ba(n[e],t)}function mi(t,e){if(za(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!su(t))||Q.test(t)||!J.test(t)||null!=e&&t in Et(e)}function bi(t){var e=oi(t),n=Nn[e];if("function"!=typeof n||!(e in Hn.prototype))return!1;if(t===n)return!0;var r=ri(n);return!!r&&t===r[0]}(xn&&hi(new xn(new ArrayBuffer(1)))!=T||Sn&&hi(new Sn)!=x||En&&hi(En.resolve())!=O||On&&hi(new On)!=C||jn&&hi(new jn)!=k)&&(hi=function(t){var e=Sr(t),n=e==E?t.constructor:o,r=n?Ni(n):"";if(r)switch(r){case kn:return T;case In:return x;case Tn:return O;case Rn:return C;case Ln:return k}return e});var wi=It?Xa:ys;function _i(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||kt)}function xi(t){return t==t&&!tu(t)}function Si(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in Et(n))}}function Ei(t,e,n){return e=yn(e===o?t.length-1:e,0),function(){for(var o=arguments,i=-1,a=yn(o.length-e,0),u=r(a);++i<a;)u[i]=o[e+i];i=-1;for(var s=r(e+1);++i<e;)s[i]=o[i];return s[e]=n(u),ge(t,this,s)}}function Oi(t,e){return e.length<2?t:_r(t,to(e,0,-1))}function ji(t,e){for(var n=t.length,r=gn(e.length,n),i=Co(t);r--;){var a=e[r];t[r]=yi(a,n)?i[a]:o}return t}function Ci(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ai=Ti(Xr),Pi=Ne||function(t,e){return ie.setTimeout(t,e)},ki=Ti(Jr);function Ii(t,e,n){var r=e+"";return ki(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return be(d,(function(n){var r="_."+n[0];e&n[1]&&!Se(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(at);return e?e[1].split(ut):[]}(r),n)))}function Ti(t){var e=0,n=0;return function(){var r=mn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Ri(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=Gr(n,i),u=t[a];t[a]=t[n],t[n]=u}return t.length=e,t}var Li,Di,$i=(Li=La((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,o){e.push(r?o.replace(lt,"$1"):n||t)})),e}),(function(t){return 500===Di.size&&Di.clear(),t})),Di=Li.cache,Li);function Mi(t){if("string"==typeof t||su(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ni(t){if(null!=t){try{return Tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ui(t){if(t instanceof Hn)return t.clone();var e=new Fn(t.__wrapped__,t.__chain__);return e.__actions__=Co(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Bi=qr((function(t,e){return qa(t)?cr(t,vr(e,1,qa,!0)):[]})),Fi=qr((function(t,e){var n=Yi(e);return qa(n)&&(n=o),qa(t)?cr(t,vr(e,1,qa,!0),ai(n,2)):[]})),Hi=qr((function(t,e){var n=Yi(e);return qa(n)&&(n=o),qa(t)?cr(t,vr(e,1,qa,!0),o,n):[]}));function Vi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:du(n);return o<0&&(o=yn(r+o,0)),Te(t,ai(e,3),o)}function zi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=du(n),i=n<0?yn(r+i,0):gn(i,r-1)),Te(t,ai(e,3),i,!0)}function Gi(t){return null!=t&&t.length?vr(t,1):[]}function Ki(t){return t&&t.length?t[0]:o}var qi=qr((function(t){var e=Oe(t,vo);return e.length&&e[0]===t[0]?Cr(e):[]})),Zi=qr((function(t){var e=Yi(t),n=Oe(t,vo);return e===Yi(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Cr(n,ai(e,2)):[]})),Wi=qr((function(t){var e=Yi(t),n=Oe(t,vo);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?Cr(n,o,e):[]}));function Yi(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Xi=qr(Ji);function Ji(t,e){return t&&t.length&&e&&e.length?Vr(t,e):t}var Qi=ti((function(t,e){var n=null==t?0:t.length,r=or(t,e);return zr(t,Oe(e,(function(t){return yi(t,n)?+t:t})).sort(Eo)),r}));function ta(t){return null==t?t:_n.call(t)}var ea=qr((function(t){return uo(vr(t,1,qa,!0))})),na=qr((function(t){var e=Yi(t);return qa(e)&&(e=o),uo(vr(t,1,qa,!0),ai(e,2))})),ra=qr((function(t){var e=Yi(t);return e="function"==typeof e?e:o,uo(vr(t,1,qa,!0),o,e)}));function oa(t){if(!t||!t.length)return[];var e=0;return t=xe(t,(function(t){if(qa(t))return e=yn(t.length,e),!0})),Fe(e,(function(e){return Oe(t,Me(e))}))}function ia(t,e){if(!t||!t.length)return[];var n=oa(t);return null==e?n:Oe(n,(function(t){return ge(e,o,t)}))}var aa=qr((function(t,e){return qa(t)?cr(t,e):[]})),ua=qr((function(t){return ho(xe(t,qa))})),sa=qr((function(t){var e=Yi(t);return qa(e)&&(e=o),ho(xe(t,qa),ai(e,2))})),ca=qr((function(t){var e=Yi(t);return e="function"==typeof e?e:o,ho(xe(t,qa),o,e)})),la=qr(oa),fa=qr((function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,ia(t,n)}));function ha(t){var e=Nn(t);return e.__chain__=!0,e}function pa(t,e){return e(t)}var da=ti((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return or(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Hn&&yi(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:pa,args:[i],thisArg:o}),new Fn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)})),va=Po((function(t,e,n){Rt.call(t,n)?++t[n]:rr(t,n,1)})),ya=$o(Vi),ga=$o(zi);function ma(t,e){return(za(t)?be:lr)(t,ai(e,3))}function ba(t,e){return(za(t)?we:fr)(t,ai(e,3))}var wa=Po((function(t,e,n){Rt.call(t,n)?t[n].push(e):rr(t,n,[e])})),_a=qr((function(t,e,n){var o=-1,i="function"==typeof e,a=Ka(t)?r(t.length):[];return lr(t,(function(t){a[++o]=i?ge(e,t,n):Ar(t,e,n)})),a})),xa=Po((function(t,e,n){rr(t,n,e)}));function Sa(t,e){return(za(t)?Oe:$r)(t,ai(e,3))}var Ea=Po((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Oa=qr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&gi(t,e[0],e[1])?e=[]:n>2&&gi(e[0],e[1],e[2])&&(e=[e[0]]),Fr(t,vr(e,1),[])})),ja=ke||function(){return ie.Date.now()};function Ca(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,Wo(t,c,o,o,o,o,e)}function Aa(t,e){var n;if("function"!=typeof e)throw new Ct(i);return t=du(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var Pa=qr((function(t,e,n){var r=1;if(n.length){var o=en(n,ii(Pa));r|=s}return Wo(t,r,e,n,o)})),ka=qr((function(t,e,n){var r=3;if(n.length){var o=en(n,ii(ka));r|=s}return Wo(e,r,t,n,o)}));function Ia(t,e,n){var r,a,u,s,c,l,f=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new Ct(i);function v(e){var n=r,i=a;return r=a=o,f=e,s=t.apply(i,n)}function y(t){return f=t,c=Pi(m,e),h?v(t):s}function g(t){var n=t-l;return l===o||n>=e||n<0||p&&t-f>=u}function m(){var t=ja();if(g(t))return b(t);c=Pi(m,function(t){var n=e-(t-l);return p?gn(n,u-(t-f)):n}(t))}function b(t){return c=o,d&&r?v(t):(r=a=o,s)}function w(){var t=ja(),n=g(t);if(r=arguments,a=this,l=t,n){if(c===o)return y(l);if(p)return wo(c),c=Pi(m,e),v(l)}return c===o&&(c=Pi(m,e)),s}return e=yu(e)||0,tu(n)&&(h=!!n.leading,u=(p="maxWait"in n)?yn(yu(n.maxWait)||0,e):u,d="trailing"in n?!!n.trailing:d),w.cancel=function(){c!==o&&wo(c),f=0,r=l=a=c=o},w.flush=function(){return c===o?s:b(ja())},w}var Ta=qr((function(t,e){return sr(t,1,e)})),Ra=qr((function(t,e,n){return sr(t,yu(e)||0,n)}));function La(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Ct(i);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(La.Cache||Gn),n}function Da(t){if("function"!=typeof t)throw new Ct(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}La.Cache=Gn;var $a=mo((function(t,e){var n=(e=1==e.length&&za(e[0])?Oe(e[0],Ve(ai())):Oe(vr(e,1),Ve(ai()))).length;return qr((function(r){for(var o=-1,i=gn(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return ge(t,this,r)}))})),Ma=qr((function(t,e){var n=en(e,ii(Ma));return Wo(t,s,o,e,n)})),Na=qr((function(t,e){var n=en(e,ii(Na));return Wo(t,64,o,e,n)})),Ua=ti((function(t,e){return Wo(t,256,o,o,o,e)}));function Ba(t,e){return t===e||t!=t&&e!=e}var Fa=zo(Er),Ha=zo((function(t,e){return t>=e})),Va=Pr(function(){return arguments}())?Pr:function(t){return eu(t)&&Rt.call(t,"callee")&&!te.call(t,"callee")},za=r.isArray,Ga=fe?Ve(fe):function(t){return eu(t)&&Sr(t)==I};function Ka(t){return null!=t&&Qa(t.length)&&!Xa(t)}function qa(t){return eu(t)&&Ka(t)}var Za=hn||ys,Wa=he?Ve(he):function(t){return eu(t)&&Sr(t)==m};function Ya(t){if(!eu(t))return!1;var e=Sr(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ou(t)}function Xa(t){if(!tu(t))return!1;var e=Sr(t);return e==w||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ja(t){return"number"==typeof t&&t==du(t)}function Qa(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function tu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function eu(t){return null!=t&&"object"==typeof t}var nu=pe?Ve(pe):function(t){return eu(t)&&hi(t)==x};function ru(t){return"number"==typeof t||eu(t)&&Sr(t)==S}function ou(t){if(!eu(t)||Sr(t)!=E)return!1;var e=Kt(t);if(null===e)return!0;var n=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Tt.call(n)==Mt}var iu=de?Ve(de):function(t){return eu(t)&&Sr(t)==j},au=ve?Ve(ve):function(t){return eu(t)&&hi(t)==C};function uu(t){return"string"==typeof t||!za(t)&&eu(t)&&Sr(t)==A}function su(t){return"symbol"==typeof t||eu(t)&&Sr(t)==P}var cu=ye?Ve(ye):function(t){return eu(t)&&Qa(t.length)&&!!Jt[Sr(t)]},lu=zo(Dr),fu=zo((function(t,e){return t<=e}));function hu(t){if(!t)return[];if(Ka(t))return uu(t)?on(t):Co(t);if(ae&&t[ae])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ae]());var e=hi(t);return(e==x?Qe:e==C?nn:Bu)(t)}function pu(t){return t?(t=yu(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function du(t){var e=pu(t),n=e%1;return e==e?n?e-n:e:0}function vu(t){return t?ir(du(t),0,p):0}function yu(t){if("number"==typeof t)return t;if(su(t))return h;if(tu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=tu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=He(t);var n=dt.test(t);return n||yt.test(t)?ne(t.slice(2),n?2:8):pt.test(t)?h:+t}function gu(t){return Ao(t,Tu(t))}function mu(t){return null==t?"":ao(t)}var bu=ko((function(t,e){if(_i(e)||Ka(e))Ao(e,Iu(e),t);else for(var n in e)Rt.call(e,n)&&Qn(t,n,e[n])})),wu=ko((function(t,e){Ao(e,Tu(e),t)})),_u=ko((function(t,e,n,r){Ao(e,Tu(e),t,r)})),xu=ko((function(t,e,n,r){Ao(e,Iu(e),t,r)})),Su=ti(or),Eu=qr((function(t,e){t=Et(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&gi(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],u=Tu(a),s=-1,c=u.length;++s<c;){var l=u[s],f=t[l];(f===o||Ba(f,kt[l])&&!Rt.call(t,l))&&(t[l]=a[l])}return t})),Ou=qr((function(t){return t.push(o,Xo),ge(Lu,o,t)}));function ju(t,e,n){var r=null==t?o:_r(t,e);return r===o?n:r}function Cu(t,e){return null!=t&&pi(t,e,jr)}var Au=Uo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=$t.call(e)),t[e]=n}),ts(rs)),Pu=Uo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=$t.call(e)),Rt.call(t,e)?t[e].push(n):t[e]=[n]}),ai),ku=qr(Ar);function Iu(t){return Ka(t)?Zn(t):Lr(t)}function Tu(t){return Ka(t)?Zn(t,!0):function(t){if(!tu(t))return function(t){var e=[];if(null!=t)for(var n in Et(t))e.push(n);return e}(t);var e=_i(t),n=[];for(var r in t)("constructor"!=r||!e&&Rt.call(t,r))&&n.push(r);return n}(t)}var Ru=ko((function(t,e,n){Ur(t,e,n)})),Lu=ko((function(t,e,n,r){Ur(t,e,n,r)})),Du=ti((function(t,e){var n={};if(null==t)return n;var r=!1;e=Oe(e,(function(e){return e=go(e,t),r||(r=e.length>1),e})),Ao(t,ni(t),n),r&&(n=ar(n,7,Jo));for(var o=e.length;o--;)so(n,e[o]);return n})),$u=ti((function(t,e){return null==t?{}:function(t,e){return Hr(t,e,(function(e,n){return Cu(t,n)}))}(t,e)}));function Mu(t,e){if(null==t)return{};var n=Oe(ni(t),(function(t){return[t]}));return e=ai(e),Hr(t,n,(function(t,n){return e(t,n[0])}))}var Nu=Zo(Iu),Uu=Zo(Tu);function Bu(t){return null==t?[]:ze(t,Iu(t))}var Fu=Lo((function(t,e,n){return e=e.toLowerCase(),t+(n?Hu(e):e)}));function Hu(t){return Yu(mu(t).toLowerCase())}function Vu(t){return(t=mu(t))&&t.replace(mt,We).replace(Gt,"")}var zu=Lo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Gu=Lo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ku=Ro("toLowerCase"),qu=Lo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Zu=Lo((function(t,e,n){return t+(n?" ":"")+Yu(e)})),Wu=Lo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Yu=Ro("toUpperCase");function Xu(t,e,n){return t=mu(t),(e=n?o:e)===o?function(t){return Wt.test(t)}(t)?function(t){return t.match(qt)||[]}(t):function(t){return t.match(st)||[]}(t):t.match(e)||[]}var Ju=qr((function(t,e){try{return ge(t,o,e)}catch(t){return Ya(t)?t:new _t(t)}})),Qu=ti((function(t,e){return be(e,(function(e){e=Mi(e),rr(t,e,Pa(t[e],t))})),t}));function ts(t){return function(){return t}}var es=Mo(),ns=Mo(!0);function rs(t){return t}function os(t){return Rr("function"==typeof t?t:ar(t,1))}var is=qr((function(t,e){return function(n){return Ar(n,t,e)}})),as=qr((function(t,e){return function(n){return Ar(t,n,e)}}));function us(t,e,n){var r=Iu(e),o=wr(e,r);null!=n||tu(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=wr(e,Iu(e)));var i=!(tu(n)&&"chain"in n&&!n.chain),a=Xa(t);return be(o,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=Co(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,je([this.value()],arguments))})})),t}function ss(){}var cs=Fo(Oe),ls=Fo(_e),fs=Fo(Pe);function hs(t){return mi(t)?Me(Mi(t)):function(t){return function(e){return _r(e,t)}}(t)}var ps=Vo(),ds=Vo(!0);function vs(){return[]}function ys(){return!1}var gs,ms=Bo((function(t,e){return t+e}),0),bs=Ko("ceil"),ws=Bo((function(t,e){return t/e}),1),_s=Ko("floor"),xs=Bo((function(t,e){return t*e}),1),Ss=Ko("round"),Es=Bo((function(t,e){return t-e}),0);return Nn.after=function(t,e){if("function"!=typeof e)throw new Ct(i);return t=du(t),function(){if(--t<1)return e.apply(this,arguments)}},Nn.ary=Ca,Nn.assign=bu,Nn.assignIn=wu,Nn.assignInWith=_u,Nn.assignWith=xu,Nn.at=Su,Nn.before=Aa,Nn.bind=Pa,Nn.bindAll=Qu,Nn.bindKey=ka,Nn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return za(t)?t:[t]},Nn.chain=ha,Nn.chunk=function(t,e,n){e=(n?gi(t,e,n):e===o)?1:yn(du(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,u=0,s=r(cn(i/e));a<i;)s[u++]=to(t,a,a+=e);return s},Nn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},Nn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],o=t;o--;)e[o-1]=arguments[o];return je(za(n)?Co(n):[n],vr(e,1))},Nn.cond=function(t){var e=null==t?0:t.length,n=ai();return t=e?Oe(t,(function(t){if("function"!=typeof t[1])throw new Ct(i);return[n(t[0]),t[1]]})):[],qr((function(n){for(var r=-1;++r<e;){var o=t[r];if(ge(o[0],this,n))return ge(o[1],this,n)}}))},Nn.conforms=function(t){return function(t){var e=Iu(t);return function(n){return ur(n,t,e)}}(ar(t,1))},Nn.constant=ts,Nn.countBy=va,Nn.create=function(t,e){var n=Un(t);return null==e?n:nr(n,e)},Nn.curry=function t(e,n,r){var i=Wo(e,8,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Nn.curryRight=function t(e,n,r){var i=Wo(e,16,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Nn.debounce=Ia,Nn.defaults=Eu,Nn.defaultsDeep=Ou,Nn.defer=Ta,Nn.delay=Ra,Nn.difference=Bi,Nn.differenceBy=Fi,Nn.differenceWith=Hi,Nn.drop=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=n||e===o?1:du(e))<0?0:e,r):[]},Nn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,0,(e=r-(e=n||e===o?1:du(e)))<0?0:e):[]},Nn.dropRightWhile=function(t,e){return t&&t.length?lo(t,ai(e,3),!0,!0):[]},Nn.dropWhile=function(t,e){return t&&t.length?lo(t,ai(e,3),!0):[]},Nn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&gi(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=du(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:du(r))<0&&(r+=i),r=n>r?0:vu(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Nn.filter=function(t,e){return(za(t)?xe:dr)(t,ai(e,3))},Nn.flatMap=function(t,e){return vr(Sa(t,e),1)},Nn.flatMapDeep=function(t,e){return vr(Sa(t,e),l)},Nn.flatMapDepth=function(t,e,n){return n=n===o?1:du(n),vr(Sa(t,e),n)},Nn.flatten=Gi,Nn.flattenDeep=function(t){return null!=t&&t.length?vr(t,l):[]},Nn.flattenDepth=function(t,e){return null!=t&&t.length?vr(t,e=e===o?1:du(e)):[]},Nn.flip=function(t){return Wo(t,512)},Nn.flow=es,Nn.flowRight=ns,Nn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},Nn.functions=function(t){return null==t?[]:wr(t,Iu(t))},Nn.functionsIn=function(t){return null==t?[]:wr(t,Tu(t))},Nn.groupBy=wa,Nn.initial=function(t){return null!=t&&t.length?to(t,0,-1):[]},Nn.intersection=qi,Nn.intersectionBy=Zi,Nn.intersectionWith=Wi,Nn.invert=Au,Nn.invertBy=Pu,Nn.invokeMap=_a,Nn.iteratee=os,Nn.keyBy=xa,Nn.keys=Iu,Nn.keysIn=Tu,Nn.map=Sa,Nn.mapKeys=function(t,e){var n={};return e=ai(e,3),mr(t,(function(t,r,o){rr(n,e(t,r,o),t)})),n},Nn.mapValues=function(t,e){var n={};return e=ai(e,3),mr(t,(function(t,r,o){rr(n,r,e(t,r,o))})),n},Nn.matches=function(t){return Mr(ar(t,1))},Nn.matchesProperty=function(t,e){return Nr(t,ar(e,1))},Nn.memoize=La,Nn.merge=Ru,Nn.mergeWith=Lu,Nn.method=is,Nn.methodOf=as,Nn.mixin=us,Nn.negate=Da,Nn.nthArg=function(t){return t=du(t),qr((function(e){return Br(e,t)}))},Nn.omit=Du,Nn.omitBy=function(t,e){return Mu(t,Da(ai(e)))},Nn.once=function(t){return Aa(2,t)},Nn.orderBy=function(t,e,n,r){return null==t?[]:(za(e)||(e=null==e?[]:[e]),za(n=r?o:n)||(n=null==n?[]:[n]),Fr(t,e,n))},Nn.over=cs,Nn.overArgs=$a,Nn.overEvery=ls,Nn.overSome=fs,Nn.partial=Ma,Nn.partialRight=Na,Nn.partition=Ea,Nn.pick=$u,Nn.pickBy=Mu,Nn.property=hs,Nn.propertyOf=function(t){return function(e){return null==t?o:_r(t,e)}},Nn.pull=Xi,Nn.pullAll=Ji,Nn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Vr(t,e,ai(n,2)):t},Nn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Vr(t,e,o,n):t},Nn.pullAt=Qi,Nn.range=ps,Nn.rangeRight=ds,Nn.rearg=Ua,Nn.reject=function(t,e){return(za(t)?xe:dr)(t,Da(ai(e,3)))},Nn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=ai(e,3);++r<i;){var a=t[r];e(a,r,t)&&(n.push(a),o.push(r))}return zr(t,o),n},Nn.rest=function(t,e){if("function"!=typeof t)throw new Ct(i);return qr(t,e=e===o?e:du(e))},Nn.reverse=ta,Nn.sampleSize=function(t,e,n){return e=(n?gi(t,e,n):e===o)?1:du(e),(za(t)?Yn:Wr)(t,e)},Nn.set=function(t,e,n){return null==t?t:Yr(t,e,n)},Nn.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Yr(t,e,n,r)},Nn.shuffle=function(t){return(za(t)?Xn:Qr)(t)},Nn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&gi(t,e,n)?(e=0,n=r):(e=null==e?0:du(e),n=n===o?r:du(n)),to(t,e,n)):[]},Nn.sortBy=Oa,Nn.sortedUniq=function(t){return t&&t.length?oo(t):[]},Nn.sortedUniqBy=function(t,e){return t&&t.length?oo(t,ai(e,2)):[]},Nn.split=function(t,e,n){return n&&"number"!=typeof n&&gi(t,e,n)&&(e=n=o),(n=n===o?p:n>>>0)?(t=mu(t))&&("string"==typeof e||null!=e&&!iu(e))&&!(e=ao(e))&&Je(t)?bo(on(t),0,n):t.split(e,n):[]},Nn.spread=function(t,e){if("function"!=typeof t)throw new Ct(i);return e=null==e?0:yn(du(e),0),qr((function(n){var r=n[e],o=bo(n,0,e);return r&&je(o,r),ge(t,this,o)}))},Nn.tail=function(t){var e=null==t?0:t.length;return e?to(t,1,e):[]},Nn.take=function(t,e,n){return t&&t.length?to(t,0,(e=n||e===o?1:du(e))<0?0:e):[]},Nn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=r-(e=n||e===o?1:du(e)))<0?0:e,r):[]},Nn.takeRightWhile=function(t,e){return t&&t.length?lo(t,ai(e,3),!1,!0):[]},Nn.takeWhile=function(t,e){return t&&t.length?lo(t,ai(e,3)):[]},Nn.tap=function(t,e){return e(t),t},Nn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new Ct(i);return tu(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ia(t,e,{leading:r,maxWait:e,trailing:o})},Nn.thru=pa,Nn.toArray=hu,Nn.toPairs=Nu,Nn.toPairsIn=Uu,Nn.toPath=function(t){return za(t)?Oe(t,Mi):su(t)?[t]:Co($i(mu(t)))},Nn.toPlainObject=gu,Nn.transform=function(t,e,n){var r=za(t),o=r||Za(t)||cu(t);if(e=ai(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:tu(t)&&Xa(i)?Un(Kt(t)):{}}return(o?be:mr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Nn.unary=function(t){return Ca(t,1)},Nn.union=ea,Nn.unionBy=na,Nn.unionWith=ra,Nn.uniq=function(t){return t&&t.length?uo(t):[]},Nn.uniqBy=function(t,e){return t&&t.length?uo(t,ai(e,2)):[]},Nn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?uo(t,o,e):[]},Nn.unset=function(t,e){return null==t||so(t,e)},Nn.unzip=oa,Nn.unzipWith=ia,Nn.update=function(t,e,n){return null==t?t:co(t,e,yo(n))},Nn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:co(t,e,yo(n),r)},Nn.values=Bu,Nn.valuesIn=function(t){return null==t?[]:ze(t,Tu(t))},Nn.without=aa,Nn.words=Xu,Nn.wrap=function(t,e){return Ma(yo(e),t)},Nn.xor=ua,Nn.xorBy=sa,Nn.xorWith=ca,Nn.zip=la,Nn.zipObject=function(t,e){return po(t||[],e||[],Qn)},Nn.zipObjectDeep=function(t,e){return po(t||[],e||[],Yr)},Nn.zipWith=fa,Nn.entries=Nu,Nn.entriesIn=Uu,Nn.extend=wu,Nn.extendWith=_u,us(Nn,Nn),Nn.add=ms,Nn.attempt=Ju,Nn.camelCase=Fu,Nn.capitalize=Hu,Nn.ceil=bs,Nn.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=yu(n))==n?n:0),e!==o&&(e=(e=yu(e))==e?e:0),ir(yu(t),e,n)},Nn.clone=function(t){return ar(t,4)},Nn.cloneDeep=function(t){return ar(t,5)},Nn.cloneDeepWith=function(t,e){return ar(t,5,e="function"==typeof e?e:o)},Nn.cloneWith=function(t,e){return ar(t,4,e="function"==typeof e?e:o)},Nn.conformsTo=function(t,e){return null==e||ur(t,e,Iu(e))},Nn.deburr=Vu,Nn.defaultTo=function(t,e){return null==t||t!=t?e:t},Nn.divide=ws,Nn.endsWith=function(t,e,n){t=mu(t),e=ao(e);var r=t.length,i=n=n===o?r:ir(du(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Nn.eq=Ba,Nn.escape=function(t){return(t=mu(t))&&Z.test(t)?t.replace(K,Ye):t},Nn.escapeRegExp=function(t){return(t=mu(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Nn.every=function(t,e,n){var r=za(t)?_e:hr;return n&&gi(t,e,n)&&(e=o),r(t,ai(e,3))},Nn.find=ya,Nn.findIndex=Vi,Nn.findKey=function(t,e){return Ie(t,ai(e,3),mr)},Nn.findLast=ga,Nn.findLastIndex=zi,Nn.findLastKey=function(t,e){return Ie(t,ai(e,3),br)},Nn.floor=_s,Nn.forEach=ma,Nn.forEachRight=ba,Nn.forIn=function(t,e){return null==t?t:yr(t,ai(e,3),Tu)},Nn.forInRight=function(t,e){return null==t?t:gr(t,ai(e,3),Tu)},Nn.forOwn=function(t,e){return t&&mr(t,ai(e,3))},Nn.forOwnRight=function(t,e){return t&&br(t,ai(e,3))},Nn.get=ju,Nn.gt=Fa,Nn.gte=Ha,Nn.has=function(t,e){return null!=t&&pi(t,e,Or)},Nn.hasIn=Cu,Nn.head=Ki,Nn.identity=rs,Nn.includes=function(t,e,n,r){t=Ka(t)?t:Bu(t),n=n&&!r?du(n):0;var o=t.length;return n<0&&(n=yn(o+n,0)),uu(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Re(t,e,n)>-1},Nn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:du(n);return o<0&&(o=yn(r+o,0)),Re(t,e,o)},Nn.inRange=function(t,e,n){return e=pu(e),n===o?(n=e,e=0):n=pu(n),function(t,e,n){return t>=gn(e,n)&&t<yn(e,n)}(t=yu(t),e,n)},Nn.invoke=ku,Nn.isArguments=Va,Nn.isArray=za,Nn.isArrayBuffer=Ga,Nn.isArrayLike=Ka,Nn.isArrayLikeObject=qa,Nn.isBoolean=function(t){return!0===t||!1===t||eu(t)&&Sr(t)==g},Nn.isBuffer=Za,Nn.isDate=Wa,Nn.isElement=function(t){return eu(t)&&1===t.nodeType&&!ou(t)},Nn.isEmpty=function(t){if(null==t)return!0;if(Ka(t)&&(za(t)||"string"==typeof t||"function"==typeof t.splice||Za(t)||cu(t)||Va(t)))return!t.length;var e=hi(t);if(e==x||e==C)return!t.size;if(_i(t))return!Lr(t).length;for(var n in t)if(Rt.call(t,n))return!1;return!0},Nn.isEqual=function(t,e){return kr(t,e)},Nn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?kr(t,e,o,n):!!r},Nn.isError=Ya,Nn.isFinite=function(t){return"number"==typeof t&&pn(t)},Nn.isFunction=Xa,Nn.isInteger=Ja,Nn.isLength=Qa,Nn.isMap=nu,Nn.isMatch=function(t,e){return t===e||Ir(t,e,si(e))},Nn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,Ir(t,e,si(e),n)},Nn.isNaN=function(t){return ru(t)&&t!=+t},Nn.isNative=function(t){if(wi(t))throw new _t("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Tr(t)},Nn.isNil=function(t){return null==t},Nn.isNull=function(t){return null===t},Nn.isNumber=ru,Nn.isObject=tu,Nn.isObjectLike=eu,Nn.isPlainObject=ou,Nn.isRegExp=iu,Nn.isSafeInteger=function(t){return Ja(t)&&t>=-9007199254740991&&t<=f},Nn.isSet=au,Nn.isString=uu,Nn.isSymbol=su,Nn.isTypedArray=cu,Nn.isUndefined=function(t){return t===o},Nn.isWeakMap=function(t){return eu(t)&&hi(t)==k},Nn.isWeakSet=function(t){return eu(t)&&"[object WeakSet]"==Sr(t)},Nn.join=function(t,e){return null==t?"":dn.call(t,e)},Nn.kebabCase=zu,Nn.last=Yi,Nn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=du(n))<0?yn(r+i,0):gn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Te(t,De,i,!0)},Nn.lowerCase=Gu,Nn.lowerFirst=Ku,Nn.lt=lu,Nn.lte=fu,Nn.max=function(t){return t&&t.length?pr(t,rs,Er):o},Nn.maxBy=function(t,e){return t&&t.length?pr(t,ai(e,2),Er):o},Nn.mean=function(t){return $e(t,rs)},Nn.meanBy=function(t,e){return $e(t,ai(e,2))},Nn.min=function(t){return t&&t.length?pr(t,rs,Dr):o},Nn.minBy=function(t,e){return t&&t.length?pr(t,ai(e,2),Dr):o},Nn.stubArray=vs,Nn.stubFalse=ys,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=xs,Nn.nth=function(t,e){return t&&t.length?Br(t,du(e)):o},Nn.noConflict=function(){return ie._===this&&(ie._=Nt),this},Nn.noop=ss,Nn.now=ja,Nn.pad=function(t,e,n){t=mu(t);var r=(e=du(e))?rn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Ho(ln(o),n)+t+Ho(cn(o),n)},Nn.padEnd=function(t,e,n){t=mu(t);var r=(e=du(e))?rn(t):0;return e&&r<e?t+Ho(e-r,n):t},Nn.padStart=function(t,e,n){t=mu(t);var r=(e=du(e))?rn(t):0;return e&&r<e?Ho(e-r,n)+t:t},Nn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),bn(mu(t).replace(rt,""),e||0)},Nn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&gi(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=pu(t),e===o?(e=t,t=0):e=pu(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=wn();return gn(t+i*(e-t+ee("1e-"+((i+"").length-1))),e)}return Gr(t,e)},Nn.reduce=function(t,e,n){var r=za(t)?Ce:Ue,o=arguments.length<3;return r(t,ai(e,4),n,o,lr)},Nn.reduceRight=function(t,e,n){var r=za(t)?Ae:Ue,o=arguments.length<3;return r(t,ai(e,4),n,o,fr)},Nn.repeat=function(t,e,n){return e=(n?gi(t,e,n):e===o)?1:du(e),Kr(mu(t),e)},Nn.replace=function(){var t=arguments,e=mu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Nn.result=function(t,e,n){var r=-1,i=(e=go(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[Mi(e[r])];a===o&&(r=i,a=n),t=Xa(a)?a.call(t):a}return t},Nn.round=Ss,Nn.runInContext=t,Nn.sample=function(t){return(za(t)?Wn:Zr)(t)},Nn.size=function(t){if(null==t)return 0;if(Ka(t))return uu(t)?rn(t):t.length;var e=hi(t);return e==x||e==C?t.size:Lr(t).length},Nn.snakeCase=qu,Nn.some=function(t,e,n){var r=za(t)?Pe:eo;return n&&gi(t,e,n)&&(e=o),r(t,ai(e,3))},Nn.sortedIndex=function(t,e){return no(t,e)},Nn.sortedIndexBy=function(t,e,n){return ro(t,e,ai(n,2))},Nn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=no(t,e);if(r<n&&Ba(t[r],e))return r}return-1},Nn.sortedLastIndex=function(t,e){return no(t,e,!0)},Nn.sortedLastIndexBy=function(t,e,n){return ro(t,e,ai(n,2),!0)},Nn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=no(t,e,!0)-1;if(Ba(t[n],e))return n}return-1},Nn.startCase=Zu,Nn.startsWith=function(t,e,n){return t=mu(t),n=null==n?0:ir(du(n),0,t.length),e=ao(e),t.slice(n,n+e.length)==e},Nn.subtract=Es,Nn.sum=function(t){return t&&t.length?Be(t,rs):0},Nn.sumBy=function(t,e){return t&&t.length?Be(t,ai(e,2)):0},Nn.template=function(t,e,n){var r=Nn.templateSettings;n&&gi(t,e,n)&&(e=o),t=mu(t),e=_u({},e,r,Yo);var i,a,u=_u({},e.imports,r.imports,Yo),s=Iu(u),c=ze(u,s),l=0,f=e.interpolate||bt,h="__p += '",p=Ot((e.escape||bt).source+"|"+f.source+"|"+(f===X?ft:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),d="//# sourceURL="+(Rt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xt+"]")+"\n";t.replace(p,(function(e,n,r,o,u,s){return r||(r=o),h+=t.slice(l,s).replace(wt,Xe),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),u&&(a=!0,h+="';\n"+u+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+e.length,e})),h+="';\n";var v=Rt.call(e,"variable")&&e.variable;if(v){if(ct.test(v))throw new _t("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(H,""):h).replace(V,"$1").replace(z,"$1;"),h="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")+h+"return __p\n}";var y=Ju((function(){return xt(s,d+"return "+h).apply(o,c)}));if(y.source=h,Ya(y))throw y;return y},Nn.times=function(t,e){if((t=du(t))<1||t>f)return[];var n=p,r=gn(t,p);e=ai(e),t-=p;for(var o=Fe(r,e);++n<t;)e(n);return o},Nn.toFinite=pu,Nn.toInteger=du,Nn.toLength=vu,Nn.toLower=function(t){return mu(t).toLowerCase()},Nn.toNumber=yu,Nn.toSafeInteger=function(t){return t?ir(du(t),-9007199254740991,f):0===t?t:0},Nn.toString=mu,Nn.toUpper=function(t){return mu(t).toUpperCase()},Nn.trim=function(t,e,n){if((t=mu(t))&&(n||e===o))return He(t);if(!t||!(e=ao(e)))return t;var r=on(t),i=on(e);return bo(r,Ke(r,i),qe(r,i)+1).join("")},Nn.trimEnd=function(t,e,n){if((t=mu(t))&&(n||e===o))return t.slice(0,an(t)+1);if(!t||!(e=ao(e)))return t;var r=on(t);return bo(r,0,qe(r,on(e))+1).join("")},Nn.trimStart=function(t,e,n){if((t=mu(t))&&(n||e===o))return t.replace(rt,"");if(!t||!(e=ao(e)))return t;var r=on(t);return bo(r,Ke(r,on(e))).join("")},Nn.truncate=function(t,e){var n=30,r="...";if(tu(e)){var i="separator"in e?e.separator:i;n="length"in e?du(e.length):n,r="omission"in e?ao(e.omission):r}var a=(t=mu(t)).length;if(Je(t)){var u=on(t);a=u.length}if(n>=a)return t;var s=n-rn(r);if(s<1)return r;var c=u?bo(u,0,s).join(""):t.slice(0,s);if(i===o)return c+r;if(u&&(s+=c.length-s),iu(i)){if(t.slice(s).search(i)){var l,f=c;for(i.global||(i=Ot(i.source,mu(ht.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var h=l.index;c=c.slice(0,h===o?s:h)}}else if(t.indexOf(ao(i),s)!=s){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r},Nn.unescape=function(t){return(t=mu(t))&&q.test(t)?t.replace(G,un):t},Nn.uniqueId=function(t){var e=++Lt;return mu(t)+e},Nn.upperCase=Wu,Nn.upperFirst=Yu,Nn.each=ma,Nn.eachRight=ba,Nn.first=Ki,us(Nn,(gs={},mr(Nn,(function(t,e){Rt.call(Nn.prototype,e)||(gs[e]=t)})),gs),{chain:!1}),Nn.VERSION="4.17.21",be(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Nn[t].placeholder=Nn})),be(["drop","take"],(function(t,e){Hn.prototype[t]=function(n){n=n===o?1:yn(du(n),0);var r=this.__filtered__&&!e?new Hn(this):this.clone();return r.__filtered__?r.__takeCount__=gn(n,r.__takeCount__):r.__views__.push({size:gn(n,p),type:t+(r.__dir__<0?"Right":"")}),r},Hn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),be(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Hn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ai(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),be(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Hn.prototype[t]=function(){return this[n](1).value()[0]}})),be(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Hn.prototype[t]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(rs)},Hn.prototype.find=function(t){return this.filter(t).head()},Hn.prototype.findLast=function(t){return this.reverse().find(t)},Hn.prototype.invokeMap=qr((function(t,e){return"function"==typeof t?new Hn(this):this.map((function(n){return Ar(n,t,e)}))})),Hn.prototype.reject=function(t){return this.filter(Da(ai(t)))},Hn.prototype.slice=function(t,e){t=du(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Hn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=du(e))<0?n.dropRight(-e):n.take(e-t)),n)},Hn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Hn.prototype.toArray=function(){return this.take(p)},mr(Hn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Nn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(Nn.prototype[e]=function(){var e=this.__wrapped__,u=r?[1]:arguments,s=e instanceof Hn,c=u[0],l=s||za(e),f=function(t){var e=i.apply(Nn,je([t],u));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(s=l=!1);var h=this.__chain__,p=!!this.__actions__.length,d=a&&!h,v=s&&!p;if(!a&&l){e=v?e:new Hn(this);var y=t.apply(e,u);return y.__actions__.push({func:pa,args:[f],thisArg:o}),new Fn(y,h)}return d&&v?t.apply(this,u):(y=this.thru(f),d?r?y.value()[0]:y.value():y)})})),be(["pop","push","shift","sort","splice","unshift"],(function(t){var e=At[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Nn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(za(o)?o:[],t)}return this[n]((function(n){return e.apply(za(n)?n:[],t)}))}})),mr(Hn.prototype,(function(t,e){var n=Nn[e];if(n){var r=n.name+"";Rt.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:e,func:n})}})),Pn[No(o,2).name]=[{name:"wrapper",func:o}],Hn.prototype.clone=function(){var t=new Hn(this.__wrapped__);return t.__actions__=Co(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Co(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Co(this.__views__),t},Hn.prototype.reverse=function(){if(this.__filtered__){var t=new Hn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Hn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=za(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=gn(e,t+a);break;case"takeRight":t=yn(t,e-a)}}return{start:t,end:e}}(0,o,this.__views__),a=i.start,u=i.end,s=u-a,c=r?u:a-1,l=this.__iteratees__,f=l.length,h=0,p=gn(s,this.__takeCount__);if(!n||!r&&o==s&&p==s)return fo(t,this.__actions__);var d=[];t:for(;s--&&h<p;){for(var v=-1,y=t[c+=e];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}d[h++]=y}return d},Nn.prototype.at=da,Nn.prototype.chain=function(){return ha(this)},Nn.prototype.commit=function(){return new Fn(this.value(),this.__chain__)},Nn.prototype.next=function(){this.__values__===o&&(this.__values__=hu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},Nn.prototype.plant=function(t){for(var e,n=this;n instanceof Bn;){var r=Ui(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Nn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Hn){var e=t;return this.__actions__.length&&(e=new Hn(this)),(e=e.reverse()).__actions__.push({func:pa,args:[ta],thisArg:o}),new Fn(e,this.__chain__)}return this.thru(ta)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,ae&&(Nn.prototype[ae]=function(){return this}),Nn}();ie._=sn,(r=function(){return sn}.call(e,n,e,t))===o||(t.exports=r)}.call(this)},385:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=[];function r(t){for(var e=[],r=0;r<n.length;r++)n[r]===t?t=null:e.push(n[r]);n=e}function o(r,o,i){e=o?r:t(t({},e),r);for(var a=n,u=0;u<a.length;u++)a[u](e,i)}return e=e||{},{action:function(t){function n(e){o(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:o,subscribe:function(t){return n.push(t),function(){r(t)}},unsubscribe:r,getState:function(){return e}}},n=function(t,n){var r=c[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return c[t]={value:o,active:!0},o},i=function(t,n){var r=c[t];if(!r){var o=e(n);return c[t]={value:o,active:!1},o}return r.value},a=function(t){return n("app",t)},u=function(){return i("app",{})},s=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return s}});var c={}}(),o}())}}}))},968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:t=>{"use strict";t.exports=h},824:t=>{"use strict";t.exports=a},45:t=>{"use strict";t.exports=u},728:t=>{"use strict";t.exports=s},688:t=>{"use strict";t.exports=p},64:t=>{"use strict";t.exports=l},954:t=>{"use strict";t.exports=i},493:t=>{"use strict";t.exports=c},281:t=>{"use strict";t.exports=f}},d={};function v(t){var e=d[t];if(void 0!==e)return e.exports;var n=d[t]={id:t,loaded:!1,exports:{}};return r[t].call(n.exports,n,n.exports,v),n.loaded=!0,n.exports}v.y=o,v.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return v.d(e,{a:e}),e},v.d=(t,e)=>{for(var n in e)v.o(e,n)&&!v.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),v.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),v.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},v.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;v.g.importScripts&&(t=v.g.location+"");var e=v.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),v.p=t})();var y={};return(0,v(968).s)(1),(()=>{"use strict";v.r(y),v.d(y,{ComponentContext:()=>o,ConfigurableLink:()=>u,Extension:()=>p,ExtensionSlot:()=>A,UserHasAccess:()=>zn,createUseStore:()=>l,getAsyncExtensionLifecycle:()=>ot,getAsyncLifecycle:()=>nt,getLifecycle:()=>et,getSyncLifecycle:()=>rt,openmrsComponentDecorator:()=>tt,useAssignedExtensionIds:()=>at,useAssignedExtensions:()=>_,useBodyScrollLock:()=>ut,useConfig:()=>fn,useConnectedExtensions:()=>x,useConnectivity:()=>m,useCurrentPatient:()=>Pn,useExtensionInternalStore:()=>kn,useExtensionSlot:()=>S,useExtensionSlotMeta:()=>In,useExtensionStore:()=>Tn,useForceUpdate:()=>Ln,useLayoutType:()=>Mn,useLocations:()=>Un,useOnClickOutside:()=>Bn,usePagination:()=>no,usePatient:()=>_n,useSession:()=>Kn,useStore:()=>tr,useStoreWithActions:()=>er,useVisit:()=>Xr,useVisitTypes:()=>Qr});var r=v(954),o=r.default.createContext({moduleName:""}),i=v(824);function a(){return a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a.apply(this,arguments)}var u=function(t){var e=t.to,n=t.children,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["to","children"]);return r.default.createElement("a",a({onClick:function(t){return function(t,e){t.metaKey||t.ctrlKey||t.shiftKey||0!=t.button||(t.preventDefault(),(0,i.navigate)({to:e}))}(t,e)},href:(0,i.interpolateUrl)(e)},o),n)};function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return function(e){var n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)(t.getState())),o=n[0],i=n[1];(0,r.useEffect)((function(){return t.subscribe((function(t){return i(t)}))}),[]);var a={};return e&&(a=(0,r.useMemo)((function(){return function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,e)}),[t,e])),function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){c(t,e,n[e])}))}return t}({},o,a)}}var f=v(45);function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var p=function(t){var e=t.state,n=t.wrap,i=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)()),a=i[0],u=i[1],s=(0,r.useContext)(o).extension,c=(0,r.useCallback)((function(t){u(t)}),[]);(0,r.useEffect)((function(){if(null!=a&&s)return(0,f.renderExtension)(a,s.extensionSlotName,s.extensionSlotModuleName,s.extensionId,void 0,e)}),[null==s?void 0:s.extensionSlotName,null==s?void 0:s.extensionId,null==s?void 0:s.extensionSlotModuleName,e,a]);var l=r.default.createElement("div",{ref:c,"data-extension-id":null==s?void 0:s.extensionId,style:{position:"relative"}});return s&&n?n(l,s):l},d=v(728);function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function m(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return g(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)(window.navigator.onLine)),e=t[0],n=t[1];return(0,r.useEffect)((function(){return(0,d.subscribeConnectivityChanged)((function(t){var e=t.online;return n(e)}))}),[]),e}var b=v(891);function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return w(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)([])),n=e[0],o=e[1];return(0,r.useEffect)((function(){var e=function(e){var r,i,a=null!==(i=null===(r=e.slots[t])||void 0===r?void 0:r.assignedExtensions)&&void 0!==i?i:[];(0,b.isEqual)(a,n)||o(a)};return e((0,f.getExtensionStore)().getState()),(0,f.getExtensionStore)().subscribe(e)}),[t,n]),n}function x(t){var e=m(),n=_(t);return(0,r.useMemo)((function(){return(0,f.getConnectedExtensions)(n,e)}),[n,e])}function S(t){var e=(0,r.useContext)(o).moduleName;if(!e)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,r.useEffect)((function(){(0,f.registerExtensionSlot)(e,t)}),[]),{extensions:x(t),extensionSlotName:t,extensionSlotModuleName:e}}function E(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function O(){return O=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},O.apply(this,arguments)}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){E(t,e,n[e])}))}return t}function C(t){return t}var A=function(t){var e=t.extensionSlotName,n=t.select,i=void 0===n?C:n,a=t.children,u=t.state,s=t.style,c=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["extensionSlotName","select","children","state","style"]),l=(0,r.useRef)(null),f=S(e),h=f.extensions,d=f.extensionSlotModuleName,v=(0,r.useRef)(u);(function(t,e){if(t===e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;if("object"!=typeof t||"object"!=typeof e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in e)||e[i]!==t[i])return!1}return!0})(v.current,u)||(v.current=u);var y=(0,r.useMemo)((function(){return e&&i(h).map((function(t){return r.default.createElement(o.Provider,{key:t.id,value:{moduleName:d,extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:d}}},null!=a?a:r.default.createElement(p,{state:v.current}))}))}),[i,h,e,v.current]);return r.default.createElement("div",O({ref:l,"data-extension-slot-name":e,"data-extension-slot-module-name":d,style:j({},s,{position:"relative"})},c),y)},P=v(493);function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function I(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){R(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function R(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(t,e){var n;if("function"!=typeof(n=e.domElement?function(){return e.domElement}:e.domElementGetter?e.domElementGetter:t.domElementGetter?t.domElementGetter:function(t){var e=t.appName||t.name;if(!e)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(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(e.name,"'. Expected a function, received ").concat(L(n)));return function(){var t=n(e);if(!(t instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(e.name,"'. Expected HTMLElement, received ").concat(L(t)));return t}}var $=null;try{$=n(9902).createContext()}catch(k){}var M={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}};function N(t){if("object"!==T(t))throw new Error("single-spa-react requires a configuration object");var e=I(I({},M),t);if(!e.React)throw new Error("single-spa-react must be passed opts.React");if(!e.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!e.rootComponent&&!e.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(e.errorBoundary&&"function"!=typeof e.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!$&&e.React.createContext&&($=e.React.createContext()),e.SingleSpaRoot=function(t){function e(t){e.displayName="SingleSpaRoot(".concat(t.name,")")}return e.prototype=Object.create(t.React.Component.prototype),e.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},e.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},e.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},e}(e);var n={bootstrap:U.bind(null,e),mount:B.bind(null,e),unmount:F.bind(null,e)};return e.parcelCanUpdate&&(n.update=H.bind(null,e)),n}function U(t,e){return t.rootComponent?Promise.resolve():t.loadRootComponent(e).then((function(e){t.rootComponent=e}))}function B(t,e){return new Promise((function(n,r){t.suppressComponentDidCatchWarning||!function(t){if(!(t&&"string"==typeof t.version&&t.version.indexOf(".")>=0))return!1;var e=t.version.slice(0,t.version.indexOf("."));try{return Number(e)>=16}catch(t){return!1}}(t.React)||t.errorBoundary||(t.rootComponent.prototype?t.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=V(t,e,(function(){n(this)})),i=D(t,e)(),a=function(t){var e=t.opts,n=t.elementToRender,r=t.domElement,o="function"==typeof e.renderType?e.renderType():e.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=e.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?e.ReactDOM.hydrate(n,r):e.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:t});t.domElements[e.name]=i,t.renderResults[e.name]=a}))}function F(t,e){return new Promise((function(n){t.unmountFinished=n;var r=t.renderResults[e.name];r&&r.unmount?r.unmount():t.ReactDOM.unmountComponentAtNode(t.domElements[e.name]),delete t.domElements[e.name],delete t.renderResults[e.name]}))}function H(t,e){return new Promise((function(n){t.updateResolves[e.name]||(t.updateResolves[e.name]=[]),t.updateResolves[e.name].push(n);var r=V(t,e,null),o=t.renderResults[e.name];if(o&&o.render)o.render(r);else{var i=D(t,e)();t.ReactDOM.render(r,i)}}))}function V(t,e,n){var r=t.React.createElement(t.rootComponent,e),o=$?t.React.createElement($.Provider,{value:e},r):r;return(t.errorBoundary||e.errorBoundary||t.errorBoundaryClass||e.errorBoundaryClass)&&(t.errorBoundaryClass=t.errorBoundaryClass||e.errorBoundaryClass||function(t,e){function n(e){t.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(e.name,")")}return n.prototype=Object.create(t.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(t.errorBoundary||e.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(t,e){this.setState({caughtError:t,caughtErrorInfo:e})},n}(t,e),o=t.React.createElement(t.errorBoundaryClass,e,o)),t.React.createElement(t.SingleSpaRoot,I(I({},e),{},{mountFinished:n,updateFinished:function(){t.updateResolves[e.name]&&(t.updateResolves[e.name].forEach((function(t){return t()})),delete t.updateResolves[e.name])},unmountFinished:function(){setTimeout(t.unmountFinished)}}),o)}var z=v(64),G=v(281);function K(){return K=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},K.apply(this,arguments)}function q(t){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},q(t)}function Z(t,e){return!e||"object"!==Y(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function W(t,e){return W=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},W(t,e)}var Y=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},X=z.default.default||z.default,J={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},Q=function(t){(0,r.useEffect)((function(){return X.on("languageChanged",t.forceUpdate),function(){return X.off("languageChanged",t.forceUpdate)}}),[t.forceUpdate]);var e=(0,r.useRef)(null);if(e.current)throw e.current;if(!X.hasLoadedNamespace(t.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(t.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 X.loadNamespaces([t.ns]).then((function(){return clearTimeout(n)})).catch((function(t){clearTimeout(n),e.current=t}))}return r.default.createElement(r.default.Fragment,null,t.children)};function tt(t){if("object"!=typeof t||"string"!=typeof t.featureName||"string"!=typeof t.moduleName)throw new Error("Invalid options");var e=Object.assign({},J,t);return function(t){var n;return(n=function(n){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&W(t,e)}(s,n);var i,a,u=(i=s,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(a){var n=q(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return Z(this,t)});function s(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(n=u.call(this,t)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:e.moduleName,extension:t._extensionContext}},n}var c=s.prototype;return c.componentDidCatch=function(t,n){n&&n.componentStack&&(t.extra=Object.assign(t.extra||{},{componentStack:n.componentStack})),e.throwErrorsToConsole&&setTimeout((function(){throw t})),this.setState({caughtError:t,caughtErrorInfo:n})},c.render=function(){if(this.state.caughtError)return r.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,i=r.default.createElement(o.Provider,{value:this.state.config},r.default.createElement(r.default.Suspense,{fallback:null},e.disableTranslations?r.default.createElement(t,K({},this.props)):r.default.createElement(Q,{ns:e.moduleName,forceUpdate:function(){return n.forceUpdate()}},r.default.createElement(G.I18nextProvider,{i18n:X,defaultNS:e.moduleName},r.default.createElement(t,K({},this.props))))));return e.strictMode||!r.default.StrictMode?i:r.default.createElement(r.default.StrictMode,null,i)},s}(r.default.Component)).displayName="OpenmrsReactComponent(".concat(e.featureName,")"),n}}function et(t,e){return N({React:r.default,ReactDOM:P.default,rootComponent:tt(e)(t)})}function nt(t,e){return function(){return t().then((function(t){return et(t.default,e)}))}}function rt(t,e){return function(){return Promise.resolve(et(t,e))}}var ot=nt;function it(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function at(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return it(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?it(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)([])),n=e[0],o=e[1];return(0,r.useEffect)((function(){return(0,f.getExtensionStore)().subscribe((function(e){var r,i,a=null!==(i=null===(r=e.slots[t])||void 0===r?void 0:r.assignedExtensions.map((function(t){return t.id})))&&void 0!==i?i:[];(0,b.isEqual)(a,n)||o(a)}))}),[]),n}function ut(t){(0,r.useEffect)((function(){if(t){var e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}}}),[t])}const st=function(t,e){return t===e||t!=t&&e!=e},ct=function(t,e){for(var n=t.length;n--;)if(st(t[n][0],e))return n;return-1};var lt=Array.prototype.splice;function ft(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ft.prototype.clear=function(){this.__data__=[],this.size=0},ft.prototype.delete=function(t){var e=this.__data__,n=ct(e,t);return!(n<0||(n==e.length-1?e.pop():lt.call(e,n,1),--this.size,0))},ft.prototype.get=function(t){var e=this.__data__,n=ct(e,t);return n<0?void 0:e[n][1]},ft.prototype.has=function(t){return ct(this.__data__,t)>-1},ft.prototype.set=function(t,e){var n=this.__data__,r=ct(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};const ht=ft,pt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var dt="object"==typeof self&&self&&self.Object===Object&&self;const vt=pt||dt||Function("return this")(),yt=vt.Symbol;var gt=Object.prototype,mt=gt.hasOwnProperty,bt=gt.toString,wt=yt?yt.toStringTag:void 0,_t=Object.prototype.toString,xt=yt?yt.toStringTag:void 0;const St=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":xt&&xt in Object(t)?function(t){var e=mt.call(t,wt),n=t[wt];try{t[wt]=void 0;var r=!0}catch(t){}var o=bt.call(t);return r&&(e?t[wt]=n:delete t[wt]),o}(t):function(t){return _t.call(t)}(t)},Et=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Ot=function(t){if(!Et(t))return!1;var e=St(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},jt=vt["__core-js_shared__"];var Ct,At=(Ct=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||""))?"Symbol(src)_1."+Ct:"",Pt=Function.prototype.toString;const kt=function(t){if(null!=t){try{return Pt.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var It=/^\[object .+?Constructor\]$/,Tt=Function.prototype,Rt=Object.prototype,Lt=Tt.toString,Dt=Rt.hasOwnProperty,$t=RegExp("^"+Lt.call(Dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Mt=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Et(t)||(e=t,At&&At in e))&&(Ot(t)?$t:It).test(kt(t));var e}(n)?n:void 0},Nt=Mt(vt,"Map"),Ut=Mt(Object,"create");var Bt=Object.prototype.hasOwnProperty,Ft=Object.prototype.hasOwnProperty;function Ht(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ht.prototype.clear=function(){this.__data__=Ut?Ut(null):{},this.size=0},Ht.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ht.prototype.get=function(t){var e=this.__data__;if(Ut){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Bt.call(e,t)?e[t]:void 0},Ht.prototype.has=function(t){var e=this.__data__;return Ut?void 0!==e[t]:Ft.call(e,t)},Ht.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ut&&void 0===e?"__lodash_hash_undefined__":e,this};const Vt=Ht,zt=function(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map};function Gt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Gt.prototype.clear=function(){this.size=0,this.__data__={hash:new Vt,map:new(Nt||ht),string:new Vt}},Gt.prototype.delete=function(t){var e=zt(this,t).delete(t);return this.size-=e?1:0,e},Gt.prototype.get=function(t){return zt(this,t).get(t)},Gt.prototype.has=function(t){return zt(this,t).has(t)},Gt.prototype.set=function(t,e){var n=zt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};const Kt=Gt;function qt(t){var e=this.__data__=new ht(t);this.size=e.size}qt.prototype.clear=function(){this.__data__=new ht,this.size=0},qt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},qt.prototype.get=function(t){return this.__data__.get(t)},qt.prototype.has=function(t){return this.__data__.has(t)},qt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof ht){var r=n.__data__;if(!Nt||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Kt(r)}return n.set(t,e),this.size=n.size,this};const Zt=qt;function Wt(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Kt;++e<n;)this.add(t[e])}Wt.prototype.add=Wt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Wt.prototype.has=function(t){return this.__data__.has(t)};const Yt=Wt,Xt=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},Jt=function(t,e){return t.has(e)},Qt=function(t,e,n,r,o,i){var a=1&n,u=t.length,s=e.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var f=-1,h=!0,p=2&n?new Yt:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var d=t[f],v=e[f];if(r)var y=a?r(v,d,f,e,t,i):r(d,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!Xt(e,(function(t,e){if(!Jt(p,e)&&(d===t||o(d,t,n,r,i)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!o(d,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},te=vt.Uint8Array,ee=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},ne=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n};var re=yt?yt.prototype:void 0,oe=re?re.valueOf:void 0;const ie=Array.isArray;var ae=Object.prototype.propertyIsEnumerable,ue=Object.getOwnPropertySymbols;const se=ue?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a)&&(i[o++]=a)}return i}(ue(t),(function(e){return ae.call(t,e)})))}:function(){return[]},ce=function(t){return null!=t&&"object"==typeof t},le=function(t){return ce(t)&&"[object Arguments]"==St(t)};var fe=Object.prototype,he=fe.hasOwnProperty,pe=fe.propertyIsEnumerable,de=le(function(){return arguments}())?le:function(t){return ce(t)&&he.call(t,"callee")&&!pe.call(t,"callee")};const ve=de;var ye=e&&!e.nodeType&&e,ge=ye&&t&&!t.nodeType&&t,me=ge&&ge.exports===ye?vt.Buffer:void 0;const be=(me?me.isBuffer:void 0)||function(){return!1};var we=/^(?:0|[1-9]\d*)$/;const _e=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&we.test(t))&&t>-1&&t%1==0&&t<e},xe=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var Se={};Se["[object Float32Array]"]=Se["[object Float64Array]"]=Se["[object Int8Array]"]=Se["[object Int16Array]"]=Se["[object Int32Array]"]=Se["[object Uint8Array]"]=Se["[object Uint8ClampedArray]"]=Se["[object Uint16Array]"]=Se["[object Uint32Array]"]=!0,Se["[object Arguments]"]=Se["[object Array]"]=Se["[object ArrayBuffer]"]=Se["[object Boolean]"]=Se["[object DataView]"]=Se["[object Date]"]=Se["[object Error]"]=Se["[object Function]"]=Se["[object Map]"]=Se["[object Number]"]=Se["[object Object]"]=Se["[object RegExp]"]=Se["[object Set]"]=Se["[object String]"]=Se["[object WeakMap]"]=!1;var Ee=e&&!e.nodeType&&e,Oe=Ee&&t&&!t.nodeType&&t,je=Oe&&Oe.exports===Ee&&pt.process,Ce=function(){try{return Oe&&Oe.require&&Oe.require("util").types||je&&je.binding&&je.binding("util")}catch(t){}}(),Ae=Ce&&Ce.isTypedArray;const Pe=Ae?(ke=Ae,function(t){return ke(t)}):function(t){return ce(t)&&xe(t.length)&&!!Se[St(t)]};var ke,Ie=Object.prototype.hasOwnProperty,Te=Object.prototype;const Re=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object);var Le=Object.prototype.hasOwnProperty;const De=function(t){return null!=(e=t)&&xe(e.length)&&!Ot(e)?function(t,e){var n=ie(t),r=!n&&ve(t),o=!n&&!r&&be(t),i=!n&&!r&&!o&&Pe(t),a=n||r||o||i,u=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],s=u.length;for(var c in t)!Ie.call(t,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_e(c,s))||u.push(c);return u}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||Te))return Re(t);var e,n,r=[];for(var o in Object(t))Le.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e},$e=function(t){return function(t,e,n){var r=e(t);return ie(t)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(t))}(t,De,se)};var Me=Object.prototype.hasOwnProperty;const Ne=Mt(vt,"DataView"),Ue=Mt(vt,"Promise"),Be=Mt(vt,"Set"),Fe=Mt(vt,"WeakMap");var He="[object Map]",Ve="[object Promise]",ze="[object Set]",Ge="[object WeakMap]",Ke="[object DataView]",qe=kt(Ne),Ze=kt(Nt),We=kt(Ue),Ye=kt(Be),Xe=kt(Fe),Je=St;(Ne&&Je(new Ne(new ArrayBuffer(1)))!=Ke||Nt&&Je(new Nt)!=He||Ue&&Je(Ue.resolve())!=Ve||Be&&Je(new Be)!=ze||Fe&&Je(new Fe)!=Ge)&&(Je=function(t){var e=St(t),n="[object Object]"==e?t.constructor:void 0,r=n?kt(n):"";if(r)switch(r){case qe:return Ke;case Ze:return He;case We:return Ve;case Ye:return ze;case Xe:return Ge}return e});const Qe=Je;var tn="[object Arguments]",en="[object Array]",nn="[object Object]",rn=Object.prototype.hasOwnProperty;const on=function t(e,n,r,o,i){return e===n||(null==e||null==n||!ce(e)&&!ce(n)?e!=e&&n!=n:function(t,e,n,r,o,i){var a=ie(t),u=ie(e),s=a?en:Qe(t),c=u?en:Qe(e),l=(s=s==tn?nn:s)==nn,f=(c=c==tn?nn:c)==nn,h=s==c;if(h&&be(t)){if(!be(e))return!1;a=!0,l=!1}if(h&&!l)return i||(i=new Zt),a||Pe(t)?Qt(t,e,n,r,o,i):function(t,e,n,r,o,i,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new te(t),new te(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return st(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=ee;case"[object Set]":var s=1&r;if(u||(u=ne),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=Qt(u(t),u(e),r,o,i,a);return a.delete(t),l;case"[object Symbol]":if(oe)return oe.call(t)==oe.call(e)}return!1}(t,e,s,n,r,o,i);if(!(1&n)){var p=l&&rn.call(t,"__wrapped__"),d=f&&rn.call(e,"__wrapped__");if(p||d){var v=p?t.value():t,y=d?e.value():e;return i||(i=new Zt),o(v,y,n,r,i)}}return!!h&&(i||(i=new Zt),function(t,e,n,r,o,i){var a=1&n,u=$e(t),s=u.length;if(s!=$e(e).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in e:Me.call(e,l)))return!1}var f=i.get(t),h=i.get(e);if(f&&h)return f==e&&h==t;var p=!0;i.set(t,e),i.set(e,t);for(var d=a;++c<s;){var v=t[l=u[c]],y=e[l];if(r)var g=a?r(y,v,l,e,t,i):r(v,y,l,t,e,i);if(!(void 0===g?v===y||o(v,y,n,r,i):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,r,o,i))}(e,n,r,o,t,i))};function an(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function un(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return an(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?an(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var cn={};function ln(t){var e=(0,r.useMemo)(i.getExtensionsConfigStore,[]),n=function(t,e){var n=sn((0,r.useState)(function(t,e){return e?function(){var n=t.getState(),r=(0,i.getExtensionConfigFromStore)(n,e.extensionSlotName,e.extensionId);if(r.loaded&&r.config)return r.config}:null}(t,e)),2),o=n[0],a=n[1];return(0,r.useEffect)((function(){if(e)return t.subscribe((function(t){var n=(0,i.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);n.loaded&&n.config&&!function(t,e){return on(t,e)}(n.config,o)&&a(n.config)}))}),[t,e,o]),o}(e,t);if(!n&&t){var o="".concat(t.extensionSlotName,"-").concat(t.extensionId);throw!cn[o]&&e&&(cn[o]=function(t,e){return new Promise((function(n){var r=t.subscribe((function(t){var o=(0,i.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(e,t)),cn[o]}return n||{}}function fn(){var t=(0,r.useContext)(o),e=t.moduleName,n=t.extension;if(!e&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var a=function(t){var e=(0,r.useMemo)((function(){return(0,i.getConfigStore)(t)}),[t]),n=t,o=function(t){var e=sn((0,r.useState)(function(t){return function(){var e=t.getState();return e.loaded&&e.config?e.config:null}}(t)),2),n=e[0],o=e[1];return(0,r.useEffect)((function(){return null==t?void 0:t.subscribe((function(t){t.loaded&&t.config&&o(t.config)}))}),[t]),n}(e);if(!o)throw cn[n]||(cn[n]=function(t){return new Promise((function(e){var n=t.subscribe((function(t){t.loaded&&t.config&&(e(t.config),n())}))}))}(e)),cn[n];return o}(e),u=ln(n),s=(0,r.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){un(t,e,n[e])}))}return t}({},a,u)}),[a,u]);return s}var hn,pn=v(766);function dn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function vn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){vn(t,e,n[e])}))}return t}!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLoadError"}(hn||(hn={}));var gn,mn={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};function bn(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]}function wn(t,e){switch(e.type){case hn.loadPatient:return yn({},t,{patientUuid:e.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case hn.newPatient:return yn({},t,{patient:e.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case hn.loadError:return yn({},t,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:e.err});default:return t}}function _n(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return dn(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dn(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useReducer)(wn,yn({},mn,{patientUuid:null!=t?t:null,isPendingUuid:!t,isLoadingPatient:!!t}))),n=e[0],o=e[1];return(0,r.useEffect)((function(){if(n.isPendingUuid){var t=bn();o(t?{type:hn.loadPatient,patientUuid:t}:{type:hn.newPatient,patient:null})}var e=!0;return n.isLoadingPatient&&n.patientUuid&&(0,pn.fetchCurrentPatient)(n.patientUuid).then((function(t){return e&&o({patient:t.data,type:hn.newPatient})}),(function(t){return e&&o({err:t,type:hn.loadError})})),function(){e=!1}}),[n.isPendingUuid,n.isLoadingPatient,n.patientUuid]),(0,r.useEffect)((function(){var t=function(t){var e=bn();e!=n.patientUuid&&o({type:hn.loadPatient,patientUuid:e})};return window.addEventListener("single-spa:routing-event",t),function(){return window.removeEventListener("single-spa:routing-event",t)}}),[n.patientUuid]),{isLoading:n.isPendingUuid||n.isLoadingPatient,patient:n.patient,patientUuid:null!=t?t:n.patientUuid,error:n.err}}function xn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Sn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function En(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Sn(t,e,n[e])}))}return t}function On(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return xn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLloadErroroadError"}(gn||(gn={}));var jn={patient:null,isLoadingPatient:!0,err:null};function Cn(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]}function An(t,e){switch(e.type){case gn.loadPatient:return En({},t,{patient:null,isLoadingPatient:!0,err:null});case gn.newPatient:return En({},t,{patient:e.patient,isLoadingPatient:!1,err:null});case gn.loadError:return En({},t,{patient:null,isLoadingPatient:!1,err:e.err});default:return t}}function Pn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cn(),e=On((0,r.useReducer)(An,jn),2),n=e[0],o=e[1];return(0,r.useEffect)((function(){var e=!0;return t?((0,pn.fetchCurrentPatient)(t).then((function(t){return e&&o({patient:t.data,type:gn.newPatient})}),(function(t){return e&&o({err:t,type:gn.loadError})})),o({type:gn.loadPatient})):o({type:gn.newPatient,patient:null}),function(){e=!1}}),[t]),[n.isLoadingPatient,n.patient,t,n.err]}var kn=l((0,f.getExtensionInternalStore)());function In(t){var e=x(t);return(0,r.useMemo)((function(){return Object.fromEntries(e.map((function(t){return[t.name,t.meta]})))}),[e])}var Tn=l((0,f.getExtensionStore)());function Rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ln(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Rn(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rn(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)(0))[1];return(0,r.useCallback)((function(){t((function(t){return t+1}))}),[])}function Dn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $n(){var t="tablet";return document.body.classList.forEach((function(e){switch(e){case"omrs-breakpoint-lt-tablet":t="phone";break;case"omrs-breakpoint-gt-tablet":t="desktop"}})),t}function Mn(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Dn(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dn(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)($n)),e=t[0],n=t[1];return(0,r.useEffect)((function(){var t=function(){n($n())};return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[]),e}function Nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Un(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Nn(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nn(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)([])),e=t[0],n=t[1];return(0,r.useEffect)((function(){var t=(0,pn.getLocations)().subscribe((function(t){n(t)}),(function(t){console.error(t)}));return function(){return t.unsubscribe()}}),[]),e}function Bn(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,r.useRef)(null);return(0,r.useEffect)((function(){if(e){var r=function(e){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(e.target))||t(e)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[t,e]),n}function Fn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Hn,Vn,zn=function(t){var e=t.privilege,n=t.children,o=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Fn(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fn(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)(null)),i=o[0],a=o[1];return(0,r.useEffect)((function(){var t=(0,pn.getCurrentUser)({includeAuthStatus:!1}).subscribe(a);return function(){return t.unsubscribe()}}),[]),i&&(0,pn.userHasAccess)(e,i)?r.default.createElement(r.default.Fragment,null,n):null};function Gn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Kn(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Gn(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gn(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)(null)),e=t[0],n=t[1],o=null;if(!e){if(Hn){var i=(0,pn.getSessionStore)().getState();i.loaded&&(o=i.session)}else Hn=new Promise((function(t){var e=function(e){var n=e.loaded,r=e.session;n&&(t(r),o=r,Vn&&Vn(),Vn=void 0)};e((0,pn.getSessionStore)().getState()),o||(Vn=(0,pn.getSessionStore)().subscribe(e))}));if(!o)throw Hn;n(o)}(0,r.useEffect)((function(){return Vn||(Vn=(0,pn.getSessionStore)().subscribe((function(t){var e=t.loaded,r=t.session;e&&(o=r,n(r))}))),function(){Vn&&Vn(),Vn=void 0}}),[]);var a=e||o;if(!a)throw Hn?(console.warn("useSession is in an unexpected state. Attempting to recover."),Hn):Error("useSession is in an invalid state.");return a}var qn=v(385);function Zn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Wn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Wn(t,e,n[e])}))}return t}function Xn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Zn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jn(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}var Qn=function(t){return t};function tr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qn,n=arguments.length>2?arguments[2]:void 0,o=Xn((0,r.useState)((function(){return e(t.getState())})),2),i=o[0],a=o[1];(0,r.useEffect)((function(){return(0,qn.subscribeTo)(t,e,a)}),[t,e]);var u={};return n&&(u=(0,r.useMemo)((function(){return Jn(t,n)}),[t,n])),Yn({},i,u)}function er(t,e){return tr(t,Qn,e)}function nr(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))}function rr(t,e){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:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){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=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var or,ir=function(){},ar=void 0,ur=Object,sr=function(t){return t===ar},cr=function(t){return"function"==typeof t},lr=function(t,e){return ur.assign({},t,e)},fr="undefined",hr=function(){return typeof window!=fr},pr=new WeakMap,dr=0,vr=function(t){var e,n,r=typeof t,o=t&&t.constructor,i=o==Date;if(ur(t)!==t||i||o==RegExp)e=i?t.toJSON():"symbol"==r?t.toString():"string"==r?JSON.stringify(t):""+t;else{if(e=pr.get(t))return e;if(e=++dr+"~",pr.set(t,e),o==Array){for(e="@",n=0;n<t.length;n++)e+=vr(t[n])+",";pr.set(t,e)}if(o==ur){e="#";for(var a=ur.keys(t).sort();!sr(n=a.pop());)sr(t[n])||(e+=n+":"+vr(t[n])+",");pr.set(t,e)}}return e},yr=!0,gr=hr(),mr=typeof document!=fr,br=gr&&window.addEventListener?window.addEventListener.bind(window):ir,wr=mr?document.addEventListener.bind(document):ir,_r=gr&&window.removeEventListener?window.removeEventListener.bind(window):ir,xr=mr?document.removeEventListener.bind(document):ir,Sr={isOnline:function(){return yr},isVisible:function(){var t=mr&&document.visibilityState;return sr(t)||"hidden"!==t}},Er={initFocus:function(t){return wr("visibilitychange",t),br("focus",t),function(){xr("visibilitychange",t),_r("focus",t)}},initReconnect:function(t){var e=function(){yr=!0,t()},n=function(){yr=!1};return br("online",e),br("offline",n),function(){_r("online",e),_r("offline",n)}}},Or=!hr()||"Deno"in window,jr=Or?r.useEffect:r.useLayoutEffect,Cr="undefined"!=typeof navigator&&navigator.connection,Ar=!Or&&Cr&&(["slow-2g","2g"].includes(Cr.effectiveType)||Cr.saveData),Pr=function(t){if(cr(t))try{t=t()}catch(e){t=""}var e=[].concat(t);return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?vr(t):"",e,t?"$swr$"+t:""]},kr=new WeakMap,Ir=function(t,e,n,r,o,i,a){void 0===a&&(a=!0);var u=kr.get(t),s=u[0],c=u[1],l=u[3],f=s[e],h=c[e];if(a&&h)for(var p=0;p<h.length;++p)h[p](n,r,o);return i&&(delete l[e],f&&f[0])?f[0](2).then((function(){return t.get(e)})):t.get(e)},Tr=0,Rr=function(){return++Tr},Lr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return nr(void 0,void 0,void 0,(function(){var e,n,r,o,i,a,u,s,c,l,f,h,p,d,v,y,g,m,b,w;return rr(this,(function(_){switch(_.label){case 0:if(e=t[0],n=t[1],r=t[2],o=t[3],a=!!sr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,s=!1!==i.rollbackOnError,c=i.optimisticData,l=Pr(n),f=l[0],h=l[2],!f)return[2];if(p=kr.get(e),d=p[2],t.length<3)return[2,Ir(e,f,e.get(f),ar,ar,u,!0)];if(v=r,g=Rr(),d[f]=[g,0],m=!sr(c),b=e.get(f),m&&(e.set(f,c),Ir(e,f,c)),cr(v))try{v=v(e.get(f))}catch(t){y=t}return v&&cr(v.then)?[4,v.catch((function(t){y=t}))]:[3,2];case 1:if(v=_.sent(),g!==d[f][0]){if(y)throw y;return[2,v]}y&&m&&s&&(a=!0,v=b,e.set(f,b)),_.label=2;case 2:return a&&(y||(cr(a)&&(v=a(v,b)),e.set(f,v)),e.set(h,lr(e.get(h),{error:y}))),d[f][1]=Rr(),[4,Ir(e,f,v,y,ar,u,!!a)];case 3:if(w=_.sent(),y)throw y;return[2,a?w:v]}}))}))},Dr=function(t,e){for(var n in t)t[n][0]&&t[n][0](e)},$r=function(t,e){if(!kr.has(t)){var n=lr(Er,e),r={},o=Lr.bind(ar,t),i=ir;if(kr.set(t,[r,{},{},{},o]),!Or){var a=n.initFocus(setTimeout.bind(ar,Dr.bind(ar,r,0))),u=n.initReconnect(setTimeout.bind(ar,Dr.bind(ar,r,1)));i=function(){a&&a(),u&&u(),kr.delete(t)}}return[t,o,i]}return[t,kr.get(t)[4]]},Mr=$r(new Map),Nr=Mr[0],Ur=Mr[1],Br=lr({onLoadingSlow:ir,onSuccess:ir,onError:ir,onErrorRetry:function(t,e,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!sr(i)&&a>i||setTimeout(r,u,o)},onDiscarded:ir,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Ar?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Ar?5e3:3e3,compare:function(t,e){return vr(t)==vr(e)},isPaused:function(){return!1},cache:Nr,mutate:Ur,fallback:{}},Sr),Fr=function(t,e){var n=lr(t,e);if(e){var r=t.use,o=t.fallback,i=e.use,a=e.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=lr(o,a))}return n},Hr=(0,r.createContext)({}),Vr=function(t){return cr(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}]},zr=function(){return lr(Br,(0,r.useContext)(Hr))},Gr=function(t,e,n){var r=e[t]||(e[t]=[]);return r.push(n),function(){var t=r.indexOf(n);t>=0&&(r[t]=r[r.length-1],r.pop())}},Kr={dedupe:!0},qr=(ur.defineProperty((function(t){var e=t.value,n=Fr((0,r.useContext)(Hr),e),o=e&&e.provider,i=(0,r.useState)((function(){return o?$r(o(n.cache||Nr),e):ar}))[0];return i&&(n.cache=i[0],n.mutate=i[1]),jr((function(){return i?i[2]:ar}),[]),(0,r.createElement)(Hr.Provider,lr(t,{value:n}))}),"default",{value:Br}),or=function(t,e,n){var o=n.cache,i=n.compare,a=n.fallbackData,u=n.suspense,s=n.revalidateOnMount,c=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,h=kr.get(o),p=h[0],d=h[1],v=h[2],y=h[3],g=Pr(t),m=g[0],b=g[1],w=g[2],_=(0,r.useRef)(!1),x=(0,r.useRef)(!1),S=(0,r.useRef)(m),E=(0,r.useRef)(e),O=(0,r.useRef)(n),j=function(){return O.current},C=function(){return j().isVisible()&&j().isOnline()},A=function(t){return o.set(w,lr(o.get(w),t))},P=o.get(m),k=sr(a)?n.fallback[m]:a,I=sr(P)?k:P,T=o.get(w)||{},R=T.error,L=!_.current,D=function(){return L&&!sr(s)?s:!j().isPaused()&&(u?!sr(I):sr(I)||n.revalidateIfStale)},$=!(!m||!e)&&(!!T.isValidating||L&&D()),M=function(t,e){var n=(0,r.useState)({})[1],o=(0,r.useRef)(t),i=(0,r.useRef)({data:!1,error:!1,isValidating:!1}),a=(0,r.useCallback)((function(t){var r=!1,a=o.current;for(var u in t){var s=u;a[s]!==t[s]&&(a[s]=t[s],i.current[s]&&(r=!0))}r&&!e.current&&n({})}),[]);return jr((function(){o.current=t})),[o,i.current,a]}({data:I,error:R,isValidating:$},x),N=M[0],U=M[1],B=M[2],F=(0,r.useCallback)((function(t){return nr(void 0,void 0,void 0,(function(){var e,r,a,u,s,c,l,f,h,p,d,g,w;return rr(this,(function(O){switch(O.label){case 0:if(e=E.current,!m||!e||x.current||j().isPaused())return[2,!1];u=!0,s=t||{},c=!y[m]||!s.dedupe,l=function(){return!x.current&&m===S.current&&_.current},f=function(){var t=y[m];t&&t[1]===a&&delete y[m]},h={isValidating:!1},p=function(){A({isValidating:!1}),l()&&B(h)},A({isValidating:!0}),B({isValidating:!0}),O.label=1;case 1:return O.trys.push([1,3,,4]),c&&(Ir(o,m,N.current.data,N.current.error,!0),n.loadingTimeout&&!o.get(m)&&setTimeout((function(){u&&l()&&j().onLoadingSlow(m,n)}),n.loadingTimeout),y[m]=[e.apply(void 0,b),Rr()]),w=y[m],r=w[0],a=w[1],[4,r];case 2:return r=O.sent(),c&&setTimeout(f,n.dedupingInterval),y[m]&&y[m][1]===a?(A({error:ar}),h.error=ar,d=v[m],!sr(d)&&(a<=d[0]||a<=d[1]||0===d[1])?(p(),c&&l()&&j().onDiscarded(m),[2,!1]):(i(N.current.data,r)?h.data=N.current.data:h.data=r,i(o.get(m),r)||o.set(m,r),c&&l()&&j().onSuccess(r,m,n),[3,4])):(c&&l()&&j().onDiscarded(m),[2,!1]);case 3:return g=O.sent(),f(),j().isPaused()||(A({error:g}),h.error=g,c&&l()&&(j().onError(g,m,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||cr(n.shouldRetryOnError)&&n.shouldRetryOnError(g))&&C()&&j().onErrorRetry(g,m,n,F,{retryCount:(s.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return u=!1,p(),l()&&c&&Ir(o,m,h.data,h.error,!1),[2,!0]}}))}))}),[m]),H=(0,r.useCallback)(Lr.bind(ar,o,(function(){return S.current})),[]);if(jr((function(){E.current=e,O.current=n})),jr((function(){if(m){var t=m!==S.current,e=F.bind(ar,Kr),n=0,r=Gr(m,d,(function(t,e,n){B(lr({error:e,isValidating:n},i(N.current.data,t)?ar:{data:t}))})),o=Gr(m,p,(function(t){if(0==t){var r=Date.now();j().revalidateOnFocus&&r>n&&C()&&(n=r+j().focusThrottleInterval,e())}else if(1==t)j().revalidateOnReconnect&&C()&&e();else if(2==t)return F()}));return x.current=!1,S.current=m,_.current=!0,t&&B({data:I,error:R,isValidating:$}),D()&&(sr(I)||Or?e():(a=e,hr()&&typeof window.requestAnimationFrame!=fr?window.requestAnimationFrame(a):setTimeout(a,1))),function(){x.current=!0,r(),o()}}var a}),[m,F]),jr((function(){var t;function e(){var e=cr(c)?c(I):c;e&&-1!==t&&(t=setTimeout(n,e))}function n(){N.current.error||!l&&!j().isVisible()||!f&&!j().isOnline()?e():F(Kr).then(e)}return e(),function(){t&&(clearTimeout(t),t=-1)}}),[c,l,f,F]),(0,r.useDebugValue)(I),u&&sr(I)&&m)throw E.current=e,O.current=n,x.current=!1,sr(R)?F(Kr):R;return{mutate:H,get data(){return U.data=!0,I},get error(){return U.error=!0,R},get isValidating(){return U.isValidating=!0,$}}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=zr(),r=Vr(t),o=r[0],i=r[1],a=r[2],u=Fr(n,a),s=or,c=u.use;if(c)for(var l=c.length;l-- >0;)s=c[l](s);return s(o,i||u.fetcher,u)}),Zr=v(688),Wr=v(332),Yr=v.n(Wr);function Xr(t){var e,n=qr(t?"/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(pn.defaultVisitCustomRepresentation,"&includeInactive=false"):null,pn.openmrsFetch),o=n.data,i=n.error;return{error:i,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,r.useMemo)((function(){return null!==(e=null==o?void 0:o.data.results.find((function(t){return null===t.stopDatetime&&(0,Zr.default)(t.startDatetime).isToday()})))&&void 0!==e?e:null}),[null==o?void 0:o.data.results]),isLoading:!o&&!i}}function Jr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Qr(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Jr(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jr(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)([])),e=t[0],n=t[1];return(0,r.useEffect)((function(){var t=(0,pn.getVisitTypes)().subscribe((function(t){n(t)}),(function(t){return console.error(t)}));return function(){return t.unsubscribe()}}),[]),e}function to(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function eo(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return to(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?to(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function no(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=eo((0,r.useState)(1),2),o=n[0],i=n[1],a=(0,r.useMemo)((function(){return Math.max(1,Math.ceil(t.length/e))}),[t.length,e]),u=(0,r.useMemo)((function(){var n=(o-1)*e,r=(o+0)*e;return t.slice(n,r)}),[t,o,e]);return{results:u,totalPages:a,currentPage:o,paginated:t.length>e,showNextButton:o<a,showPreviousButton:o>1,goTo:function(t){i(Math.max(1,Math.min(a,t)))},goToNext:function(){o<a&&i(o+1)},goToPrevious:function(){o>1&&i(o-1)}}}Zr.default.extend(Yr())})(),y})())}}}))},5435:()=>{System.register([],(function(t,e){return{execute:function(){t((()=>{var t={968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})();var o={};return(0,r(968).s)(1),(()=>{"use strict";function t(t,e){for(var n in e)t[n]=e[n];return t}function e(e){var n=[];function r(t){for(var e=[],r=0;r<n.length;r++)n[r]===t?t=null:e.push(n[r]);n=e}function o(r,o,i){e=o?r:t(t({},e),r);for(var a=n,u=0;u<a.length;u++)a[u](e,i)}return e=e||{},{action:function(t){function n(e){o(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:o,subscribe:function(t){return n.push(t),function(){r(t)}},unsubscribe:r,getState:function(){return e}}}r.r(o),r.d(o,{createAppState:()=>u,createGlobalStore:()=>i,getAppState:()=>s,getGlobalStore:()=>a,subscribeTo:()=>c});var n={};function i(t,r){var o=n[t];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;var i=e(r);return n[t]={value:i,active:!0},i}function a(t,r){var o=n[t];if(!o){var i=e(r);return n[t]={value:i,active:!1},i}return o.value}function u(t){return i("app",t)}function s(){return a("app",{})}function c(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))}})(),o})())}}}))},2742:()=>{System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","react","react-dom","rxjs"],(function(t,e){var n={},r={},o={},i={},a={},u={};return{setters:[function(){},function(){},function(t){o.createGlobalStore=t.createGlobalStore},function(){},function(){},function(t){u.Subject=t.Subject}],execute:function(){t((()=>{var t={584:(t,e,n)=>{var r=n(518).R;e.s=function(t){if(t||(t=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,t)}},518:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},78:()=>{var t=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-state","single-spa"],(function(e,n){var r={},o={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore,r.getGlobalStore=t.getGlobalStore},function(t){o.navigateToUrl=t.navigateToUrl}],execute:function(){e(function(){"use strict";var e={685:function(t){t.exports=r},645:function(t){t.exports=o}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return function(){var e=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},n=function(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}},r=function(t){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:n((function(e){return t(o,e)}));default:return e(o)&&e(i)?r:e(o)?n((function(e){return t(e,i)})):e(i)?n((function(e){return t(o,e)})):t(o,i)}}},o=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},u=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},s=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},c=function(t,e,n,r){var i=o(t);function a(t,e){return st(t,e,n.slice(),r.slice())}return!u((function(t,e){return!u(a,e,t)}),o(e),i)},l=function(t){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return e(i)?o:r((function(e,n){return t(i,e,n)}));case 2:return e(i)&&e(a)?o:e(i)?r((function(e,n){return t(e,a,n)})):e(a)?r((function(e,n){return t(i,e,n)})):n((function(e){return t(i,a,e)}));default:return e(i)&&e(a)&&e(u)?o:e(i)&&e(a)?r((function(e,n){return t(e,n,u)})):e(i)&&e(u)?r((function(e,n){return t(e,a,n)})):e(a)&&e(u)?r((function(e,n){return t(i,e,n)})):e(i)?n((function(e){return t(e,a,u)})):e(a)?n((function(e){return t(i,e,u)})):e(u)?n((function(e){return t(i,a,e)})):t(i,a,u)}}},f=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},h=function(t,e,n,r){return t["@@transducer/result"](n[r](mt(t["@@transducer/step"],t),e))},p=function(t){return"[object Object]"===Object.prototype.toString.call(t)},d=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},y=function(t){return(0,kt.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},g=function(){return(0,kt.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(t){return b(g().getState(),t)},b=function(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,kt.getGlobalStore)("config-extensions",{configs:{}})},_=function(t,e){return x(w().getState(),t,e)},x=function(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},E=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},O=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){E(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},j=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||A(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},C=function(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},A=function(t,e){if(t){if("string"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}},P=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=F(u,t,e);y(u).setState({loaded:!0,config:s})}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},k=function(t,e){var n,r,o=(n=V(B(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=j(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var h,p=Object.entries(s)[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var d=j(h.value,2),v=d[0];U(d[1],u,v)}}catch(t){l=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return O({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=j(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),a=g(),u=a.getState(),s={slots:O({},u.slots,i)};ct(u,s)||a.setState(s)},I=function(t,e){var n=function(t,e){var n=Mt(pt(t.schemas)),r=C(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=j(u.value,2);n=V([n,Nt(c[0],c[1])])}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(t,e);$t.setState({config:n})},T=function(t,e,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=e.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=N(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,t,n);r[c.slotName]=O({},r[c.slotName],E({},c.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}w().setState({configs:r})},R=function(t,e){Ut(t,e);var n=Tt.getState();Tt.setState({schemas:O({},n.schemas,E({},t,e))})},L=function(t,e){Ut(t,e);var n=Tt.getState();n.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),Tt.setState({schemas:O({},n.schemas,E({},t,e))})},D=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Tt.getState();Tt.setState({providedConfigs:C(n.providedConfigs).concat([{source:e,config:t}])})},$=function(t){return new Promise((function(e){var n=function(t){t.loaded&&t.config&&(e(t.config),o&&o())},r=y(t);n(r.getState());var o=r.subscribe(n)}))},M=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];z(t,e,n);var o=Ht(t,e,r);return Ft(t,o,n),o},N=function(t,e,n,r,o,i){var a,u,s,c,l=j(r.split("#"),1)[0],f=o.schemas[l],h=f?l:e,p=B(o,i),d=H(t,p),v=null!==(c=null==d||null===(a=d.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},y=V([H(h,p),v]),g=null!=f?f:o.schemas[e];z(g,y,h);var m=Ht(g,y,o.devDefaultsAreOn);return Ft(g,m,h),delete m.extensionSlots,m},U=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(Z(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},B=function(t,e){return C(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},F=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=H(t,B(e,n));z(r,o,t);var i=Ht(r,o,e.devDefaultsAreOn);return Ft(r,i,t),delete i.extensionSlots,i},H=function(t,e){return V(e.map((function(e){return e[t]})).filter((function(t){return!!t})))},V=function(t){return wt(St)({},t)},z=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s],l=n+"."+s,f=t[s];t.hasOwnProperty(s)?Bt(f,c,l):"extensionSlots"===s&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},G=function(t,e,n){e&&K(t,[{Array:Et,Boolean:Ot,ConceptUuid:Pt,Number:jt,Object:At,String:Ct,UUID:Pt,PersonAttributeTypeUuid:Pt,PatientIdentifierTypeUuid:Pt}[e]],n)},K=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=(0,a.value)(n);"string"==typeof s&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(s)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(s)))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},q=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},Z=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},W=function(t){var e=window.getOpenmrsSpaBase().replace(/\/$/,"");return Y(t,{openmrsBase:window.openmrsBase,openmrsSpaBase:e}).replace(/^\/\//,"/")},Y=function(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)},X=function(t){var e=t.to,n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=W(e);r.startsWith(n)?(0,Vt.navigateToUrl)(r):window.location.assign(r)};i.r(a),i.d(a,{Type:function(){return ft},configExtensionStore:function(){return Dt},configInternalStore:function(){return Tt},defineConfigSchema:function(){return R},defineExtensionConfigSchema:function(){return L},getConfig:function(){return $},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return x},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return g},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return $t},inRange:function(){return zt},interpolateString:function(){return Y},interpolateUrl:function(){return W},isUrl:function(){return Kt},isUrlWithTemplateParameters:function(){return Gt},navigate:function(){return X},oneOf:function(){return qt},processConfig:function(){return M},provide:function(){return D},temporaryConfigStore:function(){return Lt},validator:function(){return d},validators:function(){return Zt}});var J="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},Q=Object.prototype.toString,tt=function(){return"[object Arguments]"===Q.call(arguments)?function(t){return"[object Arguments]"===Q.call(t)}:function(t){return s("callee",t)}}(),et=tt,nt=!{toString:null}.propertyIsEnumerable("toString"),rt=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ot=function(){return arguments.propertyIsEnumerable("length")}(),it=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},at="function"!=typeof Object.keys||ot?n((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=ot&&et(t);for(e in t)!s(e,t)||o&&"length"===e||(r[r.length]=e);if(nt)for(n=rt.length-1;n>=0;)s(e=rt[n],t)&&!it(r,e)&&(r[r.length]=e),n-=1;return r})):n((function(t){return Object(t)!==t?[]:Object.keys(t)})),ut=n((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function st(e,n,r,o){if(J(e,n))return!0;var i,a,u=ut(e);if(u!==ut(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(i=e.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return e===n;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":t(e))!=(void 0===n?"undefined":t(n))||!J(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!J(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===e)return o[l]===n;l-=1}switch(u){case"Map":return e.size===n.size&&c(e.entries(),n.entries(),r.concat([e]),o.concat([n]));case"Set":return e.size===n.size&&c(e.values(),n.values(),r.concat([e]),o.concat([n]));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 f=at(e);if(f.length!==at(n).length)return!1;var h=r.concat([e]),p=o.concat([n]);for(l=f.length-1;l>=0;){var d=f[l];if(!s(d,n)||!st(n[d],e[d],h,p))return!1;l-=1}return!0}var ct=r((function(t,e){return st(t,e,[],[])}));function lt(t,e,n,r){var o,i=function(o){for(var i=e.length,a=0;a<i;){if(t===e[a])return n[a];a+=1}for(var u in e[a+1]=t,n[a+1]=o,t)o[u]=r?lt(t[u],e,n,!0):t[u];return o};switch(ut(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var ft,ht,pt=n((function(t){return null!=t&&"function"==typeof t.clone?t.clone():lt(t,[],[],!0)})),dt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},vt=n((function(t){return!!dt(t)||!!t&&"object"==typeof t&&(e=t,!("[object String]"===Object.prototype.toString.call(e)))&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1));var e})),yt=function(){var t=function(t){this.f=t};return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),gt=r((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,a){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,a,u){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,a,u,s){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,a,u,s,c){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,a,u,s,c,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),mt=gt,bt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",wt=l((function(t,e,n){if("function"==typeof t&&(t=new yt(t)),vt(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return h(t,e,n,"fantasy-land/reduce");if(null!=n[bt])return f(t,e,n[bt]());if("function"==typeof n.next)return f(t,e,n);if("function"==typeof n.reduce)return h(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),_t=l((function(t,e,n){var r,o={};for(r in e)s(r,e)&&(o[r]=s(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)s(r,n)&&!s(r,o)&&(o[r]=n[r]);return o})),xt=l((function t(e,n,r){return _t((function(n,r,o){return p(r)&&p(o)?t(e,r,o):e(n,r,o)}),n,r)})),St=r((function(t,e){return xt((function(t,e,n){return n}),t,e)}));(ht=ft||(ft={})).Array="Array",ht.Boolean="Boolean",ht.ConceptUuid="ConceptUuid",ht.Number="Number",ht.Object="Object",ht.String="String",ht.UUID="UUID",ht.PersonAttributeTypeUuid="PersonAttributeTypeUuid",ht.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Et=d((function(t){return Array.isArray(t)}),"must be an array"),Ot=d((function(t){return"boolean"==typeof t}),"must be a boolean"),jt=d((function(t){return"number"==typeof t}),"must be a number"),Ct=d((function(t){return"string"==typeof t}),"must be a string"),At=d((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),Pt=d((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),kt=i(685),It={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Tt=(0,kt.createGlobalStore)("config-internal",It),Rt=v();Tt.subscribe((function(t){var e;t.devDefaultsAreOn!=Rt&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Rt=t.devDefaultsAreOn)}));var Lt=(0,kt.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Lt.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var Dt=(0,kt.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),$t=(0,kt.createGlobalStore)("config-implementer-tools",{config:{}});function Mt(t){return t.hasOwnProperty("_default")?O({},t,{_value:t._default,_source:"default"}):Z(t)?Object.keys(t).reduce((function(e,n){return e[n]=Mt(t[n]),e}),{}):{}}function Nt(t,e){return Z(t)?Object.keys(t).reduce((function(n,r){return n[r]=Nt(t[r],e),n}),{}):{_value:t,_source:e}}function Ut(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,s=function(o,i){var a=i.value,u=n+(n&&".")+a,s=e[a];if(!Z(s))return console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";s.hasOwnProperty("_default")||Ut(t,s,u);var c=s._elements;if(q(c)&&Ut(t,c,u+"._elements"),s._validators){var l=!0,f=!1,h=void 0;try{for(var p,d=s._validators[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}}var y=s._type;y&&!Object.values(ft).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(ft).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(s).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(s))),c&&y&&![ft.Array,ft.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s(c,u)}catch(t){i=!0,a=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Bt(t,e,n){G(n,t._type,e),Z(e)?t._type===ft.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s];z(t._elements,c,"".concat(n,".").concat(s))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||z(t,e,n):t._type===ft.Array&&function(t,e,n){if(q(t._elements))for(var r=0;r<e.length;r++)Bt(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;G("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function Ft(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&K(n,t._validators,e),Z(e)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s],l=n+"."+s,f=t[s];t._type===ft.Object&&t._elements?Ft(t._elements,c,l):Ft(f,c,l)}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)Ft(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}P(Tt.getState(),Lt.getState()),Tt.subscribe((function(t){return P(t,Lt.getState())})),Lt.subscribe((function(t){return P(Tt.getState(),t)})),I(Tt.getState(),Lt.getState()),Tt.subscribe((function(t){return I(t,Lt.getState())})),Lt.subscribe((function(t){return I(Tt.getState(),t)})),k(Tt.getState(),Lt.getState()),Tt.subscribe((function(t){return k(t,Lt.getState())})),Lt.subscribe((function(t){return k(Tt.getState(),t)})),T(Tt.getState(),Dt.getState(),Lt.getState()),Tt.subscribe((function(t){T(t,Dt.getState(),Lt.getState())})),Dt.subscribe((function(t){T(Tt.getState(),t,Lt.getState())})),Lt.subscribe((function(t){T(Tt.getState(),Dt.getState(),t)}));var Ht=function(t,e,n){var r=pt(e);if(!t)return r;var o=!0,i=!1,a=void 0;try{for(var u,s=function(e,o){var i=o.value,a=r[i],u=t[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var s=u._devDefault||u._default;r[i]=n?s:u._default}var c=u._elements;if(a&&q(c))if(u._type===ft.Array&&Array.isArray(a)){var l=a.map((function(t){return Ht(c,t,n)}));r[i]=l}else if(u._type===ft.Object){var f=!0,h=!1,p=void 0;try{for(var d,v=Object.keys(a)[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){var y=d.value;a[y]=Ht(c,a[y],n)}}catch(t){h=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw p}}}}else if(Z(u)){var g=r.hasOwnProperty(i)?a:{};Z(g)&&(r[i]=Ht(u,g,n))}},c=Object.keys(t)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s(0,u)}catch(t){i=!0,a=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return r},Vt=i(645),zt=function(t,e){return d((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},Gt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return d((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},Kt=Gt([]),qt=function(t){return d((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Zt={inRange:zt,isUrl:Kt,isUrlWithTemplateParameters:Gt,oneOf:qt}}(),a}())}}}))},991:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/access_time24px">\n <path id="icon/callend/access_time24px" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z" />\n </g>\n <title>Access time rounded</title>\n</svg>'},662:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Add rounded</title>\n</svg>\n'},865:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_back_24px">\n <path id="icon/navigation/arrow_back_24px_2" d="M18.7912 11.005H7.62124L12.5012 6.12499C12.8912 5.73499 12.8912 5.09499 12.5012 4.70499C12.3144 4.51774 12.0608 4.41251 11.7962 4.41251C11.5317 4.41251 11.2781 4.51774 11.0912 4.70499L4.50124 11.295C4.11124 11.685 4.11124 12.315 4.50124 12.705L11.0912 19.295C11.4812 19.685 12.1112 19.685 12.5012 19.295C12.8912 18.905 12.8912 18.275 12.5012 17.885L7.62124 13.005H18.7912C19.3412 13.005 19.7912 12.555 19.7912 12.005C19.7912 11.455 19.3412 11.005 18.7912 11.005Z"/>\n </g>\n <title>Arrow back rounded</title>\n</svg>\n'},646:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_downward_24px">\n <path id="icon/navigation/arrow_downward_24px_2" d="M11.005 5.20874V16.3787L6.12498 11.4987C5.73498 11.1087 5.09498 11.1087 4.70498 11.4987C4.31498 11.8887 4.31498 12.5187 4.70498 12.9087L11.295 19.4987C11.685 19.8887 12.315 19.8887 12.705 19.4987L19.295 12.9087C19.685 12.5187 19.685 11.8887 19.295 11.4987C19.1081 11.3115 18.8545 11.2063 18.59 11.2063C18.3255 11.2063 18.0718 11.3115 17.885 11.4987L13.005 16.3787V5.20874C13.005 4.65874 12.555 4.20874 12.005 4.20874C11.455 4.20874 11.005 4.65874 11.005 5.20874Z"/>\n </g>\n <title>Arrow downward rounded</title>\n</svg>\n'},509:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"/>\n <title>Arrow forward rounded</title>\n</svg>'},250:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_upward_24px">\n <path id="icon/navigation/arrow_upward_24px_2" d="M13 18.7913V7.62126L17.88 12.5013C18.27 12.8913 18.91 12.8913 19.3 12.5013C19.69 12.1113 19.69 11.4813 19.3 11.0913L12.71 4.50126C12.5231 4.314 12.2695 4.20877 12.005 4.20877C11.7405 4.20877 11.4868 4.314 11.3 4.50126L4.69997 11.0813C4.30997 11.4713 4.30997 12.1013 4.69997 12.4913C5.08997 12.8813 5.71997 12.8813 6.10997 12.4913L11 7.62126V18.7913C11 19.3413 11.45 19.7913 12 19.7913C12.55 19.7913 13 19.3413 13 18.7913Z"/>\n </g>\n <title>Arrow upward rounded </title>\n</svg>\n'},142:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/calendar24px">\n <path d="M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z"/>\n </g>\n <title>Calendar rounded</title>\n</svg>'},451:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n <title>Check circle</title>\n</svg>\n'},61:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_down_24px">\n <path id="icon/navigation/chevron_down_24px" d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/>\n </g>\n <title>Chevron down</title>\n</svg>\n'},76:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_left_24px">\n <path id="icon/navigation/chevron_left_24px_2" d="M15 6.70499C14.8132 6.51774 14.5595 6.41251 14.295 6.41251C14.0305 6.41251 13.7769 6.51774 13.59 6.70499L9.00002 11.295C8.61002 11.685 8.61002 12.315 9.00002 12.705L13.59 17.295C13.98 17.685 14.61 17.685 15 17.295C15.39 16.905 15.39 16.275 15 15.885L11.12 11.995L15 8.11499C15.39 7.72499 15.38 7.08499 15 6.70499Z"/>\n </g>\n <title>Chevron left</title>\n</svg>\n'},600:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_right_24px">\n <path id="icon/navigation/chevron_right_24px_2" d="M9.00002 6.71063C8.61002 7.10063 8.61002 7.73063 9.00002 8.12063L12.88 12.0006L9.00002 15.8806C8.61002 16.2706 8.61002 16.9006 9.00002 17.2906C9.39002 17.6806 10.02 17.6806 10.41 17.2906L15 12.7006C15.39 12.3106 15.39 11.6806 15 11.2906L10.41 6.70063C10.03 6.32063 9.39002 6.32063 9.00002 6.71063Z"/>\n </g>\n <title>Chevron right</title>\n</svg>\n'},40:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_up_24px">\n <path d="M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"/>\n </g>\n <title>Chevron up</title>\n</svg>\n'},714:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>\n <title>Close icon</title>\n</svg>'},752:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" />\n <title>Download icon</title>\n</svg>'},862:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n<g id="icon/navigation/home_24px">\n <path id="icon/navigation/home_24px" d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"/>\n</g>\n<title>Home rounded</title>\n</svg>'},601:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/important_notification_24px_rounded">\n <path d="M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"/>\n </g>\n <title>Important notification</title>\n</svg>\n'},879:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">\n <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>\n <path d="M0 0h24v24H0z" class="omrs-icon-location"/>\n <title>Location icon</title>\n</svg>'},739:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/menu_24px">\n <path id="icon/navigation/menu_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M4 8C3.44995 8 3 7.54999 3 7C3 6.45001 3.44995 6 4 6H20C20.55 6 21 6.45001 21 7C21 7.54999 20.55 8 20 8H4ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.44995 11 3 11.45 3 12C3 12.55 3.44995 13 4 13ZM4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.44995 16 3 16.45 3 17C3 17.55 3.44995 18 4 18Z"/>\n </g>\n <title>Menu rounded</title>\n</svg>\n'},524:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Remove rounded</title>\n</svg>\n'},787:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/search_24px">\n <path id="icon/action/search_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M15.1865 14.4716H15.9765L20.2165 18.7316C20.6266 19.1416 20.6266 19.8116 20.2165 20.2216C19.8065 20.6316 19.1366 20.6316 18.7265 20.2216L14.4765 15.9716V15.1816L14.2065 14.9016C12.8065 16.1016 10.8966 16.7216 8.86655 16.3816C6.08652 15.9116 3.86655 13.5916 3.52658 10.7916C3.00656 6.56158 6.5665 3.00158 10.7966 3.52157C13.5965 3.86157 15.9166 6.08157 16.3866 8.86157C16.7265 10.8916 16.1065 12.8016 14.9066 14.2016L15.1865 14.4716ZM5.47653 9.97155C5.47653 12.4615 7.48654 14.4716 9.97653 14.4716C12.4665 14.4716 14.4765 12.4615 14.4765 9.97155C14.4765 7.48156 12.4665 5.47155 9.97653 5.47155C7.48654 5.47155 5.47653 7.48156 5.47653 9.97155Z"/>\n </g>\n <title>Search rounded</title>\n</svg>\n'},592:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/supervised_user_circle_24px">\n <path id="icon/action/supervised_user_circle_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47998 2 2 6.48001 2 12C2 17.52 6.47998 22 12 22C17.52 22 22 17.52 22 12C22 6.48001 17.52 2 12 2ZM15.61 8.34C16.6801 8.34 17.54 9.19998 17.54 10.27C17.54 11.34 16.6801 12.2 15.61 12.2C14.54 12.2 13.6801 11.34 13.6801 10.27C13.67 9.19998 14.54 8.34 15.61 8.34ZM11.97 9.12C11.97 7.82001 10.91 6.76001 9.60999 6.76001C8.30005 6.76001 7.25 7.81 7.25 9.12C7.25 10.42 8.31006 11.48 9.60999 11.48C10.91 11.48 11.97 10.42 11.97 9.12ZM9.60999 15.89V19.64C7.20996 18.89 5.30994 17.04 4.46997 14.68C5.52002 13.56 8.14001 12.99 9.60999 12.99C10.14 12.99 10.8099 13.07 11.51 13.21C9.87 14.08 9.60999 15.23 9.60999 15.89ZM11.21 19.96C11.47 19.99 11.73 20 12 20C15.39 20 18.2799 17.88 19.45 14.91C18.5299 14.15 16.6799 13.76 15.61 13.76C14.1499 13.76 11.21 14.47 11.21 15.89V19.96Z"/>\n </g>\n <title>Supervised user circle rounded</title>\n</svg>\n'},141:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path id="icon/action/visibility_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 4.5C7 4.5 2.72998 7.60999 1 12C2.72998 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.60999 17 4.5 12 4.5ZM12 17C9.23999 17 7 14.76 7 12C7 9.23999 9.23999 7 12 7C14.76 7 17 9.23999 17 12C17 14.76 14.76 17 12 17ZM9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12Z"/>\n </g>\n <title>Visibility rounded</title>\n</svg>\n'},647:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path d="M15.85 3.85L17.3 5.3l-2.18 2.16c-.39.39-.39 1.03 0 1.42.39.39 1.03.39 1.42 0L18.7 6.7l1.45 1.45c.31.31.85.09.85-.36V3.5c0-.28-.22-.5-.5-.5h-4.29c-.45 0-.67.54-.36.85zm-12 4.3L5.3 6.7l2.16 2.18c.39.39 1.03.39 1.42 0 .39-.39.39-1.03 0-1.42L6.7 5.3l1.45-1.45c.31-.31.09-.85-.36-.85H3.5c-.28 0-.5.22-.5.5v4.29c0 .45.54.67.85.36zm4.3 12L6.7 18.7l2.18-2.16c.39-.39.39-1.03 0-1.42-.39-.39-1.03-.39-1.42 0L5.3 17.3l-1.45-1.45c-.31-.31-.85-.09-.85.36v4.29c0 .28.22.5.5.5h4.29c.45 0 .67-.54.36-.85zm12-4.3L18.7 17.3l-2.16-2.18c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.03 0 1.42l2.18 2.16-1.45 1.45c-.31.31-.09.85.36.85h4.29c.28 0 .5-.22.5-.5v-4.29c0-.45-.54-.67-.85-.36z" />\n </g>\n <title>\n Zoom Out \n </title>\n</svg>'},885:t=>{"use strict";t.exports='<svg viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.29 40.3278C45.3275 35.2904 52.2878 32.1739 59.9776 32.1739C67.6466 32.1739 74.5911 35.2765 79.6245 40.29L79.6454 21.7502C73.7513 18.7143 67.0622 17 59.9776 17C52.8891 17 46.1652 18.9309 40.2692 21.9679L40.29 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6719 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6868 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.507L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M185.885 90.9982H187.309L190.043 97.3236H190.066L192.824 90.9982H194.215V99.0676H193.258V92.2971H193.234L190.34 99.0676H189.758L186.864 92.2971H186.842V99.0676H185.885V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M198.386 90.9982H203.457V91.8867H199.343V94.4168H203.184V95.3062H199.343V98.1782H203.663V99.0676H198.386V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M207.891 98.1782H209.713C211.561 98.1782 212.963 97.2431 212.963 95.0319C212.963 92.8218 211.561 91.8867 209.713 91.8867H207.891V98.1782ZM206.934 90.9982H210.034C211.617 90.9982 213.987 92.0586 213.987 95.0319C213.987 98.0083 211.617 99.0676 210.034 99.0676H206.934V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.007 99.0676H217.965V90.9982H217.007V99.0676Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.105 92.6628C226.627 92.0119 225.863 91.6819 225.088 91.6819C223.288 91.6819 222.011 93.266 222.011 95.0319C222.011 96.9012 223.277 98.3839 225.088 98.3839C226.068 98.3839 226.855 97.9844 227.425 97.255L228.143 97.8582C227.425 98.8281 226.377 99.2724 225.088 99.2724C222.774 99.2724 220.986 97.4826 220.986 95.0319C220.986 92.6628 222.695 90.7935 225.088 90.7935C226.183 90.7935 227.254 91.1701 227.937 92.0586L227.105 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M233.557 92.2295H233.533L231.858 96.1947H235.152L233.557 92.2295ZM233.123 90.9982H234.023L237.453 99.0676H236.336L235.516 97.0841H231.482L230.65 99.0676H229.568L233.123 90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M240.006 90.9982H240.964V98.1782H244.656V99.0676H240.006V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M252.793 94.5539H253.648C254.708 94.5539 256.087 94.5539 256.087 93.2203C256.087 92.0586 255.073 91.8867 254.139 91.8867H252.793V94.5539ZM251.836 90.9982H253.899C255.46 90.9982 257.113 91.2258 257.113 93.2203C257.113 94.3939 256.349 95.1582 255.095 95.3519L257.386 99.0676H256.213L254.023 95.4434H252.793V99.0676H251.836V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M260.51 90.9982H265.58V91.8867H261.468V94.4168H265.308V95.3062H261.468V98.1782H265.786V99.0676H260.51V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M274.402 92.6628C273.923 92.0119 273.16 91.6819 272.384 91.6819C270.584 91.6819 269.307 93.266 269.307 95.0319C269.307 96.9012 270.573 98.3839 272.384 98.3839C273.364 98.3839 274.151 97.9844 274.72 97.255L275.438 97.8582C274.72 98.8281 273.672 99.2724 272.384 99.2724C270.071 99.2724 268.282 97.4826 268.282 95.0319C268.282 92.6628 269.991 90.7935 272.384 90.7935C273.478 90.7935 274.55 91.1701 275.234 92.0586L274.402 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M284.739 95.0319C284.739 93.1746 283.439 91.6819 281.548 91.6819C279.656 91.6819 278.357 93.1746 278.357 95.0319C278.357 96.8903 279.656 98.3839 281.548 98.3839C283.439 98.3839 284.739 96.8903 284.739 95.0319ZM277.33 95.0319C277.33 92.5932 279.097 90.7935 281.548 90.7935C283.998 90.7935 285.765 92.5932 285.765 95.0319C285.765 97.4726 283.998 99.2724 281.548 99.2724C279.097 99.2724 277.33 97.4726 277.33 95.0319Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M289.514 94.5539H290.369C291.428 94.5539 292.807 94.5539 292.807 93.2203C292.807 92.0586 291.793 91.8867 290.859 91.8867H289.514V94.5539ZM288.556 90.9982H290.618C292.181 90.9982 293.833 91.2258 293.833 93.2203C293.833 94.3939 293.07 95.1582 291.817 95.3519L294.106 99.0676H292.933L290.744 95.4434H289.514V99.0676H288.556V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M297.81 98.1782H299.635C301.48 98.1782 302.881 97.2431 302.881 95.0319C302.881 92.8218 301.48 91.8867 299.635 91.8867H297.81V98.1782ZM296.853 90.9982H299.953C301.538 90.9982 303.909 92.0586 303.909 95.0319C303.909 98.0083 301.538 99.0676 299.953 99.0676H296.853V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M315.407 92.4223C315.089 91.9095 314.517 91.6819 313.937 91.6819C313.093 91.6819 312.216 92.0814 312.216 93.0384C312.216 93.7788 312.626 94.1097 313.914 94.5202C315.168 94.9187 316.331 95.3291 316.331 96.9132C316.331 98.5201 314.951 99.2724 313.493 99.2724C312.558 99.2724 311.555 98.9643 311.007 98.1554L311.828 97.4826C312.17 98.0759 312.854 98.3839 313.549 98.3839C314.37 98.3839 315.303 97.9049 315.303 96.9807C315.303 95.9899 314.633 95.818 313.196 95.341C312.057 94.9644 311.19 94.4625 311.19 93.1189C311.19 91.5677 312.523 90.7935 313.937 90.7935C314.837 90.7935 315.601 91.0439 316.193 91.7386L315.407 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M320.844 95.5914L317.835 90.9982H319.054L321.323 94.6454L323.658 90.9982H324.81L321.8 95.5914V99.0676H320.844V95.5914Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M330.565 92.4223C330.245 91.9095 329.675 91.6819 329.094 91.6819C328.251 91.6819 327.374 92.0814 327.374 93.0384C327.374 93.7788 327.784 94.1097 329.072 94.5202C330.326 94.9187 331.487 95.3291 331.487 96.9132C331.487 98.5201 330.109 99.2724 328.65 99.2724C327.716 99.2724 326.713 98.9643 326.165 98.1554L326.986 97.4826C327.328 98.0759 328.012 98.3839 328.707 98.3839C329.528 98.3839 330.461 97.9049 330.461 96.9807C330.461 95.9899 329.79 95.818 328.354 95.341C327.215 94.9644 326.348 94.4625 326.348 93.1189C326.348 91.5677 327.681 90.7935 329.094 90.7935C329.995 90.7935 330.759 91.0439 331.351 91.7386L330.565 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M339.283 91.8867H336.617V99.0676H335.659V91.8867H332.992V90.9982H339.283V91.8867Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M341.665 90.9982H346.736V91.8867H342.623V94.4168H346.463V95.3062H342.623V98.1782H346.942V99.0676H341.665V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M349.905 90.9982H351.329L354.064 97.3236H354.087L356.845 90.9982H358.236V99.0676H357.278V92.2971H357.255L354.361 99.0676H353.779L350.884 92.2971H350.863V99.0676H349.905V90.9982Z" fill="var(--logo-black)"/>\n</svg>\n'},575:t=>{"use strict";t.exports='<svg id="omrs-logo-icon" width="121" height="118" viewBox="0 0 121 118" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.436 39.474C45.505 34.405 52.509 31.269 60.247 31.269C67.964 31.269 74.952 34.391 80.017 39.436L80.038 20.78C74.107 17.725 67.376 16 60.247 16C53.114 16 46.348 17.943 40.415 20.999L40.436 39.474Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.038 79.064C74.969 84.134 67.968 87.269 60.23 87.269C52.513 87.269 45.525 84.148 40.456 79.102L40.436 97.759C46.37 100.813 53.098 102.539 60.23 102.539C67.363 102.539 74.093 100.813 80.024 97.758L80.038 79.064Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.474 79.089C35.405 74.02 32.269 67.019 32.269 59.281C32.269 51.564 35.39 44.577 40.436 39.508L21.779 39.488C18.725 45.421 17 52.148 17 59.281C17 66.414 18.725 73.144 21.782 79.076L40.474 79.089Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.027 39.435C85.096 44.503 88.232 51.508 88.232 59.246C88.232 66.963 85.111 73.951 80.064 79.015L98.722 79.036C101.776 73.105 103.501 66.375 103.501 59.246C103.501 52.112 101.776 45.381 98.72 39.448L80.027 39.435Z" fill="var(--logo-green)"/>\n</svg>\n'},93:t=>{"use strict";t.exports='<svg id="omrs-logo-partial" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n</svg>\n'},839:t=>{"use strict";t.exports='<svg id="omrs-logo-white" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-white)"/>\n</svg>\n'},45:t=>{"use strict";t.exports=n},740:t=>{"use strict";t.exports=r},685:t=>{"use strict";t.exports=o},954:t=>{"use strict";t.exports=i},493:t=>{"use strict";t.exports=a},792:t=>{"use strict";t.exports=u}},s={};function c(e){var n=s[e];if(void 0!==n)return n.exports;var r=s[e]={exports:{}};return t[e](r,r.exports,c),r.exports}c.y=e,c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t})();var l={};return(0,c(584).s)(1),(()=>{"use strict";var t=c(885),e=c(93),n=c(575),r=c(839),o=document.createElement("div"),i=function(){document.body.appendChild(o)};function a(t,e){var n=(new DOMParser).parseFromString(e,"text/html").querySelector("svg");n&&(n.id=t,o.appendChild(n))}o.id="omrs-svgs-container",o.style.display="none","complete"===document.readyState?i():window.addEventListener("load",i);var u=c(141),s=c(739),l=c(787),f=c(865),h=c(509),p=c(646),d=c(250),v=c(76),y=c(600),g=c(40),m=c(61),b=c(592),w=c(862),_=c(714),x=c(601),S=c(142),E=c(991),O=c(662),j=c(524),C=c(451),A=c(647),P=c(879),k=c(752),I=c(78);c(954),c(493);var T=c(792);new T.Subject,new T.Subject,c(45);var R,L=c(685);(0,L.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,c(740),(0,L.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),R=function(t,e){document.documentElement.style.setProperty(t,e)},(0,I.defineConfigSchema)("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:I.Type.String},"Brand color #2":{_default:"#004144",_type:I.Type.String},"Brand color #3":{_default:"#007d79",_type:I.Type.String}}),(0,I.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(t){t.loaded&&t.config&&(R("--brand-01",t.config["Brand color #1"]),R("--brand-02",t.config["Brand color #2"]),R("--brand-03",t.config["Brand color #3"]))})),a("omrs-logo-full-color",t),a("omrs-logo-full-mono",t),a("omrs-logo-full-grey",t),a("omrs-logo-partial-color",e),a("omrs-logo-partial-mono",e),a("omrs-logo-partial-grey",e),a("omrs-logo-icon-color",n),a("omrs-logo-icon-mono",n),a("omrs-logo-icon-grey",n),a("omrs-logo-white",r),a("omrs-icon-visibility",u),a("omrs-icon-menu",s),a("omrs-icon-search",l),a("omrs-icon-arrow-back",f),a("omrs-icon-arrow-forward",h),a("omrs-icon-arrow-downward",p),a("omrs-icon-arrow-upward",d),a("omrs-icon-chevron-left",v),a("omrs-icon-chevron-right",y),a("omrs-icon-chevron-up",g),a("omrs-icon-chevron-down",m),a("omrs-icon-supervised-user-circle",b),a("omrs-icon-home",w),a("omrs-icon-close",_),a("omrs-icon-important-notification",x),a("omrs-icon-calendar",S),a("omrs-icon-access-time",E),a("omrs-icon-add",O),a("omrs-icon-remove",j),a("omrs-icon-check-circle",C),a("omrs-icon-zoomoutmap",A),a("omrs-icon-location",P),a("omrs-icon-download",k)})(),(()=>{"use strict";c.r(l)})(),l})())}}}))},8540:()=>{System.register(["dayjs","i18next"],(function(t,e){var n={},r={};return{setters:[function(t){n.default=t.default},function(t){r.default=t.default}],execute:function(){t((()=>{var t={4332:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},9014:function(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(t){return new o({date:t,utc:!0,args:arguments})},a.utc=function(e){var n=i(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=a.parse;a.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),u.call(this,t)};var s=a.init;a.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else s.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(t){void 0===t&&(t="");var r=t.match(e);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,u=this;if(o)return u.$offset=a,u.$u=0===r,u;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(u=this.local().add(a+s,t)).$offset=a,u.$x.$localOffset=s}else u=this.utc();return u};var l=a.format;a.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},a.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*t},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(t){return"s"===t&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var h=a.diff;a.diff=function(t,e,n){if(t&&this.$u===t.$u)return h.call(this,t,e,n);var r=this.local(),o=i(t).local();return h.call(r,o,e,n)}}}()},5923:(t,e,n)=>{"use strict";const r=n(2138),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),u=Symbol("allowStale"),s=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=()=>1,v=(t,e,n)=>{const r=t[h].get(e);if(r){const e=r.value;if(y(t,e)){if(m(t,r),!t[u])return}else n&&(t[p]&&(r.value.now=Date.now()),t[f].unshiftNode(r));return e.value}},y=(t,e)=>{if(!e||!e.maxAge&&!t[s])return!1;const n=Date.now()-e.now;return e.maxAge?n>e.maxAge:t[s]&&n>t[s]},g=t=>{if(t[i]>t[o])for(let e=t[f].tail;t[i]>t[o]&&null!==e;){const n=e.prev;m(t,e),e=n}},m=(t,e)=>{if(e){const n=e.value;t[c]&&t[c](n.key,n.value),t[i]-=n.length,t[h].delete(n.key),t[f].removeNode(e)}};class b{constructor(t,e,n,r,o){this.key=t,this.value=e,this.length=n,this.now=r,this.maxAge=o||0}}const w=(t,e,n,r)=>{let o=n.value;y(t,o)&&(m(t,n),t[u]||(o=void 0)),o&&e.call(r,o.value,o.key,t)};t.exports=class{constructor(t){if("number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[o]=t.max||1/0;const e=t.length||d;if(this[a]="function"!=typeof e?d:e,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[s]=t.maxAge||0,this[c]=t.dispose,this[l]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[o]=t||1/0,g(this)}get max(){return this[o]}set allowStale(t){this[u]=!!t}get allowStale(){return this[u]}set maxAge(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[s]=t,g(this)}get maxAge(){return this[s]}set lengthCalculator(t){"function"!=typeof t&&(t=d),t!==this[a]&&(this[a]=t,this[i]=0,this[f].forEach((t=>{t.length=this[a](t.value,t.key),this[i]+=t.length}))),g(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(t,e){e=e||this;for(let n=this[f].tail;null!==n;){const r=n.prev;w(this,t,n,e),n=r}}forEach(t,e){e=e||this;for(let n=this[f].head;null!==n;){const r=n.next;w(this,t,n,e),n=r}}keys(){return this[f].toArray().map((t=>t.key))}values(){return this[f].toArray().map((t=>t.value))}reset(){this[c]&&this[f]&&this[f].length&&this[f].forEach((t=>this[c](t.key,t.value))),this[h]=new Map,this[f]=new r,this[i]=0}dump(){return this[f].map((t=>!y(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[f]}set(t,e,n){if((n=n||this[s])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,u=this[a](e,t);if(this[h].has(t)){if(u>this[o])return m(this,this[h].get(t)),!1;const a=this[h].get(t).value;return this[c]&&(this[l]||this[c](t,a.value)),a.now=r,a.maxAge=n,a.value=e,this[i]+=u-a.length,a.length=u,this.get(t),g(this),!0}const p=new b(t,e,u,r,n);return p.length>this[o]?(this[c]&&this[c](t,e),!1):(this[i]+=p.length,this[f].unshift(p),this[h].set(t,this[f].head),g(this),!0)}has(t){if(!this[h].has(t))return!1;const e=this[h].get(t).value;return!y(this,e)}get(t){return v(this,t,!0)}peek(t){return v(this,t,!1)}pop(){const t=this[f].tail;return t?(m(this,t),t.value):null}del(t){m(this,this[h].get(t))}load(t){this.reset();const e=Date.now();for(let n=t.length-1;n>=0;n--){const r=t[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const t=o-e;t>0&&this.set(r.k,r.v,t)}}}prune(){this[h].forEach(((t,e)=>v(this,e,!1)))}}},1602:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new A(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=l(t,e,n);if("normal"===s.type){if(r=n.done?d:h,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=d,n.method="throw",n.arg=s.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function g(){}function m(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,i)&&(b=_);var x=m.prototype=y.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(o,i,a,u){var s=l(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function P(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return g.prototype=m,s(x,"constructor",m),s(m,"constructor",g),g.displayName=s(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},S(E.prototype),s(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(x),s(x,u,"Generator"),s(x,i,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},4074:(t,e,n)=>{const r=Symbol("SemVer ANY");class o{static get ANY(){return r}constructor(t,e){if(e=i(e),t instanceof o){if(t.loose===!!e.loose)return t;t=t.value}c("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(t){const e=this.options.loose?a[u.COMPARATORLOOSE]:a[u.COMPARATOR],n=t.match(e);if(!n)throw new TypeError(`Invalid comparator: ${t}`);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(t){if(c("Comparator.test",t,this.options.loose),this.semver===r||t===r)return!0;if("string"==typeof t)try{t=new l(t,this.options)}catch(t){return!1}return s(t,this.operator,this.semver,this.options)}intersects(t,e){if(!(t instanceof o))throw new TypeError("a Comparator is required");if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),""===this.operator)return""===this.value||new f(t.value,e).test(this.value);if(""===t.operator)return""===t.value||new f(this.value,e).test(t.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),i=this.semver.version===t.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),u=s(this.semver,"<",t.semver,e)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),c=s(this.semver,">",t.semver,e)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return n||r||i&&a||u||c}}t.exports=o;const i=n(156),{re:a,t:u}=n(887),s=n(2401),c=n(3843),l=n(9405),f=n(4355)},4355:(t,e,n)=>{class r{constructor(t,e){if(e=i(e),t instanceof r)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new r(t.raw,e);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((t=>this.parseRange(t.trim()))).filter((t=>t.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${t}`);if(this.set.length>1){const t=this.set[0];if(this.set=this.set.filter((t=>!d(t[0]))),0===this.set.length)this.set=[t];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&v(t[0])){this.set=[t];break}}this.format()}format(){return this.range=this.set.map((t=>t.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(t){t=t.trim();const e=`parseRange:${Object.keys(this.options).join(",")}:${t}`,n=o.get(e);if(n)return n;const r=this.options.loose,i=r?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];t=t.replace(i,C(this.options.includePrerelease)),u("hyphen replace",t),t=t.replace(c[l.COMPARATORTRIM],f),u("comparator trim",t,c[l.COMPARATORTRIM]),t=(t=(t=t.replace(c[l.TILDETRIM],h)).replace(c[l.CARETTRIM],p)).split(/\s+/).join(" ");const s=r?c[l.COMPARATORLOOSE]:c[l.COMPARATOR],v=t.split(" ").map((t=>g(t,this.options))).join(" ").split(/\s+/).map((t=>j(t,this.options))).filter(this.options.loose?t=>!!t.match(s):()=>!0).map((t=>new a(t,this.options))),y=(v.length,new Map);for(const t of v){if(d(t))return[t];y.set(t.value,t)}y.size>1&&y.has("")&&y.delete("");const m=[...y.values()];return o.set(e,m),m}intersects(t,e){if(!(t instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>y(n,e)&&t.set.some((t=>y(t,e)&&n.every((n=>t.every((t=>n.intersects(t,e)))))))))}test(t){if(!t)return!1;if("string"==typeof t)try{t=new s(t,this.options)}catch(t){return!1}for(let e=0;e<this.set.length;e++)if(A(this.set[e],t,this.options))return!0;return!1}}t.exports=r;const o=new(n(5923))({max:1e3}),i=n(156),a=n(4074),u=n(3843),s=n(9405),{re:c,t:l,comparatorTrimReplace:f,tildeTrimReplace:h,caretTrimReplace:p}=n(887),d=t=>"<0.0.0-0"===t.value,v=t=>""===t.value,y=(t,e)=>{let n=!0;const r=t.slice();let o=r.pop();for(;n&&r.length;)n=r.every((t=>o.intersects(t,e))),o=r.pop();return n},g=(t,e)=>(u("comp",t,e),t=_(t,e),u("caret",t),t=b(t,e),u("tildes",t),t=S(t,e),u("xrange",t),t=O(t,e),u("stars",t),t),m=t=>!t||"x"===t.toLowerCase()||"*"===t,b=(t,e)=>t.trim().split(/\s+/).map((t=>w(t,e))).join(" "),w=(t,e)=>{const n=e.loose?c[l.TILDELOOSE]:c[l.TILDE];return t.replace(n,((e,n,r,o,i)=>{let a;return u("tilde",t,e,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?(u("replaceTilde pr",i),a=`>=${n}.${r}.${o}-${i} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${o} <${n}.${+r+1}.0-0`,u("tilde return",a),a}))},_=(t,e)=>t.trim().split(/\s+/).map((t=>x(t,e))).join(" "),x=(t,e)=>{u("caret",t,e);const n=e.loose?c[l.CARETLOOSE]:c[l.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,((e,n,o,i,a)=>{let s;return u("caret",t,e,n,o,i,a),m(n)?s="":m(o)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:m(i)?s="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(u("replaceCaret pr",a),s="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`):(u("no pr"),s="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`),u("caret return",s),s}))},S=(t,e)=>(u("replaceXRanges",t,e),t.split(/\s+/).map((t=>E(t,e))).join(" ")),E=(t,e)=>{t=t.trim();const n=e.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return t.replace(n,((n,r,o,i,a,s)=>{u("xRange",t,n,r,o,i,a,s);const c=m(o),l=c||m(i),f=l||m(a),h=f;return"="===r&&h&&(r=""),s=e.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&h?(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&&(s="-0"),n=`${r+o}.${i}.${a}${s}`):l?n=`>=${o}.0.0${s} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${s} <${o}.${+i+1}.0-0`),u("xRange return",n),n}))},O=(t,e)=>(u("replaceStars",t,e),t.trim().replace(c[l.STAR],"")),j=(t,e)=>(u("replaceGTE0",t,e),t.trim().replace(c[e.includePrerelease?l.GTE0PRE:l.GTE0],"")),C=t=>(e,n,r,o,i,a,u,s,c,l,f,h,p)=>`${n=m(r)?"":m(o)?`>=${r}.0.0${t?"-0":""}`:m(i)?`>=${r}.${o}.0${t?"-0":""}`:a?`>=${n}`:`>=${n}${t?"-0":""}`} ${s=m(c)?"":m(l)?`<${+c+1}.0.0-0`:m(f)?`<${c}.${+l+1}.0-0`:h?`<=${c}.${l}.${f}-${h}`:t?`<${c}.${l}.${+f+1}-0`:`<=${s}`}`.trim(),A=(t,e,n)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let n=0;n<t.length;n++)if(u(t[n].semver),t[n].semver!==a.ANY&&t[n].semver.prerelease.length>0){const r=t[n].semver;if(r.major===e.major&&r.minor===e.minor&&r.patch===e.patch)return!0}return!1}return!0}},9405:(t,e,n)=>{const r=n(3843),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=n(8202),{re:a,t:u}=n(887),s=n(156),{compareIdentifiers:c}=n(1630);class l{constructor(t,e){if(e=s(e),t instanceof l){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid Version: ${t}`);if(t.length>o)throw new TypeError(`version is longer than ${o} characters`);r("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const n=t.trim().match(e.loose?a[u.LOOSE]:a[u.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,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((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<i)return e}return t})):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(t){if(r("SemVer.compare",this.version,this.options,t),!(t instanceof l)){if("string"==typeof t&&t===this.version)return 0;t=new l(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof l||(t=new l(t,this.options)),c(this.major,t.major)||c(this.minor,t.minor)||c(this.patch,t.patch)}comparePre(t){if(t instanceof l||(t=new l(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{const n=this.prerelease[e],o=t.prerelease[e];if(r("prerelease compare",e,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(++e)}compareBuild(t){t instanceof l||(t=new l(t,this.options));let e=0;do{const n=this.build[e],o=t.build[e];if(r("prerelease compare",e,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(++e)}inc(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e),this.inc("pre",e);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 t=this.prerelease.length;for(;--t>=0;)"number"==typeof this.prerelease[t]&&(this.prerelease[t]++,t=-2);-1===t&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error(`invalid increment argument: ${t}`)}return this.format(),this.raw=this.version,this}}t.exports=l},953:(t,e,n)=>{const r=n(5497);t.exports=(t,e)=>{const n=r(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null}},2401:(t,e,n)=>{const r=n(8896),o=n(8378),i=n(9261),a=n(6647),u=n(3433),s=n(4622);t.exports=(t,e,n,c)=>{switch(e){case"===":return"object"==typeof t&&(t=t.version),"object"==typeof n&&(n=n.version),t===n;case"!==":return"object"==typeof t&&(t=t.version),"object"==typeof n&&(n=n.version),t!==n;case"":case"=":case"==":return r(t,n,c);case"!=":return o(t,n,c);case">":return i(t,n,c);case">=":return a(t,n,c);case"<":return u(t,n,c);case"<=":return s(t,n,c);default:throw new TypeError(`Invalid operator: ${e}`)}}},6839:(t,e,n)=>{const r=n(9405),o=n(5497),{re:i,t:a}=n(887);t.exports=(t,e)=>{if(t instanceof r)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;let n=null;if((e=e||{}).rtl){let e;for(;(e=i[a.COERCERTL].exec(t))&&(!n||n.index+n[0].length!==t.length);)n&&e.index+e[0].length===n.index+n[0].length||(n=e),i[a.COERCERTL].lastIndex=e.index+e[1].length+e[2].length;i[a.COERCERTL].lastIndex=-1}else n=t.match(i[a.COERCE]);return null===n?null:o(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,e)}},6218:(t,e,n)=>{const r=n(9405);t.exports=(t,e,n)=>{const o=new r(t,n),i=new r(e,n);return o.compare(i)||o.compareBuild(i)}},9643:(t,e,n)=>{const r=n(3308);t.exports=(t,e)=>r(t,e,!0)},3308:(t,e,n)=>{const r=n(9405);t.exports=(t,e,n)=>new r(t,n).compare(new r(e,n))},3948:(t,e,n)=>{const r=n(5497),o=n(8896);t.exports=(t,e)=>{if(o(t,e))return null;{const n=r(t),o=r(e),i=n.prerelease.length||o.prerelease.length,a=i?"pre":"",u=i?"prerelease":"";for(const t in n)if(("major"===t||"minor"===t||"patch"===t)&&n[t]!==o[t])return a+t;return u}}},8896:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>0===r(t,e,n)},9261:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>r(t,e,n)>0},6647:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>r(t,e,n)>=0},5791:(t,e,n)=>{const r=n(9405);t.exports=(t,e,n,o)=>{"string"==typeof n&&(o=n,n=void 0);try{return new r(t,n).inc(e,o).version}catch(t){return null}}},3433:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>r(t,e,n)<0},4622:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>r(t,e,n)<=0},629:(t,e,n)=>{const r=n(9405);t.exports=(t,e)=>new r(t,e).major},9986:(t,e,n)=>{const r=n(9405);t.exports=(t,e)=>new r(t,e).minor},8378:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>0!==r(t,e,n)},5497:(t,e,n)=>{const{MAX_LENGTH:r}=n(8202),{re:o,t:i}=n(887),a=n(9405),u=n(156);t.exports=(t,e)=>{if(e=u(e),t instanceof a)return t;if("string"!=typeof t)return null;if(t.length>r)return null;if(!(e.loose?o[i.LOOSE]:o[i.FULL]).test(t))return null;try{return new a(t,e)}catch(t){return null}}},9800:(t,e,n)=>{const r=n(9405);t.exports=(t,e)=>new r(t,e).patch},4408:(t,e,n)=>{const r=n(5497);t.exports=(t,e)=>{const n=r(t,e);return n&&n.prerelease.length?n.prerelease:null}},762:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>r(e,t,n)},2743:(t,e,n)=>{const r=n(6218);t.exports=(t,e)=>t.sort(((t,n)=>r(n,t,e)))},5312:(t,e,n)=>{const r=n(4355);t.exports=(t,e,n)=>{try{e=new r(e,n)}catch(t){return!1}return e.test(t)}},2354:(t,e,n)=>{const r=n(6218);t.exports=(t,e)=>t.sort(((t,n)=>r(t,n,e)))},4512:(t,e,n)=>{const r=n(5497);t.exports=(t,e)=>{const n=r(t,e);return n?n.version:null}},4770:(t,e,n)=>{const r=n(887);t.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:t=>{const e=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:e,MAX_SAFE_COMPONENT_LENGTH:16}},3843:t=>{const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=e},1630:t=>{const e=/^[0-9]+$/,n=(t,n)=>{const r=e.test(t),o=e.test(n);return r&&o&&(t=+t,n=+n),t===n?0:r&&!o?-1:o&&!r?1:t<n?-1:1};t.exports={compareIdentifiers:n,rcompareIdentifiers:(t,e)=>n(e,t)}},156:t=>{const e=["includePrerelease","loose","rtl"];t.exports=t=>t?"object"!=typeof t?{loose:!0}:e.filter((e=>t[e])).reduce(((t,e)=>(t[e]=!0,t)),{}):{}},887:(t,e,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(8202),o=n(3843),i=(e=t.exports={}).re=[],a=e.src=[],u=e.t={};let s=0;const c=(t,e,n)=>{const r=s++;o(r,e),u[t]=r,a[r]=e,i[r]=new RegExp(e,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[u.NUMERICIDENTIFIER]})\\.(${a[u.NUMERICIDENTIFIER]})\\.(${a[u.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${a[u.NUMERICIDENTIFIERLOOSE]})\\.(${a[u.NUMERICIDENTIFIERLOOSE]})\\.(${a[u.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${a[u.NUMERICIDENTIFIER]}|${a[u.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${a[u.NUMERICIDENTIFIERLOOSE]}|${a[u.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${a[u.PRERELEASEIDENTIFIER]}(?:\\.${a[u.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${a[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[u.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${a[u.BUILDIDENTIFIER]}(?:\\.${a[u.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${a[u.MAINVERSION]}${a[u.PRERELEASE]}?${a[u.BUILD]}?`),c("FULL",`^${a[u.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${a[u.MAINVERSIONLOOSE]}${a[u.PRERELEASELOOSE]}?${a[u.BUILD]}?`),c("LOOSE",`^${a[u.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${a[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${a[u.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${a[u.XRANGEIDENTIFIER]})(?:\\.(${a[u.XRANGEIDENTIFIER]})(?:\\.(${a[u.XRANGEIDENTIFIER]})(?:${a[u.PRERELEASE]})?${a[u.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${a[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[u.XRANGEIDENTIFIERLOOSE]})(?:${a[u.PRERELEASELOOSE]})?${a[u.BUILD]}?)?)?`),c("XRANGE",`^${a[u.GTLT]}\\s*${a[u.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${a[u.GTLT]}\\s*${a[u.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",a[u.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${a[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",c("TILDE",`^${a[u.LONETILDE]}${a[u.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${a[u.LONETILDE]}${a[u.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${a[u.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",c("CARET",`^${a[u.LONECARET]}${a[u.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${a[u.LONECARET]}${a[u.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${a[u.GTLT]}\\s*(${a[u.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${a[u.GTLT]}\\s*(${a[u.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${a[u.GTLT]}\\s*(${a[u.LOOSEPLAIN]}|${a[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${a[u.XRANGEPLAIN]})\\s+-\\s+(${a[u.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${a[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[u.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},715:(t,e,n)=>{const r=n(3260);t.exports=(t,e,n)=>r(t,e,">",n)},9560:(t,e,n)=>{const r=n(4355);t.exports=(t,e,n)=>(t=new r(t,n),e=new r(e,n),t.intersects(e))},6:(t,e,n)=>{const r=n(3260);t.exports=(t,e,n)=>r(t,e,"<",n)},4931:(t,e,n)=>{const r=n(9405),o=n(4355);t.exports=(t,e,n)=>{let i=null,a=null,u=null;try{u=new o(e,n)}catch(t){return null}return t.forEach((t=>{u.test(t)&&(i&&-1!==a.compare(t)||(i=t,a=new r(i,n)))})),i}},5891:(t,e,n)=>{const r=n(9405),o=n(4355);t.exports=(t,e,n)=>{let i=null,a=null,u=null;try{u=new o(e,n)}catch(t){return null}return t.forEach((t=>{u.test(t)&&(i&&1!==a.compare(t)||(i=t,a=new r(i,n)))})),i}},4925:(t,e,n)=>{const r=n(9405),o=n(4355),i=n(9261);t.exports=(t,e)=>{t=new o(t,e);let n=new r("0.0.0");if(t.test(n))return n;if(n=new r("0.0.0-0"),t.test(n))return n;n=null;for(let e=0;e<t.set.length;++e){const o=t.set[e];let a=null;o.forEach((t=>{const e=new r(t.semver.version);switch(t.operator){case">":0===e.prerelease.length?e.patch++:e.prerelease.push(0),e.raw=e.format();case"":case">=":a&&!i(e,a)||(a=e);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!a||n&&!i(n,a)||(n=a)}return n&&t.test(n)?n:null}},3260:(t,e,n)=>{const r=n(9405),o=n(4074),{ANY:i}=o,a=n(4355),u=n(5312),s=n(9261),c=n(3433),l=n(4622),f=n(6647);t.exports=(t,e,n,h)=>{let p,d,v,y,g;switch(t=new r(t,h),e=new a(e,h),n){case">":p=s,d=l,v=c,y=">",g=">=";break;case"<":p=c,d=f,v=s,y="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(t,e,h))return!1;for(let n=0;n<e.set.length;++n){const r=e.set[n];let a=null,u=null;if(r.forEach((t=>{t.semver===i&&(t=new o(">=0.0.0")),a=a||t,u=u||t,p(t.semver,a.semver,h)?a=t:v(t.semver,u.semver,h)&&(u=t)})),a.operator===y||a.operator===g)return!1;if((!u.operator||u.operator===y)&&d(t,u.semver))return!1;if(u.operator===g&&v(t,u.semver))return!1}return!0}},7795:(t,e,n)=>{const r=n(5312),o=n(3308);t.exports=(t,e,n)=>{const i=[];let a=null,u=null;const s=t.sort(((t,e)=>o(t,e,n)));for(const t of s)r(t,e,n)?(u=t,a||(a=t)):(u&&i.push([a,u]),u=null,a=null);a&&i.push([a,null]);const c=[];for(const[t,e]of i)t===e?c.push(t):e||t!==s[0]?e?t===s[0]?c.push(`<=${e}`):c.push(`${t} - ${e}`):c.push(`>=${t}`):c.push("*");const l=c.join(" || "),f="string"==typeof e.raw?e.raw:String(e);return l.length<f.length?l:e}},7732:(t,e,n)=>{const r=n(4355),o=n(4074),{ANY:i}=o,a=n(5312),u=n(3308),s=(t,e,n)=>{if(t===e)return!0;if(1===t.length&&t[0].semver===i){if(1===e.length&&e[0].semver===i)return!0;t=n.includePrerelease?[new o(">=0.0.0-0")]:[new o(">=0.0.0")]}if(1===e.length&&e[0].semver===i){if(n.includePrerelease)return!0;e=[new o(">=0.0.0")]}const r=new Set;let s,f,h,p,d,v,y;for(const e of t)">"===e.operator||">="===e.operator?s=c(s,e,n):"<"===e.operator||"<="===e.operator?f=l(f,e,n):r.add(e.semver);if(r.size>1)return null;if(s&&f){if(h=u(s.semver,f.semver,n),h>0)return null;if(0===h&&(">="!==s.operator||"<="!==f.operator))return null}for(const t of r){if(s&&!a(t,String(s),n))return null;if(f&&!a(t,String(f),n))return null;for(const r of e)if(!a(t,String(r),n))return!1;return!0}let g=!(!f||n.includePrerelease||!f.semver.prerelease.length)&&f.semver,m=!(!s||n.includePrerelease||!s.semver.prerelease.length)&&s.semver;g&&1===g.prerelease.length&&"<"===f.operator&&0===g.prerelease[0]&&(g=!1);for(const t of e){if(y=y||">"===t.operator||">="===t.operator,v=v||"<"===t.operator||"<="===t.operator,s)if(m&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===m.major&&t.semver.minor===m.minor&&t.semver.patch===m.patch&&(m=!1),">"===t.operator||">="===t.operator){if(p=c(s,t,n),p===t&&p!==s)return!1}else if(">="===s.operator&&!a(s.semver,String(t),n))return!1;if(f)if(g&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===g.major&&t.semver.minor===g.minor&&t.semver.patch===g.patch&&(g=!1),"<"===t.operator||"<="===t.operator){if(d=l(f,t,n),d===t&&d!==f)return!1}else if("<="===f.operator&&!a(f.semver,String(t),n))return!1;if(!t.operator&&(f||s)&&0!==h)return!1}return!(s&&v&&!f&&0!==h||f&&y&&!s&&0!==h||m||g)},c=(t,e,n)=>{if(!t)return e;const r=u(t.semver,e.semver,n);return r>0?t:r<0||">"===e.operator&&">="===t.operator?e:t},l=(t,e,n)=>{if(!t)return e;const r=u(t.semver,e.semver,n);return r<0?t:r>0||"<"===e.operator&&"<="===t.operator?e:t};t.exports=(t,e,n={})=>{if(t===e)return!0;t=new r(t,n),e=new r(e,n);let o=!1;t:for(const r of t.set){for(const t of e.set){const e=s(r,t,n);if(o=o||null!==e,e)continue t}if(o)return!1}return!0}},9663:(t,e,n)=>{const r=n(4355);t.exports=(t,e)=>new r(t,e).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")))},9965:(t,e,n)=>{const r=n(4355);t.exports=(t,e)=>{try{return new r(t,e).range||"*"}catch(t){return null}}},7968:(t,e,n)=>{const r=n(1577).R;e.s=function(t){if(t||(t=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,t)}},1577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},9961:t=>{"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}},2138:(t,e,n)=>{"use strict";function r(t){var e=this;if(e instanceof r||(e=new r),e.tail=null,e.head=null,e.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){e.push(t)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n<o;n++)e.push(arguments[n]);return e}function o(t,e){t.tail=new a(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function i(t,e){t.head=new a(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function a(t,e,n,r){if(!(this instanceof a))return new a(t,e,n,r);this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}t.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,n=t.prev;return e&&(e.prev=n),n&&(n.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=n),t.list.length--,t.next=null,t.prev=null,t.list=null,e},r.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},r.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}},r.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)o(this,arguments[t]);return this.length},r.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)i(this,arguments[t]);return this.length},r.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},r.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},r.prototype.forEach=function(t,e){e=e||this;for(var n=this.head,r=0;null!==n;r++)t.call(e,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(t,e){e=e||this;for(var n=this.tail,r=this.length-1;null!==n;r--)t.call(e,n.value,r,this),n=n.prev},r.prototype.get=function(t){for(var e=0,n=this.head;null!==n&&e<t;e++)n=n.next;if(e===t&&null!==n)return n.value},r.prototype.getReverse=function(t){for(var e=0,n=this.tail;null!==n&&e<t;e++)n=n.prev;if(e===t&&null!==n)return n.value},r.prototype.map=function(t,e){e=e||this;for(var n=new r,o=this.head;null!==o;)n.push(t.call(e,o.value,this)),o=o.next;return n},r.prototype.mapReverse=function(t,e){e=e||this;for(var n=new r,o=this.tail;null!==o;)n.push(t.call(e,o.value,this)),o=o.prev;return n},r.prototype.reduce=function(t,e){var n,r=this.head;if(arguments.length>1)n=e;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=t(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(t,e){var n,r=this.tail;if(arguments.length>1)n=e;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=t(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var t=new Array(this.length),e=0,n=this.head;null!==n;e++)t[e]=n.value,n=n.next;return t},r.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,n=this.tail;null!==n;e++)t[e]=n.value,n=n.prev;return t},r.prototype.slice=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var n=new r;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);for(var o=0,i=this.head;null!==i&&o<t;o++)i=i.next;for(;null!==i&&o<e;o++,i=i.next)n.push(i.value);return n},r.prototype.sliceReverse=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var n=new r;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);for(var o=this.length,i=this.tail;null!==i&&o>e;o--)i=i.prev;for(;null!==i&&o>t;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(t,e,...n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,o=this.head;null!==o&&r<t;r++)o=o.next;var i,u,s,c,l=[];for(r=0;o&&r<e;r++)l.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),r=0;r<n.length;r++)i=this,u=o,s=n[r],null===(c=u===i.head?new a(s,null,u,i):new a(s,u,u.next,i)).next&&(i.tail=c),null===c.prev&&(i.head=c),i.length++,o=c;return l},r.prototype.reverse=function(){for(var t=this.head,e=this.tail,n=t;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=e,this.tail=t,this};try{n(9961)(r)}catch(t){}},9688:t=>{"use strict";t.exports=n},7064:t=>{"use strict";t.exports=r}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var r=o[e]={exports:{}};return t[e].call(r.exports,r,r.exports,i),r.exports}i.y=e,i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t})();var a={};return(0,i(7968).s)(1),(()=>{"use strict";function t(t){return(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())-Date.UTC(t.getUTCFullYear(),0,0))/24/60/60/1e3}function e(t,e){var n=t.toISOString(),r=e.toISOString();return n.slice(0,n.indexOf("T"))===r.slice(0,r.indexOf("T"))}function n(n){var r=new Date,o=new Date(n),i=r.getUTCMonth()-o.getUTCMonth(),a=r.getUTCDate()-o.getUTCDate(),u=r.getUTCFullYear()-o.getUTCFullYear();(i<0||0===i&&a<0)&&u--;var s=i>=0?i:i+12;a<0&&s--;var c=s>0?"".concat(s," mo"):"",l=t(r)-t(o);l<0&&(l+=365);var f=Math.floor(l/7),h=l-7*f;return 0===u?e(r,o)?"Today":f<4||0===f?"".concat(l," day"):h>0?"".concat(f," wk ").concat(h," d"):"".concat(f," week"):u<2?"".concat(c," ").concat(u," yr").trim():u<18?"".concat(u," yr ").concat(c).trim():"".concat(u," years")}i.r(a),i.d(a,{age:()=>n,daysIntoYear:()=>t,formatDate:()=>E,formatDatetime:()=>j,formatTime:()=>O,isOmrsDateStrict:()=>p,isOmrsDateToday:()=>d,isSameDay:()=>e,isVersionSatisfied:()=>L,parseDate:()=>x,retry:()=>U,toDateObjectStrict:()=>v,toOmrsDateFormat:()=>_,toOmrsDayDateFormat:()=>b,toOmrsIsoString:()=>y,toOmrsTimeString:()=>m,toOmrsTimeString24:()=>g,toOmrsYearlessDateFormat:()=>w,translateFrom:()=>k});var r=i(9688),o=i(9014),u=i.n(o),s=i(4332),c=i.n(s);function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){l(t,e,n[e])}))}return t}r.default.extend(u()),r.default.extend(c());var h="YYYY-MM-DDTHH:mm:ss.SSSZZ";function p(t){return null!=t&&28===t.trim().length&&"T"===(t=t.trim())[10]&&":"===t[13]&&":"===t[16]&&"."===t[19]&&"+"===t[23]&&":"!==t[26]&&(0,r.default)(t,h).isValid()}function d(t){return(0,r.default)(t).isToday()}function v(t){return p(t)?(0,r.default)(t,h).toDate():null}function y(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,r.default)(t);return e&&(n=n.utc()),n.format(h)}function g(t){return(0,r.default)(t).format("HH:mm")}function m(t){return r.default.utc(t).format("HH:mm A")}function b(t){return _(t,"DD - MMM - YYYY")}function w(t){return _(t,"DD-MMM")}function _(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MMM-DD";return(0,r.default)(t).format(e)}function x(t){return(0,r.default)(t).toDate()}var S={mode:"standard",time:"for today",day:!0,year:!0};function E(t,e){var n,o=f({},S,e),i=o.mode,a=o.time,u=o.day,s=o.year,c={year:s?"numeric":void 0,month:"short",day:u?"2-digit":void 0},l=C(),h=(0,r.default)(t).isToday();if(h)n=(n=new Intl.RelativeTimeFormat(l,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(l)+n.slice(1);else if("en"==l&&(l="en-GB"),n=t.toLocaleDateString(l,c),"en-GB"==l&&"standard"==i&&s&&u&&(n=n.replace(/ /g,"-")),"wide"==i&&(n=n.replace(/ /g," — "),/ru.*/.test(l))){var p=n.length;n=n.slice(0,p-5)+n.slice(p-5).replace(" — "," ")}return(!0===a||h&&"for today"===a)&&(n+=", ".concat(O(t))),n}function O(t){return t.toLocaleTimeString(C(),{hour:"2-digit",minute:"2-digit"})}function j(t,e){return E(t,f({},e,{time:!0}))}function C(){var t=window.i18next.language;return"ht"===(t=t.replace("_","-"))&&(t="fr-HT"),t}var A=i(7064);function P(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(t,e,n,r){return(A.default.default||A.default).t(e,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){P(t,e,n[e])}))}return t}({ns:t,defaultValue:n},r))}var I=i(4770);function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t){var e,n=function(t){if(Array.isArray(t))return t}(e=t.split("."))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return T(t,3);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(t,3):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=n[2];return"".concat(r,".").concat(o,".").concat(i)}function L(t,e){var n=function(t){var e=t.indexOf("-");if(e>=0){var n=R(t.slice(0,e)),r=t.slice(e+1);return"".concat(n,"-").concat(r)}return R(t)}(e);return I.satisfies(n,t,{includePrerelease:!0})}var D=i(1602),$=i.n(D);function M(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function N(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){M(i,r,o,a,u,"next",t)}function u(t){M(i,r,o,a,u,"throw",t)}a(void 0)}))}}function U(t){return B.apply(this,arguments)}function B(){return B=N($().mark((function t(e){var n,r,o,i,a,u,s=arguments;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=s.length>1&&void 0!==s[1]?s[1]:{},r=n.shouldRetry,o=n.getDelay,i=n.onError,r=null!=r?r:function(t){return F(t,5)},o=null!=o?o:function(t){return H(t,1e3)},a=0,u=void 0;case 6:return t.prev=6,t.next=9,V(o(a));case 9:return t.next=11,e();case 11:return t.abrupt("return",t.sent);case 14:t.prev=14,t.t0=t.catch(6),null==i||i(t.t0,a),u=t.t0;case 18:if(r(a++)){t.next=6;break}case 19:throw u;case 20:case"end":return t.stop()}}),t,null,[[6,14]])}))),B.apply(this,arguments)}function F(t,e){return t<=e}function H(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n?t+1:t;return e*Math.pow(2,r)}function V(t){return z.apply(this,arguments)}function z(){return(z=N($().mark((function t(e){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e<=0)){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",new Promise((function(t){return setTimeout(t,e)})));case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}})(),a})())}}}))}}]);
|
|
2
|
+
(self.webpackChunk_openmrs_esm_patient_programs_app=self.webpackChunk_openmrs_esm_patient_programs_app||[]).push([[858],{560:(t,e,n)=>{System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(t,e){var r={},o={};return{setters:[function(t){r.Type=t.Type,r.defineConfigSchema=t.defineConfigSchema,r.getConfig=t.getConfig,r.navigate=t.navigate,r.validators=t.validators},function(t){o.reportError=t.reportError}],execute:function(){t((()=>{var t={602:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=l(t,e,n);if("normal"===s.type){if(r=n.done?d:h,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=d,n.method="throw",n.arg=s.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function g(){}function m(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,i)&&(b=_);var S=m.prototype=y.prototype=Object.create(b);function x(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(o,i,a,u){var s=l(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function P(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return g.prototype=m,s(S,"constructor",m),s(m,"constructor",g),g.displayName=s(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},x(E.prototype),s(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(S),s(S,u,"Generator"),s(S,i,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=P,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},385:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=[];function r(t){for(var e=[],r=0;r<n.length;r++)n[r]===t?t=null:e.push(n[r]);n=e}function o(r,o,i){e=o?r:t(t({},e),r);for(var a=n,u=0;u<a.length;u++)a[u](e,i)}return e=e||{},{action:function(t){function n(e){o(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:o,subscribe:function(t){return n.push(t),function(){r(t)}},unsubscribe:r,getState:function(){return e}}},n=function(t,n){var r=c[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return c[t]={value:o,active:!0},o},i=function(t,n){var r=c[t];if(!r){var o=e(n);return c[t]={value:o,active:!1},o}return r.value},a=function(t){return n("app",t)},u=function(){return i("app",{})},s=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return s}});var c={}}(),o}())}}}))},968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:t=>{"use strict";t.exports=r},254:t=>{"use strict";t.exports=o}},i={};function a(e){var n=i[e];if(void 0!==n)return n.exports;var r=i[e]={exports:{}};return t[e](r,r.exports,a),r.exports}a.y=e,a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})();var u={};return(0,a(968).s)(1),(()=>{"use strict";a.r(u),a.d(u,{OpenmrsFetchError:()=>nt,VisitMode:()=>Kt,VisitStatus:()=>Ht,backendDependencies:()=>Zt,clearCurrentUser:()=>vt,defaultVisitCustomRepresentation:()=>$t,fetchCurrentPatient:()=>xt,fhir:()=>ot,fhirBaseUrl:()=>rt,getCurrentUser:()=>ht,getLocations:()=>Wt,getLoggedInUser:()=>gt,getSessionLocation:()=>mt,getSessionStore:()=>pt,getStartedVisit:()=>Vt,getVisitTypes:()=>Gt,getVisitsForPatient:()=>Bt,makeUrl:()=>Q,openmrsFetch:()=>tt,openmrsObservableFetch:()=>et,refetchCurrentUser:()=>dt,saveVisit:()=>Ut,sessionEndpoint:()=>X,setSessionLocation:()=>bt,setupApiModule:()=>_t,toLocationObject:()=>qt,toVisitTypeObject:()=>zt,updateVisit:()=>Ft,userHasAccess:()=>yt});var t=a(602),e=a.n(t),r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function i(t){return"function"==typeof t}var s=!1,c={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,s=t},get useDeprecatedSynchronousErrorHandling(){return s}};function l(t){setTimeout((function(){throw t}),0)}var f={closed:!0,next:function(t){},error:function(t){if(c.useDeprecatedSynchronousErrorHandling)throw t;l(t)},complete:function(){}},h=Array.isArray||function(t){return t&&"number"==typeof t.length},p=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}(),d=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n,r=this,o=r._parentOrParents,a=r._ctorUnsubscribe,u=r._unsubscribe,s=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,o instanceof t)o.remove(this);else if(null!==o)for(var c=0;c<o.length;++c)o[c].remove(this);if(i(u)){a&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof p?v(t.errors):[t]}}if(h(s)){c=-1;for(var l=s.length;++c<l;){var f=s[c];if(null!==(n=f)&&"object"==typeof n)try{f.unsubscribe()}catch(t){e=e||[],t instanceof p?e=e.concat(v(t.errors)):e.push(t)}}}if(e)throw new p(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof t){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();function v(t){return t.reduce((function(t,e){return t.concat(e instanceof p?e.errors:e)}),[])}var y="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),g=function(t){function e(n,r,o){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=f;break;case 1:if(!n){i.destination=f;break}if("object"==typeof n){n instanceof e?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new m(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new m(i,n,r,o)}return i}return o(e,t),e.prototype[y]=function(){return this},e.create=function(t,n,r){var o=new e(t,n,r);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(d),m=function(t){function e(e,n,r,o){var a,u=t.call(this)||this;u._parentSubscriber=e;var s=u;return i(n)?a=n:n&&(a=n.next,r=n.error,o=n.complete,n!==f&&(i((s=Object.create(n)).unsubscribe)&&u.add(s.unsubscribe.bind(s)),s.unsubscribe=u.unsubscribe.bind(u))),u._context=s,u._next=a,u._error=r,u._complete=o,u}return o(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;c.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=c.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):l(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;l(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};c.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),c.useDeprecatedSynchronousErrorHandling)throw t;l(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!c.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return c.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(l(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(g),b="function"==typeof Symbol&&Symbol.observable||"@@observable";function w(t){return t}function _(t){return 0===t.length?w:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var S=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,o=function(t,e,n){if(t){if(t instanceof g)return t;if(t[y])return t[y]()}return t||e||n?new g(t,e,n):new g(f)}(t,e,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||c.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),c.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){c.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,r=e.destination,o=e.isStopped;if(n||o)return!1;t=r&&r instanceof g?r:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=x(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[b]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:_(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=x(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function x(t){if(t||(t=c.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const E="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var O="object"==typeof self&&self&&self.Object===Object&&self;const j=(E||O||Function("return this")()).Symbol;var A=Object.prototype,C=A.hasOwnProperty,P=A.toString,k=j?j.toStringTag:void 0,T=Object.prototype.toString,I=j?j.toStringTag:void 0;const R=(L=Object.getPrototypeOf,D=Object,function(t){return L(D(t))});var L,D,M=Function.prototype,N=Object.prototype,$=M.toString,B=N.hasOwnProperty,U=$.call(Object);const F=function(t){if(!function(t){return null!=t&&"object"==typeof t}(t)||"[object Object]"!=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":I&&I in Object(t)?function(t){var e=C.call(t,k),n=t[k];try{t[k]=void 0;var r=!0}catch(t){}var o=P.call(t);return r&&(e?t[k]=n:delete t[k]),o}(t):function(t){return T.call(t)}(t)}(t))return!1;var e=R(t);if(null===e)return!0;var n=B.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&$.call(n)==U};var K=a(824);function H(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function V(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){H(i,r,o,a,u,"next",t)}function u(t){H(i,r,o,a,u,"throw",t)}a(void 0)}))}}function z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function G(t,e,n){return G=z()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Z(o,n.prototype),o},G.apply(null,arguments)}function q(t){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},q(t)}function W(t,e){return!e||"object"!==Y(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Z(t,e){return Z=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Z(t,e)}var Y=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function J(t){var e="function"==typeof Map?new Map:void 0;return J=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return G(t,arguments,q(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Z(r,t)},J(t)}var X="/ws/rest/v1/session";function Q(t){return window.openmrsBase+t}function tt(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof n)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.");var r=Q(t);n.headers||(n.headers={}),F(n.body)&&(n.body=JSON.stringify(n.body)),void 0===n.headers.Accept&&(n.headers.Accept="application/json"),null===n.headers.Accept&&delete n.headers.Accept;var o,i=Error();return window.fetch(r,n).then((o=V(e().mark((function t(n){var o,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o=n).ok){t.next=10;break}if(204!==o.status){t.next=7;break}return o.data=null,t.abrupt("return",o);case 7:return t.abrupt("return",o.text().then((function(t){try{t&&(o.data=JSON.parse(t))}catch(t){}return o})));case 8:t.next=19;break;case 10:return t.next=12,(0,K.getConfig)("@openmrs/esm-api");case 12:if(a=t.sent.redirectAuthFailure,!(r===Q(X)&&403===o.status||a.enabled&&a.errors.includes(o.status))){t.next=18;break}return(0,K.navigate)({to:a.url}),t.abrupt("return",a.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return t.abrupt("return",o.text().then((function(t){var e=t;try{e=JSON.parse(t)}catch(t){}throw new nt(r,o,e,i)}),(function(t){throw new nt(r,o,null,i)})));case 19:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)}))}function et(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof e)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return e.signal=n.signal,new S((function(r){var o=!1;return tt(t,e).then((function(t){o=!0,r.next(t),r.complete()}),(function(t){o=!0,r.error(t)})),function(){o||n.abort()}}))}var nt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Z(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=q(e);if(n){var o=q(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return W(this,t)});function o(t,e,n,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(a=r.call(this)).message="Server responded with ".concat(e.status," (").concat(e.statusText,") for url ").concat(t,". Check err.responseBody or network tab in dev tools for more info"),i.message=a.message,a.responseBody=n,a.response=e,a.stack="Stacktrace for outgoing request:\n".concat(i.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return o}(J(Error)),rt="/ws/fhir2/R4",ot={read:function(t){var e,n;return tt((n={url:"".concat(rt,"/").concat(t.type,"/").concat(t.patient),method:"GET",headers:null!==(e=t.headers)&&void 0!==e?e:{}}).url,{method:n.method,headers:n.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:n}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:n}}))}},it=a(254),at=a(385);const ut=function(t){return void 0===t};function st(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function ct(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){st(i,r,o,a,u,"next",t)}function u(t){st(i,r,o,a,u,"throw",t)}a(void 0)}))}}var lt=(0,at.createGlobalStore)("session",{loaded:!1,session:null}),ft=0;function ht(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(ft<Date.now()-6e4||!lt.getState().loaded)&&dt(),new S((function(e){var n=function(n){var r;n.loaded&&(t.includeAuthStatus?e.next(n.session):e.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(lt.getState()),lt.subscribe(n)}))}function pt(){return(ft<Date.now()-6e4||!lt.getState().loaded)&&dt(),lt}function dt(){return new Promise((function(t,e){ft=Date.now(),tt(X).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return e(),Promise.reject();var r,o,i,a,u;(u=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",u),t(n.data),lt.setState({loaded:!0,session:n.data})})).catch((function(t){return(0,it.reportError)("Failed to fetch new session information: ".concat(t)),e(t),{sessionId:"",authenticated:!1}}))}))}function vt(){lt.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function yt(t,e){return function(t,e){return"string"==typeof t?!ut(e.privileges.find((function(e){return t===e.display}))):Array.isArray(t)?t.every((function(t){return!ut(e.privileges.find((function(e){return t===e.display})))})):(console.error('Could not understand privileges "'.concat(t,'"')),!0)}(t,e)||function(t){return!ut(t.roles.find((function(t){return"System Developer"===t.display})))}(e)}function gt(){var t,e;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(t=r.session.user,n(r.session.user),e&&e())};o(lt.getState()),t||(e=lt.subscribe(o))}))}function mt(){return new Promise((function(t,e){var n=ht().subscribe((function(e){t(e.sessionLocation),n.unsubscribe()}),e)}))}function bt(t,e){return wt.apply(this,arguments)}function wt(){return(wt=ct(e().mark((function t(n,r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,tt(X,{method:"POST",body:{sessionLocation:n},headers:{"Content-Type":"application/json"},signal:r.signal});case 2:dt();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _t(){(0,K.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:K.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:K.Type.String,_default:"${openmrsSpaBase}/login",_validators:[K.validators.isUrl]},errors:{_type:K.Type.Array,_default:[401],_elements:{_type:K.Type.Number,_validators:[K.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:K.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."}}}),dt()}function St(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xt(t,e){return t?ot.read(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){St(t,e,n[e])}))}return t}({type:"Patient",patient:t},e)):Promise.resolve(null)}var Et=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}(),Ot=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return o(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(d),jt=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return o(e,t),e}(g),At=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return o(e,t),e.prototype[y]=function(){return new jt(this)},e.prototype.lift=function(t){var e=new Ct(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new Et;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},e.prototype.error=function(t){if(this.closed)throw new Et;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new Et;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new Et;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new Et;return this.hasError?(t.error(this.thrownError),d.EMPTY):this.isStopped?(t.complete(),d.EMPTY):(this.observers.push(t),new Ot(this,t))},e.prototype.asObservable=function(){var t=new S;return t.source=this,t},e.create=function(t,e){return new Ct(t,e)},e}(S),Ct=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return o(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):d.EMPTY},e}(At),Pt=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return o(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Et;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(At),kt=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}(),Tt=new S((function(t){return t.complete()}));function It(t){return function(e){return 0===t?Tt:e.lift(new Rt(t))}}var Rt=function(){function t(t){if(this.total=t,this.total<0)throw new kt}return t.prototype.call=function(t,e){return e.subscribe(new Lt(t,this.total))},t}(),Lt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return o(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(g);function Dt(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Mt(t,e))}}var Mt=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Nt(t,this.project,this.thisArg))},t}(),Nt=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return o(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(g),$t="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 Bt(t,e,n){var r=null!=n?n:$t;return et("/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(r),{signal:e.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(It(1)).pipe(Dt((function(t){return t})))}function Ut(t,e){return et("/ws/rest/v1/visit",{signal:e.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function Ft(t,e,n){return et("/ws/rest/v1/visit/".concat(t),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}var Kt,Ht,Vt=new Pt(null);function zt(t){return{uuid:t.uuid,display:t.display,name:t.name}}function Gt(){return et("/ws/rest/v1/visittype").pipe(Dt((function(t){return t.data.results.map(zt)}))).pipe(It(1))}function qt(t){return{uuid:t.uuid,display:t.display}}function Wt(){return et("/ws/rest/v1/location").pipe(Dt((function(t){return t.data.results.map(qt)}))).pipe(It(1))}!function(t){t.NEWVISIT="startVisit",t.EDITVISIT="editVisit",t.LOADING="loadingVisit"}(Kt||(Kt={})),function(t){t.NOTSTARTED="notStarted",t.ONGOING="ongoing"}(Ht||(Ht={}));var Zt={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}})(),u})())}}}))},6560:()=>{System.register(["@openmrs/esm-state"],(function(t,e){var n={};return{setters:[function(t){n.createGlobalStore=t.createGlobalStore}],execute:function(){t((()=>{var t={968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:t=>{"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})();var i={};return(0,o(968).s)(1),(()=>{"use strict";function t(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function e(t){return t&&t.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,u=o.start,s=void 0===u||u,c=o.end,l=void 0===c||c,f=o.encode,h=void 0===f?function(t){return t}:f,p="["+t(o.endsWith||"")+"]|$",d="["+t(o.delimiter||"/#?")+"]",v=s?"^":"",y=0,g=n;y<g.length;y++){var m=g[y];if("string"==typeof m)v+=t(h(m));else{var b=t(h(m.prefix)),w=t(h(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+=d+"?"),v+=o.endsWith?"(?="+p+")":"$";else{var S=n[n.length-1],x="string"==typeof S?d.indexOf(S[S.length-1])>-1:void 0===S;a||(v+="(?:"+d+"(?="+p+"))?"),x||(v+="(?="+d+"|"+p+")")}return new RegExp(v,e(o))}(function(e,n){void 0===n&&(n={});for(var r=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var o=1,i="";if("?"===t[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<t.length;)if("\\"!==t[u]){if(")"===t[u]){if(0==--o){u++;break}}else if("("===t[u]&&(o++,"?"!==t[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=t[u++]}else i+=t[u++]+t[u++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);e.push({type:"PATTERN",index:n,value:i}),n=u}else{for(var a="",u=n+1;u<t.length;){var s=t.charCodeAt(u);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=t[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);e.push({type:"NAME",index:n,value:a}),n=u}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(e),o=n.prefixes,i=void 0===o?"./":o,a="[^"+t(n.delimiter||"/#?")+"]+?",u=[],s=0,c=0,l="",f=function(t){if(c<r.length&&r[c].type===t)return r[c++].value},h=function(t){var e=f(t);if(void 0!==e)return e;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+t)},p=function(){for(var t,e="";t=f("CHAR")||f("ESCAPED_CHAR");)e+=t;return e};c<r.length;){var d=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var g=d||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(u.push(l),l=""),u.push({name:v||s++,prefix:g,suffix:"",pattern:y||a,modifier:f("MODIFIER")||""})}else{var m=d||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(u.push(l),l=""),f("OPEN")){g=p();var b=f("NAME")||"",w=f("PATTERN")||"",_=p();h("CLOSE"),u.push({name:b||(w?s++:""),pattern:b&&!w?a:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else h("END")}}return u}(n,o),r,o)}function r(t,o,i){return t instanceof RegExp?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return t}(t,o):Array.isArray(t)?function(t,n,o){var i=t.map((function(t){return r(t,n,o).source}));return new RegExp("(?:"+i.join("|")+")",e(o))}(t,o,i):n(t,o,i)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}o.r(i),o.d(i,{filterBreadcrumbs:()=>v,getBreadcrumbs:()=>h,getBreadcrumbsFor:()=>y,registerBreadcrumb:()=>l,registerBreadcrumbs:()=>f});var s=(0,o(685).createGlobalStore)("breadcrumbs",[]);function c(t){return e=t.matcher,(null!=(n=RegExp)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](e):e instanceof n)?t.matcher:"string"==typeof t.matcher?r(t.matcher):r(t.path);var e,n}function l(t){return f([t])}function f(t){var e=h(),n=t.map((function(t){return{matcher:c(t),settings:t}})),r=u(e).concat(u(n));s.setState(r,!0)}function h(){return s.getState()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){if(e)return function(t,e){return(n=t.filter((function(t){return t.matcher.test(e)})),function(t){if(Array.isArray(t))return t}(n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(t,e){if(t){if("string"==typeof t)return p(t,1);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,1):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];var n}(t,e)||function(t,e){for(var n=e.split("/");n.length>1;){n.pop();var r=d(t,n.join("/"));if(r)return r}}(t,e)}function v(t,e){if(t.length>0){var n=d(t,e);if(n){for(var r=[n],o=d(t,n.settings.parent);void 0!==o;)r.push(o),o=d(t,o.settings.parent);return r.reverse()}}return[]}function y(t){return v(h(),t)}})(),i})())}}}))},7538:()=>{System.register(["@openmrs/esm-state","single-spa"],(function(t,e){var n={},r={};return{setters:[function(t){n.createGlobalStore=t.createGlobalStore,n.getGlobalStore=t.getGlobalStore},function(t){r.navigateToUrl=t.navigateToUrl}],execute:function(){t((()=>{"use strict";var t={685:t=>{t.exports=n},645:t=>{t.exports=r}},e={};function o(n){var r=e[n];if(void 0!==r)return r.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,o),i.exports}o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{function t(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}function e(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}}function n(n){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:e((function(t){return n(o,t)}));default:return t(o)&&t(i)?r:t(o)?e((function(t){return n(t,i)})):t(i)?e((function(t){return n(o,t)})):n(o,i)}}}function r(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function a(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1}function u(t,e){return Object.prototype.hasOwnProperty.call(e,t)}o.r(i),o.d(i,{Type:()=>$,configExtensionStore:()=>X,configInternalStore:()=>W,defineConfigSchema:()=>gt,defineExtensionConfigSchema:()=>mt,getConfig:()=>wt,getConfigStore:()=>Q,getExtensionConfig:()=>ot,getExtensionConfigFromStore:()=>it,getExtensionSlotConfig:()=>et,getExtensionSlotConfigFromStore:()=>nt,getExtensionSlotsConfigStore:()=>tt,getExtensionsConfigStore:()=>rt,implementerToolsConfigStore:()=>at,inRange:()=>zt,interpolateString:()=>Ht,interpolateUrl:()=>Kt,isUrl:()=>qt,isUrlWithTemplateParameters:()=>Gt,navigate:()=>Vt,oneOf:()=>Wt,processConfig:()=>_t,provide:()=>bt,temporaryConfigStore:()=>J,validator:()=>B,validators:()=>Zt});const s="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};var c=Object.prototype.toString,l=function(){return"[object Arguments]"===c.call(arguments)?function(t){return"[object Arguments]"===c.call(t)}:function(t){return u("callee",t)}}();const f=l;var h=!{toString:null}.propertyIsEnumerable("toString"),p=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],d=function(){return arguments.propertyIsEnumerable("length")}(),v=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1};const y="function"!=typeof Object.keys||d?e((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=d&&f(t);for(e in t)!u(e,t)||o&&"length"===e||(r[r.length]=e);if(h)for(n=p.length-1;n>=0;)u(e=p[n],t)&&!v(r,e)&&(r[r.length]=e),n-=1;return r})):e((function(t){return Object(t)!==t?[]:Object.keys(t)})),g=e((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function m(t,e,n,o){var i=r(t);function u(t,e){return b(t,e,n.slice(),o.slice())}return!a((function(t,e){return!a(u,e,t)}),r(e),i)}function b(t,e,n,r){if(s(t,e))return!0;var o,i,a=g(t);if(a!==g(e))return!1;if(null==t||null==e)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof e["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof e.equals)return"function"==typeof t.equals&&t.equals(e)&&"function"==typeof e.equals&&e.equals(t);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(o=t.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return t===e;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof e||!s(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!s(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var c=n.length-1;c>=0;){if(n[c]===t)return r[c]===e;c-=1}switch(a){case"Map":return t.size===e.size&&m(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&m(t.values(),e.values(),n.concat([t]),r.concat([e]));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 l=y(t);if(l.length!==y(e).length)return!1;var f=n.concat([t]),h=r.concat([e]);for(c=l.length-1;c>=0;){var p=l[c];if(!u(p,e)||!b(e[p],t[p],f,h))return!1;c-=1}return!0}const w=n((function(t,e){return b(t,e,[],[])}));function _(r){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:n((function(t,e){return r(i,t,e)}));case 2:return t(i)&&t(a)?o:t(i)?n((function(t,e){return r(t,a,e)})):t(a)?n((function(t,e){return r(i,t,e)})):e((function(t){return r(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?n((function(t,e){return r(t,e,u)})):t(i)&&t(u)?n((function(t,e){return r(t,a,e)})):t(a)&&t(u)?n((function(t,e){return r(i,t,e)})):t(i)?e((function(t){return r(t,a,u)})):t(a)?e((function(t){return r(i,t,u)})):t(u)?e((function(t){return r(i,a,t)})):r(i,a,u)}}}function S(t){return"[object Object]"===Object.prototype.toString.call(t)}const x=_((function(t,e,n){var r,o={};for(r in e)u(r,e)&&(o[r]=u(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)u(r,n)&&!u(r,o)&&(o[r]=n[r]);return o})),E=_((function t(e,n,r){return x((function(n,r,o){return S(r)&&S(o)?t(e,r,o):e(n,r,o)}),n,r)})),O=n((function(t,e){return E((function(t,e,n){return n}),t,e)})),j=n((function(t,e){for(var n={},r={},o=0,i=t.length;o<i;)r[t[o]]=1,o+=1;for(var a in e)r.hasOwnProperty(a)||(n[a]=e[a]);return n}));function A(t,e,n,r){var o,i=function(o){for(var i=e.length,a=0;a<i;){if(t===e[a])return n[a];a+=1}for(var u in e[a+1]=t,n[a+1]=o,t)o[u]=r?A(t[u],e,n,!0):t[u];return o};switch(g(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}const C=e((function(t){return null!=t&&"function"==typeof t.clone?t.clone():A(t,[],[],!0)})),P=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},k=e((function(t){return!!P(t)||!!t&&"object"==typeof t&&!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))}));var T=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),I=n((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,a){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,a,u){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,a,u,s){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,a,u,s,c){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,a,u,s,c,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))}));const R=I;function L(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)}function D(t,e,n,r){return t["@@transducer/result"](n[r](R(t["@@transducer/step"],t),e))}var M="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";const N=_((function(t,e,n){if("function"==typeof t&&(t=function(t){return new T(t)}(t)),k(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return D(t,e,n,"fantasy-land/reduce");if(null!=n[M])return L(t,e,n[M]());if("function"==typeof n.next)return L(t,e,n);if("function"==typeof n.reduce)return D(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));var $;function B(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}}!function(t){t.Array="Array",t.Boolean="Boolean",t.ConceptUuid="ConceptUuid",t.Number="Number",t.Object="Object",t.String="String",t.UUID="UUID",t.PersonAttributeTypeUuid="PersonAttributeTypeUuid",t.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}($||($={}));var U=B((function(t){return Array.isArray(t)}),"must be an array"),F=B((function(t){return"boolean"==typeof t}),"must be a boolean"),K=B((function(t){return"number"==typeof t}),"must be a number"),H=B((function(t){return"string"==typeof t}),"must be a string"),V=B((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),z=B((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),G=o(685),q={providedConfigs:[],schemas:{},devDefaultsAreOn:Y()},W=(0,G.createGlobalStore)("config-internal",q),Z=Y();function Y(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}}W.subscribe((function(t){var e;t.devDefaultsAreOn!=Z&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Z=t.devDefaultsAreOn)}));var J=(0,G.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});J.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var X=(0,G.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function Q(t){return(0,G.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})}function tt(){return(0,G.getGlobalStore)("config-extension-slots",{slots:{}})}function et(t){return nt(tt().getState(),t)}function nt(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}}function rt(){return(0,G.getGlobalStore)("config-extensions",{configs:{}})}function ot(t,e){var n=Object.assign({},it(rt().getState(),t,e));return n.config=j(["Display conditions"],n.config),n}function it(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}}var at=(0,G.createGlobalStore)("config-implementer-tools",{config:{}});function ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){st(t,e,n[e])}))}return t}function lt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||ht(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ft(t){return function(t){if(Array.isArray(t))return ut(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ht(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ht(t,e){if(t){if("string"==typeof t)return ut(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ut(t,e):void 0}}function pt(t,e){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=Ct(u,t,e);Q(u).setState({loaded:!0,config:s})}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}function dt(t,e){var n,r,o=(n=kt(jt(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=lt(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var h,p=Object.entries(s)[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var d=lt(h.value,2),v=d[0];Ot(d[1],u,v)}}catch(t){l=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return ct({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=lt(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),a=tt(),u=a.getState(),s={slots:ct({},u.slots,i)};w(u,s)||a.setState(s)}function vt(t,e){var n=function(t,e){var n=xt(C(t.schemas)),r=ft(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=lt(u.value,2);n=kt([n,Et(c[0],c[1])])}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(t,e);at.setState({config:n})}function yt(t,e,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=e.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=St(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,t,n);r[c.slotName]=ct({},r[c.slotName],st({},c.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}rt().setState({configs:r})}function gt(t,e){At(t,e);var n=O(e,Bt),r=W.getState();W.setState({schemas:ct({},r.schemas,st({},t,n))})}function mt(t,e){At(t,e);var n=O(e,Bt),r=W.getState();r.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),W.setState({schemas:ct({},r.schemas,st({},t,n))})}function bt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=W.getState();W.setState({providedConfigs:ft(n.providedConfigs).concat([{source:e,config:t}])})}function wt(t){return new Promise((function(e){var n=function(t){if(t.loaded&&t.config){var n=j(["Display conditions"],t.config);e(n),o&&o()}},r=Q(t);n(r.getState());var o=r.subscribe(n)}))}function _t(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Tt(t,e,n);var o=Mt(t,e,r);return Rt(t,o,n),o}function St(t,e,n,r,o,i){var a,u,s,c,l=function(t){return lt(t.split("#"),1)[0]}(r),f=o.schemas[l],h=f?l:e,p=jt(o,i),d=Pt(t,p),v=null!==(c=null==d||null===(a=d.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},y=kt([Pt(h,p),v]),g=null!=f?f:o.schemas[e];Tt(g,y,h);var m=Mt(g,y,o.devDefaultsAreOn);return Rt(g,m,h),delete m.extensionSlots,m}function xt(t){return t.hasOwnProperty("_default")?ct({},t,{_value:t._default,_source:"default"}):$t(t)?Object.keys(t).reduce((function(e,n){return e[n]=xt(t[n]),e}),{}):{}}function Et(t,e){return $t(t)?Object.keys(t).reduce((function(n,r){return n[r]=Et(t[r],e),n}),{}):{_value:t,_source:e}}function Ot(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&($t(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function jt(t,e){return ft(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])}function At(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,s=function(o,i){var a=i.value,u=n+(n&&".")+a,s=e[a];if("Display conditions"===u&&console.error("".concat(t,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),!$t(s))return console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";s.hasOwnProperty("_default")||At(t,s,u);var c=s._elements;if(Nt(c)&&At(t,c,u+"._elements"),s._validators){var l=!0,f=!1,h=void 0;try{for(var p,d=s._validators[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}}var y=s._type;y&&!Object.values($).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values($).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(s).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(s))),c&&y&&![$.Array,$.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s(c,u)}catch(t){i=!0,a=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Ct(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=Pt(t,jt(e,n));Tt(r,o,t);var i=Mt(r,o,e.devDefaultsAreOn);return Rt(r,i,t),delete i.extensionSlots,i}function Pt(t,e){return kt(e.map((function(e){return e[t]})).filter((function(t){return!!t})))}function kt(t){return N(O)({},t)}function Tt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s],l=n+"."+s,f=t[s];t.hasOwnProperty(s)?It(f,c,l):"extensionSlots"===s&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}function It(t,e,n){Lt(n,t._type,e),$t(e)?t._type===$.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s];Tt(t._elements,c,"".concat(n,".").concat(s))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||Tt(t,e,n):t._type===$.Array&&function(t,e,n){if(Nt(t._elements))for(var r=0;r<e.length;r++)It(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;Lt("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function Rt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&Dt(n,t._validators,e),$t(e)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s],l=n+"."+s,f=t[s];t._type===$.Object&&t._elements?Rt(t._elements,c,l):Rt(f,c,l)}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)Rt(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}function Lt(t,e,n){e&&Dt(t,[{Array:U,Boolean:F,ConceptUuid:z,Number:K,Object:V,String:H,UUID:z,PersonAttributeTypeUuid:z,PatientIdentifierTypeUuid:z}[e]],n)}function Dt(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=(0,a.value)(n);"string"==typeof s&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(s)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(s)))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}}pt(W.getState(),J.getState()),W.subscribe((function(t){return pt(t,J.getState())})),J.subscribe((function(t){return pt(W.getState(),t)})),vt(W.getState(),J.getState()),W.subscribe((function(t){return vt(t,J.getState())})),J.subscribe((function(t){return vt(W.getState(),t)})),dt(W.getState(),J.getState()),W.subscribe((function(t){return dt(t,J.getState())})),J.subscribe((function(t){return dt(W.getState(),t)})),yt(W.getState(),X.getState(),J.getState()),W.subscribe((function(t){yt(t,X.getState(),J.getState())})),X.subscribe((function(t){yt(W.getState(),t,J.getState())})),J.subscribe((function(t){yt(W.getState(),X.getState(),t)}));var Mt=function(t,e,n){var r=C(e);if(!t)return r;var o=!0,i=!1,a=void 0;try{for(var u,s=function(e,o){var i=o.value,a=r[i],u=t[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var s=u._devDefault||u._default;r[i]=n?s:u._default}var c=u._elements;if(a&&Nt(c))if(u._type===$.Array&&Array.isArray(a)){var l=a.map((function(t){return Mt(c,t,n)}));r[i]=l}else if(u._type===$.Object){var f=!0,h=!1,p=void 0;try{for(var d,v=Object.keys(a)[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){var y=d.value;a[y]=Mt(c,a[y],n)}}catch(t){h=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw p}}}}else if($t(u)){var g=r.hasOwnProperty(i)?a:{};$t(g)&&(r[i]=Mt(u,g,n))}},c=Object.keys(t)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s(0,u)}catch(t){i=!0,a=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return r};function Nt(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0}function $t(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}var Bt={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:$.Array,_default:[]}}},Ut=o(645);function Ft(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Kt(t,e){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Ht(t,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Ft(t,e,n[e])}))}return t}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},e)).replace(/^\/\//,"/")}function Ht(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)}function Vt(t){var e=t.to,n=t.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Kt(e,n);o.startsWith(r)?(0,Ut.navigateToUrl)(o):window.location.assign(o)}var zt=function(t,e){return B((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},Gt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return B((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},qt=Gt([]),Wt=function(t){return B((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Zt={inRange:zt,isUrl:qt,isUrlWithTemplateParameters:Gt,oneOf:Wt}})(),i})())}}}))},2041:()=>{System.register(["@openmrs/esm-globals"],(function(t,e){var n={};return{setters:[function(t){n.dispatchNotificationShown=t.dispatchNotificationShown}],execute:function(){t((()=>{var t={968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:t=>{"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})();var i={};return(0,o(968).s)(1),(()=>{"use strict";o.r(i),o.d(i,{createErrorHandler:()=>n,reportError:()=>e});var t=o(728);function e(t){var e=r(t);setTimeout((function(){throw e}))}function n(){var t=Error();return function(n){r(n).stack+="\nAsync stacktrace:\n".concat(t.stack),e(n)}}function r(t){var e,n,r;if(n=t,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)return t;if(null===t)return Error("'null' was thrown as an error");if("object"==typeof t){try{e="Object thrown as error: ".concat(JSON.stringify(t))}catch(n){e="Object thrown as error with the following properties: ".concat(Object.keys(t))}return Error(e)}return void 0===t?Error("'undefined' was thrown as an error"):Error(t.toString())}window.onerror=function(){return(0,t.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,t.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}})(),i})())}}}))},8282:(t,e,n)=>{t=n.nmd(t),System.register(["@openmrs/esm-config","@openmrs/esm-state","@openmrs/esm-api","single-spa"],(function(r,o){var i={},a={},u={},s={};return{setters:[function(t){i.configExtensionStore=t.configExtensionStore,i.getExtensionConfigFromStore=t.getExtensionConfigFromStore,i.getExtensionSlotConfig=t.getExtensionSlotConfig,i.getExtensionSlotConfigFromStore=t.getExtensionSlotConfigFromStore,i.getExtensionSlotsConfigStore=t.getExtensionSlotsConfigStore,i.getExtensionsConfigStore=t.getExtensionsConfigStore},function(t){a.createGlobalStore=t.createGlobalStore,a.getGlobalStore=t.getGlobalStore},function(t){u.getSessionStore=t.getSessionStore,u.userHasAccess=t.userHasAccess},function(t){s.mountRootParcel=t.mountRootParcel}],execute:function(){r((()=>{var r={968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:t=>{"use strict";t.exports=u},824:t=>{"use strict";t.exports=i},685:t=>{"use strict";t.exports=a},645:t=>{"use strict";t.exports=s}},c={};function l(t){var e=c[t];if(void 0!==e)return e.exports;var n=c[t]={exports:{}};return r[t](n,n.exports,l),n.exports}l.y=o,l.d=(t,e)=>{for(var n in e)l.o(e,n)&&!l.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),l.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),l.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;l.g.importScripts&&(t=l.g.location+"");var e=l.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=t})();var f={};return(0,l(968).s)(1),(()=>{"use strict";l.r(f),l.d(f,{attach:()=>Ae,checkStatus:()=>Me,checkStatusFor:()=>Ne,detach:()=>Ce,detachAll:()=>Pe,extensionStore:()=>Ge,getAssignedExtensions:()=>Re,getConnectedExtensions:()=>Te,getCustomProps:()=>$e,getExtensionInternalStore:()=>ae,getExtensionNameFromId:()=>xe,getExtensionRegistration:()=>Oe,getExtensionRegistrationFrom:()=>Ee,getExtensionStore:()=>se,registerExtension:()=>je,registerExtensionSlot:()=>Le,renderExtension:()=>ze,reset:()=>De,updateInternalExtensionStore:()=>ue});const r=function(t,e){return t===e||t!=t&&e!=e},o=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1};var i=Array.prototype.splice;function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(t){var e=this.__data__,n=o(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))},a.prototype.get=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]},a.prototype.has=function(t){return o(this.__data__,t)>-1},a.prototype.set=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};const u=a,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var c="object"==typeof self&&self&&self.Object===Object&&self;const h=s||c||Function("return this")(),p=h.Symbol;var d=Object.prototype,v=d.hasOwnProperty,y=d.toString,g=p?p.toStringTag:void 0,m=Object.prototype.toString,b=p?p.toStringTag:void 0;const w=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":b&&b in Object(t)?function(t){var e=v.call(t,g),n=t[g];try{t[g]=void 0;var r=!0}catch(t){}var o=y.call(t);return r&&(e?t[g]=n:delete t[g]),o}(t):function(t){return m.call(t)}(t)},_=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},S=function(t){if(!_(t))return!1;var e=w(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},x=h["__core-js_shared__"];var E,O=(E=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",j=Function.prototype.toString;const A=function(t){if(null!=t){try{return j.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var C=/^\[object .+?Constructor\]$/,P=Function.prototype,k=Object.prototype,T=P.toString,I=k.hasOwnProperty,R=RegExp("^"+T.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const L=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!_(t)||(e=t,O&&O in e))&&(S(t)?R:C).test(A(t));var e}(n)?n:void 0},D=L(h,"Map"),M=L(Object,"create");var N=Object.prototype.hasOwnProperty,$=Object.prototype.hasOwnProperty;function B(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}B.prototype.clear=function(){this.__data__=M?M(null):{},this.size=0},B.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},B.prototype.get=function(t){var e=this.__data__;if(M){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return N.call(e,t)?e[t]:void 0},B.prototype.has=function(t){var e=this.__data__;return M?void 0!==e[t]:$.call(e,t)},B.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=M&&void 0===e?"__lodash_hash_undefined__":e,this};const U=B,F=function(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map};function K(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}K.prototype.clear=function(){this.size=0,this.__data__={hash:new U,map:new(D||u),string:new U}},K.prototype.delete=function(t){var e=F(this,t).delete(t);return this.size-=e?1:0,e},K.prototype.get=function(t){return F(this,t).get(t)},K.prototype.has=function(t){return F(this,t).has(t)},K.prototype.set=function(t,e){var n=F(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};const H=K;function V(t){var e=this.__data__=new u(t);this.size=e.size}V.prototype.clear=function(){this.__data__=new u,this.size=0},V.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},V.prototype.get=function(t){return this.__data__.get(t)},V.prototype.has=function(t){return this.__data__.has(t)},V.prototype.set=function(t,e){var n=this.__data__;if(n instanceof u){var r=n.__data__;if(!D||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new H(r)}return n.set(t,e),this.size=n.size,this};const z=V;function G(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new H;++e<n;)this.add(t[e])}G.prototype.add=G.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},G.prototype.has=function(t){return this.__data__.has(t)};const q=G,W=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},Z=function(t,e,n,r,o,i){var a=1&n,u=t.length,s=e.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var f=-1,h=!0,p=2&n?new q:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var d=t[f],v=e[f];if(r)var y=a?r(v,d,f,e,t,i):r(d,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!W(e,(function(t,e){if(a=e,!p.has(a)&&(d===t||o(d,t,n,r,i)))return p.push(e);var a}))){h=!1;break}}else if(d!==v&&!o(d,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},Y=h.Uint8Array,J=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},X=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n};var Q=p?p.prototype:void 0,tt=Q?Q.valueOf:void 0;const et=Array.isArray;var nt=Object.prototype.propertyIsEnumerable,rt=Object.getOwnPropertySymbols;const ot=rt?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a)&&(i[o++]=a)}return i}(rt(t),(function(e){return nt.call(t,e)})))}:function(){return[]},it=function(t){return null!=t&&"object"==typeof t},at=function(t){return it(t)&&"[object Arguments]"==w(t)};var ut=Object.prototype,st=ut.hasOwnProperty,ct=ut.propertyIsEnumerable,lt=at(function(){return arguments}())?at:function(t){return it(t)&&st.call(t,"callee")&&!ct.call(t,"callee")};const ft=lt;var ht=e&&!e.nodeType&&e,pt=ht&&t&&!t.nodeType&&t,dt=pt&&pt.exports===ht?h.Buffer:void 0;const vt=(dt?dt.isBuffer:void 0)||function(){return!1};var yt=/^(?:0|[1-9]\d*)$/;const gt=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e},mt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var bt={};bt["[object Float32Array]"]=bt["[object Float64Array]"]=bt["[object Int8Array]"]=bt["[object Int16Array]"]=bt["[object Int32Array]"]=bt["[object Uint8Array]"]=bt["[object Uint8ClampedArray]"]=bt["[object Uint16Array]"]=bt["[object Uint32Array]"]=!0,bt["[object Arguments]"]=bt["[object Array]"]=bt["[object ArrayBuffer]"]=bt["[object Boolean]"]=bt["[object DataView]"]=bt["[object Date]"]=bt["[object Error]"]=bt["[object Function]"]=bt["[object Map]"]=bt["[object Number]"]=bt["[object Object]"]=bt["[object RegExp]"]=bt["[object Set]"]=bt["[object String]"]=bt["[object WeakMap]"]=!1;var wt=e&&!e.nodeType&&e,_t=wt&&t&&!t.nodeType&&t,St=_t&&_t.exports===wt&&s.process,xt=function(){try{return _t&&_t.require&&_t.require("util").types||St&&St.binding&&St.binding("util")}catch(t){}}(),Et=xt&&xt.isTypedArray;const Ot=Et?(jt=Et,function(t){return jt(t)}):function(t){return it(t)&&mt(t.length)&&!!bt[w(t)]};var jt,At=Object.prototype.hasOwnProperty,Ct=Object.prototype;const Pt=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object);var kt=Object.prototype.hasOwnProperty;const Tt=function(t){return null!=(e=t)&&mt(e.length)&&!S(e)?function(t,e){var n=et(t),r=!n&&ft(t),o=!n&&!r&&vt(t),i=!n&&!r&&!o&&Ot(t),a=n||r||o||i,u=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],s=u.length;for(var c in t)!At.call(t,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||gt(c,s))||u.push(c);return u}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||Ct))return Pt(t);var e,n,r=[];for(var o in Object(t))kt.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e},It=function(t){return function(t,e,n){var r=e(t);return et(t)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(t))}(t,Tt,ot)};var Rt=Object.prototype.hasOwnProperty;const Lt=L(h,"DataView"),Dt=L(h,"Promise"),Mt=L(h,"Set"),Nt=L(h,"WeakMap");var $t="[object Map]",Bt="[object Promise]",Ut="[object Set]",Ft="[object WeakMap]",Kt="[object DataView]",Ht=A(Lt),Vt=A(D),zt=A(Dt),Gt=A(Mt),qt=A(Nt),Wt=w;(Lt&&Wt(new Lt(new ArrayBuffer(1)))!=Kt||D&&Wt(new D)!=$t||Dt&&Wt(Dt.resolve())!=Bt||Mt&&Wt(new Mt)!=Ut||Nt&&Wt(new Nt)!=Ft)&&(Wt=function(t){var e=w(t),n="[object Object]"==e?t.constructor:void 0,r=n?A(n):"";if(r)switch(r){case Ht:return Kt;case Vt:return $t;case zt:return Bt;case Gt:return Ut;case qt:return Ft}return e});const Zt=Wt;var Yt="[object Arguments]",Jt="[object Array]",Xt="[object Object]",Qt=Object.prototype.hasOwnProperty;const te=function(t,e,n,o,i,a){var u=et(t),s=et(e),c=u?Jt:Zt(t),l=s?Jt:Zt(e),f=(c=c==Yt?Xt:c)==Xt,h=(l=l==Yt?Xt:l)==Xt,p=c==l;if(p&&vt(t)){if(!vt(e))return!1;u=!0,f=!1}if(p&&!f)return a||(a=new z),u||Ot(t)?Z(t,e,n,o,i,a):function(t,e,n,o,i,a,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new Y(t),new Y(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=J;case"[object Set]":var c=1&o;if(s||(s=X),t.size!=e.size&&!c)return!1;var l=u.get(t);if(l)return l==e;o|=2,u.set(t,e);var f=Z(s(t),s(e),o,i,a,u);return u.delete(t),f;case"[object Symbol]":if(tt)return tt.call(t)==tt.call(e)}return!1}(t,e,c,n,o,i,a);if(!(1&n)){var d=f&&Qt.call(t,"__wrapped__"),v=h&&Qt.call(e,"__wrapped__");if(d||v){var y=d?t.value():t,g=v?e.value():e;return a||(a=new z),i(y,g,n,o,a)}}return!!p&&(a||(a=new z),function(t,e,n,r,o,i){var a=1&n,u=It(t),s=u.length;if(s!=It(e).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in e:Rt.call(e,l)))return!1}var f=i.get(t),h=i.get(e);if(f&&h)return f==e&&h==t;var p=!0;i.set(t,e),i.set(e,t);for(var d=a;++c<s;){var v=t[l=u[c]],y=e[l];if(r)var g=a?r(y,v,l,e,t,i):r(v,y,l,t,e,i);if(!(void 0===g?v===y||o(v,y,n,r,i):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,o,i,a))},ee=function t(e,n,r,o,i){return e===n||(null==e||null==n||!it(e)&&!it(n)?e!=e&&n!=n:te(e,n,r,o,t,i))},ne=function(t,e){return ee(t,e)};var re=l(824),oe=l(685),ie=(0,oe.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),ae=function(){return(0,oe.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};function ue(t){var e=ie.getState(),n=t(e);n!==e&&ie.setState(n)}var se=function(){return(0,oe.getGlobalStore)("extensions",{slots:{}})};function ce(t){var e=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(t.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=!0,c=!1,l=void 0;try{for(var f,h=u.instances[Symbol.iterator]();!(s=(f=h.next()).done);s=!0){var p=f.value;e.push({slotModuleName:p.slotModuleName,extensionModuleName:u.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(t){c=!0,l=t}finally{try{s||null==h.return||h.return()}finally{if(c)throw l}}}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}ne(re.configExtensionStore.getState().mountedExtensions,e)||re.configExtensionStore.setState({mountedExtensions:e})}ce(ie.getState()),ie.subscribe(ce);var le=l(766);function fe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function he(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){he(t,e,n[e])}))}return t}function de(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||ye(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(t){return function(t){if(Array.isArray(t))return fe(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ye(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(t,e){if(t){if("string"==typeof t)return fe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fe(t,e):void 0}}var ge=ae(),me=se(),be=(0,re.getExtensionSlotsConfigStore)(),we=(0,re.getExtensionsConfigStore)();function _e(t,e,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=Object.entries(t.slots)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=de(u.value,2),l=c[0],f=c[1],h=Ie(l,t,(0,re.getExtensionSlotConfigFromStore)(e,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:h}}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}ne(me.getState().slots,r)||me.setState({slots:r})}function Se(t,e){return{moduleName:e,name:t,attachedIds:[],config:null}}function xe(t){return de(t.split("#"),1)[0]}function Ee(t,e){var n=xe(e);return t.extensions[n]}function Oe(t){return Ee(ge.getState(),t)}ge.subscribe((function(t){_e(t,be.getState(),we.getState())})),be.subscribe((function(t){_e(ge.getState(),t,we.getState())})),we.subscribe((function(t){_e(ge.getState(),be.getState(),t)}));var je=ge.action((function(t,e){t.extensions[e.name]=pe({},e,{instances:[]})}));function Ae(t,e){ue((function(n){var r=n.slots[t];return pe({},n,r?{slots:pe({},n.slots,he({},t,pe({},r,{attachedIds:ve(r.attachedIds).concat([e])})))}:{slots:pe({},n.slots,he({},t,pe({},Se(t),{attachedIds:[e]})))})}))}function Ce(t,e){ue((function(n){var r=n.slots[t];return r&&r.attachedIds.includes(e)?pe({},n,{slots:pe({},n.slots,he({},t,pe({},r,{attachedIds:r.attachedIds.filter((function(t){return t!==e}))})))}):n}))}function Pe(t){ue((function(e){var n=e.slots[t];return n?pe({},e,{slots:pe({},e.slots,he({},t,pe({},n,{attachedIds:[]})))}):e}))}function ke(t,e,n,r){var o=e.indexOf(t);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(t);return-1!==i?2e3+i:-1}function Te(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=e?e:navigator.onLine;return t.filter((function(t){return Ne(n,t.online,t.offline)}))}function Ie(t,e,n,r){var o=function(t,e){var n=t.add||[],r=t.remove||[],o=t.order||[],i=ge.getState().extensions;return ve(e).concat(ve(n)).filter((function(t){return!r.includes(t)})).sort((function(t,n){var r,a,u=ke(t,o,null===(r=i[xe(t)])||void 0===r?void 0:r.order,e),s=ke(n,o,null===(a=i[xe(n)])||void 0===a?void 0:a.order,e);return-1===s?-1:-1===u?1:u-s}))}(n,e.slots[t].attachedIds),i=[],a=void 0,u=!0,s=!1,c=void 0;try{for(var l,f=o[Symbol.iterator]();!(u=(l=f.next()).done);u=!0){var h=l.value,p=(0,re.getExtensionConfigFromStore)(r,t,h).config,d=xe(h),v=e.extensions[d];if(v){var y,g,m=null!==(g=null==p||null===(y=p["Display conditions"])||void 0===y?void 0:y.privileges)&&void 0!==g?g:v.privileges;if(m&&("string"==typeof m||Array.isArray(m)&&m.length>0)){var b;if(void 0===a&&(a=null===(b=(0,le.getSessionStore)().getState().session)||void 0===b?void 0:b.user),!a)continue;if(!(0,le.userHasAccess)(m,a))continue}i.push({id:h,name:d,moduleName:v.moduleName,config:p,meta:v.meta,online:v.online,offline:v.offline})}}}catch(t){s=!0,c=t}finally{try{u||null==f.return||f.return()}finally{if(s)throw c}}return i}function Re(t){return Ie(t,ge.getState(),(0,re.getExtensionSlotConfig)(t).config,we.getState())}var Le=ge.action((function(t,e,n){var r,o=null===(r=t.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=e)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),t;if(o&&o==e)return t;if(t.slots[n])return pe({},t,{slots:pe({},t.slots,he({},n,pe({},t.slots[n],{moduleName:e})))});var i=Se(n,e);return pe({},t,{slots:pe({},t.slots,he({},n,i))})})),De=me.action((function(){return{slots:{},extensions:{}}}));function Me(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return Ne(n,t,e)}function Ne(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(t?e:n)}function $e(t,e){var n=navigator.onLine?t:e;return"object"==typeof n?n:{}}var Be=l(645);function Ue(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Fe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ke(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Fe(t,e,n[e])}))}return t}function He(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function Ve(t){return function(t){if(Array.isArray(t))return Ue(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ue(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ue(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ze(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(t){return t},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=xe(r),u=Oe(r),s=!0,c=null;if(t){if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(e,"'"));var l=u.load,f=u.online,h=u.offline,p=u.meta,d=u.moduleName;Me(f,h)&&(l().then((function(a){var u=a.default,l=He(a,["default"]);s&&(c=(0,Be.mountRootParcel)(o(null!=u?u:l),Ke({},$e(f,h),i,{_meta:p,_extensionContext:{extensionId:r,extensionSlotName:e,extensionSlotModuleName:n,extensionModuleName:d},domElement:t})))})),ue((function(o){var i={domElement:t,id:r,slotName:e,slotModuleName:n};return Ke({},o,{extensions:Ke({},o.extensions,Fe({},a,Ke({},o.extensions[a],{instances:Ve(o.extensions[a].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(e," but no DOM element was available."));return function(){s=!1,c&&("MOUNTED"!==c.getStatus()?c.mountPromise.then((function(){c&&c.unmount()})):c.unmount())}}var Ge=ae()})(),f})())}}}))},6858:(t,e,n)=>{"use strict";n.r(e);var r=n(560),o={};for(const t in r)"default"!==t&&(o[t]=()=>r[t]);n.d(e,o);var i=n(6560);o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);n.d(e,o);var a=n(7538);o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);n.d(e,o);var u=n(2041);o={};for(const t in u)"default"!==t&&(o[t]=()=>u[t]);n.d(e,o);var s=n(8282);o={};for(const t in s)"default"!==t&&(o[t]=()=>s[t]);n.d(e,o);var c=n(4875);o={};for(const t in c)"default"!==t&&(o[t]=()=>c[t]);n.d(e,o);var l=n(7212);o={};for(const t in l)"default"!==t&&(o[t]=()=>l[t]);n.d(e,o);var f=n(4211);o={};for(const t in f)"default"!==t&&(o[t]=()=>f[t]);n.d(e,o);var h=n(5435);o={};for(const t in h)"default"!==t&&(o[t]=()=>h[t]);n.d(e,o);var p=n(2742);o={};for(const t in p)"default"!==t&&(o[t]=()=>p[t]);n.d(e,o);var d=n(8540);o={};for(const t in d)"default"!==t&&(o[t]=()=>d[t]);n.d(e,o)},4875:()=>{System.register([],(function(t,e){return{execute:function(){t((()=>{var t={968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})();var o={};return(0,r(968).s)(1),(()=>{"use strict";r.r(o),r.d(o,{dispatchConnectivityChanged:()=>e,dispatchNotificationShown:()=>f,dispatchPrecacheStaticDependencies:()=>u,setupPaths:()=>d,setupUtils:()=>v,subscribeConnectivity:()=>i,subscribeConnectivityChanged:()=>n,subscribeNotificationShown:()=>h,subscribePrecacheStaticDependencies:()=>s,subscribeToastShown:()=>p});var t="openmrs:connectivity-changed";function e(e){window.dispatchEvent(new CustomEvent(t,{detail:{online:e}}))}function n(e){var n=function(t){return e(t.detail)};return window.addEventListener(t,n),function(){return window.removeEventListener(t,n)}}function i(t){return t({online:navigator.onLine}),n(t)}var a="openmrs:precache-static-dependencies";function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(a,{detail:t}))}function s(t){var e=function(e){return t(e.detail)};return window.addEventListener(a,e),function(){return window.removeEventListener(a,e)}}var c="openmrs:notification-shown",l="openmrs:toast-shown";function f(t){window.dispatchEvent(new CustomEvent(c,{detail:t}))}function h(t){var e=function(e){return t(e.detail)};return window.addEventListener(c,e),function(){return window.removeEventListener(c,e)}}function p(t){var e=function(e){return t(e.detail)};return window.addEventListener(l,e),function(){return window.removeEventListener(l,e)}}function d(t){window.openmrsBase=t.apiUrl,window.spaBase=t.spaPath,window.spaEnv=t.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}}function v(){window.copyText=function(t){var e=window.getSelection();if(e){var n=document.createRange();n.selectNode(t),e.removeAllRanges(),e.addRange(n),document.execCommand("copy"),e.removeAllRanges()}}}})(),o})())}}}))},7212:(t,e,n)=>{System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(t,e){var r={},o={};return{setters:[function(t){r.getLoggedInUser=t.getLoggedInUser},function(t){o.createGlobalStore=t.createGlobalStore}],execute:function(){t((()=>{var t={602:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=l(t,e,n);if("normal"===s.type){if(r=n.done?d:h,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=d,n.method="throw",n.arg=s.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function g(){}function m(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,i)&&(b=_);var S=m.prototype=y.prototype=Object.create(b);function x(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(o,i,a,u){var s=l(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function P(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return g.prototype=m,s(S,"constructor",m),s(m,"constructor",g),g.displayName=s(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},x(E.prototype),s(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(S),s(S,u,"Generator"),s(S,i,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=P,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:t=>{"use strict";t.exports=r},685:t=>{"use strict";t.exports=o}},i={};function a(e){var n=i[e];if(void 0!==n)return n.exports;var r=i[e]={exports:{}};return t[e](r,r.exports,a),r.exports}a.y=e,a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})();var u={};return(0,a(968).s)(1),(()=>{"use strict";a.r(u),a.d(u,{activateOfflineCapability:()=>F,beginEditSynchronizationItem:()=>_o,canBeginEditSynchronizationItemsOfType:()=>wo,deleteSynchronizationItem:()=>xo,generateOfflineUuid:()=>Lo,getCurrentOfflineMode:()=>B,getDynamicOfflineDataEntries:()=>Ho,getDynamicOfflineDataEntriesFor:()=>zo,getDynamicOfflineDataHandlers:()=>Fo,getFullSynchronizationItems:()=>yo,getFullSynchronizationItemsFor:()=>fo,getOfflineDb:()=>Fr,getOfflinePatientDataStore:()=>li,getOfflineSynchronizationStore:()=>Xr,getOmrsServiceWorker:()=>y,getSynchronizationItem:()=>mo,getSynchronizationItems:()=>po,getSynchronizationItemsFor:()=>co,isOfflineUuid:()=>Do,messageOmrsServiceWorker:()=>O,offlineUuidPrefix:()=>Ro,omrsOfflineCachingStrategyHttpHeaderName:()=>b,omrsOfflineResponseBodyHttpHeaderName:()=>g,omrsOfflineResponseStatusHttpHeaderName:()=>m,putDynamicOfflineData:()=>qo,putDynamicOfflineDataFor:()=>Zo,queueSynchronizationItem:()=>uo,queueSynchronizationItemFor:()=>io,registerOfflinePatientHandler:()=>fi,registerOmrsServiceWorker:()=>v,removeDynamicOfflineData:()=>Jo,removeDynamicOfflineDataFor:()=>Qo,runSynchronization:()=>Qr,setCurrentOfflineMode:()=>U,setupDynamicOfflineDataHandler:()=>Ko,setupOfflineSync:()=>Oo,syncAllDynamicOfflineData:()=>ei,syncDynamicOfflineData:()=>ri,syncOfflinePatientData:()=>hi});try{self["workbox:window:6.5.1"]&&_()}catch(t){}function t(t,e){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(t){n(t.data)},t.postMessage(e,[r.port2])}))}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function r(t,n){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}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(r=t[Symbol.iterator]()).next.bind(r)}try{self["workbox:core:6.5.1"]&&_()}catch(t){}var o=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))};function i(t,e){var n=location.href;return new URL(t,n).href===new URL(e,n).href}var s=function(t,e){this.type=t,Object.assign(this,e)};function c(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function l(){}var f={type:"SKIP_WAITING"};function h(t,e){if(!e)return t&&t.then?t.then(l):Promise.resolve()}var p=function(e){var n,r;function a(t,n){var r,a;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new o,r.en=new o,r.on=new o,r.un=0,r.an=new Set,r.cn=function(){var t=r.fn,e=t.installing;r.tn>0||!i(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,t.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(t){var e=r.fn,n=t.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:t};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new s(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===n&&r.dispatchEvent(new s("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(t){var e=r.hn,n=e!==navigator.serviceWorker.controller;r.dispatchEvent(new s("controlling",{isExternal:n,originalEvent:t,sw:e,isUpdate:r.mn})),n||r.on.resolve(e)},r.gn=(a=function(t){var e=t.data,n=t.ports,o=t.source;return c(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new s("message",{data:e,originalEvent:t,ports:n,sw:o}))}))},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(a.apply(this,t))}catch(t){return Promise.reject(t)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}r=e,(n=a).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var u,l=a.prototype;return l.register=function(t){var e=(void 0===t?{}:t).immediate,n=void 0!==e&&e;try{var r=this;return function(t,e){var n=t();return n&&n.then?n.then(e):e()}((function(){if(!n&&"complete"!==document.readyState)return h(new Promise((function(t){return window.addEventListener("load",t)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),c(r.bn(),(function(t){r.fn=t,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 e=r.fn.waiting;return e&&i(e.scriptURL,r.sn.toString())&&(r.hn=e,Promise.resolve().then((function(){r.dispatchEvent(new s("waiting",{sw:e,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(t){return Promise.reject(t)}},l.update=function(){try{return this.fn?h(this.fn.update()):void 0}catch(t){return Promise.reject(t)}},l.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},l.messageSW=function(e){try{return c(this.getSW(),(function(n){return t(n,e)}))}catch(t){return Promise.reject(t)}},l.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&t(this.fn.waiting,f)},l.pn=function(){var t=navigator.serviceWorker.controller;return t&&i(t.scriptURL,this.sn.toString())?t:void 0},l.bn=function(){try{var t=this;return function(t,e){try{var n=t()}catch(t){return e(t)}return n&&n.then?n.then(void 0,e):n}((function(){return c(navigator.serviceWorker.register(t.sn,t.nn),(function(e){return t.un=performance.now(),e}))}),(function(t){throw t}))}catch(t){return Promise.reject(t)}},(u=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(a.prototype,u),a}(function(){function t(){this.Pn=new Map}var e=t.prototype;return e.addEventListener=function(t,e){this.Sn(t).add(e)},e.removeEventListener=function(t,e){this.Sn(t).delete(e)},e.dispatchEvent=function(t){t.target=this;for(var e,n=r(this.Sn(t.type));!(e=n()).done;)(0,e.value)(t)},e.Sn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},t}()),d=void 0;function v(t,e){if(void 0!==d)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(t," will not be registered.")),d;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new p(t,e);return d=n.register().then((function(){return n.controlling.then((function(){return n}))}))}function y(){return null!=d?d:Promise.resolve(void 0)}var g="x-omrs-offline-response-body",m="x-omrs-offline-response-status",b="x-omrs-offline-caching-strategy",w=a(602),S=a.n(w);function x(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function E(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){x(i,r,o,a,u,"next",t)}function u(t){x(i,r,o,a,u,"throw",t)}a(void 0)}))}}function O(t){return j.apply(this,arguments)}function j(){return(j=E(S().mark((function t(e){var n;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y();case 2:if(!(n=t.sent)){t.next=9;break}return t.next=6,n.messageSW(e);case 6:t.t0=t.sent,t.next=10;break;case 9:t.t0={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."};case 10:return t.abrupt("return",t.t0);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function C(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){A(i,r,o,a,u,"next",t)}function u(t){A(i,r,o,a,u,"throw",t)}a(void 0)}))}}function P(){return k.apply(this,arguments)}function k(){return(k=C(S().mark((function t(){var e;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=window.sessionStorage,t.prev=1,e.setItem("someKeyHere","test"),e.removeItem("someKeyHere"),t.next=10;break;case 6:if(t.prev=6,t.t0=t.catch(1),t.t0.code!==DOMException.QUOTA_EXCEEDED_ERR||0!==e.length){t.next=10;break}return t.abrupt("return",!0);case 10:return t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function T(){return I.apply(this,arguments)}function I(){return(I=C(S().mark((function t(){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!window.indexedDB);case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function R(){return L.apply(this,arguments)}function L(){return L=C(S().mark((function t(){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){var e=indexedDB.open("test");e.onerror=function(){return t(!0)},e.onsuccess=function(){return t(!1)}})));case 1:case"end":return t.stop()}}),t)}))),L.apply(this,arguments)}function D(){return M.apply(this,arguments)}function M(){return(M=C(S().mark((function t(){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,R();case 2:if(t.t1=t.sent,t.t1){t.next=7;break}return t.next=6,T();case 6:t.t1=t.sent;case 7:if(t.t0=t.t1,t.t0){t.next=12;break}return t.next=11,P();case 11:t.t0=t.sent;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var N="openmrs3:offline-mode",$="unavailable";function B(){return{current:$,notAvailable:"unavailable"===$,active:"on"===$}}function U(t){"unavailable"!==$&&"unavailable"!==t&&(localStorage.setItem(N,"on"===t?"active":"disabled"),$=t)}function F(){return K.apply(this,arguments)}function K(){return(K=C(S().mark((function t(){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,D();case 2:t.sent||($="active"===localStorage.getItem(N)?"on":"off"),navigator.onLine;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}const H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,V=Object.keys,z=Array.isArray;function G(t,e){return"object"!=typeof e||V(e).forEach((function(n){t[n]=e[n]})),t}"undefined"==typeof Promise||H.Promise||(H.Promise=Promise);const q=Object.getPrototypeOf,W={}.hasOwnProperty;function Z(t,e){return W.call(t,e)}function Y(t,e){"function"==typeof e&&(e=e(q(t))),("undefined"==typeof Reflect?V:Reflect.ownKeys)(e).forEach((n=>{X(t,n,e[n])}))}const J=Object.defineProperty;function X(t,e,n,r){J(t,e,G(n&&Z(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Q(t){return{from:function(e){return t.prototype=Object.create(e.prototype),X(t.prototype,"constructor",t),{extend:Y.bind(null,t.prototype)}}}}const tt=Object.getOwnPropertyDescriptor;function et(t,e){let n;return tt(t,e)||(n=q(t))&&et(n,e)}const nt=[].slice;function rt(t,e,n){return nt.call(t,e,n)}function ot(t,e){return e(t)}function it(t){if(!t)throw new Error("Assertion Failed")}function at(t){H.setImmediate?setImmediate(t):setTimeout(t,0)}function ut(t,e){return t.reduce(((t,n,r)=>{var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})}function st(t,e){if(Z(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=st(t,e[r]);n.push(i)}return n}var a=e.indexOf(".");if(-1!==a){var u=t[e.substr(0,a)];return void 0===u?void 0:st(u,e.substr(a+1))}}function ct(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){it("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)ct(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var a=e.substr(0,i),u=e.substr(i+1);if(""===u)void 0===n?z(t)&&!isNaN(parseInt(a))?t.splice(a,1):delete t[a]:t[a]=n;else{var s=t[a];s||(s=t[a]={}),ct(s,u,n)}}else void 0===n?z(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}function lt(t){var e={};for(var n in t)Z(t,n)&&(e[n]=t[n]);return e}const ft=[].concat;function ht(t){return ft.apply([],t)}const pt="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ht([8,16,32,64].map((t=>["Int","Uint","Float"].map((e=>e+t+"Array")))))).filter((t=>H[t])),dt=pt.map((t=>H[t]));ut(pt,(t=>[t,!0]));let vt=null;function yt(t){vt="undefined"!=typeof WeakMap&&new WeakMap;const e=gt(t);return vt=null,e}function gt(t){if(!t||"object"!=typeof t)return t;let e=vt&&vt.get(t);if(e)return e;if(z(t)){e=[],vt&&vt.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(gt(t[n]))}else if(dt.indexOf(t.constructor)>=0)e=t;else{const n=q(t);for(var o in e=n===Object.prototype?{}:Object.create(n),vt&&vt.set(t,e),t)Z(t,o)&&(e[o]=gt(t[o]))}return e}const{toString:mt}={};function bt(t){return mt.call(t).slice(8,-1)}const wt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_t="symbol"==typeof wt?function(t){var e;return null!=t&&(e=t[wt])&&e.apply(t)}:function(){return null},St={};function xt(t){var e,n,r,o;if(1===arguments.length){if(z(t))return t.slice();if(this===St&&"string"==typeof t)return[t];if(o=_t(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n}const Et="undefined"!=typeof Symbol?t=>"AsyncFunction"===t[Symbol.toStringTag]:()=>!1;var Ot="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function jt(t,e){Ot=t,At=e}var At=()=>!0;const Ct=!new Error("").stack;function Pt(){if(Ct)try{throw Pt.arguments,new Error}catch(t){return t}return new Error}function kt(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\n").length),n.split("\n").slice(e).filter(At).map((t=>"\n"+t)).join("")):""}var Tt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],It=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Tt),Rt={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 Lt(t,e){this._e=Pt(),this.name=t,this.message=e}function Dt(t,e){return t+". Errors: "+Object.keys(e).map((t=>e[t].toString())).filter(((t,e,n)=>n.indexOf(t)===e)).join("\n")}function Mt(t,e,n,r){this._e=Pt(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=Dt(t,e)}function Nt(t,e){this._e=Pt(),this.name="BulkError",this.failures=Object.keys(e).map((t=>e[t])),this.failuresByPos=e,this.message=Dt(t,e)}Q(Lt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+kt(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Q(Mt).from(Lt),Q(Nt).from(Lt);var $t=It.reduce(((t,e)=>(t[e]=e+"Error",t)),{});const Bt=Lt;var Ut=It.reduce(((t,e)=>{var n=e+"Error";function r(t,r){this._e=Pt(),this.name=n,t?"string"==typeof t?(this.message=`${t}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof t&&(this.message=`${t.name} ${t.message}`,this.inner=t):(this.message=Rt[e]||n,this.inner=null)}return Q(r).from(Bt),t[e]=r,t}),{});Ut.Syntax=SyntaxError,Ut.Type=TypeError,Ut.Range=RangeError;var Ft=Tt.reduce(((t,e)=>(t[e+"Error"]=Ut[e],t)),{}),Kt=It.reduce(((t,e)=>(-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=Ut[e]),t)),{});function Ht(){}function Vt(t){return t}function zt(t,e){return null==t||t===Vt?e:function(n){return e(t(n))}}function Gt(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function qt(t,e){return t===Ht?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Gt(r,this.onsuccess):r),o&&(this.onerror=this.onerror?Gt(o,this.onerror):o),void 0!==i?i:n}}function Wt(t,e){return t===Ht?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Gt(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Gt(r,this.onerror):r)}}function Zt(t,e){return t===Ht?e:function(n){var r=t.apply(this,arguments);G(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Gt(o,this.onsuccess):o),i&&(this.onerror=this.onerror?Gt(i,this.onerror):i),void 0===r?void 0===a?void 0:a:G(r,a)}}function Yt(t,e){return t===Ht?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}}function Jt(t,e){return t===Ht?e:function(){var n=t.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 e.apply(r,i)}))}return e.apply(this,arguments)}}Kt.ModifyError=Mt,Kt.DexieError=Lt,Kt.BulkError=Nt;var Xt={};const[Qt,te,ee]="undefined"==typeof Promise?[]:(()=>{let t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,q(t),t];const e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,q(e),t]})(),ne=te&&te.then,re=Qt&&Qt.constructor,oe=!!ee;var ie=!1,ae=ee?()=>{ee.then(Pe)}:H.setImmediate?setImmediate.bind(null,Pe):H.MutationObserver?()=>{var t=document.createElement("div");new MutationObserver((()=>{Pe(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:()=>{setTimeout(Pe,0)},ue=function(t,e){ye.push([t,e]),ce&&(ae(),ce=!1)},se=!0,ce=!0,le=[],fe=[],he=null,pe=Vt,de={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Qe,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((t=>{try{Qe(t[0],t[1])}catch(t){}}))}},ve=de,ye=[],ge=0,me=[];function be(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Ht,this._lib=!1;var e=this._PSD=ve;if(Ot&&(this._stackHolder=Pt(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==Xt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&xe(this,this._value))}this._state=null,this._value=null,++e.ref,Se(this,t)}const we={get:function(){var t=ve,e=Be;function n(n,r){var o=!t.global&&(t!==ve||e!==Be);const i=o&&!He();var a=new be(((e,a)=>{Oe(this,new _e(Je(n,t,o,i),Je(r,t,o,i),e,a,t))}));return Ot&&Ce(a,this),a}return n.prototype=Xt,n},set:function(t){X(this,"then",t&&t.prototype===Xt?we:{get:function(){return t},set:we.set})}};function _e(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o}function Se(t,e){try{e((e=>{if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&ke();e&&"function"==typeof e.then?Se(t,((t,n)=>{e instanceof be?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,Ee(t)),n&&Te()}}),xe.bind(null,t))}catch(e){xe(t,e)}}function xe(t,e){if(fe.push(e),null===t._state){var n=t._lib&&ke();e=pe(e),t._state=!1,t._value=e,Ot&&null!==e&&"object"==typeof e&&!e._promise&&function(t,e,n){try{t.apply(null,void 0)}catch(t){}}((()=>{var n=et(e,"stack");e._promise=t,X(e,"stack",{get:()=>ie?n&&(n.get?n.get.apply(e):n.value):t.stack})})),function(t){le.some((e=>e._value===t._value))||le.push(t)}(t),Ee(t),n&&Te()}}function Ee(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)Oe(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===ge&&(++ge,ue((()=>{0==--ge&&Ie()}),[]))}function Oe(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++ge,ue(je,[n,t,e])}else t._listeners.push(e)}function je(t,e,n){try{he=e;var r,o=e._value;e._state?r=t(o):(fe.length&&(fe=[]),r=t(o),-1===fe.indexOf(o)&&function(t){for(var e=le.length;e;)if(le[--e]._value===t._value)return void le.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{he=null,0==--ge&&Ie(),--n.psd.ref||n.psd.finalize()}}function Ae(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,a=t._value;null!=a?(o=a.name||"Error",i=a.message||a,r=kt(a,0)):(o=a,i=""),e.push(o+(i?": "+i:"")+r)}return Ot&&((r=kt(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&Ae(t._prev,e,n)),e}function Ce(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)}function Pe(){ke()&&Te()}function ke(){var t=se;return se=!1,ce=!1,t}function Te(){var t,e,n;do{for(;ye.length>0;)for(t=ye,ye=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(ye.length>0);se=!0,ce=!0}function Ie(){var t=le;le=[],t.forEach((t=>{t._PSD.onunhandled.call(null,t._value,t)}));for(var e=me.slice(0),n=e.length;n;)e[--n]()}function Re(t){return new be(Xt,!1,t)}function Le(t,e){var n=ve;return function(){var r=ke(),o=ve;try{return qe(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{qe(o,!1),r&&Te()}}}Y(be.prototype,{then:we,_then:function(t,e){Oe(this,new _e(null,null,t,e,ve))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(t=>t instanceof e?n(t):Re(t))):this.then(null,(t=>t&&t.name===e?n(t):Re(t)))},finally:function(t){return this.then((e=>(t(),e)),(e=>(t(),Re(e))))},stack:{get:function(){if(this._stack)return this._stack;try{ie=!0;var t=Ae(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{ie=!1}}},timeout:function(t,e){return t<1/0?new be(((n,r)=>{var o=setTimeout((()=>r(new Ut.Timeout(e))),t);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&X(be.prototype,Symbol.toStringTag,"Dexie.Promise"),de.env=We(),Y(be,{all:function(){var t=xt.apply(null,arguments).map(Ve);return new be((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach(((o,i)=>be.resolve(o).then((n=>{t[i]=n,--r||e(t)}),n)))}))},resolve:t=>{if(t instanceof be)return t;if(t&&"function"==typeof t.then)return new be(((e,n)=>{t.then(e,n)}));var e=new be(Xt,!0,t);return Ce(e,he),e},reject:Re,race:function(){var t=xt.apply(null,arguments).map(Ve);return new be(((e,n)=>{t.map((t=>be.resolve(t).then(e,n)))}))},PSD:{get:()=>ve,set:t=>ve=t},totalEchoes:{get:()=>Be},newPSD:Fe,usePSD:Ze,scheduler:{get:()=>ue,set:t=>{ue=t}},rejectionMapper:{get:()=>pe,set:t=>{pe=t}},follow:(t,e)=>new be(((n,r)=>Fe(((e,n)=>{var r=ve;r.unhandleds=[],r.onunhandled=n,r.finalize=Gt((function(){!function(t){me.push((function e(){t(),me.splice(me.indexOf(e),1)})),++ge,ue((()=>{0==--ge&&Ie()}),[])}((()=>{0===this.unhandleds.length?e():n(this.unhandleds[0])}))}),r.finalize),t()}),e,n,r)))}),re&&(re.allSettled&&X(be,"allSettled",(function(){const t=xt.apply(null,arguments).map(Ve);return new be((e=>{0===t.length&&e([]);let n=t.length;const r=new Array(n);t.forEach(((t,o)=>be.resolve(t).then((t=>r[o]={status:"fulfilled",value:t}),(t=>r[o]={status:"rejected",reason:t})).then((()=>--n||e(r)))))}))})),re.any&&"undefined"!=typeof AggregateError&&X(be,"any",(function(){const t=xt.apply(null,arguments).map(Ve);return new be(((e,n)=>{0===t.length&&n(new AggregateError([]));let r=t.length;const o=new Array(r);t.forEach(((t,i)=>be.resolve(t).then((t=>e(t)),(t=>{o[i]=t,--r||n(new AggregateError(o))}))))}))})));const De={awaits:0,echoes:0,id:0};var Me=0,Ne=[],$e=0,Be=0,Ue=0;function Fe(t,e,n,r){var o=ve,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Ue;var a=de.env;i.env=oe?{Promise:be,PromiseProp:{value:be,configurable:!0,writable:!0},all:be.all,race:be.race,allSettled:be.allSettled,any:be.any,resolve:be.resolve,reject:be.reject,nthen:Xe(a.nthen,i),gthen:Xe(a.gthen,i)}:{},e&&G(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=Ze(i,t,n,r);return 0===i.ref&&i.finalize(),u}function Ke(){return De.id||(De.id=++Me),++De.awaits,De.echoes+=100,De.id}function He(){return!!De.awaits&&(0==--De.awaits&&(De.id=0),De.echoes=100*De.awaits,!0)}function Ve(t){return De.echoes&&t&&t.constructor===re?(Ke(),t.then((t=>(He(),t)),(t=>(He(),tn(t))))):t}function ze(t){++Be,De.echoes&&0!=--De.echoes||(De.echoes=De.id=0),Ne.push(ve),qe(t,!0)}function Ge(){var t=Ne[Ne.length-1];Ne.pop(),qe(t,!1)}function qe(t,e){var n=ve;if((e?!De.echoes||$e++&&t===ve:!$e||--$e&&t===ve)||Ye(e?ze.bind(null,t):Ge),t!==ve&&(ve=t,n===de&&(de.env=We()),oe)){var r=de.env.Promise,o=t.env;te.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(H,"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 We(){var t=H.Promise;return oe?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(H,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:te.then,gthen:t.prototype.then}:{}}function Ze(t,e,n,r,o){var i=ve;try{return qe(t,!0),e(n,r,o)}finally{qe(i,!1)}}function Ye(t){ne.call(Qt,t)}function Je(t,e,n,r){return"function"!=typeof t?t:function(){var o=ve;n&&Ke(),qe(e,!0);try{return t.apply(this,arguments)}finally{qe(o,!1),r&&Ye(He)}}}function Xe(t,e){return function(n,r){return t.call(this,Je(n,e),Je(r,e))}}function Qe(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(H.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),G(r,o)):H.CustomEvent&&G(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&H.dispatchEvent&&(dispatchEvent(r),!H.PromiseRejectionEvent&&H.onunhandledrejection))try{H.onunhandledrejection(r)}catch(t){}Ot&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${t.stack||t}`)}catch(t){}}-1===(""+ne).indexOf("[native code]")&&(Ke=He=Ht);var tn=be.reject;function en(t,e,n,r){if(t.idbdb&&(t._state.openComplete||ve.letThrough||t._vip)){var o=t._createTransaction(e,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===$t.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((()=>en(t,e,n,r)))):tn(o)}return o._promise(e,((t,e)=>Fe((()=>(ve.trans=o,r(t,e,o)))))).then((t=>o._completion.then((()=>t))))}if(t._state.openComplete)return tn(new Ut.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return tn(new Ut.DatabaseClosed);t.open().catch(Ht)}return t._state.dbReadyPromise.then((()=>en(t,e,n,r)))}const nn=String.fromCharCode(65535),rn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",on=[],an="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),un=an,sn=an,cn=t=>!/(dexie\.js|dexie\.min\.js)/.test(t);function ln(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e}const fn={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function hn(t){return"string"!=typeof t||/\./.test(t)?t=>t:e=>(void 0===e[t]&&t in e&&delete(e=yt(e))[t],e)}class pn{_trans(t,e,n){const r=this._tx||ve.trans,o=this.name;function i(t,n,r){if(!r.schema[o])throw new Ut.NotFound("Table "+o+" not part of transaction");return e(r.idbtrans,r)}const a=ke();try{return r&&r.db===this.db?r===ve.trans?r._promise(t,i,n):Fe((()=>r._promise(t,i,n)),{trans:r,transless:ve.transless||ve}):en(this.db,t,[this.name],i)}finally{a&&Te()}}get(t,e){return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(e=>this.core.get({trans:e,key:t}).then((t=>this.hook.reading.fire(t))))).then(e)}where(t){if("string"==typeof t)return new this.db.WhereClause(this,t);if(z(t))return new this.db.WhereClause(this,`[${t.join("+")}]`);const e=V(t);if(1===e.length)return this.where(e[0]).equals(t[e[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((t=>t.compound&&e.every((e=>t.keyPath.indexOf(e)>=0))&&t.keyPath.every((t=>e.indexOf(t)>=0))))[0];if(n&&this.db._maxKey!==nn)return this.where(n.name).equals(n.keyPath.map((e=>t[e])));!n&&Ot&&console.warn(`The query ${JSON.stringify(t)} on ${this.name} would benefit of a compound index [${e.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(t,e){try{return 0===o.cmp(t,e)}catch(t){return!1}}const[a,u]=e.reduce((([e,n],o)=>{const a=r[o],u=t[o];return[e||a,e||!a?ln(n,a&&a.multi?t=>{const e=st(t,o);return z(e)&&e.some((t=>i(u,t)))}:t=>i(u,st(t,o))):n]}),[null,null]);return a?this.where(a.name).equals(t[a.keyPath]).filter(u):n?this.filter(u):this.where(e).equals("")}filter(t){return this.toCollection().and(t)}count(t){return this.toCollection().count(t)}offset(t){return this.toCollection().offset(t)}limit(t){return this.toCollection().limit(t)}each(t){return this.toCollection().each(t)}toArray(t){return this.toCollection().toArray(t)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(t){return new this.db.Collection(new this.db.WhereClause(this,z(t)?`[${t.join("+")}]`:t))}reverse(){return this.toCollection().reverse()}mapToClass(t){this.schema.mappedClass=t;const e=e=>{if(!e)return e;const n=Object.create(t.prototype);for(var r in e)if(Z(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t}defineClass(){return this.mapToClass((function(t){G(this,t)}))}add(t,e){const{auto:n,keyPath:r}=this.schema.primKey;let o=t;return r&&n&&(o=hn(r)(t)),this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[o]}))).then((t=>t.numFailures?be.reject(t.failures[0]):t.lastResult)).then((e=>{if(r)try{ct(t,r,e)}catch(t){}return e}))}update(t,e){if("object"!=typeof t||z(t))return this.where(":id").equals(t).modify(e);{const n=st(t,this.schema.primKey.keyPath);if(void 0===n)return tn(new Ut.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof e?V(e).forEach((n=>{ct(t,n,e[n])})):e(t,{value:t,primKey:n})}catch(t){}return this.where(":id").equals(n).modify(e)}}put(t,e){const{auto:n,keyPath:r}=this.schema.primKey;let o=t;return r&&n&&(o=hn(r)(t)),this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"put",values:[o],keys:null!=e?[e]:null}))).then((t=>t.numFailures?be.reject(t.failures[0]):t.lastResult)).then((e=>{if(r)try{ct(t,r,e)}catch(t){}return e}))}delete(t){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"delete",keys:[t]}))).then((t=>t.numFailures?be.reject(t.failures[0]):void 0))}clear(){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"deleteRange",range:fn}))).then((t=>t.numFailures?be.reject(t.failures[0]):void 0))}bulkGet(t){return this._trans("readonly",(e=>this.core.getMany({keys:t,trans:e}).then((t=>t.map((t=>this.hook.reading.fire(t)))))))}bulkAdd(t,e,n){const r=Array.isArray(e)?e:void 0,o=(n=n||(r?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(e=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Ut.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==t.length)throw new Ut.InvalidArgument("Arguments objects and keys must have the same length");const a=t.length;let u=i&&n?t.map(hn(i)):t;return this.core.mutate({trans:e,type:"add",keys:r,values:u,wantResults:o}).then((({numFailures:t,results:e,lastResult:n,failures:r})=>{if(0===t)return o?e:n;throw new Nt(`${this.name}.bulkAdd(): ${t} of ${a} operations failed`,r)}))}))}bulkPut(t,e,n){const r=Array.isArray(e)?e:void 0,o=(n=n||(r?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(e=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Ut.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==t.length)throw new Ut.InvalidArgument("Arguments objects and keys must have the same length");const a=t.length;let u=i&&n?t.map(hn(i)):t;return this.core.mutate({trans:e,type:"put",keys:r,values:u,wantResults:o}).then((({numFailures:t,results:e,lastResult:n,failures:r})=>{if(0===t)return o?e:n;throw new Nt(`${this.name}.bulkPut(): ${t} of ${a} operations failed`,r)}))}))}bulkDelete(t){const e=t.length;return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"delete",keys:t}))).then((({numFailures:t,lastResult:n,failures:r})=>{if(0===t)return n;throw new Nt(`${this.name}.bulkDelete(): ${t} of ${e} operations failed`,r)}))}}function dn(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return a(t);r||(r=Yt),o||(o=Ht);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function a(t){V(t).forEach((function(e){var n=t[e];if(z(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new Ut.InvalidArgument("Invalid event config");var r=i(e,Vt,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){at((function(){t.apply(null,e)}))}))}))}}))}}function vn(t,e){return Q(e).from({prototype:t}),e}function yn(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)}function gn(t,e){t.filter=ln(t.filter,e)}function mn(t,e,n){var r=t.replayFilter;t.replayFilter=r?()=>ln(r(),e()):e,t.justLimit=n&&!r}function bn(t,e){if(t.isPrimKey)return e.primaryKey;const n=e.getIndexByKeyPath(t.index);if(!n)throw new Ut.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n}function wn(t,e,n){const r=bn(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})}function _n(t,e,n,r){const o=t.replayFilter?ln(t.filter,t.replayFilter()):t.filter;if(t.or){const i={},a=(t,n,r)=>{if(!o||o(n,r,(t=>n.stop(t)),(t=>n.fail(t)))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),Z(i,u)||(i[u]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(a,n),Sn(wn(t,r,n),t.algorithm,a,!t.keysOnly&&t.valueMapper)])}return Sn(wn(t,r,n),ln(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)}function Sn(t,e,n,r){var o=Le(r?(t,e,o)=>n(r(t),e,o):n);return t.then((t=>{if(t)return t.start((()=>{var n=()=>t.continue();e&&!e(t,(t=>n=t),(e=>{t.stop(e),n=Ht}),(e=>{t.fail(e),n=Ht}))||o(t.value,t,(t=>n=t)),n()}))}))}function xn(t,e){try{const n=En(t),r=En(e);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 t>e?1:t<e?-1:0;case"binary":return function(t,e){const n=t.length,r=e.length,o=n<r?n:r;for(let n=0;n<o;++n)if(t[n]!==e[n])return t[n]<e[n]?-1:1;return n===r?0:n<r?-1:1}(On(t),On(e));case"Array":return function(t,e){const n=t.length,r=e.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=xn(t[n],e[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(t,e)}}catch(t){}return NaN}function En(t){const e=typeof t;if("object"!==e)return e;if(ArrayBuffer.isView(t))return"binary";const n=bt(t);return"ArrayBuffer"===n?"binary":n}function On(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)}class jn{_read(t,e){var n=this._ctx;return n.error?n.table._trans(null,tn.bind(null,n.error)):n.table._trans("readonly",t).then(e)}_write(t){var e=this._ctx;return e.error?e.table._trans(null,tn.bind(null,e.error)):e.table._trans("readwrite",t,"locked")}_addAlgorithm(t){var e=this._ctx;e.algorithm=ln(e.algorithm,t)}_iterate(t,e){return _n(this._ctx,t,e,this._ctx.table.core)}clone(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&G(n,t),e._ctx=n,e}raw(){return this._ctx.valueMapper=null,this}each(t){var e=this._ctx;return this._read((n=>_n(e,t,n,e.table.core)))}count(t){return this._read((t=>{const e=this._ctx,n=e.table.core;if(yn(e,!0))return n.count({trans:t,query:{index:bn(e,n.schema),range:e.range}}).then((t=>Math.min(t,e.limit)));var r=0;return _n(e,(()=>(++r,!1)),t,n).then((()=>r))})).then(t)}sortBy(t,e){const n=t.split(".").reverse(),r=n[0],o=n.length-1;function i(t,e){return e?i(t[n[e]],e-1):t[r]}var a="next"===this._ctx.dir?1:-1;function u(t,e){var n=i(t,o),r=i(e,o);return n<r?-a:n>r?a:0}return this.toArray((function(t){return t.sort(u)})).then(e)}toArray(t){return this._read((t=>{var e=this._ctx;if("next"===e.dir&&yn(e,!0)&&e.limit>0){const{valueMapper:n}=e,r=bn(e,e.table.core.schema);return e.table.core.query({trans:t,limit:e.limit,values:!0,query:{index:r,range:e.range}}).then((({result:t})=>n?t.map(n):t))}{const n=[];return _n(e,(t=>n.push(t)),t,e.table.core).then((()=>n))}}),t)}offset(t){var e=this._ctx;return t<=0||(e.offset+=t,yn(e)?mn(e,(()=>{var e=t;return(t,n)=>0===e||(1===e?(--e,!1):(n((()=>{t.advance(e),e=0})),!1))})):mn(e,(()=>{var e=t;return()=>--e<0}))),this}limit(t){return this._ctx.limit=Math.min(this._ctx.limit,t),mn(this._ctx,(()=>{var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this}until(t,e){return gn(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this}first(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)}last(t){return this.reverse().first(t)}filter(t){var e,n;return gn(this._ctx,(function(e){return t(e.value)})),e=this._ctx,n=t,e.isMatch=ln(e.isMatch,n),this}and(t){return this.filter(t)}or(t){return new this.db.WhereClause(this._ctx.table,t,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(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))}eachUniqueKey(t){return this._ctx.unique="unique",this.eachKey(t)}eachPrimaryKey(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))}keys(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)}primaryKeys(t){var e=this._ctx;if("next"===e.dir&&yn(e,!0)&&e.limit>0)return this._read((t=>{var n=bn(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((({result:t})=>t)).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)}uniqueKeys(t){return this._ctx.unique="unique",this.keys(t)}firstKey(t){return this.limit(1).keys((function(t){return t[0]})).then(t)}lastKey(t){return this.reverse().firstKey(t)}distinct(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return gn(this._ctx,(function(t){var e=t.primaryKey.toString(),r=Z(n,e);return n[e]=!0,!r})),this}modify(t){var e=this._ctx;return this._write((n=>{var r;if("function"==typeof t)r=t;else{var o=V(t),i=o.length;r=function(e){for(var n=!1,r=0;r<i;++r){var a=o[r],u=t[a];st(e,a)!==u&&(ct(e,a,u),n=!0)}return n}}const a=e.table.core,{outbound:u,extractKey:s}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const h=[],p=(t,e)=>{const{failures:n,numFailures:r}=e;f+=t-r;for(let t of V(n))l.push(n[t])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((h=>{const d=[],v=[],y=u?[]:null,g=[];for(let t=0;t<f;++t){const e=h[t],n={value:yt(e),primKey:o[l+t]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[l+t]):u||0===xn(s(e),s(n.value))?(v.push(n.value),u&&y.push(o[l+t])):(g.push(o[l+t]),d.push(n.value)))}const m=yn(e)&&e.limit===1/0&&("function"!=typeof t||t===An)&&{index:e.index,range:e.range};return Promise.resolve(d.length>0&&a.mutate({trans:n,type:"add",values:d}).then((t=>{for(let e in t.failures)g.splice(parseInt(e),1);p(d.length,t)}))).then((()=>(v.length>0||m&&"object"==typeof t)&&a.mutate({trans:n,type:"put",keys:y,values:v,criteria:m,changeSpec:"function"!=typeof t&&t}).then((t=>p(v.length,t))))).then((()=>(g.length>0||m&&t===An)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((t=>p(g.length,t))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new Mt("Error modifying one or more objects",l,f,h);return o.length}))}))}))}delete(){var t=this._ctx,e=t.range;return yn(t)&&(t.isPrimKey&&!sn||3===e.type)?this._write((n=>{const{primaryKey:r}=t.table.core.schema,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((e=>t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:t,lastResult:n,results:r,numFailures:o})=>{if(o)throw new Mt("Could not delete some values",Object.keys(t).map((e=>t[e])),e-o);return e-o}))))})):this.modify(An)}}const An=(t,e)=>e.value=null;function Cn(t,e){return t<e?-1:t===e?0:1}function Pn(t,e){return t>e?-1:t===e?0:1}function kn(t,e,n){var r=t instanceof Mn?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r}function Tn(t){return new t.Collection(t,(()=>Dn(""))).limit(0)}function In(t,e,n,r,o,i){for(var a=Math.min(t.length,r.length),u=-1,s=0;s<a;++s){var c=e[s];if(c!==r[s])return o(t[s],n[s])<0?t.substr(0,s)+n[s]+n.substr(s+1):o(t[s],r[s])<0?t.substr(0,s)+r[s]+n.substr(s+1):u>=0?t.substr(0,u)+e[u]+n.substr(u+1):null;o(t[s],c)<0&&(u=s)}return a<r.length&&"next"===i?t+n.substr(t.length):a<t.length&&"prev"===i?t.substr(0,n.length):u<0?null:t.substr(0,u)+r[u]+n.substr(u+1)}function Rn(t,e,n,r){var o,i,a,u,s,c,l,f=n.length;if(!n.every((t=>"string"==typeof t)))return kn(t,"String expected.");function h(t){o=function(t){return"next"===t?t=>t.toUpperCase():t=>t.toLowerCase()}(t),i=function(t){return"next"===t?t=>t.toLowerCase():t=>t.toUpperCase()}(t),a="next"===t?Cn:Pn;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return a(t.lower,e.lower)}));u=e.map((function(t){return t.upper})),s=e.map((function(t){return t.lower})),c=t,l="next"===t?"":r}h("next");var p=new t.Collection(t,(()=>Ln(u[0],s[f-1]+r)));p._ondirectionchange=function(t){h(t)};var d=0;return p._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var h=i(o);if(e(h,s,d))return!0;for(var p=null,v=d;v<f;++v){var y=In(o,h,u[v],s[v],a,c);null===y&&null===p?d=v+1:(null===p||a(p,y)>0)&&(p=y)}return n(null!==p?function(){t.continue(p+l)}:r),!1})),p}function Ln(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}}function Dn(t){return{type:1,lower:t,upper:t}}class Mn{get Collection(){return this._ctx.table.db.Collection}between(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?Tn(this):new this.Collection(this,(()=>Ln(t,e,!n,!r)))}catch(t){return kn(this,rn)}}equals(t){return null==t?kn(this,rn):new this.Collection(this,(()=>Dn(t)))}above(t){return null==t?kn(this,rn):new this.Collection(this,(()=>Ln(t,void 0,!0)))}aboveOrEqual(t){return null==t?kn(this,rn):new this.Collection(this,(()=>Ln(t,void 0,!1)))}below(t){return null==t?kn(this,rn):new this.Collection(this,(()=>Ln(void 0,t,!1,!0)))}belowOrEqual(t){return null==t?kn(this,rn):new this.Collection(this,(()=>Ln(void 0,t)))}startsWith(t){return"string"!=typeof t?kn(this,"String expected."):this.between(t,t+nn,!0,!0)}startsWithIgnoreCase(t){return""===t?this.startsWith(t):Rn(this,((t,e)=>0===t.indexOf(e[0])),[t],nn)}equalsIgnoreCase(t){return Rn(this,((t,e)=>t===e[0]),[t],"")}anyOfIgnoreCase(){var t=xt.apply(St,arguments);return 0===t.length?Tn(this):Rn(this,((t,e)=>-1!==e.indexOf(t)),t,"")}startsWithAnyOfIgnoreCase(){var t=xt.apply(St,arguments);return 0===t.length?Tn(this):Rn(this,((t,e)=>e.some((e=>0===t.indexOf(e)))),t,nn)}anyOf(){const t=xt.apply(St,arguments);let e=this._cmp;try{t.sort(e)}catch(t){return kn(this,rn)}if(0===t.length)return Tn(this);const n=new this.Collection(this,(()=>Ln(t[0],t[t.length-1])));n._ondirectionchange=n=>{e="next"===n?this._ascending:this._descending,t.sort(e)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;e(a,t[r])>0;)if(++r,r===t.length)return o(i),!1;return 0===e(a,t[r])||(o((()=>{n.continue(t[r])})),!1)})),n}notEqual(t){return this.inAnyRange([[-1/0,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const t=xt.apply(St,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return kn(this,rn)}const e=t.reduce(((t,e)=>t?t.concat([[t[t.length-1][1],e]]):[[-1/0,e]]),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})}inAnyRange(t,e){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===t.length)return Tn(this);if(!t.every((t=>void 0!==t[0]&&void 0!==t[1]&&r(t[0],t[1])<=0)))return kn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Ut.InvalidArgument);const u=!e||!1!==e.includeLowers,s=e&&!0===e.includeUppers;let c,l=r;function f(t,e){return l(t[0],e[0])}try{c=t.reduce((function(t,e){let r=0,o=t.length;for(;r<o;++r){const o=t[r];if(n(e[0],o[1])<0&&n(e[1],o[0])>0){o[0]=i(o[0],e[0]),o[1]=a(o[1],e[1]);break}}return r===o&&t.push(e),t}),[]),c.sort(f)}catch(t){return kn(this,rn)}let h=0;const p=s?t=>r(t,c[h][1])>0:t=>r(t,c[h][1])>=0,d=u?t=>o(t,c[h][0])>0:t=>o(t,c[h][0])>=0;let v=p;const y=new this.Collection(this,(()=>Ln(c[0][0],c[c.length-1][1],!u,!s)));return y._ondirectionchange=t=>{"next"===t?(v=p,l=r):(v=d,l=o),c.sort(f)},y._addAlgorithm(((t,e,n)=>{for(var o=t.key;v(o);)if(++h,h===c.length)return e(n),!1;return!!function(t){return!p(t)&&!d(t)}(o)||(0===this._cmp(o,c[h][1])||0===this._cmp(o,c[h][0])||e((()=>{l===r?t.continue(c[h][0]):t.continue(c[h][1])})),!1)})),y}startsWithAnyOf(){const t=xt.apply(St,arguments);return t.every((t=>"string"==typeof t))?0===t.length?Tn(this):this.inAnyRange(t.map((t=>[t,t+nn]))):kn(this,"startsWithAnyOf() only works with strings")}}function Nn(t){return Le((function(e){return $n(e),t(e.target.error),!1}))}function $n(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()}const Bn=dn(null,"storagemutated");class Un{_lock(){return it(!ve.global),++this._reculock,1!==this._reculock||ve.global||(ve.lockOwnerFor=this),this}_unlock(){if(it(!ve.global),0==--this._reculock)for(ve.global||(ve.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{Ze(t[1],t[0])}catch(t){}}return this}_locked(){return this._reculock&&ve.lockOwnerFor!==this}create(t){if(!this.mode)return this;const e=this.db.idbdb,n=this.db._state.dbOpenError;if(it(!this.idbtrans),!t&&!e)switch(n&&n.name){case"DatabaseClosedError":throw new Ut.DatabaseClosed(n);case"MissingAPIError":throw new Ut.MissingAPI(n.message,n);default:throw new Ut.OpenFailed(n)}if(!this.active)throw new Ut.TransactionInactive;return it(null===this._completion._state),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):e.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Le((e=>{$n(e),this._reject(t.error)})),t.onabort=Le((e=>{$n(e),this.active&&this._reject(new Ut.Abort(t.error)),this.active=!1,this.on("abort").fire(e)})),t.oncomplete=Le((()=>{this.active=!1,this._resolve(),"mutatedParts"in t&&Bn.storagemutated.fire(t.mutatedParts)})),this}_promise(t,e,n){if("readwrite"===t&&"readwrite"!==this.mode)return tn(new Ut.ReadOnly("Transaction is readonly"));if(!this.active)return tn(new Ut.TransactionInactive);if(this._locked())return new be(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(t,e,n).then(r,o)},ve])}));if(n)return Fe((()=>{var t=new be(((t,n)=>{this._lock();const r=e(t,n,this);r&&r.then&&r.then(t,n)}));return t.finally((()=>this._unlock())),t._lib=!0,t}));var r=new be(((t,n)=>{var r=e(t,n,this);r&&r.then&&r.then(t,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(t){var e=this._root();const n=be.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((()=>n));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new be(((t,r)=>{n.then((n=>e._waitingQueue.push(Le(t.bind(null,n)))),(t=>e._waitingQueue.push(Le(r.bind(null,t))))).finally((()=>{e._waitingFor===o&&(e._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Ut.Abort))}table(t){const e=this._memoizedTables||(this._memoizedTables={});if(Z(e,t))return e[t];const n=this.schema[t];if(!n)throw new Ut.NotFound("Table "+t+" not part of transaction");const r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r}}function Fn(t,e,n,r,o,i,a){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+Kn(e)}}function Kn(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""}function Hn(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:ut(n,(t=>[t.name,t]))}}let Vn=t=>{try{return t.only([[]]),Vn=()=>[[]],[[]]}catch(t){return Vn=()=>nn,nn}};function zn(t){return null==t?()=>{}:"string"==typeof t?function(t){return 1===t.split(".").length?e=>e[t]:e=>st(e,t)}(t):e=>st(e,t)}function Gn(t){return[].slice.call(t)}let qn=0;function Wn(t){return null==t?":id":"string"==typeof t?t:`[${t.join("+")}]`}function Zn({_novip:t},e){const n=e.db,r=function(t,e,{IDBKeyRange:n,indexedDB:r},o){const i=function(t,e){return e.reduce(((t,{create:e})=>({...t,...e(t)})),t)}(function(t,e,n){function r(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=t;return void 0===n?void 0===r?null:e.upperBound(r,!!i):void 0===r?e.lowerBound(n,!!o):e.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(t,e){const n=Gn(t.objectStoreNames);return{schema:{name:t.name,tables:n.map((t=>e.objectStore(t))).map((t=>{const{keyPath:e,autoIncrement:n}=t,r=z(e),o=null==e,i={},a={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:zn(e)},indexes:Gn(t.indexNames).map((e=>t.index(e))).map((t=>{const{name:e,unique:n,multiEntry:r,keyPath:o}=t,a={name:e,compound:z(o),keyPath:o,unique:n,multiEntry:r,extractKey:zn(o)};return i[Wn(o)]=a,a})),getIndexByKeyPath:t=>i[Wn(t)]};return i[":id"]=a.primaryKey,null!=e&&(i[Wn(e)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in e.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(t,n),a=o.tables.map((t=>function(t){const e=t.name;return{name:e,schema:t,mutate:function({trans:t,type:n,keys:o,values:i,range:a}){return new Promise(((u,s)=>{u=Le(u);const c=t.objectStore(e),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:h}=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===h)return u({numFailures:0,failures:{},results:[],lastResult:void 0});let p;const d=[],v=[];let y=0;const g=t=>{++y,$n(t)};if("deleteRange"===n){if(4===a.type)return u({numFailures:y,failures:v,results:[],lastResult:void 0});3===a.type?d.push(p=c.clear()):d.push(p=c.delete(r(a)))}else{const[t,e]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<h;++r)d.push(p=e&&void 0!==e[r]?c[n](t[r],e[r]):c[n](t[r])),p.onerror=g;else for(let e=0;e<h;++e)d.push(p=c[n](t[e])),p.onerror=g}const m=t=>{const e=t.target.result;d.forEach(((t,e)=>null!=t.error&&(v[e]=t.error))),u({numFailures:y,failures:v,results:"delete"===n?o:d.map((t=>t.result)),lastResult:e})};p.onerror=t=>{g(t),m(t)},p.onsuccess=m}))},getMany:({trans:t,keys:n})=>new Promise(((r,o)=>{r=Le(r);const i=t.objectStore(e),a=n.length,u=new Array(a);let s,c=0,l=0;const f=t=>{const e=t.target;u[e._pos]=e.result,++l===c&&r(u)},h=Nn(o);for(let t=0;t<a;++t)null!=n[t]&&(s=i.get(n[t]),s._pos=t,s.onsuccess=f,s.onerror=h,++c);0===c&&r(u)})),get:({trans:t,key:n})=>new Promise(((r,o)=>{r=Le(r);const i=t.objectStore(e).get(n);i.onsuccess=t=>r(t.target.result),i.onerror=Nn(o)})),query:function(t){return n=>new Promise(((o,i)=>{o=Le(o);const{trans:a,values:u,limit:s,query:c}=n,l=s===1/0?void 0:s,{index:f,range:h}=c,p=a.objectStore(e),d=f.isPrimaryKey?p:p.index(f.name),v=r(h);if(0===s)return o({result:[]});if(t){const t=u?d.getAll(v,l):d.getAllKeys(v,l);t.onsuccess=t=>o({result:t.target.result}),t.onerror=Nn(i)}else{let t=0;const e=u||!("openKeyCursor"in d)?d.openCursor(v):d.openKeyCursor(v),n=[];e.onsuccess=r=>{const i=e.result;return i?(n.push(u?i.value:i.primaryKey),++t===s?o({result:n}):void i.continue()):o({result:n})},e.onerror=Nn(i)}}))}(i),openCursor:function({trans:t,values:n,query:o,reverse:i,unique:a}){return new Promise(((u,s)=>{u=Le(u);const{index:c,range:l}=o,f=t.objectStore(e),h=c.isPrimaryKey?f:f.index(c.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in h)?h.openCursor(r(l),p):h.openKeyCursor(r(l),p);d.onerror=Nn(s),d.onsuccess=Le((e=>{const n=d.result;if(!n)return void u(null);n.___id=++qn,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=t,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Le(s),n.next=function(){let t=1;return this.start((()=>t--?this.continue():this.stop())).then((()=>this))},n.start=t=>{const e=new Promise(((t,e)=>{t=Le(t),d.onerror=Nn(e),n.fail=e,n.stop=e=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,t(e)}})),u=()=>{if(d.result)try{t()}catch(t){n.fail(t)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return d.onsuccess=Le((t=>{d.onsuccess=u,u()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,u(),e},u(n)}),s)}))},count({query:t,trans:n}){const{index:o,range:i}=t;return new Promise(((t,a)=>{const u=n.objectStore(e),s=o.isPrimaryKey?u:u.index(o.name),c=r(i),l=c?s.count(c):s.count();l.onsuccess=Le((e=>t(e.target.result))),l.onerror=Nn(a)}))}}}(t))),u={};return a.forEach((t=>u[t.name]=t)),{stack:"dbcore",transaction:t.transaction.bind(t),table(t){if(!u[t])throw new Error(`Table '${t}' not found`);return u[t]},MIN_KEY:-1/0,MAX_KEY:Vn(e),schema:o}}(e,n,o),t.dbcore);return{dbcore:i}}(t._middlewares,n,t._deps,e);t.core=r.dbcore,t.tables.forEach((e=>{const n=e.name;t.core.schema.tables.some((t=>t.name===n))&&(e.core=t.core.table(n),t[n]instanceof t.Table&&(t[n].core=e.core))}))}function Yn({_novip:t},e,n,r){n.forEach((n=>{const o=r[n];e.forEach((e=>{const r=et(e,n);(!r||"value"in r&&void 0===r.value)&&(e===t.Transaction.prototype||e instanceof t.Transaction?X(e,n,{get(){return this.table(n)},set(t){J(this,n,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):e[n]=new t.Table(n,o))}))}))}function Jn({_novip:t},e){e.forEach((e=>{for(let n in e)e[n]instanceof t.Table&&delete e[n]}))}function Xn(t,e){return t._cfg.version-e._cfg.version}function Qn(t,e){const n={del:[],add:[],change:[]};let r;for(r in t)e[r]||n.del.push(r);for(r in e){const o=t[r],i=e[r];if(o){const t={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!an)t.recreate=!0,n.change.push(t);else{const e=o.idxByName,r=i.idxByName;let a;for(a in e)r[a]||t.del.push(a);for(a in r){const n=e[a],o=r[a];n?n.src!==o.src&&t.change.push(o):t.add.push(o)}(t.del.length>0||t.add.length>0||t.change.length>0)&&n.change.push(t)}}else n.add.push([r,i])}return n}function tr(t,e,n,r){const o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((t=>er(o,t))),o}function er(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})}function nr(t,e,n){const r={};return rt(e.objectStoreNames,0).forEach((t=>{const e=n.objectStore(t);let o=e.keyPath;const i=Fn(Kn(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let t=0;t<e.indexNames.length;++t){const n=e.index(e.indexNames[t]);o=n.keyPath;var u=Fn(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(u)}r[t]=Hn(t,i,a)})),r}function rr({_novip:t},e,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);t._hasGetAll="getAll"in a;for(let t=0;t<a.indexNames.length;++t){const n=a.indexNames[t],r=a.index(n).keyPath,o="string"==typeof r?r:"["+rt(r).join("+")+"]";if(e[i]){const t=e[i].idxByName[o];t&&(t.name=n,delete e[i].idxByName[o],e[i].idxByName[n]=t)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&H.WorkerGlobalScope&&H instanceof H.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(t._hasGetAll=!1)}class or{_parseStoresSpec(t,e){V(t).forEach((n=>{if(null!==t[n]){var r=t[n].split(",").map(((t,e)=>{const n=(t=t.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Fn(n,r||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),z(r),0===e)})),o=r.shift();if(o.multi)throw new Ut.Schema("Primary key cannot be multi-valued");r.forEach((t=>{if(t.auto)throw new Ut.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new Ut.Schema("Index must have a name and cannot be an empty string")})),e[n]=Hn(n,o,r)}}))}stores(t){const e=this.db;this._cfg.storesSource=this._cfg.storesSource?G(this._cfg.storesSource,t):t;const n=e._versions,r={};let o={};return n.forEach((t=>{G(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,Jn(e,[e._allTables,e,e.Transaction.prototype]),Yn(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],V(o),o),e._storeNames=V(o),this}upgrade(t){return this._cfg.contentUpgrade=Jt(this._cfg.contentUpgrade||Ht,t),this}}function ir(t,e){let n=t._dbNamesDB;return n||(n=t._dbNamesDB=new jr("__dbnames",{addons:[],indexedDB:t,IDBKeyRange:e}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function ar(t){return t&&"function"==typeof t.databases}function ur(t){return Fe((function(){return ve.letThrough=!0,t()}))}function sr(){var t;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()})).finally((function(){return clearInterval(t)})):Promise.resolve()}function cr(t){var e=e=>t.next(e),n=o(e),r=o((e=>t.throw(e)));function o(t){return e=>{var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):z(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()}function lr(t,e,n){var r=arguments.length;if(r<2)throw new Ut.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=ht(o);return[t,i,n]}function fr(t,e,n,r,o){return be.resolve().then((()=>{const i=ve.transless||ve,a=t._createTransaction(e,n,t._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===$t.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((()=>fr(t,e,n,null,o)))):tn(r)}const s=Et(o);let c;s&&Ke();const l=be.follow((()=>{if(c=o.call(a,a),c)if(s){var t=He.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=cr(c))}),u);return(c&&"function"==typeof c.then?be.resolve(c).then((t=>a.active?t:tn(new Ut.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((t=>(r&&a._resolve(),a._completion.then((()=>t))))).catch((t=>(a._reject(t),tn(t))))}))}function hr(t,e,n){const r=z(t)?t.slice():[t];for(let t=0;t<n;++t)r.push(e);return r}const pr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return{...t,table(e){const n=t.table(e),{schema:r}=n,o={},i=[];function a(t,e,n){const r=Wn(t),u=o[r]=o[r]||[],s=null==t?0:"string"==typeof t?1:t.length,c=e>0,l={...n,isVirtual:c,keyTail:e,keyLength:s,extractKey:zn(t),unique:!c&&n.unique};return u.push(l),l.isPrimaryKey||i.push(l),s>1&&a(2===s?t[0]:t.slice(0,s-1),e+1,n),u.sort(((t,e)=>t.keyTail-e.keyTail)),l}const u=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[u];for(const t of r.indexes)a(t.keyPath,0,t);function s(e){const n=e.query.index;return n.isVirtual?{...e,query:{index:n,range:(r=e.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:hr(r.lower,r.lowerOpen?t.MAX_KEY:t.MIN_KEY,o),lowerOpen:!0,upper:hr(r.upper,r.upperOpen?t.MIN_KEY:t.MAX_KEY,o),upperOpen:!0})}}:e;var r,o}const c={...n,schema:{...r,primaryKey:u,indexes:i,getIndexByKeyPath:function(t){const e=o[Wn(t)];return e&&e[0]}},count:t=>n.count(s(t)),query:t=>n.query(s(t)),openCursor(e){const{keyTail:r,isVirtual:o,keyLength:i}=e.query.index;return o?n.openCursor(s(e)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(hr(o,e.reverse?t.MAX_KEY:t.MIN_KEY,r)):e.unique?n.continue(n.key.slice(0,i).concat(e.reverse?t.MIN_KEY:t.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(e,o){n.continuePrimaryKey(hr(e,t.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const t=n.key;return 1===i?t[0]:t.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(e)}};return c}}}};function dr(t,e,n,r){return n=n||{},r=r||"",V(t).forEach((o=>{if(Z(e,o)){var i=t[o],a=e[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const t=bt(i);t!==bt(a)?n[r+o]=e[o]:"Object"===t?dr(i,a,n,r+o+"."):i!==a&&(n[r+o]=e[o])}else i!==a&&(n[r+o]=e[o])}else n[r+o]=void 0})),V(e).forEach((o=>{Z(t,o)||(n[r+o]=e[o])})),n}const vr={stack:"dbcore",name:"HooksMiddleware",level:2,create:t=>({...t,table(e){const n=t.table(e),{primaryKey:r}=n.schema,o={...n,mutate(t){const o=ve.trans,{deleting:i,creating:a,updating:u}=o.table(e).hook;switch(t.type){case"add":if(a.fire===Ht)break;return o._promise("readwrite",(()=>s(t)),!0);case"put":if(a.fire===Ht&&u.fire===Ht)break;return o._promise("readwrite",(()=>s(t)),!0);case"delete":if(i.fire===Ht)break;return o._promise("readwrite",(()=>s(t)),!0);case"deleteRange":if(i.fire===Ht)break;return o._promise("readwrite",(()=>function(t){return c(t.trans,t.range,1e4)}(t)),!0)}return n.mutate(t);function s(t){const e=ve.trans,o=t.keys||function(t,e){return"delete"===e.type?e.keys:e.keys||e.values.map(t.extractKey)}(r,t);if(!o)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?{...t,keys:o}:{...t}).type&&(t.values=[...t.values]),t.keys&&(t.keys=[...t.keys]),function(t,e,n){return"add"===e.type?Promise.resolve([]):t.getMany({trans:e.trans,keys:n,cache:"immutable"})}(n,t,o).then((s=>{const c=o.map(((n,o)=>{const c=s[o],l={onerror:null,onsuccess:null};if("delete"===t.type)i.fire.call(l,n,c,e);else if("add"===t.type||void 0===c){const i=a.fire.call(l,n,t.values[o],e);null==n&&null!=i&&(n=i,t.keys[o]=n,r.outbound||ct(t.values[o],r.keyPath,n))}else{const r=dr(c,t.values[o]),i=u.fire.call(l,r,n,c,e);if(i){const e=t.values[o];Object.keys(i).forEach((t=>{Z(e,t)?e[t]=i[t]:ct(e,t,i[t])}))}}return l}));return n.mutate(t).then((({failures:e,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(e[r]):a.onsuccess&&a.onsuccess("put"===t.type&&s[r]?t.values[r]:i)}return{failures:e,results:n,numFailures:r,lastResult:i}})).catch((t=>(c.forEach((e=>e.onerror&&e.onerror(t))),Promise.reject(t))))}))}function c(t,e,o){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:o}).then((({result:n})=>s({type:"delete",keys:n,trans:t}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(t,{...e,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function yr(t,e,n){try{if(!e)return null;if(e.keys.length<t.length)return null;const r=[];for(let o=0,i=0;o<e.keys.length&&i<t.length;++o)0===xn(e.keys[o],t[i])&&(r.push(n?yt(e.values[o]):e.values[o]),++i);return r.length===t.length?r:null}catch(t){return null}}const gr={stack:"dbcore",level:-1,create:t=>({table:e=>{const n=t.table(e);return{...n,getMany:t=>{if(!t.cache)return n.getMany(t);const e=yr(t.keys,t.trans._cache,"clone"===t.cache);return e?be.resolve(e):n.getMany(t).then((e=>(t.trans._cache={keys:t.keys,values:"clone"===t.cache?yt(e):e},e)))},mutate:t=>("add"!==t.type&&(t.trans._cache=null),n.mutate(t))}}})};function mr(t){return!("from"in t)}const br=function(t,e){if(!this){const e=new br;return t&&"d"in t&&G(e,t),e}G(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0})};function wr(t,e,n){const r=xn(e,n);if(isNaN(r))return;if(r>0)throw RangeError();if(mr(t))return G(t,{from:e,to:n,d:1});const o=t.l,i=t.r;if(xn(n,t.from)<0)return o?wr(o,e,n):t.l={from:e,to:n,d:1,l:null,r:null},xr(t);if(xn(e,t.to)>0)return i?wr(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},xr(t);xn(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),xn(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);const a=!t.r;o&&!t.l&&_r(t,o),i&&a&&_r(t,i)}function _r(t,e){mr(e)||function t(e,{from:n,to:r,l:o,r:i}){wr(e,n,r),o&&t(e,o),i&&t(e,i)}(t,e)}function Sr(t){let e=mr(t)?null:{s:0,n:t};return{next(t){const n=arguments.length>0;for(;e;)switch(e.s){case 0:if(e.s=1,n)for(;e.n.l&&xn(t,e.n.from)<0;)e={up:e,n:e.n.l,s:1};else for(;e.n.l;)e={up:e,n:e.n.l,s:1};case 1:if(e.s=2,!n||xn(t,e.n.to)<=0)return{value:e.n,done:!1};case 2:if(e.n.r){e.s=3,e={up:e,n:e.n.r,s:0};continue}case 3:e=e.up}return{done:!0}}}}function xr(t){var e,n;const r=((null===(e=t.r)||void 0===e?void 0:e.d)||0)-((null===(n=t.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const e="r"===o?"l":"r",n={...t},r=t[o];t.from=r.from,t.to=r.to,t[o]=r[o],n[o]=r[e],t[e]=n,n.d=Er(n)}t.d=Er(t)}function Er({r:t,l:e}){return(t?e?Math.max(t.d,e.d):t.d:e?e.d:0)+1}Y(br.prototype,{add(t){return _r(this,t),this},addKey(t){return wr(this,t,t),this},addKeys(t){return t.forEach((t=>wr(this,t,t))),this},[wt](){return Sr(this)}});const Or={stack:"dbcore",level:0,create:t=>{const e=t.schema.name,n=new br(t.MIN_KEY,t.MAX_KEY);return{...t,table:r=>{const o=t.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:u,outbound:s}=a,c={...o,mutate:t=>{const a=t.trans,u=a.mutatedParts||(a.mutatedParts={}),s=t=>{const n=`idb://${e}/${r}/${t}`;return u[n]||(u[n]=new br)},c=s(""),l=s(":dels"),{type:f}=t;let[h,p]="deleteRange"===t.type?[t.range]:"delete"===t.type?[t.keys]:t.values.length<50?[[],t.values]:[];const d=t.trans._cache;return o.mutate(t).then((t=>{if(z(h)){"delete"!==f&&(h=t.results),c.addKeys(h);const e=yr(h,d);e||"add"===f||l.addKeys(h),(e||p)&&function(t,e,n,r){e.indexes.forEach((function(e){const o=t(e.name||"");function i(t){return null!=t?e.extractKey(t):null}const a=t=>e.multiEntry&&z(t)?t.forEach((t=>o.addKey(t))):o.addKey(t);(n||r).forEach(((t,e)=>{const o=n&&i(n[e]),u=r&&i(r[e]);0!==xn(o,u)&&(null!=o&&a(o),null!=u&&a(u))}))}))}(s,i,e,p)}else if(h){const t={from:h.lower,to:h.upper};l.add(t),c.add(t)}else c.add(n),l.add(n),i.indexes.forEach((t=>s(t.name).add(n)));return t}))}},l=({query:{index:e,range:n}})=>{var r,o;return[e,new br(null!==(r=n.lower)&&void 0!==r?r:t.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:t.MAX_KEY)]},f={get:t=>[a,new br(t.key)],getMany:t=>[a,(new br).addKeys(t.keys)],count:l,query:l,openCursor:l};return V(f).forEach((t=>{c[t]=function(i){const{subscr:a}=ve;if(a){const c=t=>{const n=`idb://${e}/${r}/${t}`;return a[n]||(a[n]=new br)},l=c(""),h=c(":dels"),[p,d]=f[t](i);if(c(p.name||"").add(d),!p.isPrimaryKey){if("count"!==t){const e="query"===t&&s&&i.values&&o.query({...i,values:!1});return o[t].apply(this,arguments).then((n=>{if("query"===t){if(s&&i.values)return e.then((({result:t})=>(l.addKeys(t),n)));const t=i.values?n.result.map(u):n.result;i.values?l.addKeys(t):h.addKeys(t)}else if("openCursor"===t){const t=n,e=i.values;return t&&Object.create(t,{key:{get:()=>(h.addKey(t.primaryKey),t.key)},primaryKey:{get(){const e=t.primaryKey;return h.addKey(e),e}},value:{get:()=>(e&&l.addKey(t.primaryKey),t.value)}})}return n}))}h.add(n)}}return o[t].apply(this,arguments)}})),c}}}};class jr{constructor(t,e){this._middlewares={},this.verno=0;const n=jr.dependencies;this._options=e={addons:jr.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...e},this._deps={indexedDB:e.indexedDB,IDBKeyRange:e.IDBKeyRange};const{addons:r}=e;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:Ht,dbReadyPromise:null,cancelOpen:Ht,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new be((t=>{o.dbReadyResolve=t})),o.openCanceller=new be(((t,e)=>{o.cancelOpen=e})),this._state=o,this.name=t,this.on=dn(this,"populate","blocked","versionchange","close",{ready:[Jt,Ht]}),this.on.ready.subscribe=ot(this.on.ready.subscribe,(t=>(e,n)=>{jr.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||be.resolve().then(e),n&&t(e);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(e),n&&t(e);else{t(e);const r=this;n||t((function t(){r.on.ready.unsubscribe(e),r.on.ready.unsubscribe(t)}))}}))})),this.Collection=(i=this,vn(jn.prototype,(function(t,e){this.db=i;let n=fn,r=null;if(e)try{n=e()}catch(t){r=t}const o=t._ctx,a=o.table,u=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:u!==Vt?u:null}}))),this.Table=function(t){return vn(pn.prototype,(function(e,n,r){this.db=t,this._tx=r,this.name=e,this.schema=n,this.hook=t._allTables[e]?t._allTables[e].hook:dn(null,{creating:[qt,Ht],reading:[zt,Vt],updating:[Zt,Ht],deleting:[Wt,Ht]})}))}(this),this.Transaction=function(t){return vn(Un.prototype,(function(e,n,r,o,i){this.db=t,this.mode=e,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=dn(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 be(((t,e)=>{this._resolve=t,this._reject=e})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(t=>{var e=this.active;return this.active=!1,this.on.error.fire(t),this.parent?this.parent._reject(t):e&&this.idbtrans&&this.idbtrans.abort(),tn(t)}))}))}(this),this.Version=function(t){return vn(or.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(t){return vn(Mn.prototype,(function(e,n,r){this.db=t,this._ctx={table:e,index:":id"===n?null:n,or:r};const o=t._deps.indexedDB;if(!o)throw new Ut.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(t,e)=>o.cmp(e,t),this._max=(t,e)=>o.cmp(t,e)>0?t:e,this._min=(t,e)=>o.cmp(t,e)<0?t:e,this._IDBKeyRange=t._deps.IDBKeyRange}))}(this),this.on("versionchange",(t=>{t.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",(t=>{!t.newVersion||t.newVersion<t.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${t.oldVersion/10}`)})),this._maxKey=Vn(e.IDBKeyRange),this._createTransaction=(t,e,n,r)=>new this.Transaction(t,e,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=t=>{this.on("blocked").fire(t),on.filter((t=>t.name===this.name&&t!==this&&!t._state.vcFired)).map((e=>e.on("versionchange").fire(t)))},this.use(pr),this.use(vr),this.use(Or),this.use(gr),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((t=>t(this)))}version(t){if(isNaN(t)||t<.1)throw new Ut.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new Ut.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);const e=this._versions;var n=e.filter((e=>e._cfg.version===t))[0];return n||(n=new this.Version(t),e.push(n),e.sort(Xn),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(t){return this.idbdb&&(this._state.openComplete||ve.letThrough||this._vip)?t():new be(((t,e)=>{if(this._state.openComplete)return e(new Ut.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void e(new Ut.DatabaseClosed);this.open().catch(Ht)}this._state.dbReadyPromise.then(t,e)})).then(t)}use({stack:t,create:e,level:n,name:r}){r&&this.unuse({stack:t,name:r});const o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:e,level:null==n?10:n,name:r}),o.sort(((t,e)=>t.level-e.level)),this}unuse({stack:t,name:e,create:n}){return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((t=>n?t.create!==n:!!e&&t.name!==e))),this}open(){return function(t){const e=t._state,{indexedDB:n}=t._deps;if(e.isBeingOpened||t.idbdb)return e.dbReadyPromise.then((()=>e.dbOpenError?tn(e.dbOpenError):t));Ot&&(e.openCanceller._stackHolder=Pt()),e.isBeingOpened=!0,e.dbOpenError=null,e.openComplete=!1;const r=e.openCanceller;function o(){if(e.openCanceller!==r)throw new Ut.DatabaseClosed("db.open() was cancelled")}let i=e.dbReadyResolve,a=null,u=!1;return be.race([r,("undefined"==typeof navigator?be.resolve():sr()).then((()=>new be(((r,i)=>{if(o(),!n)throw new Ut.MissingAPI;const s=t.name,c=e.autoSchema?n.open(s):n.open(s,Math.round(10*t.verno));if(!c)throw new Ut.MissingAPI;c.onerror=Nn(i),c.onblocked=Le(t._fireOnBlocked),c.onupgradeneeded=Le((r=>{if(a=c.transaction,e.autoSchema&&!t._options.allowEmptyDB){c.onerror=$n,a.abort(),c.result.close();const t=n.deleteDatabase(s);t.onsuccess=t.onerror=Le((()=>{i(new Ut.NoSuchDatabase(`Database ${s} doesnt exist`))}))}else{a.onerror=Nn(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;u=o<1,t._novip.idbdb=c.result,function(t,e,n,r){const o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),u=ve.transless||ve;Fe((()=>{ve.trans=i,ve.transless=u,0===e?(V(o).forEach((t=>{tr(n,t,o[t].primKey,o[t].indexes)})),Zn(t,n),be.follow((()=>t.on.populate.fire(i))).catch(a)):function({_novip:t},e,n,r){const o=[],i=t._versions;let a=t._dbSchema=nr(0,t.idbdb,r),u=!1;return i.filter((t=>t._cfg.version>=e)).forEach((i=>{o.push((()=>{const o=a,s=i._cfg.dbschema;rr(t,o,r),rr(t,s,r),a=t._dbSchema=s;const c=Qn(o,s);c.add.forEach((t=>{tr(r,t[0],t[1].primKey,t[1].indexes)})),c.change.forEach((t=>{if(t.recreate)throw new Ut.Upgrade("Not yet support for changing primary key");{const e=r.objectStore(t.name);t.add.forEach((t=>er(e,t))),t.change.forEach((t=>{e.deleteIndex(t.name),er(e,t)})),t.del.forEach((t=>e.deleteIndex(t)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>e){Zn(t,r),n._memoizedTables={},u=!0;let e=lt(s);c.del.forEach((t=>{e[t]=o[t]})),Jn(t,[t.Transaction.prototype]),Yn(t,[t.Transaction.prototype],V(e),e),n.schema=e;const i=Et(l);let a;i&&Ke();const f=be.follow((()=>{if(a=l(n),a&&i){var t=He.bind(null,null);a.then(t,t)}}));return a&&"function"==typeof a.then?be.resolve(a):f.then((()=>a))}})),o.push((e=>{u&&un||function(t,e){[].slice.call(e.db.objectStoreNames).forEach((n=>null==t[n]&&e.db.deleteObjectStore(n)))}(i._cfg.dbschema,e),Jn(t,[t.Transaction.prototype]),Yn(t,[t.Transaction.prototype],t._storeNames,t._dbSchema),n.schema=t._dbSchema}))})),function t(){return o.length?be.resolve(o.shift()(n.idbtrans)).then(t):be.resolve()}().then((()=>{var t,e;e=r,V(t=a).forEach((n=>{e.db.objectStoreNames.contains(n)||tr(e,n,t[n].primKey,t[n].indexes)}))}))}(t,e,i,n).catch(a)}))}(t,o/10,a,i)}}),i),c.onsuccess=Le((()=>{a=null;const n=t._novip.idbdb=c.result,o=rt(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");e.autoSchema?function({_novip:t},e,n){t.verno=e.version/10;const r=t._dbSchema=nr(0,e,n);t._storeNames=rt(e.objectStoreNames,0),Yn(t,[t._allTables],V(r),r)}(t,n,r):(rr(t,t._dbSchema,r),function(t,e){const n=Qn(nr(0,t.idbdb,e),t._dbSchema);return!(n.add.length||n.change.some((t=>t.add.length||t.change.length)))}(t,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Zn(t,r)}catch(t){}var i;on.push(t),n.onversionchange=Le((n=>{e.vcFired=!0,t.on("versionchange").fire(n)})),n.onclose=Le((e=>{t.on("close").fire(e)})),u&&function({indexedDB:t,IDBKeyRange:e},n){!ar(t)&&"__dbnames"!==n&&ir(t,e).put({name:n}).catch(Ht)}(t._deps,s),r()}),i)}))))]).then((()=>(o(),e.onReadyBeingFired=[],be.resolve(ur((()=>t.on.ready.fire(t.vip)))).then((function n(){if(e.onReadyBeingFired.length>0){let r=e.onReadyBeingFired.reduce(Jt,Ht);return e.onReadyBeingFired=[],be.resolve(ur((()=>r(t.vip)))).then(n)}}))))).finally((()=>{e.onReadyBeingFired=null,e.isBeingOpened=!1})).then((()=>t)).catch((n=>{e.dbOpenError=n;try{a&&a.abort()}catch(t){}return r===e.openCanceller&&t._close(),tn(n)})).finally((()=>{e.openComplete=!0,i()}))}(this)}_close(){const t=this._state,e=on.indexOf(this);if(e>=0&&on.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(t){}this._novip.idbdb=null}t.dbReadyPromise=new be((e=>{t.dbReadyResolve=e})),t.openCanceller=new be(((e,n)=>{t.cancelOpen=n}))}close(){this._close();const t=this._state;this._options.autoOpen=!1,t.dbOpenError=new Ut.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}delete(){const t=arguments.length>0,e=this._state;return new be(((n,r)=>{const o=()=>{this.close();var t=this._deps.indexedDB.deleteDatabase(this.name);t.onsuccess=Le((()=>{!function({indexedDB:t,IDBKeyRange:e},n){!ar(t)&&"__dbnames"!==n&&ir(t,e).delete(n).catch(Ht)}(this._deps,this.name),n()})),t.onerror=Nn(r),t.onblocked=this._fireOnBlocked};if(t)throw new Ut.InvalidArgument("Arguments not allowed in db.delete()");e.isBeingOpened?e.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return V(this._allTables).map((t=>this._allTables[t]))}transaction(){const t=lr.apply(this,arguments);return this._transaction.apply(this,t)}_transaction(t,e,n){let r=ve.trans;r&&r.db===this&&-1===t.indexOf("!")||(r=null);const o=-1!==t.indexOf("?");let i,a;t=t.replace("!","").replace("?","");try{if(a=e.map((t=>{var e=t instanceof this.Table?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||"readonly"===t)i="readonly";else{if("rw"!=t&&"readwrite"!=t)throw new Ut.InvalidArgument("Invalid transaction mode: "+t);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Ut.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((t=>{if(r&&-1===r.storeNames.indexOf(t)){if(!o)throw new Ut.SubTransaction("Table "+t+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(t){return r?r._promise(null,((e,n)=>{n(t)})):tn(t)}const u=fr.bind(null,this,i,a,r,n);return r?r._promise(i,u,"lock"):ve.trans?Ze(ve.transless,(()=>this._whenReady(u))):this._whenReady(u)}table(t){if(!Z(this._allTables,t))throw new Ut.InvalidTable(`Table ${t} does not exist`);return this._allTables[t]}}const Ar="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Cr{constructor(t){this._subscribe=t}subscribe(t,e,n){return this._subscribe(t&&"function"!=typeof t?t:{next:t,error:e,complete:n})}[Ar](){return this}}function Pr(t,e){return V(e).forEach((n=>{_r(t[n]||(t[n]=new br),e[n])})),t}let kr;try{kr={indexedDB:H.indexedDB||H.mozIndexedDB||H.webkitIndexedDB||H.msIndexedDB,IDBKeyRange:H.IDBKeyRange||H.webkitIDBKeyRange}}catch(r){kr={indexedDB:null,IDBKeyRange:null}}const Tr=jr;function Ir(t){let e=Rr;try{Rr=!0,Bn.storagemutated.fire(t)}finally{Rr=e}}Y(Tr,{...Kt,delete:t=>new Tr(t,{addons:[]}).delete(),exists:t=>new Tr(t,{addons:[]}).open().then((t=>(t.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(t){try{return function({indexedDB:t,IDBKeyRange:e}){return ar(t)?Promise.resolve(t.databases()).then((t=>t.map((t=>t.name)).filter((t=>"__dbnames"!==t)))):ir(t,e).toCollection().primaryKeys()}(Tr.dependencies).then(t)}catch(t){return tn(new Ut.MissingAPI)}},defineClass:()=>function(t){G(this,t)},ignoreTransaction:t=>ve.trans?Ze(ve.transless,t):t(),vip:ur,async:function(t){return function(){try{var e=cr(t.apply(this,arguments));return e&&"function"==typeof e.then?e:be.resolve(e)}catch(t){return tn(t)}}},spawn:function(t,e,n){try{var r=cr(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:be.resolve(r)}catch(t){return tn(t)}},currentTransaction:{get:()=>ve.trans||null},waitFor:function(t,e){const n=be.resolve("function"==typeof t?Tr.ignoreTransaction(t):t).timeout(e||6e4);return ve.trans?ve.trans.waitFor(n):n},Promise:be,debug:{get:()=>Ot,set:t=>{jt(t,"dexie"===t?()=>!0:cn)}},derive:Q,extend:G,props:Y,override:ot,Events:dn,on:Bn,liveQuery:function(t){return new Cr((e=>{const n=Et(t);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,Bn.storagemutated.unsubscribe(l)}};e.start&&e.start(a);let u=!1,s=!1;function c(){return V(i).some((t=>o[t]&&function(t,e){const n=Sr(e);let r=n.next();if(r.done)return!1;let o=r.value;const i=Sr(t);let a=i.next(o.from),u=a.value;for(;!r.done&&!a.done;){if(xn(u.from,o.to)<=0&&xn(u.to,o.from)>=0)return!0;xn(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(o[t],i[t])))}const l=t=>{Pr(o,t),c()&&f()},f=()=>{if(u||r)return;o={};const h={},p=function(e){n&&Ke();const r=()=>Fe(t,{subscr:e,trans:null}),o=ve.trans?Ze(ve.transless,r):r();return n&&o.then(He,He),o}(h);s||(Bn("storagemutated",l),s=!0),u=!0,Promise.resolve(p).then((t=>{u=!1,r||(c()?f():(o={},i=h,e.next&&e.next(t)))}),(t=>{u=!1,e.error&&e.error(t),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Pr,getByKeyPath:st,setByKeyPath:ct,delByKeyPath:function(t,e){"string"==typeof e?ct(t,e,void 0):"length"in e&&[].map.call(e,(function(e){ct(t,e,void 0)}))},shallowClone:lt,deepClone:yt,getObjectDiff:dr,cmp:xn,asap:at,minKey:-1/0,addons:[],connections:on,errnames:$t,dependencies:kr,semVer:"3.2.1",version:"3.2.1".split(".").map((t=>parseInt(t))).reduce(((t,e,n)=>t+e/Math.pow(10,2*n)))}),Tr.maxKey=Vn(Tr.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Bn("storagemutated",(t=>{if(!Rr){let e;an?(e=document.createEvent("CustomEvent"),e.initCustomEvent("x-storagemutated-1",!0,!0,t)):e=new CustomEvent("x-storagemutated-1",{detail:t}),Rr=!0,dispatchEvent(e),Rr=!1}})),addEventListener("x-storagemutated-1",(({detail:t})=>{Rr||Ir(t)})));let Rr=!1;if("undefined"!=typeof BroadcastChannel){const t=new BroadcastChannel("x-storagemutated-1");Bn("storagemutated",(e=>{Rr||t.postMessage(e)})),t.onmessage=t=>{t.data&&Ir(t.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Bn("storagemutated",(t=>{try{Rr||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:t})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((e=>e.postMessage({type:"x-storagemutated-1",changedParts:t}))))}catch(t){}})),addEventListener("storage",(t=>{if("x-storagemutated-1"===t.key){const e=JSON.parse(t.newValue);e&&Ir(e.changedParts)}}));const t=self.document&&navigator.serviceWorker;t&&t.addEventListener("message",(function({data:t}){t&&"x-storagemutated-1"===t.type&&Ir(t.changedParts)}))}be.rejectionMapper=function(t,e){if(!t||t instanceof Lt||t instanceof TypeError||t instanceof SyntaxError||!t.name||!Ft[t.name])return t;var n=new Ft[t.name](e||t.message,t);return"stack"in t&&X(n,"stack",{get:function(){return this.inner.stack}}),n},jt(Ot,cn);var Lr=a(766),Dr=a(685);function Mr(t){return Mr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Mr(t)}function Nr(t,e){return!e||"object"!==Br(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function $r(t,e){return $r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},$r(t,e)}var Br=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},Ur=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$r(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=Mr(e);if(n){var o=Mr(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Nr(this,t)});function o(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),t.syncQueue=t.table("syncQueue"),t.dynamicOfflineData=t.table("dynamicOfflineData"),t}return o}(jr);function Fr(){return new Ur}function Kr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Hr(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function Vr(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Hr(i,r,o,a,u,"next",t)}function u(t){Hr(i,r,o,a,u,"throw",t)}a(void 0)}))}}function zr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){zr(t,e,n[e])}))}return t}function qr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Kr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kr(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Wr,Zr=new Ur,Yr={},Jr=(0,Dr.createGlobalStore)("offline-synchronization",{});function Xr(){return Jr}function Qr(){return to.apply(this,arguments)}function to(){return to=Vr(S().mark((function t(){var e,n,r,o,i,a,u,s,c,l,f,h,p;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Jr.getState().synchronization){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,Zr.syncQueue.count();case 4:e=t.sent,n={},r=Object.entries(Yr),o=r.length,i={},a=new AbortController,u=function(){var t=Jr.getState().synchronization;Jr.setState({synchronization:Gr({},t,{pendingCount:t.pendingCount-1})})},t.prev=11,Jr.setState({synchronization:{totalCount:e,pendingCount:e,abortController:a}}),s=0;case 14:if(!(s<o&&r.length>0)){t.next=30;break}c=r.length;case 16:if(!c--){t.next=27;break}if(l=qr(r[c],2),f=l[0],h=l[1],!(p=h.dependsOn.map((function(t){return n[t]}))).every(Boolean)){t.next=25;break}return i[f]={},t.next=23,Promise.all(p);case 23:n[f]=eo(h,i,a,u),r.splice(c,1);case 25:t.next=16;break;case 27:s++,t.next=14;break;case 30:return t.next=32,Promise.allSettled(Object.values(n));case 32:return t.prev=32,Jr.setState({synchronization:void 0}),t.finish(32);case 35:case"end":return t.stop()}}),t,null,[[11,,32,35]])}))),to.apply(this,arguments)}function eo(t,e,n,r){return no.apply(this,arguments)}function no(){return no=Vr(S().mark((function t(e,n,r,o){var i,a,u,s,c,l,f,h,p,d,v,y,g,m,b,w;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.type,a=e.dependsOn,u=e.process,s=[],c=[],t.next=5,ro();case 5:return l=t.sent,t.next=8,Zr.syncQueue.where({type:i,userId:l}).each((function(t,e){s.push([e.primaryKey,t.content,t.descriptor]),c.push(t.content)}));case 8:f=0;case 9:if(!(f<s.length)){t.next=31;break}return h=qr(s[f],3),p=h[0],d=h[1],v=h[2],y=v.id,g=v.dependencies,m=void 0===g?[]:g,t.prev=11,t.next=14,u(d,{abort:r,index:f,items:c,userId:l,dependencies:m.map((function(t){var e=t.id,r=t.type;return a.includes(r)?n[r][e]:void 0}))});case 14:return b=t.sent,void 0!==y&&(n[i][y]=b),t.next=18,Zr.syncQueue.delete(p);case 18:t.next=25;break;case 20:return t.prev=20,t.t0=t.catch(11),t.next=25,Zr.syncQueue.update(p,{lastError:{name:null===t.t0||void 0===t.t0?void 0:t.t0.name,message:null!==(w=null===t.t0||void 0===t.t0?void 0:t.t0.message)&&void 0!==w?w:null===t.t0||void 0===t.t0?void 0:t.t0.toString()}});case 25:return t.prev=25,o(),t.finish(25);case 28:f++,t.next=9;break;case 31:case"end":return t.stop()}}),t,null,[[11,20,25,28]])}))),no.apply(this,arguments)}function ro(){return oo.apply(this,arguments)}function oo(){return(oo=Vr(S().mark((function t(){var e;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Lr.getLoggedInUser)();case 2:return e=t.sent,t.abrupt("return",(null==e?void 0:e.uuid)||"*");case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function io(t,e,n,r){return ao.apply(this,arguments)}function ao(){return(ao=Vr(S().mark((function t(e,n,r,o){var i,a;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===(i=o&&o.id)){t.next=4;break}return t.next=4,Zr.syncQueue.where({type:n,userId:e}).filter((function(t){return(null==t?void 0:t.descriptor.id)===i})).delete().catch(jr.errnames.DatabaseClosed);case 4:return t.next=6,Zr.syncQueue.add({type:n,content:r,userId:e,descriptor:o||{},createdOn:new Date}).catch(jr.errnames.DatabaseClosed,(function(){return-1}));case 6:return a=t.sent,t.abrupt("return",a);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function uo(t,e,n){return so.apply(this,arguments)}function so(){return(so=Vr(S().mark((function t(e,n,r){var o;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ro();case 2:return o=t.sent,t.next=5,io(o,e,n,r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function co(t,e){return lo.apply(this,arguments)}function lo(){return(lo=Vr(S().mark((function t(e,n){var r;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fo(e,n);case 2:return r=t.sent,t.abrupt("return",r.map((function(t){return t.content})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function fo(t,e){return ho.apply(this,arguments)}function ho(){return(ho=Vr(S().mark((function t(e,n){var r;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,userId:e}:{userId:e},t.next=3,Zr.syncQueue.where(r).toArray().catch(jr.errnames.DatabaseClosed,(function(){return[]}));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function po(t){return vo.apply(this,arguments)}function vo(){return(vo=Vr(S().mark((function t(e){var n;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ro();case 2:return n=t.sent,t.next=5,co(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yo(t){return go.apply(this,arguments)}function go(){return(go=Vr(S().mark((function t(e){var n;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ro();case 2:return n=t.sent,t.next=5,fo(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mo(t){return bo.apply(this,arguments)}function bo(){return(bo=Vr(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Zr.syncQueue.get(e).catch(jr.errnames.DatabaseClosed,(function(){}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function wo(t){var e;return!!(null===(e=Yr[t])||void 0===e?void 0:e.options.onBeginEditSyncItem)}function _o(t){return So.apply(this,arguments)}function So(){return(So=Vr(S().mark((function t(e){var n,r,o;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,mo(e);case 3:if(r=t.sent){t.next=6;break}throw new Error("No sync item with the ID ".concat(e," exists."));case 6:if(o=null===(n=Yr[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){t.next=9;break}throw new Error("A sync item with the ID ".concat(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 "').concat(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function xo(t){return Eo.apply(this,arguments)}function Eo(){return(Eo=Vr(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Zr.syncQueue.delete(e).catch(jr.errnames.DatabaseClosed);case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Oo(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Yr[t]={type:t,dependsOn:e,process:n,options:r}}var jo=new Uint8Array(16);function Ao(){if(!Wr&&!(Wr="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 Wr(jo)}const Co=/^(?:[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,Po=function(t){return"string"==typeof t&&Co.test(t)};for(var ko=[],To=0;To<256;++To)ko.push((To+256).toString(16).substr(1));const Io=function(t,e,n){var r=(t=t||{}).random||(t.rng||Ao)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ko[t[e+0]]+ko[t[e+1]]+ko[t[e+2]]+ko[t[e+3]]+"-"+ko[t[e+4]]+ko[t[e+5]]+"-"+ko[t[e+6]]+ko[t[e+7]]+"-"+ko[t[e+8]]+ko[t[e+9]]+"-"+ko[t[e+10]]+ko[t[e+11]]+ko[t[e+12]]+ko[t[e+13]]+ko[t[e+14]]+ko[t[e+15]]).toLowerCase();if(!Po(n))throw TypeError("Stringified UUID is invalid");return n}(r)};var Ro="OFFLINE+";function Lo(){return Ro+Io()}function Do(t){return t.startsWith(Ro)}function Mo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function No(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function $o(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){No(i,r,o,a,u,"next",t)}function u(t){No(i,r,o,a,u,"throw",t)}a(void 0)}))}}function Bo(t){return function(t){if(Array.isArray(t))return Mo(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Mo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mo(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Uo={};function Fo(){return Object.values(Uo)}function Ko(t){Uo[t.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(t.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),Uo[t.id]=t}function Ho(t){return Vo.apply(this,arguments)}function Vo(){return(Vo=$o(S().mark((function t(e){var n;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ii();case 2:return n=t.sent,t.next=5,zo(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function zo(t,e){return Go.apply(this,arguments)}function Go(){return Go=$o(S().mark((function t(e,n){var r,o;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,users:e}:{users:e},o=new Ur,t.next=4,o.dynamicOfflineData.where(r).toArray().catch(jr.errnames.DatabaseClosed,(function(){return[]}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)}))),Go.apply(this,arguments)}function qo(t,e){return Wo.apply(this,arguments)}function Wo(){return(Wo=$o(S().mark((function t(e,n){var r;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ii();case 2:return r=t.sent,t.next=5,Zo(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Zo(t,e,n){return Yo.apply(this,arguments)}function Yo(){return Yo=$o(S().mark((function t(e,n,r){var o,i;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Ur,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r}).catch(jr.errnames.DatabaseClosed,(function(){}));case 3:if(i=t.sent){t.next=9;break}return t.next=7,o.dynamicOfflineData.add({users:[e],type:n,identifier:r}).catch(jr.errnames.DatabaseClosed);case 7:t.next=12;break;case 9:if(i.users.includes(e)){t.next=12;break}return t.next=12,o.dynamicOfflineData.update(i.id,{users:Bo(i.users).concat([e])}).catch(jr.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)}))),Yo.apply(this,arguments)}function Jo(t,e){return Xo.apply(this,arguments)}function Xo(){return(Xo=$o(S().mark((function t(e,n){var r;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ii();case 2:return r=t.sent,t.next=5,Qo(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qo(t,e,n){return ti.apply(this,arguments)}function ti(){return ti=$o(S().mark((function t(e,n,r){var o,i;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Ur,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r,users:e}).catch(jr.errnames.DatabaseClosed,(function(){}));case 3:if(!(i=t.sent)){t.next=12;break}if(!(i.users.length>1)){t.next=10;break}return t.next=8,o.dynamicOfflineData.update(i.id,{users:i.users.filter((function(t){return t!==e}))}).catch(jr.errnames.DatabaseClosed);case 8:t.next=12;break;case 10:return t.next=12,o.dynamicOfflineData.delete(i.id).catch(jr.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)}))),ti.apply(this,arguments)}function ei(t,e){return ni.apply(this,arguments)}function ni(){return ni=$o(S().mark((function t(e,n){var r;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ho(e);case 2:return r=t.sent,t.next=5,Promise.all(r.map(function(){var t=$o(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",ri(e.type,e.identifier,n));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:case"end":return t.stop()}}),t)}))),ni.apply(this,arguments)}function ri(t,e,n){return oi.apply(this,arguments)}function oi(){return oi=$o(S().mark((function t(e,n,r){var o,i,a,u,s,c,l,f,h;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qo(e,n);case 2:return o=new Ur,t.next=5,ii();case 5:return i=t.sent,t.next=8,o.dynamicOfflineData.get({type:e,identifier:n}).catch(jr.errnames.DatabaseClosed,(function(){}));case 8:if(a=t.sent,u=Fo().filter((function(t){return t.type===e})),a){t.next=12;break}return t.abrupt("return");case 12:return t.next=14,Promise.all(u.map(function(){var t=$o(S().mark((function t(e){var o,i,a;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.sync(n,r),t.abrupt("return",{id:e.id,error:void 0});case 5:return t.prev=5,t.t0=t.catch(0),a=null!==(i=null===(o=t.t0.message)||void 0===o?void 0:o.toString())&&void 0!==i?i:t.t0.toString(),t.abrupt("return",{id:e.id,error:a});case 11:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 14:if(s=t.sent,c=s.filter((function(t){return!t.error})).map((function(t){return t.id})),l=s.filter((function(t){return t.error})).map((function(t){return t.id})),f=s.filter((function(t){return t.error})).map((function(t){return{handlerId:t.id,message:t.error}})),h={syncedOn:new Date,syncedBy:i,succeededHandlers:c,erroredHandlers:l,errors:f},!a.id){t.next=22;break}return t.next=22,o.dynamicOfflineData.update(a.id,{syncState:h}).catch(jr.errnames.DatabaseClosed);case 22:case"end":return t.stop()}}),t)}))),oi.apply(this,arguments)}function ii(){return ai.apply(this,arguments)}function ai(){return(ai=$o(S().mark((function t(){var e;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Lr.getLoggedInUser)();case 2:if(e=t.sent.uuid){t.next=5;break}throw new Error("Using the dynamic offline data API requires a logged in user.");case 5:return t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ui(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function si(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){ui(i,r,o,a,u,"next",t)}function u(t){ui(i,r,o,a,u,"throw",t)}a(void 0)}))}}var ci=(0,Dr.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function li(){return di(),ci}function fi(t,e){di(),Ko({type:"patient",displayName:e.displayName,id:t,isSynced:function(){return Promise.resolve(!0)},sync:function(t,n){return e.onOfflinePatientAdded({patientUuid:t,signal:null!=n?n:(new AbortController).signal})}})}function hi(t){return pi.apply(this,arguments)}function pi(){return(pi=si(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return di(),t.next=3,ri("patient",e);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function di(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}})(),u})())}}}))},4211:(t,e,n)=>{t=n.nmd(t),System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(r,o){var i={},a={},u={},s={},c={},l={},f={},h={},p={};return{setters:[function(t){i.createContext=t.createContext,i.createElement=t.createElement,i.default=t.default,i.useCallback=t.useCallback,i.useContext=t.useContext,i.useDebugValue=t.useDebugValue,i.useEffect=t.useEffect,i.useLayoutEffect=t.useLayoutEffect,i.useMemo=t.useMemo,i.useReducer=t.useReducer,i.useRef=t.useRef,i.useState=t.useState},function(t){a.getConfigStore=t.getConfigStore,a.getExtensionConfigFromStore=t.getExtensionConfigFromStore,a.getExtensionsConfigStore=t.getExtensionsConfigStore,a.interpolateUrl=t.interpolateUrl,a.navigate=t.navigate},function(t){u.getConnectedExtensions=t.getConnectedExtensions,u.getExtensionInternalStore=t.getExtensionInternalStore,u.getExtensionStore=t.getExtensionStore,u.registerExtensionSlot=t.registerExtensionSlot,u.renderExtension=t.renderExtension},function(t){s.subscribeConnectivityChanged=t.subscribeConnectivityChanged},function(t){c.default=t.default},function(t){l.default=t.default},function(t){f.I18nextProvider=t.I18nextProvider},function(t){h.defaultVisitCustomRepresentation=t.defaultVisitCustomRepresentation,h.fetchCurrentPatient=t.fetchCurrentPatient,h.getCurrentUser=t.getCurrentUser,h.getLocations=t.getLocations,h.getSessionStore=t.getSessionStore,h.getVisitTypes=t.getVisitTypes,h.openmrsFetch=t.openmrsFetch,h.userHasAccess=t.userHasAccess},function(t){p.default=t.default}],execute:function(){r((()=>{var r={332:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},891:function(t,e,n){var r;t=n.nmd(t),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",s=32,c=128,l=1/0,f=9007199254740991,h=NaN,p=4294967295,d=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],v="[object Arguments]",y="[object Array]",g="[object Boolean]",m="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",S="[object Map]",x="[object Number]",E="[object Object]",O="[object Promise]",j="[object RegExp]",A="[object Set]",C="[object String]",P="[object Symbol]",k="[object WeakMap]",T="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",M="[object Int16Array]",N="[object Int32Array]",$="[object Uint8Array]",B="[object Uint8ClampedArray]",U="[object Uint16Array]",F="[object Uint32Array]",K=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,q=RegExp(z.source),W=RegExp(G.source),Z=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,st=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,lt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,pt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="a-z\\xdf-\\xf6\\xf8-\\xff",xt="A-Z\\xc0-\\xd6\\xd8-\\xde",Et="\\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",Ot="["+Et+"]",jt="["+_t+"]",At="\\d+",Ct="["+St+"]",Pt="[^\\ud800-\\udfff"+Et+At+"\\u2700-\\u27bf"+St+xt+"]",kt="\\ud83c[\\udffb-\\udfff]",Tt="[^\\ud800-\\udfff]",It="(?:\\ud83c[\\udde6-\\uddff]){2}",Rt="[\\ud800-\\udbff][\\udc00-\\udfff]",Lt="["+xt+"]",Dt="(?:"+Ct+"|"+Pt+")",Mt="(?:"+Lt+"|"+Pt+")",Nt="(?:['’](?:d|ll|m|re|s|t|ve))?",$t="(?:['’](?:D|LL|M|RE|S|T|VE))?",Bt="(?:"+jt+"|"+kt+")?",Ut="[\\ufe0e\\ufe0f]?",Ft=Ut+Bt+"(?:\\u200d(?:"+[Tt,It,Rt].join("|")+")"+Ut+Bt+")*",Kt="(?:"+["[\\u2700-\\u27bf]",It,Rt].join("|")+")"+Ft,Ht="(?:"+[Tt+jt+"?",jt,It,Rt,"[\\ud800-\\udfff]"].join("|")+")",Vt=RegExp("['’]","g"),zt=RegExp(jt,"g"),Gt=RegExp(kt+"(?="+kt+")|"+Ht+Ft,"g"),qt=RegExp([Lt+"?"+Ct+"+"+Nt+"(?="+[Ot,Lt,"$"].join("|")+")",Mt+"+"+$t+"(?="+[Ot,Lt+Dt,"$"].join("|")+")",Lt+"?"+Dt+"+"+Nt,Lt+"+"+$t,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",At,Kt].join("|"),"g"),Wt=RegExp("[\\u200d\\ud800-\\udfff"+_t+"\\ufe0e\\ufe0f]"),Zt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yt=["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"],Jt=-1,Xt={};Xt[R]=Xt[L]=Xt[D]=Xt[M]=Xt[N]=Xt[$]=Xt[B]=Xt[U]=Xt[F]=!0,Xt[v]=Xt[y]=Xt[T]=Xt[g]=Xt[I]=Xt[m]=Xt[b]=Xt[w]=Xt[S]=Xt[x]=Xt[E]=Xt[j]=Xt[A]=Xt[C]=Xt[k]=!1;var Qt={};Qt[v]=Qt[y]=Qt[T]=Qt[I]=Qt[g]=Qt[m]=Qt[R]=Qt[L]=Qt[D]=Qt[M]=Qt[N]=Qt[S]=Qt[x]=Qt[E]=Qt[j]=Qt[A]=Qt[C]=Qt[P]=Qt[$]=Qt[B]=Qt[U]=Qt[F]=!0,Qt[b]=Qt[w]=Qt[k]=!1;var te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ee=parseFloat,ne=parseInt,re="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,oe="object"==typeof self&&self&&self.Object===Object&&self,ie=re||oe||Function("return this")(),ae=e&&!e.nodeType&&e,ue=ae&&t&&!t.nodeType&&t,se=ue&&ue.exports===ae,ce=se&&re.process,le=function(){try{return ue&&ue.require&&ue.require("util").types||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),fe=le&&le.isArrayBuffer,he=le&&le.isDate,pe=le&&le.isMap,de=le&&le.isRegExp,ve=le&&le.isSet,ye=le&&le.isTypedArray;function ge(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function me(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var a=t[o];e(r,a,n(a),t)}return r}function be(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function we(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function _e(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Se(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}function xe(t,e){return!(null==t||!t.length)&&Re(t,e,0)>-1}function Ee(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Oe(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function je(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Ae(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function Ce(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function Pe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var ke=Ne("length");function Te(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function Ie(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Re(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Ie(t,De,n)}function Le(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function De(t){return t!=t}function Me(t,e){var n=null==t?0:t.length;return n?Ue(t,e)/n:h}function Ne(t){return function(e){return null==e?o:e[t]}}function $e(t){return function(e){return null==t?o:t[e]}}function Be(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function Ue(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function Fe(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ke(t){return t?t.slice(0,an(t)+1).replace(rt,""):t}function He(t){return function(e){return t(e)}}function Ve(t,e){return Oe(e,(function(e){return t[e]}))}function ze(t,e){return t.has(e)}function Ge(t,e){for(var n=-1,r=t.length;++n<r&&Re(e,t[n],0)>-1;);return n}function qe(t,e){for(var n=t.length;n--&&Re(e,t[n],0)>-1;);return n}function We(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Ze=$e({À:"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"}),Ye=$e({"&":"&","<":"<",">":">",'"':""","'":"'"});function Je(t){return"\\"+te[t]}function Xe(t){return Wt.test(t)}function Qe(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function tn(t,e){return function(n){return t(e(n))}}function en(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var a=t[n];a!==e&&a!==u||(t[n]=u,i[o++]=n)}return i}function nn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function rn(t){return Xe(t)?function(t){for(var e=Gt.lastIndex=0;Gt.test(t);)++e;return e}(t):ke(t)}function on(t){return Xe(t)?function(t){return t.match(Gt)||[]}(t):function(t){return t.split("")}(t)}function an(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var un=$e({"&":"&","<":"<",">":">",""":'"',"'":"'"}),sn=function t(e){var n,r=(e=null==e?ie:sn.defaults(ie.Object(),e,sn.pick(ie,Yt))).Array,ot=e.Date,_t=e.Error,St=e.Function,xt=e.Math,Et=e.Object,Ot=e.RegExp,jt=e.String,At=e.TypeError,Ct=r.prototype,Pt=St.prototype,kt=Et.prototype,Tt=e["__core-js_shared__"],It=Pt.toString,Rt=kt.hasOwnProperty,Lt=0,Dt=(n=/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Mt=kt.toString,Nt=It.call(Et),$t=ie._,Bt=Ot("^"+It.call(Rt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ut=se?e.Buffer:o,Ft=e.Symbol,Kt=e.Uint8Array,Ht=Ut?Ut.allocUnsafe:o,Gt=tn(Et.getPrototypeOf,Et),Wt=Et.create,te=kt.propertyIsEnumerable,re=Ct.splice,oe=Ft?Ft.isConcatSpreadable:o,ae=Ft?Ft.iterator:o,ue=Ft?Ft.toStringTag:o,ce=function(){try{var t=ci(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),le=e.clearTimeout!==ie.clearTimeout&&e.clearTimeout,ke=ot&&ot.now!==ie.Date.now&&ot.now,$e=e.setTimeout!==ie.setTimeout&&e.setTimeout,cn=xt.ceil,ln=xt.floor,fn=Et.getOwnPropertySymbols,hn=Ut?Ut.isBuffer:o,pn=e.isFinite,dn=Ct.join,vn=tn(Et.keys,Et),yn=xt.max,gn=xt.min,mn=ot.now,bn=e.parseInt,wn=xt.random,_n=Ct.reverse,Sn=ci(e,"DataView"),xn=ci(e,"Map"),En=ci(e,"Promise"),On=ci(e,"Set"),jn=ci(e,"WeakMap"),An=ci(Et,"create"),Cn=jn&&new jn,Pn={},kn=$i(Sn),Tn=$i(xn),In=$i(En),Rn=$i(On),Ln=$i(jn),Dn=Ft?Ft.prototype:o,Mn=Dn?Dn.valueOf:o,Nn=Dn?Dn.toString:o;function $n(t){if(eu(t)&&!Va(t)&&!(t instanceof Kn)){if(t instanceof Fn)return t;if(Rt.call(t,"__wrapped__"))return Bi(t)}return new Fn(t)}var Bn=function(){function t(){}return function(e){if(!tu(e))return{};if(Wt)return Wt(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function Un(){}function Fn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function Kn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new zn;++e<n;)this.add(t[e])}function qn(t){var e=this.__data__=new Vn(t);this.size=e.size}function Wn(t,e){var n=Va(t),r=!n&&Ha(t),o=!n&&!r&&Wa(t),i=!n&&!r&&!o&&cu(t),a=n||r||o||i,u=a?Fe(t.length,jt):[],s=u.length;for(var c in t)!e&&!Rt.call(t,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yi(c,s))||u.push(c);return u}function Zn(t){var e=t.length;return e?t[zr(0,e-1)]:o}function Yn(t,e){return Ri(Ao(t),ir(e,0,t.length))}function Jn(t){return Ri(Ao(t))}function Xn(t,e,n){(n!==o&&!Ua(t[e],n)||n===o&&!(e in t))&&rr(t,e,n)}function Qn(t,e,n){var r=t[e];Rt.call(t,e)&&Ua(r,n)&&(n!==o||e in t)||rr(t,e,n)}function tr(t,e){for(var n=t.length;n--;)if(Ua(t[n][0],e))return n;return-1}function er(t,e,n,r){return lr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function nr(t,e){return t&&Co(e,Tu(e),t)}function rr(t,e,n){"__proto__"==e&&ce?ce(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function or(t,e){for(var n=-1,i=e.length,a=r(i),u=null==t;++n<i;)a[n]=u?o:ju(t,e[n]);return a}function ir(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function ar(t,e,n,r,i,a){var u,s=1&e,c=2&e,l=4&e;if(n&&(u=i?n(t,r,i,a):n(t)),u!==o)return u;if(!tu(t))return t;var f=Va(t);if(f){if(u=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Ao(t,u)}else{var h=hi(t),p=h==w||h==_;if(Wa(t))return _o(t,s);if(h==E||h==v||p&&!i){if(u=c||p?{}:di(t),!s)return c?function(t,e){return Co(t,fi(t),e)}(t,function(t,e){return t&&Co(e,Iu(e),t)}(u,t)):function(t,e){return Co(t,li(t),e)}(t,nr(u,t))}else{if(!Qt[h])return i?t:{};u=function(t,e,n){var r,o=t.constructor;switch(e){case T:return So(t);case g:case m:return new o(+t);case I:return function(t,e){var n=e?So(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case L:case D:case M:case N:case $:case B:case U:case F:return xo(t,n);case S:return new o;case x:case C:return new o(t);case j:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case A:return new o;case P:return r=t,Mn?Et(Mn.call(r)):{}}}(t,h,s)}}a||(a=new qn);var d=a.get(t);if(d)return d;a.set(t,u),au(t)?t.forEach((function(r){u.add(ar(r,e,n,r,t,a))})):nu(t)&&t.forEach((function(r,o){u.set(o,ar(r,e,n,o,t,a))}));var y=f?o:(l?c?ni:ei:c?Iu:Tu)(t);return be(y||t,(function(r,o){y&&(r=t[o=r]),Qn(u,o,ar(r,e,n,o,t,a))})),u}function ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=Et(t);r--;){var i=n[r],a=e[i],u=t[i];if(u===o&&!(i in t)||!a(u))return!1}return!0}function sr(t,e,n){if("function"!=typeof t)throw new At(i);return Pi((function(){t.apply(o,n)}),e)}function cr(t,e,n,r){var o=-1,i=xe,a=!0,u=t.length,s=[],c=e.length;if(!u)return s;n&&(e=Oe(e,He(n))),r?(i=Ee,a=!1):e.length>=200&&(i=ze,a=!1,e=new Gn(e));t:for(;++o<u;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var h=c;h--;)if(e[h]===f)continue t;s.push(l)}else i(e,f,r)||s.push(l)}return s}$n.templateSettings={escape:Z,evaluate:Y,interpolate:J,variable:"",imports:{_:$n}},$n.prototype=Un.prototype,$n.prototype.constructor=$n,Fn.prototype=Bn(Un.prototype),Fn.prototype.constructor=Fn,Kn.prototype=Bn(Un.prototype),Kn.prototype.constructor=Kn,Hn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Hn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hn.prototype.get=function(t){var e=this.__data__;if(An){var n=e[t];return n===a?o:n}return Rt.call(e,t)?e[t]:o},Hn.prototype.has=function(t){var e=this.__data__;return An?e[t]!==o:Rt.call(e,t)},Hn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=An&&e===o?a:e,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(t){var e=this.__data__,n=tr(e,t);return!(n<0||(n==e.length-1?e.pop():re.call(e,n,1),--this.size,0))},Vn.prototype.get=function(t){var e=this.__data__,n=tr(e,t);return n<0?o:e[n][1]},Vn.prototype.has=function(t){return tr(this.__data__,t)>-1},Vn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(xn||Vn),string:new Hn}},zn.prototype.delete=function(t){var e=ui(this,t).delete(t);return this.size-=e?1:0,e},zn.prototype.get=function(t){return ui(this,t).get(t)},zn.prototype.has=function(t){return ui(this,t).has(t)},zn.prototype.set=function(t,e){var n=ui(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(t){return this.__data__.set(t,a),this},Gn.prototype.has=function(t){return this.__data__.has(t)},qn.prototype.clear=function(){this.__data__=new Vn,this.size=0},qn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},qn.prototype.get=function(t){return this.__data__.get(t)},qn.prototype.has=function(t){return this.__data__.has(t)},qn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!xn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(t,e),this.size=n.size,this};var lr=To(mr),fr=To(br,!0);function hr(t,e){var n=!0;return lr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function pr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],u=e(a);if(null!=u&&(s===o?u==u&&!su(u):n(u,s)))var s=u,c=a}return c}function dr(t,e){var n=[];return lr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function vr(t,e,n,r,o){var i=-1,a=t.length;for(n||(n=vi),o||(o=[]);++i<a;){var u=t[i];e>0&&n(u)?e>1?vr(u,e-1,n,r,o):je(o,u):r||(o[o.length]=u)}return o}var yr=Io(),gr=Io(!0);function mr(t,e){return t&&yr(t,e,Tu)}function br(t,e){return t&&gr(t,e,Tu)}function wr(t,e){return Se(e,(function(e){return Ja(t[e])}))}function _r(t,e){for(var n=0,r=(e=go(e,t)).length;null!=t&&n<r;)t=t[Ni(e[n++])];return n&&n==r?t:o}function Sr(t,e,n){var r=e(t);return Va(t)?r:je(r,n(t))}function xr(t){return null==t?t===o?"[object Undefined]":"[object Null]":ue&&ue in Et(t)?function(t){var e=Rt.call(t,ue),n=t[ue];try{t[ue]=o;var r=!0}catch(t){}var i=Mt.call(t);return r&&(e?t[ue]=n:delete t[ue]),i}(t):function(t){return Mt.call(t)}(t)}function Er(t,e){return t>e}function Or(t,e){return null!=t&&Rt.call(t,e)}function jr(t,e){return null!=t&&e in Et(t)}function Ar(t,e,n){for(var i=n?Ee:xe,a=t[0].length,u=t.length,s=u,c=r(u),l=1/0,f=[];s--;){var h=t[s];s&&e&&(h=Oe(h,He(e))),l=gn(h.length,l),c[s]=!n&&(e||a>=120&&h.length>=120)?new Gn(s&&h):o}h=t[0];var p=-1,d=c[0];t:for(;++p<a&&f.length<l;){var v=h[p],y=e?e(v):v;if(v=n||0!==v?v:0,!(d?ze(d,y):i(f,y,n))){for(s=u;--s;){var g=c[s];if(!(g?ze(g,y):i(t[s],y,n)))continue t}d&&d.push(y),f.push(v)}}return f}function Cr(t,e,n){var r=null==(t=Oi(t,e=go(e,t)))?t:t[Ni(Yi(e))];return null==r?o:ge(r,t,n)}function Pr(t){return eu(t)&&xr(t)==v}function kr(t,e,n,r,i){return t===e||(null==t||null==e||!eu(t)&&!eu(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var u=Va(t),s=Va(e),c=u?y:hi(t),l=s?y:hi(e),f=(c=c==v?E:c)==E,h=(l=l==v?E:l)==E,p=c==l;if(p&&Wa(t)){if(!Wa(e))return!1;u=!0,f=!1}if(p&&!f)return a||(a=new qn),u||cu(t)?Qo(t,e,n,r,i,a):function(t,e,n,r,o,i,a){switch(n){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case T:return!(t.byteLength!=e.byteLength||!i(new Kt(t),new Kt(e)));case g:case m:case x:return Ua(+t,+e);case b:return t.name==e.name&&t.message==e.message;case j:case C:return t==e+"";case S:var u=Qe;case A:var s=1&r;if(u||(u=nn),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=Qo(u(t),u(e),r,o,i,a);return a.delete(t),l;case P:if(Mn)return Mn.call(t)==Mn.call(e)}return!1}(t,e,c,n,r,i,a);if(!(1&n)){var d=f&&Rt.call(t,"__wrapped__"),w=h&&Rt.call(e,"__wrapped__");if(d||w){var _=d?t.value():t,O=w?e.value():e;return a||(a=new qn),i(_,O,n,r,a)}}return!!p&&(a||(a=new qn),function(t,e,n,r,i,a){var u=1&n,s=ei(t),c=s.length;if(c!=ei(e).length&&!u)return!1;for(var l=c;l--;){var f=s[l];if(!(u?f in e:Rt.call(e,f)))return!1}var h=a.get(t),p=a.get(e);if(h&&p)return h==e&&p==t;var d=!0;a.set(t,e),a.set(e,t);for(var v=u;++l<c;){var y=t[f=s[l]],g=e[f];if(r)var m=u?r(g,y,f,e,t,a):r(y,g,f,t,e,a);if(!(m===o?y===g||i(y,g,n,r,a):m)){d=!1;break}v||(v="constructor"==f)}if(d&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(d=!1)}return a.delete(t),a.delete(e),d}(t,e,n,r,i,a))}(t,e,n,r,kr,i))}function Tr(t,e,n,r){var i=n.length,a=i,u=!r;if(null==t)return!a;for(t=Et(t);i--;){var s=n[i];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var c=(s=n[i])[0],l=t[c],f=s[1];if(u&&s[2]){if(l===o&&!(c in t))return!1}else{var h=new qn;if(r)var p=r(l,f,c,t,e,h);if(!(p===o?kr(f,l,3,r,h):p))return!1}}return!0}function Ir(t){return!(!tu(t)||(e=t,Dt&&Dt in e))&&(Ja(t)?Bt:vt).test($i(t));var e}function Rr(t){return"function"==typeof t?t:null==t?rs:"object"==typeof t?Va(t)?$r(t[0],t[1]):Nr(t):hs(t)}function Lr(t){if(!_i(t))return vn(t);var e=[];for(var n in Et(t))Rt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Dr(t,e){return t<e}function Mr(t,e){var n=-1,o=Ga(t)?r(t.length):[];return lr(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}function Nr(t){var e=si(t);return 1==e.length&&e[0][2]?xi(e[0][0],e[0][1]):function(n){return n===t||Tr(n,t,e)}}function $r(t,e){return mi(t)&&Si(e)?xi(Ni(t),e):function(n){var r=ju(n,t);return r===o&&r===e?Au(n,t):kr(e,r,3)}}function Br(t,e,n,r,i){t!==e&&yr(e,(function(a,u){if(i||(i=new qn),tu(a))!function(t,e,n,r,i,a,u){var s=Ai(t,n),c=Ai(e,n),l=u.get(c);if(l)Xn(t,n,l);else{var f=a?a(s,c,n+"",t,e,u):o,h=f===o;if(h){var p=Va(c),d=!p&&Wa(c),v=!p&&!d&&cu(c);f=c,p||d||v?Va(s)?f=s:qa(s)?f=Ao(s):d?(h=!1,f=_o(c,!0)):v?(h=!1,f=xo(c,!0)):f=[]:ou(c)||Ha(c)?(f=s,Ha(s)?f=gu(s):tu(s)&&!Ja(s)||(f=di(c))):h=!1}h&&(u.set(c,f),i(f,c,r,a,u),u.delete(c)),Xn(t,n,f)}}(t,e,u,n,Br,r,i);else{var s=r?r(Ai(t,u),a,u+"",t,e,i):o;s===o&&(s=a),Xn(t,u,s)}}),Iu)}function Ur(t,e){var n=t.length;if(n)return yi(e+=e<0?n:0,n)?t[e]:o}function Fr(t,e,n){e=e.length?Oe(e,(function(t){return Va(t)?function(e){return _r(e,1===t.length?t[0]:t)}:t})):[rs];var r=-1;e=Oe(e,He(ai()));var o=Mr(t,(function(t,n,o){var i=Oe(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,a=o.length,u=n.length;++r<a;){var s=Eo(o[r],i[r]);if(s)return r>=u?s:s*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(o)}function Kr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var a=e[r],u=_r(t,a);n(u,a)&&Yr(i,go(a,t),u)}return i}function Hr(t,e,n,r){var o=r?Le:Re,i=-1,a=e.length,u=t;for(t===e&&(e=Ao(e)),n&&(u=Oe(t,He(n)));++i<a;)for(var s=0,c=e[i],l=n?n(c):c;(s=o(u,l,s,r))>-1;)u!==t&&re.call(u,s,1),re.call(t,s,1);return t}function Vr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;yi(o)?re.call(t,o,1):so(t,o)}}return t}function zr(t,e){return t+ln(wn()*(e-t+1))}function Gr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=ln(e/2))&&(t+=t)}while(e);return n}function qr(t,e){return ki(Ei(t,e,rs),t+"")}function Wr(t){return Zn(Uu(t))}function Zr(t,e){var n=Uu(t);return Ri(n,ir(e,0,n.length))}function Yr(t,e,n,r){if(!tu(t))return t;for(var i=-1,a=(e=go(e,t)).length,u=a-1,s=t;null!=s&&++i<a;){var c=Ni(e[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=u){var f=s[c];(l=r?r(f,c,s):o)===o&&(l=tu(f)?f:yi(e[i+1])?[]:{})}Qn(s,c,l),s=s[c]}return t}var Jr=Cn?function(t,e){return Cn.set(t,e),t}:rs,Xr=ce?function(t,e){return ce(t,"toString",{configurable:!0,enumerable:!1,value:ts(e),writable:!0})}:rs;function Qr(t){return Ri(Uu(t))}function to(t,e,n){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=r(i);++o<i;)a[o]=t[o+e];return a}function eo(t,e){var n;return lr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function no(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=t[i];null!==a&&!su(a)&&(n?a<=e:a<e)?r=i+1:o=i}return o}return ro(t,e,rs,n)}function ro(t,e,n,r){var i=0,a=null==t?0:t.length;if(0===a)return 0;for(var u=(e=n(e))!=e,s=null===e,c=su(e),l=e===o;i<a;){var f=ln((i+a)/2),h=n(t[f]),p=h!==o,d=null===h,v=h==h,y=su(h);if(u)var g=r||v;else g=l?v&&(r||p):s?v&&p&&(r||!d):c?v&&p&&!d&&(r||!y):!d&&!y&&(r?h<=e:h<e);g?i=f+1:a=f}return gn(a,4294967294)}function oo(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var a=t[n],u=e?e(a):a;if(!n||!Ua(u,s)){var s=u;i[o++]=0===a?0:a}}return i}function io(t){return"number"==typeof t?t:su(t)?h:+t}function ao(t){if("string"==typeof t)return t;if(Va(t))return Oe(t,ao)+"";if(su(t))return Nn?Nn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function uo(t,e,n){var r=-1,o=xe,i=t.length,a=!0,u=[],s=u;if(n)a=!1,o=Ee;else if(i>=200){var c=e?null:qo(t);if(c)return nn(c);a=!1,o=ze,s=new Gn}else s=e?[]:u;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=s.length;h--;)if(s[h]===f)continue t;e&&s.push(f),u.push(l)}else o(s,f,n)||(s!==u&&s.push(f),u.push(l))}return u}function so(t,e){return null==(t=Oi(t,e=go(e,t)))||delete t[Ni(Yi(e))]}function co(t,e,n,r){return Yr(t,e,n(_r(t,e)),r)}function lo(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?to(t,r?0:i,r?i+1:o):to(t,r?i+1:0,r?o:i)}function fo(t,e){var n=t;return n instanceof Kn&&(n=n.value()),Ae(e,(function(t,e){return e.func.apply(e.thisArg,je([t],e.args))}),n)}function ho(t,e,n){var o=t.length;if(o<2)return o?uo(t[0]):[];for(var i=-1,a=r(o);++i<o;)for(var u=t[i],s=-1;++s<o;)s!=i&&(a[i]=cr(a[i]||u,t[s],e,n));return uo(vr(a,1),e,n)}function po(t,e,n){for(var r=-1,i=t.length,a=e.length,u={};++r<i;){var s=r<a?e[r]:o;n(u,t[r],s)}return u}function vo(t){return qa(t)?t:[]}function yo(t){return"function"==typeof t?t:rs}function go(t,e){return Va(t)?t:mi(t,e)?[t]:Mi(mu(t))}var mo=qr;function bo(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:to(t,e,n)}var wo=le||function(t){return ie.clearTimeout(t)};function _o(t,e){if(e)return t.slice();var n=t.length,r=Ht?Ht(n):new t.constructor(n);return t.copy(r),r}function So(t){var e=new t.constructor(t.byteLength);return new Kt(e).set(new Kt(t)),e}function xo(t,e){var n=e?So(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Eo(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=su(t),u=e!==o,s=null===e,c=e==e,l=su(e);if(!s&&!l&&!a&&t>e||a&&u&&c&&!s&&!l||r&&u&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||s&&n&&i||!u&&i||!c)return-1}return 0}function Oo(t,e,n,o){for(var i=-1,a=t.length,u=n.length,s=-1,c=e.length,l=yn(a-u,0),f=r(c+l),h=!o;++s<c;)f[s]=e[s];for(;++i<u;)(h||i<a)&&(f[n[i]]=t[i]);for(;l--;)f[s++]=t[i++];return f}function jo(t,e,n,o){for(var i=-1,a=t.length,u=-1,s=n.length,c=-1,l=e.length,f=yn(a-s,0),h=r(f+l),p=!o;++i<f;)h[i]=t[i];for(var d=i;++c<l;)h[d+c]=e[c];for(;++u<s;)(p||i<a)&&(h[d+n[u]]=t[i++]);return h}function Ao(t,e){var n=-1,o=t.length;for(e||(e=r(o));++n<o;)e[n]=t[n];return e}function Co(t,e,n,r){var i=!n;n||(n={});for(var a=-1,u=e.length;++a<u;){var s=e[a],c=r?r(n[s],t[s],s,n,t):o;c===o&&(c=t[s]),i?rr(n,s,c):Qn(n,s,c)}return n}function Po(t,e){return function(n,r){var o=Va(n)?me:er,i=e?e():{};return o(n,t,ai(r,2),i)}}function ko(t){return qr((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,u=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,u&&gi(n[0],n[1],u)&&(a=i<3?o:a,i=1),e=Et(e);++r<i;){var s=n[r];s&&t(e,s,r,a)}return e}))}function To(t,e){return function(n,r){if(null==n)return n;if(!Ga(n))return t(n,r);for(var o=n.length,i=e?o:-1,a=Et(n);(e?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Io(t){return function(e,n,r){for(var o=-1,i=Et(e),a=r(e),u=a.length;u--;){var s=a[t?u:++o];if(!1===n(i[s],s,i))break}return e}}function Ro(t){return function(e){var n=Xe(e=mu(e))?on(e):o,r=n?n[0]:e.charAt(0),i=n?bo(n,1).join(""):e.slice(1);return r[t]()+i}}function Lo(t){return function(e){return Ae(Ju(Hu(e).replace(Vt,"")),t,"")}}function Do(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Bn(t.prototype),r=t.apply(n,e);return tu(r)?r:n}}function Mo(t){return function(e,n,r){var i=Et(e);if(!Ga(e)){var a=ai(n,3);e=Tu(e),n=function(t){return a(i[t],t,i)}}var u=t(e,n,r);return u>-1?i[a?e[u]:u]:o}}function No(t){return ti((function(e){var n=e.length,r=n,a=Fn.prototype.thru;for(t&&e.reverse();r--;){var u=e[r];if("function"!=typeof u)throw new At(i);if(a&&!s&&"wrapper"==oi(u))var s=new Fn([],!0)}for(r=s?r:n;++r<n;){var c=oi(u=e[r]),l="wrapper"==c?ri(u):o;s=l&&bi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?s[oi(l[0])].apply(s,l[3]):1==u.length&&bi(u)?s[c]():s.thru(u)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&Va(r))return s.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))}function $o(t,e,n,i,a,u,s,l,f,h){var p=e&c,d=1&e,v=2&e,y=24&e,g=512&e,m=v?o:Do(t);return function o(){for(var c=arguments.length,b=r(c),w=c;w--;)b[w]=arguments[w];if(y)var _=ii(o),S=We(b,_);if(i&&(b=Oo(b,i,a,y)),u&&(b=jo(b,u,s,y)),c-=S,y&&c<h){var x=en(b,_);return zo(t,e,$o,o.placeholder,n,b,x,l,f,h-c)}var E=d?n:this,O=v?E[t]:t;return c=b.length,l?b=ji(b,l):g&&c>1&&b.reverse(),p&&f<c&&(b.length=f),this&&this!==ie&&this instanceof o&&(O=m||Do(O)),O.apply(E,b)}}function Bo(t,e){return function(n,r){return function(t,e,n,r){return mr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function Uo(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ao(n),r=ao(r)):(n=io(n),r=io(r)),i=t(n,r)}return i}}function Fo(t){return ti((function(e){return e=Oe(e,He(ai())),qr((function(n){var r=this;return t(e,(function(t){return ge(t,r,n)}))}))}))}function Ko(t,e){var n=(e=e===o?" ":ao(e)).length;if(n<2)return n?Gr(e,t):e;var r=Gr(e,cn(t/rn(e)));return Xe(e)?bo(on(r),0,t).join(""):r.slice(0,t)}function Ho(t){return function(e,n,i){return i&&"number"!=typeof i&&gi(e,n,i)&&(n=i=o),e=pu(e),n===o?(n=e,e=0):n=pu(n),function(t,e,n,o){for(var i=-1,a=yn(cn((e-t)/(n||1)),0),u=r(a);a--;)u[o?a:++i]=t,t+=n;return u}(e,n,i=i===o?e<n?1:-1:pu(i),t)}}function Vo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=yu(e),n=yu(n)),t(e,n)}}function zo(t,e,n,r,i,a,u,c,l,f){var h=8&e;e|=h?s:64,4&(e&=~(h?64:s))||(e&=-4);var p=[t,e,i,h?a:o,h?u:o,h?o:a,h?o:u,c,l,f],d=n.apply(o,p);return bi(t)&&Ci(d,p),d.placeholder=r,Ti(d,t,e)}function Go(t){var e=xt[t];return function(t,n){if(t=yu(t),(n=null==n?0:gn(du(n),292))&&pn(t)){var r=(mu(t)+"e").split("e");return+((r=(mu(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var qo=On&&1/nn(new On([,-0]))[1]==l?function(t){return new On(t)}:ss;function Wo(t){return function(e){var n=hi(e);return n==S?Qe(e):n==A?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):function(t,e){return Oe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Zo(t,e,n,a,l,f,h,p){var d=2&e;if(!d&&"function"!=typeof t)throw new At(i);var v=a?a.length:0;if(v||(e&=-97,a=l=o),h=h===o?h:yn(du(h),0),p=p===o?p:du(p),v-=l?l.length:0,64&e){var y=a,g=l;a=l=o}var m=d?o:ri(t),b=[t,e,n,a,l,y,g,f,h,p];if(m&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,a=r==c&&8==n||r==c&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!a)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var s=e[3];if(s){var l=t[3];t[3]=l?Oo(l,s,e[4]):s,t[4]=l?en(t[3],u):e[4]}(s=e[5])&&(l=t[5],t[5]=l?jo(l,s,e[6]):s,t[6]=l?en(t[5],u):e[6]),(s=e[7])&&(t[7]=s),r&c&&(t[8]=null==t[8]?e[8]:gn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(b,m),t=b[0],e=b[1],n=b[2],a=b[3],l=b[4],!(p=b[9]=b[9]===o?d?0:t.length:yn(b[9]-v,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,n){var i=Do(t);return function a(){for(var u=arguments.length,s=r(u),c=u,l=ii(a);c--;)s[c]=arguments[c];var f=u<3&&s[0]!==l&&s[u-1]!==l?[]:en(s,l);return(u-=f.length)<n?zo(t,e,$o,a.placeholder,o,s,f,o,o,n-u):ge(this&&this!==ie&&this instanceof a?i:t,this,s)}}(t,e,p):e!=s&&33!=e||l.length?$o.apply(o,b):function(t,e,n,o){var i=1&e,a=Do(t);return function e(){for(var u=-1,s=arguments.length,c=-1,l=o.length,f=r(l+s),h=this&&this!==ie&&this instanceof e?a:t;++c<l;)f[c]=o[c];for(;s--;)f[c++]=arguments[++u];return ge(h,i?n:this,f)}}(t,e,n,a);else var w=function(t,e,n){var r=1&e,o=Do(t);return function e(){return(this&&this!==ie&&this instanceof e?o:t).apply(r?n:this,arguments)}}(t,e,n);return Ti((m?Jr:Ci)(w,b),t,e)}function Yo(t,e,n,r){return t===o||Ua(t,kt[n])&&!Rt.call(r,n)?e:t}function Jo(t,e,n,r,i,a){return tu(t)&&tu(e)&&(a.set(e,t),Br(t,e,o,Jo,a),a.delete(e)),t}function Xo(t){return ou(t)?o:t}function Qo(t,e,n,r,i,a){var u=1&n,s=t.length,c=e.length;if(s!=c&&!(u&&c>s))return!1;var l=a.get(t),f=a.get(e);if(l&&f)return l==e&&f==t;var h=-1,p=!0,d=2&n?new Gn:o;for(a.set(t,e),a.set(e,t);++h<s;){var v=t[h],y=e[h];if(r)var g=u?r(y,v,h,e,t,a):r(v,y,h,t,e,a);if(g!==o){if(g)continue;p=!1;break}if(d){if(!Pe(e,(function(t,e){if(!ze(d,e)&&(v===t||i(v,t,n,r,a)))return d.push(e)}))){p=!1;break}}else if(v!==y&&!i(v,y,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function ti(t){return ki(Ei(t,o,zi),t+"")}function ei(t){return Sr(t,Tu,li)}function ni(t){return Sr(t,Iu,fi)}var ri=Cn?function(t){return Cn.get(t)}:ss;function oi(t){for(var e=t.name+"",n=Pn[e],r=Rt.call(Pn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ii(t){return(Rt.call($n,"placeholder")?$n:t).placeholder}function ai(){var t=$n.iteratee||os;return t=t===os?Rr:t,arguments.length?t(arguments[0],arguments[1]):t}function ui(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function si(t){for(var e=Tu(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Si(o)]}return e}function ci(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Ir(n)?n:o}var li=fn?function(t){return null==t?[]:(t=Et(t),Se(fn(t),(function(e){return te.call(t,e)})))}:vs,fi=fn?function(t){for(var e=[];t;)je(e,li(t)),t=Gt(t);return e}:vs,hi=xr;function pi(t,e,n){for(var r=-1,o=(e=go(e,t)).length,i=!1;++r<o;){var a=Ni(e[r]);if(!(i=null!=t&&n(t,a)))break;t=t[a]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Qa(o)&&yi(a,o)&&(Va(t)||Ha(t))}function di(t){return"function"!=typeof t.constructor||_i(t)?{}:Bn(Gt(t))}function vi(t){return Va(t)||Ha(t)||!!(oe&&t&&t[oe])}function yi(t,e){var n=typeof t;return!!(e=null==e?f:e)&&("number"==n||"symbol"!=n&>.test(t))&&t>-1&&t%1==0&&t<e}function gi(t,e,n){if(!tu(n))return!1;var r=typeof e;return!!("number"==r?Ga(n)&&yi(e,n.length):"string"==r&&e in n)&&Ua(n[e],t)}function mi(t,e){if(Va(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!su(t))||Q.test(t)||!X.test(t)||null!=e&&t in Et(e)}function bi(t){var e=oi(t),n=$n[e];if("function"!=typeof n||!(e in Kn.prototype))return!1;if(t===n)return!0;var r=ri(n);return!!r&&t===r[0]}(Sn&&hi(new Sn(new ArrayBuffer(1)))!=I||xn&&hi(new xn)!=S||En&&hi(En.resolve())!=O||On&&hi(new On)!=A||jn&&hi(new jn)!=k)&&(hi=function(t){var e=xr(t),n=e==E?t.constructor:o,r=n?$i(n):"";if(r)switch(r){case kn:return I;case Tn:return S;case In:return O;case Rn:return A;case Ln:return k}return e});var wi=Tt?Ja:ys;function _i(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||kt)}function Si(t){return t==t&&!tu(t)}function xi(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in Et(n))}}function Ei(t,e,n){return e=yn(e===o?t.length-1:e,0),function(){for(var o=arguments,i=-1,a=yn(o.length-e,0),u=r(a);++i<a;)u[i]=o[e+i];i=-1;for(var s=r(e+1);++i<e;)s[i]=o[i];return s[e]=n(u),ge(t,this,s)}}function Oi(t,e){return e.length<2?t:_r(t,to(e,0,-1))}function ji(t,e){for(var n=t.length,r=gn(e.length,n),i=Ao(t);r--;){var a=e[r];t[r]=yi(a,n)?i[a]:o}return t}function Ai(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ci=Ii(Jr),Pi=$e||function(t,e){return ie.setTimeout(t,e)},ki=Ii(Xr);function Ti(t,e,n){var r=e+"";return ki(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return be(d,(function(n){var r="_."+n[0];e&n[1]&&!xe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(at);return e?e[1].split(ut):[]}(r),n)))}function Ii(t){var e=0,n=0;return function(){var r=mn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Ri(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=zr(n,i),u=t[a];t[a]=t[n],t[n]=u}return t.length=e,t}var Li,Di,Mi=(Li=La((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,o){e.push(r?o.replace(lt,"$1"):n||t)})),e}),(function(t){return 500===Di.size&&Di.clear(),t})),Di=Li.cache,Li);function Ni(t){if("string"==typeof t||su(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function $i(t){if(null!=t){try{return It.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Bi(t){if(t instanceof Kn)return t.clone();var e=new Fn(t.__wrapped__,t.__chain__);return e.__actions__=Ao(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Ui=qr((function(t,e){return qa(t)?cr(t,vr(e,1,qa,!0)):[]})),Fi=qr((function(t,e){var n=Yi(e);return qa(n)&&(n=o),qa(t)?cr(t,vr(e,1,qa,!0),ai(n,2)):[]})),Ki=qr((function(t,e){var n=Yi(e);return qa(n)&&(n=o),qa(t)?cr(t,vr(e,1,qa,!0),o,n):[]}));function Hi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:du(n);return o<0&&(o=yn(r+o,0)),Ie(t,ai(e,3),o)}function Vi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=du(n),i=n<0?yn(r+i,0):gn(i,r-1)),Ie(t,ai(e,3),i,!0)}function zi(t){return null!=t&&t.length?vr(t,1):[]}function Gi(t){return t&&t.length?t[0]:o}var qi=qr((function(t){var e=Oe(t,vo);return e.length&&e[0]===t[0]?Ar(e):[]})),Wi=qr((function(t){var e=Yi(t),n=Oe(t,vo);return e===Yi(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Ar(n,ai(e,2)):[]})),Zi=qr((function(t){var e=Yi(t),n=Oe(t,vo);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?Ar(n,o,e):[]}));function Yi(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ji=qr(Xi);function Xi(t,e){return t&&t.length&&e&&e.length?Hr(t,e):t}var Qi=ti((function(t,e){var n=null==t?0:t.length,r=or(t,e);return Vr(t,Oe(e,(function(t){return yi(t,n)?+t:t})).sort(Eo)),r}));function ta(t){return null==t?t:_n.call(t)}var ea=qr((function(t){return uo(vr(t,1,qa,!0))})),na=qr((function(t){var e=Yi(t);return qa(e)&&(e=o),uo(vr(t,1,qa,!0),ai(e,2))})),ra=qr((function(t){var e=Yi(t);return e="function"==typeof e?e:o,uo(vr(t,1,qa,!0),o,e)}));function oa(t){if(!t||!t.length)return[];var e=0;return t=Se(t,(function(t){if(qa(t))return e=yn(t.length,e),!0})),Fe(e,(function(e){return Oe(t,Ne(e))}))}function ia(t,e){if(!t||!t.length)return[];var n=oa(t);return null==e?n:Oe(n,(function(t){return ge(e,o,t)}))}var aa=qr((function(t,e){return qa(t)?cr(t,e):[]})),ua=qr((function(t){return ho(Se(t,qa))})),sa=qr((function(t){var e=Yi(t);return qa(e)&&(e=o),ho(Se(t,qa),ai(e,2))})),ca=qr((function(t){var e=Yi(t);return e="function"==typeof e?e:o,ho(Se(t,qa),o,e)})),la=qr(oa),fa=qr((function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,ia(t,n)}));function ha(t){var e=$n(t);return e.__chain__=!0,e}function pa(t,e){return e(t)}var da=ti((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return or(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Kn&&yi(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:pa,args:[i],thisArg:o}),new Fn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)})),va=Po((function(t,e,n){Rt.call(t,n)?++t[n]:rr(t,n,1)})),ya=Mo(Hi),ga=Mo(Vi);function ma(t,e){return(Va(t)?be:lr)(t,ai(e,3))}function ba(t,e){return(Va(t)?we:fr)(t,ai(e,3))}var wa=Po((function(t,e,n){Rt.call(t,n)?t[n].push(e):rr(t,n,[e])})),_a=qr((function(t,e,n){var o=-1,i="function"==typeof e,a=Ga(t)?r(t.length):[];return lr(t,(function(t){a[++o]=i?ge(e,t,n):Cr(t,e,n)})),a})),Sa=Po((function(t,e,n){rr(t,n,e)}));function xa(t,e){return(Va(t)?Oe:Mr)(t,ai(e,3))}var Ea=Po((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Oa=qr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&gi(t,e[0],e[1])?e=[]:n>2&&gi(e[0],e[1],e[2])&&(e=[e[0]]),Fr(t,vr(e,1),[])})),ja=ke||function(){return ie.Date.now()};function Aa(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,Zo(t,c,o,o,o,o,e)}function Ca(t,e){var n;if("function"!=typeof e)throw new At(i);return t=du(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var Pa=qr((function(t,e,n){var r=1;if(n.length){var o=en(n,ii(Pa));r|=s}return Zo(t,r,e,n,o)})),ka=qr((function(t,e,n){var r=3;if(n.length){var o=en(n,ii(ka));r|=s}return Zo(e,r,t,n,o)}));function Ta(t,e,n){var r,a,u,s,c,l,f=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new At(i);function v(e){var n=r,i=a;return r=a=o,f=e,s=t.apply(i,n)}function y(t){return f=t,c=Pi(m,e),h?v(t):s}function g(t){var n=t-l;return l===o||n>=e||n<0||p&&t-f>=u}function m(){var t=ja();if(g(t))return b(t);c=Pi(m,function(t){var n=e-(t-l);return p?gn(n,u-(t-f)):n}(t))}function b(t){return c=o,d&&r?v(t):(r=a=o,s)}function w(){var t=ja(),n=g(t);if(r=arguments,a=this,l=t,n){if(c===o)return y(l);if(p)return wo(c),c=Pi(m,e),v(l)}return c===o&&(c=Pi(m,e)),s}return e=yu(e)||0,tu(n)&&(h=!!n.leading,u=(p="maxWait"in n)?yn(yu(n.maxWait)||0,e):u,d="trailing"in n?!!n.trailing:d),w.cancel=function(){c!==o&&wo(c),f=0,r=l=a=c=o},w.flush=function(){return c===o?s:b(ja())},w}var Ia=qr((function(t,e){return sr(t,1,e)})),Ra=qr((function(t,e,n){return sr(t,yu(e)||0,n)}));function La(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new At(i);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(La.Cache||zn),n}function Da(t){if("function"!=typeof t)throw new At(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}La.Cache=zn;var Ma=mo((function(t,e){var n=(e=1==e.length&&Va(e[0])?Oe(e[0],He(ai())):Oe(vr(e,1),He(ai()))).length;return qr((function(r){for(var o=-1,i=gn(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return ge(t,this,r)}))})),Na=qr((function(t,e){var n=en(e,ii(Na));return Zo(t,s,o,e,n)})),$a=qr((function(t,e){var n=en(e,ii($a));return Zo(t,64,o,e,n)})),Ba=ti((function(t,e){return Zo(t,256,o,o,o,e)}));function Ua(t,e){return t===e||t!=t&&e!=e}var Fa=Vo(Er),Ka=Vo((function(t,e){return t>=e})),Ha=Pr(function(){return arguments}())?Pr:function(t){return eu(t)&&Rt.call(t,"callee")&&!te.call(t,"callee")},Va=r.isArray,za=fe?He(fe):function(t){return eu(t)&&xr(t)==T};function Ga(t){return null!=t&&Qa(t.length)&&!Ja(t)}function qa(t){return eu(t)&&Ga(t)}var Wa=hn||ys,Za=he?He(he):function(t){return eu(t)&&xr(t)==m};function Ya(t){if(!eu(t))return!1;var e=xr(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ou(t)}function Ja(t){if(!tu(t))return!1;var e=xr(t);return e==w||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Xa(t){return"number"==typeof t&&t==du(t)}function Qa(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function tu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function eu(t){return null!=t&&"object"==typeof t}var nu=pe?He(pe):function(t){return eu(t)&&hi(t)==S};function ru(t){return"number"==typeof t||eu(t)&&xr(t)==x}function ou(t){if(!eu(t)||xr(t)!=E)return!1;var e=Gt(t);if(null===e)return!0;var n=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&It.call(n)==Nt}var iu=de?He(de):function(t){return eu(t)&&xr(t)==j},au=ve?He(ve):function(t){return eu(t)&&hi(t)==A};function uu(t){return"string"==typeof t||!Va(t)&&eu(t)&&xr(t)==C}function su(t){return"symbol"==typeof t||eu(t)&&xr(t)==P}var cu=ye?He(ye):function(t){return eu(t)&&Qa(t.length)&&!!Xt[xr(t)]},lu=Vo(Dr),fu=Vo((function(t,e){return t<=e}));function hu(t){if(!t)return[];if(Ga(t))return uu(t)?on(t):Ao(t);if(ae&&t[ae])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ae]());var e=hi(t);return(e==S?Qe:e==A?nn:Uu)(t)}function pu(t){return t?(t=yu(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function du(t){var e=pu(t),n=e%1;return e==e?n?e-n:e:0}function vu(t){return t?ir(du(t),0,p):0}function yu(t){if("number"==typeof t)return t;if(su(t))return h;if(tu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=tu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var n=dt.test(t);return n||yt.test(t)?ne(t.slice(2),n?2:8):pt.test(t)?h:+t}function gu(t){return Co(t,Iu(t))}function mu(t){return null==t?"":ao(t)}var bu=ko((function(t,e){if(_i(e)||Ga(e))Co(e,Tu(e),t);else for(var n in e)Rt.call(e,n)&&Qn(t,n,e[n])})),wu=ko((function(t,e){Co(e,Iu(e),t)})),_u=ko((function(t,e,n,r){Co(e,Iu(e),t,r)})),Su=ko((function(t,e,n,r){Co(e,Tu(e),t,r)})),xu=ti(or),Eu=qr((function(t,e){t=Et(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&gi(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],u=Iu(a),s=-1,c=u.length;++s<c;){var l=u[s],f=t[l];(f===o||Ua(f,kt[l])&&!Rt.call(t,l))&&(t[l]=a[l])}return t})),Ou=qr((function(t){return t.push(o,Jo),ge(Lu,o,t)}));function ju(t,e,n){var r=null==t?o:_r(t,e);return r===o?n:r}function Au(t,e){return null!=t&&pi(t,e,jr)}var Cu=Bo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),t[e]=n}),ts(rs)),Pu=Bo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),Rt.call(t,e)?t[e].push(n):t[e]=[n]}),ai),ku=qr(Cr);function Tu(t){return Ga(t)?Wn(t):Lr(t)}function Iu(t){return Ga(t)?Wn(t,!0):function(t){if(!tu(t))return function(t){var e=[];if(null!=t)for(var n in Et(t))e.push(n);return e}(t);var e=_i(t),n=[];for(var r in t)("constructor"!=r||!e&&Rt.call(t,r))&&n.push(r);return n}(t)}var Ru=ko((function(t,e,n){Br(t,e,n)})),Lu=ko((function(t,e,n,r){Br(t,e,n,r)})),Du=ti((function(t,e){var n={};if(null==t)return n;var r=!1;e=Oe(e,(function(e){return e=go(e,t),r||(r=e.length>1),e})),Co(t,ni(t),n),r&&(n=ar(n,7,Xo));for(var o=e.length;o--;)so(n,e[o]);return n})),Mu=ti((function(t,e){return null==t?{}:function(t,e){return Kr(t,e,(function(e,n){return Au(t,n)}))}(t,e)}));function Nu(t,e){if(null==t)return{};var n=Oe(ni(t),(function(t){return[t]}));return e=ai(e),Kr(t,n,(function(t,n){return e(t,n[0])}))}var $u=Wo(Tu),Bu=Wo(Iu);function Uu(t){return null==t?[]:Ve(t,Tu(t))}var Fu=Lo((function(t,e,n){return e=e.toLowerCase(),t+(n?Ku(e):e)}));function Ku(t){return Yu(mu(t).toLowerCase())}function Hu(t){return(t=mu(t))&&t.replace(mt,Ze).replace(zt,"")}var Vu=Lo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),zu=Lo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Gu=Ro("toLowerCase"),qu=Lo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Wu=Lo((function(t,e,n){return t+(n?" ":"")+Yu(e)})),Zu=Lo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Yu=Ro("toUpperCase");function Ju(t,e,n){return t=mu(t),(e=n?o:e)===o?function(t){return Zt.test(t)}(t)?function(t){return t.match(qt)||[]}(t):function(t){return t.match(st)||[]}(t):t.match(e)||[]}var Xu=qr((function(t,e){try{return ge(t,o,e)}catch(t){return Ya(t)?t:new _t(t)}})),Qu=ti((function(t,e){return be(e,(function(e){e=Ni(e),rr(t,e,Pa(t[e],t))})),t}));function ts(t){return function(){return t}}var es=No(),ns=No(!0);function rs(t){return t}function os(t){return Rr("function"==typeof t?t:ar(t,1))}var is=qr((function(t,e){return function(n){return Cr(n,t,e)}})),as=qr((function(t,e){return function(n){return Cr(t,n,e)}}));function us(t,e,n){var r=Tu(e),o=wr(e,r);null!=n||tu(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=wr(e,Tu(e)));var i=!(tu(n)&&"chain"in n&&!n.chain),a=Ja(t);return be(o,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=Ao(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,je([this.value()],arguments))})})),t}function ss(){}var cs=Fo(Oe),ls=Fo(_e),fs=Fo(Pe);function hs(t){return mi(t)?Ne(Ni(t)):function(t){return function(e){return _r(e,t)}}(t)}var ps=Ho(),ds=Ho(!0);function vs(){return[]}function ys(){return!1}var gs,ms=Uo((function(t,e){return t+e}),0),bs=Go("ceil"),ws=Uo((function(t,e){return t/e}),1),_s=Go("floor"),Ss=Uo((function(t,e){return t*e}),1),xs=Go("round"),Es=Uo((function(t,e){return t-e}),0);return $n.after=function(t,e){if("function"!=typeof e)throw new At(i);return t=du(t),function(){if(--t<1)return e.apply(this,arguments)}},$n.ary=Aa,$n.assign=bu,$n.assignIn=wu,$n.assignInWith=_u,$n.assignWith=Su,$n.at=xu,$n.before=Ca,$n.bind=Pa,$n.bindAll=Qu,$n.bindKey=ka,$n.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Va(t)?t:[t]},$n.chain=ha,$n.chunk=function(t,e,n){e=(n?gi(t,e,n):e===o)?1:yn(du(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,u=0,s=r(cn(i/e));a<i;)s[u++]=to(t,a,a+=e);return s},$n.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},$n.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],o=t;o--;)e[o-1]=arguments[o];return je(Va(n)?Ao(n):[n],vr(e,1))},$n.cond=function(t){var e=null==t?0:t.length,n=ai();return t=e?Oe(t,(function(t){if("function"!=typeof t[1])throw new At(i);return[n(t[0]),t[1]]})):[],qr((function(n){for(var r=-1;++r<e;){var o=t[r];if(ge(o[0],this,n))return ge(o[1],this,n)}}))},$n.conforms=function(t){return function(t){var e=Tu(t);return function(n){return ur(n,t,e)}}(ar(t,1))},$n.constant=ts,$n.countBy=va,$n.create=function(t,e){var n=Bn(t);return null==e?n:nr(n,e)},$n.curry=function t(e,n,r){var i=Zo(e,8,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},$n.curryRight=function t(e,n,r){var i=Zo(e,16,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},$n.debounce=Ta,$n.defaults=Eu,$n.defaultsDeep=Ou,$n.defer=Ia,$n.delay=Ra,$n.difference=Ui,$n.differenceBy=Fi,$n.differenceWith=Ki,$n.drop=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=n||e===o?1:du(e))<0?0:e,r):[]},$n.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,0,(e=r-(e=n||e===o?1:du(e)))<0?0:e):[]},$n.dropRightWhile=function(t,e){return t&&t.length?lo(t,ai(e,3),!0,!0):[]},$n.dropWhile=function(t,e){return t&&t.length?lo(t,ai(e,3),!0):[]},$n.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&gi(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=du(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:du(r))<0&&(r+=i),r=n>r?0:vu(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},$n.filter=function(t,e){return(Va(t)?Se:dr)(t,ai(e,3))},$n.flatMap=function(t,e){return vr(xa(t,e),1)},$n.flatMapDeep=function(t,e){return vr(xa(t,e),l)},$n.flatMapDepth=function(t,e,n){return n=n===o?1:du(n),vr(xa(t,e),n)},$n.flatten=zi,$n.flattenDeep=function(t){return null!=t&&t.length?vr(t,l):[]},$n.flattenDepth=function(t,e){return null!=t&&t.length?vr(t,e=e===o?1:du(e)):[]},$n.flip=function(t){return Zo(t,512)},$n.flow=es,$n.flowRight=ns,$n.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},$n.functions=function(t){return null==t?[]:wr(t,Tu(t))},$n.functionsIn=function(t){return null==t?[]:wr(t,Iu(t))},$n.groupBy=wa,$n.initial=function(t){return null!=t&&t.length?to(t,0,-1):[]},$n.intersection=qi,$n.intersectionBy=Wi,$n.intersectionWith=Zi,$n.invert=Cu,$n.invertBy=Pu,$n.invokeMap=_a,$n.iteratee=os,$n.keyBy=Sa,$n.keys=Tu,$n.keysIn=Iu,$n.map=xa,$n.mapKeys=function(t,e){var n={};return e=ai(e,3),mr(t,(function(t,r,o){rr(n,e(t,r,o),t)})),n},$n.mapValues=function(t,e){var n={};return e=ai(e,3),mr(t,(function(t,r,o){rr(n,r,e(t,r,o))})),n},$n.matches=function(t){return Nr(ar(t,1))},$n.matchesProperty=function(t,e){return $r(t,ar(e,1))},$n.memoize=La,$n.merge=Ru,$n.mergeWith=Lu,$n.method=is,$n.methodOf=as,$n.mixin=us,$n.negate=Da,$n.nthArg=function(t){return t=du(t),qr((function(e){return Ur(e,t)}))},$n.omit=Du,$n.omitBy=function(t,e){return Nu(t,Da(ai(e)))},$n.once=function(t){return Ca(2,t)},$n.orderBy=function(t,e,n,r){return null==t?[]:(Va(e)||(e=null==e?[]:[e]),Va(n=r?o:n)||(n=null==n?[]:[n]),Fr(t,e,n))},$n.over=cs,$n.overArgs=Ma,$n.overEvery=ls,$n.overSome=fs,$n.partial=Na,$n.partialRight=$a,$n.partition=Ea,$n.pick=Mu,$n.pickBy=Nu,$n.property=hs,$n.propertyOf=function(t){return function(e){return null==t?o:_r(t,e)}},$n.pull=Ji,$n.pullAll=Xi,$n.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Hr(t,e,ai(n,2)):t},$n.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Hr(t,e,o,n):t},$n.pullAt=Qi,$n.range=ps,$n.rangeRight=ds,$n.rearg=Ba,$n.reject=function(t,e){return(Va(t)?Se:dr)(t,Da(ai(e,3)))},$n.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=ai(e,3);++r<i;){var a=t[r];e(a,r,t)&&(n.push(a),o.push(r))}return Vr(t,o),n},$n.rest=function(t,e){if("function"!=typeof t)throw new At(i);return qr(t,e=e===o?e:du(e))},$n.reverse=ta,$n.sampleSize=function(t,e,n){return e=(n?gi(t,e,n):e===o)?1:du(e),(Va(t)?Yn:Zr)(t,e)},$n.set=function(t,e,n){return null==t?t:Yr(t,e,n)},$n.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Yr(t,e,n,r)},$n.shuffle=function(t){return(Va(t)?Jn:Qr)(t)},$n.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&gi(t,e,n)?(e=0,n=r):(e=null==e?0:du(e),n=n===o?r:du(n)),to(t,e,n)):[]},$n.sortBy=Oa,$n.sortedUniq=function(t){return t&&t.length?oo(t):[]},$n.sortedUniqBy=function(t,e){return t&&t.length?oo(t,ai(e,2)):[]},$n.split=function(t,e,n){return n&&"number"!=typeof n&&gi(t,e,n)&&(e=n=o),(n=n===o?p:n>>>0)?(t=mu(t))&&("string"==typeof e||null!=e&&!iu(e))&&!(e=ao(e))&&Xe(t)?bo(on(t),0,n):t.split(e,n):[]},$n.spread=function(t,e){if("function"!=typeof t)throw new At(i);return e=null==e?0:yn(du(e),0),qr((function(n){var r=n[e],o=bo(n,0,e);return r&&je(o,r),ge(t,this,o)}))},$n.tail=function(t){var e=null==t?0:t.length;return e?to(t,1,e):[]},$n.take=function(t,e,n){return t&&t.length?to(t,0,(e=n||e===o?1:du(e))<0?0:e):[]},$n.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=r-(e=n||e===o?1:du(e)))<0?0:e,r):[]},$n.takeRightWhile=function(t,e){return t&&t.length?lo(t,ai(e,3),!1,!0):[]},$n.takeWhile=function(t,e){return t&&t.length?lo(t,ai(e,3)):[]},$n.tap=function(t,e){return e(t),t},$n.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new At(i);return tu(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ta(t,e,{leading:r,maxWait:e,trailing:o})},$n.thru=pa,$n.toArray=hu,$n.toPairs=$u,$n.toPairsIn=Bu,$n.toPath=function(t){return Va(t)?Oe(t,Ni):su(t)?[t]:Ao(Mi(mu(t)))},$n.toPlainObject=gu,$n.transform=function(t,e,n){var r=Va(t),o=r||Wa(t)||cu(t);if(e=ai(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:tu(t)&&Ja(i)?Bn(Gt(t)):{}}return(o?be:mr)(t,(function(t,r,o){return e(n,t,r,o)})),n},$n.unary=function(t){return Aa(t,1)},$n.union=ea,$n.unionBy=na,$n.unionWith=ra,$n.uniq=function(t){return t&&t.length?uo(t):[]},$n.uniqBy=function(t,e){return t&&t.length?uo(t,ai(e,2)):[]},$n.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?uo(t,o,e):[]},$n.unset=function(t,e){return null==t||so(t,e)},$n.unzip=oa,$n.unzipWith=ia,$n.update=function(t,e,n){return null==t?t:co(t,e,yo(n))},$n.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:co(t,e,yo(n),r)},$n.values=Uu,$n.valuesIn=function(t){return null==t?[]:Ve(t,Iu(t))},$n.without=aa,$n.words=Ju,$n.wrap=function(t,e){return Na(yo(e),t)},$n.xor=ua,$n.xorBy=sa,$n.xorWith=ca,$n.zip=la,$n.zipObject=function(t,e){return po(t||[],e||[],Qn)},$n.zipObjectDeep=function(t,e){return po(t||[],e||[],Yr)},$n.zipWith=fa,$n.entries=$u,$n.entriesIn=Bu,$n.extend=wu,$n.extendWith=_u,us($n,$n),$n.add=ms,$n.attempt=Xu,$n.camelCase=Fu,$n.capitalize=Ku,$n.ceil=bs,$n.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=yu(n))==n?n:0),e!==o&&(e=(e=yu(e))==e?e:0),ir(yu(t),e,n)},$n.clone=function(t){return ar(t,4)},$n.cloneDeep=function(t){return ar(t,5)},$n.cloneDeepWith=function(t,e){return ar(t,5,e="function"==typeof e?e:o)},$n.cloneWith=function(t,e){return ar(t,4,e="function"==typeof e?e:o)},$n.conformsTo=function(t,e){return null==e||ur(t,e,Tu(e))},$n.deburr=Hu,$n.defaultTo=function(t,e){return null==t||t!=t?e:t},$n.divide=ws,$n.endsWith=function(t,e,n){t=mu(t),e=ao(e);var r=t.length,i=n=n===o?r:ir(du(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},$n.eq=Ua,$n.escape=function(t){return(t=mu(t))&&W.test(t)?t.replace(G,Ye):t},$n.escapeRegExp=function(t){return(t=mu(t))&&nt.test(t)?t.replace(et,"\\$&"):t},$n.every=function(t,e,n){var r=Va(t)?_e:hr;return n&&gi(t,e,n)&&(e=o),r(t,ai(e,3))},$n.find=ya,$n.findIndex=Hi,$n.findKey=function(t,e){return Te(t,ai(e,3),mr)},$n.findLast=ga,$n.findLastIndex=Vi,$n.findLastKey=function(t,e){return Te(t,ai(e,3),br)},$n.floor=_s,$n.forEach=ma,$n.forEachRight=ba,$n.forIn=function(t,e){return null==t?t:yr(t,ai(e,3),Iu)},$n.forInRight=function(t,e){return null==t?t:gr(t,ai(e,3),Iu)},$n.forOwn=function(t,e){return t&&mr(t,ai(e,3))},$n.forOwnRight=function(t,e){return t&&br(t,ai(e,3))},$n.get=ju,$n.gt=Fa,$n.gte=Ka,$n.has=function(t,e){return null!=t&&pi(t,e,Or)},$n.hasIn=Au,$n.head=Gi,$n.identity=rs,$n.includes=function(t,e,n,r){t=Ga(t)?t:Uu(t),n=n&&!r?du(n):0;var o=t.length;return n<0&&(n=yn(o+n,0)),uu(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Re(t,e,n)>-1},$n.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:du(n);return o<0&&(o=yn(r+o,0)),Re(t,e,o)},$n.inRange=function(t,e,n){return e=pu(e),n===o?(n=e,e=0):n=pu(n),function(t,e,n){return t>=gn(e,n)&&t<yn(e,n)}(t=yu(t),e,n)},$n.invoke=ku,$n.isArguments=Ha,$n.isArray=Va,$n.isArrayBuffer=za,$n.isArrayLike=Ga,$n.isArrayLikeObject=qa,$n.isBoolean=function(t){return!0===t||!1===t||eu(t)&&xr(t)==g},$n.isBuffer=Wa,$n.isDate=Za,$n.isElement=function(t){return eu(t)&&1===t.nodeType&&!ou(t)},$n.isEmpty=function(t){if(null==t)return!0;if(Ga(t)&&(Va(t)||"string"==typeof t||"function"==typeof t.splice||Wa(t)||cu(t)||Ha(t)))return!t.length;var e=hi(t);if(e==S||e==A)return!t.size;if(_i(t))return!Lr(t).length;for(var n in t)if(Rt.call(t,n))return!1;return!0},$n.isEqual=function(t,e){return kr(t,e)},$n.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?kr(t,e,o,n):!!r},$n.isError=Ya,$n.isFinite=function(t){return"number"==typeof t&&pn(t)},$n.isFunction=Ja,$n.isInteger=Xa,$n.isLength=Qa,$n.isMap=nu,$n.isMatch=function(t,e){return t===e||Tr(t,e,si(e))},$n.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,Tr(t,e,si(e),n)},$n.isNaN=function(t){return ru(t)&&t!=+t},$n.isNative=function(t){if(wi(t))throw new _t("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ir(t)},$n.isNil=function(t){return null==t},$n.isNull=function(t){return null===t},$n.isNumber=ru,$n.isObject=tu,$n.isObjectLike=eu,$n.isPlainObject=ou,$n.isRegExp=iu,$n.isSafeInteger=function(t){return Xa(t)&&t>=-9007199254740991&&t<=f},$n.isSet=au,$n.isString=uu,$n.isSymbol=su,$n.isTypedArray=cu,$n.isUndefined=function(t){return t===o},$n.isWeakMap=function(t){return eu(t)&&hi(t)==k},$n.isWeakSet=function(t){return eu(t)&&"[object WeakSet]"==xr(t)},$n.join=function(t,e){return null==t?"":dn.call(t,e)},$n.kebabCase=Vu,$n.last=Yi,$n.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=du(n))<0?yn(r+i,0):gn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Ie(t,De,i,!0)},$n.lowerCase=zu,$n.lowerFirst=Gu,$n.lt=lu,$n.lte=fu,$n.max=function(t){return t&&t.length?pr(t,rs,Er):o},$n.maxBy=function(t,e){return t&&t.length?pr(t,ai(e,2),Er):o},$n.mean=function(t){return Me(t,rs)},$n.meanBy=function(t,e){return Me(t,ai(e,2))},$n.min=function(t){return t&&t.length?pr(t,rs,Dr):o},$n.minBy=function(t,e){return t&&t.length?pr(t,ai(e,2),Dr):o},$n.stubArray=vs,$n.stubFalse=ys,$n.stubObject=function(){return{}},$n.stubString=function(){return""},$n.stubTrue=function(){return!0},$n.multiply=Ss,$n.nth=function(t,e){return t&&t.length?Ur(t,du(e)):o},$n.noConflict=function(){return ie._===this&&(ie._=$t),this},$n.noop=ss,$n.now=ja,$n.pad=function(t,e,n){t=mu(t);var r=(e=du(e))?rn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Ko(ln(o),n)+t+Ko(cn(o),n)},$n.padEnd=function(t,e,n){t=mu(t);var r=(e=du(e))?rn(t):0;return e&&r<e?t+Ko(e-r,n):t},$n.padStart=function(t,e,n){t=mu(t);var r=(e=du(e))?rn(t):0;return e&&r<e?Ko(e-r,n)+t:t},$n.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),bn(mu(t).replace(rt,""),e||0)},$n.random=function(t,e,n){if(n&&"boolean"!=typeof n&&gi(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=pu(t),e===o?(e=t,t=0):e=pu(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=wn();return gn(t+i*(e-t+ee("1e-"+((i+"").length-1))),e)}return zr(t,e)},$n.reduce=function(t,e,n){var r=Va(t)?Ae:Be,o=arguments.length<3;return r(t,ai(e,4),n,o,lr)},$n.reduceRight=function(t,e,n){var r=Va(t)?Ce:Be,o=arguments.length<3;return r(t,ai(e,4),n,o,fr)},$n.repeat=function(t,e,n){return e=(n?gi(t,e,n):e===o)?1:du(e),Gr(mu(t),e)},$n.replace=function(){var t=arguments,e=mu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},$n.result=function(t,e,n){var r=-1,i=(e=go(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[Ni(e[r])];a===o&&(r=i,a=n),t=Ja(a)?a.call(t):a}return t},$n.round=xs,$n.runInContext=t,$n.sample=function(t){return(Va(t)?Zn:Wr)(t)},$n.size=function(t){if(null==t)return 0;if(Ga(t))return uu(t)?rn(t):t.length;var e=hi(t);return e==S||e==A?t.size:Lr(t).length},$n.snakeCase=qu,$n.some=function(t,e,n){var r=Va(t)?Pe:eo;return n&&gi(t,e,n)&&(e=o),r(t,ai(e,3))},$n.sortedIndex=function(t,e){return no(t,e)},$n.sortedIndexBy=function(t,e,n){return ro(t,e,ai(n,2))},$n.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=no(t,e);if(r<n&&Ua(t[r],e))return r}return-1},$n.sortedLastIndex=function(t,e){return no(t,e,!0)},$n.sortedLastIndexBy=function(t,e,n){return ro(t,e,ai(n,2),!0)},$n.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=no(t,e,!0)-1;if(Ua(t[n],e))return n}return-1},$n.startCase=Wu,$n.startsWith=function(t,e,n){return t=mu(t),n=null==n?0:ir(du(n),0,t.length),e=ao(e),t.slice(n,n+e.length)==e},$n.subtract=Es,$n.sum=function(t){return t&&t.length?Ue(t,rs):0},$n.sumBy=function(t,e){return t&&t.length?Ue(t,ai(e,2)):0},$n.template=function(t,e,n){var r=$n.templateSettings;n&&gi(t,e,n)&&(e=o),t=mu(t),e=_u({},e,r,Yo);var i,a,u=_u({},e.imports,r.imports,Yo),s=Tu(u),c=Ve(u,s),l=0,f=e.interpolate||bt,h="__p += '",p=Ot((e.escape||bt).source+"|"+f.source+"|"+(f===J?ft:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),d="//# sourceURL="+(Rt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Jt+"]")+"\n";t.replace(p,(function(e,n,r,o,u,s){return r||(r=o),h+=t.slice(l,s).replace(wt,Je),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),u&&(a=!0,h+="';\n"+u+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+e.length,e})),h+="';\n";var v=Rt.call(e,"variable")&&e.variable;if(v){if(ct.test(v))throw new _t("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(K,""):h).replace(H,"$1").replace(V,"$1;"),h="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")+h+"return __p\n}";var y=Xu((function(){return St(s,d+"return "+h).apply(o,c)}));if(y.source=h,Ya(y))throw y;return y},$n.times=function(t,e){if((t=du(t))<1||t>f)return[];var n=p,r=gn(t,p);e=ai(e),t-=p;for(var o=Fe(r,e);++n<t;)e(n);return o},$n.toFinite=pu,$n.toInteger=du,$n.toLength=vu,$n.toLower=function(t){return mu(t).toLowerCase()},$n.toNumber=yu,$n.toSafeInteger=function(t){return t?ir(du(t),-9007199254740991,f):0===t?t:0},$n.toString=mu,$n.toUpper=function(t){return mu(t).toUpperCase()},$n.trim=function(t,e,n){if((t=mu(t))&&(n||e===o))return Ke(t);if(!t||!(e=ao(e)))return t;var r=on(t),i=on(e);return bo(r,Ge(r,i),qe(r,i)+1).join("")},$n.trimEnd=function(t,e,n){if((t=mu(t))&&(n||e===o))return t.slice(0,an(t)+1);if(!t||!(e=ao(e)))return t;var r=on(t);return bo(r,0,qe(r,on(e))+1).join("")},$n.trimStart=function(t,e,n){if((t=mu(t))&&(n||e===o))return t.replace(rt,"");if(!t||!(e=ao(e)))return t;var r=on(t);return bo(r,Ge(r,on(e))).join("")},$n.truncate=function(t,e){var n=30,r="...";if(tu(e)){var i="separator"in e?e.separator:i;n="length"in e?du(e.length):n,r="omission"in e?ao(e.omission):r}var a=(t=mu(t)).length;if(Xe(t)){var u=on(t);a=u.length}if(n>=a)return t;var s=n-rn(r);if(s<1)return r;var c=u?bo(u,0,s).join(""):t.slice(0,s);if(i===o)return c+r;if(u&&(s+=c.length-s),iu(i)){if(t.slice(s).search(i)){var l,f=c;for(i.global||(i=Ot(i.source,mu(ht.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var h=l.index;c=c.slice(0,h===o?s:h)}}else if(t.indexOf(ao(i),s)!=s){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r},$n.unescape=function(t){return(t=mu(t))&&q.test(t)?t.replace(z,un):t},$n.uniqueId=function(t){var e=++Lt;return mu(t)+e},$n.upperCase=Zu,$n.upperFirst=Yu,$n.each=ma,$n.eachRight=ba,$n.first=Gi,us($n,(gs={},mr($n,(function(t,e){Rt.call($n.prototype,e)||(gs[e]=t)})),gs),{chain:!1}),$n.VERSION="4.17.21",be(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){$n[t].placeholder=$n})),be(["drop","take"],(function(t,e){Kn.prototype[t]=function(n){n=n===o?1:yn(du(n),0);var r=this.__filtered__&&!e?new Kn(this):this.clone();return r.__filtered__?r.__takeCount__=gn(n,r.__takeCount__):r.__views__.push({size:gn(n,p),type:t+(r.__dir__<0?"Right":"")}),r},Kn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),be(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Kn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ai(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),be(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Kn.prototype[t]=function(){return this[n](1).value()[0]}})),be(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Kn.prototype[t]=function(){return this.__filtered__?new Kn(this):this[n](1)}})),Kn.prototype.compact=function(){return this.filter(rs)},Kn.prototype.find=function(t){return this.filter(t).head()},Kn.prototype.findLast=function(t){return this.reverse().find(t)},Kn.prototype.invokeMap=qr((function(t,e){return"function"==typeof t?new Kn(this):this.map((function(n){return Cr(n,t,e)}))})),Kn.prototype.reject=function(t){return this.filter(Da(ai(t)))},Kn.prototype.slice=function(t,e){t=du(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Kn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=du(e))<0?n.dropRight(-e):n.take(e-t)),n)},Kn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Kn.prototype.toArray=function(){return this.take(p)},mr(Kn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=$n[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&($n.prototype[e]=function(){var e=this.__wrapped__,u=r?[1]:arguments,s=e instanceof Kn,c=u[0],l=s||Va(e),f=function(t){var e=i.apply($n,je([t],u));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(s=l=!1);var h=this.__chain__,p=!!this.__actions__.length,d=a&&!h,v=s&&!p;if(!a&&l){e=v?e:new Kn(this);var y=t.apply(e,u);return y.__actions__.push({func:pa,args:[f],thisArg:o}),new Fn(y,h)}return d&&v?t.apply(this,u):(y=this.thru(f),d?r?y.value()[0]:y.value():y)})})),be(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ct[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);$n.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Va(o)?o:[],t)}return this[n]((function(n){return e.apply(Va(n)?n:[],t)}))}})),mr(Kn.prototype,(function(t,e){var n=$n[e];if(n){var r=n.name+"";Rt.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:e,func:n})}})),Pn[$o(o,2).name]=[{name:"wrapper",func:o}],Kn.prototype.clone=function(){var t=new Kn(this.__wrapped__);return t.__actions__=Ao(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ao(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ao(this.__views__),t},Kn.prototype.reverse=function(){if(this.__filtered__){var t=new Kn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Kn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Va(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=gn(e,t+a);break;case"takeRight":t=yn(t,e-a)}}return{start:t,end:e}}(0,o,this.__views__),a=i.start,u=i.end,s=u-a,c=r?u:a-1,l=this.__iteratees__,f=l.length,h=0,p=gn(s,this.__takeCount__);if(!n||!r&&o==s&&p==s)return fo(t,this.__actions__);var d=[];t:for(;s--&&h<p;){for(var v=-1,y=t[c+=e];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}d[h++]=y}return d},$n.prototype.at=da,$n.prototype.chain=function(){return ha(this)},$n.prototype.commit=function(){return new Fn(this.value(),this.__chain__)},$n.prototype.next=function(){this.__values__===o&&(this.__values__=hu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},$n.prototype.plant=function(t){for(var e,n=this;n instanceof Un;){var r=Bi(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},$n.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Kn){var e=t;return this.__actions__.length&&(e=new Kn(this)),(e=e.reverse()).__actions__.push({func:pa,args:[ta],thisArg:o}),new Fn(e,this.__chain__)}return this.thru(ta)},$n.prototype.toJSON=$n.prototype.valueOf=$n.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},$n.prototype.first=$n.prototype.head,ae&&($n.prototype[ae]=function(){return this}),$n}();ie._=sn,(r=function(){return sn}.call(e,n,e,t))===o||(t.exports=r)}.call(this)},385:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=[];function r(t){for(var e=[],r=0;r<n.length;r++)n[r]===t?t=null:e.push(n[r]);n=e}function o(r,o,i){e=o?r:t(t({},e),r);for(var a=n,u=0;u<a.length;u++)a[u](e,i)}return e=e||{},{action:function(t){function n(e){o(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:o,subscribe:function(t){return n.push(t),function(){r(t)}},unsubscribe:r,getState:function(){return e}}},n=function(t,n){var r=c[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return c[t]={value:o,active:!0},o},i=function(t,n){var r=c[t];if(!r){var o=e(n);return c[t]={value:o,active:!1},o}return r.value},a=function(t){return n("app",t)},u=function(){return i("app",{})},s=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return s}});var c={}}(),o}())}}}))},968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:t=>{"use strict";t.exports=h},824:t=>{"use strict";t.exports=a},45:t=>{"use strict";t.exports=u},728:t=>{"use strict";t.exports=s},688:t=>{"use strict";t.exports=p},64:t=>{"use strict";t.exports=l},954:t=>{"use strict";t.exports=i},493:t=>{"use strict";t.exports=c},281:t=>{"use strict";t.exports=f}},d={};function v(t){var e=d[t];if(void 0!==e)return e.exports;var n=d[t]={id:t,loaded:!1,exports:{}};return r[t].call(n.exports,n,n.exports,v),n.loaded=!0,n.exports}v.y=o,v.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return v.d(e,{a:e}),e},v.d=(t,e)=>{for(var n in e)v.o(e,n)&&!v.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),v.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),v.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},v.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;v.g.importScripts&&(t=v.g.location+"");var e=v.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),v.p=t})();var y={};return(0,v(968).s)(1),(()=>{"use strict";v.r(y),v.d(y,{ComponentContext:()=>o,ConfigurableLink:()=>u,Extension:()=>p,ExtensionSlot:()=>C,UserHasAccess:()=>Vn,createUseStore:()=>l,getAsyncExtensionLifecycle:()=>ot,getAsyncLifecycle:()=>nt,getLifecycle:()=>et,getSyncLifecycle:()=>rt,openmrsComponentDecorator:()=>tt,useAssignedExtensionIds:()=>at,useAssignedExtensions:()=>_,useBodyScrollLock:()=>ut,useConfig:()=>fn,useConnectedExtensions:()=>S,useConnectivity:()=>m,useCurrentPatient:()=>Pn,useExtensionInternalStore:()=>kn,useExtensionSlot:()=>x,useExtensionSlotMeta:()=>Tn,useExtensionStore:()=>In,useForceUpdate:()=>Ln,useLayoutType:()=>Nn,useLocations:()=>Bn,useOnClickOutside:()=>Un,usePagination:()=>no,usePatient:()=>_n,useSession:()=>Gn,useStore:()=>tr,useStoreWithActions:()=>er,useVisit:()=>Jr,useVisitTypes:()=>Qr});var r=v(954),o=r.default.createContext({moduleName:""}),i=v(824);function a(){return a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a.apply(this,arguments)}function u(t){var e=t.to,n=t.templateParams,o=t.children,u=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["to","templateParams","children"]);return r.default.createElement("a",a({onClick:function(t){return function(t,e,n){t.metaKey||t.ctrlKey||t.shiftKey||0!=t.button||(t.preventDefault(),(0,i.navigate)({to:e,templateParams:n}))}(t,e,n)},href:(0,i.interpolateUrl)(e,n)},u),o)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return function(e){var n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)(t.getState())),o=n[0],i=n[1];(0,r.useEffect)((function(){return t.subscribe((function(t){return i(t)}))}),[]);var a={};return e&&(a=(0,r.useMemo)((function(){return function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,e)}),[t,e])),function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){c(t,e,n[e])}))}return t}({},o,a)}}var f=v(45);function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var p=function(t){var e=t.state,n=t.wrap,i=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)()),a=i[0],u=i[1],s=(0,r.useContext)(o).extension,c=(0,r.useCallback)((function(t){u(t)}),[]);(0,r.useEffect)((function(){if(null!=a&&s)return(0,f.renderExtension)(a,s.extensionSlotName,s.extensionSlotModuleName,s.extensionId,void 0,e)}),[null==s?void 0:s.extensionSlotName,null==s?void 0:s.extensionId,null==s?void 0:s.extensionSlotModuleName,e,a]);var l=r.default.createElement("div",{ref:c,"data-extension-id":null==s?void 0:s.extensionId,style:{position:"relative"}});return s&&n?n(l,s):l},d=v(728);function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function m(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return g(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)(window.navigator.onLine)),e=t[0],n=t[1];return(0,r.useEffect)((function(){return(0,d.subscribeConnectivityChanged)((function(t){var e=t.online;return n(e)}))}),[]),e}var b=v(891);function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return w(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)([])),n=e[0],o=e[1];return(0,r.useEffect)((function(){var e=function(e){var r,i,a=null!==(i=null===(r=e.slots[t])||void 0===r?void 0:r.assignedExtensions)&&void 0!==i?i:[];(0,b.isEqual)(a,n)||o(a)};return e((0,f.getExtensionStore)().getState()),(0,f.getExtensionStore)().subscribe(e)}),[t,n]),n}function S(t){var e=m(),n=_(t);return(0,r.useMemo)((function(){return(0,f.getConnectedExtensions)(n,e)}),[n,e])}function x(t){var e=(0,r.useContext)(o).moduleName;if(!e)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,r.useEffect)((function(){(0,f.registerExtensionSlot)(e,t)}),[]),{extensions:S(t),extensionSlotName:t,extensionSlotModuleName:e}}function E(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function O(){return O=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},O.apply(this,arguments)}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){E(t,e,n[e])}))}return t}function A(t){return t}var C=function(t){var e=t.name,n=t.extensionSlotName,i=t.select,a=void 0===i?A:i,u=t.children,s=t.state,c=t.style,l=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["name","extensionSlotName","select","children","state","style"]),f=null!=e?e:n,h=(0,r.useRef)(null),d=x(f),v=d.extensions,y=d.extensionSlotModuleName,g=(0,r.useRef)(s);(function(t,e){if(t===e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;if("object"!=typeof t||"object"!=typeof e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in e)||e[i]!==t[i])return!1}return!0})(g.current,s)||(g.current=s);var m=(0,r.useMemo)((function(){return f&&a(v).map((function(t){return r.default.createElement(o.Provider,{key:t.id,value:{moduleName:y,extension:{extensionId:t.id,extensionSlotName:f,extensionSlotModuleName:y}}},null!=u?u:r.default.createElement(p,{state:g.current}))}))}),[a,v,f,g.current]);return r.default.createElement("div",O({ref:h,"data-extension-slot-name":f,"data-extension-slot-module-name":y,style:j({},c,{position:"relative"})},l),m)},P=v(493);function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function T(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){R(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function R(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(t,e){var n;if("function"!=typeof(n=e.domElement?function(){return e.domElement}:e.domElementGetter?e.domElementGetter:t.domElementGetter?t.domElementGetter:function(t){var e=t.appName||t.name;if(!e)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(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(e.name,"'. Expected a function, received ").concat(L(n)));return function(){var t=n(e);if(!(t instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(e.name,"'. Expected HTMLElement, received ").concat(L(t)));return t}}var M=null;try{M=n(9902).createContext()}catch(k){}var N={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}};function $(t){if("object"!==I(t))throw new Error("single-spa-react requires a configuration object");var e=T(T({},N),t);if(!e.React)throw new Error("single-spa-react must be passed opts.React");if(!e.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!e.rootComponent&&!e.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(e.errorBoundary&&"function"!=typeof e.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!M&&e.React.createContext&&(M=e.React.createContext()),e.SingleSpaRoot=function(t){function e(t){e.displayName="SingleSpaRoot(".concat(t.name,")")}return e.prototype=Object.create(t.React.Component.prototype),e.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},e.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},e.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},e}(e);var n={bootstrap:B.bind(null,e),mount:U.bind(null,e),unmount:F.bind(null,e)};return e.parcelCanUpdate&&(n.update=K.bind(null,e)),n}function B(t,e){return t.rootComponent?Promise.resolve():t.loadRootComponent(e).then((function(e){t.rootComponent=e}))}function U(t,e){return new Promise((function(n,r){t.suppressComponentDidCatchWarning||!function(t){if(!(t&&"string"==typeof t.version&&t.version.indexOf(".")>=0))return!1;var e=t.version.slice(0,t.version.indexOf("."));try{return Number(e)>=16}catch(t){return!1}}(t.React)||t.errorBoundary||(t.rootComponent.prototype?t.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=H(t,e,(function(){n(this)})),i=D(t,e)(),a=function(t){var e=t.opts,n=t.elementToRender,r=t.domElement,o="function"==typeof e.renderType?e.renderType():e.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=e.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?e.ReactDOM.hydrate(n,r):e.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:t});t.domElements[e.name]=i,t.renderResults[e.name]=a}))}function F(t,e){return new Promise((function(n){t.unmountFinished=n;var r=t.renderResults[e.name];r&&r.unmount?r.unmount():t.ReactDOM.unmountComponentAtNode(t.domElements[e.name]),delete t.domElements[e.name],delete t.renderResults[e.name]}))}function K(t,e){return new Promise((function(n){t.updateResolves[e.name]||(t.updateResolves[e.name]=[]),t.updateResolves[e.name].push(n);var r=H(t,e,null),o=t.renderResults[e.name];if(o&&o.render)o.render(r);else{var i=D(t,e)();t.ReactDOM.render(r,i)}}))}function H(t,e,n){var r=t.React.createElement(t.rootComponent,e),o=M?t.React.createElement(M.Provider,{value:e},r):r;return(t.errorBoundary||e.errorBoundary||t.errorBoundaryClass||e.errorBoundaryClass)&&(t.errorBoundaryClass=t.errorBoundaryClass||e.errorBoundaryClass||function(t,e){function n(e){t.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(e.name,")")}return n.prototype=Object.create(t.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(t.errorBoundary||e.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(t,e){this.setState({caughtError:t,caughtErrorInfo:e})},n}(t,e),o=t.React.createElement(t.errorBoundaryClass,e,o)),t.React.createElement(t.SingleSpaRoot,T(T({},e),{},{mountFinished:n,updateFinished:function(){t.updateResolves[e.name]&&(t.updateResolves[e.name].forEach((function(t){return t()})),delete t.updateResolves[e.name])},unmountFinished:function(){setTimeout(t.unmountFinished)}}),o)}var V=v(64),z=v(281);function G(){return G=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},G.apply(this,arguments)}function q(t){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},q(t)}function W(t,e){return!e||"object"!==Y(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Z(t,e){return Z=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Z(t,e)}var Y=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},J=V.default.default||V.default,X={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},Q=function(t){(0,r.useEffect)((function(){return J.on("languageChanged",t.forceUpdate),function(){return J.off("languageChanged",t.forceUpdate)}}),[t.forceUpdate]);var e=(0,r.useRef)(null);if(e.current)throw e.current;if(!J.hasLoadedNamespace(t.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(t.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 J.loadNamespaces([t.ns]).then((function(){return clearTimeout(n)})).catch((function(t){clearTimeout(n),e.current=t}))}return r.default.createElement(r.default.Fragment,null,t.children)};function tt(t){if("object"!=typeof t||"string"!=typeof t.featureName||"string"!=typeof t.moduleName)throw new Error("Invalid options");var e=Object.assign({},X,t);return function(t){var n;return(n=function(n){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Z(t,e)}(s,n);var i,a,u=(i=s,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(a){var n=q(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return W(this,t)});function s(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(n=u.call(this,t)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:e.moduleName,extension:t._extensionContext}},n}var c=s.prototype;return c.componentDidCatch=function(t,n){n&&n.componentStack&&(t.extra=Object.assign(t.extra||{},{componentStack:n.componentStack})),e.throwErrorsToConsole&&setTimeout((function(){throw t})),this.setState({caughtError:t,caughtErrorInfo:n})},c.render=function(){if(this.state.caughtError)return r.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,i=r.default.createElement(o.Provider,{value:this.state.config},r.default.createElement(r.default.Suspense,{fallback:null},e.disableTranslations?r.default.createElement(t,G({},this.props)):r.default.createElement(Q,{ns:e.moduleName,forceUpdate:function(){return n.forceUpdate()}},r.default.createElement(z.I18nextProvider,{i18n:J,defaultNS:e.moduleName},r.default.createElement(t,G({},this.props))))));return e.strictMode||!r.default.StrictMode?i:r.default.createElement(r.default.StrictMode,null,i)},s}(r.default.Component)).displayName="OpenmrsReactComponent(".concat(e.featureName,")"),n}}function et(t,e){return $({React:r.default,ReactDOM:P.default,rootComponent:tt(e)(t)})}function nt(t,e){return function(){return t().then((function(t){return et(t.default,e)}))}}function rt(t,e){return function(){return Promise.resolve(et(t,e))}}var ot=nt;function it(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function at(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return it(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?it(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)([])),n=e[0],o=e[1];return(0,r.useEffect)((function(){return(0,f.getExtensionStore)().subscribe((function(e){var r,i,a=null!==(i=null===(r=e.slots[t])||void 0===r?void 0:r.assignedExtensions.map((function(t){return t.id})))&&void 0!==i?i:[];(0,b.isEqual)(a,n)||o(a)}))}),[]),n}function ut(t){(0,r.useEffect)((function(){if(t){var e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}}}),[t])}const st=function(t,e){return t===e||t!=t&&e!=e},ct=function(t,e){for(var n=t.length;n--;)if(st(t[n][0],e))return n;return-1};var lt=Array.prototype.splice;function ft(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ft.prototype.clear=function(){this.__data__=[],this.size=0},ft.prototype.delete=function(t){var e=this.__data__,n=ct(e,t);return!(n<0||(n==e.length-1?e.pop():lt.call(e,n,1),--this.size,0))},ft.prototype.get=function(t){var e=this.__data__,n=ct(e,t);return n<0?void 0:e[n][1]},ft.prototype.has=function(t){return ct(this.__data__,t)>-1},ft.prototype.set=function(t,e){var n=this.__data__,r=ct(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};const ht=ft,pt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var dt="object"==typeof self&&self&&self.Object===Object&&self;const vt=pt||dt||Function("return this")(),yt=vt.Symbol;var gt=Object.prototype,mt=gt.hasOwnProperty,bt=gt.toString,wt=yt?yt.toStringTag:void 0,_t=Object.prototype.toString,St=yt?yt.toStringTag:void 0;const xt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":St&&St in Object(t)?function(t){var e=mt.call(t,wt),n=t[wt];try{t[wt]=void 0;var r=!0}catch(t){}var o=bt.call(t);return r&&(e?t[wt]=n:delete t[wt]),o}(t):function(t){return _t.call(t)}(t)},Et=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Ot=function(t){if(!Et(t))return!1;var e=xt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},jt=vt["__core-js_shared__"];var At,Ct=(At=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||""))?"Symbol(src)_1."+At:"",Pt=Function.prototype.toString;const kt=function(t){if(null!=t){try{return Pt.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var Tt=/^\[object .+?Constructor\]$/,It=Function.prototype,Rt=Object.prototype,Lt=It.toString,Dt=Rt.hasOwnProperty,Mt=RegExp("^"+Lt.call(Dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Nt=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Et(t)||(e=t,Ct&&Ct in e))&&(Ot(t)?Mt:Tt).test(kt(t));var e}(n)?n:void 0},$t=Nt(vt,"Map"),Bt=Nt(Object,"create");var Ut=Object.prototype.hasOwnProperty,Ft=Object.prototype.hasOwnProperty;function Kt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Kt.prototype.clear=function(){this.__data__=Bt?Bt(null):{},this.size=0},Kt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Kt.prototype.get=function(t){var e=this.__data__;if(Bt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Ut.call(e,t)?e[t]:void 0},Kt.prototype.has=function(t){var e=this.__data__;return Bt?void 0!==e[t]:Ft.call(e,t)},Kt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Bt&&void 0===e?"__lodash_hash_undefined__":e,this};const Ht=Kt,Vt=function(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map};function zt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}zt.prototype.clear=function(){this.size=0,this.__data__={hash:new Ht,map:new($t||ht),string:new Ht}},zt.prototype.delete=function(t){var e=Vt(this,t).delete(t);return this.size-=e?1:0,e},zt.prototype.get=function(t){return Vt(this,t).get(t)},zt.prototype.has=function(t){return Vt(this,t).has(t)},zt.prototype.set=function(t,e){var n=Vt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};const Gt=zt;function qt(t){var e=this.__data__=new ht(t);this.size=e.size}qt.prototype.clear=function(){this.__data__=new ht,this.size=0},qt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},qt.prototype.get=function(t){return this.__data__.get(t)},qt.prototype.has=function(t){return this.__data__.has(t)},qt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof ht){var r=n.__data__;if(!$t||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Gt(r)}return n.set(t,e),this.size=n.size,this};const Wt=qt;function Zt(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Gt;++e<n;)this.add(t[e])}Zt.prototype.add=Zt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Zt.prototype.has=function(t){return this.__data__.has(t)};const Yt=Zt,Jt=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},Xt=function(t,e){return t.has(e)},Qt=function(t,e,n,r,o,i){var a=1&n,u=t.length,s=e.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var f=-1,h=!0,p=2&n?new Yt:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var d=t[f],v=e[f];if(r)var y=a?r(v,d,f,e,t,i):r(d,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!Jt(e,(function(t,e){if(!Xt(p,e)&&(d===t||o(d,t,n,r,i)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!o(d,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},te=vt.Uint8Array,ee=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},ne=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n};var re=yt?yt.prototype:void 0,oe=re?re.valueOf:void 0;const ie=Array.isArray;var ae=Object.prototype.propertyIsEnumerable,ue=Object.getOwnPropertySymbols;const se=ue?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a)&&(i[o++]=a)}return i}(ue(t),(function(e){return ae.call(t,e)})))}:function(){return[]},ce=function(t){return null!=t&&"object"==typeof t},le=function(t){return ce(t)&&"[object Arguments]"==xt(t)};var fe=Object.prototype,he=fe.hasOwnProperty,pe=fe.propertyIsEnumerable,de=le(function(){return arguments}())?le:function(t){return ce(t)&&he.call(t,"callee")&&!pe.call(t,"callee")};const ve=de;var ye=e&&!e.nodeType&&e,ge=ye&&t&&!t.nodeType&&t,me=ge&&ge.exports===ye?vt.Buffer:void 0;const be=(me?me.isBuffer:void 0)||function(){return!1};var we=/^(?:0|[1-9]\d*)$/;const _e=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&we.test(t))&&t>-1&&t%1==0&&t<e},Se=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var xe={};xe["[object Float32Array]"]=xe["[object Float64Array]"]=xe["[object Int8Array]"]=xe["[object Int16Array]"]=xe["[object Int32Array]"]=xe["[object Uint8Array]"]=xe["[object Uint8ClampedArray]"]=xe["[object Uint16Array]"]=xe["[object Uint32Array]"]=!0,xe["[object Arguments]"]=xe["[object Array]"]=xe["[object ArrayBuffer]"]=xe["[object Boolean]"]=xe["[object DataView]"]=xe["[object Date]"]=xe["[object Error]"]=xe["[object Function]"]=xe["[object Map]"]=xe["[object Number]"]=xe["[object Object]"]=xe["[object RegExp]"]=xe["[object Set]"]=xe["[object String]"]=xe["[object WeakMap]"]=!1;var Ee=e&&!e.nodeType&&e,Oe=Ee&&t&&!t.nodeType&&t,je=Oe&&Oe.exports===Ee&&pt.process,Ae=function(){try{return Oe&&Oe.require&&Oe.require("util").types||je&&je.binding&&je.binding("util")}catch(t){}}(),Ce=Ae&&Ae.isTypedArray;const Pe=Ce?(ke=Ce,function(t){return ke(t)}):function(t){return ce(t)&&Se(t.length)&&!!xe[xt(t)]};var ke,Te=Object.prototype.hasOwnProperty,Ie=Object.prototype;const Re=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object);var Le=Object.prototype.hasOwnProperty;const De=function(t){return null!=(e=t)&&Se(e.length)&&!Ot(e)?function(t,e){var n=ie(t),r=!n&&ve(t),o=!n&&!r&&be(t),i=!n&&!r&&!o&&Pe(t),a=n||r||o||i,u=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],s=u.length;for(var c in t)!Te.call(t,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_e(c,s))||u.push(c);return u}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||Ie))return Re(t);var e,n,r=[];for(var o in Object(t))Le.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e},Me=function(t){return function(t,e,n){var r=e(t);return ie(t)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(t))}(t,De,se)};var Ne=Object.prototype.hasOwnProperty;const $e=Nt(vt,"DataView"),Be=Nt(vt,"Promise"),Ue=Nt(vt,"Set"),Fe=Nt(vt,"WeakMap");var Ke="[object Map]",He="[object Promise]",Ve="[object Set]",ze="[object WeakMap]",Ge="[object DataView]",qe=kt($e),We=kt($t),Ze=kt(Be),Ye=kt(Ue),Je=kt(Fe),Xe=xt;($e&&Xe(new $e(new ArrayBuffer(1)))!=Ge||$t&&Xe(new $t)!=Ke||Be&&Xe(Be.resolve())!=He||Ue&&Xe(new Ue)!=Ve||Fe&&Xe(new Fe)!=ze)&&(Xe=function(t){var e=xt(t),n="[object Object]"==e?t.constructor:void 0,r=n?kt(n):"";if(r)switch(r){case qe:return Ge;case We:return Ke;case Ze:return He;case Ye:return Ve;case Je:return ze}return e});const Qe=Xe;var tn="[object Arguments]",en="[object Array]",nn="[object Object]",rn=Object.prototype.hasOwnProperty;const on=function t(e,n,r,o,i){return e===n||(null==e||null==n||!ce(e)&&!ce(n)?e!=e&&n!=n:function(t,e,n,r,o,i){var a=ie(t),u=ie(e),s=a?en:Qe(t),c=u?en:Qe(e),l=(s=s==tn?nn:s)==nn,f=(c=c==tn?nn:c)==nn,h=s==c;if(h&&be(t)){if(!be(e))return!1;a=!0,l=!1}if(h&&!l)return i||(i=new Wt),a||Pe(t)?Qt(t,e,n,r,o,i):function(t,e,n,r,o,i,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new te(t),new te(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return st(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=ee;case"[object Set]":var s=1&r;if(u||(u=ne),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=Qt(u(t),u(e),r,o,i,a);return a.delete(t),l;case"[object Symbol]":if(oe)return oe.call(t)==oe.call(e)}return!1}(t,e,s,n,r,o,i);if(!(1&n)){var p=l&&rn.call(t,"__wrapped__"),d=f&&rn.call(e,"__wrapped__");if(p||d){var v=p?t.value():t,y=d?e.value():e;return i||(i=new Wt),o(v,y,n,r,i)}}return!!h&&(i||(i=new Wt),function(t,e,n,r,o,i){var a=1&n,u=Me(t),s=u.length;if(s!=Me(e).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in e:Ne.call(e,l)))return!1}var f=i.get(t),h=i.get(e);if(f&&h)return f==e&&h==t;var p=!0;i.set(t,e),i.set(e,t);for(var d=a;++c<s;){var v=t[l=u[c]],y=e[l];if(r)var g=a?r(y,v,l,e,t,i):r(v,y,l,t,e,i);if(!(void 0===g?v===y||o(v,y,n,r,i):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,r,o,i))}(e,n,r,o,t,i))};function an(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function un(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return an(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?an(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var cn={};function ln(t){var e=(0,r.useMemo)(i.getExtensionsConfigStore,[]),n=function(t,e){var n=sn((0,r.useState)(function(t,e){return e?function(){var n=t.getState(),r=(0,i.getExtensionConfigFromStore)(n,e.extensionSlotName,e.extensionId);if(r.loaded&&r.config)return r.config}:null}(t,e)),2),o=n[0],a=n[1];return(0,r.useEffect)((function(){if(e)return t.subscribe((function(t){var n=(0,i.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);n.loaded&&n.config&&!function(t,e){return on(t,e)}(n.config,o)&&a(n.config)}))}),[t,e,o]),o}(e,t);if(!n&&t){var o="".concat(t.extensionSlotName,"-").concat(t.extensionId);throw!cn[o]&&e&&(cn[o]=function(t,e){return new Promise((function(n){var r=t.subscribe((function(t){var o=(0,i.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(e,t)),cn[o]}return n||{}}function fn(){var t=(0,r.useContext)(o),e=t.moduleName,n=t.extension;if(!e&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var a=function(t){var e=(0,r.useMemo)((function(){return(0,i.getConfigStore)(t)}),[t]),n=t,o=function(t){var e=sn((0,r.useState)(function(t){return function(){var e=t.getState();return e.loaded&&e.config?e.config:null}}(t)),2),n=e[0],o=e[1];return(0,r.useEffect)((function(){return null==t?void 0:t.subscribe((function(t){t.loaded&&t.config&&o(t.config)}))}),[t]),n}(e);if(!o)throw cn[n]||(cn[n]=function(t){return new Promise((function(e){var n=t.subscribe((function(t){t.loaded&&t.config&&(e(t.config),n())}))}))}(e)),cn[n];return o}(e),u=ln(n),s=(0,r.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){un(t,e,n[e])}))}return t}({},a,u)}),[a,u]);return s}var hn,pn=v(766);function dn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function vn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){vn(t,e,n[e])}))}return t}!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLoadError"}(hn||(hn={}));var gn,mn={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};function bn(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]}function wn(t,e){switch(e.type){case hn.loadPatient:return yn({},t,{patientUuid:e.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case hn.newPatient:return yn({},t,{patient:e.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case hn.loadError:return yn({},t,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:e.err});default:return t}}function _n(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return dn(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dn(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useReducer)(wn,yn({},mn,{patientUuid:null!=t?t:null,isPendingUuid:!t,isLoadingPatient:!!t}))),n=e[0],o=e[1];return(0,r.useEffect)((function(){if(n.isPendingUuid){var t=bn();o(t?{type:hn.loadPatient,patientUuid:t}:{type:hn.newPatient,patient:null})}var e=!0;return n.isLoadingPatient&&n.patientUuid&&(0,pn.fetchCurrentPatient)(n.patientUuid).then((function(t){return e&&o({patient:t.data,type:hn.newPatient})}),(function(t){return e&&o({err:t,type:hn.loadError})})),function(){e=!1}}),[n.isPendingUuid,n.isLoadingPatient,n.patientUuid]),(0,r.useEffect)((function(){var t=function(t){var e=bn();e!=n.patientUuid&&o({type:hn.loadPatient,patientUuid:e})};return window.addEventListener("single-spa:routing-event",t),function(){return window.removeEventListener("single-spa:routing-event",t)}}),[n.patientUuid]),{isLoading:n.isPendingUuid||n.isLoadingPatient,patient:n.patient,patientUuid:null!=t?t:n.patientUuid,error:n.err}}function Sn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function xn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function En(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){xn(t,e,n[e])}))}return t}function On(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Sn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLloadErroroadError"}(gn||(gn={}));var jn={patient:null,isLoadingPatient:!0,err:null};function An(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]}function Cn(t,e){switch(e.type){case gn.loadPatient:return En({},t,{patient:null,isLoadingPatient:!0,err:null});case gn.newPatient:return En({},t,{patient:e.patient,isLoadingPatient:!1,err:null});case gn.loadError:return En({},t,{patient:null,isLoadingPatient:!1,err:e.err});default:return t}}function Pn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:An(),e=On((0,r.useReducer)(Cn,jn),2),n=e[0],o=e[1];return(0,r.useEffect)((function(){var e=!0;return t?((0,pn.fetchCurrentPatient)(t).then((function(t){return e&&o({patient:t.data,type:gn.newPatient})}),(function(t){return e&&o({err:t,type:gn.loadError})})),o({type:gn.loadPatient})):o({type:gn.newPatient,patient:null}),function(){e=!1}}),[t]),[n.isLoadingPatient,n.patient,t,n.err]}var kn=l((0,f.getExtensionInternalStore)());function Tn(t){var e=S(t);return(0,r.useMemo)((function(){return Object.fromEntries(e.map((function(t){return[t.name,t.meta]})))}),[e])}var In=l((0,f.getExtensionStore)());function Rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ln(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Rn(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rn(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)(0))[1];return(0,r.useCallback)((function(){t((function(t){return t+1}))}),[])}function Dn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Mn(){var t="tablet";return document.body.classList.forEach((function(e){switch(e){case"omrs-breakpoint-lt-tablet":t="phone";break;case"omrs-breakpoint-gt-tablet":t="desktop"}})),t}function Nn(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Dn(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dn(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)(Mn)),e=t[0],n=t[1];return(0,r.useEffect)((function(){var t=function(){n(Mn())};return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[]),e}function $n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bn(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return $n(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$n(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)([])),e=t[0],n=t[1];return(0,r.useEffect)((function(){var t=(0,pn.getLocations)().subscribe((function(t){n(t)}),(function(t){console.error(t)}));return function(){return t.unsubscribe()}}),[]),e}function Un(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,r.useRef)(null);return(0,r.useEffect)((function(){if(e){var r=function(e){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(e.target))||t(e)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[t,e]),n}function Fn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Kn,Hn,Vn=function(t){var e=t.privilege,n=t.fallback,o=t.children,i=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Fn(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fn(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)(null)),a=i[0],u=i[1];return(0,r.useEffect)((function(){var t=(0,pn.getCurrentUser)({includeAuthStatus:!1}).subscribe(u);return function(){return t.unsubscribe()}}),[]),a&&(0,pn.userHasAccess)(e,a)?r.default.createElement(r.default.Fragment,null,o):n?r.default.createElement(r.default.Fragment,null,n):null};function zn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Gn(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return zn(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zn(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)(null)),e=t[0],n=t[1],o=null;if(!e){if(Kn){var i=(0,pn.getSessionStore)().getState();i.loaded&&(o=i.session)}else Kn=new Promise((function(t){var e=function(e){var n=e.loaded,r=e.session;n&&(t(r),o=r,Hn&&Hn(),Hn=void 0)};e((0,pn.getSessionStore)().getState()),o||(Hn=(0,pn.getSessionStore)().subscribe(e))}));if(!o)throw Kn;n(o)}(0,r.useEffect)((function(){return Hn||(Hn=(0,pn.getSessionStore)().subscribe((function(t){var e=t.loaded,r=t.session;e&&(o=r,n(r))}))),function(){Hn&&Hn(),Hn=void 0}}),[]);var a=e||o;if(!a)throw Kn?(console.warn("useSession is in an unexpected state. Attempting to recover."),Kn):Error("useSession is in an invalid state.");return a}var qn=v(385);function Wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Zn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Zn(t,e,n[e])}))}return t}function Jn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Wn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xn(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}var Qn=function(t){return t};function tr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qn,n=arguments.length>2?arguments[2]:void 0,o=Jn((0,r.useState)((function(){return e(t.getState())})),2),i=o[0],a=o[1];(0,r.useEffect)((function(){return(0,qn.subscribeTo)(t,e,a)}),[t,e]);var u={};return n&&(u=(0,r.useMemo)((function(){return Xn(t,n)}),[t,n])),Yn({},i,u)}function er(t,e){return tr(t,Qn,e)}function nr(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))}function rr(t,e){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:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){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=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var or,ir=function(){},ar=void 0,ur=Object,sr=function(t){return t===ar},cr=function(t){return"function"==typeof t},lr=function(t,e){return ur.assign({},t,e)},fr="undefined",hr=function(){return typeof window!=fr},pr=new WeakMap,dr=0,vr=function(t){var e,n,r=typeof t,o=t&&t.constructor,i=o==Date;if(ur(t)!==t||i||o==RegExp)e=i?t.toJSON():"symbol"==r?t.toString():"string"==r?JSON.stringify(t):""+t;else{if(e=pr.get(t))return e;if(e=++dr+"~",pr.set(t,e),o==Array){for(e="@",n=0;n<t.length;n++)e+=vr(t[n])+",";pr.set(t,e)}if(o==ur){e="#";for(var a=ur.keys(t).sort();!sr(n=a.pop());)sr(t[n])||(e+=n+":"+vr(t[n])+",");pr.set(t,e)}}return e},yr=!0,gr=hr(),mr=typeof document!=fr,br=gr&&window.addEventListener?window.addEventListener.bind(window):ir,wr=mr?document.addEventListener.bind(document):ir,_r=gr&&window.removeEventListener?window.removeEventListener.bind(window):ir,Sr=mr?document.removeEventListener.bind(document):ir,xr={isOnline:function(){return yr},isVisible:function(){var t=mr&&document.visibilityState;return sr(t)||"hidden"!==t}},Er={initFocus:function(t){return wr("visibilitychange",t),br("focus",t),function(){Sr("visibilitychange",t),_r("focus",t)}},initReconnect:function(t){var e=function(){yr=!0,t()},n=function(){yr=!1};return br("online",e),br("offline",n),function(){_r("online",e),_r("offline",n)}}},Or=!hr()||"Deno"in window,jr=Or?r.useEffect:r.useLayoutEffect,Ar="undefined"!=typeof navigator&&navigator.connection,Cr=!Or&&Ar&&(["slow-2g","2g"].includes(Ar.effectiveType)||Ar.saveData),Pr=function(t){if(cr(t))try{t=t()}catch(e){t=""}var e=[].concat(t);return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?vr(t):"",e,t?"$swr$"+t:""]},kr=new WeakMap,Tr=function(t,e,n,r,o,i,a){void 0===a&&(a=!0);var u=kr.get(t),s=u[0],c=u[1],l=u[3],f=s[e],h=c[e];if(a&&h)for(var p=0;p<h.length;++p)h[p](n,r,o);return i&&(delete l[e],f&&f[0])?f[0](2).then((function(){return t.get(e)})):t.get(e)},Ir=0,Rr=function(){return++Ir},Lr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return nr(void 0,void 0,void 0,(function(){var e,n,r,o,i,a,u,s,c,l,f,h,p,d,v,y,g,m,b,w;return rr(this,(function(_){switch(_.label){case 0:if(e=t[0],n=t[1],r=t[2],o=t[3],a=!!sr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,s=!1!==i.rollbackOnError,c=i.optimisticData,l=Pr(n),f=l[0],h=l[2],!f)return[2];if(p=kr.get(e),d=p[2],t.length<3)return[2,Tr(e,f,e.get(f),ar,ar,u,!0)];if(v=r,g=Rr(),d[f]=[g,0],m=!sr(c),b=e.get(f),m&&(e.set(f,c),Tr(e,f,c)),cr(v))try{v=v(e.get(f))}catch(t){y=t}return v&&cr(v.then)?[4,v.catch((function(t){y=t}))]:[3,2];case 1:if(v=_.sent(),g!==d[f][0]){if(y)throw y;return[2,v]}y&&m&&s&&(a=!0,v=b,e.set(f,b)),_.label=2;case 2:return a&&(y||(cr(a)&&(v=a(v,b)),e.set(f,v)),e.set(h,lr(e.get(h),{error:y}))),d[f][1]=Rr(),[4,Tr(e,f,v,y,ar,u,!!a)];case 3:if(w=_.sent(),y)throw y;return[2,a?w:v]}}))}))},Dr=function(t,e){for(var n in t)t[n][0]&&t[n][0](e)},Mr=function(t,e){if(!kr.has(t)){var n=lr(Er,e),r={},o=Lr.bind(ar,t),i=ir;if(kr.set(t,[r,{},{},{},o]),!Or){var a=n.initFocus(setTimeout.bind(ar,Dr.bind(ar,r,0))),u=n.initReconnect(setTimeout.bind(ar,Dr.bind(ar,r,1)));i=function(){a&&a(),u&&u(),kr.delete(t)}}return[t,o,i]}return[t,kr.get(t)[4]]},Nr=Mr(new Map),$r=Nr[0],Br=Nr[1],Ur=lr({onLoadingSlow:ir,onSuccess:ir,onError:ir,onErrorRetry:function(t,e,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!sr(i)&&a>i||setTimeout(r,u,o)},onDiscarded:ir,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Cr?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Cr?5e3:3e3,compare:function(t,e){return vr(t)==vr(e)},isPaused:function(){return!1},cache:$r,mutate:Br,fallback:{}},xr),Fr=function(t,e){var n=lr(t,e);if(e){var r=t.use,o=t.fallback,i=e.use,a=e.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=lr(o,a))}return n},Kr=(0,r.createContext)({}),Hr=function(t){return cr(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}]},Vr=function(){return lr(Ur,(0,r.useContext)(Kr))},zr=function(t,e,n){var r=e[t]||(e[t]=[]);return r.push(n),function(){var t=r.indexOf(n);t>=0&&(r[t]=r[r.length-1],r.pop())}},Gr={dedupe:!0},qr=(ur.defineProperty((function(t){var e=t.value,n=Fr((0,r.useContext)(Kr),e),o=e&&e.provider,i=(0,r.useState)((function(){return o?Mr(o(n.cache||$r),e):ar}))[0];return i&&(n.cache=i[0],n.mutate=i[1]),jr((function(){return i?i[2]:ar}),[]),(0,r.createElement)(Kr.Provider,lr(t,{value:n}))}),"default",{value:Ur}),or=function(t,e,n){var o=n.cache,i=n.compare,a=n.fallbackData,u=n.suspense,s=n.revalidateOnMount,c=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,h=kr.get(o),p=h[0],d=h[1],v=h[2],y=h[3],g=Pr(t),m=g[0],b=g[1],w=g[2],_=(0,r.useRef)(!1),S=(0,r.useRef)(!1),x=(0,r.useRef)(m),E=(0,r.useRef)(e),O=(0,r.useRef)(n),j=function(){return O.current},A=function(){return j().isVisible()&&j().isOnline()},C=function(t){return o.set(w,lr(o.get(w),t))},P=o.get(m),k=sr(a)?n.fallback[m]:a,T=sr(P)?k:P,I=o.get(w)||{},R=I.error,L=!_.current,D=function(){return L&&!sr(s)?s:!j().isPaused()&&(u?!sr(T):sr(T)||n.revalidateIfStale)},M=!(!m||!e)&&(!!I.isValidating||L&&D()),N=function(t,e){var n=(0,r.useState)({})[1],o=(0,r.useRef)(t),i=(0,r.useRef)({data:!1,error:!1,isValidating:!1}),a=(0,r.useCallback)((function(t){var r=!1,a=o.current;for(var u in t){var s=u;a[s]!==t[s]&&(a[s]=t[s],i.current[s]&&(r=!0))}r&&!e.current&&n({})}),[]);return jr((function(){o.current=t})),[o,i.current,a]}({data:T,error:R,isValidating:M},S),$=N[0],B=N[1],U=N[2],F=(0,r.useCallback)((function(t){return nr(void 0,void 0,void 0,(function(){var e,r,a,u,s,c,l,f,h,p,d,g,w;return rr(this,(function(O){switch(O.label){case 0:if(e=E.current,!m||!e||S.current||j().isPaused())return[2,!1];u=!0,s=t||{},c=!y[m]||!s.dedupe,l=function(){return!S.current&&m===x.current&&_.current},f=function(){var t=y[m];t&&t[1]===a&&delete y[m]},h={isValidating:!1},p=function(){C({isValidating:!1}),l()&&U(h)},C({isValidating:!0}),U({isValidating:!0}),O.label=1;case 1:return O.trys.push([1,3,,4]),c&&(Tr(o,m,$.current.data,$.current.error,!0),n.loadingTimeout&&!o.get(m)&&setTimeout((function(){u&&l()&&j().onLoadingSlow(m,n)}),n.loadingTimeout),y[m]=[e.apply(void 0,b),Rr()]),w=y[m],r=w[0],a=w[1],[4,r];case 2:return r=O.sent(),c&&setTimeout(f,n.dedupingInterval),y[m]&&y[m][1]===a?(C({error:ar}),h.error=ar,d=v[m],!sr(d)&&(a<=d[0]||a<=d[1]||0===d[1])?(p(),c&&l()&&j().onDiscarded(m),[2,!1]):(i($.current.data,r)?h.data=$.current.data:h.data=r,i(o.get(m),r)||o.set(m,r),c&&l()&&j().onSuccess(r,m,n),[3,4])):(c&&l()&&j().onDiscarded(m),[2,!1]);case 3:return g=O.sent(),f(),j().isPaused()||(C({error:g}),h.error=g,c&&l()&&(j().onError(g,m,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||cr(n.shouldRetryOnError)&&n.shouldRetryOnError(g))&&A()&&j().onErrorRetry(g,m,n,F,{retryCount:(s.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return u=!1,p(),l()&&c&&Tr(o,m,h.data,h.error,!1),[2,!0]}}))}))}),[m]),K=(0,r.useCallback)(Lr.bind(ar,o,(function(){return x.current})),[]);if(jr((function(){E.current=e,O.current=n})),jr((function(){if(m){var t=m!==x.current,e=F.bind(ar,Gr),n=0,r=zr(m,d,(function(t,e,n){U(lr({error:e,isValidating:n},i($.current.data,t)?ar:{data:t}))})),o=zr(m,p,(function(t){if(0==t){var r=Date.now();j().revalidateOnFocus&&r>n&&A()&&(n=r+j().focusThrottleInterval,e())}else if(1==t)j().revalidateOnReconnect&&A()&&e();else if(2==t)return F()}));return S.current=!1,x.current=m,_.current=!0,t&&U({data:T,error:R,isValidating:M}),D()&&(sr(T)||Or?e():(a=e,hr()&&typeof window.requestAnimationFrame!=fr?window.requestAnimationFrame(a):setTimeout(a,1))),function(){S.current=!0,r(),o()}}var a}),[m,F]),jr((function(){var t;function e(){var e=cr(c)?c(T):c;e&&-1!==t&&(t=setTimeout(n,e))}function n(){$.current.error||!l&&!j().isVisible()||!f&&!j().isOnline()?e():F(Gr).then(e)}return e(),function(){t&&(clearTimeout(t),t=-1)}}),[c,l,f,F]),(0,r.useDebugValue)(T),u&&sr(T)&&m)throw E.current=e,O.current=n,S.current=!1,sr(R)?F(Gr):R;return{mutate:K,get data(){return B.data=!0,T},get error(){return B.error=!0,R},get isValidating(){return B.isValidating=!0,M}}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Vr(),r=Hr(t),o=r[0],i=r[1],a=r[2],u=Fr(n,a),s=or,c=u.use;if(c)for(var l=c.length;l-- >0;)s=c[l](s);return s(o,i||u.fetcher,u)}),Wr=v(688),Zr=v(332),Yr=v.n(Zr);function Jr(t){var e,n=qr(t?"/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(pn.defaultVisitCustomRepresentation,"&includeInactive=false"):null,pn.openmrsFetch),o=n.data,i=n.error;return{error:i,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,r.useMemo)((function(){return null!==(e=null==o?void 0:o.data.results.find((function(t){return null===t.stopDatetime&&(0,Wr.default)(t.startDatetime).isToday()})))&&void 0!==e?e:null}),[null==o?void 0:o.data.results]),isLoading:!o&&!i}}function Xr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Qr(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Xr(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xr(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)([])),e=t[0],n=t[1];return(0,r.useEffect)((function(){var t=(0,pn.getVisitTypes)().subscribe((function(t){n(t)}),(function(t){return console.error(t)}));return function(){return t.unsubscribe()}}),[]),e}function to(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function eo(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return to(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?to(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function no(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=eo((0,r.useState)(1),2),o=n[0],i=n[1],a=(0,r.useMemo)((function(){return Math.max(1,Math.ceil(t.length/e))}),[t.length,e]),u=(0,r.useMemo)((function(){var n=(o-1)*e,r=(o+0)*e;return t.slice(n,r)}),[t,o,e]);return{results:u,totalPages:a,currentPage:o,paginated:t.length>e,showNextButton:o<a,showPreviousButton:o>1,goTo:function(t){i(Math.max(1,Math.min(a,t)))},goToNext:function(){o<a&&i(o+1)},goToPrevious:function(){o>1&&i(o-1)}}}Wr.default.extend(Yr())})(),y})())}}}))},5435:()=>{System.register([],(function(t,e){return{execute:function(){t((()=>{var t={968:(t,e,n)=>{const r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})();var o={};return(0,r(968).s)(1),(()=>{"use strict";function t(t,e){for(var n in e)t[n]=e[n];return t}function e(e){var n=[];function r(t){for(var e=[],r=0;r<n.length;r++)n[r]===t?t=null:e.push(n[r]);n=e}function o(r,o,i){e=o?r:t(t({},e),r);for(var a=n,u=0;u<a.length;u++)a[u](e,i)}return e=e||{},{action:function(t){function n(e){o(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:o,subscribe:function(t){return n.push(t),function(){r(t)}},unsubscribe:r,getState:function(){return e}}}r.r(o),r.d(o,{createAppState:()=>u,createGlobalStore:()=>i,getAppState:()=>s,getGlobalStore:()=>a,subscribeTo:()=>c});var n={};function i(t,r){var o=n[t];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;var i=e(r);return n[t]={value:i,active:!0},i}function a(t,r){var o=n[t];if(!o){var i=e(r);return n[t]={value:i,active:!1},i}return o.value}function u(t){return i("app",t)}function s(){return a("app",{})}function c(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))}})(),o})())}}}))},2742:(t,e,n)=>{t=n.nmd(t),System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","i18next","react","react-dom","react-i18next","rxjs"],(function(r,o){var i={},a={},u={},s={},c={},l={},f={},h={};return{setters:[function(t){i.getExtensionInternalStore=t.getExtensionInternalStore,i.getExtensionStore=t.getExtensionStore},function(){},function(t){u.createGlobalStore=t.createGlobalStore,u.getGlobalStore=t.getGlobalStore},function(t){s.default=t.default},function(t){c.createContext=t.createContext,c.createElement=t.createElement,c.default=t.default,c.useCallback=t.useCallback,c.useContext=t.useContext,c.useDebugValue=t.useDebugValue,c.useEffect=t.useEffect,c.useLayoutEffect=t.useLayoutEffect,c.useMemo=t.useMemo,c.useRef=t.useRef,c.useState=t.useState},function(){},function(){},function(t){h.BehaviorSubject=t.BehaviorSubject,h.Subject=t.Subject}],execute:function(){r((()=>{var r={23:function(t){function e(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}t.exports=function(){"use strict";var t=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",u="day",s="week",c="month",l="quarter",f="year",h="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+)?$/,v=/\[([^\]]+)]|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,y={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(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},m={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,c),i=n-o<0,a=e.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:f,w:s,d:u,D:h,h:a,m:i,s:o,ms:r,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=y;var _=function(t){return e(t,A)},S=function t(e,n,r){var o;if(!e)return b;if("string"==typeof e){var i=e.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=e.split("-");if(!o&&a.length>1)return t(a[0])}else{var u=e.name;w[u]=e,o=u}return!r&&o&&(b=o),o||!r&&b},x=function(t,e){if(_(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new A(n)},E=m;E.l=S,E.i=_,E.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var O,j,A=((j=(O=function(t){this.$L=S(t.locale,null,!0),this.parse(t)}).prototype).parse=function(t){this.$d=function(t){var n=t.date,r=t.utc;if(null===n)return new Date(NaN);if(E.u(n))return new Date;if(e(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(d);if(o){var i=o[2]-1||0,a=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},j.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},j.$utils=function(){return E},j.isValid=function(){return!(this.$d.toString()===p)},j.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},j.isAfter=function(t,e){return x(t)<this.startOf(e)},j.isBefore=function(t,e){return this.endOf(e)<x(t)},j.$g=function(t,e,n){return E.u(t)?this[e]:this.set(n,t)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(t,e){var n=this,r=!!E.u(e)||e,l=E.p(t),p=function(t,e){var o=E.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?o:o.endOf(u)},d=function(t,e){return E.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},v=this.$W,y=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(l){case f:return r?p(1,0):p(31,11);case c:return r?p(1,y):p(0,y+1);case s:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return p(r?g-w:g+(6-w),y);case u:case h:return d(m+"Hours",0);case a:return d(m+"Minutes",1);case i:return d(m+"Seconds",2);case o:return d(m+"Milliseconds",3);default:return this.clone()}},j.endOf=function(t){return this.startOf(t,!1)},j.$set=function(t,e){var n,s=E.p(t),l="set"+(this.$u?"UTC":""),p=(n={},n[u]=l+"Date",n[h]=l+"Date",n[c]=l+"Month",n[f]=l+"FullYear",n[a]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[s],d=s===u?this.$D+(e-this.$W):e;if(s===c||s===f){var v=this.clone().set(h,1);v.$d[p](d),v.init(),this.$d=v.set(h,Math.min(this.$D,v.daysInMonth())).$d}else p&&this.$d[p](d);return this.init(),this},j.set=function(t,e){return this.clone().$set(t,e)},j.get=function(t){return this[E.p(t)]()},j.add=function(e,r){var l,h=this;e=Number(e);var p=E.p(r),d=function(t){var n=x(h);return E.w(n.date(n.date()+Math.round(t*e)),h)};if(p===c)return this.set(c,this.$M+e);if(p===f)return this.set(f,this.$y+e);if(p===u)return d(1);if(p===s)return d(7);var v=(l={},l[i]=t,l[a]=n,l[o]=1e3,l)[p]||1,y=this.$d.getTime()+e*v;return E.w(y,this)},j.subtract=function(t,e){return this.add(-1*t,e)},j.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=E.z(this),i=this.$H,a=this.$m,u=this.$M,s=n.weekdays,c=n.months,l=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].substr(0,i)},f=function(t){return E.s(i%12||12,t,"0")},h=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},d={YY:String(this.$y).slice(-2),YYYY:this.$y,M:u+1,MM:E.s(u+1,2,"0"),MMM:l(n.monthsShort,u,c,3),MMMM:l(c,u),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,s,2),ddd:l(n.weekdaysShort,this.$W,s,3),dddd:s[this.$W],H:String(i),HH:E.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,a,!0),A:h(i,a,!1),m:String(a),mm:E.s(a,2,"0"),s:String(this.$s),ss:E.s(this.$s,2,"0"),SSS:E.s(this.$ms,3,"0"),Z:o};return r.replace(v,(function(t,e){return e||d[t]||o.replace(":","")}))},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(e,r,h){var p,d=E.p(r),v=x(e),y=(v.utcOffset()-this.utcOffset())*t,g=this-v,m=E.m(this,v);return m=(p={},p[f]=m/12,p[c]=m,p[l]=m/3,p[s]=(g-y)/6048e5,p[u]=(g-y)/864e5,p[a]=g/n,p[i]=g/t,p[o]=g/1e3,p)[d]||g,h?m:E.a(m)},j.daysInMonth=function(){return this.endOf(c).$D},j.$locale=function(){return w[this.$L]},j.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},j.clone=function(){return E.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},O),C=A.prototype;return x.prototype=C,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",u],["$M",c],["$y",f],["$D",h]].forEach((function(t){C[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,A,x),t.$i=!0),x},x.locale=S,x.isDayjs=_,x.unix=function(t){return x(1e3*t)},x.en=w[b],x.Ls=w,x.p={},x}()},701:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},435:function(t,e,n){var r;function o(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}t=n.nmd(t);var i=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};(function(){var a,u=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},s=function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var a=t[o];e(r,a,n(a),t)}return r},c=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},l=function(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t},f=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0},h=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i},p=function(t,e){return!(null==t||!t.length)&&S(t,e,0)>-1},d=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1},v=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},y=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},g=function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n},m=function(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n},b=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},w=function(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r},_=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1},S=function(t,e,n){return e==e?V(t,e,n):_(t,E,n)},x=function(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1},E=function(t){return t!=t},O=function(t,e){var n=null==t?0:t.length;return n?P(t,e)/n:rt},j=function(t){return function(e){return null==e?a:e[t]}},A=function(t){return function(e){return null==t?a:t[e]}},C=function(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n},P=function(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);i!==a&&(n=n===a?i:n+i)}return n},k=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},T=function(t){return t?t.slice(0,q(t)+1).replace(Wt,""):t},I=function(t){return function(e){return t(e)}},R=function(t,e){return v(e,(function(e){return t[e]}))},L=function(t,e){return t.has(e)},D=function(t,e){for(var n=-1,r=t.length;++n<r&&S(e,t[n],0)>-1;);return n},M=function(t,e){for(var n=t.length;n--&&S(e,t[n],0)>-1;);return n},N=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r},$=function(t){return"\\"+Ve[t]},B=function(t){return $e.test(t)},U=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},F=function(t,e){return function(n){return t(e(n))}},K=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var a=t[n];a!==e&&a!==X||(t[n]=X,i[o++]=n)}return i},H=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},V=function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1},z=function(t){return B(t)?W(t):sn(t)},G=function(t){return B(t)?Z(t):function(t){return t.split("")}(t)},q=function(t){for(var e=t.length;e--&&Zt.test(t.charAt(e)););return e},W=function(t){for(var e=Me.lastIndex=0;Me.test(t);)++e;return e},Z=function(t){return t.match(Me)||[]},Y="Expected a function",J="__lodash_hash_undefined__",X="__lodash_placeholder__",Q=32,tt=128,et=1/0,nt=9007199254740991,rt=NaN,ot=4294967295,it=[["ary",tt],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Q],["partialRight",64],["rearg",256]],at="[object Arguments]",ut="[object Array]",st="[object Boolean]",ct="[object Date]",lt="[object Error]",ft="[object Function]",ht="[object GeneratorFunction]",pt="[object Map]",dt="[object Number]",vt="[object Object]",yt="[object Promise]",gt="[object RegExp]",mt="[object Set]",bt="[object String]",wt="[object Symbol]",_t="[object WeakMap]",St="[object ArrayBuffer]",xt="[object DataView]",Et="[object Float32Array]",Ot="[object Float64Array]",jt="[object Int8Array]",At="[object Int16Array]",Ct="[object Int32Array]",Pt="[object Uint8Array]",kt="[object Uint8ClampedArray]",Tt="[object Uint16Array]",It="[object Uint32Array]",Rt=/\b__p \+= '';/g,Lt=/\b(__p \+=) '' \+/g,Dt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mt=/&(?:amp|lt|gt|quot|#39);/g,Nt=/[&<>"']/g,$t=RegExp(Mt.source),Bt=RegExp(Nt.source),Ut=/<%-([\s\S]+?)%>/g,Ft=/<%([\s\S]+?)%>/g,Kt=/<%=([\s\S]+?)%>/g,Ht=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vt=/^\w*$/,zt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gt=/[\\^$.*+?()[\]{}|]/g,qt=RegExp(Gt.source),Wt=/^\s+/,Zt=/\s/,Yt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jt=/\{\n\/\* \[wrapped with (.+)\] \*/,Xt=/,? & /,Qt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/[()=,{}\[\]\/\s]/,ee=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,oe=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,ue=/^0o[0-7]+$/i,se=/^(?:0|[1-9]\d*)$/,ce=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,le=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,he="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pe="a-z\\xdf-\\xf6\\xf8-\\xff",de="A-Z\\xc0-\\xd6\\xd8-\\xde",ve="\\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",ye="["+ve+"]",ge="["+he+"]",me="\\d+",be="["+pe+"]",we="[^\ud800-\udfff"+ve+me+"\\u2700-\\u27bf"+pe+de+"]",_e="[^\ud800-\udfff]",Se="(?:\ud83c[\udde6-\uddff]){2}",xe="[\ud800-\udbff][\udc00-\udfff]",Ee="["+de+"]",Oe="(?:"+be+"|"+we+")",je="(?:"+Ee+"|"+we+")",Ae="(?:['’](?:d|ll|m|re|s|t|ve))?",Ce="(?:['’](?:D|LL|M|RE|S|T|VE))?",Pe="(?:"+ge+"|\ud83c[\udffb-\udfff])?",ke="[\\ufe0e\\ufe0f]?",Te=ke+Pe+"(?:\\u200d(?:"+[_e,Se,xe].join("|")+")"+ke+Pe+")*",Ie="(?:"+["[\\u2700-\\u27bf]",Se,xe].join("|")+")"+Te,Re="(?:"+[_e+ge+"?",ge,Se,xe,"[\ud800-\udfff]"].join("|")+")",Le=RegExp("['’]","g"),De=RegExp(ge,"g"),Me=RegExp("\ud83c[\udffb-\udfff](?=\ud83c[\udffb-\udfff])|"+Re+Te,"g"),Ne=RegExp([Ee+"?"+be+"+"+Ae+"(?="+[ye,Ee,"$"].join("|")+")",je+"+"+Ce+"(?="+[ye,Ee+Oe,"$"].join("|")+")",Ee+"?"+Oe+"+"+Ae,Ee+"+"+Ce,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Ie].join("|"),"g"),$e=RegExp("[\\u200d\ud800-\udfff"+he+"\\ufe0e\\ufe0f]"),Be=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ue=["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"],Fe=-1,Ke={};Ke[Et]=Ke[Ot]=Ke[jt]=Ke[At]=Ke[Ct]=Ke[Pt]=Ke[kt]=Ke[Tt]=Ke[It]=!0,Ke[at]=Ke[ut]=Ke[St]=Ke[st]=Ke[xt]=Ke[ct]=Ke[lt]=Ke[ft]=Ke[pt]=Ke[dt]=Ke[vt]=Ke[gt]=Ke[mt]=Ke[bt]=Ke[_t]=!1;var He={};He[at]=He[ut]=He[St]=He[xt]=He[st]=He[ct]=He[Et]=He[Ot]=He[jt]=He[At]=He[Ct]=He[pt]=He[dt]=He[vt]=He[gt]=He[mt]=He[bt]=He[wt]=He[Pt]=He[kt]=He[Tt]=He[It]=!0,He[lt]=He[ft]=He[_t]=!1;var Ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ze=parseFloat,Ge=parseInt,qe="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,We="object"==typeof self&&self&&self.Object===Object&&self,Ze=qe||We||Function("return this")(),Ye=e&&!e.nodeType&&e,Je=Ye&&t&&!t.nodeType&&t,Xe=Je&&Je.exports===Ye,Qe=Xe&&qe.process,tn=function(){try{return Je&&Je.require&&Je.require("util").types||Qe&&Qe.binding&&Qe.binding("util")}catch(t){}}(),en=tn&&tn.isArrayBuffer,nn=tn&&tn.isDate,rn=tn&&tn.isMap,on=tn&&tn.isRegExp,an=tn&&tn.isSet,un=tn&&tn.isTypedArray,sn=j("length"),cn=A({À:"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"}),ln=A({"&":"&","<":"<",">":">",'"':""","'":"'"}),fn=A({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hn=function t(e){var n,r,A=function(t){if(No(t)&&!$u(t)&&!o(t,Z)){if(o(t,W))return t;if(ji.call(t,"__wrapped__"))return co(t)}return new W(t)},V=function(){},W=function(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=a},Z=function(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ot,this.__views__=[]},Zt=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},he=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},pe=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},de=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new pe;++e<n;)this.add(t[e])},ve=function(t){var e=this.__data__=new he(t);this.size=e.size},ye=function(t,e){var n=$u(t),r=!n&&Nu(t),o=!n&&!r&&Uu(t),i=!n&&!r&&!o&&zu(t),a=n||r||o||i,u=a?k(t.length,bi):[],s=u.length;for(var c in t)!e&&!ji.call(t,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Kr(c,s))||u.push(c);return u},ge=function(t){var e=t.length;return e?t[Cn(0,e-1)]:a},me=function(t,e){return io(ir(t),Ae(e,0,t.length))},be=function(t){return io(ir(t))},we=function(t,e,n){(n!==a&&!Po(t[e],n)||n===a&&!(e in t))&&Oe(t,e,n)},_e=function(t,e,n){var r=t[e];ji.call(t,e)&&Po(r,n)&&(n!==a||e in t)||Oe(t,e,n)},Se=function(t,e){for(var n=t.length;n--;)if(Po(t[n][0],e))return n;return-1},xe=function(t,e,n,r){return Oa(t,(function(t,o,i){e(r,t,n(t),i)})),r},Ee=function(t,e){return t&&ar(e,Jo(e),t)},Oe=function(t,e,n){"__proto__"==e&&Vi?Vi(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},je=function(t,e){for(var n=-1,r=e.length,o=hi(r),i=null==t;++n<r;)o[n]=i?a:Zo(t,e[n]);return o},Ae=function(t,e,n){return t==t&&(n!==a&&(t=t<=n?t:n),e!==a&&(t=t>=e?t:e)),t},Ce=function(t,e,n){var r=n.length;if(null==t)return!r;for(t=gi(t);r--;){var o=n[r],i=e[o],u=t[o];if(u===a&&!(o in t)||!i(u))return!1}return!0},Pe=function(t,e,n){if("function"!=typeof t)throw new wi(Y);return Za((function(){t.apply(a,n)}),e)},ke=function(t,e,n,r){var o=-1,i=p,a=!0,u=t.length,s=[],c=e.length;if(!u)return s;n&&(e=v(e,I(n))),r?(i=d,a=!1):e.length>=200&&(i=L,a=!1,e=new de(e));t:for(;++o<u;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var h=c;h--;)if(e[h]===f)continue t;s.push(l)}else i(e,f,r)||s.push(l)}return s},Te=function(t,e){var n=!0;return Oa(t,(function(t,r,o){return n=!!e(t,r,o)})),n},Ie=function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],u=e(i);if(null!=u&&(s===a?u==u&&!Fo(u):n(u,s)))var s=u,c=i}return c},Re=function(t,e){var n=[];return Oa(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n},Me=function(t,e){return t&&Ca(t,e,Jo)},$e=function(t,e){return t&&Pa(t,e,Jo)},Ve=function(t,e){return h(e,(function(e){return Ro(t[e])}))},qe=function(t,e){for(var n=0,r=(e=Yn(e,t)).length;null!=t&&n<r;)t=t[ao(e[n++])];return n&&n==r?t:a},We=function(t,e,n){var r=e(t);return $u(t)?r:y(r,n(t))},Ye=function(t){return null==t?t===a?"[object Undefined]":"[object Null]":Hi&&Hi in gi(t)?$r(t):Xr(t)},Je=function(t,e){return t>e},Qe=function(t,e){return null!=t&&ji.call(t,e)},tn=function(t,e){return null!=t&&e in gi(t)},sn=function(t,e,n){for(var r=n?d:p,o=t[0].length,i=t.length,u=i,s=hi(i),c=1/0,l=[];u--;){var f=t[u];u&&e&&(f=v(f,I(e))),c=na(f.length,c),s[u]=!n&&(e||o>=120&&f.length>=120)?new de(u&&f):a}f=t[0];var h=-1,y=s[0];t:for(;++h<o&&l.length<c;){var g=f[h],m=e?e(g):g;if(g=n||0!==g?g:0,!(y?L(y,m):r(l,m,n))){for(u=i;--u;){var b=s[u];if(!(b?L(b,m):r(t[u],m,n)))continue t}y&&y.push(m),l.push(g)}}return l},pn=function(t,e,n){e=Yn(e,t);var r=null==(t=to(t,e))?t:t[ao(vo(e))];return null==r?a:u(r,t,n)},dn=function(t){return No(t)&&Ye(t)==at},vn=function(t,e,n,r){var o=n.length,i=o,u=!r;if(null==t)return!i;for(t=gi(t);o--;){var s=n[o];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<i;){var c=(s=n[o])[0],l=t[c],f=s[1];if(u&&s[2]){if(l===a&&!(c in t))return!1}else{var h=new ve;if(r)var p=r(l,f,c,t,e,h);if(!(p===a?ka(f,l,3,r,h):p))return!1}}return!0},yn=function(t){return!(!Mo(t)||qr(t))&&(Ro(t)?Ii:ae).test(uo(t))},gn=function(t){return"function"==typeof t?t:null==t?ii:"object"==typeof t?$u(t)?Sn(t[0],t[1]):_n(t):ci(t)},mn=function(t){if(!Wr(t))return ta(t);var e=[];for(var n in gi(t))ji.call(t,n)&&"constructor"!=n&&e.push(n);return e},bn=function(t,e){return t<e},wn=function(t,e){var n=-1,r=ko(t)?hi(t.length):[];return Oa(t,(function(t,o,i){r[++n]=e(t,o,i)})),r},_n=function(t){var e=Mr(t);return 1==e.length&&e[0][2]?Yr(e[0][0],e[0][1]):function(n){return n===t||vn(n,t,e)}},Sn=function(t,e){return Vr(t)&&Zr(e)?Yr(ao(t),e):function(n){var r=Zo(n,t);return r===a&&r===e?Yo(n,t):ka(e,r,3)}},xn=function(t,e){var n=t.length;if(n)return Kr(e+=e<0?n:0,n)?t[e]:a},En=function(t,e,n){e=e.length?v(e,(function(t){return $u(t)?function(e){return qe(e,1===t.length?t[0]:t)}:t})):[ii];var r=-1;return e=v(e,I(Lr())),function(t,e){var r=t.length;for(t.sort((function(t,e){return nr(t,e,n)}));r--;)t[r]=t[r].value;return t}(wn(t,(function(t,n,o){return{criteria:v(e,(function(e){return e(t)})),index:++r,value:t}})))},On=function(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var a=e[r],u=qe(t,a);n(u,a)&&Rn(i,Yn(a,t),u)}return i},jn=function(t,e,n,r){var o=r?x:S,i=-1,a=e.length,u=t;for(t===e&&(e=ir(e)),n&&(u=v(t,I(n)));++i<a;)for(var s=0,c=e[i],l=n?n(c):c;(s=o(u,l,s,r))>-1;)u!==t&&Ui.call(u,s,1),Ui.call(t,s,1);return t},An=function(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;Kr(o)?Ui.call(t,o,1):Kn(t,o)}}return t},Cn=function(t,e){return t+Zi(ia()*(e-t+1))},Pn=function(t,e){var n="";if(!t||e<1||e>nt)return n;do{e%2&&(n+=t),(e=Zi(e/2))&&(t+=t)}while(e);return n},kn=function(t,e){return Ya(Qr(t,e,ii),t+"")},Tn=function(t){return ge(ti(t))},In=function(t,e){var n=ti(t);return io(n,Ae(e,0,n.length))},Rn=function(t,e,n,r){if(!Mo(t))return t;for(var o=-1,i=(e=Yn(e,t)).length,u=i-1,s=t;null!=s&&++o<i;){var c=ao(e[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=u){var f=s[c];(l=r?r(f,c,s):a)===a&&(l=Mo(f)?f:Kr(e[o+1])?[]:{})}_e(s,c,l),s=s[c]}return t},Ln=function(t){return io(ti(t))},Dn=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=hi(o);++r<o;)i[r]=t[r+e];return i},Mn=function(t,e){var n;return Oa(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n},Nn=function(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=t[i];null!==a&&!Fo(a)&&(n?a<=e:a<e)?r=i+1:o=i}return o}return $n(t,e,ii,n)},$n=function(t,e,n,r){var o=0,i=null==t?0:t.length;if(0===i)return 0;for(var u=(e=n(e))!=e,s=null===e,c=Fo(e),l=e===a;o<i;){var f=Zi((o+i)/2),h=n(t[f]),p=h!==a,d=null===h,v=h==h,y=Fo(h);if(u)var g=r||v;else g=l?v&&(r||p):s?v&&p&&(r||!d):c?v&&p&&!d&&(r||!y):!d&&!y&&(r?h<=e:h<e);g?o=f+1:i=f}return na(i,4294967294)},Bn=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var a=t[n],u=e?e(a):a;if(!n||!Po(u,s)){var s=u;i[o++]=0===a?0:a}}return i},Un=function(t){return"number"==typeof t?t:Fo(t)?rt:+t},Fn=function(t,e,n){var r=-1,o=p,i=t.length,a=!0,u=[],s=u;if(n)a=!1,o=d;else if(i>=200){var c=e?null:$a(t);if(c)return H(c);a=!1,o=L,s=new de}else s=e?[]:u;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=s.length;h--;)if(s[h]===f)continue t;e&&s.push(f),u.push(l)}else o(s,f,n)||(s!==u&&s.push(f),u.push(l))}return u},Kn=function(t,e){return e=Yn(e,t),null==(t=to(t,e))||delete t[ao(vo(e))]},Hn=function(t,e,n,r){return Rn(t,e,n(qe(t,e)),r)},Vn=function(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Dn(t,r?0:i,r?i+1:o):Dn(t,r?i+1:0,r?o:i)},zn=function(t,e){var n=t;return o(n,Z)&&(n=n.value()),g(e,(function(t,e){return e.func.apply(e.thisArg,y([t],e.args))}),n)},Gn=function(t,e,n){var r=t.length;if(r<2)return r?Fn(t[0]):[];for(var o=-1,i=hi(r);++o<r;)for(var a=t[o],u=-1;++u<r;)u!=o&&(i[o]=ke(i[o]||a,t[u],e,n));return Fn(Aa(i,1),e,n)},qn=function(t,e,n){for(var r=-1,o=t.length,i=e.length,u={};++r<o;){var s=r<i?e[r]:a;n(u,t[r],s)}return u},Wn=function(t){return To(t)?t:[]},Zn=function(t){return"function"==typeof t?t:ii},Yn=function(t,e){return $u(t)?t:Vr(t,e)?[t]:Ja(Wo(t))},Jn=function(t,e,n){var r=t.length;return n=n===a?r:n,!e&&n>=r?t:Dn(t,e,n)},Xn=function(t,e){if(e)return t.slice();var n=t.length,r=Mi?Mi(n):new t.constructor(n);return t.copy(r),r},Qn=function(t){var e=new t.constructor(t.byteLength);return new Di(e).set(new Di(t)),e},tr=function(t,e){var n=e?Qn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},er=function(t,e){if(t!==e){var n=t!==a,r=null===t,o=t==t,i=Fo(t),u=e!==a,s=null===e,c=e==e,l=Fo(e);if(!s&&!l&&!i&&t>e||i&&u&&c&&!s&&!l||r&&u&&c||!n&&c||!o)return 1;if(!r&&!i&&!l&&t<e||l&&n&&o&&!r&&!i||s&&n&&o||!u&&o||!c)return-1}return 0},nr=function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,a=o.length,u=n.length;++r<a;){var s=er(o[r],i[r]);if(s)return r>=u?s:s*("desc"==n[r]?-1:1)}return t.index-e.index},rr=function(t,e,n,r){for(var o=-1,i=t.length,a=n.length,u=-1,s=e.length,c=ea(i-a,0),l=hi(s+c),f=!r;++u<s;)l[u]=e[u];for(;++o<a;)(f||o<i)&&(l[n[o]]=t[o]);for(;c--;)l[u++]=t[o++];return l},or=function(t,e,n,r){for(var o=-1,i=t.length,a=-1,u=n.length,s=-1,c=e.length,l=ea(i-u,0),f=hi(l+c),h=!r;++o<l;)f[o]=t[o];for(var p=o;++s<c;)f[p+s]=e[s];for(;++a<u;)(h||o<i)&&(f[p+n[a]]=t[o++]);return f},ir=function(t,e){var n=-1,r=t.length;for(e||(e=hi(r));++n<r;)e[n]=t[n];return e},ar=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,u=e.length;++i<u;){var s=e[i],c=r?r(n[s],t[s],s,n,t):a;c===a&&(c=t[s]),o?Oe(n,s,c):_e(n,s,c)}return n},ur=function(t,e){return function(n,r){var o=$u(n)?s:xe,i=e?e():{};return o(n,t,Lr(r,2),i)}},sr=function(t){return kn((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:a,u=o>2?n[2]:a;for(i=t.length>3&&"function"==typeof i?(o--,i):a,u&&Hr(n[0],n[1],u)&&(i=o<3?a:i,o=1),e=gi(e);++r<o;){var s=n[r];s&&t(e,s,r,i)}return e}))},cr=function(t,e){return function(n,r){if(null==n)return n;if(!ko(n))return t(n,r);for(var o=n.length,i=e?o:-1,a=gi(n);(e?i--:++i<o)&&!1!==r(a[i],i,a););return n}},lr=function(t){return function(e,n,r){for(var o=-1,i=gi(e),a=r(e),u=a.length;u--;){var s=a[t?u:++o];if(!1===n(i[s],s,i))break}return e}},fr=function(t){return function(e){e=Wo(e);var n=B(e)?G(e):a,r=n?n[0]:e.charAt(0),o=n?Jn(n,1).join(""):e.slice(1);return r[t]()+o}},hr=function(t){return function(e){return g(ri(ni(e).replace(Le,"")),t,"")}},pr=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=xa(t.prototype),r=t.apply(n,e);return Mo(r)?r:n}},dr=function(t){return function(e,n,r){var o=gi(e);if(!ko(e)){var i=Lr(n,3);e=Jo(e),n=function(t){return i(o[t],t,o)}}var u=t(e,n,r);return u>-1?o[i?e[u]:u]:a}},vr=function(t){return Pr((function(e){var n=e.length,r=n,o=W.prototype.thru;for(t&&e.reverse();r--;){var i=e[r];if("function"!=typeof i)throw new wi(Y);if(o&&!u&&"wrapper"==Ir(i))var u=new W([],!0)}for(r=u?r:n;++r<n;){i=e[r];var s=Ir(i),c="wrapper"==s?Ua(i):a;u=c&&Gr(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[Ir(c[0])].apply(u,c[3]):1==i.length&&Gr(i)?u[s]():u.thru(i)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&$u(r))return u.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))},yr=function(t,e){return function(n,r){return function(t,e,n,r){return Me(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}},gr=function(t,e){return function(n,r){var o;if(n===a&&r===a)return e;if(n!==a&&(o=n),r!==a){if(o===a)return r;"string"==typeof n||"string"==typeof r?(n=La(n),r=La(r)):(n=Un(n),r=Un(r)),o=t(n,r)}return o}},mr=function(t){return Pr((function(e){return e=v(e,I(Lr())),kn((function(n){var r=this;return t(e,(function(t){return u(t,r,n)}))}))}))},br=function(t,e){var n=(e=e===a?" ":La(e)).length;if(n<2)return n?Pn(e,t):e;var r=Pn(e,Wi(t/z(e)));return B(e)?Jn(G(r),0,t).join(""):r.slice(0,t)},wr=function(t){return function(e,n,r){return r&&"number"!=typeof r&&Hr(e,n,r)&&(n=r=a),e=Ho(e),n===a?(n=e,e=0):n=Ho(n),function(t,e,n,r){for(var o=-1,i=ea(Wi((e-t)/(n||1)),0),a=hi(i);i--;)a[r?i:++o]=t,t+=n;return a}(e,n,r=r===a?e<n?1:-1:Ho(r),t)}},_r=function(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Go(e),n=Go(n)),t(e,n)}},Sr=function(t,e,n,r,o,i,u,s,c,l){var f=8&e;e|=f?Q:64,4&(e&=~(f?64:Q))||(e&=-4);var h=[t,e,o,f?i:a,f?u:a,f?a:i,f?a:u,s,c,l],p=n.apply(a,h);return Gr(t)&&Wa(p,h),p.placeholder=r,ro(p,t,e)},xr=function(t){var e=yi[t];return function(t,n){if(t=Go(t),(n=null==n?0:na(Vo(n),292))&&Xi(t)){var r=(Wo(t)+"e").split("e"),o=e(r[0]+"e"+(+r[1]+n));return+((r=(Wo(o)+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}},Er=function(t){return function(e){var n=Ha(e);return n==pt?U(e):n==mt?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):function(t,e){return v(e,(function(e){return[e,t[e]]}))}(e,t(e))}},Or=function(t,e,n,r,i,s,c,l){var f=2&e;if(!f&&"function"!=typeof t)throw new wi(Y);var h=r?r.length:0;if(h||(e&=-97,r=i=a),c=c===a?c:ea(Vo(c),0),l=l===a?l:Vo(l),h-=i?i.length:0,64&e){var p=r,d=i;r=i=a}var v=f?a:Ua(t),y=[t,e,n,r,i,p,d,s,c,l];if(v&&Jr(y,v),t=y[0],e=y[1],n=y[2],r=y[3],i=y[4],!(l=y[9]=y[9]===a?f?0:t.length:ea(y[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)g=8==e||16==e?function(t,e,n){var r=pr(t);return function i(){for(var s=arguments.length,c=hi(s),l=s,f=Rr(i);l--;)c[l]=arguments[l];var h=s<3&&c[0]!==f&&c[s-1]!==f?[]:K(c,f);if((s-=h.length)<n)return Sr(t,e,Na,i.placeholder,a,c,h,a,a,n-s);var p=this&&this!==Ze&&o(this,i)?r:t;return u(p,this,c)}}(t,e,l):e!=Q&&33!=e||i.length?Na.apply(a,y):function(t,e,n,r){var i=1&e,a=pr(t);return function e(){for(var s=-1,c=arguments.length,l=-1,f=r.length,h=hi(f+c),p=this&&this!==Ze&&o(this,e)?a:t;++l<f;)h[l]=r[l];for(;c--;)h[l++]=arguments[++s];return u(p,i?n:this,h)}}(t,e,n,r);else var g=function(t,e,n){var r=1&e,i=pr(t);return function e(){return(this&&this!==Ze&&o(this,e)?i:t).apply(r?n:this,arguments)}}(t,e,n);return ro((v?Ia:Wa)(g,y),t,e)},jr=function(t,e,n,r){return t===a||Po(t,xi[n])&&!ji.call(r,n)?e:t},Ar=function(t){return Bo(t)?a:t},Cr=function(t,e,n,r,o,i){var u=1&n,s=t.length,c=e.length;if(s!=c&&!(u&&c>s))return!1;var l=i.get(t),f=i.get(e);if(l&&f)return l==e&&f==t;var h=-1,p=!0,d=2&n?new de:a;for(i.set(t,e),i.set(e,t);++h<s;){var v=t[h],y=e[h];if(r)var g=u?r(y,v,h,e,t,i):r(v,y,h,t,e,i);if(g!==a){if(g)continue;p=!1;break}if(d){if(!b(e,(function(t,e){if(!L(d,e)&&(v===t||o(v,t,n,r,i)))return d.push(e)}))){p=!1;break}}else if(v!==y&&!o(v,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p},Pr=function(t){return Ya(Qr(t,a,ho),t+"")},kr=function(t){return We(t,Jo,Fa)},Tr=function(t){return We(t,Xo,Ka)},Ir=function(t){for(var e=t.name+"",n=da[e],r=ji.call(da,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e},Rr=function(t){return(ji.call(A,"placeholder")?A:t).placeholder},Lr=function(){var t=A.iteratee||ai;return t=t===ai?gn:t,arguments.length?t(arguments[0],arguments[1]):t},Dr=function(t,e){var n=t.__data__;return zr(e)?n["string"==typeof e?"string":"hash"]:n.map},Mr=function(t){for(var e=Jo(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Zr(o)]}return e},Nr=function(t,e){var n=function(t,e){return null==t?a:t[e]}(t,e);return yn(n)?n:a},$r=function(t){var e=ji.call(t,Hi),n=t[Hi];try{t[Hi]=a;var r=!0}catch(t){}var o=Pi.call(t);return r&&(e?t[Hi]=n:delete t[Hi]),o},Br=function(t,e,n){for(var r=-1,o=(e=Yn(e,t)).length,i=!1;++r<o;){var a=ao(e[r]);if(!(i=null!=t&&n(t,a)))break;t=t[a]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Do(o)&&Kr(a,o)&&($u(t)||Nu(t))},Ur=function(t){return"function"!=typeof t.constructor||Wr(t)?{}:xa(Ni(t))},Fr=function(t){return $u(t)||Nu(t)||!!(Fi&&t&&t[Fi])},Kr=function(t,e){var n=void 0===t?"undefined":i(t);return!!(e=null==e?nt:e)&&("number"==n||"symbol"!=n&&se.test(t))&&t>-1&&t%1==0&&t<e},Hr=function(t,e,n){if(!Mo(n))return!1;var r=void 0===e?"undefined":i(e);return!!("number"==r?ko(n)&&Kr(e,n.length):"string"==r&&e in n)&&Po(n[e],t)},Vr=function(t,e){if($u(t))return!1;var n=void 0===t?"undefined":i(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Fo(t))||Vt.test(t)||!Ht.test(t)||null!=e&&t in gi(e)},zr=function(t){var e=void 0===t?"undefined":i(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},Gr=function(t){var e=Ir(t),n=A[e];if("function"!=typeof n||!(e in Z.prototype))return!1;if(t===n)return!0;var r=Ua(n);return!!r&&t===r[0]},qr=function(t){return!!Ci&&Ci in t},Wr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xi)},Zr=function(t){return t==t&&!Mo(t)},Yr=function(t,e){return function(n){return null!=n&&n[t]===e&&(e!==a||t in gi(n))}},Jr=function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,a=r==tt&&8==n||r==tt&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!a)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var u=e[3];if(u){var s=t[3];t[3]=s?rr(s,u,e[4]):u,t[4]=s?K(t[3],X):e[4]}return(u=e[5])&&(s=t[5],t[5]=s?or(s,u,e[6]):u,t[6]=s?K(t[5],X):e[6]),(u=e[7])&&(t[7]=u),r&tt&&(t[8]=null==t[8]?e[8]:na(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o,t},Xr=function(t){return Pi.call(t)},Qr=function(t,e,n){return e=ea(e===a?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=ea(r.length-e,0),a=hi(i);++o<i;)a[o]=r[e+o];o=-1;for(var s=hi(e+1);++o<e;)s[o]=r[o];return s[e]=n(a),u(t,this,s)}},to=function(t,e){return e.length<2?t:qe(t,Dn(e,0,-1))},eo=function(t,e){for(var n=t.length,r=na(e.length,n),o=ir(t);r--;){var i=e[r];t[r]=Kr(i,n)?o[i]:a}return t},no=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},ro=function(t,e,n){var r=e+"";return Ya(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Yt,"{\n/* [wrapped with "+e+"] */\n")}(r,so(function(t){var e=t.match(Jt);return e?e[1].split(Xt):[]}(r),n)))},oo=function(t){var e=0,n=0;return function(){var r=ra(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(a,arguments)}},io=function(t,e){var n=-1,r=t.length,o=r-1;for(e=e===a?r:e;++n<e;){var i=Cn(n,o),u=t[i];t[i]=t[n],t[n]=u}return t.length=e,t},ao=function(t){if("string"==typeof t||Fo(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},uo=function(t){if(null!=t){try{return Oi.call(t)}catch(t){}try{return t+""}catch(t){}}return""},so=function(t,e){return c(it,(function(n){var r="_."+n[0];e&n[1]&&!p(t,r)&&t.push(r)})),t.sort()},co=function(t){if(o(t,Z))return t.clone();var e=new W(t.__wrapped__,t.__chain__);return e.__actions__=ir(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},lo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Vo(n);return o<0&&(o=ea(r+o,0)),_(t,Lr(e,3),o)},fo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==a&&(o=Vo(n),o=n<0?ea(r+o,0):na(o,r-1)),_(t,Lr(e,3),o,!0)},ho=function(t){return null!=t&&t.length?Aa(t,1):[]},po=function(t){return t&&t.length?t[0]:a},vo=function(t){var e=null==t?0:t.length;return e?t[e-1]:a},yo=function(t,e){return t&&t.length&&e&&e.length?jn(t,e):t},go=function(t){return null==t?t:aa.call(t)},mo=function(t){if(!t||!t.length)return[];var e=0;return t=h(t,(function(t){if(To(t))return e=ea(t.length,e),!0})),k(e,(function(e){return v(t,j(e))}))},bo=function(t,e){if(!t||!t.length)return[];var n=mo(t);return null==e?n:v(n,(function(t){return u(e,a,t)}))},wo=function(t){var e=A(t);return e.__chain__=!0,e},_o=function(t,e){return e(t)},So=function(t,e){return($u(t)?c:Oa)(t,Lr(e,3))},xo=function(t,e){return($u(t)?l:ja)(t,Lr(e,3))},Eo=function(t,e){return($u(t)?v:wn)(t,Lr(e,3))},Oo=function(t,e,n){return e=n?a:e,e=t&&null==e?t.length:e,Or(t,tt,a,a,a,a,e)},jo=function(t,e){var n;if("function"!=typeof e)throw new wi(Y);return t=Vo(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=a),n}},Ao=function(t,e,n){var r,o,i,u,s,c,l=0,f=!1,h=!1,p=!0;if("function"!=typeof t)throw new wi(Y);function d(e){var n=r,i=o;return r=o=a,l=e,u=t.apply(i,n)}function v(t){return l=t,s=Za(g,e),f?d(t):u}function y(t){var n=t-c;return c===a||n>=e||n<0||h&&t-l>=i}function g(){var t=Eu();if(y(t))return m(t);s=Za(g,function(t){var n=e-(t-c);return h?na(n,i-(t-l)):n}(t))}function m(t){return s=a,p&&r?d(t):(r=o=a,u)}function b(){var t=Eu(),n=y(t);if(r=arguments,o=this,c=t,n){if(s===a)return v(c);if(h)return Ma(s),s=Za(g,e),d(c)}return s===a&&(s=Za(g,e)),u}return e=Go(e)||0,Mo(n)&&(f=!!n.leading,i=(h="maxWait"in n)?ea(Go(n.maxWait)||0,e):i,p="trailing"in n?!!n.trailing:p),b.cancel=function(){s!==a&&Ma(s),l=0,r=c=o=s=a},b.flush=function(){return s===a?u:m(Eu())},b},Co=function(t){if("function"!=typeof t)throw new wi(Y);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}},Po=function(t,e){return t===e||t!=t&&e!=e},ko=function(t){return null!=t&&Do(t.length)&&!Ro(t)},To=function(t){return No(t)&&ko(t)},Io=function(t){if(!No(t))return!1;var e=Ye(t);return e==lt||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Bo(t)},Ro=function(t){if(!Mo(t))return!1;var e=Ye(t);return e==ft||e==ht||"[object AsyncFunction]"==e||"[object Proxy]"==e},Lo=function(t){return"number"==typeof t&&t==Vo(t)},Do=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=nt},Mo=function(t){var e=void 0===t?"undefined":i(t);return null!=t&&("object"==e||"function"==e)},No=function(t){return null!=t&&"object"==typeof t},$o=function(t){return"number"==typeof t||No(t)&&Ye(t)==dt},Bo=function(t){if(!No(t)||Ye(t)!=vt)return!1;var e=Ni(t);if(null===e)return!0;var n=ji.call(e,"constructor")&&e.constructor;return"function"==typeof n&&o(n,n)&&Oi.call(n)==ki},Uo=function(t){return"string"==typeof t||!$u(t)&&No(t)&&Ye(t)==bt},Fo=function(t){return"symbol"==(void 0===t?"undefined":i(t))||No(t)&&Ye(t)==wt},Ko=function(t){if(!t)return[];if(ko(t))return Uo(t)?G(t):ir(t);if(Ki&&t[Ki])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Ki]());var e=Ha(t);return(e==pt?U:e==mt?H:ti)(t)},Ho=function(t){return t?(t=Go(t))===et||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},Vo=function(t){var e=Ho(t),n=e%1;return e==e?n?e-n:e:0},zo=function(t){return t?Ae(Vo(t),0,ot):0},Go=function(t){if("number"==typeof t)return t;if(Fo(t))return rt;if(Mo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Mo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=T(t);var n=ie.test(t);return n||ue.test(t)?Ge(t.slice(2),n?2:8):oe.test(t)?rt:+t},qo=function(t){return ar(t,Xo(t))},Wo=function(t){return null==t?"":La(t)},Zo=function(t,e,n){var r=null==t?a:qe(t,e);return r===a?n:r},Yo=function(t,e){return null!=t&&Br(t,e,tn)},Jo=function(t){return ko(t)?ye(t):mn(t)},Xo=function(t){return ko(t)?ye(t,!0):function(t){if(!Mo(t))return function(t){var e=[];if(null!=t)for(var n in gi(t))e.push(n);return e}(t);var e=Wr(t),n=[];for(var r in t)("constructor"!=r||!e&&ji.call(t,r))&&n.push(r);return n}(t)},Qo=function(t,e){if(null==t)return{};var n=v(Tr(t),(function(t){return[t]}));return e=Lr(e),On(t,n,(function(t,n){return e(t,n[0])}))},ti=function(t){return null==t?[]:R(t,Jo(t))},ei=function(t){return gs(Wo(t).toLowerCase())},ni=function(t){return(t=Wo(t))&&t.replace(ce,cn).replace(De,"")},ri=function(t,e,n){return t=Wo(t),(e=n?a:e)===a?function(t){return Be.test(t)}(t)?function(t){return t.match(Ne)||[]}(t):function(t){return t.match(Qt)||[]}(t):t.match(e)||[]},oi=function(t){return function(){return t}},ii=function(t){return t},ai=function(t){return gn("function"==typeof t?t:Ea(t,1))},ui=function(t,e,n){var r=Jo(e),o=Ve(e,r);null!=n||Mo(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=Ve(e,Jo(e)));var i=!(Mo(n)&&"chain"in n&&!n.chain),a=Ro(t);return c(o,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=ir(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,y([this.value()],arguments))})})),t},si=function(){},ci=function(t){return Vr(t)?j(ao(t)):function(t){return function(e){return qe(e,t)}}(t)},li=function(){return[]},fi=function(){return!1},hi=(e=null==e?Ze:hn.defaults(Ze.Object(),e,hn.pick(Ze,Ue))).Array,pi=e.Date,di=e.Error,vi=e.Function,yi=e.Math,gi=e.Object,mi=e.RegExp,bi=e.String,wi=e.TypeError,_i=hi.prototype,Si=vi.prototype,xi=gi.prototype,Ei=e["__core-js_shared__"],Oi=Si.toString,ji=xi.hasOwnProperty,Ai=0,Ci=(n=/[^.]+$/.exec(Ei&&Ei.keys&&Ei.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Pi=xi.toString,ki=Oi.call(gi),Ti=Ze._,Ii=mi("^"+Oi.call(ji).replace(Gt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ri=Xe?e.Buffer:a,Li=e.Symbol,Di=e.Uint8Array,Mi=Ri?Ri.allocUnsafe:a,Ni=F(gi.getPrototypeOf,gi),$i=gi.create,Bi=xi.propertyIsEnumerable,Ui=_i.splice,Fi=Li?Li.isConcatSpreadable:a,Ki=Li?Li.iterator:a,Hi=Li?Li.toStringTag:a,Vi=function(){try{var t=Nr(gi,"defineProperty");return t({},"",{}),t}catch(t){}}(),zi=e.clearTimeout!==Ze.clearTimeout&&e.clearTimeout,Gi=pi&&pi.now!==Ze.Date.now&&pi.now,qi=e.setTimeout!==Ze.setTimeout&&e.setTimeout,Wi=yi.ceil,Zi=yi.floor,Yi=gi.getOwnPropertySymbols,Ji=Ri?Ri.isBuffer:a,Xi=e.isFinite,Qi=_i.join,ta=F(gi.keys,gi),ea=yi.max,na=yi.min,ra=pi.now,oa=e.parseInt,ia=yi.random,aa=_i.reverse,ua=Nr(e,"DataView"),sa=Nr(e,"Map"),ca=Nr(e,"Promise"),la=Nr(e,"Set"),fa=Nr(e,"WeakMap"),ha=Nr(gi,"create"),pa=fa&&new fa,da={},va=uo(ua),ya=uo(sa),ga=uo(ca),ma=uo(la),ba=uo(fa),wa=Li?Li.prototype:a,_a=wa?wa.valueOf:a,Sa=wa?wa.toString:a,xa=(r=function(){},function(t){if(!Mo(t))return{};if($i)return $i(t);r.prototype=t;var e=new r;return r.prototype=a,e});function Ea(t,e,n,r,o,i){var u,s=1&e,l=2&e,f=4&e;if(n&&(u=o?n(t,r,o,i):n(t)),u!==a)return u;if(!Mo(t))return t;var h=$u(t);if(h){if(u=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ji.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return ir(t,u)}else{var p=Ha(t),d=p==ft||p==ht;if(Uu(t))return Xn(t,s);if(p==vt||p==at||d&&!o){if(u=l||d?{}:Ur(t),!s)return l?function(t,e){return ar(t,Ka(t),e)}(t,function(t,e){return t&&ar(e,Xo(e),t)}(u,t)):function(t,e){return ar(t,Fa(t),e)}(t,Ee(u,t))}else{if(!He[p])return o?t:{};u=function(t,e,n){var r,o,i,a=t.constructor;switch(e){case St:return Qn(t);case st:case ct:return new a(+t);case xt:return function(t,e){var n=e?Qn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case Et:case Ot:case jt:case At:case Ct:case Pt:case kt:case Tt:case It:return tr(t,n);case pt:return new a;case dt:case bt:return new a(t);case gt:return(i=new(o=t).constructor(o.source,re.exec(o))).lastIndex=o.lastIndex,i;case mt:return new a;case wt:return r=t,_a?gi(_a.call(r)):{}}}(t,p,s)}}i||(i=new ve);var v=i.get(t);if(v)return v;i.set(t,u),Vu(t)?t.forEach((function(r){u.add(Ea(r,e,n,r,t,i))})):Ku(t)&&t.forEach((function(r,o){u.set(o,Ea(r,e,n,o,t,i))}));var y=h?a:(f?l?Tr:kr:l?Xo:Jo)(t);return c(y||t,(function(r,o){y&&(r=t[o=r]),_e(u,o,Ea(r,e,n,o,t,i))})),u}A.templateSettings={escape:Ut,evaluate:Ft,interpolate:Kt,variable:"",imports:{_:A}},(A.prototype=V.prototype).constructor=A,W.prototype=xa(V.prototype),W.prototype.constructor=W,Z.prototype=xa(V.prototype),Z.prototype.constructor=Z,Zt.prototype.clear=function(){this.__data__=ha?ha(null):{},this.size=0},Zt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Zt.prototype.get=function(t){var e=this.__data__;if(ha){var n=e[t];return n===J?a:n}return ji.call(e,t)?e[t]:a},Zt.prototype.has=function(t){var e=this.__data__;return ha?e[t]!==a:ji.call(e,t)},Zt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ha&&e===a?J:e,this},he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(t){var e=this.__data__,n=Se(e,t);return!(n<0||(n==e.length-1?e.pop():Ui.call(e,n,1),--this.size,0))},he.prototype.get=function(t){var e=this.__data__,n=Se(e,t);return n<0?a:e[n][1]},he.prototype.has=function(t){return Se(this.__data__,t)>-1},he.prototype.set=function(t,e){var n=this.__data__,r=Se(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},pe.prototype.clear=function(){this.size=0,this.__data__={hash:new Zt,map:new(sa||he),string:new Zt}},pe.prototype.delete=function(t){var e=Dr(this,t).delete(t);return this.size-=e?1:0,e},pe.prototype.get=function(t){return Dr(this,t).get(t)},pe.prototype.has=function(t){return Dr(this,t).has(t)},pe.prototype.set=function(t,e){var n=Dr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},de.prototype.add=de.prototype.push=function(t){return this.__data__.set(t,J),this},de.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.clear=function(){this.__data__=new he,this.size=0},ve.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ve.prototype.get=function(t){return this.__data__.get(t)},ve.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.set=function(t,e){var n=this.__data__;if(o(n,he)){var r=n.__data__;if(!sa||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new pe(r)}return n.set(t,e),this.size=n.size,this};var Oa=cr(Me),ja=cr($e,!0);function Aa(t,e,n,r,o){var i=-1,a=t.length;for(n||(n=Fr),o||(o=[]);++i<a;){var u=t[i];e>0&&n(u)?e>1?Aa(u,e-1,n,r,o):y(o,u):r||(o[o.length]=u)}return o}var Ca=lr(),Pa=lr(!0);function ka(t,e,n,r,i){return t===e||(null==t||null==e||!No(t)&&!No(e)?t!=t&&e!=e:function(t,e,n,r,i,u){var s=$u(t),c=$u(e),l=s?ut:Ha(t),f=c?ut:Ha(e),h=(l=l==at?vt:l)==vt,p=(f=f==at?vt:f)==vt,d=l==f;if(d&&Uu(t)){if(!Uu(e))return!1;s=!0,h=!1}if(d&&!h)return u||(u=new ve),s||zu(t)?Cr(t,e,n,r,i,u):function(t,e,n,r,o,i,a){switch(n){case xt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case St:return!(t.byteLength!=e.byteLength||!i(new Di(t),new Di(e)));case st:case ct:case dt:return Po(+t,+e);case lt:return t.name==e.name&&t.message==e.message;case gt:case bt:return t==e+"";case pt:var u=U;case mt:var s=1&r;if(u||(u=H),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=Cr(u(t),u(e),r,o,i,a);return a.delete(t),l;case wt:if(_a)return _a.call(t)==_a.call(e)}return!1}(t,e,l,n,r,i,u);if(!(1&n)){var v=h&&ji.call(t,"__wrapped__"),y=p&&ji.call(e,"__wrapped__");if(v||y){var g=v?t.value():t,m=y?e.value():e;return u||(u=new ve),i(g,m,n,r,u)}}return!!d&&(u||(u=new ve),function(t,e,n,r,i,u){var s=1&n,c=kr(t),l=c.length;if(l!=kr(e).length&&!s)return!1;for(var f=l;f--;){var h=c[f];if(!(s?h in e:ji.call(e,h)))return!1}var p=u.get(t),d=u.get(e);if(p&&d)return p==e&&d==t;var v=!0;u.set(t,e),u.set(e,t);for(var y=s;++f<l;){var g=t[h=c[f]],m=e[h];if(r)var b=s?r(m,g,h,e,t,u):r(g,m,h,t,e,u);if(!(b===a?g===m||i(g,m,n,r,u):b)){v=!1;break}y||(y="constructor"==h)}if(v&&!y){var w=t.constructor,_=e.constructor;w==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&o(w,w)&&"function"==typeof _&&o(_,_)||(v=!1)}return u.delete(t),u.delete(e),v}(t,e,n,r,i,u))}(t,e,n,r,ka,i))}function Ta(t,e,n,r,o){t!==e&&Ca(e,(function(i,u){if(o||(o=new ve),Mo(i))!function(t,e,n,r,o,i,u){var s=no(t,n),c=no(e,n),l=u.get(c);if(l)we(t,n,l);else{var f=i?i(s,c,n+"",t,e,u):a,h=f===a;if(h){var p=$u(c),d=!p&&Uu(c),v=!p&&!d&&zu(c);f=c,p||d||v?$u(s)?f=s:To(s)?f=ir(s):d?(h=!1,f=Xn(c,!0)):v?(h=!1,f=tr(c,!0)):f=[]:Bo(c)||Nu(c)?(f=s,Nu(s)?f=qo(s):Mo(s)&&!Ro(s)||(f=Ur(c))):h=!1}h&&(u.set(c,f),o(f,c,r,i,u),u.delete(c)),we(t,n,f)}}(t,e,u,n,Ta,r,o);else{var s=r?r(no(t,u),i,u+"",t,e,o):a;s===a&&(s=i),we(t,u,s)}}),Xo)}var Ia=pa?function(t,e){return pa.set(t,e),t}:ii,Ra=Vi?function(t,e){return Vi(t,"toString",{configurable:!0,enumerable:!1,value:oi(e),writable:!0})}:ii;function La(t){if("string"==typeof t)return t;if($u(t))return v(t,La)+"";if(Fo(t))return Sa?Sa.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Da=kn,Ma=zi||function(t){return Ze.clearTimeout(t)};function Na(t,e,n,r,i,u,s,c,l,f){var h=e&tt,p=1&e,d=2&e,v=24&e,y=512&e,g=d?a:pr(t);return function a(){for(var m=arguments.length,b=hi(m),w=m;w--;)b[w]=arguments[w];if(v)var _=Rr(a),S=N(b,_);if(r&&(b=rr(b,r,i,v)),u&&(b=or(b,u,s,v)),m-=S,v&&m<f){var x=K(b,_);return Sr(t,e,Na,a.placeholder,n,b,x,c,l,f-m)}var E=p?n:this,O=d?E[t]:t;return m=b.length,c?b=eo(b,c):y&&m>1&&b.reverse(),h&&l<m&&(b.length=l),this&&this!==Ze&&o(this,a)&&(O=g||pr(O)),O.apply(E,b)}}var $a=la&&1/H(new la([,-0]))[1]==et?function(t){return new la(t)}:si;function Ba(t,e,n,r,o,i){return Mo(t)&&Mo(e)&&(i.set(e,t),Ta(t,e,a,Ba,i),i.delete(e)),t}var Ua=pa?function(t){return pa.get(t)}:si,Fa=Yi?function(t){return null==t?[]:(t=gi(t),h(Yi(t),(function(e){return Bi.call(t,e)})))}:li,Ka=Yi?function(t){for(var e=[];t;)y(e,Fa(t)),t=Ni(t);return e}:li,Ha=Ye;(ua&&Ha(new ua(new ArrayBuffer(1)))!=xt||sa&&Ha(new sa)!=pt||ca&&Ha(ca.resolve())!=yt||la&&Ha(new la)!=mt||fa&&Ha(new fa)!=_t)&&(Ha=function(t){var e=Ye(t),n=e==vt?t.constructor:a,r=n?uo(n):"";if(r)switch(r){case va:return xt;case ya:return pt;case ga:return yt;case ma:return mt;case ba:return _t}return e});var Va,za,Ga,qa=Ei?Ro:fi,Wa=oo(Ia),Za=qi||function(t,e){return Ze.setTimeout(t,e)},Ya=oo(Ra),Ja=(Va=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(zt,(function(t,n,r,o){e.push(r?o.replace(ee,"$1"):n||t)})),e},za=Pu(Va,(function(t){return 500===Ga.size&&Ga.clear(),t})),Ga=za.cache,za),Xa=kn((function(t,e){return To(t)?ke(t,Aa(e,1,To,!0)):[]})),Qa=kn((function(t,e){var n=vo(e);return To(n)&&(n=a),To(t)?ke(t,Aa(e,1,To,!0),Lr(n,2)):[]})),tu=kn((function(t,e){var n=vo(e);return To(n)&&(n=a),To(t)?ke(t,Aa(e,1,To,!0),a,n):[]})),eu=kn((function(t){var e=v(t,Wn);return e.length&&e[0]===t[0]?sn(e):[]})),nu=kn((function(t){var e=vo(t),n=v(t,Wn);return e===vo(n)?e=a:n.pop(),n.length&&n[0]===t[0]?sn(n,Lr(e,2)):[]})),ru=kn((function(t){var e=vo(t),n=v(t,Wn);return(e="function"==typeof e?e:a)&&n.pop(),n.length&&n[0]===t[0]?sn(n,a,e):[]})),ou=kn(yo),iu=Pr((function(t,e){var n=null==t?0:t.length,r=je(t,e);return An(t,v(e,(function(t){return Kr(t,n)?+t:t})).sort(er)),r})),au=kn((function(t){return Fn(Aa(t,1,To,!0))})),uu=kn((function(t){var e=vo(t);return To(e)&&(e=a),Fn(Aa(t,1,To,!0),Lr(e,2))})),su=kn((function(t){var e=vo(t);return e="function"==typeof e?e:a,Fn(Aa(t,1,To,!0),a,e)})),cu=kn((function(t,e){return To(t)?ke(t,e):[]})),lu=kn((function(t){return Gn(h(t,To))})),fu=kn((function(t){var e=vo(t);return To(e)&&(e=a),Gn(h(t,To),Lr(e,2))})),hu=kn((function(t){var e=vo(t);return e="function"==typeof e?e:a,Gn(h(t,To),a,e)})),pu=kn(mo),du=kn((function(t){var e=t.length,n=e>1?t[e-1]:a;return n="function"==typeof n?(t.pop(),n):a,bo(t,n)})),vu=Pr((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return je(e,t)};return e>1||this.__actions__.length||!o(r,Z)||!Kr(n)?this.thru(i):((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:_o,args:[i],thisArg:a}),new W(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(a),t})))})),yu=ur((function(t,e,n){ji.call(t,n)?++t[n]:Oe(t,n,1)})),gu=dr(lo),mu=dr(fo),bu=ur((function(t,e,n){ji.call(t,n)?t[n].push(e):Oe(t,n,[e])})),wu=kn((function(t,e,n){var r=-1,o="function"==typeof e,i=ko(t)?hi(t.length):[];return Oa(t,(function(t){i[++r]=o?u(e,t,n):pn(t,e,n)})),i})),_u=ur((function(t,e,n){Oe(t,n,e)})),Su=ur((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),xu=kn((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Hr(t,e[0],e[1])?e=[]:n>2&&Hr(e[0],e[1],e[2])&&(e=[e[0]]),En(t,Aa(e,1),[])})),Eu=Gi||function(){return Ze.Date.now()},Ou=kn((function(t,e,n){var r=1;if(n.length){var o=K(n,Rr(Ou));r|=Q}return Or(t,r,e,n,o)})),ju=kn((function(t,e,n){var r=3;if(n.length){var o=K(n,Rr(ju));r|=Q}return Or(e,r,t,n,o)})),Au=kn((function(t,e){return Pe(t,1,e)})),Cu=kn((function(t,e,n){return Pe(t,Go(e)||0,n)}));function Pu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new wi(Y);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Pu.Cache||pe),n}Pu.Cache=pe;var ku,Tu=Da((function(t,e){var n=(e=1==e.length&&$u(e[0])?v(e[0],I(Lr())):v(Aa(e,1),I(Lr()))).length;return kn((function(r){for(var o=-1,i=na(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return u(t,this,r)}))})),Iu=kn((function(t,e){var n=K(e,Rr(Iu));return Or(t,Q,a,e,n)})),Ru=kn((function(t,e){var n=K(e,Rr(Ru));return Or(t,64,a,e,n)})),Lu=Pr((function(t,e){return Or(t,256,a,a,a,e)})),Du=_r(Je),Mu=_r((function(t,e){return t>=e})),Nu=dn(function(){return arguments}())?dn:function(t){return No(t)&&ji.call(t,"callee")&&!Bi.call(t,"callee")},$u=hi.isArray,Bu=en?I(en):function(t){return No(t)&&Ye(t)==St},Uu=Ji||fi,Fu=nn?I(nn):function(t){return No(t)&&Ye(t)==ct},Ku=rn?I(rn):function(t){return No(t)&&Ha(t)==pt},Hu=on?I(on):function(t){return No(t)&&Ye(t)==gt},Vu=an?I(an):function(t){return No(t)&&Ha(t)==mt},zu=un?I(un):function(t){return No(t)&&Do(t.length)&&!!Ke[Ye(t)]},Gu=_r(bn),qu=_r((function(t,e){return t<=e})),Wu=sr((function(t,e){if(Wr(e)||ko(e))ar(e,Jo(e),t);else for(var n in e)ji.call(e,n)&&_e(t,n,e[n])})),Zu=sr((function(t,e){ar(e,Xo(e),t)})),Yu=sr((function(t,e,n,r){ar(e,Xo(e),t,r)})),Ju=sr((function(t,e,n,r){ar(e,Jo(e),t,r)})),Xu=Pr(je),Qu=kn((function(t,e){t=gi(t);var n=-1,r=e.length,o=r>2?e[2]:a;for(o&&Hr(e[0],e[1],o)&&(r=1);++n<r;)for(var i=e[n],u=Xo(i),s=-1,c=u.length;++s<c;){var l=u[s],f=t[l];(f===a||Po(f,xi[l])&&!ji.call(t,l))&&(t[l]=i[l])}return t})),ts=kn((function(t){return t.push(a,Ba),u(is,a,t)})),es=yr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Pi.call(e)),t[e]=n}),oi(ii)),ns=yr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Pi.call(e)),ji.call(t,e)?t[e].push(n):t[e]=[n]}),Lr),rs=kn(pn),os=sr((function(t,e,n){Ta(t,e,n)})),is=sr((function(t,e,n,r){Ta(t,e,n,r)})),as=Pr((function(t,e){var n={};if(null==t)return n;var r=!1;e=v(e,(function(e){return e=Yn(e,t),r||(r=e.length>1),e})),ar(t,Tr(t),n),r&&(n=Ea(n,7,Ar));for(var o=e.length;o--;)Kn(n,e[o]);return n})),us=Pr((function(t,e){return null==t?{}:function(t,e){return On(t,e,(function(e,n){return Yo(t,n)}))}(t,e)})),ss=Er(Jo),cs=Er(Xo),ls=hr((function(t,e,n){return e=e.toLowerCase(),t+(n?ei(e):e)})),fs=hr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),hs=hr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),ps=fr("toLowerCase"),ds=hr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),vs=hr((function(t,e,n){return t+(n?" ":"")+gs(e)})),ys=hr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),gs=fr("toUpperCase"),ms=kn((function(t,e){try{return u(t,a,e)}catch(t){return Io(t)?t:new di(t)}})),bs=Pr((function(t,e){return c(e,(function(e){e=ao(e),Oe(t,e,Ou(t[e],t))})),t})),ws=vr(),_s=vr(!0),Ss=kn((function(t,e){return function(n){return pn(n,t,e)}})),xs=kn((function(t,e){return function(n){return pn(t,n,e)}})),Es=mr(v),Os=mr(f),js=mr(b),As=wr(),Cs=wr(!0),Ps=gr((function(t,e){return t+e}),0),ks=xr("ceil"),Ts=gr((function(t,e){return t/e}),1),Is=xr("floor"),Rs=gr((function(t,e){return t*e}),1),Ls=xr("round"),Ds=gr((function(t,e){return t-e}),0);return A.after=function(t,e){if("function"!=typeof e)throw new wi(Y);return t=Vo(t),function(){if(--t<1)return e.apply(this,arguments)}},A.ary=Oo,A.assign=Wu,A.assignIn=Zu,A.assignInWith=Yu,A.assignWith=Ju,A.at=Xu,A.before=jo,A.bind=Ou,A.bindAll=bs,A.bindKey=ju,A.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return $u(t)?t:[t]},A.chain=wo,A.chunk=function(t,e,n){e=(n?Hr(t,e,n):e===a)?1:ea(Vo(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var o=0,i=0,u=hi(Wi(r/e));o<r;)u[i++]=Dn(t,o,o+=e);return u},A.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},A.concat=function(){var t=arguments.length;if(!t)return[];for(var e=hi(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return y($u(n)?ir(n):[n],Aa(e,1))},A.cond=function(t){var e=null==t?0:t.length,n=Lr();return t=e?v(t,(function(t){if("function"!=typeof t[1])throw new wi(Y);return[n(t[0]),t[1]]})):[],kn((function(n){for(var r=-1;++r<e;){var o=t[r];if(u(o[0],this,n))return u(o[1],this,n)}}))},A.conforms=function(t){return function(t){var e=Jo(t);return function(n){return Ce(n,t,e)}}(Ea(t,1))},A.constant=oi,A.countBy=yu,A.create=function(t,e){var n=xa(t);return null==e?n:Ee(n,e)},A.curry=function t(e,n,r){var o=Or(e,8,a,a,a,a,a,n=r?a:n);return o.placeholder=t.placeholder,o},A.curryRight=function t(e,n,r){var o=Or(e,16,a,a,a,a,a,n=r?a:n);return o.placeholder=t.placeholder,o},A.debounce=Ao,A.defaults=Qu,A.defaultsDeep=ts,A.defer=Au,A.delay=Cu,A.difference=Xa,A.differenceBy=Qa,A.differenceWith=tu,A.drop=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===a?1:Vo(e),Dn(t,e<0?0:e,r)):[]},A.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===a?1:Vo(e),Dn(t,0,(e=r-e)<0?0:e)):[]},A.dropRightWhile=function(t,e){return t&&t.length?Vn(t,Lr(e,3),!0,!0):[]},A.dropWhile=function(t,e){return t&&t.length?Vn(t,Lr(e,3),!0):[]},A.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&Hr(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=Vo(n))<0&&(n=-n>o?0:o+n),(r=r===a||r>o?o:Vo(r))<0&&(r+=o),r=n>r?0:zo(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},A.filter=function(t,e){return($u(t)?h:Re)(t,Lr(e,3))},A.flatMap=function(t,e){return Aa(Eo(t,e),1)},A.flatMapDeep=function(t,e){return Aa(Eo(t,e),et)},A.flatMapDepth=function(t,e,n){return n=n===a?1:Vo(n),Aa(Eo(t,e),n)},A.flatten=ho,A.flattenDeep=function(t){return null!=t&&t.length?Aa(t,et):[]},A.flattenDepth=function(t,e){return null!=t&&t.length?Aa(t,e=e===a?1:Vo(e)):[]},A.flip=function(t){return Or(t,512)},A.flow=ws,A.flowRight=_s,A.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},A.functions=function(t){return null==t?[]:Ve(t,Jo(t))},A.functionsIn=function(t){return null==t?[]:Ve(t,Xo(t))},A.groupBy=bu,A.initial=function(t){return null!=t&&t.length?Dn(t,0,-1):[]},A.intersection=eu,A.intersectionBy=nu,A.intersectionWith=ru,A.invert=es,A.invertBy=ns,A.invokeMap=wu,A.iteratee=ai,A.keyBy=_u,A.keys=Jo,A.keysIn=Xo,A.map=Eo,A.mapKeys=function(t,e){var n={};return e=Lr(e,3),Me(t,(function(t,r,o){Oe(n,e(t,r,o),t)})),n},A.mapValues=function(t,e){var n={};return e=Lr(e,3),Me(t,(function(t,r,o){Oe(n,r,e(t,r,o))})),n},A.matches=function(t){return _n(Ea(t,1))},A.matchesProperty=function(t,e){return Sn(t,Ea(e,1))},A.memoize=Pu,A.merge=os,A.mergeWith=is,A.method=Ss,A.methodOf=xs,A.mixin=ui,A.negate=Co,A.nthArg=function(t){return t=Vo(t),kn((function(e){return xn(e,t)}))},A.omit=as,A.omitBy=function(t,e){return Qo(t,Co(Lr(e)))},A.once=function(t){return jo(2,t)},A.orderBy=function(t,e,n,r){return null==t?[]:($u(e)||(e=null==e?[]:[e]),$u(n=r?a:n)||(n=null==n?[]:[n]),En(t,e,n))},A.over=Es,A.overArgs=Tu,A.overEvery=Os,A.overSome=js,A.partial=Iu,A.partialRight=Ru,A.partition=Su,A.pick=us,A.pickBy=Qo,A.property=ci,A.propertyOf=function(t){return function(e){return null==t?a:qe(t,e)}},A.pull=ou,A.pullAll=yo,A.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?jn(t,e,Lr(n,2)):t},A.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?jn(t,e,a,n):t},A.pullAt=iu,A.range=As,A.rangeRight=Cs,A.rearg=Lu,A.reject=function(t,e){return($u(t)?h:Re)(t,Co(Lr(e,3)))},A.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=Lr(e,3);++r<i;){var a=t[r];e(a,r,t)&&(n.push(a),o.push(r))}return An(t,o),n},A.rest=function(t,e){if("function"!=typeof t)throw new wi(Y);return e=e===a?e:Vo(e),kn(t,e)},A.reverse=go,A.sampleSize=function(t,e,n){return e=(n?Hr(t,e,n):e===a)?1:Vo(e),($u(t)?me:In)(t,e)},A.set=function(t,e,n){return null==t?t:Rn(t,e,n)},A.setWith=function(t,e,n,r){return r="function"==typeof r?r:a,null==t?t:Rn(t,e,n,r)},A.shuffle=function(t){return($u(t)?be:Ln)(t)},A.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Hr(t,e,n)?(e=0,n=r):(e=null==e?0:Vo(e),n=n===a?r:Vo(n)),Dn(t,e,n)):[]},A.sortBy=xu,A.sortedUniq=function(t){return t&&t.length?Bn(t):[]},A.sortedUniqBy=function(t,e){return t&&t.length?Bn(t,Lr(e,2)):[]},A.split=function(t,e,n){return n&&"number"!=typeof n&&Hr(t,e,n)&&(e=n=a),(n=n===a?ot:n>>>0)?(t=Wo(t))&&("string"==typeof e||null!=e&&!Hu(e))&&!(e=La(e))&&B(t)?Jn(G(t),0,n):t.split(e,n):[]},A.spread=function(t,e){if("function"!=typeof t)throw new wi(Y);return e=null==e?0:ea(Vo(e),0),kn((function(n){var r=n[e],o=Jn(n,0,e);return r&&y(o,r),u(t,this,o)}))},A.tail=function(t){var e=null==t?0:t.length;return e?Dn(t,1,e):[]},A.take=function(t,e,n){return t&&t.length?(e=n||e===a?1:Vo(e),Dn(t,0,e<0?0:e)):[]},A.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===a?1:Vo(e),Dn(t,(e=r-e)<0?0:e,r)):[]},A.takeRightWhile=function(t,e){return t&&t.length?Vn(t,Lr(e,3),!1,!0):[]},A.takeWhile=function(t,e){return t&&t.length?Vn(t,Lr(e,3)):[]},A.tap=function(t,e){return e(t),t},A.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new wi(Y);return Mo(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ao(t,e,{leading:r,maxWait:e,trailing:o})},A.thru=_o,A.toArray=Ko,A.toPairs=ss,A.toPairsIn=cs,A.toPath=function(t){return $u(t)?v(t,ao):Fo(t)?[t]:ir(Ja(Wo(t)))},A.toPlainObject=qo,A.transform=function(t,e,n){var r=$u(t),o=r||Uu(t)||zu(t);if(e=Lr(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Mo(t)&&Ro(i)?xa(Ni(t)):{}}return(o?c:Me)(t,(function(t,r,o){return e(n,t,r,o)})),n},A.unary=function(t){return Oo(t,1)},A.union=au,A.unionBy=uu,A.unionWith=su,A.uniq=function(t){return t&&t.length?Fn(t):[]},A.uniqBy=function(t,e){return t&&t.length?Fn(t,Lr(e,2)):[]},A.uniqWith=function(t,e){return e="function"==typeof e?e:a,t&&t.length?Fn(t,a,e):[]},A.unset=function(t,e){return null==t||Kn(t,e)},A.unzip=mo,A.unzipWith=bo,A.update=function(t,e,n){return null==t?t:Hn(t,e,Zn(n))},A.updateWith=function(t,e,n,r){return r="function"==typeof r?r:a,null==t?t:Hn(t,e,Zn(n),r)},A.values=ti,A.valuesIn=function(t){return null==t?[]:R(t,Xo(t))},A.without=cu,A.words=ri,A.wrap=function(t,e){return Iu(Zn(e),t)},A.xor=lu,A.xorBy=fu,A.xorWith=hu,A.zip=pu,A.zipObject=function(t,e){return qn(t||[],e||[],_e)},A.zipObjectDeep=function(t,e){return qn(t||[],e||[],Rn)},A.zipWith=du,A.entries=ss,A.entriesIn=cs,A.extend=Zu,A.extendWith=Yu,ui(A,A),A.add=Ps,A.attempt=ms,A.camelCase=ls,A.capitalize=ei,A.ceil=ks,A.clamp=function(t,e,n){return n===a&&(n=e,e=a),n!==a&&(n=(n=Go(n))==n?n:0),e!==a&&(e=(e=Go(e))==e?e:0),Ae(Go(t),e,n)},A.clone=function(t){return Ea(t,4)},A.cloneDeep=function(t){return Ea(t,5)},A.cloneDeepWith=function(t,e){return Ea(t,5,e="function"==typeof e?e:a)},A.cloneWith=function(t,e){return Ea(t,4,e="function"==typeof e?e:a)},A.conformsTo=function(t,e){return null==e||Ce(t,e,Jo(e))},A.deburr=ni,A.defaultTo=function(t,e){return null==t||t!=t?e:t},A.divide=Ts,A.endsWith=function(t,e,n){t=Wo(t),e=La(e);var r=t.length,o=n=n===a?r:Ae(Vo(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},A.eq=Po,A.escape=function(t){return(t=Wo(t))&&Bt.test(t)?t.replace(Nt,ln):t},A.escapeRegExp=function(t){return(t=Wo(t))&&qt.test(t)?t.replace(Gt,"\\$&"):t},A.every=function(t,e,n){var r=$u(t)?f:Te;return n&&Hr(t,e,n)&&(e=a),r(t,Lr(e,3))},A.find=gu,A.findIndex=lo,A.findKey=function(t,e){return w(t,Lr(e,3),Me)},A.findLast=mu,A.findLastIndex=fo,A.findLastKey=function(t,e){return w(t,Lr(e,3),$e)},A.floor=Is,A.forEach=So,A.forEachRight=xo,A.forIn=function(t,e){return null==t?t:Ca(t,Lr(e,3),Xo)},A.forInRight=function(t,e){return null==t?t:Pa(t,Lr(e,3),Xo)},A.forOwn=function(t,e){return t&&Me(t,Lr(e,3))},A.forOwnRight=function(t,e){return t&&$e(t,Lr(e,3))},A.get=Zo,A.gt=Du,A.gte=Mu,A.has=function(t,e){return null!=t&&Br(t,e,Qe)},A.hasIn=Yo,A.head=po,A.identity=ii,A.includes=function(t,e,n,r){t=ko(t)?t:ti(t),n=n&&!r?Vo(n):0;var o=t.length;return n<0&&(n=ea(o+n,0)),Uo(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&S(t,e,n)>-1},A.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Vo(n);return o<0&&(o=ea(r+o,0)),S(t,e,o)},A.inRange=function(t,e,n){return e=Ho(e),n===a?(n=e,e=0):n=Ho(n),function(t,e,n){return t>=na(e,n)&&t<ea(e,n)}(t=Go(t),e,n)},A.invoke=rs,A.isArguments=Nu,A.isArray=$u,A.isArrayBuffer=Bu,A.isArrayLike=ko,A.isArrayLikeObject=To,A.isBoolean=function(t){return!0===t||!1===t||No(t)&&Ye(t)==st},A.isBuffer=Uu,A.isDate=Fu,A.isElement=function(t){return No(t)&&1===t.nodeType&&!Bo(t)},A.isEmpty=function(t){if(null==t)return!0;if(ko(t)&&($u(t)||"string"==typeof t||"function"==typeof t.splice||Uu(t)||zu(t)||Nu(t)))return!t.length;var e=Ha(t);if(e==pt||e==mt)return!t.size;if(Wr(t))return!mn(t).length;for(var n in t)if(ji.call(t,n))return!1;return!0},A.isEqual=function(t,e){return ka(t,e)},A.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:a)?n(t,e):a;return r===a?ka(t,e,a,n):!!r},A.isError=Io,A.isFinite=function(t){return"number"==typeof t&&Xi(t)},A.isFunction=Ro,A.isInteger=Lo,A.isLength=Do,A.isMap=Ku,A.isMatch=function(t,e){return t===e||vn(t,e,Mr(e))},A.isMatchWith=function(t,e,n){return n="function"==typeof n?n:a,vn(t,e,Mr(e),n)},A.isNaN=function(t){return $o(t)&&t!=+t},A.isNative=function(t){if(qa(t))throw new di("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(t)},A.isNil=function(t){return null==t},A.isNull=function(t){return null===t},A.isNumber=$o,A.isObject=Mo,A.isObjectLike=No,A.isPlainObject=Bo,A.isRegExp=Hu,A.isSafeInteger=function(t){return Lo(t)&&t>=-9007199254740991&&t<=nt},A.isSet=Vu,A.isString=Uo,A.isSymbol=Fo,A.isTypedArray=zu,A.isUndefined=function(t){return t===a},A.isWeakMap=function(t){return No(t)&&Ha(t)==_t},A.isWeakSet=function(t){return No(t)&&"[object WeakSet]"==Ye(t)},A.join=function(t,e){return null==t?"":Qi.call(t,e)},A.kebabCase=fs,A.last=vo,A.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==a&&(o=(o=Vo(n))<0?ea(r+o,0):na(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):_(t,E,o,!0)},A.lowerCase=hs,A.lowerFirst=ps,A.lt=Gu,A.lte=qu,A.max=function(t){return t&&t.length?Ie(t,ii,Je):a},A.maxBy=function(t,e){return t&&t.length?Ie(t,Lr(e,2),Je):a},A.mean=function(t){return O(t,ii)},A.meanBy=function(t,e){return O(t,Lr(e,2))},A.min=function(t){return t&&t.length?Ie(t,ii,bn):a},A.minBy=function(t,e){return t&&t.length?Ie(t,Lr(e,2),bn):a},A.stubArray=li,A.stubFalse=fi,A.stubObject=function(){return{}},A.stubString=function(){return""},A.stubTrue=function(){return!0},A.multiply=Rs,A.nth=function(t,e){return t&&t.length?xn(t,Vo(e)):a},A.noConflict=function(){return Ze._===this&&(Ze._=Ti),this},A.noop=si,A.now=Eu,A.pad=function(t,e,n){t=Wo(t);var r=(e=Vo(e))?z(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return br(Zi(o),n)+t+br(Wi(o),n)},A.padEnd=function(t,e,n){t=Wo(t);var r=(e=Vo(e))?z(t):0;return e&&r<e?t+br(e-r,n):t},A.padStart=function(t,e,n){t=Wo(t);var r=(e=Vo(e))?z(t):0;return e&&r<e?br(e-r,n)+t:t},A.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),oa(Wo(t).replace(Wt,""),e||0)},A.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Hr(t,e,n)&&(e=n=a),n===a&&("boolean"==typeof e?(n=e,e=a):"boolean"==typeof t&&(n=t,t=a)),t===a&&e===a?(t=0,e=1):(t=Ho(t),e===a?(e=t,t=0):e=Ho(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=ia();return na(t+o*(e-t+ze("1e-"+((o+"").length-1))),e)}return Cn(t,e)},A.reduce=function(t,e,n){var r=$u(t)?g:C,o=arguments.length<3;return r(t,Lr(e,4),n,o,Oa)},A.reduceRight=function(t,e,n){var r=$u(t)?m:C,o=arguments.length<3;return r(t,Lr(e,4),n,o,ja)},A.repeat=function(t,e,n){return e=(n?Hr(t,e,n):e===a)?1:Vo(e),Pn(Wo(t),e)},A.replace=function(){var t=arguments,e=Wo(t[0]);return t.length<3?e:e.replace(t[1],t[2])},A.result=function(t,e,n){var r=-1,o=(e=Yn(e,t)).length;for(o||(o=1,t=a);++r<o;){var i=null==t?a:t[ao(e[r])];i===a&&(r=o,i=n),t=Ro(i)?i.call(t):i}return t},A.round=Ls,A.runInContext=t,A.sample=function(t){return($u(t)?ge:Tn)(t)},A.size=function(t){if(null==t)return 0;if(ko(t))return Uo(t)?z(t):t.length;var e=Ha(t);return e==pt||e==mt?t.size:mn(t).length},A.snakeCase=ds,A.some=function(t,e,n){var r=$u(t)?b:Mn;return n&&Hr(t,e,n)&&(e=a),r(t,Lr(e,3))},A.sortedIndex=function(t,e){return Nn(t,e)},A.sortedIndexBy=function(t,e,n){return $n(t,e,Lr(n,2))},A.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Nn(t,e);if(r<n&&Po(t[r],e))return r}return-1},A.sortedLastIndex=function(t,e){return Nn(t,e,!0)},A.sortedLastIndexBy=function(t,e,n){return $n(t,e,Lr(n,2),!0)},A.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Nn(t,e,!0)-1;if(Po(t[n],e))return n}return-1},A.startCase=vs,A.startsWith=function(t,e,n){return t=Wo(t),n=null==n?0:Ae(Vo(n),0,t.length),e=La(e),t.slice(n,n+e.length)==e},A.subtract=Ds,A.sum=function(t){return t&&t.length?P(t,ii):0},A.sumBy=function(t,e){return t&&t.length?P(t,Lr(e,2)):0},A.template=function(t,e,n){var r=A.templateSettings;n&&Hr(t,e,n)&&(e=a),t=Wo(t),e=Yu({},e,r,jr);var o,i,u=Yu({},e.imports,r.imports,jr),s=Jo(u),c=R(u,s),l=0,f=e.interpolate||le,h="__p += '",p=mi((e.escape||le).source+"|"+f.source+"|"+(f===Kt?ne:le).source+"|"+(e.evaluate||le).source+"|$","g"),d="//# sourceURL="+(ji.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Fe+"]")+"\n";t.replace(p,(function(e,n,r,a,u,s){return r||(r=a),h+=t.slice(l,s).replace(fe,$),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),u&&(i=!0,h+="';\n"+u+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+e.length,e})),h+="';\n";var v=ji.call(e,"variable")&&e.variable;if(v){if(te.test(v))throw new di("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(i?h.replace(Rt,""):h).replace(Lt,"$1").replace(Dt,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y=ms((function(){return vi(s,d+"return "+h).apply(a,c)}));if(y.source=h,Io(y))throw y;return y},A.times=function(t,e){if((t=Vo(t))<1||t>nt)return[];var n=ot,r=na(t,ot);e=Lr(e),t-=ot;for(var o=k(r,e);++n<t;)e(n);return o},A.toFinite=Ho,A.toInteger=Vo,A.toLength=zo,A.toLower=function(t){return Wo(t).toLowerCase()},A.toNumber=Go,A.toSafeInteger=function(t){return t?Ae(Vo(t),-9007199254740991,nt):0===t?t:0},A.toString=Wo,A.toUpper=function(t){return Wo(t).toUpperCase()},A.trim=function(t,e,n){if((t=Wo(t))&&(n||e===a))return T(t);if(!t||!(e=La(e)))return t;var r=G(t),o=G(e),i=D(r,o),u=M(r,o)+1;return Jn(r,i,u).join("")},A.trimEnd=function(t,e,n){if((t=Wo(t))&&(n||e===a))return t.slice(0,q(t)+1);if(!t||!(e=La(e)))return t;var r=G(t),o=M(r,G(e))+1;return Jn(r,0,o).join("")},A.trimStart=function(t,e,n){if((t=Wo(t))&&(n||e===a))return t.replace(Wt,"");if(!t||!(e=La(e)))return t;var r=G(t),o=D(r,G(e));return Jn(r,o).join("")},A.truncate=function(t,e){var n=30,r="...";if(Mo(e)){var o="separator"in e?e.separator:o;n="length"in e?Vo(e.length):n,r="omission"in e?La(e.omission):r}var i=(t=Wo(t)).length;if(B(t)){var u=G(t);i=u.length}if(n>=i)return t;var s=n-z(r);if(s<1)return r;var c=u?Jn(u,0,s).join(""):t.slice(0,s);if(o===a)return c+r;if(u&&(s+=c.length-s),Hu(o)){if(t.slice(s).search(o)){var l,f=c;for(o.global||(o=mi(o.source,Wo(re.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===a?s:h)}}else if(t.indexOf(La(o),s)!=s){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+r},A.unescape=function(t){return(t=Wo(t))&&$t.test(t)?t.replace(Mt,fn):t},A.uniqueId=function(t){var e=++Ai;return Wo(t)+e},A.upperCase=ys,A.upperFirst=gs,A.each=So,A.eachRight=xo,A.first=po,ui(A,(ku={},Me(A,(function(t,e){ji.call(A.prototype,e)||(ku[e]=t)})),ku),{chain:!1}),A.VERSION="4.17.21",c(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){A[t].placeholder=A})),c(["drop","take"],(function(t,e){Z.prototype[t]=function(n){n=n===a?1:ea(Vo(n),0);var r=this.__filtered__&&!e?new Z(this):this.clone();return r.__filtered__?r.__takeCount__=na(n,r.__takeCount__):r.__views__.push({size:na(n,ot),type:t+(r.__dir__<0?"Right":"")}),r},Z.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),c(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Z.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Lr(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),c(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Z.prototype[t]=function(){return this[n](1).value()[0]}})),c(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Z.prototype[t]=function(){return this.__filtered__?new Z(this):this[n](1)}})),Z.prototype.compact=function(){return this.filter(ii)},Z.prototype.find=function(t){return this.filter(t).head()},Z.prototype.findLast=function(t){return this.reverse().find(t)},Z.prototype.invokeMap=kn((function(t,e){return"function"==typeof t?new Z(this):this.map((function(n){return pn(n,t,e)}))})),Z.prototype.reject=function(t){return this.filter(Co(Lr(t)))},Z.prototype.slice=function(t,e){t=Vo(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Z(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==a&&(n=(e=Vo(e))<0?n.dropRight(-e):n.take(e-t)),n)},Z.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Z.prototype.toArray=function(){return this.take(ot)},Me(Z.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=A[r?"take"+("last"==e?"Right":""):e],u=r||/^find/.test(e);i&&(A.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=o(e,Z),l=s[0],f=c||$u(e),h=function(t){var e=i.apply(A,y([t],s));return r&&p?e[0]:e};f&&n&&"function"==typeof l&&1!=l.length&&(c=f=!1);var p=this.__chain__,d=!!this.__actions__.length,v=u&&!p,g=c&&!d;if(!u&&f){e=g?e:new Z(this);var m=t.apply(e,s);return m.__actions__.push({func:_o,args:[h],thisArg:a}),new W(m,p)}return v&&g?t.apply(this,s):(m=this.thru(h),v?r?m.value()[0]:m.value():m)})})),c(["pop","push","shift","sort","splice","unshift"],(function(t){var e=_i[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);A.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply($u(o)?o:[],t)}return this[n]((function(n){return e.apply($u(n)?n:[],t)}))}})),Me(Z.prototype,(function(t,e){var n=A[e];if(n){var r=n.name+"";ji.call(da,r)||(da[r]=[]),da[r].push({name:e,func:n})}})),da[Na(a,2).name]=[{name:"wrapper",func:a}],Z.prototype.clone=function(){var t=new Z(this.__wrapped__);return t.__actions__=ir(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ir(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ir(this.__views__),t},Z.prototype.reverse=function(){if(this.__filtered__){var t=new Z(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Z.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=$u(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=na(e,t+a);break;case"takeRight":t=ea(t,e-a)}}return{start:t,end:e}}(0,o,this.__views__),a=i.start,u=i.end,s=u-a,c=r?u:a-1,l=this.__iteratees__,f=l.length,h=0,p=na(s,this.__takeCount__);if(!n||!r&&o==s&&p==s)return zn(t,this.__actions__);var d=[];t:for(;s--&&h<p;){for(var v=-1,y=t[c+=e];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}d[h++]=y}return d},A.prototype.at=vu,A.prototype.chain=function(){return wo(this)},A.prototype.commit=function(){return new W(this.value(),this.__chain__)},A.prototype.next=function(){this.__values__===a&&(this.__values__=Ko(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?a:this.__values__[this.__index__++]}},A.prototype.plant=function(t){for(var e,n=this;o(n,V);){var r=co(n);r.__index__=0,r.__values__=a,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},A.prototype.reverse=function(){var t=this.__wrapped__;if(o(t,Z)){var e=t;return this.__actions__.length&&(e=new Z(this)),(e=e.reverse()).__actions__.push({func:_o,args:[go],thisArg:a}),new W(e,this.__chain__)}return this.thru(go)},A.prototype.toJSON=A.prototype.valueOf=A.prototype.value=function(){return zn(this.__wrapped__,this.__actions__)},A.prototype.first=A.prototype.head,Ki&&(A.prototype[Ki]=function(){return this}),A}();Ze._=hn,(r=function(){return hn}.call(e,n,e,t))===a||(t.exports=r)}).call(this)},980:t=>{var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},r=function(t,e,n,r){var o,a,u=e&&(o=e.prototype,null!=(a=i)&&"undefined"!=typeof Symbol&&a[Symbol.hasInstance]?a[Symbol.hasInstance](o):o instanceof a)?e:i,s=Object.create(u.prototype),c=new p(r||[]);return s._invoke=l(t,n,c),s},o=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},i=function(){},a=function(){},u=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},c=function(t,e){function n(r,i,a,u){var s=o(t[r],t,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var r;this._invoke=function(t,o){function i(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(i,i):i()}},l=function(t,e,n){var r=S;return function(i,a){if(r===E)throw new Error("Generator is already running");if(r===O){if("throw"===i)throw a;return v()}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=T(u,n);if(s){if(s===j)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===S)throw r=O,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=E;var c=o(t,e,n);if("normal"===c.type){if(r=n.done?O:x,c.arg===j)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=O,n.method="throw",n.arg=c.arg)}}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},h=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},d=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=r;var S="suspendedStart",x="suspendedYield",E="executing",O="completed",j={},A={};n(A,b,(function(){return this}));var C=Object.getPrototypeOf,P=C&&C(C(d([])));P&&P!==y&&g.call(P,b)&&(A=P);var k=u.prototype=i.prototype=Object.create(A);function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return j;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return j}var i=o(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,j;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,j):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,j)}return a.prototype=u,n(k,"constructor",u),n(u,"constructor",a),a.displayName=n(u,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,n(t,_,"GeneratorFunction")),t.prototype=Object.create(k),t},t.awrap=function(t){return{__await:t}},s(c.prototype),n(c.prototype,w,(function(){return this})),t.AsyncIterator=c,t.async=function(e,n,o,i,a){void 0===a&&(a=Promise);var u=new c(r(e,n,o,i),a);return t.isGeneratorFunction(n)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},s(k),n(k,_,"Generator"),n(k,b,(function(){return this})),n(k,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=d,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(h),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=g.call(i,"catchLoc"),s=g.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),j},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),j}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:d(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),j}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},584:(t,e,n)=>{var r=n(518).R;e.s=function(t){if(t||(t=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,t)}},518:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},641:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(t,e){var i={},a={};return{setters:[function(t){i.Type=t.Type,i.defineConfigSchema=t.defineConfigSchema,i.getConfig=t.getConfig,i.navigate=t.navigate,i.validators=t.validators},function(t){a.reportError=t.reportError}],execute:function(){t(function(){var t={602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},o=function(t,e,n,o){var u,s,c,l,f=e&&r(e.prototype,a)?e:a,h=Object.create(f.prototype),d=new p(o||[]);return h._invoke=(u=t,s=n,c=d,l=S,function(t,e){if(l===E)throw new Error("Generator is already running");if(l===O){if("throw"===t)throw e;return v()}for(c.method=t,c.arg=e;;){var n=c.delegate;if(n){var r=T(n,c);if(r){if(r===j)continue;return r}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(l===S)throw l=O,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);l=E;var o=i(u,s,c);if("normal"===o.type){if(l=c.done?O:x,o.arg===j)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(l=O,c.method="throw",c.arg=o.arg)}}),h},i=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},a=function(){},u=function(){},s=function(){},c=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,o,a,u){var s=i(t[r],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var r;this._invoke=function(t,o){function i(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},h=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},d=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=o;var S="suspendedStart",x="suspendedYield",E="executing",O="completed",j={},A={};n(A,b,(function(){return this}));var C=Object.getPrototypeOf,P=C&&C(C(d([])));P&&P!==y&&g.call(P,b)&&(A=P);var k=s.prototype=a.prototype=Object.create(A);function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return j;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return j}var o=i(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,j;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,j):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,j)}return u.prototype=s,n(k,"constructor",s),n(s,"constructor",u),u.displayName=n(s,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,n(t,_,"GeneratorFunction")),t.prototype=Object.create(k),t},t.awrap=function(t){return{__await:t}},c(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var u=new l(o(e,n,r,i),a);return t.isGeneratorFunction(n)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},c(k),n(k,_,"Generator"),n(k,b,(function(){return this})),n(k,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=d,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(h),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=g.call(i,"catchLoc"),s=g.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),j},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),j}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:d(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),j}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var a=o,u=0;u<a.length;u++)a[u](e,i)},o=[];return e=e||{},{action:function(t){var n=function(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(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=c[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return c[t]={value:o,active:!0},o},i=function(t,n){var r=c[t];if(!r){var o=e(n);return c[t]={value:o,active:!1},o}return r.value},a=function(t){return n("app",t)},u=function(){return i("app",{})},s=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return s}});var c={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:function(t){"use strict";t.exports=i},254:function(t){"use strict";t.exports=a}},u={};function s(e){var n=u[e];if(void 0!==n)return n.exports;var r=u[e]={exports:{}};return t[e](r,r.exports,s),r.exports}s.y=e,s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,{a:e}),e},s.d=function(t,e){for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t}();var c={};return(0,s(968).s)(1),function(){"use strict";var t=function(t,e){function n(){this.constructor=t}W(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},e=function(t){return"function"==typeof t},i=function(t){setTimeout((function(){throw t}),0)},a=function(t){return t.reduce((function(t,e){return t.concat(r(e,Q)?e.errors:e)}),[])},u=function(t){return t},l=function(t){return 0===t.length?u:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}},f=function(t){if(t||(t=Y.Promise||Promise),!t)throw new Error("no Promise impl found");return t},h=function(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)},p=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){h(i,r,o,a,u,"next",t)}function u(t){h(i,r,o,a,u,"throw",t)}a(void 0)}))}},d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}},v=function(t,e){return!e||"object"!==jt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},y=function(t){return window.openmrsBase+t},g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof e)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.");var n=y(t);e.headers||(e.headers={}),_t(e.body)&&(e.body=JSON.stringify(e.body)),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),null===e.headers.Accept&&delete e.headers.Accept;var r,o=Error();return window.fetch(n,e).then((r=p(q().mark((function t(e){var r,i;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e).ok){t.next=10;break}if(204!==r.status){t.next=7;break}return r.data=null,t.abrupt("return",r);case 7:return t.abrupt("return",r.text().then((function(t){try{t&&(r.data=JSON.parse(t))}catch(t){}return r})));case 8:t.next=19;break;case 10:return t.next=12,(0,St.getConfig)("@openmrs/esm-api");case 12:if(i=t.sent.redirectAuthFailure,!(n===y(Ct)&&403===r.status||i.enabled&&i.errors.includes(r.status))){t.next=18;break}return(0,St.navigate)({to:i.url}),t.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return t.abrupt("return",r.text().then((function(t){var e=t;try{e=JSON.parse(t)}catch(t){}throw new Pt(n,r,e,o)}),(function(t){throw new Pt(n,r,null,o)})));case 19:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)}))},m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof e)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return e.signal=n.signal,new it((function(r){var o=!1;return g(t,e).then((function(t){o=!0,r.next(t),r.complete()}),(function(t){o=!0,r.error(t)})),function(){o||n.abort()}}))},b=function(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)},w=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){b(i,r,o,a,u,"next",t)}function u(t){b(i,r,o,a,u,"throw",t)}a(void 0)}))}},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Mt<Date.now()-6e4||!Dt.getState().loaded)&&x(),new it((function(e){var n=function(n){var r;n.loaded&&(t.includeAuthStatus?e.next(n.session):e.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Dt.getState()),Dt.subscribe(n)}))},S=function(){return(Mt<Date.now()-6e4||!Dt.getState().loaded)&&x(),Dt},x=function(){return new Promise((function(t,e){Mt=Date.now(),g(Ct).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return e(),Promise.reject();var r,o,i,a,u;(u=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",u),t(n.data),Dt.setState({loaded:!0,session:n.data})})).catch((function(t){return(0,It.reportError)("Failed to fetch new session information: ".concat(t)),e(t),{sessionId:"",authenticated:!1}}))}))},E=function(){Dt.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},O=function(t,e){return r=e,("string"==typeof(n=t)?!Lt(r.privileges.find((function(t){return n===t.display}))):Array.isArray(n)?n.every((function(t){return!Lt(r.privileges.find((function(e){return t===e.display})))})):(console.error('Could not understand privileges "'.concat(n,'"')),!0))||!Lt(e.roles.find((function(t){return"System Developer"===t.display})));var n,r},j=function(){var t,e;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(t=r.session.user,n(r.session.user),e&&e())};o(Dt.getState()),t||(e=Dt.subscribe(o))}))},A=function(){return new Promise((function(t,e){var n=_().subscribe((function(e){t(e.sessionLocation),n.unsubscribe()}),e)}))},C=function(t,e){return Nt.apply(this,arguments)},P=function(){(0,St.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:St.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:St.Type.String,_default:"${openmrsSpaBase}/login",_validators:[St.validators.isUrl]},errors:{_type:St.Type.Array,_default:[401],_elements:{_type:St.Type.Number,_validators:[St.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:St.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."}}}),x()},k=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},T=function(t,e){return t?Tt.read(function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){k(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({type:"Patient",patient:t},e)):Promise.resolve(null)},I=function(t){return function(e){return 0===t?Wt:e.lift(new Zt(t))}},R=function(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Jt(t,e))}},L=function(t,e,n){var r=null!=n?n:Qt;return m("/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(r),{signal:e.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(I(1)).pipe(R((function(t){return t})))},D=function(t,e){return m("/ws/rest/v1/visit",{signal:e.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},M=function(t,e,n){return m("/ws/rest/v1/visit/".concat(t),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},N=function(t){return{uuid:t.uuid,display:t.display,name:t.name}},$=function(){return m("/ws/rest/v1/visittype").pipe(R((function(t){return t.data.results.map(N)}))).pipe(I(1))},B=function(t){return{uuid:t.uuid,display:t.display}},U=function(){return m("/ws/rest/v1/location").pipe(R((function(t){return t.data.results.map(B)}))).pipe(I(1))};s.r(c),s.d(c,{OpenmrsFetchError:function(){return Pt},VisitMode:function(){return $t},VisitStatus:function(){return Bt},backendDependencies:function(){return ee},clearCurrentUser:function(){return E},defaultVisitCustomRepresentation:function(){return Qt},fetchCurrentPatient:function(){return T},fhir:function(){return Tt},fhirBaseUrl:function(){return kt},getCurrentUser:function(){return _},getLocations:function(){return U},getLoggedInUser:function(){return j},getSessionLocation:function(){return A},getSessionStore:function(){return S},getStartedVisit:function(){return te},getVisitTypes:function(){return $},getVisitsForPatient:function(){return L},makeUrl:function(){return y},openmrsFetch:function(){return g},openmrsObservableFetch:function(){return m},refetchCurrentUser:function(){return x},saveVisit:function(){return D},sessionEndpoint:function(){return Ct},setSessionLocation:function(){return C},setupApiModule:function(){return P},toLocationObject:function(){return B},toVisitTypeObject:function(){return N},updateVisit:function(){return M},userHasAccess:function(){return O}});var F,K,H,V,z,G=s(602),q=s.n(G),W=function(t,e){return(W=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},Z=!1,Y={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,Z=t},get useDeprecatedSynchronousErrorHandling(){return Z}},J={closed:!0,next:function(t){},error:function(t){if(Y.useDeprecatedSynchronousErrorHandling)throw t;i(t)},complete:function(){}},X=Array.isArray||function(t){return t&&"number"==typeof t.length},Q=(F=function(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this},F.prototype=Object.create(Error.prototype),F),tt=function(){var t,n=function(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)};return n.prototype.unsubscribe=function(){var t;if(!this.closed){var o,i=this,u=i._parentOrParents,s=i._ctorUnsubscribe,c=i._unsubscribe,l=i._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(u,n))u.remove(this);else if(null!==u)for(var f=0;f<u.length;++f)u[f].remove(this);if(e(c)){s&&(this._unsubscribe=void 0);try{c.call(this)}catch(e){t=r(e,Q)?a(e.errors):[e]}}if(X(l)){f=-1;for(var h=l.length;++f<h;){var p=l[f];if(null!==(o=p)&&"object"==typeof o)try{p.unsubscribe()}catch(e){t=t||[],r(e,Q)?t=t.concat(a(e.errors)):t.push(e)}}}if(t)throw new Q(t)}},n.prototype.add=function(t){var e=t;if(!t)return n.EMPTY;switch(void 0===t?"undefined":o(t)){case"function":e=new n(t);case"object":if(e===this||e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if(!r(e,n)){var i=e;(e=new n)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var a=e._parentOrParents;if(null===a)e._parentOrParents=this;else if(r(a,n)){if(a===this)return e;e._parentOrParents=[a,this]}else{if(-1!==a.indexOf(this))return e;a.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[e]:u.push(e),e},n.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},n.EMPTY=((t=new n).closed=!0,t),n}(),et="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),nt=function(e){function n(t,o,i){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=J;break;case 1:if(!t){a.destination=J;break}if("object"==typeof t){r(t,n)?(a.syncErrorThrowable=t.syncErrorThrowable,a.destination=t,t.add(a)):(a.syncErrorThrowable=!0,a.destination=new rt(a,t));break}default:a.syncErrorThrowable=!0,a.destination=new rt(a,t,o,i)}return a}return t(n,e),n.prototype[et]=function(){return this},n.create=function(t,e,r){var o=new n(t,e,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},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(t){this.destination.next(t)},n.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},n}(tt),rt=(H=function(t,n,r,o){var i,a=K.call(this)||this;a._parentSubscriber=t;var u=a;return e(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==J&&(e((u=Object.create(n)).unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=i,a._error=r,a._complete=o,a},t(H,K=nt),H.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;Y.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},H.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=Y.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):i(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;i(t)}}},H.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};Y.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},H.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),Y.useDeprecatedSynchronousErrorHandling)throw t;i(t)}},H.prototype.__tryOrSetError=function(t,e,n){if(!Y.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return Y.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(i(e),!0)}return!1},H.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},H),ot="function"==typeof Symbol&&Symbol.observable||"@@observable",it=function(){var t=function(t){this._isScalar=!1,t&&(this._subscribe=t)};return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var o=this.operator,i=function(t,e,n){if(t){if(r(t,nt))return t;if(t[et])return t[et]()}return t||e||n?new nt(t,e,n):new nt(J)}(t,e,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||Y.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Y.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){Y.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&r(o,nt)?o:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=f(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[ot]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:l(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=f(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}(),at="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ut="object"==typeof self&&self&&self.Object===Object&&self,st=(at||ut||Function("return this")()).Symbol,ct=Object.prototype,lt=ct.hasOwnProperty,ft=ct.toString,ht=st?st.toStringTag:void 0,pt=Object.prototype.toString,dt=st?st.toStringTag:void 0,vt=(V=Object.getPrototypeOf,z=Object,function(t){return V(z(t))}),yt=Function.prototype,gt=Object.prototype,mt=yt.toString,bt=gt.hasOwnProperty,wt=mt.call(Object),_t=function(t){if(null==(e=t)||"object"!=typeof e||"[object Object]"!=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":dt&&dt in Object(t)?function(t){var e=lt.call(t,ht),n=t[ht];try{t[ht]=void 0;var r=!0}catch(t){}var o=ft.call(t);return r&&(e?t[ht]=n:delete t[ht]),o}(t):(e=t,pt.call(e));var e}(t))return!1;var e,n=vt(t);if(null===n)return!0;var o=bt.call(n,"constructor")&&n.constructor;return"function"==typeof o&&r(o,o)&&mt.call(o)==wt},St=s(824);function xt(t,e,n){return xt=d()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Ot(o,n.prototype),o},xt.apply(null,arguments)}function Et(t){return(Et=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ot(t,e){return(Ot=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var jt=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)};function At(t){var e="function"==typeof Map?new Map:void 0;return At=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return xt(t,arguments,Et(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ot(r,t)},At(t)}var Ct="/ws/rest/v1/session",Pt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ot(t,e)}(i,t);var e,n,o=(e=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=Et(e);if(n){var o=Et(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return v(this,t)});function i(t,e,n,a){var u;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,i),(u=o.call(this)).message="Server responded with ".concat(e.status," (").concat(e.statusText,") for url ").concat(t,". Check err.responseBody or network tab in dev tools for more info"),a.message=u.message,u.responseBody=n,u.response=e,u.stack="Stacktrace for outgoing request:\n".concat(a.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return i}(At(Error)),kt="/ws/fhir2/R4",Tt={read:function(t){var e,n;return g((n={url:"".concat(kt,"/").concat(t.type,"/").concat(t.patient),method:"GET",headers:null!==(e=t.headers)&&void 0!==e?e:{}}).url,{method:n.method,headers:n.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:n}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:n}}))}},It=s(254),Rt=s(385),Lt=function(t){return void 0===t},Dt=(0,Rt.createGlobalStore)("session",{loaded:!1,session:null}),Mt=0;function Nt(){return(Nt=w(q().mark((function t(e,n){return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g(Ct,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:x();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var $t,Bt,Ut,Ft=function(){var t=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return t.prototype=Object.create(Error.prototype),t}(),Kt=function(e){var n=function(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 t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},n}(tt),Ht=function(e){var n=function(t){var n=e.call(this,t)||this;return n.destination=t,n};return t(n,e),n}(nt),Vt=function(e){var n=function(){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[et]=function(){return new Ht(this)},n.prototype.lift=function(t){var e=new zt(this,this);return e.operator=t,e},n.prototype.next=function(t){if(this.closed)throw new Ft;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},n.prototype.error=function(t){if(this.closed)throw new Ft;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Ft;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;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 Ft;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(t){if(this.closed)throw new Ft;return this.hasError?(t.error(this.thrownError),tt.EMPTY):this.isStopped?(t.complete(),tt.EMPTY):(this.observers.push(t),new Kt(this,t))},n.prototype.asObservable=function(){var t=new it;return t.source=this,t},n.create=function(t,e){return new zt(t,e)},n}(it),zt=function(e){var n=function(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r};return t(n,e),n.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},n.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},n.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},n.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):tt.EMPTY},n}(Vt),Gt=function(e){var n=function(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 Ft;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(Vt),qt=function(){var t=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return t.prototype=Object.create(Error.prototype),t}(),Wt=new it((function(t){return t.complete()})),Zt=function(){var t=function(t){if(this.total=t,this.total<0)throw new qt};return t.prototype.call=function(t,e){return e.subscribe(new Yt(t,this.total))},t}(),Yt=function(e){var n=function(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(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},n}(nt),Jt=function(){var t=function(t,e){this.project=t,this.thisArg=e};return t.prototype.call=function(t,e){return e.subscribe(new Xt(t,this.project,this.thisArg))},t}(),Xt=function(e){var n=function(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(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(nt),Qt="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)",te=new Gt(null);(Ut=$t||($t={})).NEWVISIT="startVisit",Ut.EDITVISIT="editVisit",Ut.LOADING="loadingVisit",function(t){t.NOTSTARTED="notStarted",t.ONGOING="ongoing"}(Bt||(Bt={}));var ee={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),c}())}}}))},66:()=>{function t(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}System.register(["@openmrs/esm-state"],(function(e,n){var r={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore}],execute:function(){e(function(){var e={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:function(t){"use strict";t.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](r,r.exports,i),r.exports}i.y=n,i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t}();var a={};return(0,i(968).s)(1),function(){"use strict";var e=function(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(t){return t&&t.sensitive?"":"i"},r=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},o=function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},u=function(e){return n=e.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):t(n,r))?e.matcher:"string"==typeof e.matcher?d(e.matcher):d(e.path);var n,r},s=function(t){return c([t])},c=function(t){var e=l(),n=t.map((function(t){return{matcher:u(t),settings:t}})),r=o(e).concat(o(n));v.setState(r,!0)},l=function(){return v.getState()},f=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},h=function(t,e){if(t.length>0){var n=y(t,e);if(n){for(var r=[n],o=y(t,n.settings.parent);void 0!==o;)r.push(o),o=y(t,o.settings.parent);return r.reverse()}}return[]},p=function(t){return h(l(),t)};function d(r,o,i){return t(r,RegExp)?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return t}(r,o):Array.isArray(r)?(s=o,c=i,l=r.map((function(t){return d(t,s,c).source})),new RegExp("(?:"+l.join("|")+")",n(c))):(a=o,function(t,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,u=o.start,s=void 0===u||u,c=o.end,l=void 0===c||c,f=o.encode,h=void 0===f?function(t){return t}:f,p="["+e(o.endsWith||"")+"]|$",d="["+e(o.delimiter||"/#?")+"]",v=s?"^":"",y=0,g=t;y<g.length;y++){var m=g[y];if("string"==typeof m)v+=e(h(m));else{var b=e(h(m.prefix)),w=e(h(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+=d+"?"),v+=o.endsWith?"(?="+p+")":"$";else{var S=t[t.length-1],x="string"==typeof S?d.indexOf(S[S.length-1])>-1:void 0===S;a||(v+="(?:"+d+"(?="+p+"))?"),x||(v+="(?="+d+"|"+p+")")}return new RegExp(v,n(o))}(function(t,n){void 0===n&&(n={});for(var r=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var o=1,i="";if("?"===t[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<t.length;)if("\\"!==t[u]){if(")"===t[u]){if(0==--o){u++;break}}else if("("===t[u]&&(o++,"?"!==t[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=t[u++]}else i+=t[u++]+t[u++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);e.push({type:"PATTERN",index:n,value:i}),n=u}else{for(var a="",u=n+1;u<t.length;){var s=t.charCodeAt(u);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=t[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);e.push({type:"NAME",index:n,value:a}),n=u}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(t),o=n.prefixes,i=void 0===o?"./":o,a="[^"+e(n.delimiter||"/#?")+"]+?",u=[],s=0,c=0,l="",f=function(t){if(c<r.length&&r[c].type===t)return r[c++].value},h=function(t){var e=f(t);if(void 0!==e)return e;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+t)},p=function(){for(var t,e="";t=f("CHAR")||f("ESCAPED_CHAR");)e+=t;return e};c<r.length;){var d=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var g=d||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(u.push(l),l=""),u.push({name:v||s++,prefix:g,suffix:"",pattern:y||a,modifier:f("MODIFIER")||""})}else{var m=d||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(u.push(l),l=""),f("OPEN")){g=p();var b=f("NAME")||"",w=f("PATTERN")||"",_=p();h("CLOSE"),u.push({name:b||(w?s++:""),pattern:b&&!w?a:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else h("END")}}return u}(r,u=i),a,u));var a,u,s,c,l}i.r(a),i.d(a,{filterBreadcrumbs:function(){return h},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return p},registerBreadcrumb:function(){return s},registerBreadcrumbs:function(){return c}});var v=(0,i(685).createGlobalStore)("breadcrumbs",[]);function y(t,e){if(e)return n=e,(r=t.filter((function(t){return t.matcher.test(n)})),function(t){if(Array.isArray(t))return t}(r)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(r)||function(t,e){if(t){if("string"==typeof t)return f(t,1);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,1):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]||function(t,e){for(var n=e.split("/");n.length>1;){n.pop();var r=y(t,n.join("/"));if(r)return r}}(t,e);var n,r}}(),a}())}}}))},78:()=>{var t=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-state","single-spa"],(function(e,n){var r={},o={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore,r.getGlobalStore=t.getGlobalStore},function(t){o.navigateToUrl=t.navigateToUrl}],execute:function(){e(function(){"use strict";var e={685:function(t){t.exports=r},645:function(t){t.exports=o}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return function(){var e=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},n=function(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}},r=function(t){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:n((function(e){return t(o,e)}));default:return e(o)&&e(i)?r:e(o)?n((function(e){return t(e,i)})):e(i)?n((function(e){return t(o,e)})):t(o,i)}}},o=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},u=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},s=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},c=function(t,e,n,r){var i=o(t);function a(t,e){return ct(t,e,n.slice(),r.slice())}return!u((function(t,e){return!u(a,e,t)}),o(e),i)},l=function(t){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return e(i)?o:r((function(e,n){return t(i,e,n)}));case 2:return e(i)&&e(a)?o:e(i)?r((function(e,n){return t(e,a,n)})):e(a)?r((function(e,n){return t(i,e,n)})):n((function(e){return t(i,a,e)}));default:return e(i)&&e(a)&&e(u)?o:e(i)&&e(a)?r((function(e,n){return t(e,n,u)})):e(i)&&e(u)?r((function(e,n){return t(e,a,n)})):e(a)&&e(u)?r((function(e,n){return t(i,e,n)})):e(i)?n((function(e){return t(e,a,u)})):e(a)?n((function(e){return t(i,e,u)})):e(u)?n((function(e){return t(i,a,e)})):t(i,a,u)}}},f=function(t){return"[object Object]"===Object.prototype.toString.call(t)},h=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},p=function(t,e,n,r){return t["@@transducer/result"](n[r](xt(t["@@transducer/step"],t),e))},d=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},y=function(t){return(0,It.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},g=function(){return(0,It.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(t){return b(g().getState(),t)},b=function(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,It.getGlobalStore)("config-extensions",{configs:{}})},_=function(t,e){var n=Object.assign({},S(w().getState(),t,e));return n.config=dt(["Display conditions"],n.config),n},S=function(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},x=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},E=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},O=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){E(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},j=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||C(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},A=function(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||C(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},C=function(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}},P=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=F(u,t,e);y(u).setState({loaded:!0,config:s})}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},k=function(t,e){var n,r,o=(n=H(U(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=j(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var h,p=Object.entries(s)[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var d=j(h.value,2),v=d[0];B(d[1],u,v)}}catch(t){l=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return O({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=j(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),a=g(),u=a.getState(),s={slots:O({},u.slots,i)};lt(u,s)||a.setState(s)},T=function(t,e){var n=function(t,e){var n=Bt(mt(t.schemas)),r=A(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=j(u.value,2);n=H([n,Ut(c[0],c[1])])}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(t,e);$t.setState({config:n})},I=function(t,e,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=e.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=$(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,t,n);r[c.slotName]=O({},r[c.slotName],E({},c.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}w().setState({configs:r})},R=function(t,e){Ft(t,e);var n=pt(e,zt),r=Lt.getState();Lt.setState({schemas:O({},r.schemas,E({},t,n))})},L=function(t,e){Ft(t,e);var n=pt(e,zt),r=Lt.getState();r.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),Lt.setState({schemas:O({},r.schemas,E({},t,n))})},D=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Lt.getState();Lt.setState({providedConfigs:A(n.providedConfigs).concat([{source:e,config:t}])})},M=function(t){return new Promise((function(e){var n=function(t){if(t.loaded&&t.config){var n=dt(["Display conditions"],t.config);e(n),o&&o()}},r=y(t);n(r.getState());var o=r.subscribe(n)}))},N=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];V(t,e,n);var o=Vt(t,e,r);return Ht(t,o,n),o},$=function(t,e,n,r,o,i){var a,u,s,c,l=j(r.split("#"),1)[0],f=o.schemas[l],h=f?l:e,p=U(o,i),d=K(t,p),v=null!==(c=null==d||null===(a=d.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},y=H([K(h,p),v]),g=null!=f?f:o.schemas[e];V(g,y,h);var m=Vt(g,y,o.devDefaultsAreOn);return Ht(g,m,h),delete m.extensionSlots,m},B=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(W(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},U=function(t,e){return A(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},F=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=K(t,U(e,n));V(r,o,t);var i=Vt(r,o,e.devDefaultsAreOn);return Ht(r,i,t),delete i.extensionSlots,i},K=function(t,e){return H(e.map((function(e){return e[t]})).filter((function(t){return!!t})))},H=function(t){return Ot(pt)({},t)},V=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s],l=n+"."+s,f=t[s];t.hasOwnProperty(s)?Kt(f,c,l):"extensionSlots"===s&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},z=function(t,e,n){e&&G(t,[{Array:jt,Boolean:At,ConceptUuid:Tt,Number:Ct,Object:kt,String:Pt,UUID:Tt,PersonAttributeTypeUuid:Tt,PatientIdentifierTypeUuid:Tt}[e]],n)},G=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=(0,a.value)(n);"string"==typeof s&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(s)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(s)))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},q=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},W=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},Z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Y=function(t,e){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return J(t,function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},e)).replace(/^\/\//,"/")},J=function(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)},X=function(t){var e=t.to,n=t.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Y(e,n);o.startsWith(r)?(0,Gt.navigateToUrl)(o):window.location.assign(o)};i.r(a),i.d(a,{Type:function(){return yt},configExtensionStore:function(){return Nt},configInternalStore:function(){return Lt},defineConfigSchema:function(){return R},defineExtensionConfigSchema:function(){return L},getConfig:function(){return M},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return g},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return $t},inRange:function(){return qt},interpolateString:function(){return J},interpolateUrl:function(){return Y},isUrl:function(){return Zt},isUrlWithTemplateParameters:function(){return Wt},navigate:function(){return X},oneOf:function(){return Yt},processConfig:function(){return N},provide:function(){return D},temporaryConfigStore:function(){return Mt},validator:function(){return d},validators:function(){return Jt}});var Q="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},tt=Object.prototype.toString,et=function(){return"[object Arguments]"===tt.call(arguments)?function(t){return"[object Arguments]"===tt.call(t)}:function(t){return s("callee",t)}}(),nt=et,rt=!{toString:null}.propertyIsEnumerable("toString"),ot=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],it=function(){return arguments.propertyIsEnumerable("length")}(),at=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},ut="function"!=typeof Object.keys||it?n((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=it&&nt(t);for(e in t)!s(e,t)||o&&"length"===e||(r[r.length]=e);if(rt)for(n=ot.length-1;n>=0;)s(e=ot[n],t)&&!at(r,e)&&(r[r.length]=e),n-=1;return r})):n((function(t){return Object(t)!==t?[]:Object.keys(t)})),st=n((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function ct(e,n,r,o){if(Q(e,n))return!0;var i,a,u=st(e);if(u!==st(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(i=e.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return e===n;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":t(e))!=(void 0===n?"undefined":t(n))||!Q(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!Q(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===e)return o[l]===n;l-=1}switch(u){case"Map":return e.size===n.size&&c(e.entries(),n.entries(),r.concat([e]),o.concat([n]));case"Set":return e.size===n.size&&c(e.values(),n.values(),r.concat([e]),o.concat([n]));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 f=ut(e);if(f.length!==ut(n).length)return!1;var h=r.concat([e]),p=o.concat([n]);for(l=f.length-1;l>=0;){var d=f[l];if(!s(d,n)||!ct(n[d],e[d],h,p))return!1;l-=1}return!0}var lt=r((function(t,e){return ct(t,e,[],[])})),ft=l((function(t,e,n){var r,o={};for(r in e)s(r,e)&&(o[r]=s(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)s(r,n)&&!s(r,o)&&(o[r]=n[r]);return o})),ht=l((function t(e,n,r){return ft((function(n,r,o){return f(r)&&f(o)?t(e,r,o):e(n,r,o)}),n,r)})),pt=r((function(t,e){return ht((function(t,e,n){return n}),t,e)})),dt=r((function(t,e){for(var n={},r={},o=0,i=t.length;o<i;)r[t[o]]=1,o+=1;for(var a in e)r.hasOwnProperty(a)||(n[a]=e[a]);return n}));function vt(t,e,n,r){var o,i=function(o){for(var i=e.length,a=0;a<i;){if(t===e[a])return n[a];a+=1}for(var u in e[a+1]=t,n[a+1]=o,t)o[u]=r?vt(t[u],e,n,!0):t[u];return o};switch(st(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var yt,gt,mt=n((function(t){return null!=t&&"function"==typeof t.clone?t.clone():vt(t,[],[],!0)})),bt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},wt=n((function(t){return!!bt(t)||!!t&&"object"==typeof t&&(e=t,!("[object String]"===Object.prototype.toString.call(e)))&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1));var e})),_t=function(){var t=function(t){this.f=t};return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),St=r((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,a){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,a,u){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,a,u,s){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,a,u,s,c){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,a,u,s,c,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),xt=St,Et="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Ot=l((function(t,e,n){if("function"==typeof t&&(t=new _t(t)),wt(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return p(t,e,n,"fantasy-land/reduce");if(null!=n[Et])return h(t,e,n[Et]());if("function"==typeof n.next)return h(t,e,n);if("function"==typeof n.reduce)return p(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));(gt=yt||(yt={})).Array="Array",gt.Boolean="Boolean",gt.ConceptUuid="ConceptUuid",gt.Number="Number",gt.Object="Object",gt.String="String",gt.UUID="UUID",gt.PersonAttributeTypeUuid="PersonAttributeTypeUuid",gt.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var jt=d((function(t){return Array.isArray(t)}),"must be an array"),At=d((function(t){return"boolean"==typeof t}),"must be a boolean"),Ct=d((function(t){return"number"==typeof t}),"must be a number"),Pt=d((function(t){return"string"==typeof t}),"must be a string"),kt=d((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),Tt=d((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),It=i(685),Rt={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Lt=(0,It.createGlobalStore)("config-internal",Rt),Dt=v();Lt.subscribe((function(t){var e;t.devDefaultsAreOn!=Dt&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Dt=t.devDefaultsAreOn)}));var Mt=(0,It.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Mt.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var Nt=(0,It.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),$t=(0,It.createGlobalStore)("config-implementer-tools",{config:{}});function Bt(t){return t.hasOwnProperty("_default")?O({},t,{_value:t._default,_source:"default"}):W(t)?Object.keys(t).reduce((function(e,n){return e[n]=Bt(t[n]),e}),{}):{}}function Ut(t,e){return W(t)?Object.keys(t).reduce((function(n,r){return n[r]=Ut(t[r],e),n}),{}):{_value:t,_source:e}}function Ft(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,s=function(o,i){var a=i.value,u=n+(n&&".")+a,s=e[a];if("Display conditions"===u&&console.error("".concat(t,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),!W(s))return console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";s.hasOwnProperty("_default")||Ft(t,s,u);var c=s._elements;if(q(c)&&Ft(t,c,u+"._elements"),s._validators){var l=!0,f=!1,h=void 0;try{for(var p,d=s._validators[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}}var y=s._type;y&&!Object.values(yt).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(yt).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(s).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(s))),c&&y&&![yt.Array,yt.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s(c,u)}catch(t){i=!0,a=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Kt(t,e,n){z(n,t._type,e),W(e)?t._type===yt.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s];V(t._elements,c,"".concat(n,".").concat(s))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||V(t,e,n):t._type===yt.Array&&function(t,e,n){if(q(t._elements))for(var r=0;r<e.length;r++)Kt(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;z("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function Ht(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&G(n,t._validators,e),W(e)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s],l=n+"."+s,f=t[s];t._type===yt.Object&&t._elements?Ht(t._elements,c,l):Ht(f,c,l)}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)Ht(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}P(Lt.getState(),Mt.getState()),Lt.subscribe((function(t){return P(t,Mt.getState())})),Mt.subscribe((function(t){return P(Lt.getState(),t)})),T(Lt.getState(),Mt.getState()),Lt.subscribe((function(t){return T(t,Mt.getState())})),Mt.subscribe((function(t){return T(Lt.getState(),t)})),k(Lt.getState(),Mt.getState()),Lt.subscribe((function(t){return k(t,Mt.getState())})),Mt.subscribe((function(t){return k(Lt.getState(),t)})),I(Lt.getState(),Nt.getState(),Mt.getState()),Lt.subscribe((function(t){I(t,Nt.getState(),Mt.getState())})),Nt.subscribe((function(t){I(Lt.getState(),t,Mt.getState())})),Mt.subscribe((function(t){I(Lt.getState(),Nt.getState(),t)}));var Vt=function(t,e,n){var r=mt(e);if(!t)return r;var o=!0,i=!1,a=void 0;try{for(var u,s=function(e,o){var i=o.value,a=r[i],u=t[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var s=u._devDefault||u._default;r[i]=n?s:u._default}var c=u._elements;if(a&&q(c))if(u._type===yt.Array&&Array.isArray(a)){var l=a.map((function(t){return Vt(c,t,n)}));r[i]=l}else if(u._type===yt.Object){var f=!0,h=!1,p=void 0;try{for(var d,v=Object.keys(a)[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){var y=d.value;a[y]=Vt(c,a[y],n)}}catch(t){h=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw p}}}}else if(W(u)){var g=r.hasOwnProperty(i)?a:{};W(g)&&(r[i]=Vt(u,g,n))}},c=Object.keys(t)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s(0,u)}catch(t){i=!0,a=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return r},zt={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:yt.Array,_default:[]}}},Gt=i(645),qt=function(t,e){return d((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},Wt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return d((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},Zt=Wt([]),Yt=function(t){return d((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Jt={inRange:qt,isUrl:Zt,isUrlWithTemplateParameters:Wt,oneOf:Yt}}(),a}())}}}))},674:()=>{System.register(["@openmrs/esm-globals"],(function(t,e){var n={};return{setters:[function(t){n.dispatchNotificationShown=t.dispatchNotificationShown}],execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:function(t){"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t}();var i={};return(0,o(968).s)(1),function(){"use strict";var t=function(t){var e=n(t);setTimeout((function(){throw e}))},e=function(){var e=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(e.stack),t(r)}},n=function(t){var e,n,r,o,i;if(n=t,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):(o=n,null!=(i=r)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i))return t;if(null===t)return Error("'null' was thrown as an error");if("object"==typeof t){try{e="Object thrown as error: ".concat(JSON.stringify(t))}catch(n){e="Object thrown as error with the following properties: ".concat(Object.keys(t))}return Error(e)}return void 0===t?Error("'undefined' was thrown as an error"):Error(t.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return e},reportError:function(){return t}});var r=o(728);window.onerror=function(){return(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}}(),i}())}}}))},103:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=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,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t){window.dispatchEvent(new CustomEvent(h,{detail:{online:t}}))},e=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(h,e),function(){return window.removeEventListener(h,e)}},n=function(t){return t({online:navigator.onLine}),e(t)},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(p,{detail:t}))},a=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(p,e),function(){return window.removeEventListener(p,e)}},u=function(t){window.dispatchEvent(new CustomEvent(d,{detail:t}))},s=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(d,e),function(){return window.removeEventListener(d,e)}},c=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(v,e),function(){return window.removeEventListener(v,e)}},l=function(t){window.openmrsBase=t.apiUrl,window.spaBase=t.spaPath,window.spaEnv=t.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(t){var e=window.getSelection();if(e){var n=document.createRange();n.selectNode(t),e.removeAllRanges(),e.addRange(n),document.execCommand("copy"),e.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return t},dispatchNotificationShown:function(){return u},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return e},subscribeNotificationShown:function(){return s},subscribePrecacheStaticDependencies:function(){return a},subscribeToastShown:function(){return c}});var h="openmrs:connectivity-changed",p="openmrs:precache-static-dependencies",d="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},991:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/access_time24px">\n <path id="icon/callend/access_time24px" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z" />\n </g>\n <title>Access time rounded</title>\n</svg>'},662:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Add rounded</title>\n</svg>\n'},865:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_back_24px">\n <path id="icon/navigation/arrow_back_24px_2" d="M18.7912 11.005H7.62124L12.5012 6.12499C12.8912 5.73499 12.8912 5.09499 12.5012 4.70499C12.3144 4.51774 12.0608 4.41251 11.7962 4.41251C11.5317 4.41251 11.2781 4.51774 11.0912 4.70499L4.50124 11.295C4.11124 11.685 4.11124 12.315 4.50124 12.705L11.0912 19.295C11.4812 19.685 12.1112 19.685 12.5012 19.295C12.8912 18.905 12.8912 18.275 12.5012 17.885L7.62124 13.005H18.7912C19.3412 13.005 19.7912 12.555 19.7912 12.005C19.7912 11.455 19.3412 11.005 18.7912 11.005Z"/>\n </g>\n <title>Arrow back rounded</title>\n</svg>\n'},646:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_downward_24px">\n <path id="icon/navigation/arrow_downward_24px_2" d="M11.005 5.20874V16.3787L6.12498 11.4987C5.73498 11.1087 5.09498 11.1087 4.70498 11.4987C4.31498 11.8887 4.31498 12.5187 4.70498 12.9087L11.295 19.4987C11.685 19.8887 12.315 19.8887 12.705 19.4987L19.295 12.9087C19.685 12.5187 19.685 11.8887 19.295 11.4987C19.1081 11.3115 18.8545 11.2063 18.59 11.2063C18.3255 11.2063 18.0718 11.3115 17.885 11.4987L13.005 16.3787V5.20874C13.005 4.65874 12.555 4.20874 12.005 4.20874C11.455 4.20874 11.005 4.65874 11.005 5.20874Z"/>\n </g>\n <title>Arrow downward rounded</title>\n</svg>\n'},509:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"/>\n <title>Arrow forward rounded</title>\n</svg>'},250:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_upward_24px">\n <path id="icon/navigation/arrow_upward_24px_2" d="M13 18.7913V7.62126L17.88 12.5013C18.27 12.8913 18.91 12.8913 19.3 12.5013C19.69 12.1113 19.69 11.4813 19.3 11.0913L12.71 4.50126C12.5231 4.314 12.2695 4.20877 12.005 4.20877C11.7405 4.20877 11.4868 4.314 11.3 4.50126L4.69997 11.0813C4.30997 11.4713 4.30997 12.1013 4.69997 12.4913C5.08997 12.8813 5.71997 12.8813 6.10997 12.4913L11 7.62126V18.7913C11 19.3413 11.45 19.7913 12 19.7913C12.55 19.7913 13 19.3413 13 18.7913Z"/>\n </g>\n <title>Arrow upward rounded </title>\n</svg>\n'},142:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/calendar24px">\n <path d="M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z"/>\n </g>\n <title>Calendar rounded</title>\n</svg>'},451:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n <title>Check circle</title>\n</svg>\n'},61:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_down_24px">\n <path id="icon/navigation/chevron_down_24px" d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/>\n </g>\n <title>Chevron down</title>\n</svg>\n'},76:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_left_24px">\n <path id="icon/navigation/chevron_left_24px_2" d="M15 6.70499C14.8132 6.51774 14.5595 6.41251 14.295 6.41251C14.0305 6.41251 13.7769 6.51774 13.59 6.70499L9.00002 11.295C8.61002 11.685 8.61002 12.315 9.00002 12.705L13.59 17.295C13.98 17.685 14.61 17.685 15 17.295C15.39 16.905 15.39 16.275 15 15.885L11.12 11.995L15 8.11499C15.39 7.72499 15.38 7.08499 15 6.70499Z"/>\n </g>\n <title>Chevron left</title>\n</svg>\n'},600:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_right_24px">\n <path id="icon/navigation/chevron_right_24px_2" d="M9.00002 6.71063C8.61002 7.10063 8.61002 7.73063 9.00002 8.12063L12.88 12.0006L9.00002 15.8806C8.61002 16.2706 8.61002 16.9006 9.00002 17.2906C9.39002 17.6806 10.02 17.6806 10.41 17.2906L15 12.7006C15.39 12.3106 15.39 11.6806 15 11.2906L10.41 6.70063C10.03 6.32063 9.39002 6.32063 9.00002 6.71063Z"/>\n </g>\n <title>Chevron right</title>\n</svg>\n'},40:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_up_24px">\n <path d="M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"/>\n </g>\n <title>Chevron up</title>\n</svg>\n'},714:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>\n <title>Close icon</title>\n</svg>'},752:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" />\n <title>Download icon</title>\n</svg>'},862:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n<g id="icon/navigation/home_24px">\n <path id="icon/navigation/home_24px" d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"/>\n</g>\n<title>Home rounded</title>\n</svg>'},601:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/important_notification_24px_rounded">\n <path d="M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"/>\n </g>\n <title>Important notification</title>\n</svg>\n'},879:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">\n <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>\n <path d="M0 0h24v24H0z" class="omrs-icon-location"/>\n <title>Location icon</title>\n</svg>'},739:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/menu_24px">\n <path id="icon/navigation/menu_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M4 8C3.44995 8 3 7.54999 3 7C3 6.45001 3.44995 6 4 6H20C20.55 6 21 6.45001 21 7C21 7.54999 20.55 8 20 8H4ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.44995 11 3 11.45 3 12C3 12.55 3.44995 13 4 13ZM4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.44995 16 3 16.45 3 17C3 17.55 3.44995 18 4 18Z"/>\n </g>\n <title>Menu rounded</title>\n</svg>\n'},524:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Remove rounded</title>\n</svg>\n'},787:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/search_24px">\n <path id="icon/action/search_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M15.1865 14.4716H15.9765L20.2165 18.7316C20.6266 19.1416 20.6266 19.8116 20.2165 20.2216C19.8065 20.6316 19.1366 20.6316 18.7265 20.2216L14.4765 15.9716V15.1816L14.2065 14.9016C12.8065 16.1016 10.8966 16.7216 8.86655 16.3816C6.08652 15.9116 3.86655 13.5916 3.52658 10.7916C3.00656 6.56158 6.5665 3.00158 10.7966 3.52157C13.5965 3.86157 15.9166 6.08157 16.3866 8.86157C16.7265 10.8916 16.1065 12.8016 14.9066 14.2016L15.1865 14.4716ZM5.47653 9.97155C5.47653 12.4615 7.48654 14.4716 9.97653 14.4716C12.4665 14.4716 14.4765 12.4615 14.4765 9.97155C14.4765 7.48156 12.4665 5.47155 9.97653 5.47155C7.48654 5.47155 5.47653 7.48156 5.47653 9.97155Z"/>\n </g>\n <title>Search rounded</title>\n</svg>\n'},592:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/supervised_user_circle_24px">\n <path id="icon/action/supervised_user_circle_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47998 2 2 6.48001 2 12C2 17.52 6.47998 22 12 22C17.52 22 22 17.52 22 12C22 6.48001 17.52 2 12 2ZM15.61 8.34C16.6801 8.34 17.54 9.19998 17.54 10.27C17.54 11.34 16.6801 12.2 15.61 12.2C14.54 12.2 13.6801 11.34 13.6801 10.27C13.67 9.19998 14.54 8.34 15.61 8.34ZM11.97 9.12C11.97 7.82001 10.91 6.76001 9.60999 6.76001C8.30005 6.76001 7.25 7.81 7.25 9.12C7.25 10.42 8.31006 11.48 9.60999 11.48C10.91 11.48 11.97 10.42 11.97 9.12ZM9.60999 15.89V19.64C7.20996 18.89 5.30994 17.04 4.46997 14.68C5.52002 13.56 8.14001 12.99 9.60999 12.99C10.14 12.99 10.8099 13.07 11.51 13.21C9.87 14.08 9.60999 15.23 9.60999 15.89ZM11.21 19.96C11.47 19.99 11.73 20 12 20C15.39 20 18.2799 17.88 19.45 14.91C18.5299 14.15 16.6799 13.76 15.61 13.76C14.1499 13.76 11.21 14.47 11.21 15.89V19.96Z"/>\n </g>\n <title>Supervised user circle rounded</title>\n</svg>\n'},141:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path id="icon/action/visibility_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 4.5C7 4.5 2.72998 7.60999 1 12C2.72998 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.60999 17 4.5 12 4.5ZM12 17C9.23999 17 7 14.76 7 12C7 9.23999 9.23999 7 12 7C14.76 7 17 9.23999 17 12C17 14.76 14.76 17 12 17ZM9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12Z"/>\n </g>\n <title>Visibility rounded</title>\n</svg>\n'},647:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path d="M15.85 3.85L17.3 5.3l-2.18 2.16c-.39.39-.39 1.03 0 1.42.39.39 1.03.39 1.42 0L18.7 6.7l1.45 1.45c.31.31.85.09.85-.36V3.5c0-.28-.22-.5-.5-.5h-4.29c-.45 0-.67.54-.36.85zm-12 4.3L5.3 6.7l2.16 2.18c.39.39 1.03.39 1.42 0 .39-.39.39-1.03 0-1.42L6.7 5.3l1.45-1.45c.31-.31.09-.85-.36-.85H3.5c-.28 0-.5.22-.5.5v4.29c0 .45.54.67.85.36zm4.3 12L6.7 18.7l2.18-2.16c.39-.39.39-1.03 0-1.42-.39-.39-1.03-.39-1.42 0L5.3 17.3l-1.45-1.45c-.31-.31-.85-.09-.85.36v4.29c0 .28.22.5.5.5h4.29c.45 0 .67-.54.36-.85zm12-4.3L18.7 17.3l-2.16-2.18c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.03 0 1.42l2.18 2.16-1.45 1.45c-.31.31-.09.85.36.85h4.29c.28 0 .5-.22.5-.5v-4.29c0-.45-.54-.67-.85-.36z" />\n </g>\n <title>\n Zoom Out \n </title>\n</svg>'},885:t=>{"use strict";t.exports='<svg viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.29 40.3278C45.3275 35.2904 52.2878 32.1739 59.9776 32.1739C67.6466 32.1739 74.5911 35.2765 79.6245 40.29L79.6454 21.7502C73.7513 18.7143 67.0622 17 59.9776 17C52.8891 17 46.1652 18.9309 40.2692 21.9679L40.29 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6719 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6868 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.507L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M185.885 90.9982H187.309L190.043 97.3236H190.066L192.824 90.9982H194.215V99.0676H193.258V92.2971H193.234L190.34 99.0676H189.758L186.864 92.2971H186.842V99.0676H185.885V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M198.386 90.9982H203.457V91.8867H199.343V94.4168H203.184V95.3062H199.343V98.1782H203.663V99.0676H198.386V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M207.891 98.1782H209.713C211.561 98.1782 212.963 97.2431 212.963 95.0319C212.963 92.8218 211.561 91.8867 209.713 91.8867H207.891V98.1782ZM206.934 90.9982H210.034C211.617 90.9982 213.987 92.0586 213.987 95.0319C213.987 98.0083 211.617 99.0676 210.034 99.0676H206.934V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.007 99.0676H217.965V90.9982H217.007V99.0676Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.105 92.6628C226.627 92.0119 225.863 91.6819 225.088 91.6819C223.288 91.6819 222.011 93.266 222.011 95.0319C222.011 96.9012 223.277 98.3839 225.088 98.3839C226.068 98.3839 226.855 97.9844 227.425 97.255L228.143 97.8582C227.425 98.8281 226.377 99.2724 225.088 99.2724C222.774 99.2724 220.986 97.4826 220.986 95.0319C220.986 92.6628 222.695 90.7935 225.088 90.7935C226.183 90.7935 227.254 91.1701 227.937 92.0586L227.105 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M233.557 92.2295H233.533L231.858 96.1947H235.152L233.557 92.2295ZM233.123 90.9982H234.023L237.453 99.0676H236.336L235.516 97.0841H231.482L230.65 99.0676H229.568L233.123 90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M240.006 90.9982H240.964V98.1782H244.656V99.0676H240.006V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M252.793 94.5539H253.648C254.708 94.5539 256.087 94.5539 256.087 93.2203C256.087 92.0586 255.073 91.8867 254.139 91.8867H252.793V94.5539ZM251.836 90.9982H253.899C255.46 90.9982 257.113 91.2258 257.113 93.2203C257.113 94.3939 256.349 95.1582 255.095 95.3519L257.386 99.0676H256.213L254.023 95.4434H252.793V99.0676H251.836V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M260.51 90.9982H265.58V91.8867H261.468V94.4168H265.308V95.3062H261.468V98.1782H265.786V99.0676H260.51V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M274.402 92.6628C273.923 92.0119 273.16 91.6819 272.384 91.6819C270.584 91.6819 269.307 93.266 269.307 95.0319C269.307 96.9012 270.573 98.3839 272.384 98.3839C273.364 98.3839 274.151 97.9844 274.72 97.255L275.438 97.8582C274.72 98.8281 273.672 99.2724 272.384 99.2724C270.071 99.2724 268.282 97.4826 268.282 95.0319C268.282 92.6628 269.991 90.7935 272.384 90.7935C273.478 90.7935 274.55 91.1701 275.234 92.0586L274.402 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M284.739 95.0319C284.739 93.1746 283.439 91.6819 281.548 91.6819C279.656 91.6819 278.357 93.1746 278.357 95.0319C278.357 96.8903 279.656 98.3839 281.548 98.3839C283.439 98.3839 284.739 96.8903 284.739 95.0319ZM277.33 95.0319C277.33 92.5932 279.097 90.7935 281.548 90.7935C283.998 90.7935 285.765 92.5932 285.765 95.0319C285.765 97.4726 283.998 99.2724 281.548 99.2724C279.097 99.2724 277.33 97.4726 277.33 95.0319Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M289.514 94.5539H290.369C291.428 94.5539 292.807 94.5539 292.807 93.2203C292.807 92.0586 291.793 91.8867 290.859 91.8867H289.514V94.5539ZM288.556 90.9982H290.618C292.181 90.9982 293.833 91.2258 293.833 93.2203C293.833 94.3939 293.07 95.1582 291.817 95.3519L294.106 99.0676H292.933L290.744 95.4434H289.514V99.0676H288.556V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M297.81 98.1782H299.635C301.48 98.1782 302.881 97.2431 302.881 95.0319C302.881 92.8218 301.48 91.8867 299.635 91.8867H297.81V98.1782ZM296.853 90.9982H299.953C301.538 90.9982 303.909 92.0586 303.909 95.0319C303.909 98.0083 301.538 99.0676 299.953 99.0676H296.853V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M315.407 92.4223C315.089 91.9095 314.517 91.6819 313.937 91.6819C313.093 91.6819 312.216 92.0814 312.216 93.0384C312.216 93.7788 312.626 94.1097 313.914 94.5202C315.168 94.9187 316.331 95.3291 316.331 96.9132C316.331 98.5201 314.951 99.2724 313.493 99.2724C312.558 99.2724 311.555 98.9643 311.007 98.1554L311.828 97.4826C312.17 98.0759 312.854 98.3839 313.549 98.3839C314.37 98.3839 315.303 97.9049 315.303 96.9807C315.303 95.9899 314.633 95.818 313.196 95.341C312.057 94.9644 311.19 94.4625 311.19 93.1189C311.19 91.5677 312.523 90.7935 313.937 90.7935C314.837 90.7935 315.601 91.0439 316.193 91.7386L315.407 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M320.844 95.5914L317.835 90.9982H319.054L321.323 94.6454L323.658 90.9982H324.81L321.8 95.5914V99.0676H320.844V95.5914Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M330.565 92.4223C330.245 91.9095 329.675 91.6819 329.094 91.6819C328.251 91.6819 327.374 92.0814 327.374 93.0384C327.374 93.7788 327.784 94.1097 329.072 94.5202C330.326 94.9187 331.487 95.3291 331.487 96.9132C331.487 98.5201 330.109 99.2724 328.65 99.2724C327.716 99.2724 326.713 98.9643 326.165 98.1554L326.986 97.4826C327.328 98.0759 328.012 98.3839 328.707 98.3839C329.528 98.3839 330.461 97.9049 330.461 96.9807C330.461 95.9899 329.79 95.818 328.354 95.341C327.215 94.9644 326.348 94.4625 326.348 93.1189C326.348 91.5677 327.681 90.7935 329.094 90.7935C329.995 90.7935 330.759 91.0439 331.351 91.7386L330.565 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M339.283 91.8867H336.617V99.0676H335.659V91.8867H332.992V90.9982H339.283V91.8867Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M341.665 90.9982H346.736V91.8867H342.623V94.4168H346.463V95.3062H342.623V98.1782H346.942V99.0676H341.665V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M349.905 90.9982H351.329L354.064 97.3236H354.087L356.845 90.9982H358.236V99.0676H357.278V92.2971H357.255L354.361 99.0676H353.779L350.884 92.2971H350.863V99.0676H349.905V90.9982Z" fill="var(--logo-black)"/>\n</svg>\n'},575:t=>{"use strict";t.exports='<svg id="omrs-logo-icon" width="121" height="118" viewBox="0 0 121 118" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.436 39.474C45.505 34.405 52.509 31.269 60.247 31.269C67.964 31.269 74.952 34.391 80.017 39.436L80.038 20.78C74.107 17.725 67.376 16 60.247 16C53.114 16 46.348 17.943 40.415 20.999L40.436 39.474Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.038 79.064C74.969 84.134 67.968 87.269 60.23 87.269C52.513 87.269 45.525 84.148 40.456 79.102L40.436 97.759C46.37 100.813 53.098 102.539 60.23 102.539C67.363 102.539 74.093 100.813 80.024 97.758L80.038 79.064Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.474 79.089C35.405 74.02 32.269 67.019 32.269 59.281C32.269 51.564 35.39 44.577 40.436 39.508L21.779 39.488C18.725 45.421 17 52.148 17 59.281C17 66.414 18.725 73.144 21.782 79.076L40.474 79.089Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.027 39.435C85.096 44.503 88.232 51.508 88.232 59.246C88.232 66.963 85.111 73.951 80.064 79.015L98.722 79.036C101.776 73.105 103.501 66.375 103.501 59.246C103.501 52.112 101.776 45.381 98.72 39.448L80.027 39.435Z" fill="var(--logo-green)"/>\n</svg>\n'},93:t=>{"use strict";t.exports='<svg id="omrs-logo-partial" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n</svg>\n'},839:t=>{"use strict";t.exports='<svg id="omrs-logo-white" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-white)"/>\n</svg>\n'},45:t=>{"use strict";t.exports=i},740:t=>{"use strict";t.exports=a},685:t=>{"use strict";t.exports=u},64:t=>{"use strict";t.exports=s},954:t=>{"use strict";t.exports=c},493:t=>{"use strict";t.exports=l},281:t=>{"use strict";t.exports=f},792:t=>{"use strict";t.exports=h}},p={};function d(t){var e=p[t];if(void 0!==e)return e.exports;var n=p[t]={id:t,loaded:!1,exports:{}};return r[t].call(n.exports,n,n.exports,d),n.loaded=!0,n.exports}d.y=o,d.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return d.d(e,{a:e}),e},d.d=(t,e)=>{for(var n in e)d.o(e,n)&&!d.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),d.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),d.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},d.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;d.g.importScripts&&(t=d.g.location+"");var e=d.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=t})();var v={};return(0,d(584).s)(1),(()=>{"use strict";var r=d(885),o=d(93),i=d(575),a=d(839),u=document.createElement("div"),s=function(){document.body.appendChild(u)};function c(t,e){var n=(new DOMParser).parseFromString(e,"text/html").querySelector("svg");n&&(n.id=t,u.appendChild(n))}u.id="omrs-svgs-container",u.style.display="none","complete"===document.readyState?s():window.addEventListener("load",s);var l=d(141),f=d(739),h=d(787),p=d(865),v=d(509),y=d(646),g=d(250),m=d(76),b=d(600),w=d(40),S=d(61),x=d(592),E=d(862),O=d(714),j=d(601),A=d(142),C=d(991),P=d(662),k=d(524),T=d(451),I=d(647),R=d(879),L=d(752),D=d(78),M=d(954),N=(d(493),d(792));new N.Subject,new N.Subject;var $=d(45),B=d(685);(0,B.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,d(740),(0,B.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),d(281),d(980);const U="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var F="object"==typeof self&&self&&self.Object===Object&&self;const K=U||F||Function("return this")(),H=K.Symbol;var V=Object.prototype,z=V.hasOwnProperty,G=V.toString,q=H?H.toStringTag:void 0,W=Object.prototype.toString,Z=H?H.toStringTag:void 0;const Y=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Z&&Z in Object(t)?function(t){var e=z.call(t,q),n=t[q];try{t[q]=void 0;var r=!0}catch(t){}var o=G.call(t);return r&&(e?t[q]=n:delete t[q]),o}(t):function(t){return W.call(t)}(t)},J=function(t,e){return function(n){return t(e(n))}};J(Object.getPrototypeOf,Object);const X=function(t){return null!=t&&"object"==typeof t};var Q,tt,et,nt,rt=Function.prototype,ot=Object.prototype,it=rt.toString;function at(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function ut(t,e,n){return ut=at()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&ct(o,n.prototype),o},ut.apply(null,arguments)}function st(t){return st=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},st(t)}function ct(t,e){return ct=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ct(t,e)}function lt(t){var e="function"==typeof Map?new Map:void 0;return lt=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return ut(t,arguments,st(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ct(n,t)},lt(t)}ot.hasOwnProperty,it.call(Object),lt(Error),d(674),(0,B.createGlobalStore)("session",{loaded:!1,session:null}),new N.BehaviorSubject(null),function(t){t.NEWVISIT="startVisit",t.EDITVISIT="editVisit",t.LOADING="loadingVisit"}(Q||(Q={})),function(t){t.NOTSTARTED="notStarted",t.ONGOING="ongoing"}(tt||(tt={})),d(66),(nt=et||(et={})).Array="Array",nt.Boolean="Boolean",nt.ConceptUuid="ConceptUuid",nt.Number="Number",nt.Object="Object",nt.String="String",nt.UUID="UUID",nt.PersonAttributeTypeUuid="PersonAttributeTypeUuid",nt.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var ft=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},ht=Object.freeze({__proto__:null,get start(){return We},get ensureJQuerySupport(){return Se},get setBootstrapMaxTime(){return ne},get setMountMaxTime(){return re},get setUnmountMaxTime(){return oe},get setUnloadMaxTime(){return ie},get registerApplication(){return Le},get unregisterApplication(){return Me},get getMountedApps(){return Te},get getAppStatus(){return Re},get unloadApplication(){return Ne},get checkActivityFunctions(){return De},get getAppNames(){return Ie},get pathToActiveWhen(){return Ue},get navigateToUrl(){return pe},get triggerAppChange(){return Ve},get addErrorHandler(){return bt},get removeErrorHandler(){return wt},get mountRootParcel(){return Jt},get NOT_LOADED(){return xt},get LOADING_SOURCE_CODE(){return Et},get NOT_BOOTSTRAPPED(){return Ot},get BOOTSTRAPPING(){return jt},get NOT_MOUNTED(){return At},get MOUNTING(){return Ct},get UPDATING(){return kt},get LOAD_ERROR(){return It},get MOUNTED(){return Pt},get UNMOUNTING(){return Tt},get SKIP_BECAUSE_BROKEN(){return Rt}});function pt(t){return(pt="function"==typeof Symbol&&"symbol"==ft(Symbol.iterator)?function(t){return void 0===t?"undefined":ft(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":ft(t)})(t)}function dt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vt=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==d.g?d.g:"undefined"!=typeof self?self:{}).CustomEvent,yt=function(){try{var t=new vt("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?vt:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,e){var n=document.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n}:function(t,e){var n=document.createEventObject();return n.type=t,e?(n.bubbles=Boolean(e.bubbles),n.cancelable=Boolean(e.cancelable),n.detail=e.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},gt=[];function mt(t,e,n){var r=St(t,e,n);gt.length?gt.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function bt(t){if("function"!=typeof t)throw Error(_t(28,!1));gt.push(t)}function wt(t){if("function"!=typeof t)throw Error(_t(29,!1));var e=!1;return gt=gt.filter((function(n){var r=n===t;return e=e||r,!r})),e}function _t(t,e){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(t,": ").concat(e?e+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function St(t,e,n){var r,o,i,a="".concat($t(e)," '").concat(Mt(e),"' died in status ").concat(e.status,": ");if(o=t,null!=(i=Error)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i){try{t.message=a+t.message}catch(t){}r=t}else{console.warn(_t(30,!1,e.status,Mt(e)));try{r=Error(a+JSON.stringify(t))}catch(e){r=t}}return r.appOrParcelName=Mt(e),e.status=n,r}var xt="NOT_LOADED",Et="LOADING_SOURCE_CODE",Ot="NOT_BOOTSTRAPPED",jt="BOOTSTRAPPING",At="NOT_MOUNTED",Ct="MOUNTING",Pt="MOUNTED",kt="UPDATING",Tt="UNMOUNTING",It="LOAD_ERROR",Rt="SKIP_BECAUSE_BROKEN";function Lt(t){return t.status===Pt}function Dt(t){try{return t.activeWhen(window.location)}catch(e){return mt(e,t,Rt),!1}}function Mt(t){return t.name}function Nt(t){return Boolean(t.unmountThisParcel)}function $t(t){return Nt(t)?"parcel":"application"}function Bt(){for(var t=arguments.length-1;t>0;t--)for(var e in arguments[t])"__proto__"!==e&&(arguments[t-1][e]=arguments[t][e]);return arguments[0]}function Ut(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n];return null}function Ft(t){return t&&("function"==typeof t||(e=t,Array.isArray(e)&&!Ut(e,(function(t){return"function"!=typeof t}))));var e}function Kt(t,e){var n=t[e]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=$t(t),o=Mt(t);return function(t){return n.reduce((function(n,i,a){return n.then((function(){var n=i(t);return Ht(n)?n:Promise.reject(_t(15,!1,r,o,e,a))}))}),Promise.resolve())}}function Ht(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function Vt(t,e){var n=function(){return t.status=At,t};return Promise.resolve().then((function(){return t.status!==Ot?t:(t.status=jt,t.bootstrap?ae(t,"bootstrap").then(n).catch((function(n){if(e)throw St(n,t,Rt);return mt(n,t,Rt),t})):Promise.resolve().then(n))}))}function zt(t,e){return Promise.resolve().then((function(){var n=function(){return ae(t,"unmount").then((function(){t.status=At})).catch((function(n){if(e)throw St(n,t,Rt);mt(n,t,Rt)}))};if(t.status!==Pt)return t;t.status=Tt;var r=Object.keys(t.parcels).map((function(e){return t.parcels[e].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(e)throw St(n,t,Rt);mt(n,t,Rt)}))})).then((function(){return t}))}))}var Gt=!1,qt=!1;function Wt(t,e){return Promise.resolve().then((function(){return t.status!==At?t:(Gt||(window.dispatchEvent(new yt("single-spa:before-first-mount")),Gt=!0),ae(t,"mount").then((function(){return t.status=Pt,qt||(window.dispatchEvent(new yt("single-spa:first-mount")),qt=!0),t})).catch((function(n){var r=function(){if(e)throw St(n,t,Rt);return mt(n,t,Rt),t};return t.status=Pt,zt(t,!0).then(r,r)})))}))}var Zt=0,Yt={parcels:{}};function Jt(){return Xt.apply(Yt,arguments)}function Xt(t,e){var n=this;if(!t||"object"!==pt(t)&&"function"!=typeof t)throw Error(_t(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(_t(3,!1,pt(t.name)));if("object"!==pt(e))throw Error(_t(4,!1,name,pt(e)));if(!e.domElement)throw Error(_t(5,!1,name));var r,o=Zt++,i="function"==typeof t,a=i?t:function(){return Promise.resolve(t)},u={id:o,parcels:{},status:i?Et:Ot,customProps:e,parentName:Mt(n),unmountThisParcel:function(){return h.then((function(){if(u.status!==Pt)throw Error(_t(6,!1,name,u.status));return zt(u,!0)})).then((function(t){return u.parentName&&delete n.parcels[u.id],t})).then((function(t){return c(t),t})).catch((function(t){throw u.status=Rt,l(t),t}))}};n.parcels[o]=u;var s=a();if(!s||"function"!=typeof s.then)throw Error(_t(7,!1));var c,l,f=(s=s.then((function(t){if(!t)throw Error(_t(8,!1));var e=t.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!Ft(t.bootstrap))throw Error(_t(9,!1,e));if(!Ft(t.mount))throw Error(_t(10,!1,e));if(!Ft(t.unmount))throw Error(_t(11,!1,e));if(t.update&&!Ft(t.update))throw Error(_t(12,!1,e));var n=Kt(t,"bootstrap"),i=Kt(t,"mount"),a=Kt(t,"unmount");u.status=Ot,u.name=e,u.bootstrap=n,u.mount=i,u.unmount=a,u.timeouts=ue(t.timeouts),t.update&&(u.update=Kt(t,"update"),r.update=function(t){return u.customProps=t,Qt((e=u,Promise.resolve().then((function(){if(e.status!==Pt)throw Error(_t(32,!1,Mt(e)));return e.status=kt,ae(e,"update").then((function(){return e.status=Pt,e})).catch((function(t){throw St(t,e,Rt)}))}))));var e})}))).then((function(){return Vt(u,!0)})),h=f.then((function(){return Wt(u,!0)})),p=new Promise((function(t,e){c=t,l=e}));return r={mount:function(){return Qt(Promise.resolve().then((function(){if(u.status!==At)throw Error(_t(13,!1,name,u.status));return n.parcels[o]=u,Wt(u)})))},unmount:function(){return Qt(u.unmountThisParcel())},getStatus:function(){return u.status},loadPromise:Qt(s),bootstrapPromise:Qt(f),mountPromise:Qt(h),unmountPromise:Qt(p)}}function Qt(t){return t.then((function(){return null}))}function te(t){var e=Mt(t),n="function"==typeof t.customProps?t.customProps(e,window.location):t.customProps;("object"!==pt(n)||null===n||Array.isArray(n))&&(n={},console.warn(_t(40,!1),e,n));var r=Bt({},n,{name:e,mountParcel:Xt.bind(t),singleSpa:ht});return Nt(t)&&(r.unmountSelf=t.unmountThisParcel),r}var ee={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 ne(t,e,n){if("number"!=typeof t||t<=0)throw Error(_t(16,!1));ee.bootstrap={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function re(t,e,n){if("number"!=typeof t||t<=0)throw Error(_t(17,!1));ee.mount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function oe(t,e,n){if("number"!=typeof t||t<=0)throw Error(_t(18,!1));ee.unmount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function ie(t,e,n){if("number"!=typeof t||t<=0)throw Error(_t(19,!1));ee.unload={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function ae(t,e){var n=t.timeouts[e],r=n.warningMillis,o=$t(t);return new Promise((function(i,a){var u=!1,s=!1;t[e](te(t)).then((function(t){u=!0,i(t)})).catch((function(t){u=!0,a(t)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=_t(31,!1,e,o,Mt(t),n.millis);function l(t){if(!u)if(!0===t)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){var e=t,o=e*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(e+1)}),r)}}}))}function ue(t){var e={};for(var n in ee)e[n]=Bt({},ee[n],t&&t[n]||{});return e}function se(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==xt&&t.status!==It?t:(t.status=Et,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(te(t));if(!Ht(r))throw n=!0,Error(_t(33,!1,Mt(t)));return r.then((function(n){var r;t.loadErrorTime=null,"object"!==pt(e=n)&&(r=34),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!Ft(e.bootstrap)&&(r=35),Ft(e.mount)||(r=36),Ft(e.unmount)||(r=37);var o=$t(e);if(r){var i;try{i=JSON.stringify(e)}catch(t){}return console.error(_t(r,!1,o,Mt(t),i),e),mt(void 0,t,Rt),t}return e.devtools&&e.devtools.overlays&&(t.devtools.overlays=Bt({},t.devtools.overlays,e.devtools.overlays)),t.status=Ot,t.bootstrap=Kt(e,"bootstrap"),t.mount=Kt(e,"mount"),t.unmount=Kt(e,"unmount"),t.unload=Kt(e,"unload"),t.timeouts=ue(e.timeouts),delete t.loadPromise,t}))})).catch((function(e){var r;return delete t.loadPromise,n?r=Rt:(r=It,t.loadErrorTime=(new Date).getTime()),mt(e,t,r),t})));var e,n}))}var ce,le="undefined"!=typeof window,fe={hashchange:[],popstate:[]},he=["hashchange","popstate"];function pe(t){var e;if("string"==typeof t)e=t;else if(this&&this.href)e=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(_t(14,!1));e=t.currentTarget.href,t.preventDefault()}var n=we(window.location.href),r=we(e);0===e.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=e:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,e)}function de(t){var e=this;if(t){var n=t[0].type;he.indexOf(n)>=0&&fe[n].forEach((function(n){try{n.apply(e,t)}catch(t){setTimeout((function(){throw t}))}}))}}function ve(){ze([],arguments)}function ye(t,e){return function(){var n=window.location.href,r=t.apply(this,arguments),o=window.location.href;return ce&&n===o||(Ze()?window.dispatchEvent(ge(window.history.state,e)):ze([])),r}}function ge(t,e){var n;try{n=new PopStateEvent("popstate",{state:t})}catch(e){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return n.singleSpa=!0,n.singleSpaTrigger=e,n}if(le){window.addEventListener("hashchange",ve),window.addEventListener("popstate",ve);var me=window.addEventListener,be=window.removeEventListener;window.addEventListener=function(t,e){if(!("function"==typeof e&&he.indexOf(t)>=0)||Ut(fe[t],(function(t){return t===e})))return me.apply(this,arguments);fe[t].push(e)},window.removeEventListener=function(t,e){if(!("function"==typeof e&&he.indexOf(t)>=0))return be.apply(this,arguments);fe[t]=fe[t].filter((function(t){return t!==e}))},window.history.pushState=ye(window.history.pushState,"pushState"),window.history.replaceState=ye(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(_t(41,!1)):window.singleSpaNavigate=pe}function we(t){var e=document.createElement("a");return e.href=t,e}var _e=!1;function Se(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!_e){var e=t.fn.on,n=t.fn.off;t.fn.on=function(t,n){return xe.call(this,e,window.addEventListener,t,n,arguments)},t.fn.off=function(t,e){return xe.call(this,n,window.removeEventListener,t,e,arguments)},_e=!0}}function xe(t,e,n,r,o){return"string"!=typeof n?t.apply(this,o):(n.split(/\s+/).forEach((function(t){he.indexOf(t)>=0&&(e(t,r),n=n.replace(t,""))})),""===n.trim()?this:t.apply(this,o))}var Ee={};function Oe(t){return Promise.resolve().then((function(){var e=Ee[Mt(t)];if(!e)return t;if(t.status===xt)return je(t,e),t;if("UNLOADING"===t.status)return e.promise.then((function(){return t}));if(t.status!==At&&t.status!==It)return t;var n=t.status===It?Promise.resolve():ae(t,"unload");return t.status="UNLOADING",n.then((function(){return je(t,e),t})).catch((function(n){return function(t,e,n){delete Ee[Mt(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,mt(n,t,Rt),e.reject(n)}(t,e,n),t}))}))}function je(t,e){delete Ee[Mt(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=xt,e.resolve()}function Ae(t,e,n,r){Ee[Mt(t)]={app:t,resolve:n,reject:r},Object.defineProperty(Ee[Mt(t)],"promise",{get:e})}function Ce(t){return Ee[t]}var Pe=[];function ke(){var t=[],e=[],n=[],r=[],o=(new Date).getTime();return Pe.forEach((function(i){var a=i.status!==Rt&&Dt(i);switch(i.status){case It:a&&o-i.loadErrorTime>=200&&n.push(i);break;case xt:case Et:a&&n.push(i);break;case Ot:case At:!a&&Ce(Mt(i))?t.push(i):a&&r.push(i);break;case Pt:a||e.push(i)}})),{appsToUnload:t,appsToUnmount:e,appsToLoad:n,appsToMount:r}}function Te(){return Pe.filter(Lt).map(Mt)}function Ie(){return Pe.map(Mt)}function Re(t){var e=Ut(Pe,(function(e){return Mt(e)===t}));return e?e.status:null}function Le(t,e,n,r){var o=function(t,e,n,r){var o,i,a,u={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===pt(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(_t(39,!1));var e=["name","app","activeWhen","customProps"],n=Object.keys(t).reduce((function(t,n){return e.indexOf(n)>=0?t:t.concat(n)}),[]);if(0!==n.length)throw Error(_t(38,!1,e.join(", "),n.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(_t(20,!1));if("object"!==pt(t.app)&&"function"!=typeof t.app)throw Error(_t(20,!1));var r=function(t){return"string"==typeof t||"function"==typeof t};if(!(r(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(r)))throw Error(_t(24,!1));if(!Be(t.customProps))throw Error(_t(22,!1))}(t),u.name=t.name,u.loadApp=t.app,u.activeWhen=t.activeWhen,u.customProps=t.customProps):(function(t,e,n,r){if("string"!=typeof t||0===t.length)throw Error(_t(20,!1));if(!e)throw Error(_t(23,!1));if("function"!=typeof n)throw Error(_t(24,!1));if(!Be(r))throw Error(_t(22,!1))}(t,e,n,r),u.name=t,u.loadApp=e,u.activeWhen=n,u.customProps=r),u.loadApp="function"!=typeof(o=u.loadApp)?function(){return Promise.resolve(o)}:o,u.customProps=u.customProps||{},u.activeWhen=(i=u.activeWhen,a=(a=Array.isArray(i)?i:[i]).map((function(t){return"function"==typeof t?t:Ue(t)})),function(t){return a.some((function(e){return e(t)}))}),u}(t,e,n,r);if(-1!==Ie().indexOf(o.name))throw Error(_t(21,!1,o.name));Pe.push(Bt({loadErrorTime:null,status:xt,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),le&&(Se(),ze())}function De(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Pe.filter((function(e){return e.activeWhen(t)})).map(Mt)}function Me(t){if(0===Pe.filter((function(e){return Mt(e)===t})).length)throw Error(_t(25,!1,t));return Ne(t).then((function(){var e=Pe.map(Mt).indexOf(t);Pe.splice(e,1)}))}function Ne(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(_t(26,!1));var n=Ut(Pe,(function(e){return Mt(e)===t}));if(!n)throw Error(_t(27,!1,t));var r,o=Ce(Mt(n));if(e&&e.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,e){Ae(n,(function(){return i}),t,e)}));return i}return o?(r=o.promise,$e(n,o.resolve,o.reject)):r=new Promise((function(t,e){Ae(n,(function(){return r}),t,e),$e(n,t,e)})),r}function $e(t,e,n){zt(t).then(Oe).then((function(){e(),setTimeout((function(){ze()}))})).catch(n)}function Be(t){return!t||"function"==typeof t||"object"===pt(t)&&null!==t&&!Array.isArray(t)}function Ue(t,e){var n=function(t,e){var n=function(n){var a=t.slice(r,n).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=o?"[^/]+/?":a,n===t.length)if(o)e&&(i+="$");else{var u=e?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(u,"$"):"".concat(i,"(/").concat(u,")?(#.*)?$")}o=!o,r=n},r=0,o=!1,i="^";"/"!==t[0]&&(t="/"+t);for(var a=0;a<t.length;a++){var u=t[a];(!o&&":"===u||o&&"/"===u)&&n(a)}return n(t.length),new RegExp(i,"i")}(t,e);return function(t){var e=t.origin;e||(e="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(e,"").replace(t.search,"").split("?")[0];return n.test(r)}}var Fe=!1,Ke=[],He=le&&window.location.href;function Ve(){return ze()}function ze(){var t=function(){d=!0},e=function(){return Promise.resolve().then((function(){var t=h.map(se);return Promise.all(t).then(o).then((function(){return[]})).catch((function(t){throw o(),t}))}))},n=function(){return Promise.resolve().then((function(){if(window.dispatchEvent(new yt(0===s.length?"single-spa:before-no-app-change":"single-spa:before-app-change",i(!0))),window.dispatchEvent(new yt("single-spa:before-routing-event",i(!0,{cancelNavigation:t}))),d)return window.dispatchEvent(new yt("single-spa:before-mount-routing-event",i(!0))),r(),void pe(v);var e=l.map(Oe),n=f.map(zt).map((function(t){return t.then(Oe)})).concat(e),u=Promise.all(n);u.then((function(){window.dispatchEvent(new yt("single-spa:before-mount-routing-event",i(!0)))}));var c=h.map((function(t){return se(t).then((function(t){return Ge(t,u)}))})),y=p.filter((function(t){return h.indexOf(t)<0})).map((function(t){return Ge(t,u)}));return u.catch((function(t){throw o(),t})).then((function(){return o(),Promise.all(c.concat(y)).catch((function(t){throw a.forEach((function(e){return e.reject(t)})),t})).then(r)}))}))},r=function(){var t=Te();a.forEach((function(e){return e.resolve(t)}));try{var e=0===s.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new yt(e,i())),window.dispatchEvent(new yt("single-spa:routing-event",i()))}catch(t){setTimeout((function(){throw t}))}if(Fe=!1,Ke.length>0){var n=Ke;Ke=[],ze(n)}return t},o=function(){a.forEach((function(t){de(t.eventArguments)})),de(u)},i=function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,r={},o=(dt(t={},Pt,[]),dt(t,At,[]),dt(t,xt,[]),dt(t,Rt,[]),t);e?(h.concat(p).forEach((function(t,e){a(t,Pt)})),l.forEach((function(t){a(t,xt)})),f.forEach((function(t){a(t,At)}))):s.forEach((function(t){a(t)}));var i={detail:{newAppStatuses:r,appsByNewStatus:o,totalAppChanges:s.length,originalEvent:null==u?void 0:u[0],oldUrl:v,newUrl:y,navigationIsCanceled:d}};return n&&Bt(i.detail,n),i;function a(t,e){var n=Mt(t);e=e||Re(n),r[n]=e,(o[e]=o[e]||[]).push(n)}},a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],u=arguments.length>1?arguments[1]:void 0;if(Fe)return new Promise((function(t,e){Ke.push({resolve:t,reject:e,eventArguments:u})}));var s,c=ke(),l=c.appsToUnload,f=c.appsToUnmount,h=c.appsToLoad,p=c.appsToMount,d=!1,v=He,y=He=window.location.href;return Ze()?(Fe=!0,s=l.concat(h,f,p),n()):(s=h,e())}function Ge(t,e){return Dt(t)?Vt(t).then((function(t){return e.then((function(){return Dt(t)?Wt(t):t}))})):e.then((function(){return t}))}var qe=!1;function We(t){var e;qe=!0,t&&t.urlRerouteOnly&&(e=t.urlRerouteOnly,ce=e),le&&ze()}function Ze(){return qe}le&&setTimeout((function(){qe||console.warn(_t(1,!1))}),5e3);var Ye,Je={getRawAppData:function(){return[].concat(Pe)},reroute:ze,NOT_LOADED:xt,toLoadPromise:se,toBootstrapPromise:Vt,unregisterApplication:Me};function Xe(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}}function Qe(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}function tn(t){return function e(n){return 0===arguments.length||Qe(n)?e:t.apply(this,arguments)}}function en(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return Qe(n)?e:tn((function(e){return t(n,e)}));default:return Qe(n)&&Qe(r)?e:Qe(n)?tn((function(e){return t(e,r)})):Qe(r)?tn((function(e){return t(n,e)})):t(n,r)}}}function nn(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function rn(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1}function on(t,e){return Object.prototype.hasOwnProperty.call(e,t)}le&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Je),Xe((function(t){if(!t||"string"!=typeof t)return!1;for(var e=/\${(.*?)}/g,n=e.exec(t);n;){if(!Ye.includes(n[1]))return!1;n=e.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+(Ye=[].concat(["openmrsBase","openmrsSpaBase"])).map((function(t){return"${"+t+"}"})).join(", "));const an="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};var un=Object.prototype.toString,sn=function(){return"[object Arguments]"===un.call(arguments)?function(t){return"[object Arguments]"===un.call(t)}:function(t){return on("callee",t)}}();const cn=sn;var ln=!{toString:null}.propertyIsEnumerable("toString"),fn=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hn=function(){return arguments.propertyIsEnumerable("length")}(),pn=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1};const dn="function"!=typeof Object.keys||hn?tn((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=hn&&cn(t);for(e in t)!on(e,t)||o&&"length"===e||(r[r.length]=e);if(ln)for(n=fn.length-1;n>=0;)on(e=fn[n],t)&&!pn(r,e)&&(r[r.length]=e),n-=1;return r})):tn((function(t){return Object(t)!==t?[]:Object.keys(t)})),vn=tn((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));var yn=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function gn(t,e,n,r){var o=function(t,e){return mn(t,e,n.slice(),r.slice())},i=nn(t);return!rn((function(t,e){return!rn(o,e,t)}),nn(e),i)}function mn(t,e,n,r){if(an(t,e))return!0;var o=vn(t);if(o!==vn(e))return!1;if(null==t||null==e)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof e["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof e.equals)return"function"==typeof t.equals&&t.equals(e)&&"function"==typeof e.equals&&e.equals(t);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===function(t){var e=String(t).match(/^function (\w*)/);return null==e?"":e[1]}(t.constructor))return t===e;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":yn(t))!==(void 0===e?"undefined":yn(e))||!an(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!an(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===t)return r[i]===e;i-=1}switch(o){case"Map":return t.size===e.size&&gn(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&gn(t.values(),e.values(),n.concat([t]),r.concat([e]));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 a=dn(t);if(a.length!==dn(e).length)return!1;var u=n.concat([t]),s=r.concat([e]);for(i=a.length-1;i>=0;){var c=a[i];if(!on(c,e)||!mn(e[c],t[c],u,s))return!1;i-=1}return!0}var bn=en((function(t,e){return mn(t,e,[],[])}));const wn=bn;function _n(t,e,n,r){var o,i=function(o){for(var i=e.length,a=0;a<i;){if(t===e[a])return n[a];a+=1}for(var u in e[a+1]=t,n[a+1]=o,t)o[u]=r?_n(t[u],e,n,!0):t[u];return o};switch(vn(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}const Sn=tn((function(t){return null!=t&&"function"==typeof t.clone?t.clone():_n(t,[],[],!0)}));function xn(t){return function e(n,r,o){switch(arguments.length){case 0:return e;case 1:return Qe(n)?e:en((function(e,r){return t(n,e,r)}));case 2:return Qe(n)&&Qe(r)?e:Qe(n)?en((function(e,n){return t(e,r,n)})):Qe(r)?en((function(e,r){return t(n,e,r)})):tn((function(e){return t(n,r,e)}));default:return Qe(n)&&Qe(r)&&Qe(o)?e:Qe(n)&&Qe(r)?en((function(e,n){return t(e,n,o)})):Qe(n)&&Qe(o)?en((function(e,n){return t(e,r,n)})):Qe(r)&&Qe(o)?en((function(e,r){return t(n,e,r)})):Qe(n)?tn((function(e){return t(e,r,o)})):Qe(r)?tn((function(e){return t(n,e,o)})):Qe(o)?tn((function(e){return t(n,r,e)})):t(n,r,o)}}}const En=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)};var On=tn((function(t){return!!En(t)||!!t&&"object"==typeof t&&!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))}));const jn=On;var An=function(){var t=function(t){this.f=t};return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),Cn=en((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,a){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,a,u){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,a,u,s){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,a,u,s,c){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,a,u,s,c,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))}));const Pn=Cn;function kn(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)}function Tn(t,e,n,r){return t["@@transducer/result"](n[r](Pn(t["@@transducer/step"],t),e))}var In="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";const Rn=xn((function(t,e,n){if("function"==typeof t&&(t=function(t){return new An(t)}(t)),jn(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return Tn(t,e,n,"fantasy-land/reduce");if(null!=n[In])return kn(t,e,n[In]());if("function"==typeof n.next)return kn(t,e,n);if("function"==typeof n.reduce)return Tn(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));function Ln(t){return"[object Object]"===Object.prototype.toString.call(t)}var Dn=xn((function(t,e,n){var r,o={};for(r in e)on(r,e)&&(o[r]=on(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)on(r,n)&&!on(r,o)&&(o[r]=n[r]);return o}));const Mn=Dn;var Nn=xn((function t(e,n,r){return Mn((function(n,r,o){return Ln(r)&&Ln(o)?t(e,r,o):e(n,r,o)}),n,r)}));const $n=Nn,Bn=en((function(t,e){return $n((function(t,e,n){return n}),t,e)}));var Un=Xe((function(t){return Array.isArray(t)}),"must be an array"),Fn=Xe((function(t){return"boolean"==typeof t}),"must be a boolean"),Kn=Xe((function(t){return"number"==typeof t}),"must be a number"),Hn=Xe((function(t){return"string"==typeof t}),"must be a string"),Vn=Xe((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),zn=Xe((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),Gn={providedConfigs:[],schemas:{},devDefaultsAreOn:Zn()},qn=(0,B.createGlobalStore)("config-internal",Gn),Wn=Zn();function Zn(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}}qn.subscribe((function(t){var e;t.devDefaultsAreOn!=Wn&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Wn=t.devDefaultsAreOn)}));var Yn=(0,B.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Yn.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var Jn=(0,B.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function Xn(t){return(0,B.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})}var Qn=(0,B.createGlobalStore)("config-implementer-tools",{config:{}});function tr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function er(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){er(t,e,n[e])}))}return t}function rr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||ir(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function or(t){return function(t){if(Array.isArray(t))return tr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ir(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ir(t,e){if(t){if("string"==typeof t)return tr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tr(t,e):void 0}}function ar(t,e){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=vr(u,t,e);Xn(u).setState({loaded:!0,config:s})}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}function ur(t,e){var n,r,o=(n=gr(dr(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=rr(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var h,p=Object.entries(s)[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var d=rr(h.value,2),v=d[0];pr(d[1],u,v)}}catch(t){l=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return nr({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=rr(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),a=(0,B.getGlobalStore)("config-extension-slots",{slots:{}}),u=a.getState(),s={slots:nr({},u.slots,i)};wn(u,s)||a.setState(s)}function sr(t,e){var n=function(t,e){var n=fr(Sn(t.schemas)),r=or(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=rr(u.value,2);n=gr([n,hr(c[0],c[1])])}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(t,e);Qn.setState({config:n})}function cr(t,e,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=e.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=lr(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,t,n);r[c.slotName]=nr({},r[c.slotName],er({},c.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}(0,B.getGlobalStore)("config-extensions",{configs:{}}).setState({configs:r})}function lr(t,e,n,r,o,i){var a,u,s,c,l=function(t){return rr(t.split("#"),1)[0]}(r),f=o.schemas[l],h=f?l:e,p=dr(o,i),d=yr(t,p),v=null!==(c=null==d||null===(a=d.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},y=gr([yr(h,p),v]),g=null!=f?f:o.schemas[e];mr(g,y,h);var m=xr(g,y,o.devDefaultsAreOn);return wr(g,m,h),delete m.extensionSlots,m}function fr(t){return t.hasOwnProperty("_default")?nr({},t,{_value:t._default,_source:"default"}):Or(t)?Object.keys(t).reduce((function(e,n){return e[n]=fr(t[n]),e}),{}):{}}function hr(t,e){return Or(t)?Object.keys(t).reduce((function(n,r){return n[r]=hr(t[r],e),n}),{}):{_value:t,_source:e}}function pr(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(Or(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function dr(t,e){return or(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])}function vr(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=yr(t,dr(e,n));mr(r,o,t);var i=xr(r,o,e.devDefaultsAreOn);return wr(r,i,t),delete i.extensionSlots,i}function yr(t,e){return gr(e.map((function(e){return e[t]})).filter((function(t){return!!t})))}function gr(t){return Rn(Bn)({},t)}function mr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s],l=n+"."+s,f=t[s];t.hasOwnProperty(s)?br(f,c,l):"extensionSlots"===s&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}function br(t,e,n){_r(n,t._type,e),Or(e)?t._type===et.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s];mr(t._elements,c,"".concat(n,".").concat(s))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||mr(t,e,n):t._type===et.Array&&function(t,e,n){if(Er(t._elements))for(var r=0;r<e.length;r++)br(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;_r("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function wr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&Sr(n,t._validators,e),Or(e)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=e[s],l=n+"."+s,f=t[s];t._type===et.Object&&t._elements?wr(t._elements,c,l):wr(f,c,l)}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)wr(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}function _r(t,e,n){e&&Sr(t,[{Array:Un,Boolean:Fn,ConceptUuid:zn,Number:Kn,Object:Vn,String:Hn,UUID:zn,PersonAttributeTypeUuid:zn,PatientIdentifierTypeUuid:zn}[e]],n)}function Sr(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=(0,a.value)(n);"string"==typeof s&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(s)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(s)))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}}ar(qn.getState(),Yn.getState()),qn.subscribe((function(t){return ar(t,Yn.getState())})),Yn.subscribe((function(t){return ar(qn.getState(),t)})),sr(qn.getState(),Yn.getState()),qn.subscribe((function(t){return sr(t,Yn.getState())})),Yn.subscribe((function(t){return sr(qn.getState(),t)})),ur(qn.getState(),Yn.getState()),qn.subscribe((function(t){return ur(t,Yn.getState())})),Yn.subscribe((function(t){return ur(qn.getState(),t)})),cr(qn.getState(),Jn.getState(),Yn.getState()),qn.subscribe((function(t){cr(t,Jn.getState(),Yn.getState())})),Jn.subscribe((function(t){cr(qn.getState(),t,Yn.getState())})),Yn.subscribe((function(t){cr(qn.getState(),Jn.getState(),t)}));var xr=function(t,e,n){var r=Sn(e);if(!t)return r;var o=!0,i=!1,a=void 0;try{for(var u,s=function(e,o){var i=o.value,a=r[i],u=t[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var s=u._devDefault||u._default;r[i]=n?s:u._default}var c=u._elements;if(a&&Er(c))if(u._type===et.Array&&Array.isArray(a)){var l=a.map((function(t){return xr(c,t,n)}));r[i]=l}else if(u._type===et.Object){var f=!0,h=!1,p=void 0;try{for(var d,v=Object.keys(a)[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){var y=d.value;a[y]=xr(c,a[y],n)}}catch(t){h=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw p}}}}else if(Or(u)){var g=r.hasOwnProperty(i)?a:{};Or(g)&&(r[i]=xr(u,g,n))}},c=Object.keys(t)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s(0,u)}catch(t){i=!0,a=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return r};function Er(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0}function Or(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}et.Array;var jr=d(641);const Ar=function(t,e){return t===e||t!=t&&e!=e},Cr=function(t,e){for(var n=t.length;n--;)if(Ar(t[n][0],e))return n;return-1};var Pr=Array.prototype.splice;function kr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}kr.prototype.clear=function(){this.__data__=[],this.size=0},kr.prototype.delete=function(t){var e=this.__data__,n=Cr(e,t);return!(n<0||(n==e.length-1?e.pop():Pr.call(e,n,1),--this.size,0))},kr.prototype.get=function(t){var e=this.__data__,n=Cr(e,t);return n<0?void 0:e[n][1]},kr.prototype.has=function(t){return Cr(this.__data__,t)>-1},kr.prototype.set=function(t,e){var n=this.__data__,r=Cr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};const Tr=kr,Ir=function(t){var e,n=void 0===t?"undefined":(e=t)&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e;return null!=t&&("object"==n||"function"==n)},Rr=function(t){if(!Ir(t))return!1;var e=Y(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Lr=K["__core-js_shared__"];var Dr,Mr=(Dr=/[^.]+$/.exec(Lr&&Lr.keys&&Lr.keys.IE_PROTO||""))?"Symbol(src)_1."+Dr:"",Nr=Function.prototype.toString;const $r=function(t){if(null!=t){try{return Nr.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var Br=/^\[object .+?Constructor\]$/,Ur=Function.prototype,Fr=Object.prototype,Kr=Ur.toString,Hr=Fr.hasOwnProperty,Vr=RegExp("^"+Kr.call(Hr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const zr=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Ir(t)||(e=t,Mr&&Mr in e))&&(Rr(t)?Vr:Br).test($r(t));var e}(n)?n:void 0},Gr=zr(K,"Map"),qr=zr(Object,"create");var Wr=Object.prototype.hasOwnProperty,Zr=Object.prototype.hasOwnProperty;function Yr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Yr.prototype.clear=function(){this.__data__=qr?qr(null):{},this.size=0},Yr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Yr.prototype.get=function(t){var e=this.__data__;if(qr){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Wr.call(e,t)?e[t]:void 0},Yr.prototype.has=function(t){var e=this.__data__;return qr?void 0!==e[t]:Zr.call(e,t)},Yr.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=qr&&void 0===e?"__lodash_hash_undefined__":e,this};const Jr=Yr,Xr=function(t,e){var n,r,o,i=t.__data__;return("string"==(o=void 0===(n=e)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};function Qr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Qr.prototype.clear=function(){this.size=0,this.__data__={hash:new Jr,map:new(Gr||Tr),string:new Jr}},Qr.prototype.delete=function(t){var e=Xr(this,t).delete(t);return this.size-=e?1:0,e},Qr.prototype.get=function(t){return Xr(this,t).get(t)},Qr.prototype.has=function(t){return Xr(this,t).has(t)},Qr.prototype.set=function(t,e){var n=Xr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};const to=Qr;function eo(t){var e=this.__data__=new Tr(t);this.size=e.size}eo.prototype.clear=function(){this.__data__=new Tr,this.size=0},eo.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},eo.prototype.get=function(t){return this.__data__.get(t)},eo.prototype.has=function(t){return this.__data__.has(t)},eo.prototype.set=function(t,e){var n,r,o=this.__data__;if(n=o,null!=(r=Tr)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r){var i=o.__data__;if(!Gr||i.length<199)return i.push([t,e]),this.size=++o.size,this;o=this.__data__=new to(i)}return o.set(t,e),this.size=o.size,this};const no=eo;function ro(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new to;++e<n;)this.add(t[e])}ro.prototype.add=ro.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ro.prototype.has=function(t){return this.__data__.has(t)};const oo=ro,io=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},ao=function(t,e){return t.has(e)},uo=function(t,e,n,r,o,i){var a=1&n,u=t.length,s=e.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var f=-1,h=!0,p=2&n?new oo:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var d=t[f],v=e[f];if(r)var y=a?r(v,d,f,e,t,i):r(d,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!io(e,(function(t,e){if(!ao(p,e)&&(d===t||o(d,t,n,r,i)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!o(d,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},so=K.Uint8Array,co=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},lo=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n};var fo=H?H.prototype:void 0,ho=fo?fo.valueOf:void 0;const po=Array.isArray;var vo=Object.prototype.propertyIsEnumerable,yo=Object.getOwnPropertySymbols;const go=yo?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a)&&(i[o++]=a)}return i}(yo(t),(function(e){return vo.call(t,e)})))}:function(){return[]},mo=function(t){return X(t)&&"[object Arguments]"==Y(t)};var bo=Object.prototype,wo=bo.hasOwnProperty,_o=bo.propertyIsEnumerable,So=mo(function(){return arguments}())?mo:function(t){return X(t)&&wo.call(t,"callee")&&!_o.call(t,"callee")};const xo=So;var Eo=e&&!e.nodeType&&e,Oo=Eo&&t&&!t.nodeType&&t,jo=Oo&&Oo.exports===Eo?K.Buffer:void 0;const Ao=(jo?jo.isBuffer:void 0)||function(){return!1};var Co=/^(?:0|[1-9]\d*)$/;const Po=function(t,e){var n,r=void 0===t?"undefined":(n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Co.test(t))&&t>-1&&t%1==0&&t<e},ko=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var To={};To["[object Float32Array]"]=To["[object Float64Array]"]=To["[object Int8Array]"]=To["[object Int16Array]"]=To["[object Int32Array]"]=To["[object Uint8Array]"]=To["[object Uint8ClampedArray]"]=To["[object Uint16Array]"]=To["[object Uint32Array]"]=!0,To["[object Arguments]"]=To["[object Array]"]=To["[object ArrayBuffer]"]=To["[object Boolean]"]=To["[object DataView]"]=To["[object Date]"]=To["[object Error]"]=To["[object Function]"]=To["[object Map]"]=To["[object Number]"]=To["[object Object]"]=To["[object RegExp]"]=To["[object Set]"]=To["[object String]"]=To["[object WeakMap]"]=!1;var Io=e&&!e.nodeType&&e,Ro=Io&&t&&!t.nodeType&&t,Lo=Ro&&Ro.exports===Io&&U.process,Do=function(){try{return Ro&&Ro.require&&Ro.require("util").types||Lo&&Lo.binding&&Lo.binding("util")}catch(t){}}(),Mo=Do&&Do.isTypedArray;const No=Mo?($o=Mo,function(t){return $o(t)}):function(t){return X(t)&&ko(t.length)&&!!To[Y(t)]};var $o,Bo=Object.prototype.hasOwnProperty,Uo=Object.prototype;const Fo=J(Object.keys,Object);var Ko=Object.prototype.hasOwnProperty;const Ho=function(t){return null!=(e=t)&&ko(e.length)&&!Rr(e)?function(t,e){var n=po(t),r=!n&&xo(t),o=!n&&!r&&Ao(t),i=!n&&!r&&!o&&No(t),a=n||r||o||i,u=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],s=u.length;for(var c in t)!Bo.call(t,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Po(c,s))||u.push(c);return u}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||Uo))return Fo(t);var e,n,r=[];for(var o in Object(t))Ko.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e},Vo=function(t){return function(t,e,n){var r=e(t);return po(t)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(t))}(t,Ho,go)};function zo(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var Go=Object.prototype.hasOwnProperty;const qo=zr(K,"DataView"),Wo=zr(K,"Promise"),Zo=zr(K,"Set"),Yo=zr(K,"WeakMap");var Jo="[object Map]",Xo="[object Promise]",Qo="[object Set]",ti="[object WeakMap]",ei="[object DataView]",ni=$r(qo),ri=$r(Gr),oi=$r(Wo),ii=$r(Zo),ai=$r(Yo),ui=Y;(qo&&ui(new qo(new ArrayBuffer(1)))!=ei||Gr&&ui(new Gr)!=Jo||Wo&&ui(Wo.resolve())!=Xo||Zo&&ui(new Zo)!=Qo||Yo&&ui(new Yo)!=ti)&&(ui=function(t){var e=Y(t),n="[object Object]"==e?t.constructor:void 0,r=n?$r(n):"";if(r)switch(r){case ni:return ei;case ri:return Jo;case oi:return Xo;case ii:return Qo;case ai:return ti}return e});const si=ui;var ci="[object Arguments]",li="[object Array]",fi="[object Object]",hi=Object.prototype.hasOwnProperty;const pi=function t(e,n,r,o,i){return e===n||(null==e||null==n||!X(e)&&!X(n)?e!=e&&n!=n:function(t,e,n,r,o,i){var a=po(t),u=po(e),s=a?li:si(t),c=u?li:si(e),l=(s=s==ci?fi:s)==fi,f=(c=c==ci?fi:c)==fi,h=s==c;if(h&&Ao(t)){if(!Ao(e))return!1;a=!0,l=!1}if(h&&!l)return i||(i=new no),a||No(t)?uo(t,e,n,r,o,i):function(t,e,n,r,o,i,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new so(t),new so(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ar(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=co;case"[object Set]":var s=1&r;if(u||(u=lo),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=uo(u(t),u(e),r,o,i,a);return a.delete(t),l;case"[object Symbol]":if(ho)return ho.call(t)==ho.call(e)}return!1}(t,e,s,n,r,o,i);if(!(1&n)){var p=l&&hi.call(t,"__wrapped__"),d=f&&hi.call(e,"__wrapped__");if(p||d){var v=p?t.value():t,y=d?e.value():e;return i||(i=new no),o(v,y,n,r,i)}}return!!h&&(i||(i=new no),function(t,e,n,r,o,i){var a=1&n,u=Vo(t),s=u.length;if(s!=Vo(e).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in e:Go.call(e,l)))return!1}var f=i.get(t),h=i.get(e);if(f&&h)return f==e&&h==t;var p=!0;i.set(t,e),i.set(e,t);for(var d=a;++c<s;){var v=t[l=u[c]],y=e[l];if(r)var g=a?r(y,v,l,e,t,i):r(v,y,l,t,e,i);if(!(void 0===g?v===y||o(v,y,n,r,i):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&zo(m,m)&&"function"==typeof b&&zo(b,b)||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,r,o,i))}(e,n,r,o,t,i))},di=function(t,e){return pi(t,e)};var vi=(0,B.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),yi=function(){return(0,B.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};function gi(t){var e=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(t.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=!0,c=!1,l=void 0;try{for(var f,h=u.instances[Symbol.iterator]();!(s=(f=h.next()).done);s=!0){var p=f.value;e.push({slotModuleName:p.slotModuleName,extensionModuleName:u.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(t){c=!0,l=t}finally{try{s||null==h.return||h.return()}finally{if(c)throw l}}}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}di(D.configExtensionStore.getState().mountedExtensions,e)||D.configExtensionStore.setState({mountedExtensions:e})}function mi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function bi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){bi(t,e,n[e])}))}return t}function _i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||xi(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Si(t){return function(t){if(Array.isArray(t))return mi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||xi(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xi(t,e){if(t){if("string"==typeof t)return mi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mi(t,e):void 0}}gi(vi.getState()),vi.subscribe(gi),yi();var Ei=yi(),Oi=(0,B.getGlobalStore)("extensions",{slots:{}}),ji=(0,D.getExtensionSlotsConfigStore)(),Ai=(0,D.getExtensionsConfigStore)();function Ci(t,e,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=Object.entries(t.slots)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=_i(u.value,2),l=c[0],f=c[1],h=Ti(l,t,(0,D.getExtensionSlotConfigFromStore)(e,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:h}}}catch(t){i=!0,a=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}di(Oi.getState().slots,r)||Oi.setState({slots:r})}function Pi(t){return _i(t.split("#"),1)[0]}function ki(t,e,n,r){var o=e.indexOf(t);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(t);return-1!==i?2e3+i:-1}function Ti(t,e,n,r){var o=function(t,e){var n=t.add||[],r=t.remove||[],o=t.order||[],i=Ei.getState().extensions;return Si(e).concat(Si(n)).filter((function(t){return!r.includes(t)})).sort((function(t,n){var r,a,u=ki(t,o,null===(r=i[Pi(t)])||void 0===r?void 0:r.order,e),s=ki(n,o,null===(a=i[Pi(n)])||void 0===a?void 0:a.order,e);return-1===s?-1:-1===u?1:u-s}))}(n,e.slots[t].attachedIds),i=[],a=void 0,u=!0,s=!1,c=void 0;try{for(var l,f=o[Symbol.iterator]();!(u=(l=f.next()).done);u=!0){var h=l.value,p=(0,D.getExtensionConfigFromStore)(r,t,h).config,d=Pi(h),v=e.extensions[d];if(v){var y,g,m=null!==(g=null==p||null===(y=p["Display conditions"])||void 0===y?void 0:y.privileges)&&void 0!==g?g:v.privileges;if(m&&("string"==typeof m||Array.isArray(m)&&m.length>0)){var b;if(void 0===a&&(a=null===(b=(0,jr.getSessionStore)().getState().session)||void 0===b?void 0:b.user),!a)continue;if(!(0,jr.userHasAccess)(m,a))continue}i.push({id:h,name:d,moduleName:v.moduleName,config:p,meta:v.meta,online:v.online,offline:v.offline})}}}catch(t){s=!0,c=t}finally{try{u||null==f.return||f.return()}finally{if(s)throw c}}return i}Ei.subscribe((function(t){Ci(t,ji.getState(),Ai.getState())})),ji.subscribe((function(t){Ci(Ei.getState(),t,Ai.getState())})),Ai.subscribe((function(t){Ci(Ei.getState(),ji.getState(),t)})),Ei.action((function(t,e){t.extensions[e.name]=wi({},e,{instances:[]})})),Ei.action((function(t,e,n){var r,o=null===(r=t.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=e)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),t;if(o&&o==e)return t;if(t.slots[n])return wi({},t,{slots:wi({},t.slots,bi({},n,wi({},t.slots[n],{moduleName:e})))});var i=function(t,e){return{moduleName:e,name:t,attachedIds:[],config:null}}(n,e);return wi({},t,{slots:wi({},t.slots,bi({},n,i))})})),Oi.action((function(){return{slots:{},extensions:{}}}));const Ii="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,Ri=Object.keys,Li=Array.isArray;function Di(t,e){return"object"!=typeof e||Ri(e).forEach((function(n){t[n]=e[n]})),t}"undefined"==typeof Promise||Ii.Promise||(Ii.Promise=Promise);const Mi=Object.getPrototypeOf,Ni={}.hasOwnProperty;function $i(t,e){return Ni.call(t,e)}function Bi(t,e){"function"==typeof e&&(e=e(Mi(t))),("undefined"==typeof Reflect?Ri:Reflect.ownKeys)(e).forEach((n=>{Fi(t,n,e[n])}))}const Ui=Object.defineProperty;function Fi(t,e,n,r){Ui(t,e,Di(n&&$i(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Ki(t){return{from:function(e){return t.prototype=Object.create(e.prototype),Fi(t.prototype,"constructor",t),{extend:Bi.bind(null,t.prototype)}}}}const Hi=Object.getOwnPropertyDescriptor;function Vi(t,e){let n;return Hi(t,e)||(n=Mi(t))&&Vi(n,e)}const zi=[].slice;function Gi(t,e,n){return zi.call(t,e,n)}function qi(t,e){return e(t)}function Wi(t){if(!t)throw new Error("Assertion Failed")}function Zi(t){Ii.setImmediate?setImmediate(t):setTimeout(t,0)}function Yi(t,e){return t.reduce(((t,n,r)=>{var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})}function Ji(t,e){if($i(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=Ji(t,e[r]);n.push(i)}return n}var a=e.indexOf(".");if(-1!==a){var u=t[e.substr(0,a)];return void 0===u?void 0:Ji(u,e.substr(a+1))}}function Xi(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){Wi("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)Xi(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var a=e.substr(0,i),u=e.substr(i+1);if(""===u)void 0===n?Li(t)&&!isNaN(parseInt(a))?t.splice(a,1):delete t[a]:t[a]=n;else{var s=t[a];s||(s=t[a]={}),Xi(s,u,n)}}else void 0===n?Li(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}function Qi(t){var e={};for(var n in t)$i(t,n)&&(e[n]=t[n]);return e}const ta=[].concat;function ea(t){return ta.apply([],t)}const na="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ea([8,16,32,64].map((t=>["Int","Uint","Float"].map((e=>e+t+"Array")))))).filter((t=>Ii[t])),ra=na.map((t=>Ii[t]));Yi(na,(t=>[t,!0]));let oa=null;function ia(t){oa="undefined"!=typeof WeakMap&&new WeakMap;const e=aa(t);return oa=null,e}function aa(t){if(!t||"object"!=typeof t)return t;let e=oa&&oa.get(t);if(e)return e;if(Li(t)){e=[],oa&&oa.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(aa(t[n]))}else if(ra.indexOf(t.constructor)>=0)e=t;else{const n=Mi(t);for(var o in e=n===Object.prototype?{}:Object.create(n),oa&&oa.set(t,e),t)$i(t,o)&&(e[o]=aa(t[o]))}return e}const{toString:ua}={};function sa(t){return ua.call(t).slice(8,-1)}const ca="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",la="symbol"==typeof ca?function(t){var e;return null!=t&&(e=t[ca])&&e.apply(t)}:function(){return null},fa={};function ha(t){var e,n,r,o;if(1===arguments.length){if(Li(t))return t.slice();if(this===fa&&"string"==typeof t)return[t];if(o=la(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n}const pa="undefined"!=typeof Symbol?t=>"AsyncFunction"===t[Symbol.toStringTag]:()=>!1;var da="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function va(t,e){da=t,ya=e}var ya=()=>!0;const ga=!new Error("").stack;function ma(){if(ga)try{throw ma.arguments,new Error}catch(t){return t}return new Error}function ba(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\n").length),n.split("\n").slice(e).filter(ya).map((t=>"\n"+t)).join("")):""}var wa=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],_a=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(wa),Sa={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 xa(t,e){this._e=ma(),this.name=t,this.message=e}function Ea(t,e){return t+". Errors: "+Object.keys(e).map((t=>e[t].toString())).filter(((t,e,n)=>n.indexOf(t)===e)).join("\n")}function Oa(t,e,n,r){this._e=ma(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=Ea(t,e)}function ja(t,e){this._e=ma(),this.name="BulkError",this.failures=Object.keys(e).map((t=>e[t])),this.failuresByPos=e,this.message=Ea(t,e)}Ki(xa).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+ba(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Ki(Oa).from(xa),Ki(ja).from(xa);var Aa=_a.reduce(((t,e)=>(t[e]=e+"Error",t)),{});const Ca=xa;var Pa=_a.reduce(((t,e)=>{var n=e+"Error";function r(t,r){this._e=ma(),this.name=n,t?"string"==typeof t?(this.message=`${t}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof t&&(this.message=`${t.name} ${t.message}`,this.inner=t):(this.message=Sa[e]||n,this.inner=null)}return Ki(r).from(Ca),t[e]=r,t}),{});Pa.Syntax=SyntaxError,Pa.Type=TypeError,Pa.Range=RangeError;var ka=wa.reduce(((t,e)=>(t[e+"Error"]=Pa[e],t)),{}),Ta=_a.reduce(((t,e)=>(-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=Pa[e]),t)),{});function Ia(){}function Ra(t){return t}function La(t,e){return null==t||t===Ra?e:function(n){return e(t(n))}}function Da(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function Ma(t,e){return t===Ia?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Da(r,this.onsuccess):r),o&&(this.onerror=this.onerror?Da(o,this.onerror):o),void 0!==i?i:n}}function Na(t,e){return t===Ia?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Da(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Da(r,this.onerror):r)}}function $a(t,e){return t===Ia?e:function(n){var r=t.apply(this,arguments);Di(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Da(o,this.onsuccess):o),i&&(this.onerror=this.onerror?Da(i,this.onerror):i),void 0===r?void 0===a?void 0:a:Di(r,a)}}function Ba(t,e){return t===Ia?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}}function Ua(t,e){return t===Ia?e:function(){var n=t.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 e.apply(r,i)}))}return e.apply(this,arguments)}}Ta.ModifyError=Oa,Ta.DexieError=xa,Ta.BulkError=ja;var Fa={};const[Ka,Ha,Va]="undefined"==typeof Promise?[]:(()=>{let t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,Mi(t),t];const e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,Mi(e),t]})(),za=Ha&&Ha.then,Ga=Ka&&Ka.constructor,qa=!!Va;var Wa=!1,Za=Va?()=>{Va.then(mu)}:Ii.setImmediate?setImmediate.bind(null,mu):Ii.MutationObserver?()=>{var t=document.createElement("div");new MutationObserver((()=>{mu(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:()=>{setTimeout(mu,0)},Ya=function(t,e){iu.push([t,e]),Xa&&(Za(),Xa=!1)},Ja=!0,Xa=!0,Qa=[],tu=[],eu=null,nu=Ra,ru={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ku,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((t=>{try{Ku(t[0],t[1])}catch(t){}}))}},ou=ru,iu=[],au=0,uu=[];function su(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Ia,this._lib=!1;var e=this._PSD=ou;if(da&&(this._stackHolder=ma(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==Fa)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&hu(this,this._value))}this._state=null,this._value=null,++e.ref,fu(this,t)}const cu={get:function(){var t=ou,e=Cu;function n(n,r){var o=!t.global&&(t!==ou||e!==Cu);const i=o&&!Iu();var a=new su(((e,a)=>{du(this,new lu(Uu(n,t,o,i),Uu(r,t,o,i),e,a,t))}));return da&&gu(a,this),a}return n.prototype=Fa,n},set:function(t){Fi(this,"then",t&&t.prototype===Fa?cu:{get:function(){return t},set:cu.set})}};function lu(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o}function fu(t,e){try{e((e=>{if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&bu();e&&"function"==typeof e.then?fu(t,((t,n)=>{e instanceof su?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,pu(t)),n&&wu()}}),hu.bind(null,t))}catch(e){hu(t,e)}}function hu(t,e){if(tu.push(e),null===t._state){var n=t._lib&&bu();e=nu(e),t._state=!1,t._value=e,da&&null!==e&&"object"==typeof e&&!e._promise&&function(t,e,n){try{t.apply(null,void 0)}catch(t){}}((()=>{var n=Vi(e,"stack");e._promise=t,Fi(e,"stack",{get:()=>Wa?n&&(n.get?n.get.apply(e):n.value):t.stack})})),function(t){Qa.some((e=>e._value===t._value))||Qa.push(t)}(t),pu(t),n&&wu()}}function pu(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)du(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===au&&(++au,Ya((()=>{0==--au&&_u()}),[]))}function du(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++au,Ya(vu,[n,t,e])}else t._listeners.push(e)}function vu(t,e,n){try{eu=e;var r,o=e._value;e._state?r=t(o):(tu.length&&(tu=[]),r=t(o),-1===tu.indexOf(o)&&function(t){for(var e=Qa.length;e;)if(Qa[--e]._value===t._value)return void Qa.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{eu=null,0==--au&&_u(),--n.psd.ref||n.psd.finalize()}}function yu(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,a=t._value;null!=a?(o=a.name||"Error",i=a.message||a,r=ba(a,0)):(o=a,i=""),e.push(o+(i?": "+i:"")+r)}return da&&((r=ba(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&yu(t._prev,e,n)),e}function gu(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)}function mu(){bu()&&wu()}function bu(){var t=Ja;return Ja=!1,Xa=!1,t}function wu(){var t,e,n;do{for(;iu.length>0;)for(t=iu,iu=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(iu.length>0);Ja=!0,Xa=!0}function _u(){var t=Qa;Qa=[],t.forEach((t=>{t._PSD.onunhandled.call(null,t._value,t)}));for(var e=uu.slice(0),n=e.length;n;)e[--n]()}function Su(t){return new su(Fa,!1,t)}function xu(t,e){var n=ou;return function(){var r=bu(),o=ou;try{return Mu(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{Mu(o,!1),r&&wu()}}}Bi(su.prototype,{then:cu,_then:function(t,e){du(this,new lu(null,null,t,e,ou))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(t=>t instanceof e?n(t):Su(t))):this.then(null,(t=>t&&t.name===e?n(t):Su(t)))},finally:function(t){return this.then((e=>(t(),e)),(e=>(t(),Su(e))))},stack:{get:function(){if(this._stack)return this._stack;try{Wa=!0;var t=yu(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{Wa=!1}}},timeout:function(t,e){return t<1/0?new su(((n,r)=>{var o=setTimeout((()=>r(new Pa.Timeout(e))),t);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&Fi(su.prototype,Symbol.toStringTag,"Dexie.Promise"),ru.env=Nu(),Bi(su,{all:function(){var t=ha.apply(null,arguments).map(Ru);return new su((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach(((o,i)=>su.resolve(o).then((n=>{t[i]=n,--r||e(t)}),n)))}))},resolve:t=>{if(t instanceof su)return t;if(t&&"function"==typeof t.then)return new su(((e,n)=>{t.then(e,n)}));var e=new su(Fa,!0,t);return gu(e,eu),e},reject:Su,race:function(){var t=ha.apply(null,arguments).map(Ru);return new su(((e,n)=>{t.map((t=>su.resolve(t).then(e,n)))}))},PSD:{get:()=>ou,set:t=>ou=t},totalEchoes:{get:()=>Cu},newPSD:ku,usePSD:$u,scheduler:{get:()=>Ya,set:t=>{Ya=t}},rejectionMapper:{get:()=>nu,set:t=>{nu=t}},follow:(t,e)=>new su(((n,r)=>ku(((e,n)=>{var r=ou;r.unhandleds=[],r.onunhandled=n,r.finalize=Da((function(){!function(t){uu.push((function e(){t(),uu.splice(uu.indexOf(e),1)})),++au,Ya((()=>{0==--au&&_u()}),[])}((()=>{0===this.unhandleds.length?e():n(this.unhandleds[0])}))}),r.finalize),t()}),e,n,r)))}),Ga&&(Ga.allSettled&&Fi(su,"allSettled",(function(){const t=ha.apply(null,arguments).map(Ru);return new su((e=>{0===t.length&&e([]);let n=t.length;const r=new Array(n);t.forEach(((t,o)=>su.resolve(t).then((t=>r[o]={status:"fulfilled",value:t}),(t=>r[o]={status:"rejected",reason:t})).then((()=>--n||e(r)))))}))})),Ga.any&&"undefined"!=typeof AggregateError&&Fi(su,"any",(function(){const t=ha.apply(null,arguments).map(Ru);return new su(((e,n)=>{0===t.length&&n(new AggregateError([]));let r=t.length;const o=new Array(r);t.forEach(((t,i)=>su.resolve(t).then((t=>e(t)),(t=>{o[i]=t,--r||n(new AggregateError(o))}))))}))})));const Eu={awaits:0,echoes:0,id:0};var Ou=0,ju=[],Au=0,Cu=0,Pu=0;function ku(t,e,n,r){var o=ou,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Pu;var a=ru.env;i.env=qa?{Promise:su,PromiseProp:{value:su,configurable:!0,writable:!0},all:su.all,race:su.race,allSettled:su.allSettled,any:su.any,resolve:su.resolve,reject:su.reject,nthen:Fu(a.nthen,i),gthen:Fu(a.gthen,i)}:{},e&&Di(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=$u(i,t,n,r);return 0===i.ref&&i.finalize(),u}function Tu(){return Eu.id||(Eu.id=++Ou),++Eu.awaits,Eu.echoes+=100,Eu.id}function Iu(){return!!Eu.awaits&&(0==--Eu.awaits&&(Eu.id=0),Eu.echoes=100*Eu.awaits,!0)}function Ru(t){return Eu.echoes&&t&&t.constructor===Ga?(Tu(),t.then((t=>(Iu(),t)),(t=>(Iu(),Hu(t))))):t}function Lu(t){++Cu,Eu.echoes&&0!=--Eu.echoes||(Eu.echoes=Eu.id=0),ju.push(ou),Mu(t,!0)}function Du(){var t=ju[ju.length-1];ju.pop(),Mu(t,!1)}function Mu(t,e){var n=ou;if((e?!Eu.echoes||Au++&&t===ou:!Au||--Au&&t===ou)||Bu(e?Lu.bind(null,t):Du),t!==ou&&(ou=t,n===ru&&(ru.env=Nu()),qa)){var r=ru.env.Promise,o=t.env;Ha.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(Ii,"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 Nu(){var t=Ii.Promise;return qa?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(Ii,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:Ha.then,gthen:t.prototype.then}:{}}function $u(t,e,n,r,o){var i=ou;try{return Mu(t,!0),e(n,r,o)}finally{Mu(i,!1)}}function Bu(t){za.call(Ka,t)}function Uu(t,e,n,r){return"function"!=typeof t?t:function(){var o=ou;n&&Tu(),Mu(e,!0);try{return t.apply(this,arguments)}finally{Mu(o,!1),r&&Bu(Iu)}}}function Fu(t,e){return function(n,r){return t.call(this,Uu(n,e),Uu(r,e))}}function Ku(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(Ii.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),Di(r,o)):Ii.CustomEvent&&Di(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&Ii.dispatchEvent&&(dispatchEvent(r),!Ii.PromiseRejectionEvent&&Ii.onunhandledrejection))try{Ii.onunhandledrejection(r)}catch(t){}da&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${t.stack||t}`)}catch(t){}}-1===(""+za).indexOf("[native code]")&&(Tu=Iu=Ia);var Hu=su.reject;function Vu(t,e,n,r){if(t.idbdb&&(t._state.openComplete||ou.letThrough||t._vip)){var o=t._createTransaction(e,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===Aa.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((()=>Vu(t,e,n,r)))):Hu(o)}return o._promise(e,((t,e)=>ku((()=>(ou.trans=o,r(t,e,o)))))).then((t=>o._completion.then((()=>t))))}if(t._state.openComplete)return Hu(new Pa.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return Hu(new Pa.DatabaseClosed);t.open().catch(Ia)}return t._state.dbReadyPromise.then((()=>Vu(t,e,n,r)))}const zu=String.fromCharCode(65535),Gu="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",qu=[],Wu="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Zu=Wu,Yu=Wu,Ju=t=>!/(dexie\.js|dexie\.min\.js)/.test(t);function Xu(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e}const Qu={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function ts(t){return"string"!=typeof t||/\./.test(t)?t=>t:e=>(void 0===e[t]&&t in e&&delete(e=ia(e))[t],e)}class es{_trans(t,e,n){const r=this._tx||ou.trans,o=this.name;function i(t,n,r){if(!r.schema[o])throw new Pa.NotFound("Table "+o+" not part of transaction");return e(r.idbtrans,r)}const a=bu();try{return r&&r.db===this.db?r===ou.trans?r._promise(t,i,n):ku((()=>r._promise(t,i,n)),{trans:r,transless:ou.transless||ou}):Vu(this.db,t,[this.name],i)}finally{a&&wu()}}get(t,e){return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(e=>this.core.get({trans:e,key:t}).then((t=>this.hook.reading.fire(t))))).then(e)}where(t){if("string"==typeof t)return new this.db.WhereClause(this,t);if(Li(t))return new this.db.WhereClause(this,`[${t.join("+")}]`);const e=Ri(t);if(1===e.length)return this.where(e[0]).equals(t[e[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((t=>t.compound&&e.every((e=>t.keyPath.indexOf(e)>=0))&&t.keyPath.every((t=>e.indexOf(t)>=0))))[0];if(n&&this.db._maxKey!==zu)return this.where(n.name).equals(n.keyPath.map((e=>t[e])));!n&&da&&console.warn(`The query ${JSON.stringify(t)} on ${this.name} would benefit of a compound index [${e.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(t,e){try{return 0===o.cmp(t,e)}catch(t){return!1}}const[a,u]=e.reduce((([e,n],o)=>{const a=r[o],u=t[o];return[e||a,e||!a?Xu(n,a&&a.multi?t=>{const e=Ji(t,o);return Li(e)&&e.some((t=>i(u,t)))}:t=>i(u,Ji(t,o))):n]}),[null,null]);return a?this.where(a.name).equals(t[a.keyPath]).filter(u):n?this.filter(u):this.where(e).equals("")}filter(t){return this.toCollection().and(t)}count(t){return this.toCollection().count(t)}offset(t){return this.toCollection().offset(t)}limit(t){return this.toCollection().limit(t)}each(t){return this.toCollection().each(t)}toArray(t){return this.toCollection().toArray(t)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(t){return new this.db.Collection(new this.db.WhereClause(this,Li(t)?`[${t.join("+")}]`:t))}reverse(){return this.toCollection().reverse()}mapToClass(t){this.schema.mappedClass=t;const e=e=>{if(!e)return e;const n=Object.create(t.prototype);for(var r in e)if($i(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t}defineClass(){return this.mapToClass((function(t){Di(this,t)}))}add(t,e){const{auto:n,keyPath:r}=this.schema.primKey;let o=t;return r&&n&&(o=ts(r)(t)),this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[o]}))).then((t=>t.numFailures?su.reject(t.failures[0]):t.lastResult)).then((e=>{if(r)try{Xi(t,r,e)}catch(t){}return e}))}update(t,e){if("object"!=typeof t||Li(t))return this.where(":id").equals(t).modify(e);{const n=Ji(t,this.schema.primKey.keyPath);if(void 0===n)return Hu(new Pa.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof e?Ri(e).forEach((n=>{Xi(t,n,e[n])})):e(t,{value:t,primKey:n})}catch(t){}return this.where(":id").equals(n).modify(e)}}put(t,e){const{auto:n,keyPath:r}=this.schema.primKey;let o=t;return r&&n&&(o=ts(r)(t)),this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"put",values:[o],keys:null!=e?[e]:null}))).then((t=>t.numFailures?su.reject(t.failures[0]):t.lastResult)).then((e=>{if(r)try{Xi(t,r,e)}catch(t){}return e}))}delete(t){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"delete",keys:[t]}))).then((t=>t.numFailures?su.reject(t.failures[0]):void 0))}clear(){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"deleteRange",range:Qu}))).then((t=>t.numFailures?su.reject(t.failures[0]):void 0))}bulkGet(t){return this._trans("readonly",(e=>this.core.getMany({keys:t,trans:e}).then((t=>t.map((t=>this.hook.reading.fire(t)))))))}bulkAdd(t,e,n){const r=Array.isArray(e)?e:void 0,o=(n=n||(r?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(e=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Pa.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==t.length)throw new Pa.InvalidArgument("Arguments objects and keys must have the same length");const a=t.length;let u=i&&n?t.map(ts(i)):t;return this.core.mutate({trans:e,type:"add",keys:r,values:u,wantResults:o}).then((({numFailures:t,results:e,lastResult:n,failures:r})=>{if(0===t)return o?e:n;throw new ja(`${this.name}.bulkAdd(): ${t} of ${a} operations failed`,r)}))}))}bulkPut(t,e,n){const r=Array.isArray(e)?e:void 0,o=(n=n||(r?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(e=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Pa.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==t.length)throw new Pa.InvalidArgument("Arguments objects and keys must have the same length");const a=t.length;let u=i&&n?t.map(ts(i)):t;return this.core.mutate({trans:e,type:"put",keys:r,values:u,wantResults:o}).then((({numFailures:t,results:e,lastResult:n,failures:r})=>{if(0===t)return o?e:n;throw new ja(`${this.name}.bulkPut(): ${t} of ${a} operations failed`,r)}))}))}bulkDelete(t){const e=t.length;return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"delete",keys:t}))).then((({numFailures:t,lastResult:n,failures:r})=>{if(0===t)return n;throw new ja(`${this.name}.bulkDelete(): ${t} of ${e} operations failed`,r)}))}}function ns(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return a(t);r||(r=Ba),o||(o=Ia);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function a(t){Ri(t).forEach((function(e){var n=t[e];if(Li(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new Pa.InvalidArgument("Invalid event config");var r=i(e,Ra,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){Zi((function(){t.apply(null,e)}))}))}))}}))}}function rs(t,e){return Ki(e).from({prototype:t}),e}function os(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)}function is(t,e){t.filter=Xu(t.filter,e)}function as(t,e,n){var r=t.replayFilter;t.replayFilter=r?()=>Xu(r(),e()):e,t.justLimit=n&&!r}function us(t,e){if(t.isPrimKey)return e.primaryKey;const n=e.getIndexByKeyPath(t.index);if(!n)throw new Pa.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n}function ss(t,e,n){const r=us(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})}function cs(t,e,n,r){const o=t.replayFilter?Xu(t.filter,t.replayFilter()):t.filter;if(t.or){const i={},a=(t,n,r)=>{if(!o||o(n,r,(t=>n.stop(t)),(t=>n.fail(t)))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),$i(i,u)||(i[u]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(a,n),ls(ss(t,r,n),t.algorithm,a,!t.keysOnly&&t.valueMapper)])}return ls(ss(t,r,n),Xu(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)}function ls(t,e,n,r){var o=xu(r?(t,e,o)=>n(r(t),e,o):n);return t.then((t=>{if(t)return t.start((()=>{var n=()=>t.continue();e&&!e(t,(t=>n=t),(e=>{t.stop(e),n=Ia}),(e=>{t.fail(e),n=Ia}))||o(t.value,t,(t=>n=t)),n()}))}))}function fs(t,e){try{const n=hs(t),r=hs(e);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 t>e?1:t<e?-1:0;case"binary":return function(t,e){const n=t.length,r=e.length,o=n<r?n:r;for(let n=0;n<o;++n)if(t[n]!==e[n])return t[n]<e[n]?-1:1;return n===r?0:n<r?-1:1}(ps(t),ps(e));case"Array":return function(t,e){const n=t.length,r=e.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=fs(t[n],e[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(t,e)}}catch(t){}return NaN}function hs(t){const e=typeof t;if("object"!==e)return e;if(ArrayBuffer.isView(t))return"binary";const n=sa(t);return"ArrayBuffer"===n?"binary":n}function ps(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)}class ds{_read(t,e){var n=this._ctx;return n.error?n.table._trans(null,Hu.bind(null,n.error)):n.table._trans("readonly",t).then(e)}_write(t){var e=this._ctx;return e.error?e.table._trans(null,Hu.bind(null,e.error)):e.table._trans("readwrite",t,"locked")}_addAlgorithm(t){var e=this._ctx;e.algorithm=Xu(e.algorithm,t)}_iterate(t,e){return cs(this._ctx,t,e,this._ctx.table.core)}clone(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&Di(n,t),e._ctx=n,e}raw(){return this._ctx.valueMapper=null,this}each(t){var e=this._ctx;return this._read((n=>cs(e,t,n,e.table.core)))}count(t){return this._read((t=>{const e=this._ctx,n=e.table.core;if(os(e,!0))return n.count({trans:t,query:{index:us(e,n.schema),range:e.range}}).then((t=>Math.min(t,e.limit)));var r=0;return cs(e,(()=>(++r,!1)),t,n).then((()=>r))})).then(t)}sortBy(t,e){const n=t.split(".").reverse(),r=n[0],o=n.length-1;function i(t,e){return e?i(t[n[e]],e-1):t[r]}var a="next"===this._ctx.dir?1:-1;function u(t,e){var n=i(t,o),r=i(e,o);return n<r?-a:n>r?a:0}return this.toArray((function(t){return t.sort(u)})).then(e)}toArray(t){return this._read((t=>{var e=this._ctx;if("next"===e.dir&&os(e,!0)&&e.limit>0){const{valueMapper:n}=e,r=us(e,e.table.core.schema);return e.table.core.query({trans:t,limit:e.limit,values:!0,query:{index:r,range:e.range}}).then((({result:t})=>n?t.map(n):t))}{const n=[];return cs(e,(t=>n.push(t)),t,e.table.core).then((()=>n))}}),t)}offset(t){var e=this._ctx;return t<=0||(e.offset+=t,os(e)?as(e,(()=>{var e=t;return(t,n)=>0===e||(1===e?(--e,!1):(n((()=>{t.advance(e),e=0})),!1))})):as(e,(()=>{var e=t;return()=>--e<0}))),this}limit(t){return this._ctx.limit=Math.min(this._ctx.limit,t),as(this._ctx,(()=>{var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this}until(t,e){return is(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this}first(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)}last(t){return this.reverse().first(t)}filter(t){var e,n;return is(this._ctx,(function(e){return t(e.value)})),e=this._ctx,n=t,e.isMatch=Xu(e.isMatch,n),this}and(t){return this.filter(t)}or(t){return new this.db.WhereClause(this._ctx.table,t,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(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))}eachUniqueKey(t){return this._ctx.unique="unique",this.eachKey(t)}eachPrimaryKey(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))}keys(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)}primaryKeys(t){var e=this._ctx;if("next"===e.dir&&os(e,!0)&&e.limit>0)return this._read((t=>{var n=us(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((({result:t})=>t)).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)}uniqueKeys(t){return this._ctx.unique="unique",this.keys(t)}firstKey(t){return this.limit(1).keys((function(t){return t[0]})).then(t)}lastKey(t){return this.reverse().firstKey(t)}distinct(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return is(this._ctx,(function(t){var e=t.primaryKey.toString(),r=$i(n,e);return n[e]=!0,!r})),this}modify(t){var e=this._ctx;return this._write((n=>{var r;if("function"==typeof t)r=t;else{var o=Ri(t),i=o.length;r=function(e){for(var n=!1,r=0;r<i;++r){var a=o[r],u=t[a];Ji(e,a)!==u&&(Xi(e,a,u),n=!0)}return n}}const a=e.table.core,{outbound:u,extractKey:s}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const h=[],p=(t,e)=>{const{failures:n,numFailures:r}=e;f+=t-r;for(let t of Ri(n))l.push(n[t])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((h=>{const d=[],v=[],y=u?[]:null,g=[];for(let t=0;t<f;++t){const e=h[t],n={value:ia(e),primKey:o[l+t]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[l+t]):u||0===fs(s(e),s(n.value))?(v.push(n.value),u&&y.push(o[l+t])):(g.push(o[l+t]),d.push(n.value)))}const m=os(e)&&e.limit===1/0&&("function"!=typeof t||t===vs)&&{index:e.index,range:e.range};return Promise.resolve(d.length>0&&a.mutate({trans:n,type:"add",values:d}).then((t=>{for(let e in t.failures)g.splice(parseInt(e),1);p(d.length,t)}))).then((()=>(v.length>0||m&&"object"==typeof t)&&a.mutate({trans:n,type:"put",keys:y,values:v,criteria:m,changeSpec:"function"!=typeof t&&t}).then((t=>p(v.length,t))))).then((()=>(g.length>0||m&&t===vs)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((t=>p(g.length,t))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new Oa("Error modifying one or more objects",l,f,h);return o.length}))}))}))}delete(){var t=this._ctx,e=t.range;return os(t)&&(t.isPrimKey&&!Yu||3===e.type)?this._write((n=>{const{primaryKey:r}=t.table.core.schema,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((e=>t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:t,lastResult:n,results:r,numFailures:o})=>{if(o)throw new Oa("Could not delete some values",Object.keys(t).map((e=>t[e])),e-o);return e-o}))))})):this.modify(vs)}}const vs=(t,e)=>e.value=null;function ys(t,e){return t<e?-1:t===e?0:1}function gs(t,e){return t>e?-1:t===e?0:1}function ms(t,e,n){var r=t instanceof Es?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r}function bs(t){return new t.Collection(t,(()=>xs(""))).limit(0)}function ws(t,e,n,r,o,i){for(var a=Math.min(t.length,r.length),u=-1,s=0;s<a;++s){var c=e[s];if(c!==r[s])return o(t[s],n[s])<0?t.substr(0,s)+n[s]+n.substr(s+1):o(t[s],r[s])<0?t.substr(0,s)+r[s]+n.substr(s+1):u>=0?t.substr(0,u)+e[u]+n.substr(u+1):null;o(t[s],c)<0&&(u=s)}return a<r.length&&"next"===i?t+n.substr(t.length):a<t.length&&"prev"===i?t.substr(0,n.length):u<0?null:t.substr(0,u)+r[u]+n.substr(u+1)}function _s(t,e,n,r){var o,i,a,u,s,c,l,f=n.length;if(!n.every((t=>"string"==typeof t)))return ms(t,"String expected.");function h(t){o=function(t){return"next"===t?t=>t.toUpperCase():t=>t.toLowerCase()}(t),i=function(t){return"next"===t?t=>t.toLowerCase():t=>t.toUpperCase()}(t),a="next"===t?ys:gs;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return a(t.lower,e.lower)}));u=e.map((function(t){return t.upper})),s=e.map((function(t){return t.lower})),c=t,l="next"===t?"":r}h("next");var p=new t.Collection(t,(()=>Ss(u[0],s[f-1]+r)));p._ondirectionchange=function(t){h(t)};var d=0;return p._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var h=i(o);if(e(h,s,d))return!0;for(var p=null,v=d;v<f;++v){var y=ws(o,h,u[v],s[v],a,c);null===y&&null===p?d=v+1:(null===p||a(p,y)>0)&&(p=y)}return n(null!==p?function(){t.continue(p+l)}:r),!1})),p}function Ss(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}}function xs(t){return{type:1,lower:t,upper:t}}class Es{get Collection(){return this._ctx.table.db.Collection}between(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?bs(this):new this.Collection(this,(()=>Ss(t,e,!n,!r)))}catch(t){return ms(this,Gu)}}equals(t){return null==t?ms(this,Gu):new this.Collection(this,(()=>xs(t)))}above(t){return null==t?ms(this,Gu):new this.Collection(this,(()=>Ss(t,void 0,!0)))}aboveOrEqual(t){return null==t?ms(this,Gu):new this.Collection(this,(()=>Ss(t,void 0,!1)))}below(t){return null==t?ms(this,Gu):new this.Collection(this,(()=>Ss(void 0,t,!1,!0)))}belowOrEqual(t){return null==t?ms(this,Gu):new this.Collection(this,(()=>Ss(void 0,t)))}startsWith(t){return"string"!=typeof t?ms(this,"String expected."):this.between(t,t+zu,!0,!0)}startsWithIgnoreCase(t){return""===t?this.startsWith(t):_s(this,((t,e)=>0===t.indexOf(e[0])),[t],zu)}equalsIgnoreCase(t){return _s(this,((t,e)=>t===e[0]),[t],"")}anyOfIgnoreCase(){var t=ha.apply(fa,arguments);return 0===t.length?bs(this):_s(this,((t,e)=>-1!==e.indexOf(t)),t,"")}startsWithAnyOfIgnoreCase(){var t=ha.apply(fa,arguments);return 0===t.length?bs(this):_s(this,((t,e)=>e.some((e=>0===t.indexOf(e)))),t,zu)}anyOf(){const t=ha.apply(fa,arguments);let e=this._cmp;try{t.sort(e)}catch(t){return ms(this,Gu)}if(0===t.length)return bs(this);const n=new this.Collection(this,(()=>Ss(t[0],t[t.length-1])));n._ondirectionchange=n=>{e="next"===n?this._ascending:this._descending,t.sort(e)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;e(a,t[r])>0;)if(++r,r===t.length)return o(i),!1;return 0===e(a,t[r])||(o((()=>{n.continue(t[r])})),!1)})),n}notEqual(t){return this.inAnyRange([[-1/0,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const t=ha.apply(fa,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return ms(this,Gu)}const e=t.reduce(((t,e)=>t?t.concat([[t[t.length-1][1],e]]):[[-1/0,e]]),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})}inAnyRange(t,e){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===t.length)return bs(this);if(!t.every((t=>void 0!==t[0]&&void 0!==t[1]&&r(t[0],t[1])<=0)))return ms(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Pa.InvalidArgument);const u=!e||!1!==e.includeLowers,s=e&&!0===e.includeUppers;let c,l=r;function f(t,e){return l(t[0],e[0])}try{c=t.reduce((function(t,e){let r=0,o=t.length;for(;r<o;++r){const o=t[r];if(n(e[0],o[1])<0&&n(e[1],o[0])>0){o[0]=i(o[0],e[0]),o[1]=a(o[1],e[1]);break}}return r===o&&t.push(e),t}),[]),c.sort(f)}catch(t){return ms(this,Gu)}let h=0;const p=s?t=>r(t,c[h][1])>0:t=>r(t,c[h][1])>=0,d=u?t=>o(t,c[h][0])>0:t=>o(t,c[h][0])>=0;let v=p;const y=new this.Collection(this,(()=>Ss(c[0][0],c[c.length-1][1],!u,!s)));return y._ondirectionchange=t=>{"next"===t?(v=p,l=r):(v=d,l=o),c.sort(f)},y._addAlgorithm(((t,e,n)=>{for(var o=t.key;v(o);)if(++h,h===c.length)return e(n),!1;return!!function(t){return!p(t)&&!d(t)}(o)||(0===this._cmp(o,c[h][1])||0===this._cmp(o,c[h][0])||e((()=>{l===r?t.continue(c[h][0]):t.continue(c[h][1])})),!1)})),y}startsWithAnyOf(){const t=ha.apply(fa,arguments);return t.every((t=>"string"==typeof t))?0===t.length?bs(this):this.inAnyRange(t.map((t=>[t,t+zu]))):ms(this,"startsWithAnyOf() only works with strings")}}function Os(t){return xu((function(e){return js(e),t(e.target.error),!1}))}function js(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()}const As=ns(null,"storagemutated");class Cs{_lock(){return Wi(!ou.global),++this._reculock,1!==this._reculock||ou.global||(ou.lockOwnerFor=this),this}_unlock(){if(Wi(!ou.global),0==--this._reculock)for(ou.global||(ou.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{$u(t[1],t[0])}catch(t){}}return this}_locked(){return this._reculock&&ou.lockOwnerFor!==this}create(t){if(!this.mode)return this;const e=this.db.idbdb,n=this.db._state.dbOpenError;if(Wi(!this.idbtrans),!t&&!e)switch(n&&n.name){case"DatabaseClosedError":throw new Pa.DatabaseClosed(n);case"MissingAPIError":throw new Pa.MissingAPI(n.message,n);default:throw new Pa.OpenFailed(n)}if(!this.active)throw new Pa.TransactionInactive;return Wi(null===this._completion._state),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):e.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=xu((e=>{js(e),this._reject(t.error)})),t.onabort=xu((e=>{js(e),this.active&&this._reject(new Pa.Abort(t.error)),this.active=!1,this.on("abort").fire(e)})),t.oncomplete=xu((()=>{this.active=!1,this._resolve(),"mutatedParts"in t&&As.storagemutated.fire(t.mutatedParts)})),this}_promise(t,e,n){if("readwrite"===t&&"readwrite"!==this.mode)return Hu(new Pa.ReadOnly("Transaction is readonly"));if(!this.active)return Hu(new Pa.TransactionInactive);if(this._locked())return new su(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(t,e,n).then(r,o)},ou])}));if(n)return ku((()=>{var t=new su(((t,n)=>{this._lock();const r=e(t,n,this);r&&r.then&&r.then(t,n)}));return t.finally((()=>this._unlock())),t._lib=!0,t}));var r=new su(((t,n)=>{var r=e(t,n,this);r&&r.then&&r.then(t,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(t){var e=this._root();const n=su.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((()=>n));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new su(((t,r)=>{n.then((n=>e._waitingQueue.push(xu(t.bind(null,n)))),(t=>e._waitingQueue.push(xu(r.bind(null,t))))).finally((()=>{e._waitingFor===o&&(e._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Pa.Abort))}table(t){const e=this._memoizedTables||(this._memoizedTables={});if($i(e,t))return e[t];const n=this.schema[t];if(!n)throw new Pa.NotFound("Table "+t+" not part of transaction");const r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r}}function Ps(t,e,n,r,o,i,a){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+ks(e)}}function ks(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""}function Ts(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:Yi(n,(t=>[t.name,t]))}}let Is=t=>{try{return t.only([[]]),Is=()=>[[]],[[]]}catch(t){return Is=()=>zu,zu}};function Rs(t){return null==t?()=>{}:"string"==typeof t?function(t){return 1===t.split(".").length?e=>e[t]:e=>Ji(e,t)}(t):e=>Ji(e,t)}function Ls(t){return[].slice.call(t)}let Ds=0;function Ms(t){return null==t?":id":"string"==typeof t?t:`[${t.join("+")}]`}function Ns({_novip:t},e){const n=e.db,r=function(t,e,{IDBKeyRange:n,indexedDB:r},o){const i=function(t,e){return e.reduce(((t,{create:e})=>({...t,...e(t)})),t)}(function(t,e,n){function r(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=t;return void 0===n?void 0===r?null:e.upperBound(r,!!i):void 0===r?e.lowerBound(n,!!o):e.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(t,e){const n=Ls(t.objectStoreNames);return{schema:{name:t.name,tables:n.map((t=>e.objectStore(t))).map((t=>{const{keyPath:e,autoIncrement:n}=t,r=Li(e),o=null==e,i={},a={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:Rs(e)},indexes:Ls(t.indexNames).map((e=>t.index(e))).map((t=>{const{name:e,unique:n,multiEntry:r,keyPath:o}=t,a={name:e,compound:Li(o),keyPath:o,unique:n,multiEntry:r,extractKey:Rs(o)};return i[Ms(o)]=a,a})),getIndexByKeyPath:t=>i[Ms(t)]};return i[":id"]=a.primaryKey,null!=e&&(i[Ms(e)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in e.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(t,n),a=o.tables.map((t=>function(t){const e=t.name;return{name:e,schema:t,mutate:function({trans:t,type:n,keys:o,values:i,range:a}){return new Promise(((u,s)=>{u=xu(u);const c=t.objectStore(e),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:h}=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===h)return u({numFailures:0,failures:{},results:[],lastResult:void 0});let p;const d=[],v=[];let y=0;const g=t=>{++y,js(t)};if("deleteRange"===n){if(4===a.type)return u({numFailures:y,failures:v,results:[],lastResult:void 0});3===a.type?d.push(p=c.clear()):d.push(p=c.delete(r(a)))}else{const[t,e]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<h;++r)d.push(p=e&&void 0!==e[r]?c[n](t[r],e[r]):c[n](t[r])),p.onerror=g;else for(let e=0;e<h;++e)d.push(p=c[n](t[e])),p.onerror=g}const m=t=>{const e=t.target.result;d.forEach(((t,e)=>null!=t.error&&(v[e]=t.error))),u({numFailures:y,failures:v,results:"delete"===n?o:d.map((t=>t.result)),lastResult:e})};p.onerror=t=>{g(t),m(t)},p.onsuccess=m}))},getMany:({trans:t,keys:n})=>new Promise(((r,o)=>{r=xu(r);const i=t.objectStore(e),a=n.length,u=new Array(a);let s,c=0,l=0;const f=t=>{const e=t.target;u[e._pos]=e.result,++l===c&&r(u)},h=Os(o);for(let t=0;t<a;++t)null!=n[t]&&(s=i.get(n[t]),s._pos=t,s.onsuccess=f,s.onerror=h,++c);0===c&&r(u)})),get:({trans:t,key:n})=>new Promise(((r,o)=>{r=xu(r);const i=t.objectStore(e).get(n);i.onsuccess=t=>r(t.target.result),i.onerror=Os(o)})),query:function(t){return n=>new Promise(((o,i)=>{o=xu(o);const{trans:a,values:u,limit:s,query:c}=n,l=s===1/0?void 0:s,{index:f,range:h}=c,p=a.objectStore(e),d=f.isPrimaryKey?p:p.index(f.name),v=r(h);if(0===s)return o({result:[]});if(t){const t=u?d.getAll(v,l):d.getAllKeys(v,l);t.onsuccess=t=>o({result:t.target.result}),t.onerror=Os(i)}else{let t=0;const e=u||!("openKeyCursor"in d)?d.openCursor(v):d.openKeyCursor(v),n=[];e.onsuccess=r=>{const i=e.result;return i?(n.push(u?i.value:i.primaryKey),++t===s?o({result:n}):void i.continue()):o({result:n})},e.onerror=Os(i)}}))}(i),openCursor:function({trans:t,values:n,query:o,reverse:i,unique:a}){return new Promise(((u,s)=>{u=xu(u);const{index:c,range:l}=o,f=t.objectStore(e),h=c.isPrimaryKey?f:f.index(c.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in h)?h.openCursor(r(l),p):h.openKeyCursor(r(l),p);d.onerror=Os(s),d.onsuccess=xu((e=>{const n=d.result;if(!n)return void u(null);n.___id=++Ds,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=t,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=xu(s),n.next=function(){let t=1;return this.start((()=>t--?this.continue():this.stop())).then((()=>this))},n.start=t=>{const e=new Promise(((t,e)=>{t=xu(t),d.onerror=Os(e),n.fail=e,n.stop=e=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,t(e)}})),u=()=>{if(d.result)try{t()}catch(t){n.fail(t)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return d.onsuccess=xu((t=>{d.onsuccess=u,u()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,u(),e},u(n)}),s)}))},count({query:t,trans:n}){const{index:o,range:i}=t;return new Promise(((t,a)=>{const u=n.objectStore(e),s=o.isPrimaryKey?u:u.index(o.name),c=r(i),l=c?s.count(c):s.count();l.onsuccess=xu((e=>t(e.target.result))),l.onerror=Os(a)}))}}}(t))),u={};return a.forEach((t=>u[t.name]=t)),{stack:"dbcore",transaction:t.transaction.bind(t),table(t){if(!u[t])throw new Error(`Table '${t}' not found`);return u[t]},MIN_KEY:-1/0,MAX_KEY:Is(e),schema:o}}(e,n,o),t.dbcore);return{dbcore:i}}(t._middlewares,n,t._deps,e);t.core=r.dbcore,t.tables.forEach((e=>{const n=e.name;t.core.schema.tables.some((t=>t.name===n))&&(e.core=t.core.table(n),t[n]instanceof t.Table&&(t[n].core=e.core))}))}function $s({_novip:t},e,n,r){n.forEach((n=>{const o=r[n];e.forEach((e=>{const r=Vi(e,n);(!r||"value"in r&&void 0===r.value)&&(e===t.Transaction.prototype||e instanceof t.Transaction?Fi(e,n,{get(){return this.table(n)},set(t){Ui(this,n,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):e[n]=new t.Table(n,o))}))}))}function Bs({_novip:t},e){e.forEach((e=>{for(let n in e)e[n]instanceof t.Table&&delete e[n]}))}function Us(t,e){return t._cfg.version-e._cfg.version}function Fs(t,e){const n={del:[],add:[],change:[]};let r;for(r in t)e[r]||n.del.push(r);for(r in e){const o=t[r],i=e[r];if(o){const t={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Wu)t.recreate=!0,n.change.push(t);else{const e=o.idxByName,r=i.idxByName;let a;for(a in e)r[a]||t.del.push(a);for(a in r){const n=e[a],o=r[a];n?n.src!==o.src&&t.change.push(o):t.add.push(o)}(t.del.length>0||t.add.length>0||t.change.length>0)&&n.change.push(t)}}else n.add.push([r,i])}return n}function Ks(t,e,n,r){const o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((t=>Hs(o,t))),o}function Hs(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})}function Vs(t,e,n){const r={};return Gi(e.objectStoreNames,0).forEach((t=>{const e=n.objectStore(t);let o=e.keyPath;const i=Ps(ks(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let t=0;t<e.indexNames.length;++t){const n=e.index(e.indexNames[t]);o=n.keyPath;var u=Ps(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(u)}r[t]=Ts(t,i,a)})),r}function zs({_novip:t},e,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);t._hasGetAll="getAll"in a;for(let t=0;t<a.indexNames.length;++t){const n=a.indexNames[t],r=a.index(n).keyPath,o="string"==typeof r?r:"["+Gi(r).join("+")+"]";if(e[i]){const t=e[i].idxByName[o];t&&(t.name=n,delete e[i].idxByName[o],e[i].idxByName[n]=t)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&Ii.WorkerGlobalScope&&Ii instanceof Ii.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(t._hasGetAll=!1)}class Gs{_parseStoresSpec(t,e){Ri(t).forEach((n=>{if(null!==t[n]){var r=t[n].split(",").map(((t,e)=>{const n=(t=t.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Ps(n,r||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),Li(r),0===e)})),o=r.shift();if(o.multi)throw new Pa.Schema("Primary key cannot be multi-valued");r.forEach((t=>{if(t.auto)throw new Pa.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new Pa.Schema("Index must have a name and cannot be an empty string")})),e[n]=Ts(n,o,r)}}))}stores(t){const e=this.db;this._cfg.storesSource=this._cfg.storesSource?Di(this._cfg.storesSource,t):t;const n=e._versions,r={};let o={};return n.forEach((t=>{Di(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,Bs(e,[e._allTables,e,e.Transaction.prototype]),$s(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],Ri(o),o),e._storeNames=Ri(o),this}upgrade(t){return this._cfg.contentUpgrade=Ua(this._cfg.contentUpgrade||Ia,t),this}}function qs(t,e){let n=t._dbNamesDB;return n||(n=t._dbNamesDB=new dc("__dbnames",{addons:[],indexedDB:t,IDBKeyRange:e}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Ws(t){return t&&"function"==typeof t.databases}function Zs(t){return ku((function(){return ou.letThrough=!0,t()}))}function Ys(){var t;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()})).finally((function(){return clearInterval(t)})):Promise.resolve()}function Js(t){var e=e=>t.next(e),n=o(e),r=o((e=>t.throw(e)));function o(t){return e=>{var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):Li(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()}function Xs(t,e,n){var r=arguments.length;if(r<2)throw new Pa.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=ea(o);return[t,i,n]}function Qs(t,e,n,r,o){return su.resolve().then((()=>{const i=ou.transless||ou,a=t._createTransaction(e,n,t._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===Aa.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((()=>Qs(t,e,n,null,o)))):Hu(r)}const s=pa(o);let c;s&&Tu();const l=su.follow((()=>{if(c=o.call(a,a),c)if(s){var t=Iu.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=Js(c))}),u);return(c&&"function"==typeof c.then?su.resolve(c).then((t=>a.active?t:Hu(new Pa.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((t=>(r&&a._resolve(),a._completion.then((()=>t))))).catch((t=>(a._reject(t),Hu(t))))}))}function tc(t,e,n){const r=Li(t)?t.slice():[t];for(let t=0;t<n;++t)r.push(e);return r}const ec={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return{...t,table(e){const n=t.table(e),{schema:r}=n,o={},i=[];function a(t,e,n){const r=Ms(t),u=o[r]=o[r]||[],s=null==t?0:"string"==typeof t?1:t.length,c=e>0,l={...n,isVirtual:c,keyTail:e,keyLength:s,extractKey:Rs(t),unique:!c&&n.unique};return u.push(l),l.isPrimaryKey||i.push(l),s>1&&a(2===s?t[0]:t.slice(0,s-1),e+1,n),u.sort(((t,e)=>t.keyTail-e.keyTail)),l}const u=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[u];for(const t of r.indexes)a(t.keyPath,0,t);function s(e){const n=e.query.index;return n.isVirtual?{...e,query:{index:n,range:(r=e.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:tc(r.lower,r.lowerOpen?t.MAX_KEY:t.MIN_KEY,o),lowerOpen:!0,upper:tc(r.upper,r.upperOpen?t.MIN_KEY:t.MAX_KEY,o),upperOpen:!0})}}:e;var r,o}const c={...n,schema:{...r,primaryKey:u,indexes:i,getIndexByKeyPath:function(t){const e=o[Ms(t)];return e&&e[0]}},count:t=>n.count(s(t)),query:t=>n.query(s(t)),openCursor(e){const{keyTail:r,isVirtual:o,keyLength:i}=e.query.index;return o?n.openCursor(s(e)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(tc(o,e.reverse?t.MAX_KEY:t.MIN_KEY,r)):e.unique?n.continue(n.key.slice(0,i).concat(e.reverse?t.MIN_KEY:t.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(e,o){n.continuePrimaryKey(tc(e,t.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const t=n.key;return 1===i?t[0]:t.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(e)}};return c}}}};function nc(t,e,n,r){return n=n||{},r=r||"",Ri(t).forEach((o=>{if($i(e,o)){var i=t[o],a=e[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const t=sa(i);t!==sa(a)?n[r+o]=e[o]:"Object"===t?nc(i,a,n,r+o+"."):i!==a&&(n[r+o]=e[o])}else i!==a&&(n[r+o]=e[o])}else n[r+o]=void 0})),Ri(e).forEach((o=>{$i(t,o)||(n[r+o]=e[o])})),n}const rc={stack:"dbcore",name:"HooksMiddleware",level:2,create:t=>({...t,table(e){const n=t.table(e),{primaryKey:r}=n.schema,o={...n,mutate(t){const o=ou.trans,{deleting:i,creating:a,updating:u}=o.table(e).hook;switch(t.type){case"add":if(a.fire===Ia)break;return o._promise("readwrite",(()=>s(t)),!0);case"put":if(a.fire===Ia&&u.fire===Ia)break;return o._promise("readwrite",(()=>s(t)),!0);case"delete":if(i.fire===Ia)break;return o._promise("readwrite",(()=>s(t)),!0);case"deleteRange":if(i.fire===Ia)break;return o._promise("readwrite",(()=>function(t){return c(t.trans,t.range,1e4)}(t)),!0)}return n.mutate(t);function s(t){const e=ou.trans,o=t.keys||function(t,e){return"delete"===e.type?e.keys:e.keys||e.values.map(t.extractKey)}(r,t);if(!o)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?{...t,keys:o}:{...t}).type&&(t.values=[...t.values]),t.keys&&(t.keys=[...t.keys]),function(t,e,n){return"add"===e.type?Promise.resolve([]):t.getMany({trans:e.trans,keys:n,cache:"immutable"})}(n,t,o).then((s=>{const c=o.map(((n,o)=>{const c=s[o],l={onerror:null,onsuccess:null};if("delete"===t.type)i.fire.call(l,n,c,e);else if("add"===t.type||void 0===c){const i=a.fire.call(l,n,t.values[o],e);null==n&&null!=i&&(n=i,t.keys[o]=n,r.outbound||Xi(t.values[o],r.keyPath,n))}else{const r=nc(c,t.values[o]),i=u.fire.call(l,r,n,c,e);if(i){const e=t.values[o];Object.keys(i).forEach((t=>{$i(e,t)?e[t]=i[t]:Xi(e,t,i[t])}))}}return l}));return n.mutate(t).then((({failures:e,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(e[r]):a.onsuccess&&a.onsuccess("put"===t.type&&s[r]?t.values[r]:i)}return{failures:e,results:n,numFailures:r,lastResult:i}})).catch((t=>(c.forEach((e=>e.onerror&&e.onerror(t))),Promise.reject(t))))}))}function c(t,e,o){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:o}).then((({result:n})=>s({type:"delete",keys:n,trans:t}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(t,{...e,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function oc(t,e,n){try{if(!e)return null;if(e.keys.length<t.length)return null;const r=[];for(let o=0,i=0;o<e.keys.length&&i<t.length;++o)0===fs(e.keys[o],t[i])&&(r.push(n?ia(e.values[o]):e.values[o]),++i);return r.length===t.length?r:null}catch(t){return null}}const ic={stack:"dbcore",level:-1,create:t=>({table:e=>{const n=t.table(e);return{...n,getMany:t=>{if(!t.cache)return n.getMany(t);const e=oc(t.keys,t.trans._cache,"clone"===t.cache);return e?su.resolve(e):n.getMany(t).then((e=>(t.trans._cache={keys:t.keys,values:"clone"===t.cache?ia(e):e},e)))},mutate:t=>("add"!==t.type&&(t.trans._cache=null),n.mutate(t))}}})};function ac(t){return!("from"in t)}const uc=function(t,e){if(!this){const e=new uc;return t&&"d"in t&&Di(e,t),e}Di(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0})};function sc(t,e,n){const r=fs(e,n);if(isNaN(r))return;if(r>0)throw RangeError();if(ac(t))return Di(t,{from:e,to:n,d:1});const o=t.l,i=t.r;if(fs(n,t.from)<0)return o?sc(o,e,n):t.l={from:e,to:n,d:1,l:null,r:null},fc(t);if(fs(e,t.to)>0)return i?sc(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},fc(t);fs(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),fs(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);const a=!t.r;o&&!t.l&&cc(t,o),i&&a&&cc(t,i)}function cc(t,e){ac(e)||function t(e,{from:n,to:r,l:o,r:i}){sc(e,n,r),o&&t(e,o),i&&t(e,i)}(t,e)}function lc(t){let e=ac(t)?null:{s:0,n:t};return{next(t){const n=arguments.length>0;for(;e;)switch(e.s){case 0:if(e.s=1,n)for(;e.n.l&&fs(t,e.n.from)<0;)e={up:e,n:e.n.l,s:1};else for(;e.n.l;)e={up:e,n:e.n.l,s:1};case 1:if(e.s=2,!n||fs(t,e.n.to)<=0)return{value:e.n,done:!1};case 2:if(e.n.r){e.s=3,e={up:e,n:e.n.r,s:0};continue}case 3:e=e.up}return{done:!0}}}}function fc(t){var e,n;const r=((null===(e=t.r)||void 0===e?void 0:e.d)||0)-((null===(n=t.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const e="r"===o?"l":"r",n={...t},r=t[o];t.from=r.from,t.to=r.to,t[o]=r[o],n[o]=r[e],t[e]=n,n.d=hc(n)}t.d=hc(t)}function hc({r:t,l:e}){return(t?e?Math.max(t.d,e.d):t.d:e?e.d:0)+1}Bi(uc.prototype,{add(t){return cc(this,t),this},addKey(t){return sc(this,t,t),this},addKeys(t){return t.forEach((t=>sc(this,t,t))),this},[ca](){return lc(this)}});const pc={stack:"dbcore",level:0,create:t=>{const e=t.schema.name,n=new uc(t.MIN_KEY,t.MAX_KEY);return{...t,table:r=>{const o=t.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:u,outbound:s}=a,c={...o,mutate:t=>{const a=t.trans,u=a.mutatedParts||(a.mutatedParts={}),s=t=>{const n=`idb://${e}/${r}/${t}`;return u[n]||(u[n]=new uc)},c=s(""),l=s(":dels"),{type:f}=t;let[h,p]="deleteRange"===t.type?[t.range]:"delete"===t.type?[t.keys]:t.values.length<50?[[],t.values]:[];const d=t.trans._cache;return o.mutate(t).then((t=>{if(Li(h)){"delete"!==f&&(h=t.results),c.addKeys(h);const e=oc(h,d);e||"add"===f||l.addKeys(h),(e||p)&&function(t,e,n,r){e.indexes.forEach((function(e){const o=t(e.name||"");function i(t){return null!=t?e.extractKey(t):null}const a=t=>e.multiEntry&&Li(t)?t.forEach((t=>o.addKey(t))):o.addKey(t);(n||r).forEach(((t,e)=>{const o=n&&i(n[e]),u=r&&i(r[e]);0!==fs(o,u)&&(null!=o&&a(o),null!=u&&a(u))}))}))}(s,i,e,p)}else if(h){const t={from:h.lower,to:h.upper};l.add(t),c.add(t)}else c.add(n),l.add(n),i.indexes.forEach((t=>s(t.name).add(n)));return t}))}},l=({query:{index:e,range:n}})=>{var r,o;return[e,new uc(null!==(r=n.lower)&&void 0!==r?r:t.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:t.MAX_KEY)]},f={get:t=>[a,new uc(t.key)],getMany:t=>[a,(new uc).addKeys(t.keys)],count:l,query:l,openCursor:l};return Ri(f).forEach((t=>{c[t]=function(i){const{subscr:a}=ou;if(a){const c=t=>{const n=`idb://${e}/${r}/${t}`;return a[n]||(a[n]=new uc)},l=c(""),h=c(":dels"),[p,d]=f[t](i);if(c(p.name||"").add(d),!p.isPrimaryKey){if("count"!==t){const e="query"===t&&s&&i.values&&o.query({...i,values:!1});return o[t].apply(this,arguments).then((n=>{if("query"===t){if(s&&i.values)return e.then((({result:t})=>(l.addKeys(t),n)));const t=i.values?n.result.map(u):n.result;i.values?l.addKeys(t):h.addKeys(t)}else if("openCursor"===t){const t=n,e=i.values;return t&&Object.create(t,{key:{get:()=>(h.addKey(t.primaryKey),t.key)},primaryKey:{get(){const e=t.primaryKey;return h.addKey(e),e}},value:{get:()=>(e&&l.addKey(t.primaryKey),t.value)}})}return n}))}h.add(n)}}return o[t].apply(this,arguments)}})),c}}}};class dc{constructor(t,e){this._middlewares={},this.verno=0;const n=dc.dependencies;this._options=e={addons:dc.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...e},this._deps={indexedDB:e.indexedDB,IDBKeyRange:e.IDBKeyRange};const{addons:r}=e;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:Ia,dbReadyPromise:null,cancelOpen:Ia,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new su((t=>{o.dbReadyResolve=t})),o.openCanceller=new su(((t,e)=>{o.cancelOpen=e})),this._state=o,this.name=t,this.on=ns(this,"populate","blocked","versionchange","close",{ready:[Ua,Ia]}),this.on.ready.subscribe=qi(this.on.ready.subscribe,(t=>(e,n)=>{dc.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||su.resolve().then(e),n&&t(e);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(e),n&&t(e);else{t(e);const r=this;n||t((function t(){r.on.ready.unsubscribe(e),r.on.ready.unsubscribe(t)}))}}))})),this.Collection=(i=this,rs(ds.prototype,(function(t,e){this.db=i;let n=Qu,r=null;if(e)try{n=e()}catch(t){r=t}const o=t._ctx,a=o.table,u=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:u!==Ra?u:null}}))),this.Table=function(t){return rs(es.prototype,(function(e,n,r){this.db=t,this._tx=r,this.name=e,this.schema=n,this.hook=t._allTables[e]?t._allTables[e].hook:ns(null,{creating:[Ma,Ia],reading:[La,Ra],updating:[$a,Ia],deleting:[Na,Ia]})}))}(this),this.Transaction=function(t){return rs(Cs.prototype,(function(e,n,r,o,i){this.db=t,this.mode=e,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=ns(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 su(((t,e)=>{this._resolve=t,this._reject=e})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(t=>{var e=this.active;return this.active=!1,this.on.error.fire(t),this.parent?this.parent._reject(t):e&&this.idbtrans&&this.idbtrans.abort(),Hu(t)}))}))}(this),this.Version=function(t){return rs(Gs.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(t){return rs(Es.prototype,(function(e,n,r){this.db=t,this._ctx={table:e,index:":id"===n?null:n,or:r};const o=t._deps.indexedDB;if(!o)throw new Pa.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(t,e)=>o.cmp(e,t),this._max=(t,e)=>o.cmp(t,e)>0?t:e,this._min=(t,e)=>o.cmp(t,e)<0?t:e,this._IDBKeyRange=t._deps.IDBKeyRange}))}(this),this.on("versionchange",(t=>{t.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",(t=>{!t.newVersion||t.newVersion<t.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${t.oldVersion/10}`)})),this._maxKey=Is(e.IDBKeyRange),this._createTransaction=(t,e,n,r)=>new this.Transaction(t,e,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=t=>{this.on("blocked").fire(t),qu.filter((t=>t.name===this.name&&t!==this&&!t._state.vcFired)).map((e=>e.on("versionchange").fire(t)))},this.use(ec),this.use(rc),this.use(pc),this.use(ic),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((t=>t(this)))}version(t){if(isNaN(t)||t<.1)throw new Pa.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new Pa.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);const e=this._versions;var n=e.filter((e=>e._cfg.version===t))[0];return n||(n=new this.Version(t),e.push(n),e.sort(Us),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(t){return this.idbdb&&(this._state.openComplete||ou.letThrough||this._vip)?t():new su(((t,e)=>{if(this._state.openComplete)return e(new Pa.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void e(new Pa.DatabaseClosed);this.open().catch(Ia)}this._state.dbReadyPromise.then(t,e)})).then(t)}use({stack:t,create:e,level:n,name:r}){r&&this.unuse({stack:t,name:r});const o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:e,level:null==n?10:n,name:r}),o.sort(((t,e)=>t.level-e.level)),this}unuse({stack:t,name:e,create:n}){return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((t=>n?t.create!==n:!!e&&t.name!==e))),this}open(){return function(t){const e=t._state,{indexedDB:n}=t._deps;if(e.isBeingOpened||t.idbdb)return e.dbReadyPromise.then((()=>e.dbOpenError?Hu(e.dbOpenError):t));da&&(e.openCanceller._stackHolder=ma()),e.isBeingOpened=!0,e.dbOpenError=null,e.openComplete=!1;const r=e.openCanceller;function o(){if(e.openCanceller!==r)throw new Pa.DatabaseClosed("db.open() was cancelled")}let i=e.dbReadyResolve,a=null,u=!1;return su.race([r,("undefined"==typeof navigator?su.resolve():Ys()).then((()=>new su(((r,i)=>{if(o(),!n)throw new Pa.MissingAPI;const s=t.name,c=e.autoSchema?n.open(s):n.open(s,Math.round(10*t.verno));if(!c)throw new Pa.MissingAPI;c.onerror=Os(i),c.onblocked=xu(t._fireOnBlocked),c.onupgradeneeded=xu((r=>{if(a=c.transaction,e.autoSchema&&!t._options.allowEmptyDB){c.onerror=js,a.abort(),c.result.close();const t=n.deleteDatabase(s);t.onsuccess=t.onerror=xu((()=>{i(new Pa.NoSuchDatabase(`Database ${s} doesnt exist`))}))}else{a.onerror=Os(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;u=o<1,t._novip.idbdb=c.result,function(t,e,n,r){const o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),u=ou.transless||ou;ku((()=>{ou.trans=i,ou.transless=u,0===e?(Ri(o).forEach((t=>{Ks(n,t,o[t].primKey,o[t].indexes)})),Ns(t,n),su.follow((()=>t.on.populate.fire(i))).catch(a)):function({_novip:t},e,n,r){const o=[],i=t._versions;let a=t._dbSchema=Vs(0,t.idbdb,r),u=!1;return i.filter((t=>t._cfg.version>=e)).forEach((i=>{o.push((()=>{const o=a,s=i._cfg.dbschema;zs(t,o,r),zs(t,s,r),a=t._dbSchema=s;const c=Fs(o,s);c.add.forEach((t=>{Ks(r,t[0],t[1].primKey,t[1].indexes)})),c.change.forEach((t=>{if(t.recreate)throw new Pa.Upgrade("Not yet support for changing primary key");{const e=r.objectStore(t.name);t.add.forEach((t=>Hs(e,t))),t.change.forEach((t=>{e.deleteIndex(t.name),Hs(e,t)})),t.del.forEach((t=>e.deleteIndex(t)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>e){Ns(t,r),n._memoizedTables={},u=!0;let e=Qi(s);c.del.forEach((t=>{e[t]=o[t]})),Bs(t,[t.Transaction.prototype]),$s(t,[t.Transaction.prototype],Ri(e),e),n.schema=e;const i=pa(l);let a;i&&Tu();const f=su.follow((()=>{if(a=l(n),a&&i){var t=Iu.bind(null,null);a.then(t,t)}}));return a&&"function"==typeof a.then?su.resolve(a):f.then((()=>a))}})),o.push((e=>{u&&Zu||function(t,e){[].slice.call(e.db.objectStoreNames).forEach((n=>null==t[n]&&e.db.deleteObjectStore(n)))}(i._cfg.dbschema,e),Bs(t,[t.Transaction.prototype]),$s(t,[t.Transaction.prototype],t._storeNames,t._dbSchema),n.schema=t._dbSchema}))})),function t(){return o.length?su.resolve(o.shift()(n.idbtrans)).then(t):su.resolve()}().then((()=>{var t,e;e=r,Ri(t=a).forEach((n=>{e.db.objectStoreNames.contains(n)||Ks(e,n,t[n].primKey,t[n].indexes)}))}))}(t,e,i,n).catch(a)}))}(t,o/10,a,i)}}),i),c.onsuccess=xu((()=>{a=null;const n=t._novip.idbdb=c.result,o=Gi(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");e.autoSchema?function({_novip:t},e,n){t.verno=e.version/10;const r=t._dbSchema=Vs(0,e,n);t._storeNames=Gi(e.objectStoreNames,0),$s(t,[t._allTables],Ri(r),r)}(t,n,r):(zs(t,t._dbSchema,r),function(t,e){const n=Fs(Vs(0,t.idbdb,e),t._dbSchema);return!(n.add.length||n.change.some((t=>t.add.length||t.change.length)))}(t,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Ns(t,r)}catch(t){}var i;qu.push(t),n.onversionchange=xu((n=>{e.vcFired=!0,t.on("versionchange").fire(n)})),n.onclose=xu((e=>{t.on("close").fire(e)})),u&&function({indexedDB:t,IDBKeyRange:e},n){!Ws(t)&&"__dbnames"!==n&&qs(t,e).put({name:n}).catch(Ia)}(t._deps,s),r()}),i)}))))]).then((()=>(o(),e.onReadyBeingFired=[],su.resolve(Zs((()=>t.on.ready.fire(t.vip)))).then((function n(){if(e.onReadyBeingFired.length>0){let r=e.onReadyBeingFired.reduce(Ua,Ia);return e.onReadyBeingFired=[],su.resolve(Zs((()=>r(t.vip)))).then(n)}}))))).finally((()=>{e.onReadyBeingFired=null,e.isBeingOpened=!1})).then((()=>t)).catch((n=>{e.dbOpenError=n;try{a&&a.abort()}catch(t){}return r===e.openCanceller&&t._close(),Hu(n)})).finally((()=>{e.openComplete=!0,i()}))}(this)}_close(){const t=this._state,e=qu.indexOf(this);if(e>=0&&qu.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(t){}this._novip.idbdb=null}t.dbReadyPromise=new su((e=>{t.dbReadyResolve=e})),t.openCanceller=new su(((e,n)=>{t.cancelOpen=n}))}close(){this._close();const t=this._state;this._options.autoOpen=!1,t.dbOpenError=new Pa.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}delete(){const t=arguments.length>0,e=this._state;return new su(((n,r)=>{const o=()=>{this.close();var t=this._deps.indexedDB.deleteDatabase(this.name);t.onsuccess=xu((()=>{!function({indexedDB:t,IDBKeyRange:e},n){!Ws(t)&&"__dbnames"!==n&&qs(t,e).delete(n).catch(Ia)}(this._deps,this.name),n()})),t.onerror=Os(r),t.onblocked=this._fireOnBlocked};if(t)throw new Pa.InvalidArgument("Arguments not allowed in db.delete()");e.isBeingOpened?e.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return Ri(this._allTables).map((t=>this._allTables[t]))}transaction(){const t=Xs.apply(this,arguments);return this._transaction.apply(this,t)}_transaction(t,e,n){let r=ou.trans;r&&r.db===this&&-1===t.indexOf("!")||(r=null);const o=-1!==t.indexOf("?");let i,a;t=t.replace("!","").replace("?","");try{if(a=e.map((t=>{var e=t instanceof this.Table?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||"readonly"===t)i="readonly";else{if("rw"!=t&&"readwrite"!=t)throw new Pa.InvalidArgument("Invalid transaction mode: "+t);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Pa.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((t=>{if(r&&-1===r.storeNames.indexOf(t)){if(!o)throw new Pa.SubTransaction("Table "+t+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(t){return r?r._promise(null,((e,n)=>{n(t)})):Hu(t)}const u=Qs.bind(null,this,i,a,r,n);return r?r._promise(i,u,"lock"):ou.trans?$u(ou.transless,(()=>this._whenReady(u))):this._whenReady(u)}table(t){if(!$i(this._allTables,t))throw new Pa.InvalidTable(`Table ${t} does not exist`);return this._allTables[t]}}const vc="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class yc{constructor(t){this._subscribe=t}subscribe(t,e,n){return this._subscribe(t&&"function"!=typeof t?t:{next:t,error:e,complete:n})}[vc](){return this}}function gc(t,e){return Ri(e).forEach((n=>{cc(t[n]||(t[n]=new uc),e[n])})),t}let mc;try{mc={indexedDB:Ii.indexedDB||Ii.mozIndexedDB||Ii.webkitIndexedDB||Ii.msIndexedDB,IDBKeyRange:Ii.IDBKeyRange||Ii.webkitIDBKeyRange}}catch(Ii){mc={indexedDB:null,IDBKeyRange:null}}const bc=dc;function wc(t){let e=_c;try{_c=!0,As.storagemutated.fire(t)}finally{_c=e}}Bi(bc,{...Ta,delete:t=>new bc(t,{addons:[]}).delete(),exists:t=>new bc(t,{addons:[]}).open().then((t=>(t.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(t){try{return function({indexedDB:t,IDBKeyRange:e}){return Ws(t)?Promise.resolve(t.databases()).then((t=>t.map((t=>t.name)).filter((t=>"__dbnames"!==t)))):qs(t,e).toCollection().primaryKeys()}(bc.dependencies).then(t)}catch(t){return Hu(new Pa.MissingAPI)}},defineClass:()=>function(t){Di(this,t)},ignoreTransaction:t=>ou.trans?$u(ou.transless,t):t(),vip:Zs,async:function(t){return function(){try{var e=Js(t.apply(this,arguments));return e&&"function"==typeof e.then?e:su.resolve(e)}catch(t){return Hu(t)}}},spawn:function(t,e,n){try{var r=Js(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:su.resolve(r)}catch(t){return Hu(t)}},currentTransaction:{get:()=>ou.trans||null},waitFor:function(t,e){const n=su.resolve("function"==typeof t?bc.ignoreTransaction(t):t).timeout(e||6e4);return ou.trans?ou.trans.waitFor(n):n},Promise:su,debug:{get:()=>da,set:t=>{va(t,"dexie"===t?()=>!0:Ju)}},derive:Ki,extend:Di,props:Bi,override:qi,Events:ns,on:As,liveQuery:function(t){return new yc((e=>{const n=pa(t);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,As.storagemutated.unsubscribe(l)}};e.start&&e.start(a);let u=!1,s=!1;function c(){return Ri(i).some((t=>o[t]&&function(t,e){const n=lc(e);let r=n.next();if(r.done)return!1;let o=r.value;const i=lc(t);let a=i.next(o.from),u=a.value;for(;!r.done&&!a.done;){if(fs(u.from,o.to)<=0&&fs(u.to,o.from)>=0)return!0;fs(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(o[t],i[t])))}const l=t=>{gc(o,t),c()&&f()},f=()=>{if(u||r)return;o={};const h={},p=function(e){n&&Tu();const r=()=>ku(t,{subscr:e,trans:null}),o=ou.trans?$u(ou.transless,r):r();return n&&o.then(Iu,Iu),o}(h);s||(As("storagemutated",l),s=!0),u=!0,Promise.resolve(p).then((t=>{u=!1,r||(c()?f():(o={},i=h,e.next&&e.next(t)))}),(t=>{u=!1,e.error&&e.error(t),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:gc,getByKeyPath:Ji,setByKeyPath:Xi,delByKeyPath:function(t,e){"string"==typeof e?Xi(t,e,void 0):"length"in e&&[].map.call(e,(function(e){Xi(t,e,void 0)}))},shallowClone:Qi,deepClone:ia,getObjectDiff:nc,cmp:fs,asap:Zi,minKey:-1/0,addons:[],connections:qu,errnames:Aa,dependencies:mc,semVer:"3.2.1",version:"3.2.1".split(".").map((t=>parseInt(t))).reduce(((t,e,n)=>t+e/Math.pow(10,2*n)))}),bc.maxKey=Is(bc.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(As("storagemutated",(t=>{if(!_c){let e;Wu?(e=document.createEvent("CustomEvent"),e.initCustomEvent("x-storagemutated-1",!0,!0,t)):e=new CustomEvent("x-storagemutated-1",{detail:t}),_c=!0,dispatchEvent(e),_c=!1}})),addEventListener("x-storagemutated-1",(({detail:t})=>{_c||wc(t)})));let _c=!1;if("undefined"!=typeof BroadcastChannel){const t=new BroadcastChannel("x-storagemutated-1");As("storagemutated",(e=>{_c||t.postMessage(e)})),t.onmessage=t=>{t.data&&wc(t.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){As("storagemutated",(t=>{try{_c||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:t})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((e=>e.postMessage({type:"x-storagemutated-1",changedParts:t}))))}catch(t){}})),addEventListener("storage",(t=>{if("x-storagemutated-1"===t.key){const e=JSON.parse(t.newValue);e&&wc(e.changedParts)}}));const t=self.document&&navigator.serviceWorker;t&&t.addEventListener("message",(function({data:t}){t&&"x-storagemutated-1"===t.type&&wc(t.changedParts)}))}function Sc(t){return Sc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Sc(t)}function xc(t,e){return!e||"object"!==Oc(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ec(t,e){return Ec=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ec(t,e)}su.rejectionMapper=function(t,e){if(!t||t instanceof xa||t instanceof TypeError||t instanceof SyntaxError||!t.name||!ka[t.name])return t;var n=new ka[t.name](e||t.message,t);return"stack"in t&&Fi(n,"stack",{get:function(){return this.inner.stack}}),n},va(da,Ju);var Oc=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},jc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ec(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=Sc(e);if(n){var o=Sc(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return xc(this,t)});function o(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),t.syncQueue=t.table("syncQueue"),t.dynamicOfflineData=t.table("dynamicOfflineData"),t}return o}(dc);(0,B.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});try{self["workbox:window:6.5.1"]&&_()}catch(pt){}function Ac(t,e){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(t){n(t.data)},t.postMessage(e,[r.port2])}))}function Cc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}try{self["workbox:core:6.5.1"]&&_()}catch(pt){}var Pc=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))};function kc(t,e){var n=location.href;return new URL(t,n).href===new URL(e,n).href}var Tc=function(t,e){this.type=t,Object.assign(this,e)};function Ic(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function Rc(){}var Lc={type:"SKIP_WAITING"};function Dc(t,e){if(!e)return t&&t.then?t.then(Rc):Promise.resolve()}function Mc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Nc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $c(t){return function(e){var n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Mc(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mc(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,M.useState)(t.getState())),r=n[0],o=n[1];(0,M.useEffect)((function(){return t.subscribe((function(t){return o(t)}))}),[]);var i={};return e&&(i=(0,M.useMemo)((function(){return function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,e)}),[t,e])),function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Nc(t,e,n[e])}))}return t}({},r,i)}}!function(t){var e,n;function r(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new Pc,r.en=new Pc,r.on=new Pc,r.un=0,r.an=new Set,r.cn=function(){var t=r.fn,e=t.installing;r.tn>0||!kc(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,t.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(t){var e=r.fn,n=t.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:t};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new Tc(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===n&&r.dispatchEvent(new Tc("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(t){var e=r.hn,n=e!==navigator.serviceWorker.controller;r.dispatchEvent(new Tc("controlling",{isExternal:n,originalEvent:t,sw:e,isUpdate:r.mn})),n||r.on.resolve(e)},r.gn=(o=function(t){var e=t.data,n=t.ports,o=t.source;return Ic(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Tc("message",{data:e,originalEvent:t,ports:n,sw:o}))}))},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(o.apply(this,t))}catch(t){return Promise.reject(t)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var o,i=r.prototype;i.register=function(t){var e=(void 0===t?{}:t).immediate,n=void 0!==e&&e;try{var r=this;return function(t,e){var n=t();return n&&n.then?n.then(e):e()}((function(){if(!n&&"complete"!==document.readyState)return Dc(new Promise((function(t){return window.addEventListener("load",t)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),Ic(r.bn(),(function(t){r.fn=t,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 e=r.fn.waiting;return e&&kc(e.scriptURL,r.sn.toString())&&(r.hn=e,Promise.resolve().then((function(){r.dispatchEvent(new Tc("waiting",{sw:e,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(t){return Promise.reject(t)}},i.update=function(){try{return this.fn?Dc(this.fn.update()):void 0}catch(t){return Promise.reject(t)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(t){try{return Ic(this.getSW(),(function(e){return Ac(e,t)}))}catch(t){return Promise.reject(t)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&Ac(this.fn.waiting,Lc)},i.pn=function(){var t=navigator.serviceWorker.controller;return t&&kc(t.scriptURL,this.sn.toString())?t:void 0},i.bn=function(){try{var t=this;return function(t,e){try{var n=t()}catch(t){return e(t)}return n&&n.then?n.then(void 0,e):n}((function(){return Ic(navigator.serviceWorker.register(t.sn,t.nn),(function(e){return t.un=performance.now(),e}))}),(function(t){throw t}))}catch(t){return Promise.reject(t)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(r.prototype,o)}(function(){function t(){this.Pn=new Map}var e=t.prototype;return e.addEventListener=function(t,e){this.Sn(t).add(e)},e.removeEventListener=function(t,e){this.Sn(t).delete(e)},e.dispatchEvent=function(t){t.target=this;for(var e,n=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Cc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cc(t,e):void 0}}(t))){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[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=t[Symbol.iterator]()).next.bind(n)}(this.Sn(t.type));!(e=n()).done;)(0,e.value)(t)},e.Sn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},t}()),new jc,(0,B.createGlobalStore)("offline-synchronization",{}),M.default.createContext({moduleName:""}),d(103),d(435);try{n(9902).createContext()}catch(r){}var Bc,Uc,Fc=d(64);function Kc(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))}function Hc(t,e){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:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){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=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}Fc.default.default||Fc.default,function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLoadError"}(Bc||(Bc={})),function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLloadErroroadError"}(Uc||(Uc={})),$c((0,$.getExtensionInternalStore)()),$c((0,$.getExtensionStore)());var Vc,zc=function(){},Gc=void 0,qc=Object,Wc=function(t){return t===Gc},Zc=function(t){return"function"==typeof t},Yc=function(t,e){return qc.assign({},t,e)},Jc="undefined",Xc=function(){return typeof window!=Jc},Qc=new WeakMap,tl=0,el=function(t){var e,n,r=typeof t,o=t&&t.constructor,i=o==Date;if(qc(t)!==t||i||o==RegExp)e=i?t.toJSON():"symbol"==r?t.toString():"string"==r?JSON.stringify(t):""+t;else{if(e=Qc.get(t))return e;if(e=++tl+"~",Qc.set(t,e),o==Array){for(e="@",n=0;n<t.length;n++)e+=el(t[n])+",";Qc.set(t,e)}if(o==qc){e="#";for(var a=qc.keys(t).sort();!Wc(n=a.pop());)Wc(t[n])||(e+=n+":"+el(t[n])+",");Qc.set(t,e)}}return e},nl=!0,rl=Xc(),ol=typeof document!=Jc,il=rl&&window.addEventListener?window.addEventListener.bind(window):zc,al=ol?document.addEventListener.bind(document):zc,ul=rl&&window.removeEventListener?window.removeEventListener.bind(window):zc,sl=ol?document.removeEventListener.bind(document):zc,cl={isOnline:function(){return nl},isVisible:function(){var t=ol&&document.visibilityState;return Wc(t)||"hidden"!==t}},ll={initFocus:function(t){return al("visibilitychange",t),il("focus",t),function(){sl("visibilitychange",t),ul("focus",t)}},initReconnect:function(t){var e=function(){nl=!0,t()},n=function(){nl=!1};return il("online",e),il("offline",n),function(){ul("online",e),ul("offline",n)}}},fl=!Xc()||"Deno"in window,hl=fl?M.useEffect:M.useLayoutEffect,pl="undefined"!=typeof navigator&&navigator.connection,dl=!fl&&pl&&(["slow-2g","2g"].includes(pl.effectiveType)||pl.saveData),vl=function(t){if(Zc(t))try{t=t()}catch(e){t=""}var e=[].concat(t);return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?el(t):"",e,t?"$swr$"+t:""]},yl=new WeakMap,gl=function(t,e,n,r,o,i,a){void 0===a&&(a=!0);var u=yl.get(t),s=u[0],c=u[1],l=u[3],f=s[e],h=c[e];if(a&&h)for(var p=0;p<h.length;++p)h[p](n,r,o);return i&&(delete l[e],f&&f[0])?f[0](2).then((function(){return t.get(e)})):t.get(e)},ml=0,bl=function(){return++ml},wl=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Kc(void 0,void 0,void 0,(function(){var e,n,r,o,i,a,u,s,c,l,f,h,p,d,v,y,g,m,b,w;return Hc(this,(function(_){switch(_.label){case 0:if(e=t[0],n=t[1],r=t[2],o=t[3],a=!!Wc((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,s=!1!==i.rollbackOnError,c=i.optimisticData,l=vl(n),f=l[0],h=l[2],!f)return[2];if(p=yl.get(e),d=p[2],t.length<3)return[2,gl(e,f,e.get(f),Gc,Gc,u,!0)];if(v=r,g=bl(),d[f]=[g,0],m=!Wc(c),b=e.get(f),m&&(e.set(f,c),gl(e,f,c)),Zc(v))try{v=v(e.get(f))}catch(t){y=t}return v&&Zc(v.then)?[4,v.catch((function(t){y=t}))]:[3,2];case 1:if(v=_.sent(),g!==d[f][0]){if(y)throw y;return[2,v]}y&&m&&s&&(a=!0,v=b,e.set(f,b)),_.label=2;case 2:return a&&(y||(Zc(a)&&(v=a(v,b)),e.set(f,v)),e.set(h,Yc(e.get(h),{error:y}))),d[f][1]=bl(),[4,gl(e,f,v,y,Gc,u,!!a)];case 3:if(w=_.sent(),y)throw y;return[2,a?w:v]}}))}))},_l=function(t,e){for(var n in t)t[n][0]&&t[n][0](e)},Sl=function(t,e){if(!yl.has(t)){var n=Yc(ll,e),r={},o=wl.bind(Gc,t),i=zc;if(yl.set(t,[r,{},{},{},o]),!fl){var a=n.initFocus(setTimeout.bind(Gc,_l.bind(Gc,r,0))),u=n.initReconnect(setTimeout.bind(Gc,_l.bind(Gc,r,1)));i=function(){a&&a(),u&&u(),yl.delete(t)}}return[t,o,i]}return[t,yl.get(t)[4]]},xl=Sl(new Map),El=xl[0],Ol=xl[1],jl=Yc({onLoadingSlow:zc,onSuccess:zc,onError:zc,onErrorRetry:function(t,e,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!Wc(i)&&a>i||setTimeout(r,u,o)},onDiscarded:zc,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:dl?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:dl?5e3:3e3,compare:function(t,e){return el(t)==el(e)},isPaused:function(){return!1},cache:El,mutate:Ol,fallback:{}},cl),Al=(0,M.createContext)({}),Cl=(qc.defineProperty((function(t){var e=t.value,n=function(t,e){var n=Yc(t,e);if(e){var r=t.use,o=t.fallback,i=e.use,a=e.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=Yc(o,a))}return n}((0,M.useContext)(Al),e),r=e&&e.provider,o=(0,M.useState)((function(){return r?Sl(r(n.cache||El),e):Gc}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),hl((function(){return o?o[2]:Gc}),[]),(0,M.createElement)(Al.Provider,Yc(t,{value:n}))}),"default",{value:jl}),d(23)),Pl=d.n(Cl),kl=d(701),Tl=d.n(kl);Pl().extend(Tl()),Vc=function(t,e){document.documentElement.style.setProperty(t,e)},(0,D.defineConfigSchema)("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:D.Type.String},"Brand color #2":{_default:"#004144",_type:D.Type.String},"Brand color #3":{_default:"#007d79",_type:D.Type.String}}),(0,D.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(t){t.loaded&&t.config&&(Vc("--brand-01",t.config["Brand color #1"]),Vc("--brand-02",t.config["Brand color #2"]),Vc("--brand-03",t.config["Brand color #3"]))})),c("omrs-logo-full-color",r),c("omrs-logo-full-mono",r),c("omrs-logo-full-grey",r),c("omrs-logo-partial-color",o),c("omrs-logo-partial-mono",o),c("omrs-logo-partial-grey",o),c("omrs-logo-icon-color",i),c("omrs-logo-icon-mono",i),c("omrs-logo-icon-grey",i),c("omrs-logo-white",a),c("omrs-icon-visibility",l),c("omrs-icon-menu",f),c("omrs-icon-search",h),c("omrs-icon-arrow-back",p),c("omrs-icon-arrow-forward",v),c("omrs-icon-arrow-downward",y),c("omrs-icon-arrow-upward",g),c("omrs-icon-chevron-left",m),c("omrs-icon-chevron-right",b),c("omrs-icon-chevron-up",w),c("omrs-icon-chevron-down",S),c("omrs-icon-supervised-user-circle",x),c("omrs-icon-home",E),c("omrs-icon-close",O),c("omrs-icon-important-notification",j),c("omrs-icon-calendar",A),c("omrs-icon-access-time",C),c("omrs-icon-add",P),c("omrs-icon-remove",k),c("omrs-icon-check-circle",T),c("omrs-icon-zoomoutmap",I),c("omrs-icon-location",R),c("omrs-icon-download",L)})(),(()=>{"use strict";d.r(v)})(),v})())}}}))},8540:()=>{System.register(["dayjs","i18next"],(function(t,e){var n={},r={};return{setters:[function(t){n.default=t.default},function(t){r.default=t.default}],execute:function(){t((()=>{var t={4332:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},9014:function(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(t){return new o({date:t,utc:!0,args:arguments})},a.utc=function(e){var n=i(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=a.parse;a.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),u.call(this,t)};var s=a.init;a.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else s.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(t){void 0===t&&(t="");var r=t.match(e);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,u=this;if(o)return u.$offset=a,u.$u=0===r,u;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(u=this.local().add(a+s,t)).$offset=a,u.$x.$localOffset=s}else u=this.utc();return u};var l=a.format;a.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},a.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*t},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(t){return"s"===t&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var h=a.diff;a.diff=function(t,e,n){if(t&&this.$u===t.$u)return h.call(this,t,e,n);var r=this.local(),o=i(t).local();return h.call(r,o,e,n)}}}()},5923:(t,e,n)=>{"use strict";const r=n(2138),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),u=Symbol("allowStale"),s=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=()=>1,v=(t,e,n)=>{const r=t[h].get(e);if(r){const e=r.value;if(y(t,e)){if(m(t,r),!t[u])return}else n&&(t[p]&&(r.value.now=Date.now()),t[f].unshiftNode(r));return e.value}},y=(t,e)=>{if(!e||!e.maxAge&&!t[s])return!1;const n=Date.now()-e.now;return e.maxAge?n>e.maxAge:t[s]&&n>t[s]},g=t=>{if(t[i]>t[o])for(let e=t[f].tail;t[i]>t[o]&&null!==e;){const n=e.prev;m(t,e),e=n}},m=(t,e)=>{if(e){const n=e.value;t[c]&&t[c](n.key,n.value),t[i]-=n.length,t[h].delete(n.key),t[f].removeNode(e)}};class b{constructor(t,e,n,r,o){this.key=t,this.value=e,this.length=n,this.now=r,this.maxAge=o||0}}const w=(t,e,n,r)=>{let o=n.value;y(t,o)&&(m(t,n),t[u]||(o=void 0)),o&&e.call(r,o.value,o.key,t)};t.exports=class{constructor(t){if("number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[o]=t.max||1/0;const e=t.length||d;if(this[a]="function"!=typeof e?d:e,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[s]=t.maxAge||0,this[c]=t.dispose,this[l]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[o]=t||1/0,g(this)}get max(){return this[o]}set allowStale(t){this[u]=!!t}get allowStale(){return this[u]}set maxAge(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[s]=t,g(this)}get maxAge(){return this[s]}set lengthCalculator(t){"function"!=typeof t&&(t=d),t!==this[a]&&(this[a]=t,this[i]=0,this[f].forEach((t=>{t.length=this[a](t.value,t.key),this[i]+=t.length}))),g(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(t,e){e=e||this;for(let n=this[f].tail;null!==n;){const r=n.prev;w(this,t,n,e),n=r}}forEach(t,e){e=e||this;for(let n=this[f].head;null!==n;){const r=n.next;w(this,t,n,e),n=r}}keys(){return this[f].toArray().map((t=>t.key))}values(){return this[f].toArray().map((t=>t.value))}reset(){this[c]&&this[f]&&this[f].length&&this[f].forEach((t=>this[c](t.key,t.value))),this[h]=new Map,this[f]=new r,this[i]=0}dump(){return this[f].map((t=>!y(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[f]}set(t,e,n){if((n=n||this[s])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,u=this[a](e,t);if(this[h].has(t)){if(u>this[o])return m(this,this[h].get(t)),!1;const a=this[h].get(t).value;return this[c]&&(this[l]||this[c](t,a.value)),a.now=r,a.maxAge=n,a.value=e,this[i]+=u-a.length,a.length=u,this.get(t),g(this),!0}const p=new b(t,e,u,r,n);return p.length>this[o]?(this[c]&&this[c](t,e),!1):(this[i]+=p.length,this[f].unshift(p),this[h].set(t,this[f].head),g(this),!0)}has(t){if(!this[h].has(t))return!1;const e=this[h].get(t).value;return!y(this,e)}get(t){return v(this,t,!0)}peek(t){return v(this,t,!1)}pop(){const t=this[f].tail;return t?(m(this,t),t.value):null}del(t){m(this,this[h].get(t))}load(t){this.reset();const e=Date.now();for(let n=t.length-1;n>=0;n--){const r=t[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const t=o-e;t>0&&this.set(r.k,r.v,t)}}}prune(){this[h].forEach(((t,e)=>v(this,e,!1)))}}},1602:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=l(t,e,n);if("normal"===s.type){if(r=n.done?d:h,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=d,n.method="throw",n.arg=s.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function g(){}function m(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,i)&&(b=_);var S=m.prototype=y.prototype=Object.create(b);function x(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(o,i,a,u){var s=l(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function P(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return g.prototype=m,s(S,"constructor",m),s(m,"constructor",g),g.displayName=s(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},x(E.prototype),s(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(S),s(S,u,"Generator"),s(S,i,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=P,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},4074:(t,e,n)=>{const r=Symbol("SemVer ANY");class o{static get ANY(){return r}constructor(t,e){if(e=i(e),t instanceof o){if(t.loose===!!e.loose)return t;t=t.value}c("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(t){const e=this.options.loose?a[u.COMPARATORLOOSE]:a[u.COMPARATOR],n=t.match(e);if(!n)throw new TypeError(`Invalid comparator: ${t}`);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(t){if(c("Comparator.test",t,this.options.loose),this.semver===r||t===r)return!0;if("string"==typeof t)try{t=new l(t,this.options)}catch(t){return!1}return s(t,this.operator,this.semver,this.options)}intersects(t,e){if(!(t instanceof o))throw new TypeError("a Comparator is required");if(e&&"object"==typeof e||(e={loose:!!e,includePrerelease:!1}),""===this.operator)return""===this.value||new f(t.value,e).test(this.value);if(""===t.operator)return""===t.value||new f(this.value,e).test(t.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),i=this.semver.version===t.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),u=s(this.semver,"<",t.semver,e)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),c=s(this.semver,">",t.semver,e)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return n||r||i&&a||u||c}}t.exports=o;const i=n(156),{re:a,t:u}=n(887),s=n(2401),c=n(3843),l=n(9405),f=n(4355)},4355:(t,e,n)=>{class r{constructor(t,e){if(e=i(e),t instanceof r)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new r(t.raw,e);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((t=>this.parseRange(t.trim()))).filter((t=>t.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${t}`);if(this.set.length>1){const t=this.set[0];if(this.set=this.set.filter((t=>!d(t[0]))),0===this.set.length)this.set=[t];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&v(t[0])){this.set=[t];break}}this.format()}format(){return this.range=this.set.map((t=>t.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(t){t=t.trim();const e=`parseRange:${Object.keys(this.options).join(",")}:${t}`,n=o.get(e);if(n)return n;const r=this.options.loose,i=r?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];t=t.replace(i,A(this.options.includePrerelease)),u("hyphen replace",t),t=t.replace(c[l.COMPARATORTRIM],f),u("comparator trim",t,c[l.COMPARATORTRIM]),t=(t=(t=t.replace(c[l.TILDETRIM],h)).replace(c[l.CARETTRIM],p)).split(/\s+/).join(" ");const s=r?c[l.COMPARATORLOOSE]:c[l.COMPARATOR],v=t.split(" ").map((t=>g(t,this.options))).join(" ").split(/\s+/).map((t=>j(t,this.options))).filter(this.options.loose?t=>!!t.match(s):()=>!0).map((t=>new a(t,this.options))),y=(v.length,new Map);for(const t of v){if(d(t))return[t];y.set(t.value,t)}y.size>1&&y.has("")&&y.delete("");const m=[...y.values()];return o.set(e,m),m}intersects(t,e){if(!(t instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>y(n,e)&&t.set.some((t=>y(t,e)&&n.every((n=>t.every((t=>n.intersects(t,e)))))))))}test(t){if(!t)return!1;if("string"==typeof t)try{t=new s(t,this.options)}catch(t){return!1}for(let e=0;e<this.set.length;e++)if(C(this.set[e],t,this.options))return!0;return!1}}t.exports=r;const o=new(n(5923))({max:1e3}),i=n(156),a=n(4074),u=n(3843),s=n(9405),{re:c,t:l,comparatorTrimReplace:f,tildeTrimReplace:h,caretTrimReplace:p}=n(887),d=t=>"<0.0.0-0"===t.value,v=t=>""===t.value,y=(t,e)=>{let n=!0;const r=t.slice();let o=r.pop();for(;n&&r.length;)n=r.every((t=>o.intersects(t,e))),o=r.pop();return n},g=(t,e)=>(u("comp",t,e),t=_(t,e),u("caret",t),t=b(t,e),u("tildes",t),t=x(t,e),u("xrange",t),t=O(t,e),u("stars",t),t),m=t=>!t||"x"===t.toLowerCase()||"*"===t,b=(t,e)=>t.trim().split(/\s+/).map((t=>w(t,e))).join(" "),w=(t,e)=>{const n=e.loose?c[l.TILDELOOSE]:c[l.TILDE];return t.replace(n,((e,n,r,o,i)=>{let a;return u("tilde",t,e,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?(u("replaceTilde pr",i),a=`>=${n}.${r}.${o}-${i} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${o} <${n}.${+r+1}.0-0`,u("tilde return",a),a}))},_=(t,e)=>t.trim().split(/\s+/).map((t=>S(t,e))).join(" "),S=(t,e)=>{u("caret",t,e);const n=e.loose?c[l.CARETLOOSE]:c[l.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,((e,n,o,i,a)=>{let s;return u("caret",t,e,n,o,i,a),m(n)?s="":m(o)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:m(i)?s="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(u("replaceCaret pr",a),s="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`):(u("no pr"),s="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`),u("caret return",s),s}))},x=(t,e)=>(u("replaceXRanges",t,e),t.split(/\s+/).map((t=>E(t,e))).join(" ")),E=(t,e)=>{t=t.trim();const n=e.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return t.replace(n,((n,r,o,i,a,s)=>{u("xRange",t,n,r,o,i,a,s);const c=m(o),l=c||m(i),f=l||m(a),h=f;return"="===r&&h&&(r=""),s=e.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&h?(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&&(s="-0"),n=`${r+o}.${i}.${a}${s}`):l?n=`>=${o}.0.0${s} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${s} <${o}.${+i+1}.0-0`),u("xRange return",n),n}))},O=(t,e)=>(u("replaceStars",t,e),t.trim().replace(c[l.STAR],"")),j=(t,e)=>(u("replaceGTE0",t,e),t.trim().replace(c[e.includePrerelease?l.GTE0PRE:l.GTE0],"")),A=t=>(e,n,r,o,i,a,u,s,c,l,f,h,p)=>`${n=m(r)?"":m(o)?`>=${r}.0.0${t?"-0":""}`:m(i)?`>=${r}.${o}.0${t?"-0":""}`:a?`>=${n}`:`>=${n}${t?"-0":""}`} ${s=m(c)?"":m(l)?`<${+c+1}.0.0-0`:m(f)?`<${c}.${+l+1}.0-0`:h?`<=${c}.${l}.${f}-${h}`:t?`<${c}.${l}.${+f+1}-0`:`<=${s}`}`.trim(),C=(t,e,n)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let n=0;n<t.length;n++)if(u(t[n].semver),t[n].semver!==a.ANY&&t[n].semver.prerelease.length>0){const r=t[n].semver;if(r.major===e.major&&r.minor===e.minor&&r.patch===e.patch)return!0}return!1}return!0}},9405:(t,e,n)=>{const r=n(3843),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=n(8202),{re:a,t:u}=n(887),s=n(156),{compareIdentifiers:c}=n(1630);class l{constructor(t,e){if(e=s(e),t instanceof l){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid Version: ${t}`);if(t.length>o)throw new TypeError(`version is longer than ${o} characters`);r("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const n=t.trim().match(e.loose?a[u.LOOSE]:a[u.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,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((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<i)return e}return t})):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(t){if(r("SemVer.compare",this.version,this.options,t),!(t instanceof l)){if("string"==typeof t&&t===this.version)return 0;t=new l(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof l||(t=new l(t,this.options)),c(this.major,t.major)||c(this.minor,t.minor)||c(this.patch,t.patch)}comparePre(t){if(t instanceof l||(t=new l(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{const n=this.prerelease[e],o=t.prerelease[e];if(r("prerelease compare",e,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(++e)}compareBuild(t){t instanceof l||(t=new l(t,this.options));let e=0;do{const n=this.build[e],o=t.build[e];if(r("prerelease compare",e,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(++e)}inc(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e),this.inc("pre",e);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 t=this.prerelease.length;for(;--t>=0;)"number"==typeof this.prerelease[t]&&(this.prerelease[t]++,t=-2);-1===t&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error(`invalid increment argument: ${t}`)}return this.format(),this.raw=this.version,this}}t.exports=l},953:(t,e,n)=>{const r=n(5497);t.exports=(t,e)=>{const n=r(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null}},2401:(t,e,n)=>{const r=n(8896),o=n(8378),i=n(9261),a=n(6647),u=n(3433),s=n(4622);t.exports=(t,e,n,c)=>{switch(e){case"===":return"object"==typeof t&&(t=t.version),"object"==typeof n&&(n=n.version),t===n;case"!==":return"object"==typeof t&&(t=t.version),"object"==typeof n&&(n=n.version),t!==n;case"":case"=":case"==":return r(t,n,c);case"!=":return o(t,n,c);case">":return i(t,n,c);case">=":return a(t,n,c);case"<":return u(t,n,c);case"<=":return s(t,n,c);default:throw new TypeError(`Invalid operator: ${e}`)}}},6839:(t,e,n)=>{const r=n(9405),o=n(5497),{re:i,t:a}=n(887);t.exports=(t,e)=>{if(t instanceof r)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;let n=null;if((e=e||{}).rtl){let e;for(;(e=i[a.COERCERTL].exec(t))&&(!n||n.index+n[0].length!==t.length);)n&&e.index+e[0].length===n.index+n[0].length||(n=e),i[a.COERCERTL].lastIndex=e.index+e[1].length+e[2].length;i[a.COERCERTL].lastIndex=-1}else n=t.match(i[a.COERCE]);return null===n?null:o(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,e)}},6218:(t,e,n)=>{const r=n(9405);t.exports=(t,e,n)=>{const o=new r(t,n),i=new r(e,n);return o.compare(i)||o.compareBuild(i)}},9643:(t,e,n)=>{const r=n(3308);t.exports=(t,e)=>r(t,e,!0)},3308:(t,e,n)=>{const r=n(9405);t.exports=(t,e,n)=>new r(t,n).compare(new r(e,n))},3948:(t,e,n)=>{const r=n(5497),o=n(8896);t.exports=(t,e)=>{if(o(t,e))return null;{const n=r(t),o=r(e),i=n.prerelease.length||o.prerelease.length,a=i?"pre":"",u=i?"prerelease":"";for(const t in n)if(("major"===t||"minor"===t||"patch"===t)&&n[t]!==o[t])return a+t;return u}}},8896:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>0===r(t,e,n)},9261:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>r(t,e,n)>0},6647:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>r(t,e,n)>=0},5791:(t,e,n)=>{const r=n(9405);t.exports=(t,e,n,o)=>{"string"==typeof n&&(o=n,n=void 0);try{return new r(t,n).inc(e,o).version}catch(t){return null}}},3433:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>r(t,e,n)<0},4622:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>r(t,e,n)<=0},629:(t,e,n)=>{const r=n(9405);t.exports=(t,e)=>new r(t,e).major},9986:(t,e,n)=>{const r=n(9405);t.exports=(t,e)=>new r(t,e).minor},8378:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>0!==r(t,e,n)},5497:(t,e,n)=>{const{MAX_LENGTH:r}=n(8202),{re:o,t:i}=n(887),a=n(9405),u=n(156);t.exports=(t,e)=>{if(e=u(e),t instanceof a)return t;if("string"!=typeof t)return null;if(t.length>r)return null;if(!(e.loose?o[i.LOOSE]:o[i.FULL]).test(t))return null;try{return new a(t,e)}catch(t){return null}}},9800:(t,e,n)=>{const r=n(9405);t.exports=(t,e)=>new r(t,e).patch},4408:(t,e,n)=>{const r=n(5497);t.exports=(t,e)=>{const n=r(t,e);return n&&n.prerelease.length?n.prerelease:null}},762:(t,e,n)=>{const r=n(3308);t.exports=(t,e,n)=>r(e,t,n)},2743:(t,e,n)=>{const r=n(6218);t.exports=(t,e)=>t.sort(((t,n)=>r(n,t,e)))},5312:(t,e,n)=>{const r=n(4355);t.exports=(t,e,n)=>{try{e=new r(e,n)}catch(t){return!1}return e.test(t)}},2354:(t,e,n)=>{const r=n(6218);t.exports=(t,e)=>t.sort(((t,n)=>r(t,n,e)))},4512:(t,e,n)=>{const r=n(5497);t.exports=(t,e)=>{const n=r(t,e);return n?n.version:null}},4770:(t,e,n)=>{const r=n(887);t.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:t=>{const e=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:e,MAX_SAFE_COMPONENT_LENGTH:16}},3843:t=>{const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=e},1630:t=>{const e=/^[0-9]+$/,n=(t,n)=>{const r=e.test(t),o=e.test(n);return r&&o&&(t=+t,n=+n),t===n?0:r&&!o?-1:o&&!r?1:t<n?-1:1};t.exports={compareIdentifiers:n,rcompareIdentifiers:(t,e)=>n(e,t)}},156:t=>{const e=["includePrerelease","loose","rtl"];t.exports=t=>t?"object"!=typeof t?{loose:!0}:e.filter((e=>t[e])).reduce(((t,e)=>(t[e]=!0,t)),{}):{}},887:(t,e,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(8202),o=n(3843),i=(e=t.exports={}).re=[],a=e.src=[],u=e.t={};let s=0;const c=(t,e,n)=>{const r=s++;o(r,e),u[t]=r,a[r]=e,i[r]=new RegExp(e,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[u.NUMERICIDENTIFIER]})\\.(${a[u.NUMERICIDENTIFIER]})\\.(${a[u.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${a[u.NUMERICIDENTIFIERLOOSE]})\\.(${a[u.NUMERICIDENTIFIERLOOSE]})\\.(${a[u.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${a[u.NUMERICIDENTIFIER]}|${a[u.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${a[u.NUMERICIDENTIFIERLOOSE]}|${a[u.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${a[u.PRERELEASEIDENTIFIER]}(?:\\.${a[u.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${a[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[u.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${a[u.BUILDIDENTIFIER]}(?:\\.${a[u.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${a[u.MAINVERSION]}${a[u.PRERELEASE]}?${a[u.BUILD]}?`),c("FULL",`^${a[u.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${a[u.MAINVERSIONLOOSE]}${a[u.PRERELEASELOOSE]}?${a[u.BUILD]}?`),c("LOOSE",`^${a[u.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${a[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${a[u.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${a[u.XRANGEIDENTIFIER]})(?:\\.(${a[u.XRANGEIDENTIFIER]})(?:\\.(${a[u.XRANGEIDENTIFIER]})(?:${a[u.PRERELEASE]})?${a[u.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${a[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[u.XRANGEIDENTIFIERLOOSE]})(?:${a[u.PRERELEASELOOSE]})?${a[u.BUILD]}?)?)?`),c("XRANGE",`^${a[u.GTLT]}\\s*${a[u.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${a[u.GTLT]}\\s*${a[u.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",a[u.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${a[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",c("TILDE",`^${a[u.LONETILDE]}${a[u.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${a[u.LONETILDE]}${a[u.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${a[u.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",c("CARET",`^${a[u.LONECARET]}${a[u.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${a[u.LONECARET]}${a[u.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${a[u.GTLT]}\\s*(${a[u.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${a[u.GTLT]}\\s*(${a[u.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${a[u.GTLT]}\\s*(${a[u.LOOSEPLAIN]}|${a[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${a[u.XRANGEPLAIN]})\\s+-\\s+(${a[u.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${a[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[u.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},715:(t,e,n)=>{const r=n(3260);t.exports=(t,e,n)=>r(t,e,">",n)},9560:(t,e,n)=>{const r=n(4355);t.exports=(t,e,n)=>(t=new r(t,n),e=new r(e,n),t.intersects(e))},6:(t,e,n)=>{const r=n(3260);t.exports=(t,e,n)=>r(t,e,"<",n)},4931:(t,e,n)=>{const r=n(9405),o=n(4355);t.exports=(t,e,n)=>{let i=null,a=null,u=null;try{u=new o(e,n)}catch(t){return null}return t.forEach((t=>{u.test(t)&&(i&&-1!==a.compare(t)||(i=t,a=new r(i,n)))})),i}},5891:(t,e,n)=>{const r=n(9405),o=n(4355);t.exports=(t,e,n)=>{let i=null,a=null,u=null;try{u=new o(e,n)}catch(t){return null}return t.forEach((t=>{u.test(t)&&(i&&1!==a.compare(t)||(i=t,a=new r(i,n)))})),i}},4925:(t,e,n)=>{const r=n(9405),o=n(4355),i=n(9261);t.exports=(t,e)=>{t=new o(t,e);let n=new r("0.0.0");if(t.test(n))return n;if(n=new r("0.0.0-0"),t.test(n))return n;n=null;for(let e=0;e<t.set.length;++e){const o=t.set[e];let a=null;o.forEach((t=>{const e=new r(t.semver.version);switch(t.operator){case">":0===e.prerelease.length?e.patch++:e.prerelease.push(0),e.raw=e.format();case"":case">=":a&&!i(e,a)||(a=e);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!a||n&&!i(n,a)||(n=a)}return n&&t.test(n)?n:null}},3260:(t,e,n)=>{const r=n(9405),o=n(4074),{ANY:i}=o,a=n(4355),u=n(5312),s=n(9261),c=n(3433),l=n(4622),f=n(6647);t.exports=(t,e,n,h)=>{let p,d,v,y,g;switch(t=new r(t,h),e=new a(e,h),n){case">":p=s,d=l,v=c,y=">",g=">=";break;case"<":p=c,d=f,v=s,y="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(t,e,h))return!1;for(let n=0;n<e.set.length;++n){const r=e.set[n];let a=null,u=null;if(r.forEach((t=>{t.semver===i&&(t=new o(">=0.0.0")),a=a||t,u=u||t,p(t.semver,a.semver,h)?a=t:v(t.semver,u.semver,h)&&(u=t)})),a.operator===y||a.operator===g)return!1;if((!u.operator||u.operator===y)&&d(t,u.semver))return!1;if(u.operator===g&&v(t,u.semver))return!1}return!0}},7795:(t,e,n)=>{const r=n(5312),o=n(3308);t.exports=(t,e,n)=>{const i=[];let a=null,u=null;const s=t.sort(((t,e)=>o(t,e,n)));for(const t of s)r(t,e,n)?(u=t,a||(a=t)):(u&&i.push([a,u]),u=null,a=null);a&&i.push([a,null]);const c=[];for(const[t,e]of i)t===e?c.push(t):e||t!==s[0]?e?t===s[0]?c.push(`<=${e}`):c.push(`${t} - ${e}`):c.push(`>=${t}`):c.push("*");const l=c.join(" || "),f="string"==typeof e.raw?e.raw:String(e);return l.length<f.length?l:e}},7732:(t,e,n)=>{const r=n(4355),o=n(4074),{ANY:i}=o,a=n(5312),u=n(3308),s=(t,e,n)=>{if(t===e)return!0;if(1===t.length&&t[0].semver===i){if(1===e.length&&e[0].semver===i)return!0;t=n.includePrerelease?[new o(">=0.0.0-0")]:[new o(">=0.0.0")]}if(1===e.length&&e[0].semver===i){if(n.includePrerelease)return!0;e=[new o(">=0.0.0")]}const r=new Set;let s,f,h,p,d,v,y;for(const e of t)">"===e.operator||">="===e.operator?s=c(s,e,n):"<"===e.operator||"<="===e.operator?f=l(f,e,n):r.add(e.semver);if(r.size>1)return null;if(s&&f){if(h=u(s.semver,f.semver,n),h>0)return null;if(0===h&&(">="!==s.operator||"<="!==f.operator))return null}for(const t of r){if(s&&!a(t,String(s),n))return null;if(f&&!a(t,String(f),n))return null;for(const r of e)if(!a(t,String(r),n))return!1;return!0}let g=!(!f||n.includePrerelease||!f.semver.prerelease.length)&&f.semver,m=!(!s||n.includePrerelease||!s.semver.prerelease.length)&&s.semver;g&&1===g.prerelease.length&&"<"===f.operator&&0===g.prerelease[0]&&(g=!1);for(const t of e){if(y=y||">"===t.operator||">="===t.operator,v=v||"<"===t.operator||"<="===t.operator,s)if(m&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===m.major&&t.semver.minor===m.minor&&t.semver.patch===m.patch&&(m=!1),">"===t.operator||">="===t.operator){if(p=c(s,t,n),p===t&&p!==s)return!1}else if(">="===s.operator&&!a(s.semver,String(t),n))return!1;if(f)if(g&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===g.major&&t.semver.minor===g.minor&&t.semver.patch===g.patch&&(g=!1),"<"===t.operator||"<="===t.operator){if(d=l(f,t,n),d===t&&d!==f)return!1}else if("<="===f.operator&&!a(f.semver,String(t),n))return!1;if(!t.operator&&(f||s)&&0!==h)return!1}return!(s&&v&&!f&&0!==h||f&&y&&!s&&0!==h||m||g)},c=(t,e,n)=>{if(!t)return e;const r=u(t.semver,e.semver,n);return r>0?t:r<0||">"===e.operator&&">="===t.operator?e:t},l=(t,e,n)=>{if(!t)return e;const r=u(t.semver,e.semver,n);return r<0?t:r>0||"<"===e.operator&&"<="===t.operator?e:t};t.exports=(t,e,n={})=>{if(t===e)return!0;t=new r(t,n),e=new r(e,n);let o=!1;t:for(const r of t.set){for(const t of e.set){const e=s(r,t,n);if(o=o||null!==e,e)continue t}if(o)return!1}return!0}},9663:(t,e,n)=>{const r=n(4355);t.exports=(t,e)=>new r(t,e).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")))},9965:(t,e,n)=>{const r=n(4355);t.exports=(t,e)=>{try{return new r(t,e).range||"*"}catch(t){return null}}},7968:(t,e,n)=>{const r=n(1577).R;e.s=function(t){if(t||(t=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,t)}},1577:(t,e,n)=>{e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},9961:t=>{"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}},2138:(t,e,n)=>{"use strict";function r(t){var e=this;if(e instanceof r||(e=new r),e.tail=null,e.head=null,e.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){e.push(t)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n<o;n++)e.push(arguments[n]);return e}function o(t,e){t.tail=new a(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function i(t,e){t.head=new a(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function a(t,e,n,r){if(!(this instanceof a))return new a(t,e,n,r);this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}t.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,n=t.prev;return e&&(e.prev=n),n&&(n.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=n),t.list.length--,t.next=null,t.prev=null,t.list=null,e},r.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},r.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}},r.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)o(this,arguments[t]);return this.length},r.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)i(this,arguments[t]);return this.length},r.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},r.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},r.prototype.forEach=function(t,e){e=e||this;for(var n=this.head,r=0;null!==n;r++)t.call(e,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(t,e){e=e||this;for(var n=this.tail,r=this.length-1;null!==n;r--)t.call(e,n.value,r,this),n=n.prev},r.prototype.get=function(t){for(var e=0,n=this.head;null!==n&&e<t;e++)n=n.next;if(e===t&&null!==n)return n.value},r.prototype.getReverse=function(t){for(var e=0,n=this.tail;null!==n&&e<t;e++)n=n.prev;if(e===t&&null!==n)return n.value},r.prototype.map=function(t,e){e=e||this;for(var n=new r,o=this.head;null!==o;)n.push(t.call(e,o.value,this)),o=o.next;return n},r.prototype.mapReverse=function(t,e){e=e||this;for(var n=new r,o=this.tail;null!==o;)n.push(t.call(e,o.value,this)),o=o.prev;return n},r.prototype.reduce=function(t,e){var n,r=this.head;if(arguments.length>1)n=e;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=t(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(t,e){var n,r=this.tail;if(arguments.length>1)n=e;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=t(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var t=new Array(this.length),e=0,n=this.head;null!==n;e++)t[e]=n.value,n=n.next;return t},r.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,n=this.tail;null!==n;e++)t[e]=n.value,n=n.prev;return t},r.prototype.slice=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var n=new r;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);for(var o=0,i=this.head;null!==i&&o<t;o++)i=i.next;for(;null!==i&&o<e;o++,i=i.next)n.push(i.value);return n},r.prototype.sliceReverse=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var n=new r;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);for(var o=this.length,i=this.tail;null!==i&&o>e;o--)i=i.prev;for(;null!==i&&o>t;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(t,e,...n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,o=this.head;null!==o&&r<t;r++)o=o.next;var i,u,s,c,l=[];for(r=0;o&&r<e;r++)l.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),r=0;r<n.length;r++)i=this,u=o,s=n[r],null===(c=u===i.head?new a(s,null,u,i):new a(s,u,u.next,i)).next&&(i.tail=c),null===c.prev&&(i.head=c),i.length++,o=c;return l},r.prototype.reverse=function(){for(var t=this.head,e=this.tail,n=t;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=e,this.tail=t,this};try{n(9961)(r)}catch(t){}},9688:t=>{"use strict";t.exports=n},7064:t=>{"use strict";t.exports=r}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var r=o[e]={exports:{}};return t[e].call(r.exports,r,r.exports,i),r.exports}i.y=e,i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t})();var a={};return(0,i(7968).s)(1),(()=>{"use strict";function t(t){return(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())-Date.UTC(t.getUTCFullYear(),0,0))/24/60/60/1e3}function e(t,e){var n=t.toISOString(),r=e.toISOString();return n.slice(0,n.indexOf("T"))===r.slice(0,r.indexOf("T"))}function n(n){var r=new Date,o=new Date(n),i=r.getUTCMonth()-o.getUTCMonth(),a=r.getUTCDate()-o.getUTCDate(),u=r.getUTCFullYear()-o.getUTCFullYear();(i<0||0===i&&a<0)&&u--;var s=i>=0?i:i+12;a<0&&s--;var c=s>0?"".concat(s," mo"):"",l=t(r)-t(o);l<0&&(l+=365);var f=Math.floor(l/7),h=l-7*f;return 0===u?e(r,o)?"Today":f<4||0===f?"".concat(l," day"):h>0?"".concat(f," wk ").concat(h," d"):"".concat(f," week"):u<2?"".concat(c," ").concat(u," yr").trim():u<18?"".concat(u," yr ").concat(c).trim():"".concat(u," years")}i.r(a),i.d(a,{age:()=>n,daysIntoYear:()=>t,formatDate:()=>E,formatDatetime:()=>j,formatTime:()=>O,isOmrsDateStrict:()=>p,isOmrsDateToday:()=>d,isSameDay:()=>e,isVersionSatisfied:()=>L,parseDate:()=>S,retry:()=>B,toDateObjectStrict:()=>v,toOmrsDateFormat:()=>_,toOmrsDayDateFormat:()=>b,toOmrsIsoString:()=>y,toOmrsTimeString:()=>m,toOmrsTimeString24:()=>g,toOmrsYearlessDateFormat:()=>w,translateFrom:()=>k});var r=i(9688),o=i(9014),u=i.n(o),s=i(4332),c=i.n(s);function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){l(t,e,n[e])}))}return t}r.default.extend(u()),r.default.extend(c());var h="YYYY-MM-DDTHH:mm:ss.SSSZZ";function p(t){return null!=t&&28===t.trim().length&&"T"===(t=t.trim())[10]&&":"===t[13]&&":"===t[16]&&"."===t[19]&&"+"===t[23]&&":"!==t[26]&&(0,r.default)(t,h).isValid()}function d(t){return(0,r.default)(t).isToday()}function v(t){return p(t)?(0,r.default)(t,h).toDate():null}function y(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,r.default)(t);return e&&(n=n.utc()),n.format(h)}function g(t){return(0,r.default)(t).format("HH:mm")}function m(t){return r.default.utc(t).format("HH:mm A")}function b(t){return _(t,"DD - MMM - YYYY")}function w(t){return _(t,"DD-MMM")}function _(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MMM-DD";return(0,r.default)(t).format(e)}function S(t){return(0,r.default)(t).toDate()}var x={mode:"standard",time:"for today",day:!0,year:!0};function E(t,e){var n,o=f({},x,e),i=o.mode,a=o.time,u=o.day,s=o.year,c={year:s?"numeric":void 0,month:"short",day:u?"2-digit":void 0},l=A(),h=(0,r.default)(t).isToday();if(h)n=(n=new Intl.RelativeTimeFormat(l,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(l)+n.slice(1);else if("en"==l&&(l="en-GB"),n=t.toLocaleDateString(l,c),"en-GB"==l&&"standard"==i&&s&&u&&(n=n.replace(/ /g,"-")),"wide"==i&&(n=n.replace(/ /g," — "),/ru.*/.test(l))){var p=n.length;n=n.slice(0,p-5)+n.slice(p-5).replace(" — "," ")}return(!0===a||h&&"for today"===a)&&(n+=", ".concat(O(t))),n}function O(t){return t.toLocaleTimeString(A(),{hour:"2-digit",minute:"2-digit"})}function j(t,e){return E(t,f({},e,{time:!0}))}function A(){var t=window.i18next.language;return"ht"===(t=t.replace("_","-"))&&(t="fr-HT"),t}var C=i(7064);function P(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(t,e,n,r){return(C.default.default||C.default).t(e,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){P(t,e,n[e])}))}return t}({ns:t,defaultValue:n},r))}var T=i(4770);function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t){var e,n=function(t){if(Array.isArray(t))return t}(e=t.split("."))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return I(t,3);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(t,3):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=n[2];return"".concat(r,".").concat(o,".").concat(i)}function L(t,e){var n=function(t){var e=t.indexOf("-");if(e>=0){var n=R(t.slice(0,e)),r=t.slice(e+1);return"".concat(n,"-").concat(r)}return R(t)}(e);return T.satisfies(n,t,{includePrerelease:!0})}var D=i(1602),M=i.n(D);function N(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function $(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){N(i,r,o,a,u,"next",t)}function u(t){N(i,r,o,a,u,"throw",t)}a(void 0)}))}}function B(t){return U.apply(this,arguments)}function U(){return U=$(M().mark((function t(e){var n,r,o,i,a,u,s=arguments;return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=s.length>1&&void 0!==s[1]?s[1]:{},r=n.shouldRetry,o=n.getDelay,i=n.onError,r=null!=r?r:function(t){return F(t,5)},o=null!=o?o:function(t){return K(t,1e3)},a=0,u=void 0;case 6:return t.prev=6,t.next=9,H(o(a));case 9:return t.next=11,e();case 11:return t.abrupt("return",t.sent);case 14:t.prev=14,t.t0=t.catch(6),null==i||i(t.t0,a),u=t.t0;case 18:if(r(a++)){t.next=6;break}case 19:throw u;case 20:case"end":return t.stop()}}),t,null,[[6,14]])}))),U.apply(this,arguments)}function F(t,e){return t<=e}function K(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n?t+1:t;return e*Math.pow(2,r)}function H(t){return V.apply(this,arguments)}function V(){return(V=$(M().mark((function t(e){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e<=0)){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",new Promise((function(t){return setTimeout(t,e)})));case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}})(),a})())}}}))}}]);
|