text: window.FHIR=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=129)}([function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){var n=r(2),o=r(83),i=r(5),a=r(86),u=r(87),s=r(130),c=o("wks"),f=n.Symbol,l=s?f:f&&f.withoutSetter||a;t.exports=function(t){return i(c,t)||(u&&i(f,t)?c[t]=f[t]:c[t]=l("Symbol."+t)),c[t]}},function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||Function("return this")()}).call(this,r(56))},function(t,e,r){var n=r(2),o=r(34).f,i=r(12),a=r(8),u=r(57),s=r(133),c=r(35);t.exports=function(t,e){var r,f,l,h,p,d=t.target,v=t.global,g=t.stat;if(r=v?n:g?n[d]||u(d,{}):(n[d]||{}).prototype)for(f in e){if(h=e[f],l=t.noTargetGet?(p=o(r,f))&&p.value:r[f],!c(v?f:d+(g?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;s(h,l)}(t.sham||l&&l.sham)&&i(h,"sham",!0),a(r,f,h,t)}}},function(t,e,r){var n=r(7);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){var n=r(0);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var n=r(2),o=r(12),i=r(5),a=r(57),u=r(59),s=r(15),c=s.get,f=s.enforce,l=String(String).split("String");(t.exports=function(t,e,r,u){var s=!!u&&!!u.unsafe,c=!!u&&!!u.enumerable,h=!!u&&!!u.noTargetGet;"function"==typeof r&&("string"!=typeof e||i(r,"name")||o(r,"name",e),f(r).source=l.join("string"==typeof e?e:"")),t!==n?(s?!h&&t[e]&&(c=!0):delete t[e],c?t[e]=r:o(t,e,r)):c?t[e]=r:a(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||u(this)}))},function(t,e,r){var n=r(21),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(6),o=r(85),i=r(4),a=r(32),u=Object.defineProperty;e.f=n?u:function(t,e,r){if(i(t),e=a(e,!0),i(r),o)try{return u(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(14);t.exports=function(t){return Object(n(t))}},function(t,e,r){var n=r(6),o=r(10),i=r(24);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n,o,i,a=r(131),u=r(2),s=r(7),c=r(12),f=r(5),l=r(60),h=r(61),p=u.WeakMap;if(a){var d=new p,v=d.get,g=d.has,y=d.set;n=function(t,e){return y.call(d,t,e),e},o=function(t){return v.call(d,t)||{}},i=function(t){return g.call(d,t)}}else{var m=l("state");h[m]=!0,n=function(t,e){return c(t,m,e),e},o=function(t){return f(t,m)?t[m]:{}},i=function(t){return f(t,m)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){var n=r(135),o=r(2),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t])||i(o[t]):n[t]&&n[t][e]||o[t]&&o[t][e]}},function(t,e,r){var n=r(6),o=r(0),i=r(5),a=Object.defineProperty,u={},s=function(t){throw t};t.exports=function(t,e){if(i(u,t))return u[t];e||(e={});var r=[][t],c=!!i(e,"ACCESSORS")&&e.ACCESSORS,f=i(e,0)?e[0]:s,l=i(e,1)?e[1]:void 0;return u[t]=!!r&&!o((function(){if(c&&!n)return!0;var t={length:-1};c?a(t,1,{enumerable:!0,get:s}):t[1]=1,r.call(t,f,l)}))}},function(t,e,r){"use strict";var n=r(3),o=r(47);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,r){var n=r(55),o=r(8),i=r(132);n||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e){t.exports=!1},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e,r){var n=r(28);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(26),o=r(14);t.exports=function(t){return n(o(t))}},function(t,e,r){var n=r(0),o=r(13),i="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,e,r){var n=r(10).f,o=r(5),i=r(1)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e){t.exports={}},function(t,e,r){"use strict";var n=r(25),o=r(70),i=r(29),a=r(15),u=r(105),s=a.set,c=a.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,e){s(this,{type:"Array Iterator",target:n(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,r){"use strict";var n=r(49),o=r(4),i=r(11),a=r(9),u=r(21),s=r(14),c=r(79),f=r(50),l=Math.max,h=Math.min,p=Math.floor,d=/\$([$&'`]|\d\d?|<[^>]*>)/g,v=/\$([$&'`]|\d\d?)/g;n("replace",2,(function(t,e,r,n){var g=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,y=n.REPLACE_KEEPS_$0,m=g?"$":"$0";return[function(r,n){var o=s(this),i=null==r?void 0:r[t];return void 0!==i?i.call(r,o,n):e.call(String(o),r,n)},function(t,n){if(!g&&y||"string"==typeof n&&-1===n.indexOf(m)){var i=r(e,t,this,n);if(i.done)return i.value}var s=o(t),p=String(this),d="function"==typeof n;d||(n=String(n));var v=s.global;if(v){var w=s.unicode;s.lastIndex=0}for(var x=[];;){var E=f(s,p);if(null===E)break;if(x.push(E),!v)break;""===String(E[0])&&(s.lastIndex=c(p,a(s.lastIndex),w))}for(var S,k="",R=0,O=0;O<x.length;O++){E=x[O];for(var C=String(E[0]),_=l(h(u(E.index),p.length),0),A=[],P=1;P<E.length;P++)A.push(void 0===(S=E[P])?S:String(S));var j=E.groups;if(d){var T=[C].concat(A,_,p);void 0!==j&&T.push(j);var I=String(n.apply(void 0,T))}else I=b(C,p,_,A,j,n);_>=R&&(k+=p.slice(R,_)+I,R=_+C.length)}return k+p.slice(R)}];function b(t,r,n,o,a,u){var s=n+t.length,c=o.length,f=v;return void 0!==a&&(a=i(a),f=d),e.call(u,f,(function(e,i){var u;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,n);case"'":return r.slice(s);case"<":u=a[i.slice(1,-1)];break;default:var f=+i;if(0===f)return e;if(f>c){var l=p(f/10);return 0===l?e:l<=c?void 0===o[l-1]?i.charAt(1):o[l-1]+i.charAt(1):e}u=o[f-1]}return void 0===u?"":u}))}}))},function(t,e,r){var n=r(7);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){"use strict";var n,o,i,a,u=r(3),s=r(20),c=r(2),f=r(16),l=r(93),h=r(8),p=r(94),d=r(27),v=r(95),g=r(7),y=r(28),m=r(65),b=r(13),w=r(59),x=r(136),E=r(137),S=r(66),k=r(98).set,R=r(138),O=r(102),C=r(139),_=r(103),A=r(140),P=r(15),j=r(35),T=r(1),I=r(67),L=T("species"),U="Promise",F=P.get,M=P.set,N=P.getterFor(U),q=l,B=c.TypeError,D=c.document,z=c.process,G=f("fetch"),H=_.f,Y=H,$="process"==b(z),K=!!(D&&D.createEvent&&c.dispatchEvent),J=j(U,(function(){if(!(w(q)!==String(q))){if(66===I)return!0;if(!$&&"function"!=typeof PromiseRejectionEvent)return!0}if(s&&!q.prototype.finally)return!0;if(I>=51&&/native code/.test(q))return!1;var t=q.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[L]=e,!(t.then((function(){}))instanceof e)})),V=J||!E((function(t){q.all(t).catch((function(){}))})),W=function(t){var e;return!(!g(t)||"function"!=typeof(e=t.then))&&e},X=function(t,e,r){if(!e.notified){e.notified=!0;var n=e.reactions;R((function(){for(var o=e.value,i=1==e.state,a=0;n.length>a;){var u,s,c,f=n[a++],l=i?f.ok:f.fail,h=f.resolve,p=f.reject,d=f.domain;try{l?(i||(2===e.rejection&&et(t,e),e.rejection=1),!0===l?u=o:(d&&d.enter(),u=l(o),d&&(d.exit(),c=!0)),u===f.promise?p(B("Promise-chain cycle")):(s=W(u))?s.call(u,h,p):h(u)):p(o)}catch(t){d&&!c&&d.exit(),p(t)}}e.reactions=[],e.notified=!1,r&&!e.rejection&&Q(t,e)}))}},Z=function(t,e,r){var n,o;K?((n=D.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},(o=c["on"+t])?o(n):"unhandledrejection"===t&&C("Unhandled promise rejection",r)},Q=function(t,e){k.call(c,(function(){var r,n=e.value;if(tt(e)&&(r=A((function(){$?z.emit("unhandledRejection",n,t):Z("unhandledrejection",t,n)})),e.rejection=$||tt(e)?2:1,r.error))throw r.value}))},tt=function(t){return 1!==t.rejection&&!t.parent},et=function(t,e){k.call(c,(function(){$?z.emit("rejectionHandled",t):Z("rejectionhandled",t,e.value)}))},rt=function(t,e,r,n){return function(o){t(e,r,o,n)}},nt=function(t,e,r,n){e.done||(e.done=!0,n&&(e=n),e.value=r,e.state=2,X(t,e,!0))},ot=function(t,e,r,n){if(!e.done){e.done=!0,n&&(e=n);try{if(t===r)throw B("Promise can't be resolved itself");var o=W(r);o?R((function(){var n={done:!1};try{o.call(r,rt(ot,t,n,e),rt(nt,t,n,e))}catch(r){nt(t,n,r,e)}})):(e.value=r,e.state=1,X(t,e,!1))}catch(r){nt(t,{done:!1},r,e)}}};J&&(q=function(t){m(this,q,U),y(t),n.call(this);var e=F(this);try{t(rt(ot,this,e),rt(nt,this,e))}catch(t){nt(this,e,t)}},(n=function(t){M(this,{type:U,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(q.prototype,{then:function(t,e){var r=N(this),n=H(S(this,q));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=$?z.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&X(this,r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n,e=F(t);this.promise=t,this.resolve=rt(ot,t,e),this.reject=rt(nt,t,e)},_.f=H=function(t){return t===q||t===i?new o(t):Y(t)},s||"function"!=typeof l||(a=l.prototype.then,h(l.prototype,"then",(function(t,e){var r=this;return new q((function(t,e){a.call(r,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof G&&u({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return O(q,G.apply(c,arguments))}}))),u({global:!0,wrap:!0,forced:J},{Promise:q}),d(q,U,!1,!0),v(U),i=f(U),u({target:U,stat:!0,forced:J},{reject:function(t){var e=H(this);return e.reject.call(void 0,t),e.promise}}),u({target:U,stat:!0,forced:s||J},{resolve:function(t){return O(s&&this===i?q:this,t)}}),u({target:U,stat:!0,forced:V},{all:function(t){var e=this,r=H(e),n=r.resolve,o=r.reject,i=A((function(){var r=y(e.resolve),i=[],a=0,u=1;x(t,(function(t){var s=a++,c=!1;i.push(void 0),u++,r.call(e,t).then((function(t){c||(c=!0,i[s]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=H(e),n=r.reject,o=A((function(){var o=y(e.resolve);x(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}})},function(t,e,r){var n=r(6),o=r(88),i=r(24),a=r(25),u=r(32),s=r(5),c=r(85),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=a(t),e=u(e,!0),c)try{return f(t,e)}catch(t){}if(s(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e,r){var n=r(0),o=/#|\.prototype\./,i=function(t,e){var r=u[a(t)];return r==c||r!=s&&("function"==typeof e?n(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=i.data={},s=i.NATIVE="N",c=i.POLYFILL="P";t.exports=i},function(t,e,r){var n=r(62),o=r(29),i=r(1)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){"use strict";var n=r(3),o=r(0),i=r(68),a=r(7),u=r(11),s=r(9),c=r(69),f=r(38),l=r(39),h=r(1),p=r(67),d=h("isConcatSpreadable"),v=p>=51||!o((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),g=l("concat"),y=function(t){if(!a(t))return!1;var e=t[d];return void 0!==e?!!e:i(t)};n({target:"Array",proto:!0,forced:!v||!g},{concat:function(t){var e,r,n,o,i,a=u(this),l=f(a,0),h=0;for(e=-1,n=arguments.length;e<n;e++)if(y(i=-1===e?a:arguments[e])){if(h+(o=s(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<o;r++,h++)r in i&&c(l,h,i[r])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");c(l,h++,i)}return l.length=h,l}})},function(t,e,r){var n=r(7),o=r(68),i=r(1)("species");t.exports=function(t,e){var r;return o(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!o(r.prototype)?n(r)&&null===(r=r[i])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)}},function(t,e,r){var n=r(0),o=r(1),i=r(67),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,r){var n,o=r(4),i=r(104),a=r(64),u=r(61),s=r(99),c=r(58),f=r(60),l=f("IE_PROTO"),h=function(){},p=function(t){return"<script>"+t+"<\/script>"},d=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;d=n?function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e}(n):((e=c("iframe")).style.display="none",s.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F);for(var r=a.length;r--;)delete d.prototype[a[r]];return d()};u[l]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(h.prototype=o(t),r=new h,h.prototype=null,r[l]=t):r=d(),void 0===e?r:i(r,e)}},function(t,e,r){var n=r(3),o=r(110);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,r){"use strict";var n=r(72).charAt,o=r(15),i=r(105),a=o.set,u=o.getterFor("String Iterator");i(String,"String",(function(t){a(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=u(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,r){var n=r(22),o=r(26),i=r(11),a=r(9),u=r(38),s=[].push,c=function(t){var e=1==t,r=2==t,c=3==t,f=4==t,l=6==t,h=5==t||l;return function(p,d,v,g){for(var y,m,b=i(p),w=o(b),x=n(d,v,3),E=a(w.length),S=0,k=g||u,R=e?k(p,E):r?k(p,0):void 0;E>S;S++)if((h||S in w)&&(m=x(y=w[S],S,b),t))if(e)R[S]=m;else if(m)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:s.call(R,y)}else if(f)return!1;return l?-1:c||f?f:R}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(t,e,r){"use strict";var n=r(3),o=r(113);n({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(t,e,r){"use strict";var n=r(0);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},function(t,e,r){"use strict";var n=r(3),o=r(43).map,i=r(39),a=r(17),u=i("map"),s=a("map");n({target:"Array",proto:!0,forced:!u||!s},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";var n,o,i=r(78),a=r(114),u=RegExp.prototype.exec,s=String.prototype.replace,c=u,f=(n=/a/,o=/b*/g,u.call(n,"a"),u.call(o,"a"),0!==n.lastIndex||0!==o.lastIndex),l=a.UNSUPPORTED_Y||a.BROKEN_CARET,h=void 0!==/()??/.exec("")[1];(f||h||l)&&(c=function(t){var e,r,n,o,a=this,c=l&&a.sticky,p=i.call(a),d=a.source,v=0,g=t;return c&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),g=String(t).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(d="(?: "+d+")",g=" "+g,v++),r=new RegExp("^(?:"+d+")",p)),h&&(r=new RegExp("^"+d+"$(?!\\s)",p)),f&&(e=a.lastIndex),n=u.call(c?r:a,g),c?n?(n.input=n.input.slice(v),n[0]=n[0].slice(v),n.index=a.lastIndex,a.lastIndex+=n[0].length):a.lastIndex=0:f&&n&&(a.lastIndex=a.global?n.index+n[0].length:e),h&&n&&n.length>1&&s.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n}),t.exports=c},function(t,e,r){"use strict";var n=r(49),o=r(4),i=r(9),a=r(14),u=r(79),s=r(50);n("match",1,(function(t,e,r){return[function(e){var r=a(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,t,this);if(n.done)return n.value;var a=o(t),c=String(this);if(!a.global)return s(a,c);var f=a.unicode;a.lastIndex=0;for(var l,h=[],p=0;null!==(l=s(a,c));){var d=String(l[0]);h[p]=d,""===d&&(a.lastIndex=u(c,i(a.lastIndex),f)),p++}return 0===p?null:h}]}))},function(t,e,r){"use strict";r(18);var n=r(8),o=r(0),i=r(1),a=r(47),u=r(12),s=i("species"),c=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),f="$0"==="a".replace(/./,"$0"),l=i("replace"),h=!!/./[l]&&""===/./[l]("a","$0"),p=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));t.exports=function(t,e,r,l){var d=i(t),v=!o((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),g=v&&!o((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[s]=function(){return r},r.flags="",r[d]=/./[d]),r.exec=function(){return e=!0,null},r[d](""),!e}));if(!v||!g||"replace"===t&&(!c||!f||h)||"split"===t&&!p){var y=/./[d],m=r(d,""[t],(function(t,e,r,n,o){return e.exec===a?v&&!o?{done:!0,value:y.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:f,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:h}),b=m[0],w=m[1];n(String.prototype,t,b),n(RegExp.prototype,d,2==e?function(t,e){return w.call(t,this,e)}:function(t){return w.call(t,this)})}l&&u(RegExp.prototype[d],"sham",!0)}},function(t,e,r){var n=r(13),o=r(47);t.exports=function(t,e){var r=t.exec;if("function"==typeof r){var i=r.call(t,e);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==n(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e,r){var n=r(2),o=r(111),i=r(113),a=r(12);for(var u in o){var s=n[u],c=s&&s.prototype;if(c&&c.forEach!==i)try{a(c,"forEach",i)}catch(t){c.forEach=i}}},function(t,e,r){t.exports=r(150)},function(t,e,r){(function(e){!function(e){"use strict";var r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",s="object"==typeof t,c=e.regeneratorRuntime;if(c)s&&(t.exports=c);else{(c=e.regeneratorRuntime=s?t.exports:{}).wrap=v;var f={},l={};l[i]=function(){return this};var h=Object.getPrototypeOf,p=h&&h(h(O([])));p&&p!==r&&n.call(p,i)&&(l=p);var d=b.prototype=y.prototype=Object.create(l);m.prototype=d.constructor=b,b.constructor=m,b[u]=m.displayName="GeneratorFunction",c.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(d),t},c.awrap=function(t){return{__await:t}},w(x.prototype),x.prototype[a]=function(){return this},c.AsyncIterator=x,c.async=function(t,e,r,n){var o=new x(v(t,e,r,n));return c.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},w(d),d[u]="Generator",d[i]=function(){return this},d.toString=function(){return"[object Generator]"},c.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},c.values=O,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.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,f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}}}function v(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new R(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=g(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function g(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function y(){}function m(){}function b(){}function w(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function x(t){function r(e,o,i,a){var u=g(t[e],t,o);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==typeof c&&n.call(c,"__await")?Promise.resolve(c.__await).then((function(t){r("next",t,i,a)}),(function(t){r("throw",t,i,a)})):Promise.resolve(c).then((function(t){s.value=t,i(s)}),a)}a(u.arg)}var o;"object"==typeof e.process&&e.process.domain&&(r=e.process.domain.bind(r)),this._invoke=function(t,e){function n(){return new Promise((function(n,o){r(t,e,n,o)}))}return o=o?o.then(n,n):n()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=g(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,r(56))},function(t,e){function r(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,s,"next",t)}function s(t){r(a,o,i,u,s,"throw",t)}u(void 0)}))}}},function(t,e,r){var n={};n[r(1)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(2),o=r(12);t.exports=function(t,e){try{o(n,t,e)}catch(r){n[t]=e}return e}},function(t,e,r){var n=r(2),o=r(7),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,r){var n=r(84),o=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return o.call(t)}),t.exports=n.inspectSource},function(t,e,r){var n=r(83),o=r(86),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e){t.exports={}},function(t,e,r){var n=r(55),o=r(13),i=r(1)("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:a?o(e):"Object"==(n=o(e))&&"function"==typeof e.callee?"Arguments":n}},function(t,e,r){var n=r(89),o=r(64).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){t.exports=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t}},function(t,e,r){var n=r(4),o=r(28),i=r(1)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||null==(r=n(a)[i])?e:o(r)}},function(t,e,r){var n,o,i=r(2),a=r(101),u=i.process,s=u&&u.versions,c=s&&s.v8;c?o=(n=c.split("."))[0]+n[1]:a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=n[1]),t.exports=o&&+o},function(t,e,r){var n=r(13);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){"use strict";var n=r(32),o=r(10),i=r(24);t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},function(t,e,r){var n=r(1),o=r(40),i=r(10),a=n("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},function(t,e,r){var n=r(89),o=r(64);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(21),o=r(14),i=function(t){return function(e,r){var i,a,u=String(o(e)),s=n(r),c=u.length;return s<0||s>=c?t?"":void 0:(i=u.charCodeAt(s))<55296||i>56319||s+1===c||(a=u.charCodeAt(s+1))<56320||a>57343?t?u.charAt(s):i:t?u.slice(s,s+2):a-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},function(t,e,r){var n=r(2),o=r(111),i=r(30),a=r(12),u=r(1),s=u("iterator"),c=u("toStringTag"),f=i.values;for(var l in o){var h=n[l],p=h&&h.prototype;if(p){if(p[s]!==f)try{a(p,s,f)}catch(t){p[s]=f}if(p[c]||a(p,c,l),o[l])for(var d in i)if(p[d]!==i[d])try{a(p,d,i[d])}catch(t){p[d]=i[d]}}}},function(t,e,r){"use strict";r(42);var n,o=r(3),i=r(6),a=r(112),u=r(2),s=r(104),c=r(8),f=r(65),l=r(5),h=r(110),p=r(144),d=r(72).codeAt,v=r(145),g=r(27),y=r(146),m=r(15),b=u.URL,w=y.URLSearchParams,x=y.getState,E=m.set,S=m.getterFor("URL"),k=Math.floor,R=Math.pow,O=/[A-Za-z]/,C=/[\d+-.A-Za-z]/,_=/\d/,A=/^(0x|0X)/,P=/^[0-7]+$/,j=/^\d+$/,T=/^[\dA-Fa-f]+$/,I=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,L=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,U=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,F=/[\u0009\u000A\u000D]/g,M=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(r=q(e.slice(1,-1))))return"Invalid host";t.host=r}else if(K(t)){if(e=v(e),I.test(e))return"Invalid host";if(null===(r=N(e)))return"Invalid host";t.host=r}else{if(L.test(e))return"Invalid host";for(r="",n=p(e),o=0;o<n.length;o++)r+=Y(n[o],D);t.host=r}},N=function(t){var e,r,n,o,i,a,u,s=t.split(".");if(s.length&&""==s[s.length-1]&&s.pop(),(e=s.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=s[n]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=A.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?j:8==i?P:T).test(o))return t;a=parseInt(o,i)}r.push(a)}for(n=0;n<e;n++)if(a=r[n],n==e-1){if(a>=R(256,5-e))return null}else if(a>255)return null;for(u=r.pop(),n=0;n<r.length;n++)u+=r[n]*R(256,3-n);return u},q=function(t){var e,r,n,o,i,a,u,s=[0,0,0,0,0,0,0,0],c=0,f=null,l=0,h=function(){return t.charAt(l)};if(":"==h()){if(":"!=t.charAt(1))return;l+=2,f=++c}for(;h();){if(8==c)return;if(":"!=h()){for(e=r=0;r<4&&T.test(h());)e=16*e+parseInt(h(),16),l++,r++;if("."==h()){if(0==r)return;if(l-=r,c>6)return;for(n=0;h();){if(o=null,n>0){if(!("."==h()&&n<4))return;l++}if(!_.test(h()))return;for(;_.test(h());){if(i=parseInt(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}s[c]=256*s[c]+o,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;s[c++]=e}else{if(null!==f)return;l++,f=++c}}if(null!==f)for(a=c-f,c=7;0!=c&&a>0;)u=s[c],s[c--]=s[f+a-1],s[f+--a]=u;else if(8!=c)return;return s},B=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=k(t/256);return e.join(".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=t[r].toString(16),r<7&&(e+=":")));return"["+e+"]"}return t},D={},z=h({},D,{" ":1,'"':1,"<":1,">":1,"`":1}),G=h({},z,{"#":1,"?":1,"{":1,"}":1}),H=h({},G,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(t,e){var r=d(t,0);return r>32&&r<127&&!l(e,t)?t:encodeURIComponent(t)},$={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(t){return l($,t.scheme)},J=function(t){return""!=t.username||""!=t.password},V=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},W=function(t,e){var r;return 2==t.length&&O.test(t.charAt(0))&&(":"==(r=t.charAt(1))||!e&&"|"==r)},X=function(t){var e;return t.length>1&&W(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},Z=function(t){var e=t.path,r=e.length;!r||"file"==t.scheme&&1==r&&W(e[0],!0)||e.pop()},Q=function(t){return"."===t||"%2e"===t.toLowerCase()},tt={},et={},rt={},nt={},ot={},it={},at={},ut={},st={},ct={},ft={},lt={},ht={},pt={},dt={},vt={},gt={},yt={},mt={},bt={},wt={},xt=function(t,e,r,o){var i,a,u,s,c,f=r||tt,h=0,d="",v=!1,g=!1,y=!1;for(r||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(U,"")),e=e.replace(F,""),i=p(e);h<=i.length;){switch(a=i[h],f){case tt:if(!a||!O.test(a)){if(r)return"Invalid scheme";f=rt;continue}d+=a.toLowerCase(),f=et;break;case et:if(a&&(C.test(a)||"+"==a||"-"==a||"."==a))d+=a.toLowerCase();else{if(":"!=a){if(r)return"Invalid scheme";d="",f=rt,h=0;continue}if(r&&(K(t)!=l($,d)||"file"==d&&(J(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=d,r)return void(K(t)&&$[t.scheme]==t.port&&(t.port=null));d="","file"==t.scheme?f=pt:K(t)&&o&&o.scheme==t.scheme?f=nt:K(t)?f=ut:"/"==i[h+1]?(f=ot,h++):(t.cannotBeABaseURL=!0,t.path.push(""),f=mt)}break;case rt:if(!o||o.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(o.cannotBeABaseURL&&"#"==a){t.scheme=o.scheme,t.path=o.path.slice(),t.query=o.query,t.fragment="",t.cannotBeABaseURL=!0,f=wt;break}f="file"==o.scheme?pt:it;continue;case nt:if("/"!=a||"/"!=i[h+1]){f=it;continue}f=st,h++;break;case ot:if("/"==a){f=ct;break}f=yt;continue;case it:if(t.scheme=o.scheme,a==n)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query;else if("/"==a||"\\"==a&&K(t))f=at;else if("?"==a)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query="",f=bt;else{if("#"!=a){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.path.pop(),f=yt;continue}t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query,t.fragment="",f=wt}break;case at:if(!K(t)||"/"!=a&&"\\"!=a){if("/"!=a){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,f=yt;continue}f=ct}else f=st;break;case ut:if(f=st,"/"!=a||"/"!=d.charAt(h+1))continue;h++;break;case st:if("/"!=a&&"\\"!=a){f=ct;continue}break;case ct:if("@"==a){v&&(d="%40"+d),v=!0,u=p(d);for(var m=0;m<u.length;m++){var b=u[m];if(":"!=b||y){var w=Y(b,H);y?t.password+=w:t.username+=w}else y=!0}d=""}else if(a==n||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)){if(v&&""==d)return"Invalid authority";h-=p(d).length+1,d="",f=ft}else d+=a;break;case ft:case lt:if(r&&"file"==t.scheme){f=vt;continue}if(":"!=a||g){if(a==n||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)){if(K(t)&&""==d)return"Invalid host";if(r&&""==d&&(J(t)||null!==t.port))return;if(s=M(t,d))return s;if(d="",f=gt,r)return;continue}"["==a?g=!0:"]"==a&&(g=!1),d+=a}else{if(""==d)return"Invalid host";if(s=M(t,d))return s;if(d="",f=ht,r==lt)return}break;case ht:if(!_.test(a)){if(a==n||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)||r){if(""!=d){var x=parseInt(d,10);if(x>65535)return"Invalid port";t.port=K(t)&&x===$[t.scheme]?null:x,d=""}if(r)return;f=gt;continue}return"Invalid port"}d+=a;break;case pt:if(t.scheme="file","/"==a||"\\"==a)f=dt;else{if(!o||"file"!=o.scheme){f=yt;continue}if(a==n)t.host=o.host,t.path=o.path.slice(),t.query=o.query;else if("?"==a)t.host=o.host,t.path=o.path.slice(),t.query="",f=bt;else{if("#"!=a){X(i.slice(h).join(""))||(t.host=o.host,t.path=o.path.slice(),Z(t)),f=yt;continue}t.host=o.host,t.path=o.path.slice(),t.query=o.query,t.fragment="",f=wt}}break;case dt:if("/"==a||"\\"==a){f=vt;break}o&&"file"==o.scheme&&!X(i.slice(h).join(""))&&(W(o.path[0],!0)?t.path.push(o.path[0]):t.host=o.host),f=yt;continue;case vt:if(a==n||"/"==a||"\\"==a||"?"==a||"#"==a){if(!r&&W(d))f=yt;else if(""==d){if(t.host="",r)return;f=gt}else{if(s=M(t,d))return s;if("localhost"==t.host&&(t.host=""),r)return;d="",f=gt}continue}d+=a;break;case gt:if(K(t)){if(f=yt,"/"!=a&&"\\"!=a)continue}else if(r||"?"!=a)if(r||"#"!=a){if(a!=n&&(f=yt,"/"!=a))continue}else t.fragment="",f=wt;else t.query="",f=bt;break;case yt:if(a==n||"/"==a||"\\"==a&&K(t)||!r&&("?"==a||"#"==a)){if(".."===(c=(c=d).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(Z(t),"/"==a||"\\"==a&&K(t)||t.path.push("")):Q(d)?"/"==a||"\\"==a&&K(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&W(d)&&(t.host&&(t.host=""),d=d.charAt(0)+":"),t.path.push(d)),d="","file"==t.scheme&&(a==n||"?"==a||"#"==a))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==a?(t.query="",f=bt):"#"==a&&(t.fragment="",f=wt)}else d+=Y(a,G);break;case mt:"?"==a?(t.query="",f=bt):"#"==a?(t.fragment="",f=wt):a!=n&&(t.path[0]+=Y(a,D));break;case bt:r||"#"!=a?a!=n&&("'"==a&&K(t)?t.query+="%27":t.query+="#"==a?"%23":Y(a,D)):(t.fragment="",f=wt);break;case wt:a!=n&&(t.fragment+=Y(a,z))}h++}},Et=function(t){var e,r,n=f(this,Et,"URL"),o=arguments.length>1?arguments[1]:void 0,a=String(t),u=E(n,{type:"URL"});if(void 0!==o)if(o instanceof Et)e=S(o);else if(r=xt(e={},String(o)))throw TypeError(r);if(r=xt(u,a,null,e))throw TypeError(r);var s=u.searchParams=new w,c=x(s);c.updateSearchParams(u.query),c.updateURL=function(){u.query=String(s)||null},i||(n.href=kt.call(n),n.origin=Rt.call(n),n.protocol=Ot.call(n),n.username=Ct.call(n),n.password=_t.call(n),n.host=At.call(n),n.hostname=Pt.call(n),n.port=jt.call(n),n.pathname=Tt.call(n),n.search=It.call(n),n.searchParams=Lt.call(n),n.hash=Ut.call(n))},St=Et.prototype,kt=function(){var t=S(this),e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,u=t.query,s=t.fragment,c=e+":";return null!==o?(c+="//",J(t)&&(c+=r+(n?":"+n:"")+"@"),c+=B(o),null!==i&&(c+=":"+i)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==u&&(c+="?"+u),null!==s&&(c+="#"+s),c},Rt=function(){var t=S(this),e=t.scheme,r=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&K(t)?e+"://"+B(t.host)+(null!==r?":"+r:""):"null"},Ot=function(){return S(this).scheme+":"},Ct=function(){return S(this).username},_t=function(){return S(this).password},At=function(){var t=S(this),e=t.host,r=t.port;return null===e?"":null===r?B(e):B(e)+":"+r},Pt=function(){var t=S(this).host;return null===t?"":B(t)},jt=function(){var t=S(this).port;return null===t?"":String(t)},Tt=function(){var t=S(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},It=function(){var t=S(this).query;return t?"?"+t:""},Lt=function(){return S(this).searchParams},Ut=function(){var t=S(this).fragment;return t?"#"+t:""},Ft=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(i&&s(St,{href:Ft(kt,(function(t){var e=S(this),r=String(t),n=xt(e,r);if(n)throw TypeError(n);x(e.searchParams).updateSearchParams(e.query)})),origin:Ft(Rt),protocol:Ft(Ot,(function(t){var e=S(this);xt(e,String(t)+":",tt)})),username:Ft(Ct,(function(t){var e=S(this),r=p(String(t));if(!V(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=Y(r[n],H)}})),password:Ft(_t,(function(t){var e=S(this),r=p(String(t));if(!V(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=Y(r[n],H)}})),host:Ft(At,(function(t){var e=S(this);e.cannotBeABaseURL||xt(e,String(t),ft)})),hostname:Ft(Pt,(function(t){var e=S(this);e.cannotBeABaseURL||xt(e,String(t),lt)})),port:Ft(jt,(function(t){var e=S(this);V(e)||(""==(t=String(t))?e.port=null:xt(e,t,ht))})),pathname:Ft(Tt,(function(t){var e=S(this);e.cannotBeABaseURL||(e.path=[],xt(e,t+"",gt))})),search:Ft(It,(function(t){var e=S(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",xt(e,t,bt)),x(e.searchParams).updateSearchParams(e.query)})),searchParams:Ft(Lt),hash:Ft(Ut,(function(t){var e=S(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",xt(e,t,wt)):e.fragment=null}))}),c(St,"toJSON",(function(){return kt.call(this)}),{enumerable:!0}),c(St,"toString",(function(){return kt.call(this)}),{enumerable:!0}),b){var Mt=b.createObjectURL,Nt=b.revokeObjectURL;Mt&&c(Et,"createObjectURL",(function(t){return Mt.apply(b,arguments)})),Nt&&c(Et,"revokeObjectURL",(function(t){return Nt.apply(b,arguments)}))}g(Et,"URL"),o({global:!0,forced:!a,sham:!i},{URL:Et})},function(t,e,r){"use strict";var n=r(3),o=r(43).filter,i=r(39),a=r(17),u=i("filter"),s=a("filter");n({target:"Array",proto:!0,forced:!u||!s},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";var n=r(3),o=r(26),i=r(25),a=r(45),u=[].join,s=o!=Object,c=a("join",",");n({target:"Array",proto:!0,forced:s||!c},{join:function(t){return u.call(i(this),void 0===t?",":t)}})},function(t,e,r){var n=r(6),o=r(10).f,i=Function.prototype,a=i.toString,u=/^\s*function ([^ (]*)/;n&&!("name"in i)&&o(i,"name",{configurable:!0,get:function(){try{return a.call(this).match(u)[1]}catch(t){return""}}})},function(t,e,r){"use strict";var n=r(4);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,r){"use strict";var n=r(72).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){"use strict";var n=r(49),o=r(117),i=r(4),a=r(14),u=r(66),s=r(79),c=r(9),f=r(50),l=r(47),h=r(0),p=[].push,d=Math.min,v=!h((function(){return!RegExp(4294967295,"y")}));n("split",2,(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=String(a(this)),i=void 0===r?4294967295:r>>>0;if(0===i)return[];if(void 0===t)return[n];if(!o(t))return e.call(n,t,i);for(var u,s,c,f=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,v=new RegExp(t.source,h+"g");(u=l.call(v,n))&&!((s=v.lastIndex)>d&&(f.push(n.slice(d,u.index)),u.length>1&&u.index<n.length&&p.apply(f,u.slice(1)),c=u[0].length,d=s,f.length>=i));)v.lastIndex===u.index&&v.lastIndex++;return d===n.length?!c&&v.test("")||f.push(""):f.push(n.slice(d)),f.length>i?f.slice(0,i):f}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function(e,r){var o=a(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,r):n.call(String(o),e,r)},function(t,o){var a=r(n,t,this,o,n!==e);if(a.done)return a.value;var l=i(t),h=String(this),p=u(l,RegExp),g=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(v?"y":"g"),m=new p(v?l:"^(?:"+l.source+")",y),b=void 0===o?4294967295:o>>>0;if(0===b)return[];if(0===h.length)return null===f(m,h)?[h]:[];for(var w=0,x=0,E=[];x<h.length;){m.lastIndex=v?x:0;var S,k=f(m,v?h:h.slice(x));if(null===k||(S=d(c(m.lastIndex+(v?0:x)),h.length))===w)x=s(h,x,g);else{if(E.push(h.slice(w,x)),E.length===b)return E;for(var R=1;R<=k.length-1;R++)if(E.push(k[R]),E.length===b)return E;x=w=S}}return E.push(h.slice(w)),E}]}),!v)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SMART_KEY=e.patientParams=e.fhirVersions=e.patientCompartment=void 0,e.patientCompartment=["Account","AdverseEvent","AllergyIntolerance","Appointment","AppointmentResponse","AuditEvent","Basic","BodySite","BodyStructure","CarePlan","CareTeam","ChargeItem","Claim","ClaimResponse","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Consent","Coverage","CoverageEligibilityRequest","CoverageEligibilityResponse","DetectedIssue","DeviceRequest","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","EligibilityRequest","Encounter","EnrollmentRequest","EpisodeOfCare","ExplanationOfBenefit","FamilyMemberHistory","Flag","Goal","Group","ImagingManifest","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationEvaluation","ImmunizationRecommendation","Invoice","List","MeasureReport","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationRequest","MedicationStatement","MolecularSequence","NutritionOrder","Observation","Order","Patient","Person","Procedure","ProcedureRequest","Provenance","QuestionnaireResponse","ReferralRequest","RelatedPerson","RequestGroup","ResearchSubject","RiskAssessment","Schedule","ServiceRequest","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"],e.fhirVersions={"0.4.0":2,"0.5.0":2,"1.0.0":2,"1.0.1":2,"1.0.2":2,"1.1.0":3,"1.4.0":3,"1.6.0":3,"1.8.0":3,"3.0.0":3,"3.0.1":3,"3.3.0":4,"3.5.0":4,"4.0.0":4,"4.0.1":4},e.patientParams=["patient","subject","requester","member","actor","beneficiary"],e.SMART_KEY="SMART_KEY"},function(t,e){var r=function(t){function e(){this.fetch=!1,this.DOMException=t.DOMException}return e.prototype=t,new e}("undefined"!=typeof self?self:this);!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,o="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),i="FormData"in t,a="ArrayBuffer"in t;if(a)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function l(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function v(t){var e=new FileReader,r=d(e);return e.readAsArrayBuffer(t),r}function g(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&o&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=g(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||s(t))?this._bodyArrayBuffer=g(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var t,e,r,n=p(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=d(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=c(t),e=f(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},h.prototype.delete=function(t){delete this.map[c(t)]},h.prototype.get=function(t){return t=c(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(c(t))},h.prototype.set=function(t,e){this.map[c(t)]=f(e)},h.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),l(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),l(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),l(t)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(t,e){var r,n,o=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),m.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function w(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function x(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},y.call(b.prototype),y.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},x.error=function(){var t=new x(null,{status:0,statusText:""});return t.type="error",t};var E=[301,302,303,307,308];x.redirect=function(t,e){if(-1===E.indexOf(e))throw new RangeError("Invalid status code");return new x(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function S(t,r){return new Promise((function(n,i){var a=new b(t,r);if(a.signal&&a.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function s(){u.abort()}u.onload=function(){var t,e,r={status:u.status,statusText:u.statusText,headers:(t=u.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var o="response"in u?u.response:u.responseText;n(new x(o,r))},u.onerror=function(){i(new TypeError("Network request failed"))},u.ontimeout=function(){i(new TypeError("Network request failed"))},u.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},u.open(a.method,a.url,!0),"include"===a.credentials?u.withCredentials=!0:"omit"===a.credentials&&(u.withCredentials=!1),"responseType"in u&&o&&(u.responseType="blob"),a.headers.forEach((function(t,e){u.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",s),u.onreadystatechange=function(){4===u.readyState&&a.signal.removeEventListener("abort",s)}),u.send(void 0===a._bodyInit?null:a._bodyInit)}))}S.polyfill=!0,t.fetch||(t.fetch=S,t.Headers=h,t.Request=b,t.Response=x),e.Headers=h,e.Request=b,e.Response=x,e.fetch=S}({})}(r),delete r.fetch.polyfill,(e=r.fetch).default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e},function(t,e,r){var n=r(20),o=r(84);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e,r){var n=r(2),o=r(57),i=n["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,r){var n=r(6),o=r(0),i=r(58);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++r+n).toString(36)}},function(t,e,r){var n=r(0);t.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},function(t,e,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},function(t,e,r){var n=r(5),o=r(25),i=r(90).indexOf,a=r(61);t.exports=function(t,e){var r,u=o(t),s=0,c=[];for(r in u)!n(a,r)&&n(u,r)&&c.push(r);for(;e.length>s;)n(u,r=e[s++])&&(~i(c,r)||c.push(r));return c}},function(t,e,r){var n=r(25),o=r(9),i=r(91),a=function(t){return function(e,r,a){var u,s=n(e),c=o(s.length),f=i(a,c);if(t&&r!=r){for(;c>f;)if((u=s[f++])!=u)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,r){var n=r(21),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(2);t.exports=n.Promise},function(t,e,r){var n=r(8);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},function(t,e,r){"use strict";var n=r(16),o=r(10),i=r(1),a=r(6),u=i("species");t.exports=function(t){var e=n(t),r=o.f;a&&e&&!e[u]&&r(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,r){var n=r(1),o=r(29),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},function(t,e,r){var n=r(4);t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&n(i.call(t)),e}}},function(t,e,r){var n,o,i,a=r(2),u=r(0),s=r(13),c=r(22),f=r(99),l=r(58),h=r(100),p=a.location,d=a.setImmediate,v=a.clearImmediate,g=a.process,y=a.MessageChannel,m=a.Dispatch,b=0,w={},x=function(t){if(w.hasOwnProperty(t)){var e=w[t];delete w[t],e()}},E=function(t){return function(){x(t)}},S=function(t){x(t.data)},k=function(t){a.postMessage(t+"",p.protocol+"//"+p.host)};d&&v||(d=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return w[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},n(b),b},v=function(t){delete w[t]},"process"==s(g)?n=function(t){g.nextTick(E(t))}:m&&m.now?n=function(t){m.now(E(t))}:y&&!h?(i=(o=new y).port2,o.port1.onmessage=S,n=c(i.postMessage,i,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||u(k)||"file:"===p.protocol?n="onreadystatechange"in l("script")?function(t){f.appendChild(l("script")).onreadystatechange=function(){f.removeChild(this),x(t)}}:function(t){setTimeout(E(t),0)}:(n=k,a.addEventListener("message",S,!1))),t.exports={set:d,clear:v}},function(t,e,r){var n=r(16);t.exports=n("document","documentElement")},function(t,e,r){var n=r(101);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(n)},function(t,e,r){var n=r(16);t.exports=n("navigator","userAgent")||""},function(t,e,r){var n=r(4),o=r(7),i=r(103);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},function(t,e,r){"use strict";var n=r(28),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},function(t,e,r){var n=r(6),o=r(10),i=r(4),a=r(71);t.exports=n?Object.defineProperties:function(t,e){i(t);for(var r,n=a(e),u=n.length,s=0;u>s;)o.f(t,r=n[s++],e[r]);return t}},function(t,e,r){"use strict";var n=r(3),o=r(106),i=r(108),a=r(109),u=r(27),s=r(12),c=r(8),f=r(1),l=r(20),h=r(29),p=r(107),d=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,g=f("iterator"),y=function(){return this};t.exports=function(t,e,r,f,p,m,b){o(r,e,f);var w,x,E,S=function(t){if(t===p&&_)return _;if(!v&&t in O)return O[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},k=e+" Iterator",R=!1,O=t.prototype,C=O[g]||O["@@iterator"]||p&&O[p],_=!v&&C||S(p),A="Array"==e&&O.entries||C;if(A&&(w=i(A.call(new t)),d!==Object.prototype&&w.next&&(l||i(w)===d||(a?a(w,d):"function"!=typeof w[g]&&s(w,g,y)),u(w,k,!0,!0),l&&(h[k]=y))),"values"==p&&C&&"values"!==C.name&&(R=!0,_=function(){return C.call(this)}),l&&!b||O[g]===_||s(O,g,_),h[e]=_,p)if(x={values:S("values"),keys:m?_:S("keys"),entries:S("entries")},b)for(E in x)(v||R||!(E in O))&&c(O,E,x[E]);else n({target:e,proto:!0,forced:v||R},x);return x}},function(t,e,r){"use strict";var n=r(107).IteratorPrototype,o=r(40),i=r(24),a=r(27),u=r(29),s=function(){return this};t.exports=function(t,e,r){var c=e+" Iterator";return t.prototype=o(n,{next:i(1,r)}),a(t,c,!1,!0),u[c]=s,t}},function(t,e,r){"use strict";var n,o,i,a=r(108),u=r(12),s=r(5),c=r(1),f=r(20),l=c("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=a(a(i)))!==Object.prototype&&(n=o):h=!0),null==n&&(n={}),f||s(n,l)||u(n,l,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},function(t,e,r){var n=r(5),o=r(11),i=r(60),a=r(142),u=i("IE_PROTO"),s=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=o(t),n(t,u)?t[u]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,r){var n=r(4),o=r(143);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,i){return n(r),o(i),e?t.call(r,i):r.__proto__=i,r}}():void 0)},function(t,e,r){"use strict";var n=r(6),o=r(0),i=r(71),a=r(92),u=r(88),s=r(11),c=r(26),f=Object.assign,l=Object.defineProperty;t.exports=!f||o((function(){if(n&&1!==f({b:1},f(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=f({},t)[r]||"abcdefghijklmnopqrst"!=i(f({},e)).join("")}))?function(t,e){for(var r=s(t),o=arguments.length,f=1,l=a.f,h=u.f;o>f;)for(var p,d=c(arguments[f++]),v=l?i(d).concat(l(d)):i(d),g=v.length,y=0;g>y;)p=v[y++],n&&!h.call(d,p)||(r[p]=d[p]);return r}:f},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,r){var n=r(0),o=r(1),i=r(20),a=o("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),i&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},function(t,e,r){"use strict";var n=r(43).forEach,o=r(45),i=r(17),a=o("forEach"),u=i("forEach");t.exports=a&&u?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,r){"use strict";var n=r(0);function o(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=n((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,r){"use strict";var n=r(23);r(37),r(75),r(116),r(44),r(76),r(46),r(151),r(77),r(41),r(19),r(33),r(18),r(48),r(31),r(80),r(118),r(51);var o=n(r(52));r(53);var i=n(r(54));Object.defineProperty(e,"__esModule",{value:!0}),e.getTargetWindow=e.getPatientParam=e.byCodes=e.byCode=e.getAccessTokenExpiration=e.jwtDecode=e.randomString=e.absolute=e.makeArray=e.setPath=e.getPath=e.humanizeError=e.fetchConformanceStatement=e.getAndCache=e.request=e.responseToJSON=e.checkResponse=e.units=e.debug=void 0;var a=r(154),u=r(81),s=r(162),c=("undefined"!=typeof FHIRCLIENT_PURE?window:r(82)).fetch,f=s("FHIR");e.debug=f;var l={};function h(t){var e=t.value,r=t.code;if("number"!=typeof e)throw new Error("Found a non-numerical unit: "+e+" "+r)}function p(t){return d.apply(this,arguments)}function d(){return(d=(0,i.default)(o.default.mark((function t(e){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.ok){t.next=4;break}return t.next=3,m(e);case 3:throw t.sent;case 4:return t.abrupt("return",e);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function v(t){return t.text().then((function(t){return t.length?JSON.parse(t):""}))}function g(t,e){return void 0===e&&(e={}),c(t,Object.assign({mode:"cors"},e,{headers:Object.assign({accept:"application/json"},e.headers)})).then(p).then((function(t){var e=t.headers.get("Content-Type")+"";return e.match(/\bjson\b/i)?v(t).then((function(e){return{res:t,body:e}})):e.match(/^text\//i)?t.text().then((function(e){return{res:t,body:e}})):{res:t}})).then((function(t){var r=t.res,n=t.body;if(!n&&201==r.status){var o=r.headers.get("location")+"";if(o)return g(o,Object.assign({},e,{method:"GET",body:null}))}return void 0===n?r:n}))}function y(t,e,r){return void 0===r&&(r=!1),r||!l[t]?(l[t]=g(t,e),l[t]):Promise.resolve(l[t])}function m(t){return b.apply(this,arguments)}function b(){return(b=(0,i.default)(o.default.mark((function t(e){var r,n,i;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.status+" "+e.statusText+"\nURL: "+e.url,n=null,t.prev=2,!(i=e.headers.get("Content-Type")||"text/plain").match(/\bjson\b/i)){t.next=11;break}return t.next=7,e.json();case 7:(n=t.sent).error?(r+="\n"+n.error,n.error_description&&(r+=": "+n.error_description)):r+="\n\n"+JSON.stringify(n,null,4),t.next=16;break;case 11:if(!i.match(/^text\//i)){t.next=16;break}return t.next=14,e.text();case 14:(n=t.sent)&&(r+="\n\n"+n);case 16:t.next=20;break;case 18:t.prev=18,t.t0=t.catch(2);case 20:throw new a.default(r,e.status,e.statusText,n);case 21:case"end":return t.stop()}}),t,null,[[2,18]])})))).apply(this,arguments)}function w(t,e){if(void 0===e&&(e=""),!(e=e.trim()))return t;for(var r=e.split("."),n=t;n&&r.length;){var o=r.shift();if(!o&&Array.isArray(n))return n.map((function(t){return w(t,r.join("."))}));n=n[o]}return n}function x(t){return Array.isArray(t)?t:[t]}function E(t,e){var r=t.split(".")[1];return r?JSON.parse(e.atob(r)):null}function S(t,e){var r={};function n(t,e){t&&Array.isArray(t.coding)&&t.coding.forEach((function(t){var n=t.code;n&&(r[n]=r[n]||[],r[n].push(e))}))}return x(t).forEach((function(t){"Observation"===t.resourceType&&t[e]&&(Array.isArray(t[e])?t[e].forEach((function(e){return n(e,t)})):n(t[e],t))})),r}function k(){return(k=(0,i.default)(o.default.mark((function t(e,r,n){var i,a,u,s,c;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===r&&(r=800),void 0===n&&(n=720),"function"!=typeof e){t.next=6;break}return t.next=5,e();case 5:e=t.sent;case 6:if(!e||"object"!=typeof e){t.next=8;break}return t.abrupt("return",e);case 8:if("string"==typeof e){t.next=11;break}return f("Invalid target type '%s'. Failing back to '_self'.",typeof e),t.abrupt("return",self);case 11:if("_self"!=e){t.next=13;break}return t.abrupt("return",self);case 13:if("_parent"!=e){t.next=15;break}return t.abrupt("return",parent);case 15:if("_top"!=e){t.next=17;break}return t.abrupt("return",top);case 17:if("_blank"!=e){t.next=34;break}if(a=null,t.prev=19,a=window.open("","SMARTAuthPopup")){t.next=23;break}throw new Error("Perhaps window.open was blocked");case 23:t.next=28;break;case 25:t.prev=25,t.t0=t.catch(19),i=t.t0;case 28:if(a){t.next=33;break}return f("Cannot open window. Failing back to '_self'. %s",i),t.abrupt("return",self);case 33:return t.abrupt("return",a);case 34:if("popup"!=e){t.next=51;break}if(s=null,t.prev=36,s=window.open("","SMARTAuthPopup",["height="+n,"width="+r,"menubar=0","resizable=1","status=0","top="+(screen.height-n)/2,"left="+(screen.width-r)/2].join(","))){t.next=40;break}throw new Error("Perhaps the popup window was blocked");case 40:t.next=45;break;case 42:t.prev=42,t.t1=t.catch(36),u=t.t1;case 45:if(s){t.next=50;break}return f("Cannot open window. Failing back to '_self'. %s",u),t.abrupt("return",self);case 50:return t.abrupt("return",s);case 51:if(!(c=frames[e])){t.next=54;break}return t.abrupt("return",c);case 54:return f("Unknown target '%s'. Failing back to '_self'.",e),t.abrupt("return",self);case 56:case"end":return t.stop()}}),t,null,[[19,25],[36,42]])})))).apply(this,arguments)}e.units={cm:function(t){var e=t.code,r=t.value;if(h({code:e,value:r}),"cm"==e)return r;if("m"==e)return 100*r;if("in"==e)return 2.54*r;if("[in_us]"==e)return 2.54*r;if("[in_i]"==e)return 2.54*r;if("ft"==e)return 30.48*r;if("[ft_us]"==e)return 30.48*r;throw new Error("Unrecognized length unit: "+e)},kg:function(t){var e=t.code,r=t.value;if(h({code:e,value:r}),"kg"==e)return r;if("g"==e)return r/1e3;if(e.match(/lb/))return r/2.20462;if(e.match(/oz/))return r/35.274;throw new Error("Unrecognized weight unit: "+e)},any:function(t){return h(t),t.value}},e.checkResponse=p,e.responseToJSON=v,e.request=g,e.getAndCache=y,e.fetchConformanceStatement=function(t,e){void 0===t&&(t="/");var r=String(t).replace(/\/*$/,"/")+"metadata";return y(r,e).catch((function(t){throw new Error('Failed to fetch the conformance statement from "'+r+'". '+t)}))},e.humanizeError=m,e.getPath=w,e.setPath=function(t,e,r,n){return void 0===n&&(n=!1),e.trim().split(".").reduce((function(t,e,o,i){if(!t||o!==i.length-1)return t&&void 0===t[e]&&n&&(t[e]=i[o+1].match(/^[0-9]+$/)?[]:{}),t?t[e]:void 0;t[e]=r}),t),t},e.makeArray=x,e.absolute=function(t,e){return t.match(/^http/)||t.match(/^urn/)?t:String(e||"").replace(/\/+$/,"")+"/"+t.replace(/^\/+/,"")},e.randomString=function(t,e){void 0===t&&(t=8),void 0===e&&(e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");for(var r=[],n=e.length;t--;)r.push(e.charAt(Math.floor(Math.random()*n)));return r.join("")},e.jwtDecode=E,e.getAccessTokenExpiration=function(t,e){var r=Math.floor(Date.now()/1e3);if(t.expires_in)return r+t.expires_in;if(t.access_token){var n=E(t.access_token,e);if(n&&n.exp)return n.exp}return r+300},e.byCode=S,e.byCodes=function(t,e){var r=S(t,e);return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter((function(t){return t+""in r})).reduce((function(t,e){return t.concat(r[e+""])}),[])}},e.getPatientParam=function(t,e){var r=(w(t,"rest.0.resource")||[]).find((function(t){return t.type===e}));if(!r)throw new Error('Resource "'+e+'" is not supported by this FHIR server');if(!Array.isArray(r.searchParam))throw new Error('No search parameters supported for "'+e+'" on this FHIR server');if("Patient"==e&&r.searchParam.find((function(t){return"_id"==t.name})))return"_id";var n=u.patientParams.find((function(t){return r.searchParam.find((function(e){return e.name==t}))}));if(!n)throw new Error("I don't know what param to use for "+e);return n},e.getTargetWindow=function(t,e,r){return k.apply(this,arguments)}},function(t,e,r){"use strict";var n=r(3),o=r(43).find,i=r(70),a=r(17),u=!0,s=a("find");"find"in[]&&Array(1).find((function(){u=!1})),n({target:"Array",proto:!0,forced:u||!s},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("find")},function(t,e,r){var n=r(7),o=r(13),i=r(1)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,r){"use strict";var n=r(3),o=r(119).trim;n({target:"String",proto:!0,forced:r(153)("trim")},{trim:function(){return o(this)}})},function(t,e,r){var n=r(14),o="["+r(120)+"]",i=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),u=function(t){return function(e){var r=String(n(e));return 1&t&&(r=r.replace(i,"")),2&t&&(r=r.replace(a,"")),r}};t.exports={start:u(1),end:u(2),trim:u(3)}},function(t,e){t.exports="\t\n\v\f\r                　\u2028\u2029\ufeff"},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},function(t,e,r){"use strict";var n=r(3),o=r(91),i=r(21),a=r(9),u=r(11),s=r(38),c=r(69),f=r(39),l=r(17),h=f("splice"),p=l("splice",{ACCESSORS:!0,0:0,1:2}),d=Math.max,v=Math.min;n({target:"Array",proto:!0,forced:!h||!p},{splice:function(t,e){var r,n,f,l,h,p,g=u(this),y=a(g.length),m=o(t,y),b=arguments.length;if(0===b?r=n=0:1===b?(r=0,n=y-m):(r=b-2,n=v(d(i(e),0),y-m)),y+r-n>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(f=s(g,n),l=0;l<n;l++)(h=m+l)in g&&c(f,l,g[h]);if(f.length=n,r<n){for(l=m;l<y-n;l++)p=l+r,(h=l+n)in g?g[p]=g[h]:delete g[p];for(l=y;l>y-n+r;l--)delete g[l-1]}else if(r>n)for(l=y-n;l>m;l--)p=l+r-1,(h=l+n-1)in g?g[p]=g[h]:delete g[p];for(l=0;l<r;l++)g[l+m]=arguments[l+2];return g.length=y-n+r,f}})},function(t,e,r){var n=r(6),o=r(2),i=r(35),a=r(124),u=r(10).f,s=r(63).f,c=r(117),f=r(78),l=r(114),h=r(8),p=r(0),d=r(15).set,v=r(95),g=r(1)("match"),y=o.RegExp,m=y.prototype,b=/a/g,w=/a/g,x=new y(b)!==b,E=l.UNSUPPORTED_Y;if(n&&i("RegExp",!x||E||p((function(){return w[g]=!1,y(b)!=b||y(w)==w||"/a/i"!=y(b,"i")})))){for(var S=function(t,e){var r,n=this instanceof S,o=c(t),i=void 0===e;if(!n&&o&&t.constructor===S&&i)return t;x?o&&!i&&(t=t.source):t instanceof S&&(i&&(e=f.call(t)),t=t.source),E&&(r=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var u=a(x?new y(t,e):y(t,e),n?this:m,S);return E&&r&&d(u,{sticky:r}),u},k=function(t){t in S||u(S,t,{configurable:!0,get:function(){return y[t]},set:function(e){y[t]=e}})},R=s(y),O=0;R.length>O;)k(R[O++]);m.constructor=S,S.prototype=m,h(o,"RegExp",S)}v("RegExp")},function(t,e,r){var n=r(7),o=r(109);t.exports=function(t,e,r){var i,a;return o&&"function"==typeof(i=e.constructor)&&i!==r&&n(a=i.prototype)&&a!==r.prototype&&o(t,a),t}},function(t,e,r){"use strict";var n=r(8),o=r(4),i=r(0),a=r(78),u=RegExp.prototype,s=u.toString,c=i((function(){return"/a/b"!=s.call({source:"a",flags:"b"})})),f="toString"!=s.name;(c||f)&&n(RegExp.prototype,"toString",(function(){var t=o(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in u)?a.call(t):r)}),{unsafe:!0})},function(t,e,r){"use strict";var n=r(3),o=r(90).indexOf,i=r(45),a=r(17),u=[].indexOf,s=!!u&&1/[1].indexOf(1,-0)<0,c=i("indexOf"),f=a("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:s||!c||!f},{indexOf:function(t){return s?u.apply(this,arguments)||0:o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(3),o=r(11),i=r(71);n({target:"Object",stat:!0,forced:r(0)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,r){"use strict";var n=r(23);r(37),r(75),r(116),r(167),r(44),r(126),r(30),r(46),r(169),r(41),r(127),r(19),r(33),r(170),r(18),r(42),r(48),r(31),r(171),r(80),r(118),r(173),r(51),r(73),r(74);var o=n(r(52));r(53);var i=n(r(54));Object.defineProperty(e,"__esModule",{value:!0});var a=r(115),u=r(176),s=r(81),c=("undefined"!=typeof FHIRCLIENT_PURE?window:r(82)).Response,f=a.debug.extend("client");function l(t,e){return h.apply(this,arguments)}function h(){return(h=(0,i.default)(o.default.mark((function t(e,r){var n,u,c;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=function(){return(c=(0,i.default)(o.default.mark((function t(e){var n,i,u;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.pathname.split("/").pop()){t.next=3;break}throw new Error('Invalid url "'+e+'"');case 3:if(-1!=s.patientCompartment.indexOf(n)){t.next=5;break}throw new Error('Cannot filter "'+n+'" resources by patient');case 5:return t.next=7,a.fetchConformanceStatement(r.state.serverUrl);case 7:return i=t.sent,u=a.getPatientParam(i,n),e.searchParams.set(u,r.patient.id),t.abrupt("return",e.href);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)},u=function(t){return c.apply(this,arguments)},n=a.absolute("/",r.state.serverUrl),!("string"==typeof e||e instanceof URL)){t.next=8;break}return t.next=6,u(new URL(e+"",n));case 6:return t.t0=t.sent,t.abrupt("return",{url:t.t0});case 8:return t.next=10,u(new URL(e.url+"",n));case 10:return e.url=t.sent,t.abrupt("return",e);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t,e,r,n,o,i){var u=a.getPath(t,e);if(u){var s=Array.isArray(u);return Promise.all(a.makeArray(u).filter(Boolean).map((function(u,c){var f=u.reference;if(f)return function(t,e,r,n){return e[t]||(e[t]=r.request({url:t,signal:n}).then((function(r){return e[t]=r,r}),(function(r){throw delete e[t],r}))),Promise.resolve(e[t])}(f,n,o,i).then((function(n){r&&(s?e.indexOf("..")>-1?a.setPath(t,""+e.replace("..","."+c+"."),n):a.setPath(t,e+"."+c,n):a.setPath(t,e,n))})).catch((function(t){if(404!==t.status)throw t}))})))}}function d(t,e,r,n,o){var i=a.makeArray(e.resolveReferences).filter(Boolean).map((function(t){return String(t).trim()})).filter(Boolean);if(!(i=i.filter((function(t,e){return!(i.indexOf(t,e+1)>-1)||(f('Duplicated reference path "%s"',t),!1)}))).length)return Promise.resolve();var u={};i.forEach((function(t){var e=t.split(".").length;u[e]||(u[e]=[]),u[e].push(t)}));var s=Promise.resolve();return Object.keys(u).sort().forEach((function(i){var a=u[i];s=s.then((function(){return Promise.all(a.map((function(i){return p(t,i,!!e.graph,r,n,o)})))}))})),s}var v=function(){function t(t,e){var r=this;this.units=a.units;var n="string"==typeof e?{serverUrl:e}:e;if(!n.serverUrl||!n.serverUrl.match(/https?:\/\/.+/))throw new Error('A "serverUrl" option is required and must begin with "http(s)"');this.state=n,this.environment=t,this._refreshTask=null;var u=this;this.patient={get id(){return u.getPatientId()},read:function(t){void 0===t&&(t={});var e=r.patient.id;return e?r.request(Object.assign({},t,{url:"Patient/"+e})):Promise.reject(new Error("Patient is not available"))},request:function(t,e){return void 0===e&&(e={}),r.patient.id?(0,i.default)(o.default.mark((function n(){var i;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,l(t,r);case 2:return i=n.sent,n.abrupt("return",r.request(i,e));case 4:case"end":return n.stop()}}),n)})))():Promise.reject(new Error("Patient is not available"))}},this.encounter={get id(){return u.getEncounterId()},read:function(t){void 0===t&&(t={});var e=r.encounter.id;return e?r.request(Object.assign({},t,{url:"Encounter/"+e})):Promise.reject(new Error("Encounter is not available"))}},this.user={get fhirUser(){return u.getFhirUser()},get id(){return u.getUserId()},get resourceType(){return u.getUserType()},read:function(t){void 0===t&&(t={});var e=r.user.fhirUser;return e?r.request(Object.assign({},t,{url:e})):Promise.reject(new Error("User is not available"))}},this.connect(t.fhir)}var e=t.prototype;return e.connect=function(t){if("function"==typeof t){var e={baseUrl:this.state.serverUrl.replace(/\/$/,"")},r=this.getState("tokenResponse.access_token");if(r)e.auth={token:r};else{var n=this.state,o=n.username,i=n.password;o&&i&&(e.auth={user:o,pass:i})}this.api=t(e);var a=this.getState("tokenResponse.patient");a&&(this.patient.api=t(Object.assign({},e,{patient:a})))}return this},e.getPatientId=function(){var t=this.state.tokenResponse;return t?t.patient?t.patient:((this.state.scope||"").match(/\blaunch(\/patient)?\b/)?f("The ID of the selected patient is not available. Please check if your server supports that."):f(u.default.noScopeForId,"patient","patient"),null):(this.state.authorizeUri?f(u.default.noIfNoAuth,"the ID of the selected patient"):f(u.default.noFreeContext,"selected patient"),null)},e.getEncounterId=function(){var t=this.state.tokenResponse;return t?t.encounter?t.encounter:((this.state.scope||"").match(/\blaunch(\/encounter)?\b/)?f("The ID of the selected encounter is not available. Please check if your server supports that, and that the selected patient has any recorded encounters."):f(u.default.noScopeForId,"encounter","encounter"),null):(this.state.authorizeUri?f(u.default.noIfNoAuth,"the ID of the selected encounter"):f(u.default.noFreeContext,"selected encounter"),null)},e.getIdToken=function(){var t=this.state.tokenResponse;if(t){var e=t.id_token,r=this.state.scope||"";if(!e){var n=r.match(/\bopenid\b/),o=r.match(/\bprofile\b/),i=r.match(/\bfhirUser\b/);return f(n&&(i||o)?"The id_token is not available. Please check if your server supports that.":"You are trying to get the id_token but you are not using the right scopes. Please add 'openid' and 'fhirUser' or 'profile' to the scopes you are requesting."),null}return a.jwtDecode(e,this.environment)}return this.state.authorizeUri?f(u.default.noIfNoAuth,"the id_token"):f(u.default.noFreeContext,"id_token"),null},e.getFhirUser=function(){var t=this.getIdToken();return t?t.profile:null},e.getUserId=function(){var t=this.getFhirUser();return t?t.split("/")[1]:null},e.getUserType=function(){var t=this.getFhirUser();return t?t.split("/")[0]:null},e.getAuthorizationHeader=function(){var t=this.getState("tokenResponse.access_token");if(t)return"Bearer "+t;var e=this.state,r=e.username,n=e.password;return r&&n?"Basic "+this.environment.btoa(r+":"+n):null},e._clearState=function(){var t=(0,i.default)(o.default.mark((function t(){var e,r;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.environment.getStorage(),t.next=3,e.get(s.SMART_KEY);case 3:if(!(r=t.sent)){t.next=7;break}return t.next=7,e.unset(r);case 7:return t.next=9,e.unset(s.SMART_KEY);case 9:this.state.tokenResponse={};case 10:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),e.create=function(t,e){return void 0===e&&(e={}),this.request(Object.assign({},e,{url:""+t.resourceType,method:"POST",body:JSON.stringify(t),headers:Object.assign({"Content-Type":"application/json"},e.headers)}))},e.update=function(t,e){return void 0===e&&(e={}),this.request(Object.assign({},e,{url:t.resourceType+"/"+t.id,method:"PUT",body:JSON.stringify(t),headers:Object.assign({"Content-Type":"application/json"},e.headers)}))},e.delete=function(t,e){return void 0===e&&(e={}),this.request(Object.assign({},e,{url:t,method:"DELETE"}))},e.request=function(){var t=(0,i.default)(o.default.mark((function t(e,r,n){var s,f,l,h,p,v,g=this;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===r&&(r={}),void 0===n&&(n={}),f=a.debug.extend("client:request"),e){t.next=5;break}throw new Error("request requires an url or request options as argument");case 5:return"string"==typeof e||e instanceof URL?(l=String(e),e={}):l=String(e.url),l=a.absolute(l,this.state.serverUrl),h={graph:!1!==r.graph,flat:!!r.flat,pageLimit:null!==(s=r.pageLimit)&&void 0!==s?s:1,resolveReferences:r.resolveReferences||[],useRefreshToken:!1!==r.useRefreshToken,onPage:"function"==typeof r.onPage?r.onPage:void 0},p=e.signal||void 0,v=h.useRefreshToken?this.refreshIfNeeded({signal:p}).then((function(){return e})):Promise.resolve(e),t.abrupt("return",v.then((function(t){var e=g.getAuthorizationHeader();return e&&(t.headers=Object.assign({},t.headers,{Authorization:e})),t})).then((function(t){return f("%s, options: %O, fhirOptions: %O",l,t,h),a.request(l,t)})).catch(function(){var t=(0,i.default)(o.default.mark((function t(e){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(401!=e.status){t.next=12;break}if(g.getState("tokenResponse.access_token")){t.next=3;break}throw new Error("This app cannot be accessed directly. Please launch it as SMART app!");case 3:if(h.useRefreshToken){t.next=8;break}return f("Your session has expired and the useRefreshToken option is set to false. Please re-launch the app."),t.next=7,g._clearState();case 7:throw new Error(u.default.expired);case 8:return f("Auto-refresh failed! Please re-launch the app."),t.next=11,g._clearState();case 11:throw new Error(u.default.expired);case 12:throw e;case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){throw 403==t.status&&f("Permission denied! Please make sure that you have requested the proper scopes."),t})).then((function(t){return t?"string"==typeof t||t instanceof c?t:(e=(0,i.default)(o.default.mark((function t(e){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("Bundle"!=e.resourceType){t.next=5;break}return t.next=3,Promise.all((e.entry||[]).map((function(t){return d(t.resource,h,n,g,p)})));case 3:t.next=7;break;case 5:return t.next=7,d(e,h,n,g,p);case 7:return t.abrupt("return",e);case 8:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})(t).then(function(){var t=(0,i.default)(o.default.mark((function t(e){var r,i,u;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e||"Bundle"!=e.resourceType){t.next=19;break}if(r=e.link||[],h.flat&&(e=(e.entry||[]).map((function(t){return t.resource}))),!h.onPage){t.next=6;break}return t.next=6,h.onPage(e,Object.assign({},n));case 6:if(!--h.pageLimit){t.next=19;break}if(i=r.find((function(t){return"next"==t.relation})),e=a.makeArray(e),!i||!i.url){t.next=19;break}return t.next=12,g.request({url:i.url,signal:p},h,n);case 12:if(u=t.sent,!h.onPage){t.next=15;break}return t.abrupt("return",null);case 15:if(!h.resolveReferences.length){t.next=18;break}return Object.assign(n,u.references),t.abrupt("return",e.concat(a.makeArray(u.data||u)));case 18:return t.abrupt("return",e.concat(a.makeArray(u)));case 19:return t.abrupt("return",e);case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then((function(t){if(h.graph)n={};else if(!h.onPage&&h.resolveReferences.length)return{data:t,references:n};return t})):t;var e})));case 11:case"end":return t.stop()}}),t,this)})));return function(e,r,n){return t.apply(this,arguments)}}(),e.refreshIfNeeded=function(t){void 0===t&&(t={});var e=this.getState("tokenResponse.access_token"),r=this.getState("tokenResponse.refresh_token"),n=this.state.expiresAt||0;return e&&r&&n-10<Date.now()/1e3?this.refresh(t):Promise.resolve(this.state)},e.refresh=function(t){var e,r,n=this;void 0===t&&(t={});var o=a.debug.extend("client:refresh");o("Attempting to refresh with refresh_token...");var i=null===(r=null===(e=this.state)||void 0===e?void 0:e.tokenResponse)||void 0===r?void 0:r.refresh_token;if(!i)throw new Error("Unable to refresh. No refresh_token found.");var u=this.state.tokenUri;if(!u)throw new Error("Unable to refresh. No tokenUri found.");var s=this.getState("tokenResponse.scope")||"",c=s.search(/\boffline_access\b/)>-1,f=s.search(/\bonline_access\b/)>-1;if(!c&&!f)throw new Error("Unable to refresh. No offline_access or online_access scope found.");if(!this._refreshTask){var l=Object.assign({credentials:this.environment.options.refreshTokenWithCredentials||"same-origin"},t,{method:"POST",mode:"cors",headers:Object.assign({},t.headers||{},{"content-type":"application/x-www-form-urlencoded"}),body:"grant_type=refresh_token&refresh_token="+encodeURIComponent(i)});if(!("authorization"in l.headers)){var h=this.state,p=h.clientSecret,d=h.clientId;p&&(l.headers.authorization="Basic "+this.environment.btoa(d+":"+p))}this._refreshTask=a.request(u,l).then((function(t){if(!t.access_token)throw new Error("No access token received");return o("Received new access token response %O",t),Object.assign(n.state.tokenResponse,t),n.state.expiresAt=a.getAccessTokenExpiration(t,n.environment),n.state})).catch((function(t){var e,r;throw(null===(r=null===(e=n.state)||void 0===e?void 0:e.tokenResponse)||void 0===r?void 0:r.refresh_token)&&(o("Deleting the expired or invalid refresh token."),delete n.state.tokenResponse.refresh_token),t})).finally((function(){n._refreshTask=null;var t=n.state.key;t?n.environment.getStorage().set(t,n.state):o("No 'key' found in Clint.state. Cannot persist the instance.")}))}return this._refreshTask},e.byCode=function(t,e){return a.byCode(t,e)},e.byCodes=function(t,e){return a.byCodes(t,e)},e.getPath=function(t,e){return void 0===e&&(e=""),a.getPath(t,e)},e.getState=function(t){return void 0===t&&(t=""),a.getPath(Object.assign({},this.state),t)},e.getFhirVersion=function(){return a.fetchConformanceStatement(this.state.serverUrl).then((function(t){return t.fhirVersion}))},e.getFhirRelease=function(){return this.getFhirVersion().then((function(t){var e;return null!==(e=s.fhirVersions[t])&&void 0!==e?e:0}))},t}();e.default=v},function(t,e,r){"use strict";r(19),r(33);var n=(new(r(141).default)).getSmartApi(),o=n.ready,i=n.authorize,a=n.init,u=n.client,s=n.options;if("undefined"==typeof FHIRCLIENT_PURE){var c=r(82);r(178),window.fetch||(window.fetch=c.default,window.Headers=c.Headers,window.Request=c.Request,window.Response=c.Response)}var f={AbortController:window.AbortController,client:u,oauth2:{settings:s,ready:o,authorize:i,init:a}};t.exports=f},function(t,e,r){var n=r(87);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(2),o=r(59),i=n.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},function(t,e,r){"use strict";var n=r(55),o=r(62);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,r){var n=r(5),o=r(134),i=r(34),a=r(10);t.exports=function(t,e){for(var r=o(e),u=a.f,s=i.f,c=0;c<r.length;c++){var f=r[c];n(t,f)||u(t,f,s(e,f))}}},function(t,e,r){var n=r(16),o=r(63),i=r(92),a=r(4);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),r=i.f;return r?e.concat(r(t)):e}},function(t,e,r){var n=r(2);t.exports=n},function(t,e,r){var n=r(4),o=r(96),i=r(9),a=r(22),u=r(36),s=r(97),c=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,r,f,l){var h,p,d,v,g,y,m,b=a(e,r,f?2:1);if(l)h=t;else{if("function"!=typeof(p=u(t)))throw TypeError("Target is not iterable");if(o(p)){for(d=0,v=i(t.length);v>d;d++)if((g=f?b(n(m=t[d])[0],m[1]):b(t[d]))&&g instanceof c)return g;return new c(!1)}h=p.call(t)}for(y=h.next;!(m=y.call(h)).done;)if("object"==typeof(g=s(h,b,m.value,f))&&g&&g instanceof c)return g;return new c(!1)}).stop=function(t){return new c(!0,t)}},function(t,e,r){var n=r(1)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},function(t,e,r){var n,o,i,a,u,s,c,f,l=r(2),h=r(34).f,p=r(13),d=r(98).set,v=r(100),g=l.MutationObserver||l.WebKitMutationObserver,y=l.process,m=l.Promise,b="process"==p(y),w=h(l,"queueMicrotask"),x=w&&w.value;x||(n=function(){var t,e;for(b&&(t=y.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},b?a=function(){y.nextTick(n)}:g&&!v?(u=!0,s=document.createTextNode(""),new g(n).observe(s,{characterData:!0}),a=function(){s.data=u=!u}):m&&m.resolve?(c=m.resolve(void 0),f=c.then,a=function(){f.call(c,n)}):a=function(){d.call(l,n)}),t.exports=x||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},function(t,e,r){var n=r(2);t.exports=function(t,e){var r=n.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,r){"use strict";var n=r(23);r(37),r(30),r(41),r(19),r(42),r(73),r(74);var o=n(r(148));Object.defineProperty(e,"__esModule",{value:!0});var i=r(149),a=r(128),u=r(177),s=function(){function t(t){void 0===t&&(t={}),this._url=null,this._storage=null,this.options=Object.assign({replaceBrowserHistory:!0,fullSessionStorageSupport:!0,refreshTokenWithCredentials:"same-origin"},t)}var e=t.prototype;return e.relative=function(t){return new URL(t,this.getUrl().href).href},e.getUrl=function(){return this._url||(this._url=new URL(location+"")),this._url},e.redirect=function(t){location.href=t},e.getStorage=function(){return this._storage||(this._storage=new u.default),this._storage},e.getAbortController=function(){return AbortController},e.atob=function(t){return window.atob(t)},e.btoa=function(t){return window.btoa(t)},e.getSmartApi=function(){var t=this;return{ready:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return i.ready.apply(i,[t].concat(r))},authorize:function(e){return i.authorize(t,e)},init:function(e){return i.init(t,e)},client:function(e){return new a.default(t,e)},options:this.options}},(0,o.default)(t,[{key:"fhir",get:function(){return"function"==typeof fhir?fhir:null}}]),t}();e.default=s},function(t,e,r){var n=r(0);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var n=r(7);t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,r){"use strict";var n=r(22),o=r(11),i=r(97),a=r(96),u=r(9),s=r(69),c=r(36);t.exports=function(t){var e,r,f,l,h,p,d=o(t),v="function"==typeof this?this:Array,g=arguments.length,y=g>1?arguments[1]:void 0,m=void 0!==y,b=c(d),w=0;if(m&&(y=n(y,g>2?arguments[2]:void 0,2)),null==b||v==Array&&a(b))for(r=new v(e=u(d.length));e>w;w++)p=m?y(d[w],w):d[w],s(r,w,p);else for(h=(l=b.call(d)).next,r=new v;!(f=h.call(l)).done;w++)p=m?i(l,y,[f.value,w],!0):f.value,s(r,w,p);return r.length=w,r}},function(t,e,r){"use strict";var n=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",a=Math.floor,u=String.fromCharCode,s=function(t){return t+22+75*(t<26)},c=function(t,e,r){var n=0;for(t=r?a(t/700):t>>1,t+=a(t/e);t>455;n+=36)t=a(t/35);return a(n+36*t/(t+38))},f=function(t){var e,r,n=[],o=(t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var i=t.charCodeAt(r++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),r--)}else e.push(o)}return e}(t)).length,f=128,l=0,h=72;for(e=0;e<t.length;e++)(r=t[e])<128&&n.push(u(r));var p=n.length,d=p;for(p&&n.push("-");d<o;){var v=2147483647;for(e=0;e<t.length;e++)(r=t[e])>=f&&r<v&&(v=r);var g=d+1;if(v-f>a((2147483647-l)/g))throw RangeError(i);for(l+=(v-f)*g,f=v,e=0;e<t.length;e++){if((r=t[e])<f&&++l>2147483647)throw RangeError(i);if(r==f){for(var y=l,m=36;;m+=36){var b=m<=h?1:m>=h+26?26:m-h;if(y<b)break;var w=y-b,x=36-b;n.push(u(s(b+w%x))),y=a(w/x)}n.push(u(s(y))),h=c(l,g,d==p),l=0,++d}}++l,++f}return n.join("")};t.exports=function(t){var e,r,i=[],a=t.toLowerCase().replace(o,".").split(".");for(e=0;e<a.length;e++)r=a[e],i.push(n.test(r)?"xn--"+f(r):r);return i.join(".")}},function(t,e,r){"use strict";r(30);var n=r(3),o=r(16),i=r(112),a=r(8),u=r(94),s=r(27),c=r(106),f=r(15),l=r(65),h=r(5),p=r(22),d=r(62),v=r(4),g=r(7),y=r(40),m=r(24),b=r(147),w=r(36),x=r(1),E=o("fetch"),S=o("Headers"),k=x("iterator"),R=f.set,O=f.getterFor("URLSearchParams"),C=f.getterFor("URLSearchParamsIterator"),_=/\+/g,A=Array(4),P=function(t){return A[t-1]||(A[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},j=function(t){try{return decodeURIComponent(t)}catch(e){return t}},T=function(t){var e=t.replace(_," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(P(r--),j);return e}},I=/[!'()~]|%20/g,L={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},U=function(t){return L[t]},F=function(t){return encodeURIComponent(t).replace(I,U)},M=function(t,e){if(e)for(var r,n,o=e.split("&"),i=0;i<o.length;)(r=o[i++]).length&&(n=r.split("="),t.push({key:T(n.shift()),value:T(n.join("="))}))},N=function(t){this.entries.length=0,M(this.entries,t)},q=function(t,e){if(t<e)throw TypeError("Not enough arguments")},B=c((function(t,e){R(this,{type:"URLSearchParamsIterator",iterator:b(O(t).entries),kind:e})}),"Iterator",(function(){var t=C(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r})),D=function(){l(this,D,"URLSearchParams");var t,e,r,n,o,i,a,u,s,c=arguments.length>0?arguments[0]:void 0,f=this,p=[];if(R(f,{type:"URLSearchParams",entries:p,updateURL:function(){},updateSearchParams:N}),void 0!==c)if(g(c))if("function"==typeof(t=w(c)))for(r=(e=t.call(c)).next;!(n=r.call(e)).done;){if((a=(i=(o=b(v(n.value))).next).call(o)).done||(u=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");p.push({key:a.value+"",value:u.value+""})}else for(s in c)h(c,s)&&p.push({key:s,value:c[s]+""});else M(p,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},z=D.prototype;u(z,{append:function(t,e){q(arguments.length,2);var r=O(this);r.entries.push({key:t+"",value:e+""}),r.updateURL()},delete:function(t){q(arguments.length,1);for(var e=O(this),r=e.entries,n=t+"",o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;e.updateURL()},get:function(t){q(arguments.length,1);for(var e=O(this).entries,r=t+"",n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){q(arguments.length,1);for(var e=O(this).entries,r=t+"",n=[],o=0;o<e.length;o++)e[o].key===r&&n.push(e[o].value);return n},has:function(t){q(arguments.length,1);for(var e=O(this).entries,r=t+"",n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){q(arguments.length,1);for(var r,n=O(this),o=n.entries,i=!1,a=t+"",u=e+"",s=0;s<o.length;s++)(r=o[s]).key===a&&(i?o.splice(s--,1):(i=!0,r.value=u));i||o.push({key:a,value:u}),n.updateURL()},sort:function(){var t,e,r,n=O(this),o=n.entries,i=o.slice();for(o.length=0,r=0;r<i.length;r++){for(t=i[r],e=0;e<r;e++)if(o[e].key>t.key){o.splice(e,0,t);break}e===r&&o.push(t)}n.updateURL()},forEach:function(t){for(var e,r=O(this).entries,n=p(t,arguments.length>1?arguments[1]:void 0,3),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new B(this,"keys")},values:function(){return new B(this,"values")},entries:function(){return new B(this,"entries")}},{enumerable:!0}),a(z,k,z.entries),a(z,"toString",(function(){for(var t,e=O(this).entries,r=[],n=0;n<e.length;)t=e[n++],r.push(F(t.key)+"="+F(t.value));return r.join("&")}),{enumerable:!0}),s(D,"URLSearchParams"),n({global:!0,forced:!i},{URLSearchParams:D}),i||"function"!=typeof E||"function"!=typeof S||n({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,r,n,o=[t];return arguments.length>1&&(g(e=arguments[1])&&(r=e.body,"URLSearchParams"===d(r)&&((n=e.headers?new S(e.headers):new S).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=y(e,{body:m(0,String(r)),headers:m(0,n)}))),o.push(e)),E.apply(this,o)}}),t.exports={URLSearchParams:D,getState:O}},function(t,e,r){var n=r(4),o=r(36);t.exports=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return n(e.call(t))}},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(t,e,r){"use strict";var n=r(23);r(75),r(44),r(30),r(76),r(46),r(77),r(41),r(19),r(33),r(18),r(42),r(48),r(31),r(51),r(73),r(74);var o=n(r(52));r(53);var i=n(r(54));Object.defineProperty(e,"__esModule",{value:!0}),e.init=e.ready=e.buildTokenRequest=e.completeAuth=e.onMessage=e.isInPopUp=e.isInFrame=e.authorize=e.getSecurityExtensions=e.fetchWellKnownJson=e.KEY=void 0;var a=r(115),u=r(128),s=r(81);Object.defineProperty(e,"KEY",{enumerable:!0,get:function(){return s.SMART_KEY}});var c=a.debug.extend("oauth2");function f(){return"object"==typeof window}function l(t,e){void 0===t&&(t="/");var r=String(t).replace(/\/*$/,"/")+".well-known/smart-configuration";return a.getAndCache(r,e).catch((function(t){throw new Error('Failed to fetch the well-known json "'+r+'". '+t.message)}))}function h(t,e){return void 0===t&&(t="/"),l(t,e).then((function(t){if(!t.authorization_endpoint||!t.token_endpoint)throw new Error("Invalid wellKnownJson");return{registrationUri:t.registration_endpoint||"",authorizeUri:t.authorization_endpoint,tokenUri:t.token_endpoint}}))}function p(t,e){return void 0===t&&(t="/"),a.fetchConformanceStatement(t,e).then((function(t){var e=(a.getPath(t||{},"rest.0.security.extension")||[]).filter((function(t){return"http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris"===t.url})).map((function(t){return t.extension}))[0],r={registrationUri:"",authorizeUri:"",tokenUri:""};return e&&e.forEach((function(t){"register"===t.url&&(r.registrationUri=t.valueUri),"authorize"===t.url&&(r.authorizeUri=t.valueUri),"token"===t.url&&(r.tokenUri=t.valueUri)})),r}))}function d(t){var e=t.length,r=[],n=!1;return new Promise((function(o,i){function a(t){r.push(t)===e&&i(new Error(r.map((function(t){return t.message})).join("; ")))}t.forEach((function(e){e.promise.then((function(r){return function(e,r){e.complete=!0,n||(n=!0,t.forEach((function(t){t.complete||t.controller.abort()})),o(r))}(e,r)}),a)}))}))}function v(t,e){void 0===e&&(e="/");var r=t.getAbortController(),n=new r,o=new r;return d([{controller:n,promise:h(e,{signal:n.signal})},{controller:o,promise:p(e,{signal:o.signal})}])}function g(t,e,r){return y.apply(this,arguments)}function y(){return(y=(0,i.default)(o.default.mark((function t(e,r,n){var i,u,l,h,p,d,g,y,x,E,S,k,R,O,C,_,A,P,j,T,I,L,U,F,M,N,q,B,D,z,G;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===r&&(r={}),void 0===n&&(n=!1),u=(i=r).redirect_uri,l=i.clientSecret,h=i.fakeTokenResponse,p=i.patientId,d=i.encounterId,g=i.client_id,y=i.target,x=i.width,E=i.height,k=(S=r).iss,R=S.launch,O=S.fhirServiceUrl,C=S.redirectUri,_=S.scope,A=void 0===_?"":_,P=S.clientId,j=S.completeInTarget,T=e.getUrl(),I=e.getStorage(),k=T.searchParams.get("iss")||k,O=T.searchParams.get("fhirServiceUrl")||O,R=T.searchParams.get("launch")||R,P||(P=g),C||(C=u),C?C.match(/^https?\:\/\//)||(C=e.relative(C)):C=e.relative("."),L=String(k||O||"")){t.next=15;break}throw new Error("No server url found. It must be specified as `iss` or as `fhirServiceUrl` parameter");case 15:return k&&c("Making %s launch...",R?"EHR":"standalone"),R&&!A.match(/launch/)&&(A+=" launch"),f()&&(U=m(),F=b(),(U||F)&&!0!==j&&!1!==j&&(j=U,console.warn('Your app is being authorized from within an iframe or popup window. Please be explicit and provide a "completeInTarget" option. Use "true" to complete the authorization in the same window, or "false" to try to complete it in the parent or the opener window. See http://docs.smarthealthit.org/client-js/api.html'))),t.next=20,I.get(s.SMART_KEY);case 20:return M=t.sent,t.next=23,I.unset(M);case 23:if(N=a.randomString(16),q={clientId:P,scope:A,redirectUri:C,serverUrl:L,clientSecret:l,tokenResponse:{},key:N,completeInTarget:j},!(!f()||a.getPath(e,"options.fullSessionStorageSupport"))){t.next=29;break}return t.next=29,I.set(s.SMART_KEY,N);case 29:if(h&&Object.assign(q.tokenResponse,h),p&&Object.assign(q.tokenResponse,{patient:p}),d&&Object.assign(q.tokenResponse,{encounter:d}),B=C+"?state="+encodeURIComponent(N),!O||k){t.next=42;break}return c("Making fake launch..."),t.next=37,I.set(N,q);case 37:if(!n){t.next=39;break}return t.abrupt("return",B);case 39:return t.next=41,e.redirect(B);case 41:return t.abrupt("return",t.sent);case 42:return t.next=44,v(e,L);case 44:return D=t.sent,Object.assign(q,D),t.next=48,I.set(N,q);case 48:if(q.authorizeUri){t.next=54;break}if(!n){t.next=51;break}return t.abrupt("return",B);case 51:return t.next=53,e.redirect(B);case 53:return t.abrupt("return",t.sent);case 54:if(z=["response_type=code","client_id="+encodeURIComponent(P||""),"scope="+encodeURIComponent(A),"redirect_uri="+encodeURIComponent(C),"aud="+encodeURIComponent(L),"state="+encodeURIComponent(N)],R&&z.push("launch="+encodeURIComponent(R)),B=q.authorizeUri+"?"+z.join("&"),!n){t.next=59;break}return t.abrupt("return",B);case 59:if(!y||!f()){t.next=68;break}return t.next=62,a.getTargetWindow(y,x,E);case 62:if((G=t.sent)!==self)try{G.sessionStorage.removeItem(M),G.sessionStorage.setItem(N,JSON.stringify(q))}catch(t){a.debug('Failed to modify window.sessionStorage. Perhaps it is from different origin?. Failing back to "_self". %s',t),G=self}if(G!==self)try{G.location.href=B,self.addEventListener("message",w)}catch(t){a.debug('Failed to modify window.location. Perhaps it is from different origin?. Failing back to "_self". %s',t),self.location.href=B}else self.location.href=B;return t.abrupt("return");case 68:return t.next=70,e.redirect(B);case 70:return t.abrupt("return",t.sent);case 71:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function m(){try{return self!==top&&parent!==self}catch(t){return!0}}function b(){try{return self===top&&!!opener&&opener!==self&&!!window.name}catch(t){return!1}}function w(t){"completeAuth"==t.data.type&&t.origin===new URL(self.location.href).origin&&(window.removeEventListener("message",w),window.location.href=t.data.url)}function x(t){return E.apply(this,arguments)}function E(){return(E=(0,i.default)(o.default.mark((function t(e){var r,n,i,l,h,p,d,v,g,y,w,x,E,k,R,O,C,_,A;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.getUrl(),l=e.getStorage(),h=i.searchParams,p=h.get("state"),d=h.get("code"),v=h.get("error"),g=h.get("error_description"),p){t.next=11;break}return t.next=10,l.get(s.SMART_KEY);case 10:p=t.sent;case 11:if(!v&&!g){t.next=13;break}throw new Error([v,g].filter(Boolean).join(": "));case 13:if(c("key: %s, code: %s",p,d),p){t.next=16;break}throw new Error("No 'state' parameter found. Please (re)launch the app.");case 16:return t.next=18,l.get(p);case 18:if(y=t.sent,w=!f()||a.getPath(e,"options.fullSessionStorageSupport"),!f()||!y||y.completeInTarget){t.next=29;break}if(x=m(),E=b(),!x&&!E||i.searchParams.get("complete")){t.next=29;break}return i.searchParams.set("complete","1"),k=i.href,R=i.origin,x&&parent.postMessage({type:"completeAuth",url:k},R),E&&(opener.postMessage({type:"completeAuth",url:k},R),window.close()),t.abrupt("return",new Promise((function(){})));case 29:if(i.searchParams.delete("complete"),O=h.has("state"),f()&&a.getPath(e,"options.replaceBrowserHistory")&&(d||O)&&(d&&(h.delete("code"),c("Removed code parameter from the url.")),O&&w&&(h.delete("state"),c("Removed state parameter from the url.")),window.history.replaceState&&window.history.replaceState({},"",i.href)),y){t.next=34;break}throw new Error("No state found! Please (re)launch the app.");case 34:if(!d||(null===(r=y.tokenResponse)||void 0===r?void 0:r.access_token)||!y.tokenUri){t.next=54;break}if(d){t.next=38;break}throw new Error("'code' url parameter is required");case 38:return c("Preparing to exchange the code for access token..."),C=S(e,d,y),c("Token request options: %O",C),t.next=43,a.request(y.tokenUri,C);case 43:if(_=t.sent,c("Token response: %O",_),_.access_token){t.next=47;break}throw new Error("Failed to obtain access token.");case 47:return y.expiresAt=a.getAccessTokenExpiration(_,e),y=Object.assign({},y,{tokenResponse:_}),t.next=51,l.set(p,y);case 51:c("Authorization successful!"),t.next=55;break;case 54:c((null===(n=y.tokenResponse)||void 0===n?void 0:n.access_token)?"Already authorized":"No authorization needed");case 55:if(!w){t.next=58;break}return t.next=58,l.set(s.SMART_KEY,p);case 58:return A=new u.default(e,y),c("Created client instance: %O",A),t.abrupt("return",A);case 61:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(t,e,r){var n=r.redirectUri,o=r.clientSecret,i=r.tokenUri,a=r.clientId;if(!n)throw new Error("Missing state.redirectUri");if(!i)throw new Error("Missing state.tokenUri");if(!a)throw new Error("Missing state.clientId");var u={method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:"code="+e+"&grant_type=authorization_code&redirect_uri="+encodeURIComponent(n)};return o?(u.headers.Authorization="Basic "+t.btoa(a+":"+o),c("Using state.clientSecret to construct the authorization header: %s",u.headers.Authorization)):(c("No clientSecret found in state. Adding the clientId to the POST body"),u.body+="&client_id="+encodeURIComponent(a)),u}function k(){return(k=(0,i.default)(o.default.mark((function t(e,r,n){var i;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=x(e),r&&(i=i.then(r)),n&&(i=i.catch(n)),t.abrupt("return",i);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function R(){return(R=(0,i.default)(o.default.mark((function t(e,r){var n,i,a,c,f,l;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.getUrl(),i=n.searchParams.get("code"),a=n.searchParams.get("state"),!i||!a){t.next=5;break}return t.abrupt("return",x(e));case 5:if(c=e.getStorage(),t.t0=a,t.t0){t.next=11;break}return t.next=10,c.get(s.SMART_KEY);case 10:t.t0=t.sent;case 11:return f=t.t0,t.next=14,c.get(f);case 14:if(!(l=t.sent)){t.next=17;break}return t.abrupt("return",new u.default(e,l));case 17:return t.abrupt("return",g(e,r).then((function(){return new Promise((function(){}))})));case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.fetchWellKnownJson=l,e.getSecurityExtensions=v,e.authorize=g,e.isInFrame=m,e.isInPopUp=b,e.onMessage=w,e.completeAuth=x,e.buildTokenRequest=S,e.ready=function(t,e,r){return k.apply(this,arguments)},e.init=function(t,e){return R.apply(this,arguments)}},function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return R()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function l(){}function h(){}function p(){}var d={};d[o]=function(){return this};var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==e&&r.call(g,o)&&(d=g);var y=p.prototype=l.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var s=c(t[o],t,i);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==typeof l&&r.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){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function x(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:R}}function R(){return{value:void 0,done:!0}}return h.prototype=y.constructor=p,p.constructor=h,h.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(b.prototype),b.prototype[i]=function(){return this},t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),u(y,a,"Generator"),y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var 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=r.call(i,"catchLoc"),s=r.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 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,f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){"use strict";var n=r(3),o=r(152).left,i=r(45),a=r(17),u=i("reduce"),s=a("reduce",{1:0});n({target:"Array",proto:!0,forced:!u||!s},{reduce:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(28),o=r(11),i=r(26),a=r(9),u=function(t){return function(e,r,u,s){n(r);var c=o(e),f=i(c),l=a(c.length),h=t?l-1:0,p=t?-1:1;if(u<2)for(;;){if(h in f){s=f[h],h+=p;break}if(h+=p,t?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;t?h>=0:l>h;h+=p)h in f&&(s=r(s,f[h],h,c));return s}};t.exports={left:u(!1),right:u(!0)}},function(t,e,r){var n=r(0),o=r(120);t.exports=function(t){return n((function(){return!!o[t]()||"​᠎"!="​᠎"[t]()||o[t].name!==t}))}},function(t,e,r){"use strict";var n=r(23);r(77),r(155);var o=n(r(156)),i=n(r(157));Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(e,r,n,o){var i;return void 0===e&&(e="Unknown error"),void 0===r&&(r=0),void 0===n&&(n="Error"),void 0===o&&(o=null),(i=t.call(this,e)||this).message=e,i.name="HttpError",i.statusCode=r,i.status=r,i.statusText=n,i.body=o,i}return(0,o.default)(e,t),e.prototype.toJSON=function(){return{name:this.name,statusCode:this.statusCode,status:this.status,statusText:this.statusText,message:this.message,body:this.body}},e}((0,i.default)(Error));e.default=a},function(t,e,r){"use strict";r(3)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(t,e){t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}},function(t,e,r){var n=r(158),o=r(121),i=r(159),a=r(160);function u(e){var r="function"==typeof Map?new Map:void 0;return t.exports=u=function(t){if(null===t||!i(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return a(t,arguments,n(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o(e,t)},u(e)}t.exports=u},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},function(t,e){t.exports=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}},function(t,e,r){var n=r(121),o=r(161);function i(e,r,a){return o()?t.exports=i=Reflect.construct:t.exports=i=function(t,e,r){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return r&&n(i,r.prototype),i},i.apply(null,arguments)}t.exports=i},function(t,e){t.exports=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}}},function(t,e,r){"use strict";(function(n){r(122),r(123),r(18),r(125),r(48),r(31),e.log=function(){var t;return"object"==typeof console&&console.log&&(t=console).log.apply(t,arguments)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(n++,"%c"===t&&(o=n))})),e.splice(o,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){var t;try{t=e.storage.getItem("debug")}catch(t){}!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.exports=r(164)(e),t.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,r(163))},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var s,c=[],f=!1,l=-1;function h(){f&&s&&(f=!1,s.length?c=s.concat(c):l=-1,c.length&&p())}function p(){if(!f){var t=u(h);f=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1!==c.length||f||u(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){"use strict";r(37),r(44),r(126),r(76),r(46),r(122),r(165),r(127),r(19),r(123),r(18),r(125),r(31),r(80),r(51),t.exports=function(t){function e(t){for(var e=0,r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return n.colors[Math.abs(e)%n.colors.length]}function n(t){var r;function a(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];if(a.enabled){var i=a,u=Number(new Date),s=u-(r||u);i.diff=s,i.prev=r,i.curr=u,r=u,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");var c=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(function(t,r){if("%%"===t)return t;c++;var o=n.formatters[r];if("function"==typeof o){var a=e[c];t=o.call(i,a),e.splice(c,1),c--}return t})),n.formatArgs.call(i,e);var f=i.log||n.log;f.apply(i,e)}}return a.namespace=t,a.enabled=n.enabled(t),a.useColors=n.useColors(),a.color=e(t),a.destroy=o,a.extend=i,"function"==typeof n.init&&n.init(a),n.instances.push(a),a}function o(){var t=n.instances.indexOf(this);return-1!==t&&(n.instances.splice(t,1),!0)}function i(t,e){var r=n(this.namespace+(void 0===e?":":e)+t);return r.log=this.log,r}function a(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},n.disable=function(){var t=[].concat(n.names.map(a),n.skips.map(a).map((function(t){return"-"+t}))).join(",");return n.enable(""),t},n.enable=function(t){var e;n.save(t),n.names=[],n.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),o=r.length;for(e=0;e<o;e++)r[e]&&("-"===(t=r[e].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+t.substr(1)+"$")):n.names.push(new RegExp("^"+t+"$")));for(e=0;e<n.instances.length;e++){var i=n.instances[e];i.enabled=n.enabled(i.namespace)}},n.enabled=function(t){if("*"===t[t.length-1])return!0;var e,r;for(e=0,r=n.skips.length;e<r;e++)if(n.skips[e].test(t))return!1;for(e=0,r=n.names.length;e<r;e++)if(n.names[e].test(t))return!0;return!1},n.humanize=r(166),Object.keys(t).forEach((function(e){n[e]=t[e]})),n.instances=[],n.names=[],n.skips=[],n.formatters={},n.selectColor=e,n.enable(n.load()),n}},function(t,e,r){"use strict";var n=r(6),o=r(2),i=r(35),a=r(8),u=r(5),s=r(13),c=r(124),f=r(32),l=r(0),h=r(40),p=r(63).f,d=r(34).f,v=r(10).f,g=r(119).trim,y=o.Number,m=y.prototype,b="Number"==s(h(m)),w=function(t){var e,r,n,o,i,a,u,s,c=f(t,!1);if("string"==typeof c&&c.length>2)if(43===(e=(c=g(c)).charCodeAt(0))||45===e){if(88===(r=c.charCodeAt(2))||120===r)return NaN}else if(48===e){switch(c.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(a=(i=c.slice(2)).length,u=0;u<a;u++)if((s=i.charCodeAt(u))<48||s>o)return NaN;return parseInt(i,n)}return+c};if(i("Number",!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var x,E=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof E&&(b?l((function(){m.valueOf.call(r)})):"Number"!=s(r))?c(new y(w(e)),r,E):w(e)},S=n?p(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),k=0;S.length>k;k++)u(y,x=S[k])&&!u(E,x)&&v(E,x,d(y,x));E.prototype=m,m.constructor=E,a(o,"Number",E)}},function(t,e,r){"use strict";r(18);var n=1e3,o=6e4,i=60*o,a=24*i;function u(t,e,r,n){var o=e>=1.5*r;return Math.round(t/r)+" "+n+(o?"s":"")}t.exports=function(t,e){e=e||{};var r=typeof t;if("string"===r&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*a;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*o;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(t);if("number"===r&&!1===isNaN(t))return e.long?function(t){var e=Math.abs(t);if(e>=a)return u(t,e,a,"day");if(e>=i)return u(t,e,i,"hour");if(e>=o)return u(t,e,o,"minute");if(e>=n)return u(t,e,n,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=a)return Math.round(t/a)+"d";if(e>=i)return Math.round(t/i)+"h";if(e>=o)return Math.round(t/o)+"m";if(e>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){"use strict";var n=r(3),o=r(168),i=r(11),a=r(9),u=r(21),s=r(38);n({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=i(this),r=a(e.length),n=s(e,0);return n.length=o(n,e,e,r,0,void 0===t?1:u(t)),n}})},function(t,e,r){"use strict";var n=r(68),o=r(9),i=r(22),a=function(t,e,r,u,s,c,f,l){for(var h,p=s,d=0,v=!!f&&i(f,l,3);d<u;){if(d in r){if(h=v?v(r[d],d,e):r[d],c>0&&n(h))p=a(t,e,h,o(h.length),p,c-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[p]=h}p++}d++}return p};t.exports=a},function(t,e,r){r(70)("flat")},function(t,e,r){"use strict";var n=r(3),o=r(20),i=r(93),a=r(0),u=r(16),s=r(66),c=r(102),f=r(8);n({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=s(this,u("Promise")),r="function"==typeof t;return this.then(r?function(r){return c(e,t()).then((function(){return r}))}:t,r?function(r){return c(e,t()).then((function(){throw r}))}:t)}}),o||"function"!=typeof i||i.prototype.finally||f(i.prototype,"finally",u("Promise").prototype.finally)},function(t,e,r){"use strict";var n=r(49),o=r(4),i=r(14),a=r(172),u=r(50);n("search",1,(function(t,e,r){return[function(e){var r=i(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,t,this);if(n.done)return n.value;var i=o(t),s=String(this),c=i.lastIndex;a(c,0)||(i.lastIndex=0);var f=u(i,s);return a(i.lastIndex,c)||(i.lastIndex=c),null===f?-1:f.index}]}))},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,r){"use strict";var n=r(3),o=r(174);n({target:"String",proto:!0,forced:r(175)("link")},{link:function(t){return o(this,"a","href",t)}})},function(t,e,r){var n=r(14),o=/"/g;t.exports=function(t,e,r,i){var a=String(n(t)),u="<"+e;return""!==r&&(u+=" "+r+'="'+String(i).replace(o,"&quot;")+'"'),u+">"+a+"</"+e+">"}},function(t,e,r){var n=r(0);t.exports=function(t){return n((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={expired:"Session expired! Please re-launch the app",noScopeForId:"Trying to get the ID of the selected %s. Please add 'launch' or 'launch/%s' to the requested scopes and try again.",noIfNoAuth:"You are trying to get %s but the app is not authorized yet.",noFreeContext:"Please don't use open fhir servers if you need to access launch context items like the %S."}},function(t,e,r){"use strict";var n=r(23),o=n(r(52));r(53);var i=n(r(54));Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(){}var e=t.prototype;return e.get=function(){var t=(0,i.default)(o.default.mark((function t(e){var r;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=sessionStorage[e])){t.next=3;break}return t.abrupt("return",JSON.parse(r));case 3:return t.abrupt("return",null);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.set=function(){var t=(0,i.default)(o.default.mark((function t(e,r){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return sessionStorage[e]=JSON.stringify(r),t.abrupt("return",r);case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),e.unset=function(){var t=(0,i.default)(o.default.mark((function t(e){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e in sessionStorage)){t.next=3;break}return delete sessionStorage[e],t.abrupt("return",!0);case 3:return t.abrupt("return",!1);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),t}();e.default=a},function(t,e,r){(function(n){var o,i;void 0===(i="function"==typeof(o=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?a(t):e}function s(t){var e=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}}();return function(){var r,n=o(t);if(e){var i=o(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u(this,r)}}function c(t,e,r){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=o(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}})(t,e,r||t)}var f=function(){function e(){t(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return r(e,[{key:"addEventListener",value:function(t,e){t in this.listeners||(this.listeners[t]=[]),this.listeners[t].push(e)}},{key:"removeEventListener",value:function(t,e){if(t in this.listeners)for(var r=this.listeners[t],n=0,o=r.length;n<o;n++)if(r[n]===e)return void r.splice(n,1)}},{key:"dispatchEvent",value:function(t){var e=this;if(t.type in this.listeners){for(var r=function(r){setTimeout((function(){return r.call(e,t)}))},n=this.listeners[t.type],o=0,i=n.length;o<i;o++)r(n[o]);return!t.defaultPrevented}}}]),e}(),l=function(e){!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&&i(t,e)}(u,e);var n=s(u);function u(){var e;return t(this,u),(e=n.call(this)).listeners||f.call(a(e)),Object.defineProperty(a(e),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(a(e),"onabort",{value:null,writable:!0,configurable:!0}),e}return r(u,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(t){"abort"===t.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,t)),c(o(u.prototype),"dispatchEvent",this).call(this,t)}}]),u}(f),h=function(){function e(){t(this,e),Object.defineProperty(this,"signal",{value:new l,writable:!0,configurable:!0})}return r(e,[{key:"abort",value:function(){var t;try{t=new Event("abort")}catch(e){"undefined"!=typeof document?document.createEvent?(t=document.createEvent("Event")).initEvent("abort",!1,!1):(t=document.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(t)}},{key:"toString",value:function(){return"[object AbortController]"}}]),e}();"undefined"!=typeof Symbol&&Symbol.toStringTag&&(h.prototype[Symbol.toStringTag]="AbortController",l.prototype[Symbol.toStringTag]="AbortSignal"),function(t){(function(t){return t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof t.Request&&!t.Request.prototype.hasOwnProperty("signal")||!t.AbortController})(t)&&(t.AbortController=h,t.AbortSignal=l)}("undefined"!=typeof self?self:n)})?o.call(e,r,e,t):o)||(t.exports=i)}).call(this,r(56))}]);
  //# sourceMappingURL=fhir-client.min.js.map