@careevolution/mydatahelps-ui 2.24.3-MdhAssistantComponent.41 → 2.24.3-MdhAssistantComponent.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -170,5 +170,4 @@ object-assign
170
170
  /*!
171
171
  * mustache.js - Logic-less {{mustache}} templates with JavaScript
172
172
  * http://github.com/janl/mustache.js
173
- */var wie=Object.prototype.toString,xie=Array.isArray||function(e){return"[object Array]"===wie.call(e)};function kie(e){return"function"==typeof e}function Sie(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Aie(e,t){return null!=e&&"object"==typeof e&&t in e}var Eie=RegExp.prototype.test;var _ie=/\S/;function Cie(e){return!function(e,t){return Eie.call(e,t)}(_ie,e)}var Oie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};var Tie=/\s*/,Pie=/\s+/,Die=/\s*=/,Nie=/\s*\}/,Iie=/#|\^|\/|>|\{|&|=|!/;function Mie(e){this.string=e,this.tail=e,this.pos=0}function jie(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function Rie(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Mie.prototype.eos=function(){return""===this.tail},Mie.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},Mie.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},jie.prototype.push=function(e){return new jie(e,this)},jie.prototype.lookup=function(e){var t,n,r,a=this.cache;if(a.hasOwnProperty(e))t=a[e];else{for(var i,o,s,l=this,c=!1;l;){if(e.indexOf(".")>0)for(i=l.view,o=e.split("."),s=0;null!=i&&s<o.length;)s===o.length-1&&(c=Aie(i,o[s])||(n=i,r=o[s],null!=n&&"object"!=typeof n&&n.hasOwnProperty&&n.hasOwnProperty(r))),i=i[o[s++]];else i=l.view[e],c=Aie(l.view,e);if(c){t=i;break}l=l.parent}a[e]=t}return kie(t)&&(t=t.call(this.view)),t},Rie.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},Rie.prototype.parse=function(e,t){var n=this.templateCache,r=e+":"+(t||zie.tags).join(":"),a=void 0!==n,i=a?n.get(r):void 0;return null==i&&(i=function(e,t){if(!e)return[];var n,r,a,i=!1,o=[],s=[],l=[],c=!1,u=!1,d="",h=0;function m(){if(c&&!u)for(;l.length;)delete s[l.pop()];else l=[];c=!1,u=!1}function p(e){if("string"==typeof e&&(e=e.split(Pie,2)),!xie(e)||2!==e.length)throw new Error("Invalid tags: "+e);n=new RegExp(Sie(e[0])+"\\s*"),r=new RegExp("\\s*"+Sie(e[1])),a=new RegExp("\\s*"+Sie("}"+e[1]))}p(t||zie.tags);for(var f,g,v,y,b,w,x=new Mie(e);!x.eos();){if(f=x.pos,v=x.scanUntil(n))for(var k=0,S=v.length;k<S;++k)Cie(y=v.charAt(k))?(l.push(s.length),d+=y):(u=!0,i=!0,d+=" "),s.push(["text",y,f,f+1]),f+=1,"\n"===y&&(m(),d="",h=0,i=!1);if(!x.scan(n))break;if(c=!0,g=x.scan(Iie)||"name",x.scan(Tie),"="===g?(v=x.scanUntil(Die),x.scan(Die),x.scanUntil(r)):"{"===g?(v=x.scanUntil(a),x.scan(Nie),x.scanUntil(r),g="&"):v=x.scanUntil(r),!x.scan(r))throw new Error("Unclosed tag at "+x.pos);if(b=">"==g?[g,v,f,x.pos,d,h,i]:[g,v,f,x.pos],h++,s.push(b),"#"===g||"^"===g)o.push(b);else if("/"===g){if(!(w=o.pop()))throw new Error('Unopened section "'+v+'" at '+f);if(w[1]!==v)throw new Error('Unclosed section "'+w[1]+'" at '+f)}else"name"===g||"{"===g||"&"===g?u=!0:"="===g&&p(v)}if(m(),w=o.pop())throw new Error('Unclosed section "'+w[1]+'" at '+x.pos);return function(e){for(var t,n=[],r=n,a=[],i=0,o=e.length;i<o;++i)switch((t=e[i])[0]){case"#":case"^":r.push(t),a.push(t),r=t[4]=[];break;case"/":a.pop()[5]=t[2],r=a.length>0?a[a.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],a=0,i=e.length;a<i;++a)(t=e[a])&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(r.push(t),n=t));return r}(s))}(e,t),a&&n.set(r,i)),i},Rie.prototype.render=function(e,t,n,r){var a=this.getConfigTags(r),i=this.parse(e,a),o=t instanceof jie?t:new jie(t,void 0);return this.renderTokens(i,o,n,e,r)},Rie.prototype.renderTokens=function(e,t,n,r,a){for(var i,o,s,l="",c=0,u=e.length;c<u;++c)s=void 0,"#"===(o=(i=e[c])[0])?s=this.renderSection(i,t,n,r,a):"^"===o?s=this.renderInverted(i,t,n,r,a):">"===o?s=this.renderPartial(i,t,n,a):"&"===o?s=this.unescapedValue(i,t):"name"===o?s=this.escapedValue(i,t,a):"text"===o&&(s=this.rawValue(i)),void 0!==s&&(l+=s);return l},Rie.prototype.renderSection=function(e,t,n,r,a){var i=this,o="",s=t.lookup(e[1]);if(s){if(xie(s))for(var l=0,c=s.length;l<c;++l)o+=this.renderTokens(e[4],t.push(s[l]),n,r,a);else if("object"==typeof s||"string"==typeof s||"number"==typeof s)o+=this.renderTokens(e[4],t.push(s),n,r,a);else if(kie(s)){if("string"!=typeof r)throw new Error("Cannot use higher-order sections without the original template");null!=(s=s.call(t.view,r.slice(e[3],e[5]),(function(e){return i.render(e,t,n,a)})))&&(o+=s)}else o+=this.renderTokens(e[4],t,n,r,a);return o}},Rie.prototype.renderInverted=function(e,t,n,r,a){var i=t.lookup(e[1]);if(!i||xie(i)&&0===i.length)return this.renderTokens(e[4],t,n,r,a)},Rie.prototype.indentPartial=function(e,t,n){for(var r=t.replace(/[^ \t]/g,""),a=e.split("\n"),i=0;i<a.length;i++)a[i].length&&(i>0||!n)&&(a[i]=r+a[i]);return a.join("\n")},Rie.prototype.renderPartial=function(e,t,n,r){if(n){var a=this.getConfigTags(r),i=kie(n)?n(e[1]):n[e[1]];if(null!=i){var o=e[6],s=e[5],l=e[4],c=i;0==s&&l&&(c=this.indentPartial(i,l,o));var u=this.parse(c,a);return this.renderTokens(u,t,n,c,r)}}},Rie.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},Rie.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||zie.escape,a=t.lookup(e[1]);if(null!=a)return"number"==typeof a&&r===zie.escape?String(a):r(a)},Rie.prototype.rawValue=function(e){return e[1]},Rie.prototype.getConfigTags=function(e){return xie(e)?e:e&&"object"==typeof e?e.tags:void 0},Rie.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!xie(e)?e.escape:void 0};var zie={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){Lie.templateCache=e},get templateCache(){return Lie.templateCache}},Lie=new Rie;function Fie(){zie.escape=e=>e}zie.clearCache=function(){return Lie.clearCache()},zie.parse=function(e,t){return Lie.parse(e,t)},zie.render=function(e,t,n,r){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+function(e){return xie(e)?"array":typeof e}(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Lie.render(e,t,n,r)},zie.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return Oie[e]}))},zie.Scanner=Mie,zie.Context=jie,zie.Writer=Rie;const Bie=e=>{const t=e.split(""),n=[],r=(e,n)=>{for(let r=n;r<t.length;r+=1)if(e.includes(t[r]))return r;return-1};let a=0;for(;a<t.length;)if("{"===t[a]&&a+1<t.length&&"{"===t[a+1])n.push({type:"literal",text:"{"}),a+=2;else if("}"===t[a]&&a+1<t.length&&"}"===t[a+1])n.push({type:"literal",text:"}"}),a+=2;else if("{"===t[a]){const e=r("}",a);if(e<0)throw new Error("Unclosed '{' in template.");n.push({type:"variable",name:t.slice(a+1,e).join("")}),a=e+1}else{if("}"===t[a])throw new Error("Single '}' in template.");{const e=r("{}",a),i=(e<0?t.slice(a):t.slice(a,e)).join("");n.push({type:"literal",text:i}),a=e<0?t.length:e}}return n},qie=e=>{Fie();return(e=>e.map((e=>"name"===e[0]?{type:"variable",name:e[1].includes(".")?e[1].split(".")[0]:e[1]}:["#","&","^",">"].includes(e[0])?{type:"variable",name:e[1]}:{type:"literal",text:e[1]})))(zie.parse(e))},Hie=(e,t)=>Bie(e).reduce(((e,n)=>{if("variable"===n.type){if(n.name in t)return e+t[n.name];throw new Error(`(f-string) Missing value for input ${n.name}`)}return e+n.text}),""),Uie=(e,t)=>(Fie(),zie.render(e,t)),Vie={"f-string":Hie,mustache:Uie},Wie={"f-string":Bie,mustache:qie},Gie=(e,t,n)=>Vie[t](e,n),$ie=(e,t)=>Wie[t](e),Zie=(e,t,n)=>{if(!(t in Vie)){const e=Object.keys(Vie);throw new Error(`Invalid template format. Got \`${t}\`;\n should be one of ${e}`)}try{const r=n.reduce(((e,t)=>(e[t]="foo",e)),{});Array.isArray(e)?e.forEach((e=>{if("text"===e.type)Gie(e.text,t,r);else{if("image_url"!==e.type)throw new Error(`Invalid message template received. ${JSON.stringify(e,null,2)}`);if("string"==typeof e.image_url)Gie(e.image_url,t,r);else{const n=e.image_url.url;Gie(n,t,r)}}})):Gie(e,t,r)}catch(e){throw new Error(`Invalid prompt schema: ${e.message}`)}};class Yie extends bie{static lc_name(){return"PromptTemplate"}constructor(e){if(super(e),Object.defineProperty(this,"template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:"f-string"}),Object.defineProperty(this,"validateTemplate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),"mustache"===e.templateFormat&&void 0===e.validateTemplate&&(this.validateTemplate=!1),Object.assign(this,e),this.validateTemplate){if("mustache"===this.templateFormat)throw new Error("Mustache templates cannot be validated.");let e=this.inputVariables;this.partialVariables&&(e=e.concat(Object.keys(this.partialVariables))),Zie(this.template,this.templateFormat,e)}}_getPromptType(){return"prompt"}async format(e){const t=await this.mergePartialAndUserVariables(e);return Gie(this.template,this.templateFormat,t)}static fromExamples(e,t,n,r="\n\n",a=""){const i=[a,...e,t].join(r);return new Yie({inputVariables:n,template:i})}static fromTemplate(e,t){const{templateFormat:n="f-string",...r}=t??{},a=new Set;return $ie(e,n).forEach((e=>{"variable"===e.type&&a.add(e.name)})),new Yie({inputVariables:[...a],templateFormat:n,template:e,...r})}async partial(e){const t=this.inputVariables.filter((t=>!(t in e))),n={...this.partialVariables??{},...e},r={...this,inputVariables:t,partialVariables:n};return new Yie(r)}serialize(){if(void 0!==this.outputParser)throw new Error("Cannot serialize a prompt template with an output parser");return{_type:this._getPromptType(),input_variables:this.inputVariables,template:this.template,template_format:this.templateFormat}}static async deserialize(e){if(!e.template)throw new Error("Prompt template must have a template");return new Yie({inputVariables:e.input_variables,template:e.template,templateFormat:e.template_format})}}var Kie=Object.freeze({__proto__:null,PromptTemplate:Yie});class Xie extends yie{static lc_name(){return"ImagePromptTemplate"}constructor(e){if(super(e),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","prompts","image"]}),Object.defineProperty(this,"template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:"f-string"}),Object.defineProperty(this,"validateTemplate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),this.template=e.template,this.templateFormat=e.templateFormat??this.templateFormat,this.validateTemplate=e.validateTemplate??this.validateTemplate,this.validateTemplate){let e=this.inputVariables;this.partialVariables&&(e=e.concat(Object.keys(this.partialVariables))),Zie([{type:"image_url",image_url:this.template}],this.templateFormat,e)}}_getPromptType(){return"prompt"}async partial(e){const t=this.inputVariables.filter((t=>!(t in e))),n={...this.partialVariables??{},...e},r={...this,inputVariables:t,partialVariables:n};return new Xie(r)}async format(e){const t={};for(const[n,r]of Object.entries(this.template))t[n]="string"==typeof r?Gie(r,this.templateFormat,e):r;const n=e.url||t.url,r=e.detail||t.detail;if(!n)throw new Error("Must provide either an image URL.");if("string"!=typeof n)throw new Error("url must be a string.");const a={url:n};return r&&(a.detail=r),a}async formatPromptValue(e){const t=await this.format(e);return new Lne(t)}}class Qie extends s9{constructor(){super(...arguments),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","prompts","chat"]}),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0})}async invoke(e,t){return this._callWithConfig((e=>this.formatMessages(e)),e,{...t,runType:"prompt"})}}class Jie extends Qie{static lc_name(){return"MessagesPlaceholder"}constructor(e){"string"==typeof e&&(e={variableName:e}),super(e),Object.defineProperty(this,"variableName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"optional",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.variableName=e.variableName,this.optional=e.optional??!1}get inputVariables(){return[this.variableName]}async formatMessages(e){const t=e[this.variableName];if(this.optional&&!t)return[];if(!t){const e=new Error(`Field "${this.variableName}" in prompt uses a MessagesPlaceholder, which expects an array of BaseMessages as an input value. Received: undefined`);throw e.name="InputFormatError",e}let n;try{n=Array.isArray(t)?t.map(J1):[J1(t)]}catch(e){const n="string"==typeof t?t:JSON.stringify(t,null,2),r=new Error([`Field "${this.variableName}" in prompt uses a MessagesPlaceholder, which expects an array of BaseMessages or coerceable values as input.`,`Received value: ${n}`,`Additional message: ${e.message}`].join("\n\n"));throw r.name="InputFormatError",r}return n}}class eoe extends Qie{constructor(e){"prompt"in e||(e={prompt:e}),super(e),Object.defineProperty(this,"prompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.prompt=e.prompt}get inputVariables(){return this.prompt.inputVariables}async formatMessages(e){return[await this.format(e)]}}class toe extends yie{constructor(e){super(e)}async format(e){return(await this.formatPromptValue(e)).toString()}async formatPromptValue(e){const t=await this.formatMessages(e);return new zne(t)}}class noe extends eoe{static lc_name(){return"ChatMessagePromptTemplate"}constructor(e,t){"prompt"in e||(e={prompt:e,role:t}),super(e),Object.defineProperty(this,"role",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.role=e.role}async format(e){return new V1(await this.prompt.format(e),this.role)}static fromTemplate(e,t,n){return new this(Yie.fromTemplate(e,{templateFormat:n?.templateFormat}),t)}}class roe extends Qie{static _messageClass(){throw new Error("Can not invoke _messageClass from inside _StringImageMessagePromptTemplate")}constructor(e,t){if("prompt"in e||(e={prompt:e}),super(e),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","prompts","chat"]}),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"inputVariables",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"additionalOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"prompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"messageClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"chatMessageClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.prompt=e.prompt,Array.isArray(this.prompt)){let e=[];this.prompt.forEach((t=>{"inputVariables"in t&&(e=e.concat(t.inputVariables))})),this.inputVariables=e}else this.inputVariables=this.prompt.inputVariables;this.additionalOptions=t??this.additionalOptions}createMessage(e){const t=this.constructor;if(t._messageClass()){return new(t._messageClass())({content:e})}if(t.chatMessageClass){const n=t.chatMessageClass();return new n({content:e,role:this.getRoleFromMessageClass(n.lc_name())})}throw new Error("No message class defined")}getRoleFromMessageClass(e){switch(e){case"HumanMessage":return"human";case"AIMessage":return"ai";case"SystemMessage":return"system";case"ChatMessage":return"chat";default:throw new Error("Invalid message class name")}}static fromTemplate(e,t){if("string"==typeof e)return new this(Yie.fromTemplate(e,t));const n=[];for(const r of e)if("string"==typeof r||"object"==typeof r&&"text"in r){let e="";"string"==typeof r?e=r:"string"==typeof r.text&&(e=r.text??""),n.push(Yie.fromTemplate(e,t))}else if("object"==typeof r&&"image_url"in r){let e,a=r.image_url??"",i=[];if("string"==typeof a){let n;n="mustache"===t?.templateFormat?qie(a):Bie(a);const r=n.flatMap((e=>"variable"===e.type?[e.name]:[]));if((r?.length??0)>0){if(r.length>1)throw new Error(`Only one format variable allowed per image template.\nGot: ${r}\nFrom: ${a}`);i=[r[0]]}else i=[];a={url:a},e=new Xie({template:a,inputVariables:i,templateFormat:t?.templateFormat})}else{if("object"!=typeof a)throw new Error("Invalid image template");if("url"in a){let e;e="mustache"===t?.templateFormat?qie(a.url):Bie(a.url),i=e.flatMap((e=>"variable"===e.type?[e.name]:[]))}else i=[];e=new Xie({template:a,inputVariables:i,templateFormat:t?.templateFormat})}n.push(e)}return new this({prompt:n,additionalOptions:t})}async format(e){if(this.prompt instanceof bie){const t=await this.prompt.format(e);return this.createMessage(t)}{const t=[];for(const n of this.prompt){let r={};if(!("inputVariables"in n))throw new Error(`Prompt ${n} does not have inputVariables defined.`);for(const t of n.inputVariables)r||(r={[t]:e[t]}),r={...r,[t]:e[t]};if(n instanceof bie){const e=await n.format(r);t.push({type:"text",text:e})}else if(n instanceof Xie){const e=await n.format(r);t.push({type:"image_url",image_url:e})}}return this.createMessage(t)}}async formatMessages(e){return[await this.format(e)]}}class aoe extends roe{static _messageClass(){return Z1}static lc_name(){return"HumanMessagePromptTemplate"}}class ioe extends roe{static _messageClass(){return q1}static lc_name(){return"AIMessagePromptTemplate"}}class ooe extends roe{static _messageClass(){return K1}static lc_name(){return"SystemMessagePromptTemplate"}}function soe(e,t){if("function"==typeof e.formatMessages||z1(e))return e;if(Array.isArray(e)&&"placeholder"===e[0]){const t=e[1];if("string"!=typeof t||"{"!==t[0]||"}"!==t[t.length-1])throw new Error(`Invalid placeholder template: "${e[1]}". Expected a variable name surrounded by curly braces.`);const n=t.slice(1,-1);return new Jie({variableName:n,optional:!0})}const n=J1(e);let r;if(r="string"==typeof n.content?n.content:n.content.map((e=>"text"in e?{text:e.text}:"image_url"in e?{image_url:e.image_url}:e)),"human"===n._getType())return aoe.fromTemplate(r,t);if("ai"===n._getType())return ioe.fromTemplate(r,t);if("system"===n._getType())return ooe.fromTemplate(r,t);if(V1.isInstance(n))return noe.fromTemplate(n.content,n.role,t);throw new Error(`Could not coerce message prompt template from input. Received message type: "${n._getType()}".`)}function loe(e){return"MessagesPlaceholder"===e.constructor.lc_name()}class coe extends toe{static lc_name(){return"ChatPromptTemplate"}get lc_aliases(){return{promptMessages:"messages"}}constructor(e){if(super(e),Object.defineProperty(this,"promptMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"validateTemplate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:"f-string"}),"mustache"===e.templateFormat&&void 0===e.validateTemplate&&(this.validateTemplate=!1),Object.assign(this,e),this.validateTemplate){const e=new Set;for(const t of this.promptMessages)if(!(t instanceof N1))for(const n of t.inputVariables)e.add(n);const t=this.inputVariables,n=new Set(this.partialVariables?t.concat(Object.keys(this.partialVariables)):t),r=new Set([...n].filter((t=>!e.has(t))));if(r.size>0)throw new Error(`Input variables \`${[...r]}\` are not used in any of the prompt messages.`);const a=new Set([...e].filter((e=>!n.has(e))));if(a.size>0)throw new Error(`Input variables \`${[...a]}\` are used in prompt messages but not in the prompt template.`)}}_getPromptType(){return"chat"}async _parseImagePrompts(e,t){if("string"==typeof e.content)return e;const n=await Promise.all(e.content.map((async e=>{if("image_url"!==e.type)return e;let n="";n="string"==typeof e.image_url?e.image_url:e.image_url.url;const r=Yie.fromTemplate(n,{templateFormat:this.templateFormat}),a=await r.format(t);return"string"!=typeof e.image_url&&"url"in e.image_url?e.image_url.url=a:e.image_url=a,e})));return e.content=n,e}async formatMessages(e){const t=await this.mergePartialAndUserVariables(e);let n=[];for(const e of this.promptMessages)if(e instanceof N1)n.push(await this._parseImagePrompts(e,t));else{const r=e.inputVariables.reduce(((n,r)=>{if(!(r in t||loe(e)&&e.optional))throw new Error(`Missing value for input variable \`${r.toString()}\``);return n[r]=t[r],n}),{}),a=await e.formatMessages(r);n=n.concat(a)}return n}async partial(e){const t=this.inputVariables.filter((t=>!(t in e))),n={...this.partialVariables??{},...e},r={...this,inputVariables:t,partialVariables:n};return new coe(r)}static fromTemplate(e,t){const n=Yie.fromTemplate(e,t),r=new aoe({prompt:n});return this.fromMessages([r])}static fromMessages(e,t){const n=e.reduce(((e,n)=>e.concat(n instanceof coe?n.promptMessages:[soe(n,t)])),[]),r=e.reduce(((e,t)=>t instanceof coe?Object.assign(e,t.partialVariables):e),Object.create(null)),a=new Set;for(const e of n)if(!(e instanceof N1))for(const t of e.inputVariables)t in r||a.add(t);return new this({...t,inputVariables:[...a],promptMessages:n,partialVariables:r,templateFormat:t?.templateFormat})}static fromPromptMessages(e){return this.fromMessages(e)}}class uoe extends bie{constructor(e){if(super(e),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"examples",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"exampleSelector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"examplePrompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"suffix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"exampleSeparator",{enumerable:!0,configurable:!0,writable:!0,value:"\n\n"}),Object.defineProperty(this,"prefix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:"f-string"}),Object.defineProperty(this,"validateTemplate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.assign(this,e),void 0!==this.examples&&void 0!==this.exampleSelector)throw new Error("Only one of 'examples' and 'example_selector' should be provided");if(void 0===this.examples&&void 0===this.exampleSelector)throw new Error("One of 'examples' and 'example_selector' should be provided");if(this.validateTemplate){let e=this.inputVariables;this.partialVariables&&(e=e.concat(Object.keys(this.partialVariables))),Zie(this.prefix+this.suffix,this.templateFormat,e)}}_getPromptType(){return"few_shot"}static lc_name(){return"FewShotPromptTemplate"}async getExamples(e){if(void 0!==this.examples)return this.examples;if(void 0!==this.exampleSelector)return this.exampleSelector.selectExamples(e);throw new Error("One of 'examples' and 'example_selector' should be provided")}async partial(e){const t=this.inputVariables.filter((t=>!(t in e))),n={...this.partialVariables??{},...e},r={...this,inputVariables:t,partialVariables:n};return new uoe(r)}async format(e){const t=await this.mergePartialAndUserVariables(e),n=await this.getExamples(t),r=await Promise.all(n.map((e=>this.examplePrompt.format(e)))),a=[this.prefix,...r,this.suffix].join(this.exampleSeparator);return Gie(a,this.templateFormat,t)}serialize(){if(this.exampleSelector||!this.examples)throw new Error("Serializing an example selector is not currently supported");if(void 0!==this.outputParser)throw new Error("Serializing an output parser is not currently supported");return{_type:this._getPromptType(),input_variables:this.inputVariables,example_prompt:this.examplePrompt.serialize(),example_separator:this.exampleSeparator,suffix:this.suffix,prefix:this.prefix,template_format:this.templateFormat,examples:this.examples}}static async deserialize(e){const{example_prompt:t}=e;if(!t)throw new Error("Missing example prompt");const n=await Yie.deserialize(t);let r;if(!Array.isArray(e.examples))throw new Error("Invalid examples format. Only list or string are supported.");return r=e.examples,new uoe({inputVariables:e.input_variables,examplePrompt:n,examples:r,exampleSeparator:e.example_separator,prefix:e.prefix,suffix:e.suffix,templateFormat:e.template_format})}}class doe extends toe{_getPromptType(){return"few_shot_chat"}static lc_name(){return"FewShotChatMessagePromptTemplate"}constructor(e){if(super(e),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"examples",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"exampleSelector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"examplePrompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"suffix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"exampleSeparator",{enumerable:!0,configurable:!0,writable:!0,value:"\n\n"}),Object.defineProperty(this,"prefix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:"f-string"}),Object.defineProperty(this,"validateTemplate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),this.examples=e.examples,this.examplePrompt=e.examplePrompt,this.exampleSeparator=e.exampleSeparator??"\n\n",this.exampleSelector=e.exampleSelector,this.prefix=e.prefix??"",this.suffix=e.suffix??"",this.templateFormat=e.templateFormat??"f-string",this.validateTemplate=e.validateTemplate??!0,void 0!==this.examples&&void 0!==this.exampleSelector)throw new Error("Only one of 'examples' and 'example_selector' should be provided");if(void 0===this.examples&&void 0===this.exampleSelector)throw new Error("One of 'examples' and 'example_selector' should be provided");if(this.validateTemplate){let e=this.inputVariables;this.partialVariables&&(e=e.concat(Object.keys(this.partialVariables))),Zie(this.prefix+this.suffix,this.templateFormat,e)}}async getExamples(e){if(void 0!==this.examples)return this.examples;if(void 0!==this.exampleSelector)return this.exampleSelector.selectExamples(e);throw new Error("One of 'examples' and 'example_selector' should be provided")}async formatMessages(e){const t=await this.mergePartialAndUserVariables(e);let n=await this.getExamples(t);n=n.map((e=>{const t={};return this.examplePrompt.inputVariables.forEach((n=>{t[n]=e[n]})),t}));const r=[];for(const e of n){const t=await this.examplePrompt.formatMessages(e);r.push(...t)}return r}async format(e){const t=await this.mergePartialAndUserVariables(e),n=await this.getExamples(t),r=(await Promise.all(n.map((e=>this.examplePrompt.formatMessages(e))))).flat().map((e=>e.content)),a=[this.prefix,...r,this.suffix].join(this.exampleSeparator);return Gie(a,this.templateFormat,t)}async partial(e){const t=this.inputVariables.filter((t=>!(t in e))),n={...this.partialVariables??{},...e},r={...this,inputVariables:t,partialVariables:n};return new doe(r)}}var hoe=Object.freeze({__proto__:null,FewShotPromptTemplate:uoe,FewShotChatMessagePromptTemplate:doe});class moe extends yie{static lc_name(){return"PipelinePromptTemplate"}constructor(e){super({...e,inputVariables:[]}),Object.defineProperty(this,"pipelinePrompts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"finalPrompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.pipelinePrompts=e.pipelinePrompts,this.finalPrompt=e.finalPrompt,this.inputVariables=this.computeInputValues()}computeInputValues(){const e=this.pipelinePrompts.map((e=>e.name)),t=this.pipelinePrompts.map((t=>t.prompt.inputVariables.filter((t=>!e.includes(t))))).flat();return[...new Set(t)]}static extractRequiredInputValues(e,t){return t.reduce(((t,n)=>(t[n]=e[n],t)),{})}async formatPipelinePrompts(e){const t=await this.mergePartialAndUserVariables(e);for(const{name:e,prompt:n}of this.pipelinePrompts){const r=moe.extractRequiredInputValues(t,n.inputVariables);t[e]=n instanceof coe?await n.formatMessages(r):await n.format(r)}return moe.extractRequiredInputValues(t,this.finalPrompt.inputVariables)}async formatPromptValue(e){return this.finalPrompt.formatPromptValue(await this.formatPipelinePrompts(e))}async format(e){return this.finalPrompt.format(await this.formatPipelinePrompts(e))}async partial(e){const t={...this};return t.inputVariables=this.inputVariables.filter((t=>!(t in e))),t.partialVariables={...this.partialVariables??{},...e},new moe(t)}serialize(){throw new Error("Not implemented.")}_getPromptType(){return"pipeline"}}function poe(e){return"object"==typeof e&&null!=e&&"withStructuredOutput"in e&&"function"==typeof e.withStructuredOutput}class foe extends coe{get lc_aliases(){return{...super.lc_aliases,schema:"schema_"}}constructor(e){super(e),Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","prompts","structured"]}),this.schema=e.schema}pipe(e){if(poe(e))return super.pipe(e.withStructuredOutput(this.schema));if(function(e){return"object"==typeof e&&null!=e&&"lc_id"in e&&Array.isArray(e.lc_id)&&"langchain_core/runnables/RunnableBinding"===e.lc_id.join("/")}(e)&&poe(e.bound))return super.pipe(e.bound.withStructuredOutput(this.schema).bind(e.kwargs??{}).withConfig(e.config));throw new Error('Structured prompts need to be piped to a language model that supports the "withStructuredOutput()" method.')}static fromMessagesAndSchema(e,t){return foe.fromMessages(e,{schema:t})}}var goe=Object.freeze({__proto__:null,BasePromptTemplate:yie,BaseMessagePromptTemplate:Qie,MessagesPlaceholder:Jie,BaseMessageStringPromptTemplate:eoe,BaseChatPromptTemplate:toe,ChatMessagePromptTemplate:noe,HumanMessagePromptTemplate:aoe,AIMessagePromptTemplate:ioe,SystemMessagePromptTemplate:ooe,ChatPromptTemplate:coe,FewShotPromptTemplate:uoe,FewShotChatMessagePromptTemplate:doe,PipelinePromptTemplate:moe,PromptTemplate:Yie,BaseStringPromptTemplate:bie,parseFString:Bie,parseMustache:qie,interpolateFString:Hie,interpolateMustache:Uie,DEFAULT_FORMATTER_MAPPING:Vie,DEFAULT_PARSER_MAPPING:Wie,renderTemplate:Gie,parseTemplate:$ie,checkValidTemplate:Zie,ImagePromptTemplate:Xie,StructuredPrompt:foe});class voe extends s9{constructor(e){super(e),Object.defineProperty(this,"callbacks",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tags",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metadata",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"verbose",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.callbacks=e?.callbacks,this.tags=e?.tags??[],this.metadata=e?.metadata??{},this.verbose=e?.verbose??!1}_getRelevantDocuments(e,t){throw new Error("Not implemented!")}async invoke(e,t){return this.getRelevantDocuments(e,g8(t))}async getRelevantDocuments(e,t){const n=g8(N5(t)),r=await F5.configure(n.callbacks,this.callbacks,n.tags,this.tags,n.metadata,this.metadata,{verbose:this.verbose}),a=await(r?.handleRetrieverStart(this.toJSON(),e,n.runId,void 0,void 0,void 0,n.runName));try{const t=await this._getRelevantDocuments(e,a);return await(a?.handleRetrieverEnd(t)),t}catch(e){throw await(a?.handleRetrieverError(e)),e}}}var yoe=Object.freeze({__proto__:null,BaseRetriever:voe});class boe extends C1{}var woe=Object.freeze({__proto__:null,BaseStore:boe,InMemoryStore:class extends boe{constructor(){super(...arguments),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain","storage"]}),Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:{}})}async mget(e){return e.map((e=>this.store[e]))}async mset(e){for(const[t,n]of e)this.store[t]=n}async mdelete(e){for(const t of e)delete this.store[t]}async*yieldKeys(e){const t=Object.keys(this.store);for(const n of t)(void 0===e||n.startsWith(e))&&(yield n)}}});class xoe extends k6{constructor(){super(),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"langchain_tracer"}),Object.defineProperty(this,"endpoint",{enumerable:!0,configurable:!0,writable:!0,value:f6("LANGCHAIN_ENDPOINT")||"http://localhost:1984"}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:{"Content-Type":"application/json"}}),Object.defineProperty(this,"session",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const e=f6("LANGCHAIN_API_KEY");e&&(this.headers["x-api-key"]=e)}async newSession(e){const t={start_time:Date.now(),name:e},n=await this.persistSession(t);return this.session=n,n}async loadSession(e){const t=`${this.endpoint}/sessions?name=${e}`;return this._handleSessionResponse(t)}async loadDefaultSession(){const e=`${this.endpoint}/sessions?name=default`;return this._handleSessionResponse(e)}async convertV2RunToRun(e){const t=this.session??await this.loadDefaultSession(),n=e.serialized;let r;if("llm"===e.run_type){const a=e.inputs.prompts?e.inputs.prompts:e.inputs.messages.map((e=>e2(e)));r={uuid:e.id,start_time:e.start_time,end_time:e.end_time,execution_order:e.execution_order,child_execution_order:e.child_execution_order,serialized:n,type:e.run_type,session_id:t.id,prompts:a,response:e.outputs}}else if("chain"===e.run_type){const a=await Promise.all(e.child_runs.map((e=>this.convertV2RunToRun(e))));r={uuid:e.id,start_time:e.start_time,end_time:e.end_time,execution_order:e.execution_order,child_execution_order:e.child_execution_order,serialized:n,type:e.run_type,session_id:t.id,inputs:e.inputs,outputs:e.outputs,child_llm_runs:a.filter((e=>"llm"===e.type)),child_chain_runs:a.filter((e=>"chain"===e.type)),child_tool_runs:a.filter((e=>"tool"===e.type))}}else{if("tool"!==e.run_type)throw new Error(`Unknown run type: ${e.run_type}`);{const a=await Promise.all(e.child_runs.map((e=>this.convertV2RunToRun(e))));r={uuid:e.id,start_time:e.start_time,end_time:e.end_time,execution_order:e.execution_order,child_execution_order:e.child_execution_order,serialized:n,type:e.run_type,session_id:t.id,tool_input:e.inputs.input,output:e.outputs?.output,action:JSON.stringify(n),child_llm_runs:a.filter((e=>"llm"===e.type)),child_chain_runs:a.filter((e=>"chain"===e.type)),child_tool_runs:a.filter((e=>"tool"===e.type))}}}return r}async persistRun(e){let t,n;n=void 0!==e.run_type?await this.convertV2RunToRun(e):e,t="llm"===n.type?`${this.endpoint}/llm-runs`:"chain"===n.type?`${this.endpoint}/chain-runs`:`${this.endpoint}/tool-runs`;const r=await fetch(t,{method:"POST",headers:this.headers,body:JSON.stringify(n)});r.ok||console.error(`Failed to persist run: ${r.status} ${r.statusText}`)}async persistSession(e){const t=`${this.endpoint}/sessions`,n=await fetch(t,{method:"POST",headers:this.headers,body:JSON.stringify(e)});return n.ok?{id:(await n.json()).id,...e}:(console.error(`Failed to persist session: ${n.status} ${n.statusText}, using default session.`),{id:1,...e})}async _handleSessionResponse(e){const t=await fetch(e,{method:"GET",headers:this.headers});let n;if(!t.ok)return console.error(`Failed to load session: ${t.status} ${t.statusText}`),n={id:1,start_time:Date.now()},this.session=n,n;const r=await t.json();return 0===r.length?(n={id:1,start_time:Date.now()},this.session=n,n):([n]=r,this.session=n,n)}}var koe=Object.freeze({__proto__:null,LangChainTracerV1:xoe});var Soe=Object.freeze({__proto__:null,getTracingCallbackHandler:async function(e){const t=new xoe;return e?await t.loadSession(e):await t.loadDefaultSession(),t},getTracingV2CallbackHandler:async function(){return new C5}});var Aoe=Object.freeze({__proto__:null,RunCollectorCallbackHandler:class extends k6{constructor({exampleId:e}={}){super({_awaitHandler:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"run_collector"}),Object.defineProperty(this,"exampleId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tracedRuns",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.exampleId=e,this.tracedRuns=[]}async persistRun(e){const t={...e};t.reference_example_id=this.exampleId,this.tracedRuns.push(t)}}}),Eoe=Object.freeze({__proto__:null,deepCompareStrict:Are,Validator:class{constructor(e,t="2019-09",n=!0){Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"draft",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"shortCircuit",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"lookup",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.lookup=Pre(e)}validate(e){return rae(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),Pre(e,this.lookup)}}});function _oe(e,t){return Math.sqrt(function(e,t){let n=0;for(let r=0;r<e.length;r++)n+=(e[r]-t[r])*(e[r]-t[r]);return n}(e,t))}function Coe(e,t){let n=0;for(let r=0;r<e.length;r++)n+=e[r]*t[r];return n}function Ooe(e,t){let n=0,r=0,a=0;for(let i=0;i<e.length;i++)n+=e[i]*t[i],r+=e[i]*e[i],a+=t[i]*t[i];return n/(Math.sqrt(r)*Math.sqrt(a))}function Toe(e,t,n){if(0===e.length||0===e[0].length||0===t.length||0===t[0].length)return[[]];if(e[0].length!==t[0].length)throw new Error(`Number of columns in X and Y must be the same. X has shape ${[e.length,e[0].length]} and Y has shape ${[t.length,t[0].length]}.`);return e.map((e=>t.map((t=>n(e,t))).map((e=>Number.isNaN(e)?0:e))))}function Poe(e,t){return Toe(e,t,Ooe)}function Doe(e){if(0===e.length)return{maxIndex:-1,maxValue:NaN};let t=e[0],n=0;for(let r=1;r<e.length;r+=1)e[r]>t&&(n=r,t=e[r]);return{maxIndex:n,maxValue:t}}var Noe=Object.freeze({__proto__:null,matrixFunc:Toe,normalize:function(e,t=!1){const n=e.reduce(((e,t)=>Math.max(e,Doe(t).maxValue)),0);return e.map((e=>e.map((e=>t?1-e/n:e/n))))},cosineSimilarity:Poe,innerProduct:function(e,t){return Toe(e,t,Coe)},euclideanDistance:function(e,t){return Toe(e,t,_oe)},maximalMarginalRelevance:function(e,t,n=.5,r=4){if(Math.min(r,t.length)<=0)return[];const a=Poe(Array.isArray(e[0])?e:[e],t)[0],i=Doe(a).maxIndex,o=[t[i]],s=[i];for(;s.length<Math.min(r,t.length);){let e=-1/0,r=-1;const i=Poe(t,o);a.forEach(((t,a)=>{if(s.includes(a))return;const o=Math.max(...i[a]),l=n*t-(1-n)*o;l>e&&(e=l,r=a)})),o.push(t[r]),s.push(r)}return s}});var Ioe=Object.freeze({__proto__:null,FakeSplitIntoListParser:class extends kre{constructor(){super(...arguments),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["tests","fake"]})}getFormatInstructions(){return""}async parse(e){return e.split(",").map((e=>e.trim()))}},FakeRunnable:class extends s9{constructor(e){super(e),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["tests","fake"]}),Object.defineProperty(this,"returnOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.returnOptions=e.returnOptions}async invoke(e,t){return this.returnOptions?t??{}:{input:e}}},FakeLLM:class extends Nae{constructor(e){super(e),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thrownErrorString",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.response=e.response,this.thrownErrorString=e.thrownErrorString}_llmType(){return"fake"}async _call(e,t,n){if(this.thrownErrorString)throw new Error(this.thrownErrorString);const r=this.response??e;return await(n?.handleLLMNewToken(r)),r}},FakeStreamingLLM:class extends Nae{constructor(e){super(e),Object.defineProperty(this,"sleep",{enumerable:!0,configurable:!0,writable:!0,value:50}),Object.defineProperty(this,"responses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thrownErrorString",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.sleep=e.sleep??this.sleep,this.responses=e.responses,this.thrownErrorString=e.thrownErrorString}_llmType(){return"fake"}async _call(e){if(this.thrownErrorString)throw new Error(this.thrownErrorString);const t=this.responses?.[0];return this.responses=this.responses?.slice(1),t??e}async*_streamResponseChunks(e,t,n){if(this.thrownErrorString)throw new Error(this.thrownErrorString);const r=this.responses?.[0];this.responses=this.responses?.slice(1);for(const t of r??e)await new Promise((e=>setTimeout(e,this.sleep))),yield{text:t,generationInfo:{}},await(n?.handleLLMNewToken(t))}},FakeChatModel:class extends mre{_combineLLMOutput(){return[]}_llmType(){return"fake"}async _generate(e,t,n){if(t?.stop?.length)return{generations:[{message:new q1(t.stop[0]),text:t.stop[0]}]};const r=e.map((e=>"string"==typeof e.content?e.content:JSON.stringify(e.content,null,2))).join("\n");return await(n?.handleLLMNewToken(r)),{generations:[{message:new q1(r),text:r}],llmOutput:{}}}},FakeStreamingChatModel:class extends mre{constructor(e){super(e),Object.defineProperty(this,"sleep",{enumerable:!0,configurable:!0,writable:!0,value:50}),Object.defineProperty(this,"responses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thrownErrorString",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.sleep=e.sleep??this.sleep,this.responses=e.responses,this.thrownErrorString=e.thrownErrorString}_llmType(){return"fake"}async _generate(e,t,n){if(this.thrownErrorString)throw new Error(this.thrownErrorString);const r=this.responses?.[0].content??e[0].content;return{generations:[{text:"",message:new q1({content:r})}]}}async*_streamResponseChunks(e,t,n){if(this.thrownErrorString)throw new Error(this.thrownErrorString);const r=this.responses?.[0].content??e[0].content;if("string"!=typeof r)for(const t of this.responses??e)yield new l8({text:"",message:new U1({content:r})});else for(const t of this.responses??e)yield new l8({text:r,message:new U1({content:r})})}},FakeRetriever:class extends voe{constructor(e){super(),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["test","fake"]}),Object.defineProperty(this,"output",{enumerable:!0,configurable:!0,writable:!0,value:[new oie({pageContent:"foo"}),new oie({pageContent:"bar"})]}),this.output=e?.output??this.output}async _getRelevantDocuments(e){return this.output}},FakeListChatModel:class extends mre{static lc_name(){return"FakeListChatModel"}constructor({responses:e,sleep:t}){super({}),Object.defineProperty(this,"responses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"i",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"sleep",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.responses=e,this.sleep=t}_combineLLMOutput(){return[]}_llmType(){return"fake-list"}async _generate(e,t){if(await this._sleepIfRequested(),t?.stop?.length)return{generations:[this._formatGeneration(t.stop[0])]};{const e=this._currentResponse();return this._incrementResponse(),{generations:[this._formatGeneration(e)],llmOutput:{}}}}_formatGeneration(e){return{message:new q1(e),text:e}}async*_streamResponseChunks(e,t,n){const r=this._currentResponse();this._incrementResponse();for await(const e of r){await this._sleepIfRequested();const t=this._createResponseChunk(e);yield t,n?.handleLLMNewToken(e)}}async _sleepIfRequested(){void 0!==this.sleep&&await this._sleep()}async _sleep(){return new Promise((e=>{setTimeout((()=>e()),this.sleep)}))}_createResponseChunk(e){return new l8({message:new U1({content:e}),text:e})}_currentResponse(){return this.responses[this.i]}_incrementResponse(){this.i<this.responses.length-1?this.i+=1:this.i=0}withStructuredOutput(e,t){return p9.from((async e=>{const t=await this.invoke(e);return JSON.parse(t.content)}))}},FakeChatMessageHistory:class extends rie{constructor(){super(),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","message","fake"]}),Object.defineProperty(this,"messages",{enumerable:!0,configurable:!0,writable:!0,value:[]})}async getMessages(){return this.messages}async addMessage(e){this.messages.push(e)}async addUserMessage(e){this.messages.push(new Z1(e))}async addAIChatMessage(e){this.messages.push(new q1(e))}async clear(){this.messages=[]}},FakeListChatMessageHistory:class extends aie{constructor(){super(),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","message","fake"]}),Object.defineProperty(this,"messages",{enumerable:!0,configurable:!0,writable:!0,value:[]})}async addMessage(e){this.messages.push(e)}async getMessages(){return this.messages}},FakeTracer:class extends k6{constructor(){super(),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"fake_tracer"}),Object.defineProperty(this,"runs",{enumerable:!0,configurable:!0,writable:!0,value:[]})}persistRun(e){return this.runs.push(e),Promise.resolve()}},FakeTool:class extends zae{constructor(e){super(e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.description=e.description,this.schema=e.schema}async _call(e,t){return JSON.stringify(e)}},FakeEmbeddings:class extends jae{constructor(e){super(e??{})}embedDocuments(e){return Promise.resolve(e.map((()=>[.1,.2,.3,.4])))}embedQuery(e){return Promise.resolve([.1,.2,.3,.4])}},SyntheticEmbeddings:class extends jae{constructor(e){super(e??{}),Object.defineProperty(this,"vectorSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.vectorSize=e?.vectorSize??4}async embedDocuments(e){return Promise.all(e.map((e=>this.embedQuery(e))))}async embedQuery(e){let t=e;t=t.toLowerCase().replaceAll(/[^a-z ]/g,"");const n=t.length%this.vectorSize,r=0===n?0:this.vectorSize-n,a=t.length+r;t=t.padEnd(a," ");const i=t.length/this.vectorSize,o=[];for(let e=0;e<t.length;e+=i)o.push(t.slice(e,e+i));const s=o.map((e=>{let t=0;for(let n=0;n<e.length;n+=1)t+=" "===e?0:e.charCodeAt(n);return t%26/26}));return s}},SingleRunExtractor:class extends k6{constructor(){super(),Object.defineProperty(this,"runPromiseResolver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"runPromise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"single_run_extractor"}),this.runPromise=new Promise((e=>{this.runPromiseResolver=e}))}async persistRun(e){this.runPromiseResolver(e)}async extract(){return this.runPromise}}}),Moe=Object.freeze({__proto__:null,isZodSchema:hre});class joe extends voe{static lc_name(){return"VectorStoreRetriever"}get lc_namespace(){return["langchain_core","vectorstores"]}_vectorstoreType(){return this.vectorStore._vectorstoreType()}constructor(e){super(e),Object.defineProperty(this,"vectorStore",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"k",{enumerable:!0,configurable:!0,writable:!0,value:4}),Object.defineProperty(this,"searchType",{enumerable:!0,configurable:!0,writable:!0,value:"similarity"}),Object.defineProperty(this,"searchKwargs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"filter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.vectorStore=e.vectorStore,this.k=e.k??this.k,this.searchType=e.searchType??this.searchType,this.filter=e.filter,"mmr"===e.searchType&&(this.searchKwargs=e.searchKwargs)}async _getRelevantDocuments(e,t){if("mmr"===this.searchType){if("function"!=typeof this.vectorStore.maxMarginalRelevanceSearch)throw new Error(`The vector store backing this retriever, ${this._vectorstoreType()} does not support max marginal relevance search.`);return this.vectorStore.maxMarginalRelevanceSearch(e,{k:this.k,filter:this.filter,...this.searchKwargs},t?.getChild("vectorstore"))}return this.vectorStore.similaritySearch(e,this.k,this.filter,t?.getChild("vectorstore"))}async addDocuments(e,t){return this.vectorStore.addDocuments(e,t)}}class Roe extends C1{constructor(e,t){super(t),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain","vectorstores",this._vectorstoreType()]}),Object.defineProperty(this,"embeddings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.embeddings=e}async delete(e){throw new Error("Not implemented.")}async similaritySearch(e,t=4,n=void 0,r=void 0){return(await this.similaritySearchVectorWithScore(await this.embeddings.embedQuery(e),t,n)).map((e=>e[0]))}async similaritySearchWithScore(e,t=4,n=void 0,r=void 0){return this.similaritySearchVectorWithScore(await this.embeddings.embedQuery(e),t,n)}static fromTexts(e,t,n,r){throw new Error("the Langchain vectorstore implementation you are using forgot to override this, please report a bug")}static fromDocuments(e,t,n){throw new Error("the Langchain vectorstore implementation you are using forgot to override this, please report a bug")}asRetriever(e,t,n,r,a,i){if("number"==typeof e)return new joe({vectorStore:this,k:e,filter:t,tags:[...r??[],this._vectorstoreType()],metadata:a,verbose:i,callbacks:n});{const t={vectorStore:this,k:e?.k,filter:e?.filter,tags:[...e?.tags??[],this._vectorstoreType()],metadata:e?.metadata,verbose:e?.verbose,callbacks:e?.callbacks,searchType:e?.searchType};return new joe("mmr"===e?.searchType?{...t,searchKwargs:e.searchKwargs}:{...t})}}}var zoe=Object.freeze({__proto__:null,VectorStoreRetriever:joe,VectorStore:Roe,SaveableVectorStore:class extends Roe{static load(e,t){throw new Error("Not implemented")}}}),Loe=Object.freeze({__proto__:null,agents:nie,caches:Mne,callbacks__base:b6,callbacks__manager:H5,callbacks__promises:D5,chat_history:iie,documents:lie,embeddings:Rae,example_selectors:fie,language_models__base:ure,language_models__chat_models:pre,language_models__llms:Iae,load__serializable:P1,memory:vie,messages:P9,output_parsers:vae,outputs:c8,prompts:goe,prompt_values:Fne,runnables:wre,retrievers:yoe,stores:woe,tools:Hae,tracers__base:S6,tracers__console:_5,tracers__initialize:Soe,tracers__log_stream:i8,tracers__run_collector:Aoe,tracers__tracer_langchain:O5,tracers__tracer_langchain_v1:koe,utils__async_caller:x8,utils__chunk_array:Mae,utils__env:g6,utils__function_calling:bre,utils__hash:Tne,utils__json_patch:cae,utils__json_schema:Eoe,utils__math:Noe,utils__stream:Q5,utils__testing:Ioe,utils__tiktoken:ire,utils__types:Moe,vectorstores:zoe});async function Foe(e){const{optionalImportsMap:t={},optionalImportEntrypoints:n=[],importMap:r={},secretsMap:a={},path:i=["$"]}=this,o=i.join(".");if("object"==typeof e&&null!==e&&!Array.isArray(e)&&"lc"in e&&"type"in e&&"id"in e&&1===e.lc&&"secret"===e.type){const t=e,[n]=t.id;if(n in a)return a[n];{const e=f6(n);if(e)return e;throw new Error(`Missing key "${n}" for ${o} in load(secretsMap={})`)}}if("object"==typeof e&&null!==e&&!Array.isArray(e)&&"lc"in e&&"type"in e&&"id"in e&&1===e.lc&&"not_implemented"===e.type){const t=e,n=JSON.stringify(t);throw new Error(`Trying to load an object that doesn't implement serialization: ${o} -> ${n}`)}if("object"==typeof e&&null!==e&&!Array.isArray(e)&&"lc"in e&&"type"in e&&"id"in e&&"kwargs"in e&&1===e.lc){const a=e,s=JSON.stringify(a),[l,...c]=a.id.slice().reverse(),u=c.reverse(),d={langchain_core:Loe,langchain:r};let h=null;const m=[u.join("/")];"langchain_community"===u[0]&&m.push(["langchain",...u.slice(1)].join("/"));const p=m.find((e=>e in t));if(tie.concat(n).includes(u.join("/"))||p){if(void 0===p)throw new Error(`Missing key "${u.join("/")}" for ${o} in load(optionalImportsMap={})`);h=await t[p]}else{let e,t;if("langchain"!==u[0]&&"langchain_core"!==u[0])throw new Error(`Invalid namespace: ${o} -> ${s}`);if(e=d[u[0]],u.shift(),0===u.length)throw new Error(`Invalid namespace: ${o} -> ${s}`);do{if(t=u.join("__"),t in e)break;u.pop()}while(u.length>0);t in e&&(h=e[t])}if("object"!=typeof h||null===h)throw new Error(`Invalid namespace: ${o} -> ${s}`);const f=h[l]??Object.values(h).find((e=>"function"==typeof e&&_1(e)===l));if("function"!=typeof f)throw new Error(`Invalid identifer: ${o} -> ${s}`);const g=await Foe.call({...this,path:[...i,"kwargs"]},a.kwargs);if("constructor"===a.type){const e=new f(S1(g,k1,function(e){const t={};for(let n=e;n&&n.prototype;n=Object.getPrototypeOf(n))Object.assign(t,Reflect.get(n.prototype,"lc_aliases"));return Object.entries(t).reduce(((e,[t,n])=>(e[n]=t,e)),{})}(f)));return Object.defineProperty(e.constructor,"name",{value:l}),e}throw new Error(`Invalid type: ${o} -> ${s}`)}return"object"==typeof e&&null!==e?Array.isArray(e)?Promise.all(e.map(((e,t)=>Foe.call({...this,path:[...i,`${t}`]},e)))):Object.fromEntries(await Promise.all(Object.entries(e).map((async([e,t])=>[e,await Foe.call({...this,path:[...i,e]},t)])))):e}const Boe={stringify:JSON.stringify,parse:async function(e,t){const n=JSON.parse(e);return Foe.call({...t},n)}};var qoe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Hoe(e){if(!function(e){return"string"==typeof e&&qoe.test(e)}(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}for(var Uoe,Voe=[],Woe=0;Woe<256;++Woe)Voe.push((Woe+256).toString(16).slice(1));function Goe(e,t=0){return(Voe[e[t+0]]+Voe[e[t+1]]+Voe[e[t+2]]+Voe[e[t+3]]+"-"+Voe[e[t+4]]+Voe[e[t+5]]+"-"+Voe[e[t+6]]+Voe[e[t+7]]+"-"+Voe[e[t+8]]+Voe[e[t+9]]+"-"+Voe[e[t+10]]+Voe[e[t+11]]+Voe[e[t+12]]+Voe[e[t+13]]+Voe[e[t+14]]+Voe[e[t+15]]).toLowerCase()}var $oe,Zoe,Yoe=new Uint8Array(16);function Koe(){if(!Uoe&&!(Uoe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Uoe(Yoe)}var Xoe=0,Qoe=0;function Joe(e){var t=function(e,t=!1){return Uint8Array.of((15&e[6])<<4|e[7]>>4&15,(15&e[7])<<4|(240&e[4])>>4,(15&e[4])<<4|(240&e[5])>>4,(15&e[5])<<4|(240&e[0])>>4,(15&e[0])<<4|(240&e[1])>>4,(15&e[1])<<4|(240&e[2])>>4,96|15&e[2],e[3],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}("string"==typeof e?Hoe(e):e);return"string"==typeof e?Goe(t):t}var ese={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function tse(e,t,n){if(ese.randomUUID&&!t&&!e)return ese.randomUUID();var r=(e=e||{}).random||(e.rng||Koe)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return Goe(r)}function nse(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rse(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nse(Object(n),!0).forEach((function(t){ase(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nse(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ase(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ise(e={},t,n=0){var r=function(e,t,n){var r=t&&n||0,a=t||new Array(16),i=(e=e||{}).node,o=e.clockseq;if(e._v6||(i||(i=$oe),null==o&&(o=Zoe)),null==i||null==o){var s=e.random||(e.rng||Koe)();null==i&&(i=[s[0],s[1],s[2],s[3],s[4],s[5]],$oe||e._v6||(i[0]|=1,$oe=i)),null==o&&(o=16383&(s[6]<<8|s[7]),void 0!==Zoe||e._v6||(Zoe=o))}var l=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:Qoe+1,u=l-Xoe+(c-Qoe)/1e4;if(u<0&&void 0===e.clockseq&&(o=o+1&16383),(u<0||l>Xoe)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Xoe=l,Qoe=c,Zoe=o;var d=(1e4*(268435455&(l+=122192928e5))+c)%4294967296;a[r++]=d>>>24&255,a[r++]=d>>>16&255,a[r++]=d>>>8&255,a[r++]=255&d;var h=l/4294967296*1e4&268435455;a[r++]=h>>>8&255,a[r++]=255&h,a[r++]=h>>>24&15|16,a[r++]=h>>>16&255,a[r++]=o>>>8|128,a[r++]=255&o;for(var m=0;m<6;++m)a[r+m]=i[m];return t||Goe(a)}(rse(rse({},e),{},{_v6:!0}),new Uint8Array(16));if(r=Joe(r),t){for(var a=0;a<16;a++)t[n+a]=r[a];return t}return Goe(r)}function ose(e){return ise({clockseq:e})}function sse(e,t){return e.channel_versions[t]??0}function lse(e,t,n){return e.versions_seen[t]?.[n]??0}function cse(e){if("object"!=typeof e||null===e)return e;const t=Array.isArray(e)?[]:{};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=cse(e[n]));return t}function use(){return{v:1,id:ose(-2),ts:(new Date).toISOString(),channel_values:{},channel_versions:{},versions_seen:{}}}function dse(e){return{v:e.v,id:e.id,ts:e.ts,channel_values:{...e.channel_values},channel_versions:{...e.channel_versions},versions_seen:cse(e.versions_seen)}}class hse{constructor(e){Object.defineProperty(this,"serde",{enumerable:!0,configurable:!0,writable:!0,value:Boe}),this.serde=e||this.serde}async get(e){const t=await this.getTuple(e);return t?t.checkpoint:void 0}}class mse extends Error{constructor(e){super(e),this.name="GraphRecursionError"}static get unminifiable_name(){return"GraphRecursionError"}}class pse extends Error{constructor(e){super(e),this.name="GraphValueError"}static get unminifiable_name(){return"GraphValueError"}}class fse extends Error{constructor(e){super(e),this.name="EmptyChannelError"}static get unminifiable_name(){return"EmptyChannelError"}}class gse extends Error{constructor(e){super(e),this.name="InvalidUpdateError"}static get unminifiable_name(){return"InvalidUpdateError"}}class vse{}function yse(e,t){const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const a=t.channel_values[r];n[r]=e[r].fromCheckpoint(a)}return n}function bse(e,t,n){const r={};for(const e of Object.keys(t))try{r[e]=t[e].checkpoint()}catch(e){if(e.name!==fse.unminifiable_name)throw e}return{v:1,id:ose(n),ts:(new Date).toISOString(),channel_values:r,channel_versions:{...e.channel_versions},versions_seen:cse(e.versions_seen)}}class wse extends Error{constructor(e){super(e),this.name="GraphValidationError"}}function xse(e,t){if(Array.isArray(e)){for(const n of e)if(!(n in t))throw new Error(`Key ${String(n)} not found in channels`)}else if(!(e in t))throw new Error(`Key ${String(e)} not found in channels`)}function kse(e,t,n=!0,r=!1){try{return e[t].get()}catch(e){if(e.name===fse.unminifiable_name){if(r)return e;if(n)return null}throw e}}function Sse(e,t,n=!0){if(Array.isArray(t)){const r={};for(const a of t)try{r[a]=kse(e,a,!n)}catch(e){if(e.name===fse.unminifiable_name)continue}return r}return kse(e,t)}function*Ase(e,t){if(null!=t)if(Array.isArray(e)&&"object"==typeof t&&!Array.isArray(t))for(const n in t)e.includes(n)&&(yield[n,t[n]]);else{if(Array.isArray(e))throw new Error("Input chunk must be an object when inputChannels is an array");yield[e,t]}}function*Ese(e,t,n){Array.isArray(e)?t.find((([t,n])=>e.includes(t)))&&(yield Sse(n,e)):t.some((([t,n])=>t===e))&&(yield kse(n,e))}function*_se(e,t){const n=t.filter((e=>void 0===e.config||!e.config.tags?.includes(Gae)));if(Array.isArray(e)){const t={};for(const r of n)if(r.writes.some((([t,n])=>e.includes(t)))){const n={};for(const[t,a]of r.writes)e.includes(t)&&(n[t]=a);t[r.name]=n}Object.keys(t).length>0&&(yield t)}else{const t={};for(const r of n)for(const[n,a]of r.writes)n===e&&(t[r.name]=a);Object.keys(t).length>0&&(yield t)}}function Cse(e){for(const t of e)return t;return null}class Ose{static subscribeTo(e,t){const{key:n,tags:r}=t??{};if(Array.isArray(e)&&void 0!==n)throw new Error("Can't specify a key when subscribing to multiple channels");let a;a=function(e){return"string"==typeof e}(e)?n?{[n]:e}:[e]:Object.fromEntries(e.map((e=>[e,e])));const i=Array.isArray(e)?e:[e];return new eie({channels:a,triggers:i,tags:r})}static writeTo(e,t){const n=[];for(const t of e)n.push({channel:t,value:Yae,skipNone:!1});for(const[e,r]of Object.entries(t??{}))s9.isRunnable(r)||"function"==typeof r?n.push({channel:e,value:Yae,skipNone:!0,mapper:g9(r)}):n.push({channel:e,value:r,skipNone:!1});return new Xae(n)}}class Tse extends s9{static lc_name(){return"LangGraph"}constructor(e){super(e),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langgraph","pregel"]}),Object.defineProperty(this,"nodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"channels",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inputs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"outputs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"autoValidate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"streamMode",{enumerable:!0,configurable:!0,writable:!0,value:"values"}),Object.defineProperty(this,"streamChannels",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"interruptAfter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"interruptBefore",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"debug",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"checkpointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nodes=e.nodes,this.channels=e.channels,this.autoValidate=e.autoValidate??this.autoValidate,this.streamMode=e.streamMode??this.streamMode,this.outputs=e.outputs,this.streamChannels=e.streamChannels??this.streamChannels,this.interruptAfter=e.interruptAfter,this.interruptBefore=e.interruptBefore,this.inputs=e.inputs,this.stepTimeout=e.stepTimeout??this.stepTimeout,this.debug=e.debug??this.debug,this.checkpointer=e.checkpointer,this._transform=this._transform.bind(this),this.autoValidate&&this.validate()}validate(){return function({nodes:e,channels:t,inputChannels:n,outputChannels:r,streamChannels:a,interruptAfterNodes:i,interruptBeforeNodes:o}){if(!t)throw new wse("Channels not provided");const s=new Set,l=new Set;for(const[t,n]of Object.entries(e)){if(t===Wae)throw new wse(`"Node name ${Wae} is reserved"`);if(n.constructor!==eie)throw new wse(`Invalid node type ${typeof n}, expected PregelNode`);n.triggers.forEach((e=>s.add(e)))}for(const e of s)if(!(e in t))throw new wse(`Subcribed channel '${String(e)}' not in channels`);if(Array.isArray(n)){if(n.every((e=>!s.has(e))))throw new wse(`None of the input channels ${n} are subscribed to by any node`)}else if(!s.has(n))throw new wse(`Input channel ${String(n)} is not subscribed to by any node`);Array.isArray(r)?r.forEach((e=>l.add(e))):l.add(r),a&&!Array.isArray(a)?l.add(a):Array.isArray(a)&&a.forEach((e=>l.add(e)));for(const e of l)if(!(e in t))throw new wse(`Output channel '${String(e)}' not in channels`);if(i&&"*"!==i)for(const t of i)if(!(t in e))throw new wse(`Node ${String(t)} not in nodes`);if(o&&"*"!==o)for(const t of o)if(!(t in e))throw new wse(`Node ${String(t)} not in nodes`)}({nodes:this.nodes,channels:this.channels,outputChannels:this.outputs,inputChannels:this.inputs,streamChannels:this.streamChannels,interruptAfterNodes:this.interruptAfter,interruptBeforeNodes:this.interruptBefore}),this}get streamChannelsList(){return Array.isArray(this.streamChannels)?this.streamChannels:this.streamChannels?[this.streamChannels]:Object.keys(this.channels)}get streamChannelsAsIs(){return this.streamChannels?this.streamChannels:Object.keys(this.channels)}async getState(e){if(!this.checkpointer)throw new pse("No checkpointer set");const t=await this.checkpointer.getTuple(e),n=t?t.checkpoint:use(),r=yse(this.channels,n),[a,i]=Mse(n,this.nodes,r,!1);return{values:Sse(r,this.streamChannelsAsIs),next:i.map((e=>e.name)),metadata:t?.metadata,config:t?t.config:e,createdAt:t?.checkpoint.ts,parentConfig:t?.parentConfig}}async*getStateHistory(e,t,n){if(!this.checkpointer)throw new pse("No checkpointer set");for await(const r of this.checkpointer.list(e,t,n)){const e=yse(this.channels,r.checkpoint),[t,n]=Mse(r.checkpoint,this.nodes,e,!1);yield{values:Sse(e,this.streamChannelsAsIs),next:n.map((e=>e.name)),metadata:r.metadata,config:r.config,createdAt:r.checkpoint.ts,parentConfig:r.parentConfig}}}async updateState(e,t,n){if(!this.checkpointer)throw new pse("No checkpointer set");const r=await this.checkpointer.getTuple(e),a=r?dse(r.checkpoint):use(),i=Object.entries(a.versions_seen).reduce(((e,[t,n])=>{const r=Math.max(...Object.values(n));return r&&(e[r]||(e[r]=[]),e[r].push(t)),e}),{});if(n||Object.keys(i).length){if(!n){const e=i[Math.max(...Object.keys(i).map(Number))];1===e.length&&(n=e[0])}}else!Array.isArray(this.inputs)&&this.inputs in this.nodes&&(n=this.inputs);if(!n)throw new gse("Ambiguous update, specify as_node");const o=yse(this.channels,a),s=this.nodes[n].getWriters();if(!s.length)throw new gse(`No writers found for node ${n}`);const l={name:n,input:t,proc:s.length>1?d9.from(s):s[0],writes:[],config:void 0};await l.proc.invoke(l.input,v8(e,{runName:`${this.name}UpdateState`,configurable:{[Uae]:e=>l.writes.push(...e),[Vae]:Nse.bind(void 0,a,o,l.writes)}})),Ise(a,o,l.writes);const c=(r?.metadata?.step??-2)+1;return await this.checkpointer.put(r?.config??e,bse(a,o,c),{source:"update",step:c,writes:{[n]:t}})}_defaults(e){const{debug:t,streamMode:n,inputKeys:r,outputKeys:a,interruptAfter:i,interruptBefore:o,...s}=e,l=void 0!==t?t:this.debug;let c=a;void 0===c?c=this.streamChannelsAsIs:xse(c,this.channels);let u=r;void 0===u?u=this.inputs:xse(u,this.channels);const d=o??this.interruptBefore??[],h=i??this.interruptAfter??[];let m;return m=void 0!==n?n:this.streamMode,void 0!==e.configurable&&void 0!==e.configurable[Vae]&&(m="values"),[l,m,u,c,s,d,h]}async*_transform(e,t,n={}){const r=[];try{if(n.recursionLimit&&n.recursionLimit<1)throw new pse(`Recursion limit must be greater than 0, got ${n.recursionLimit}`);if(this.checkpointer&&!n.configurable)throw new pse("Checkpointer requires one or more of the following 'configurable' keys: thread_id, checkpoint_id");const[a,i,o,s,l,c,u]=this._defaults(n),d={...this.nodes},h=this.checkpointer?await this.checkpointer.getTuple(n):null;let m=h?h.checkpoint:use(),p=h?h.config:n,f=(h?.metadata?.step??-2)+1;const g=yse(this.channels,m),v=[];for await(const t of e)for(const e of Ase(o,t))v.push(e);if(v.length){const e=Mse(m,d,g,!0);m=e[0],Ise(m,g,v),this.checkpointer&&(m=bse(m,g,f),r.push(this.checkpointer.put(p,m,{source:"input",step:f,writes:Object.fromEntries(v)})),p={configurable:{...p.configurable,checkpoint_id:m.id}}),f+=1}else{m=dse(m);for(const e of this.streamChannelsList){const t=m.channel_versions[e]??0;m.versions_seen[Wae]||(m.versions_seen[Wae]={}),m.versions_seen[Wae][e]=t}}const y=f+(n.recursionLimit??25);for(let e=f;e<y+1;e+=1){const[o,h]=Mse(m,d,g,!0);if(0===h.length&&e===f)throw new pse("No tasks to run in graph.");if(0===h.length)break;if(e===y)throw new mse(`Recursion limit of ${n.recursionLimit} reached without hitting a stop condition. You can increase the limit by setting the "recursionLimit" config key.`);if(Dse(m,c,this.streamChannelsList,h))break;m=o,a&&console.log(h);const v=h.map(((r,a)=>[r.proc,r.input,v8(p8(l,d[r.name].config,{metadata:{langgraph_step:e,langgraph_node:r.name,langgraph_triggers:["__pregel_tasks"],langgraph_task_idx:a}}),{callbacks:t?.getChild(`graph:step:${e}`),runName:r.name,configurable:{...n.configurable,[Uae]:e=>r.writes.push(...e),[Vae]:Nse.bind(void 0,m,g,r.writes)}})])),b=v.map((([e,t,n])=>()=>e.invoke(t,n)));await Pse(b,this.stepTimeout);const w=[];for(const e of h)w.push(...e.writes);if(Ise(m,g,w),"values"===i?yield*Ese(s,w,g):"updates"===i&&(yield*_se(s,h)),this.checkpointer&&(m=bse(m,g,e),r.push(this.checkpointer.put(p,m,{source:"loop",step:e,writes:Cse("values"===this.streamMode?Ese(s,w,g):_se(s,h))})),p={configurable:{...p.configurable,checkpoint_id:m.id}}),Dse(m,u,this.streamChannelsList,h))break}}finally{await Promise.all(r)}}async invoke(e,t){const n=g8(t);let r;n?.outputKeys||(n.outputKeys=this.outputs),n?.streamMode||(n.streamMode="values");for await(const t of await this.stream(e,n))r=t;if(r)return r}async stream(e,t){const n=async function*(){yield e}();return $5.fromAsyncGenerator(this.transform(n,t))}async*transform(e,t){for await(const n of this._transformStreamWithConfig(e,this._transform,t))yield n}}async function Pse(e,t){const n=e.map((e=>{return t?Promise.race([e(),t?(n=t,new Promise((e=>{setTimeout(e,n)}))):Promise.resolve()]):e();var n})),r=await Promise.allSettled(n);for(const e of r)if("rejected"===e.status)throw e.reason}function Dse(e,t,n,r){const a=n.some((t=>sse(e,t)>lse(e,Wae,t))),i=r.some((e=>"*"===t?!e.config?.tags?.includes(Gae):t.includes(e.name)));return a&&i}function Nse(e,t,n,r,a=!1){if(a){const a=bse(e,t,-1),i=yse(t,a);return Ise(dse(a),i,n),Sse(i,r)}return Sse(t,r)}function Ise(e,t,n){const r={};for(const[e,t]of n)e in r?r[e].push(t):r[e]=[t];let a=0;Object.keys(e.channel_versions).length>0&&(a=Math.max(...Object.values(e.channel_versions)));const i=new Set;for(const[n,o]of Object.entries(r))if(n in t){try{t[n].update(o)}catch(e){if(e.name===gse.unminifiable_name)throw new gse(`Invalid update for channel ${n}. Values: ${o}`)}e.channel_versions[n]=a+1,i.add(n)}else console.warn(`Skipping write for channel ${n} which has no readers`);for(const e in t)i.has(e)||t[e].update([])}function Mse(e,t,n,r){const a=dse(e),i=[],o=[];for(const[e,s]of Object.entries(t))if(s.triggers.filter((e=>{try{return kse(n,e,!1),!0}catch(e){return!1}})).some((t=>sse(a,t)>lse(a,e,t)))){let t;if(Array.isArray(s.channels)){let e=0;for(const r of s.channels)try{t=kse(n,r,!1);break}catch(t){if(t.name===fse.unminifiable_name){e+=1;continue}throw t}if(e===s.channels.length)continue}else{if("object"!=typeof s.channels)throw new Error(`Invalid channels type, expected list or dict, got ${s.channels}`);t={};try{for(const[e,r]of Object.entries(s.channels))t[e]=kse(n,r,!s.triggers.includes(r))}catch(e){if(e.name===fse.unminifiable_name)continue;throw e}}if(void 0!==s.mapper&&(t=s.mapper(t)),r){a.versions_seen[e]||(a.versions_seen[e]={}),s.triggers.forEach((t=>{const n=a.channel_versions[t];void 0!==n&&(a.versions_seen[e][t]=n)}));const n=s.getNode();void 0!==n&&i.push({name:e,input:t,proc:n,writes:[],config:s.config})}else o.push({name:e,input:t})}return[a,r?i:o]}class jse extends vse{constructor(e=!0){super(),Object.defineProperty(this,"lc_graph_name",{enumerable:!0,configurable:!0,writable:!0,value:"EphemeralValue"}),Object.defineProperty(this,"guard",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.guard=e}fromCheckpoint(e){const t=new jse;return e&&(t.value=e),t}update(e){if(0!==e.length){if(1!==e.length&&this.guard)throw new gse("EphemeralValue can only receive one value per step.");this.value=e[e.length-1]}else this.value=void 0}get(){if(void 0===this.value)throw new fse;return this.value}checkpoint(){if(void 0===this.value)throw new fse;return this.value}}const Rse="__start__",zse="__end__";class Lse{constructor(e){Object.defineProperty(this,"condition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ends",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.condition=e.path,this.ends=Array.isArray(e.pathMap)?e.pathMap.reduce(((e,t)=>(e[t]=t,e)),{}):e.pathMap}compile(e,t){return Xae.registerWriter(new $ae({func:(n,r)=>this._route(n,r,e,t)}))}async _route(e,t,n,r){let a,i=await this.condition(r?r(t):e,t);if(Array.isArray(i)||(i=[i]),a=this.ends?i.map((e=>this.ends[e])):i,a.some((e=>!e)))throw new Error("Branch condition returned unknown or null destination");return n(a)}}class Fse{constructor(){Object.defineProperty(this,"nodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"edges",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"branches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"entryPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"compiled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"supportMultipleEdges",{enumerable:!0,configurable:!0,writable:!0,value:!1}),this.nodes={},this.edges=new Set,this.branches={}}warnIfCompiled(e){this.compiled&&console.warn(e)}get allEdges(){return this.edges}addNode(e,t){if(this.warnIfCompiled("Adding a node to a graph that has already been compiled. This will not be reflected in the compiled graph."),e in this.nodes)throw new Error(`Node \`${e}\` already present.`);if(e===zse)throw new Error(`Node \`${e}\` is reserved.`);return this.nodes[e]=g9(t),this}addEdge(e,t){if(this.warnIfCompiled("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph."),e===zse)throw new Error("END cannot be a start node");if(t===Rse)throw new Error("START cannot be an end node");if(!this.supportMultipleEdges&&Array.from(this.edges).some((([t])=>t===e)))throw new Error(`Already found path for ${e}`);return this.edges.add([e,t]),this}addConditionalEdges(e,t,n){const r="object"==typeof e?e:{source:e,path:t,pathMap:n};this.warnIfCompiled("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph.");const a=r.path.name||"condition";if(this.branches[r.source]&&this.branches[r.source][a])throw new Error(`Condition \`${a}\` already present for node \`${e}\``);return this.branches[r.source]||(this.branches[r.source]={}),this.branches[r.source][a]=new Lse(r),this}setEntryPoint(e){return this.warnIfCompiled("Setting the entry point of a graph that has already been compiled. This will not be reflected in the compiled graph."),this.addEdge(Rse,e)}setFinishPoint(e){return this.warnIfCompiled("Setting a finish point of a graph that has already been compiled. This will not be reflected in the compiled graph."),this.addEdge(e,zse)}compile({checkpointer:e,interruptBefore:t,interruptAfter:n}={}){this.validate([...Array.isArray(t)?t:[],...Array.isArray(n)?n:[]]);const r=new Bse({builder:this,checkpointer:e,interruptAfter:n,interruptBefore:t,autoValidate:!1,nodes:{},channels:{[Rse]:new jse,[zse]:new jse},inputs:Rse,outputs:zse,streamChannels:[],streamMode:"values"});for(const[e,t]of Object.entries(this.nodes))r.attachNode(e,t);for(const[e,t]of this.edges)r.attachEdge(e,t);for(const[e,t]of Object.entries(this.branches))for(const[n,a]of Object.entries(t))r.attachBranch(e,n,a);return r.validate()}validate(e){const t=new Set([...this.allEdges].map((([e,t])=>e)));for(const[e]of Object.entries(this.branches))t.add(e);for(const e of Object.keys(this.nodes))if(!t.has(e))throw new Error(`Node \`${e}\` is a dead-end`);for(const e of t)if(e!==Rse&&!(e in this.nodes))throw new Error(`Found edge starting at unknown node \`${e}\``);const n=new Set([...this.allEdges].map((([e,t])=>t)));for(const[e,t]of Object.entries(this.branches))for(const r of Object.values(t))if(r.ends)for(const e of Object.values(r.ends))n.add(e);else{n.add(zse);for(const t of Object.keys(this.nodes))t!==e&&n.add(t)}for(const e of Object.keys(this.nodes))if(!n.has(e))throw new Error(`Node \`${e}\` is not reachable`);for(const e of n)if(e!==zse&&!(e in this.nodes))throw new Error(`Found edge ending at unknown node \`${e}\``);if(e)for(const t of e)if(!(t in this.nodes))throw new Error(`Interrupt node \`${t}\` is not present`);this.compiled=!0}}class Bse extends Tse{constructor({builder:e,...t}){super(t),Object.defineProperty(this,"builder",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.builder=e}attachNode(e,t){this.channels[e]=new jse,this.nodes[e]=new eie({channels:[],triggers:[]}).pipe(t).pipe(new Xae([{channel:e,value:Yae}],[Gae])),this.streamChannels.push(e)}attachEdge(e,t){if(t===zse){if(e===Rse)throw new Error("Cannot have an edge from START to END");this.nodes[e].writers.push(new Xae([{channel:zse,value:Yae}],[Gae]))}else this.nodes[t].triggers.push(e),this.nodes[t].channels.push(e)}attachBranch(e,t,n){e===Rse&&this.nodes[Rse]&&(this.nodes[Rse]=Ose.subscribeTo(Rse,{tags:[Gae]})),this.nodes[e].pipe(n.compile((n=>{const r=n.map((n=>n===zse?zse:`branch:${e}:${t}:${n}`));return new Xae(r.map((e=>({channel:e,value:Yae}))),[Gae])})));const r=n.ends?Object.values(n.ends):Object.keys(this.nodes);for(const n of r)if(n!==zse){const r=`branch:${e}:${t}:${n}`;this.channels[r]=new jse,this.nodes[n].triggers.push(r),this.nodes[n].channels.push(r)}}getGraph(e){const t=e?.xray,n=new J8,r={[Rse]:n.addNode({schema:v4.any()},Rse)},a={[zse]:n.addNode({schema:v4.any()},zse)};for(const[i,o]of Object.entries(this.builder.nodes))if(e?.xray){const s=qse(o)?o.getGraph({...e,xray:"number"==typeof t&&t>0?t-1:t}):o.getGraph(e);if(s.trimFirstNode(),s.trimLastNode(),Object.keys(s.nodes).length>1){const[e,t]=n.extend(s,i);void 0!==e&&(a[i]=e),void 0!==t&&(r[i]=t)}else{const e=n.addNode(o,i);r[i]=e,a[i]=e}}else{const e=n.addNode(o,i);r[i]=e,a[i]=e}for(const[e,t]of this.builder.allEdges)n.addEdge(r[e],a[t]);for(const[e,t]of Object.entries(this.builder.branches)){const i={...Object.fromEntries(Object.keys(this.builder.nodes).filter((t=>t!==e)).map((e=>[e,e]))),[zse]:zse};for(const o of Object.values(t)){let t;t=void 0!==o.ends?o.ends:i;for(const[i,o]of Object.entries(t))n.addEdge(r[e],a[o],i!==o?i:void 0,!0)}}return n}}function qse(e){return"function"==typeof e.attachNode&&"function"==typeof e.attachEdge}class Hse extends vse{constructor(e,t){super(),Object.defineProperty(this,"lc_graph_name",{enumerable:!0,configurable:!0,writable:!0,value:"BinaryOperatorAggregate"}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"operator",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"initialValueFactory",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.operator=e,this.initialValueFactory=t,this.value=t?.()}fromCheckpoint(e){const t=new Hse(this.operator,this.initialValueFactory);return e&&(t.value=e),t}update(e){let t=e;if(t.length){void 0===this.value&&([this.value]=t,t=t.slice(1));for(const e of t)void 0!==this.value&&(this.value=this.operator(this.value,e))}}get(){if(void 0===this.value)throw new fse;return this.value}checkpoint(){if(void 0===this.value)throw new fse;return this.value}}class Use extends vse{constructor(){super(...arguments),Object.defineProperty(this,"lc_graph_name",{enumerable:!0,configurable:!0,writable:!0,value:"LastValue"}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}fromCheckpoint(e){const t=new Use;return e&&(t.value=e),t}update(e){if(0!==e.length){if(1!==e.length)throw new gse;this.value=e[e.length-1]}}get(){if(void 0===this.value)throw new fse;return this.value}checkpoint(){if(void 0===this.value)throw new fse;return this.value}}const Vse=(e,t)=>e.size===t.size&&[...e].every((e=>t.has(e)));class Wse extends vse{constructor(e){super(),Object.defineProperty(this,"lc_graph_name",{enumerable:!0,configurable:!0,writable:!0,value:"NamedBarrierValue"}),Object.defineProperty(this,"names",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"seen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.names=e,this.seen=new Set}fromCheckpoint(e){const t=new Wse(this.names);return e&&(t.seen=new Set(e)),t}update(e){Vse(this.names,this.seen)&&(this.seen=new Set);for(const t of e){if(!this.names.has(t))throw new Error(`Value ${JSON.stringify(t)} not in names ${JSON.stringify(this.names)}`);this.seen.add(t)}}get(){if(!Vse(this.names,this.seen))throw new fse}checkpoint(){return[...this.seen]}}const Gse="__root__";class $se extends Fse{constructor(e){super(),Object.defineProperty(this,"channels",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"waitingEdges",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),this.channels=function(e){const t={};for(const[n,r]of Object.entries(e))t[n]=Zse(r);return t}(e.channels);for(const e of Object.values(this.channels))if("BinaryOperatorAggregate"===e.lc_graph_name){this.supportMultipleEdges=!0;break}}get allEdges(){return new Set([...this.edges,...Array.from(this.waitingEdges).flatMap((([e,t])=>e.map((e=>[e,t]))))])}addNode(e,t){if(e in this.channels)throw new Error(`${e} is already being used as a state attribute (a.k.a. a channel), cannot also be used as a node name.`);return super.addNode(e,t)}addEdge(e,t){if("string"==typeof e)return super.addEdge(e,t);this.compiled&&console.warn("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph.");for(const t of e){if(t===zse)throw new Error("END cannot be a start node");if(!Object.keys(this.nodes).some((e=>e===t)))throw new Error(`Need to add_node ${t} first`)}if(t===zse)throw new Error("END cannot be an end node");if(!Object.keys(this.nodes).some((e=>e===t)))throw new Error(`Need to add_node ${t} first`);return this.waitingEdges.add([e,t]),this}compile({checkpointer:e,interruptBefore:t,interruptAfter:n}={}){this.validate([...Array.isArray(t)?t:[],...Array.isArray(n)?n:[]]);const r=Object.keys(this.channels),a=1===r.length&&r[0]===Gse?r[0]:r,i=new Yse({builder:this,checkpointer:e,interruptAfter:n,interruptBefore:t,autoValidate:!1,nodes:{},channels:{...this.channels,[Rse]:new jse},inputs:Rse,outputs:a,streamChannels:a,streamMode:"updates"});i.attachNode(Rse);for(const[e,t]of Object.entries(this.nodes))i.attachNode(e,t);for(const[e,t]of this.edges)i.attachEdge(e,t);for(const[e,t]of this.waitingEdges)i.attachEdge(e,t);for(const[e,t]of Object.entries(this.branches))for(const[n,r]of Object.entries(t))i.attachBranch(e,n,r);return i.validate()}}function Zse(e){return"object"==typeof e&&e&&"reducer"in e&&e.reducer?new Hse(e.reducer,e.default):"object"==typeof e&&e&&"value"in e&&e.value?new Hse(e.value,e.default):new Use}class Yse extends Bse{attachNode(e,t){const n=Object.keys(this.builder.channels);function r(e,t){if(t){if("object"!=typeof t||Array.isArray(t))throw new gse("Expected dict, got "+typeof t);return e in t?t[e]:Zae}return Zae}const a=n.map((e=>e===Gse?{channel:e,value:Yae,skipNone:!0}:{channel:e,value:Yae,mapper:new $ae({func:r.bind(null,e),trace:!1,recurse:!1})}));e===Rse?this.nodes[e]=new eie({tags:[Gae],triggers:[Rse],channels:[Rse],writers:[new Xae(a,[Gae])]}):(this.channels[e]=new jse,this.nodes[e]=new eie({triggers:[],channels:1===n.length&&n[0]===Gse?n:n.reduce(((e,t)=>(e[t]=t,e)),{}),writers:[new Xae(a.concat({channel:e,value:e}),[Gae])],bound:t}))}attachEdge(e,t){if(t!==zse)if(Array.isArray(e)){const n=`join:${e.join("+")}:${t}`;this.channels[n]=new Wse(new Set(e)),this.nodes[t].triggers.push(n);for(const t of e)this.nodes[t].writers.push(new Xae([{channel:n,value:t}],[Gae]))}else if(e===Rse){const e=`start:${t}`;this.channels[e]=new jse,this.nodes[t].triggers.push(e),this.nodes[Rse].writers.push(new Xae([{channel:e,value:Rse}],[Gae]))}else this.nodes[t].triggers.push(e)}attachBranch(e,t,n){this.nodes[e].writers.push(n.compile((n=>{const r=n.filter((e=>e!==zse));if(!r.length)return;const a=r.map((n=>({channel:`branch:${e}:${t}:${n}`,value:e})));return new Xae(a,[Gae])}),(e=>Qae.doRead(e,this.outputs,!0))));const r=n.ends?Object.values(n.ends):Object.keys(this.builder.nodes);for(const n of r){if(n===zse)continue;const r=`branch:${e}:${t}:${n}`;this.channels[r]=new jse,this.nodes[n].triggers.push(r)}}}function Kse(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],a=n.map(J1),i=r.map(J1);for(const e of a)null!==e.id&&void 0!==e.id||(e.id=tse());for(const e of i)null!==e.id&&void 0!==e.id||(e.id=tse());const o=new Map(a.map(((e,t)=>[e.id,t]))),s=[...a],l=new Set;for(const e of i){const t=o.get(e.id);if(void 0!==t)"remove"===e._getType()?l.add(e.id):s[t]=e;else{if("remove"===e._getType())throw new Error(`Attempting to delete a message with an ID that doesn't exist ('${e.id}')`);s.push(e)}}return s.filter((e=>!l.has(e.id)))}class Xse extends hse{constructor(e){super(e),Object.defineProperty(this,"storage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.storage={}}async getTuple(e){const t=e.configurable?.thread_id,n=e.configurable?.checkpoint_id,r=this.storage[t];if(n){const t=r[n];if(t)return{config:e,checkpoint:await this.serde.parse(t[0]),metadata:await this.serde.parse(t[1])}}else if(r){const e=Object.keys(r).sort(((e,t)=>t.localeCompare(e)))[0],n=r[e];return{config:{configurable:{thread_id:t,checkpoint_id:e}},checkpoint:await this.serde.parse(n[0]),metadata:await this.serde.parse(n[1])}}}async*list(e,t,n){const r=e.configurable?.thread_id,a=this.storage[r]??{};for(const[e,i]of Object.entries(a).filter((e=>!n||e[0]<n.configurable?.checkpoint_id)).sort(((e,t)=>t[0].localeCompare(e[0]))).slice(0,t))yield{config:{configurable:{thread_id:r,checkpoint_id:e}},checkpoint:await this.serde.parse(i[0]),metadata:await this.serde.parse(i[1])}}async put(e,t,n){const r=e.configurable?.thread_id;return this.storage[r]?this.storage[r][t.id]=[this.serde.stringify(t),this.serde.stringify(n)]:this.storage[r]={[t.id]:[this.serde.stringify(t),this.serde.stringify(n)]},{configurable:{thread_id:r,checkpoint_id:t.id}}}}class Qse extends $ae{constructor(e,t){const{name:n,tags:r,handleToolErrors:a}=t??{};super({name:n,tags:r,func:(e,t)=>this.run(e,t)}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"handleToolErrors",{enumerable:!0,configurable:!0,writable:!0,value:!0}),this.tools=e,this.handleToolErrors=a??this.handleToolErrors}async run(e,t){const n=Array.isArray(e)?e[e.length-1]:e.messages[e.messages.length-1];if("ai"!==n._getType())throw new Error("ToolNode only accepts AIMessages as input.");const r=await Promise.all(n.tool_calls?.map((async e=>{const n=this.tools.find((t=>t.name===e.name));try{if(void 0===n)throw new Error(`Tool "${e.name}" not found.`);const r=await n.invoke({...e,type:"tool_call"},t);return z1(r)&&"tool"===r._getType()?r:new F1({name:n.name,content:"string"==typeof r?r:JSON.stringify(r),tool_call_id:e.id})}catch(t){if(!this.handleToolErrors)throw t;return new F1({content:`Error: ${t.message}\n Please fix your mistakes.`,name:e.name,tool_call_id:e.id??""})}}))??[]);return Array.isArray(e)?r:{messages:r}}}class Jse extends zae{constructor(){super(...arguments),this.schema=v4.object({namespace:v4.enum(["Fitbit","AppleHealth"]).describe("The namespace of the device data, representing the manufacturer of the devices used to collect the data."),type:v4.string().describe("The device data type is specific to the namespace. For Apple Health this is called Sleep Analysis, for Fitbit it is called Sleep."),observedAfter:v4.string().optional().describe("The start of the date range for the query. This is a date (no time) in the participant's local time. This is inclusive."),observedBefore:v4.string().optional().describe("The end of the date range for the query. This is a date (no time) in the participant's local time. This is inclusive.")}),this.name="queryDeviceDataV2DailySleep",this.description="Can query daily aggregated sleep data. This will include sleep broken down by sleep stage.\n Use this function when you need to do sleep aggregate queries instead of deviceDataV2Aggregate."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryDeviceDataV2DailySleep(e);return JSON.stringify(t.sleepStageSummaries.map((({date:e,duration:t,source:n,value:r})=>({date:e,duration:t,source:n,value:r}))))}))}}class ele extends zae{constructor(){super(...arguments),this.schema=v4.object({demographics:v4.object({email:v4.string().optional().describe("The email address of the participant."),mobilePhone:v4.string().optional().describe("The mobile phone number of the participant."),firstName:v4.string().optional().describe("The first name of the participant."),middleName:v4.string().optional().describe("The middle name of the participant."),lastName:v4.string().optional().describe("The last name of the participant."),dateOfBirth:v4.string().optional().describe("The date of birth of the participant."),gender:v4.string().optional().describe("The gender of the participant."),preferredLanguage:v4.string().optional().describe("The preferred language of the participant."),street1:v4.string().optional().describe("The first line of the participant's street address."),street2:v4.string().optional().describe("The second line of the participant's street address."),city:v4.string().optional().describe("The city of the participant."),state:v4.string().optional().describe("The state of the participant."),postalCode:v4.string().optional().describe("The postal code of the participant."),unsubscribedFromEmails:v4.string().optional().describe("Whether the participant is unsubscribed from email messages."),unsubscribedFromSms:v4.string().optional().describe("Whether the participant is unsubscribed from SMS messages.")}).optional().describe("Demographic information about the participant."),customFields:v4.record(v4.string(),v4.string()).optional().describe("Custom fields where dynamic information can be saved for the participant.")}),this.name="persistParticipantInfo",this.description="Can be used to save data about the current participant, including dynamic information in the participant's custom fields."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.persistParticipantInfo(e.demographics,e.customFields);return JSON.stringify(t)}))}}const tle=v4.object({endDate:v4.string().optional().describe("The end of the date range for the query. This is a datetime in the participant's local timezone."),startDate:v4.string().optional().describe("The start of the date range for the query. This is a datetime in the participant's local timezone."),pageSize:v4.number().optional().describe("The number of items to return."),pageID:v4.string().optional().describe("The page ID to continue from.")});class nle extends zae{constructor(){super(...arguments),this.schema=tle,this.name="queryAppleHealthWorkouts",this.description="Query the participant's workouts from Apple Health."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryAppleHealthWorkouts(e);return JSON.stringify(t)}))}}class rle extends zae{constructor(){super(...arguments),this.schema=tle,this.name="queryAppleHealthActivitySummaries",this.description="Query the participant's Apple Health activity summaries. These include Active Energy Burned,\n Active Energy Burned Goal, Apple Exercise Time, Apple Exercise Time Goal, Apple Stand Hours and Apple Stand Hours Goal."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryAppleHealthActivitySummaries(e);return JSON.stringify(t)}))}}class ale extends zae{constructor(){super(...arguments),this.schema=v4.object({type:v4.enum(["Sms","Push","Email"]).optional().describe("The type of notification to query."),statusCode:v4.enum(["Succeeded","Unsubscribed","MissingContactInfo","NoRegisteredMobileDevice","NoAssociatedUser","ServiceError"]).optional().describe("The status code of the notification."),sentBefore:v4.string().optional().describe("The end of the date range for the query. This is a datetime in the participant's local timezone."),sentAfter:v4.string().optional().describe("The start of the date range for the query. This is a datetime in the participant's local timezone."),identifier:v4.string().optional().describe("The identifier of the notification.")}),this.name="queryNotifications",this.description="Query notifications sent to the participant."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryNotifications(e);return JSON.stringify(t)}))}}class ile extends zae{constructor(){super(...arguments),this.schema=v4.object({surveyResultID:v4.string().optional().describe("The ID of the survey result."),surveyID:v4.string().optional().describe("The ID of the survey."),surveyName:v4.string().optional().describe("The name of the survey."),after:v4.string().optional().describe("The start of the date range for the query. Survey answers submitted after this date will be retrieved.\n This is a datetime in the participant's local timezone."),before:v4.string().optional().describe("The end of the date range for the query. Survey answers submitted before this date will be retrieved.\n This is a datetime in the participant's local timezone."),stepIdentifier:v4.string().optional().describe("The step identifier."),resultIdentifier:v4.string().optional().describe("The result identifier."),answer:v4.string().optional().describe("A particular answer."),pageID:v4.string().optional().describe("The page ID to continue from.")}),this.name="querySurveyAnswers",this.description="Query answers to surveys the participant has completed."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.querySurveyAnswers(e);return JSON.stringify(t)}))}}class ole extends zae{constructor(){super(...arguments),this.schema=v4.object({namespace:v4.enum(["Fitbit","AppleHealth"]).describe("The namespace of the device data, representing the manufacturer of the devices used to collect the data."),type:v4.string().describe("The device data type is specific to the namespace."),observedAfter:v4.string().optional().describe("The start of the date range for the query. This is a datetime in the participant's local timezone."),observedBefore:v4.string().optional().describe("The end of the date range for the query. This is a datetime in the participant's local timezone.")}),this.name="queryDeviceDataV2",this.description="Can query a participant's device data. This represents raw individual fine grained data points, not aggregated in any way.\n For sleep this is the function you would query to determine the time a participant went to bed or woke up."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryDeviceDataV2(e);return JSON.stringify(t.deviceDataPoints.map((({value:e,startDate:t,startDateOffset:n,observationDate:r,observationDateOffset:a,units:i,dataSource:o})=>{var s;return{value:e,startDate:t,startDateOffset:n,observationDate:r,observationDateOffset:a,units:i,dataSource:null===(s=null==o?void 0:o.properties)||void 0===s?void 0:s.sourceName}})))}))}}class sle extends zae{constructor(){super(...arguments),this.schema=v4.object({namespace:v4.enum(["Fitbit","AppleHealth"]).describe("The namespace of the device data, representing the manufacturer of the devices used to collect the data."),type:v4.string().describe("The device data type is specific to the namespace. Example data types for AppleHealth are Steps, Heart Rate."),observedAfter:v4.string().optional().describe("The start of the date range for the query. This is a datetime in the participant's local timezone."),observedBefore:v4.string().optional().describe("The end of the date range for the query. This is a datetime in the participant's local timezone."),intervalAmount:v4.number().describe("The number of periods to aggregate over. Together with intervalType this can be 1 Days or 3 Minutes."),intervalType:v4.enum(["Minutes","Hours","Days","Weeks","Months"]).describe("The type of interval to aggregate over. Together with intervalAmount this can be 1 Days or 3 Minutes."),aggregateFunctions:v4.array(v4.enum(["sum","avg","count","min","max"])).describe("The aggregations functions to apply to the granular data.")}),this.name="queryDeviceDataV2Aggregate",this.description="Can query a participant's aggregated device data. This can be used to get for instance a participant's hourly steps \n count or their min max heart rate every day."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryDeviceDataV2Aggregate(e);return JSON.stringify(t.intervals.map((({date:e,statistics:t})=>({date:e,statistics:t}))))}))}}class lle{constructor(e="",t=[]){this.initialized=!1,this.baseUrl="https://2f4jcc2e2wgkjtpckvv2hhaani0ilmam.lambda-url.us-east-1.on.aws/",this.defaultTools=[new Jse,new ele,new ole,new sle,new ale,new nle,new rle,new ile],this.additionalInstructions=e,this.tools=t.length?t:this.defaultTools}ask(e,t){var n,r,a,i;return Wq(this,void 0,void 0,(function*(){if(!this.initialized){let e=yield b.getParticipantInfo();this.initialize(e)}let o={configurable:{thread_id:this.participantId}},s={messages:[new Z1(e)]};try{for(var l,c=!0,u=$q(yield this.graph.streamEvents(s,Object.assign(Object.assign({},o),{streamMode:"values",version:"v1"})));l=yield u.next(),!(n=l.done);){i=l.value,c=!1;try{t(i)}finally{c=!0}}}catch(e){r={error:e}}finally{try{c||n||!(a=u.return)||(yield a.call(u))}finally{if(r)throw r.error}}}))}initialize(e){const t=new Qse(this.tools),n={messages:{reducer:Kse},participantInfo:{value:(e,t)=>t||e,default:()=>"{}"}},r=new Tae({model:"gpt-4o",temperature:0,apiKey:b.token.access_token},{baseURL:this.baseUrl}).bindTools(this.tools),a=coe.fromMessages([ooe.fromTemplate(`\n\t\t\tYou are a health and wellness assistant. Your purpose is to help users understand their health and wearable data.\n\t\t\t\n\t\t\tUser information: {participantInfo}\n\t\t\t\n\t\t\tThe time right now is ${(new Date).toISOString()}.\n\n ${this.additionalInstructions}\n\t\t\t`),new Jie("messages")]),i=new $se({channels:n}).addNode("setParticipantInfo",(()=>Wq(this,void 0,void 0,(function*(){return{participantInfo:JSON.stringify(e)}})))).addNode("agent",((e,t)=>Wq(this,void 0,void 0,(function*(){const{messages:n,participantInfo:i}=e,o=a.pipe(r);return{messages:[yield o.invoke({messages:n,participantInfo:i},t)]}})))).addNode("tools",t).addEdge(Rse,"setParticipantInfo").addEdge("setParticipantInfo","agent").addConditionalEdges("agent",(e=>{var t;const{messages:n}=e;return(null===(t=n[n.length-1].tool_calls)||void 0===t?void 0:t.length)?"tools":zse})).addEdge("tools","agent"),o=new Xse;this.graph=i.compile({checkpointer:o}),this.initialized=!0,this.participantId=e.participantID}}function cle(e){const[n,r]=m(""),[a,i]=m([]),[o,s]=m(""),[l,c]=m(!0),u=d(),h=d(null);f((()=>{void 0===u.current&&(u.current=new lle(e.additionalInstructions))}),[]),f((()=>{h.current&&(h.current.scrollTop=h.current.scrollHeight)}),[a]);const p=function(){var t;return Wq(this,void 0,void 0,(function*(){let a=n;i((e=>[...e,{type:"user",content:a}])),r(""),yield null===(t=u.current)||void 0===t?void 0:t.ask(a,(function(t){var n;const[r,a]=t.event.split("_").slice(1);if("stream"===a&&"chain"!==r){let r=(null===(n=t.data)||void 0===n?void 0:n.chunk).message;r.content&&"string"==typeof r.content?g(t.run_id,r.content):e.debug&&r.tool_call_chunks&&r.tool_call_chunks.length>0&&(r.tool_call_chunks[0].args?g(t.run_id,r.tool_call_chunks[0].args):r.tool_call_chunks[0].name&&g(t.run_id,r.tool_call_chunks[0].name+" "))}"tool"===r&&("start"===a?s("Querying your data..."):"end"===a&&s(""))}))}))},g=function(e,t){i((n=>{let r=n.find((t=>t.runId===e));if(r){const a=Object.assign(Object.assign({},r),{content:r.content+t});return n.map((t=>t.runId===e?a:t))}return[...n,{type:"ai",content:t,runId:e}]}))};return t.createElement(t.Fragment,null,l&&t.createElement("div",{className:"mdh-assistant-collapsed",onClick:()=>Wq(this,void 0,void 0,(function*(){c(!1)}))},t.createElement(D,{icon:gK.faFlask,size:"lg"})),!l&&t.createElement("div",{className:"mdh-assistant"},t.createElement("div",{className:"mdh-assistant-header"},t.createElement("div",null,t.createElement(D,{icon:gK.faFlask}),"MyDataHelps Assistant"),t.createElement(D,{icon:yK.faChevronDown,className:"collapse-button",onClick:()=>c(!0)})),t.createElement("div",{id:"log",ref:h},a&&a.map(((e,n)=>"user"===e.type?t.createElement("div",{className:"user-message",key:n},t.createElement(D,{icon:pK.faUser}),t.createElement("p",null,e.content)):"ai"===e.type?t.createElement("div",{className:"ai-message",key:n},t.createElement(D,{icon:fK.faGear}),t.createElement(a1,null,e.content)):void 0)),o&&t.createElement("div",{id:"loading"},t.createElement(D,{icon:vK.faSpinner,spin:!0}),t.createElement("p",null,o))),t.createElement("div",{className:"input"},t.createElement("div",{className:"input-group"},t.createElement("input",{type:"text",id:"user-input",value:n,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&p()}}),t.createElement("button",{type:"button",id:"send",onClick:p},t.createElement(D,{icon:mK.faPaperPlane}))))))}function ule(e){var n;const[r,a]=m();let i;return"default"===e.previewState&&(i=(e,t)=>HH(e,t,2e3,2e4)),cU((()=>{"default"!==e.previewState?NU.loadParticipant().then((e=>{a(e.getStepsBaseline())})):a(1e4)})),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0,backgroundColor:"var(--mdhui-background-color-0)"},t.createElement(bz,{order:1},az("asthma-activity-view-title"))),t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:i,title:az("asthma-activity-view-chart-title"),dailyDataType:mU.Steps,highlight:e=>!!r&&!dH(r,e),emptyDomain:[0,1e4]}),"Steps"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-activity-view-alert-message"),logEntrySurveyName:e.logEntrySurveyName}))}function dle(e){var n;let r;return"default"===e.previewState&&(r=(e,t)=>HH(e,t,30,130)),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0,backgroundColor:"var(--mdhui-background-color-0)"},t.createElement(bz,{order:1},az("asthma-air-quality-view-title"))),(!e.alert||"HomeAirQuality"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:r,title:az("asthma-air-quality-view-home-aqi-chart-title"),dailyDataType:fH.HomeAirQuality,highlight:e=>e>100,emptyDomain:[0,160]}),(!e.alert||"WorkAirQuality"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:r,title:az("asthma-air-quality-view-work-aqi-chart-title"),dailyDataType:fH.WorkAirQuality,highlight:e=>e>100,emptyDomain:[0,160]}),"HomeAirQuality"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-air-quality-view-home-aqi-alert-message"),logEntrySurveyName:e.logEntrySurveyName}),"WorkAirQuality"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-air-quality-view-work-aqi-alert-message"),logEntrySurveyName:e.logEntrySurveyName}))}function hle(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{showCloseButton:!0,backgroundColor:"var(--mdhui-background-color-0)"}),t.createElement("div",{style:{background:"#ccc",height:160,width:160,borderRadius:"50%",margin:"32px auto"}}),t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-alert-takeover-message"),logEntrySurveyName:e.logEntrySurveyName}))}function mle(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0},t.createElement(bz,{order:2},ia(e.date,"PPP",{locale:Ps(b.getCurrentLanguage())}))),t.createElement(Ms,null,t.createElement(ZU,{previewState:e.previewState?"logged with mild symptoms":void 0,date:e.date,logTodayEntrySurveyName:e.logTodayEntrySurveyName,logYesterdayEntrySurveyName:e.logYesterdayEntrySurveyName,editLogEntryUrl:e.editLogEntryUrl,infoUrl:e.logEntryInfoUrl})),t.createElement(Ms,null,t.createElement(FU,{previewState:e.previewState?"all data":void 0,heartAndLungsUrl:e.heartAndLungsUrl,activityUrl:e.activityUrl,sleepUrl:e.sleepUrl,date:e.date})),t.createElement(Ms,null,t.createElement(jU,{previewState:e.previewState?"all data":void 0,airQualityUrl:e.airQualityUrl,date:e.date})))}function ple(e){var n;const[r,a]=m(),[i,o]=m(),[s,l]=m(),[c,u]=m(),[d,h]=m();let p,f,g;return"default"===e.previewState&&(p=(e,t)=>HH(e,t,30,150,!1),f=(e,t)=>HH(e,t,10,50),g=(e,t)=>HH(e,t,.85,1,!1)),cU((()=>{if("default"===e.previewState)return a(90),o(90),l(30),u(.97),void h(.96);NU.loadParticipant().then((e=>{a(e.getDaytimeRestingHeartRateBaseline()),o(e.getNighttimeRestingHeartRateBaseline()),l(e.getRespiratoryRateBaseline()),u(e.getDaytimeBloodOxygenLevelBaseline()),h(e.getNighttimeBloodOxygenLevelBaseline())}))})),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0,backgroundColor:"var(--mdhui-background-color-0)"},t.createElement(bz,{order:1},az("asthma-heart-and-lungs-view-title"))),(!e.alert||"DaytimeRestingHeartRate"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:p,title:az("asthma-heart-and-lungs-view-dhr-chart-title"),dailyDataType:mU.DaytimeRestingHeartRate,valueFormatter:e=>Number(e).toFixed(0),highlight:e=>!!r&&!lH(r,e),emptyDomain:[0,120]}),(!e.alert||"NighttimeRestingHeartRate"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:p,title:az("asthma-heart-and-lungs-view-nhr-chart-title"),dailyDataType:mU.NighttimeRestingHeartRate,valueFormatter:e=>Number(e).toFixed(0),highlight:e=>!!i&&!cH(i,e),emptyDomain:[0,120]}),(!e.alert||"RespiratoryRate"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:f,title:az("asthma-heart-and-lungs-view-rr-chart-title"),dailyDataType:mU.RespiratoryRate,highlight:e=>!!s&&!uH(s,e),emptyDomain:[0,40]}),(!e.alert||"DaytimeBloodOxygenLevel"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:g,title:az("asthma-heart-and-lungs-view-dbol-chart-title"),dailyDataType:mU.DaytimeBloodOxygenLevel,valueConverter:e=>100*e,valueFormatter:e=>Number(e).toFixed(0),highlight:e=>!!c&&!mH(c,e),domain:[80,100],emptyDomain:[80,100]}),(!e.alert||"NighttimeBloodOxygenLevel"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:g,title:az("asthma-heart-and-lungs-view-nbol-chart-title"),dailyDataType:mU.NighttimeBloodOxygenLevel,valueConverter:e=>100*e,valueFormatter:e=>Number(e).toFixed(0),highlight:e=>!!d&&!mH(d,e),domain:[80,100],emptyDomain:[80,100]}),"DaytimeRestingHeartRate"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-heart-and-lungs-view-dhr-alert-message"),logEntrySurveyName:e.logEntrySurveyName}),"NighttimeRestingHeartRate"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-heart-and-lungs-view-nhr-alert-message"),logEntrySurveyName:e.logEntrySurveyName}),"RespiratoryRate"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-heart-and-lungs-view-rr-alert-message"),logEntrySurveyName:e.logEntrySurveyName}),"DaytimeBloodOxygenLevel"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-heart-and-lungs-view-dbol-alert-message"),logEntrySurveyName:e.logEntrySurveyName}),"NighttimeBloodOxygenLevel"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-heart-and-lungs-view-nbol-alert-message"),logEntrySurveyName:e.logEntrySurveyName}))}A(":root {\n --ce-grey-1: #FBFCFC;\n --ce-grey-2: #f8f9fb;\n --ce-grey-3: #F4F6F7;\n --ce-grey-4: #F1F2F5;\n --ce-grey-5: #EDEFF2;\n --ce-grey-10: #DFE1E7;\n --ce-grey-20: #C6CAD5;\n --ce-grey-30: #A9ADBF;\n --ce-grey-40: #8E90A6;\n --ce-grey-50: #73748B;\n --ce-grey-55: #6B6B81;\n --ce-grey-60: #595A6B;\n --ce-grey-70: #434351;\n --ce-grey-80: #2E2D35;\n --ce-grey-90: #1D1C21;\n --mdh-blue-1: #fafcff;\n --mdh-blue-2: #f4f8ff;\n --mdh-blue-3: #f1f6ff;\n --mdh-blue-4: #ebf3fe;\n --mdh-blue-5: #e5effe;\n --mdh-blue-10: #d1e2fd;\n --mdh-blue-20: #cde3ff;\n --mdh-blue-30: #7daffa;\n --mdh-blue-40: #4c91f8;\n --mdh-blue-50: #146ef6;\n --mdh-blue-55: #0c64eb;\n --mdh-blue-60: #0954c8;\n --mdh-blue-70: #063e98;\n --mdh-blue-80: #032a6a;\n --mdh-blue-90: #001a48;\n --mdh-blue-95: #001843;\n --mdh-blue-96: #00173f;\n --mdh-blue-97: #001438;\n --mdh-blue-98: #001232;\n --mdh-blue-99: #00102d;\n --border: 1px solid var(--ce-grey-10);\n --border-radius: 10px;\n --touch: 44px;\n --lg-padding: 20px;\n}\n\n.mdh-assistant-collapsed {\n position: fixed;\n bottom: 20px;\n right: 20px;\n width: var(--touch);\n height: var(--touch);\n background: var(--mdhui-color-primary);\n display: flex;\n box-shadow: var(--mdhui-box-shadow-1);\n border-radius: 200px;\n align-items: center;\n justify-content: center;\n color: #fff;\n cursor: pointer;\n}\n\n.mdh-assistant {\n position: fixed;\n bottom: 0;\n background-color: white;\n font-size: 14px;\n width: calc(100% - 1rem);\n border: var(--border);\n border-radius: 12px;\n overflow: hidden;\n margin: .5rem;\n z-index: 3;\n max-width: 800px;\n right: 0;\n box-shadow: var(--mdhui-box-shadow-1);\n}\n\n.mdh-assistant-header {\n display: flex;\n align-items: center;\n height: 44px;\n padding: 0 12px;\n justify-content: space-between;\n border-bottom: var(--border);\n font-weight: 600;\n color: var(--ce-grey-55);\n}\n\n.mdh-assistant-header .collapse-button {\n color: var(--mdhui-color-primary);\n}\n\n.mdh-assistant-header svg {\n padding-right: 0.5rem\n}\n\n.mdh-assistant #log {\n overflow-y: auto;\n overflow-x: hidden;\n height: 80vh;\n}\n\n/* typography */\n.mdh-assistant p,\n.mdh-assistant ul {\n margin: .25rem 0;\n word-break: break-word;\n line-height: 1.4;\n font-size: 15px;\n color: var(--ce-grey-80);\n}\n\n/* form elements */\n.mdh-assistant input,\n.mdh-assistant button {\n min-height: var(--touch);\n min-width: var(--touch);\n border: 0;\n border-radius: var(--border-radius);\n}\n\n.mdh-assistant input {\n flex: 1;\n min-height: calc(var(--touch) + 4px);\n min-width: calc(var(--touch) + 4px);\n padding: 5px 50px 5px 15px;\n font-size: 1rem;\n color: var(--ce-grey-80);\n}\n\n.mdh-assistant button {\n background: transparent;\n border: 2px solid transparent;\n cursor: pointer;\n color: var(--mdh-blue-55);\n position: absolute;\n right: 4px;\n}\n\n.mdh-assistant button:hover {\n background: var(--mdh-blue-5);\n border: 2px solid transparent;\n}\n\n.mdh-assistant .input-group {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n background: #fff;\n border-top: var(--border);\n}\n\n/* other */\n.mdh-assistant input {\n padding: 15px 35px 15px 15px;\n box-sizing: border-box;\n margin: 2px 3px;\n width: calc(100% - 6px);\n}\n\n.mdh-assistant .ai-message,\n.mdh-assistant .user-message,\n.mdh-assistant #loading {\n padding: 4px 8px 4px 20px;\n position: relative;\n border-bottom: 1px solid var(--ce-grey-5);\n}\n\n.mdh-assistant .user-message {\n background: var(--ce-grey-3);\n min-height: 27px;\n}\n\n.mdh-assistant .ai-message .svg-inline--fa,\n.mdh-assistant .user-message .svg-inline--fa,\n.mdh-assistant #loading .svg-inline--fa {\n color: var(--ce-grey-40);\n position: absolute;\n left: 6px;\n top: 10px;\n font-size: 9px;\n margin: .25rem 0;\n}\n\n.mdh-assistant #loading .svg-inline--fa {\n font-weight: 700;\n}\n\n.mdh-assistant input:focus-visible {\n outline: 1px solid var(--mdhui-color-primary);\n}\n");const fle={identifier:Yq(new Date),symptomLevel:"none",symptoms:[],impacts:[],triggers:[]},gle={"no symptoms":{logEntry:fle},"mild symptoms":{logEntry:Object.assign(Object.assign({},fle),{symptomLevel:"mild",symptoms:["Coughing"],impacts:["Wake up at night","Use your rescue inhaler"],triggers:["Cold/viral illness","Seasonal allergens/pollen","Smoke (tobacco or wood burning)","Air pollution","Dust mites","Mold"]})},"moderate symptoms":{logEntry:Object.assign(Object.assign({},fle),{symptomLevel:"moderate",symptoms:["Coughing"],triggers:["Cold/viral illness","Mold"]})},"severe symptoms":{logEntry:Object.assign(Object.assign({},fle),{symptomLevel:"severe",symptoms:["Coughing","Wheezing"],impacts:["Use your rescue inhaler"]})}};function vle(e){var n;let r=Un(uo(),{days:-1});if(fa(e.date,r))return b.dismiss(),null;const[a,i]=m(!0),[o,s]=m();cU((()=>{if(i(!0),"loading"===e.previewState)return;if(e.previewState)return s(gle[e.previewState].logEntry),void i(!1);let t=Un(new Date(e.date),{days:-1}),n=Un(new Date(e.date),{days:1});NU.loadLogEntries(t,n).then((t=>{let n=Yq(e.date),r=t.find((e=>e.identifier===n));r?s(r):b.dismiss(),i(!1)}))}),[],[e.previewState]);const l=e=>{(e=>{let t=Object.assign(Object.assign({},o),{symptomLevel:e});"none"===e&&(t.symptoms=[]),s(t)})(eH(e))},c=e=>{(e=>{let t=Object.assign(Object.assign({},o),{symptoms:e});e.length>0&&"none"===t.symptomLevel&&(t.symptomLevel="mild"),s(t)})(nH(e))},u=t.createElement(E,{className:"button",style:{left:"16px"},onClick:()=>{e.previewState||b.dismiss()}},"Cancel"),d=t.createElement(E,{className:"button",style:{color:"#fff",background:"#369cff",right:"16px",padding:"0 16px"},onClick:()=>{a||e.previewState||NU.saveLogEntry(o).then((()=>{b.dismiss()}))}},"Save");return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{title:ia(e.date,"PPP",{locale:Ps(b.getCurrentLanguage())}),navigationBarLeft:u,navigationBarRight:d,variant:"compressed",backgroundColor:"var(--mdhui-background-color-0)"}),a&&t.createElement(Dn,null),!a&&o&&t.createElement("div",null,t.createElement(Ms,{backgroundColor:"var(--mdhui-background-color-1)"},t.createElement(Lq,{title:az("asthma-log-entry-editor-view-symptom-level-title"),subtitle:az("asthma-log-entry-editor-view-select-one-subtitle"),values:[az("asthma-symptom-level-none"),az("asthma-symptom-level-mild"),az("asthma-symptom-level-moderate"),az("asthma-symptom-level-severe")],selectedValues:[Jq(o.symptomLevel)],preventEmptySelections:!0,onChange:e=>l(e[0])})),t.createElement(Ms,{backgroundColor:"var(--mdhui-background-color-1)"},t.createElement(Lq,{title:az("asthma-log-entry-editor-view-symptoms-title"),subtitle:az("asthma-log-entry-editor-view-select-all-subtitle"),values:[az("asthma-symptom-difficulty-breathing"),az("asthma-symptom-wheezing"),az("asthma-symptom-coughing"),az("asthma-symptom-chest-tightness")],selectedValues:tH(o.symptoms),variant:"checkboxes",multiSelect:!0,onChange:e=>c(e)})),t.createElement(Ms,{backgroundColor:"var(--mdhui-background-color-1)"},t.createElement(Lq,{title:az("asthma-log-entry-editor-view-impacts-title"),subtitle:az("asthma-log-entry-editor-view-select-all-subtitle"),values:[az("asthma-impact-waking-at-night"),az("asthma-impact-limit-daily-activity"),az("asthma-impact-using-rescue-inhaler")],selectedValues:rH(o.impacts),variant:"checkboxes",multiSelect:!0,onChange:e=>{return t=e,void s(Object.assign(Object.assign({},o),{impacts:aH(t)}));var t}})),t.createElement(Ms,{backgroundColor:"var(--mdhui-background-color-1)"},t.createElement(Lq,{title:az("asthma-log-entry-editor-view-triggers-title"),subtitle:az("asthma-log-entry-editor-view-select-all-subtitle"),values:[az("asthma-trigger-cold-illness"),az("asthma-trigger-animal-exposure"),az("asthma-trigger-seasonal-allergens"),az("asthma-trigger-smoke"),az("asthma-trigger-weather-changes"),az("asthma-trigger-air-pollution"),az("asthma-trigger-strong-smells"),az("asthma-trigger-chemicals"),az("asthma-trigger-dust"),az("asthma-trigger-mold"),az("asthma-trigger-dust-mites"),az("asthma-trigger-rodents"),az("asthma-trigger-cockroaches"),az("asthma-trigger-nsaid"),az("asthma-trigger-beta-blocker"),az("asthma-trigger-heartburn"),az("asthma-trigger-red-wine"),az("asthma-trigger-new-foods"),az("asthma-trigger-cooked-without-ventilation"),az("asthma-trigger-pet-in-bed"),az("asthma-trigger-incense-or-candle")],selectedValues:iH(o.triggers),variant:"checkboxes",multiSelect:!0,onChange:e=>{return t=e,void s(Object.assign(Object.assign({},o),{triggers:oH(t)}));var t}}))))}function yle(e){return t.createElement(Kt,{colorScheme:"light"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0},t.createElement(bz,{order:1},"Provider Report")),t.createElement(tV,{previewState:e.previewState,logEntrySurveyName:e.logEntrySurveyName}))}function ble(e){var n;const[r,a]=m();let i;return"default"===e.previewState&&(i=(e,t)=>HH(e,t,0,15)),cU((()=>{"default"!==e.previewState?NU.loadParticipant().then((e=>{a(e.getSleepDisturbancesBaseline())})):a(5)})),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0,backgroundColor:"var(--mdhui-background-color-0)"},t.createElement(bz,{order:1},az("asthma-sleep-view-title"))),t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:i,title:az("asthma-sleep-view-chart-title"),dailyDataType:mU.SleepDisturbances,highlight:e=>!!r&&!hH(r,e),emptyDomain:[0,16]}),"SleepDisturbances"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-sleep-view-alert-message"),logEntrySurveyName:e.logEntrySurveyName}))}function wle(e){return t.createElement(Kt,{colorScheme:"light",className:"mdhui-step-container",bodyBackgroundColor:"#FFFFFF"},e.children)}function xle(e){return{textAlign:e.textAlign,color:e.color,fontSize:e.fontSize?`${e.fontSize}px`:void 0,fontWeight:e.fontWeight,backgroundImage:""}}A(".mdhui-step-container {\n background-color: #FFFFFF;\n}\n\n.mdhui-step-container div,\n.mdhui-step-container dl,\n.mdhui-step-container dt,\n.mdhui-step-container dd,\n.mdhui-step-container ul,\n.mdhui-step-container ol,\n.mdhui-step-container li,\n.mdhui-step-container h1,\n.mdhui-step-container h2,\n.mdhui-step-container h3,\n.mdhui-step-container h4,\n.mdhui-step-container h5,\n.mdhui-step-container h6,\n.mdhui-step-container pre,\n.mdhui-step-container form,\n.mdhui-step-container fieldset,\n.mdhui-step-container input,\n.mdhui-step-container textarea,\n.mdhui-step-container p,\n.mdhui-step-container blockquote,\n.mdhui-step-container th,\n.mdhui-step-container td {\n margin: 0;\n padding: 0;\n}\n\n.mdhui-step-container a {\n color: var(--mdhui-color-primary);\n text-decoration: none;\n}\n\n.mdhui-step-container ol {\n list-style-type: decimal;\n white-space: normal;\n list-style-position: inside;\n}\n\n.mdhui-step-container ul {\n list-style-type: disc;\n text-align: left;\n display: block;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding-inline-start: 40px;\n white-space: normal;\n}\n\n.mdhui-step-container ul ul {\n list-style-type: circle;\n}\n\n.mdhui-step-container ul ul ul {\n list-style-type: square;\n}");A(".mdhui-step-container .mdhui-step-title {\n text-align: center;\n font-size: 1.7em;\n line-height: 1.2em;\n font-weight: normal;\n margin-top: 20px;\n margin-bottom: 15px;\n margin-left: 20px;\n margin-right: 20px; \n position: relative;\n display: block;\n}");var kle={},Sle={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},Ale=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Ele={},_le={};function Cle(e,t,n){var r,a,i,o,s,l="";for("string"!=typeof t&&(n=t,t=Cle.defaultChars),void 0===n&&(n=!0),s=function(e){var t,n,r=_le[e];if(r)return r;for(r=_le[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t];return r}(t),r=0,a=e.length;r<a;r++)if(i=e.charCodeAt(r),n&&37===i&&r+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3)))l+=e.slice(r,r+3),r+=2;else if(i<128)l+=s[i];else if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&r+1<a&&(o=e.charCodeAt(r+1))>=56320&&o<=57343){l+=encodeURIComponent(e[r]+e[r+1]),r++;continue}l+="%EF%BF%BD"}else l+=encodeURIComponent(e[r]);return l}Cle.defaultChars=";/?:@&=+$,-_.!~*'()#",Cle.componentChars="-_.!~*'()";var Ole=Cle,Tle={};function Ple(e,t){var n;return"string"!=typeof t&&(t=Ple.defaultChars),n=function(e){var t,n,r=Tle[e];if(r)return r;for(r=Tle[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),r.push(n);for(t=0;t<e.length;t++)r[n=e.charCodeAt(t)]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return r}(t),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,r,a,i,o,s,l,c="";for(t=0,r=e.length;t<r;t+=3)(a=parseInt(e.slice(t+1,t+3),16))<128?c+=n[a]:192==(224&a)&&t+3<r&&128==(192&(i=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=a<<6&1984|63&i)<128?"��":String.fromCharCode(l),t+=3):224==(240&a)&&t+6<r&&(i=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),128==(192&i)&&128==(192&o))?(c+=(l=a<<12&61440|i<<6&4032|63&o)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&a)&&t+9<r&&(i=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&i)&&128==(192&o)&&128==(192&s))?((l=a<<18&1835008|i<<12&258048|o<<6&4032|63&s)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}Ple.defaultChars=";/?:@&=+$,#",Ple.componentChars="";var Dle=Ple;function Nle(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Ile=/^([a-z0-9.+-]+:)/i,Mle=/:[0-9]*$/,jle=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Rle=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),zle=["'"].concat(Rle),Lle=["%","/","?",";","#"].concat(zle),Fle=["/","?","#"],Ble=/^[+a-z0-9A-Z_-]{0,63}$/,qle=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Hle={javascript:!0,"javascript:":!0},Ule={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};Nle.prototype.parse=function(e,t){var n,r,a,i,o,s=e;if(s=s.trim(),!t&&1===e.split("#").length){var l=jle.exec(s);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var c=Ile.exec(s);if(c&&(a=(c=c[0]).toLowerCase(),this.protocol=c,s=s.substr(c.length)),(t||c||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(o="//"===s.substr(0,2))||c&&Hle[c]||(s=s.substr(2),this.slashes=!0)),!Hle[c]&&(o||c&&!Ule[c])){var u,d,h=-1;for(n=0;n<Fle.length;n++)-1!==(i=s.indexOf(Fle[n]))&&(-1===h||i<h)&&(h=i);for(-1!==(d=-1===h?s.lastIndexOf("@"):s.lastIndexOf("@",h))&&(u=s.slice(0,d),s=s.slice(d+1),this.auth=u),h=-1,n=0;n<Lle.length;n++)-1!==(i=s.indexOf(Lle[n]))&&(-1===h||i<h)&&(h=i);-1===h&&(h=s.length),":"===s[h-1]&&h--;var m=s.slice(0,h);s=s.slice(h),this.parseHost(m),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p){var f=this.hostname.split(/\./);for(n=0,r=f.length;n<r;n++){var g=f[n];if(g&&!g.match(Ble)){for(var v="",y=0,b=g.length;y<b;y++)g.charCodeAt(y)>127?v+="x":v+=g[y];if(!v.match(Ble)){var w=f.slice(0,n),x=f.slice(n+1),k=g.match(qle);k&&(w.push(k[1]),x.unshift(k[2])),x.length&&(s=x.join(".")+s),this.hostname=w.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var S=s.indexOf("#");-1!==S&&(this.hash=s.substr(S),s=s.slice(0,S));var A=s.indexOf("?");return-1!==A&&(this.search=s.substr(A),s=s.slice(0,A)),s&&(this.pathname=s),Ule[a]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Nle.prototype.parseHost=function(e){var t=Mle.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Vle=function(e,t){if(e&&e instanceof Nle)return e;var n=new Nle;return n.parse(e,t),n};Ele.encode=Ole,Ele.decode=Dle,Ele.format=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""},Ele.parse=Vle;var Wle,Gle,$le,Zle,Yle,Kle,Xle,Qle,Jle,ece={};function tce(){return Gle?Wle:(Gle=1,Wle=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/)}function nce(){return Zle?$le:(Zle=1,$le=/[\0-\x1F\x7F-\x9F]/)}function rce(){return Qle?Xle:(Qle=1,Xle=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/)}function ace(){return Jle||(Jle=1,ece.Any=tce(),ece.Cc=nce(),ece.Cf=Kle?Yle:(Kle=1,Yle=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),ece.P=Ale,ece.Z=rce()),ece}!function(e){var t=Object.prototype.hasOwnProperty;function n(e,n){return t.call(e,n)}function r(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var i=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,o=new RegExp(i.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),s=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,l=Sle;var c=/[&<>"]/,u=/[&<>"]/g,d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function h(e){return d[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var p=Ale;e.lib={},e.lib.mdurl=Ele,e.lib.ucmicro=ace(),e.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},e.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},e.has=n,e.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(i,"$1")},e.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(o,(function(e,t,i){return t||function(e,t){var i=0;return n(l,t)?l[t]:35===t.charCodeAt(0)&&s.test(t)&&r(i="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(i):e}(e,i)}))},e.isValidEntityCode=r,e.fromCodePoint=a,e.escapeHtml=function(e){return c.test(e)?e.replace(u,h):e},e.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},e.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},e.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},e.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},e.isPunctChar=function(e){return p.test(e)},e.escapeRE=function(e){return e.replace(m,"\\$&")},e.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}}(kle);var ice={},oce=kle.unescapeAll,sce=kle.unescapeAll;ice.parseLinkLabel=function(e,t,n){var r,a,i,o,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(i=e.src.charCodeAt(e.pos))&&0===--r){a=!0;break}if(o=e.pos,e.md.inline.skipToken(e),91===i)if(o===e.pos-1)r++;else if(n)return e.pos=c,-1}return a&&(s=e.pos),e.pos=c,s},ice.parseLinkDestination=function(e,t,n){var r,a,i=t,o={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(r=e.charCodeAt(t)))return o;if(60===r)return o;if(62===r)return o.pos=t+1,o.str=oce(e.slice(i+1,t)),o.ok=!0,o;92===r&&t+1<n?t+=2:t++}return o}for(a=0;t<n&&32!==(r=e.charCodeAt(t))&&!(r<32||127===r);)if(92===r&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===r&&++a>32)return o;if(41===r){if(0===a)break;a--}t++}return i===t||0!==a||(o.str=oce(e.slice(i,t)),o.lines=0,o.pos=t,o.ok=!0),o},ice.parseLinkTitle=function(e,t,n){var r,a,i=0,o=t,s={ok:!1,pos:0,lines:0,str:""};if(t>=n)return s;if(34!==(a=e.charCodeAt(t))&&39!==a&&40!==a)return s;for(t++,40===a&&(a=41);t<n;){if((r=e.charCodeAt(t))===a)return s.pos=t+1,s.lines=i,s.str=sce(e.slice(o+1,t)),s.ok=!0,s;if(40===r&&41===a)return s;10===r?i++:92===r&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return s};var lce=kle.assign,cce=kle.unescapeAll,uce=kle.escapeHtml,dce={};function hce(){this.rules=lce({},dce)}dce.code_inline=function(e,t,n,r,a){var i=e[t];return"<code"+a.renderAttrs(i)+">"+uce(e[t].content)+"</code>"},dce.code_block=function(e,t,n,r,a){var i=e[t];return"<pre"+a.renderAttrs(i)+"><code>"+uce(e[t].content)+"</code></pre>\n"},dce.fence=function(e,t,n,r,a){var i,o,s,l,c,u=e[t],d=u.info?cce(u.info).trim():"",h="",m="";return d&&(h=(s=d.split(/(\s+)/g))[0],m=s.slice(2).join("")),0===(i=n.highlight&&n.highlight(u.content,h,m)||uce(u.content)).indexOf("<pre")?i+"\n":d?(o=u.attrIndex("class"),l=u.attrs?u.attrs.slice():[],o<0?l.push(["class",n.langPrefix+h]):(l[o]=l[o].slice(),l[o][1]+=" "+n.langPrefix+h),c={attrs:l},"<pre><code"+a.renderAttrs(c)+">"+i+"</code></pre>\n"):"<pre><code"+a.renderAttrs(u)+">"+i+"</code></pre>\n"},dce.image=function(e,t,n,r,a){var i=e[t];return i.attrs[i.attrIndex("alt")][1]=a.renderInlineAsText(i.children,n,r),a.renderToken(e,t,n)},dce.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},dce.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},dce.text=function(e,t){return uce(e[t].content)},dce.html_block=function(e,t){return e[t].content},dce.html_inline=function(e,t){return e[t].content},hce.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+uce(e.attrs[t][0])+'="'+uce(e.attrs[t][1])+'"';return r},hce.prototype.renderToken=function(e,t,n){var r,a="",i=!1,o=e[t];return o.hidden?"":(o.block&&-1!==o.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===o.nesting?"</":"<")+o.tag,a+=this.renderAttrs(o),0===o.nesting&&n.xhtmlOut&&(a+=" /"),o.block&&(i=!0,1===o.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===o.tag)&&(i=!1)),a+=i?">\n":">")},hce.prototype.renderInline=function(e,t,n){for(var r,a="",i=this.rules,o=0,s=e.length;o<s;o++)void 0!==i[r=e[o].type]?a+=i[r](e,o,t,n,this):a+=this.renderToken(e,o,t);return a},hce.prototype.renderInlineAsText=function(e,t,n){for(var r="",a=0,i=e.length;a<i;a++)"text"===e[a].type?r+=e[a].content:"image"===e[a].type?r+=this.renderInlineAsText(e[a].children,t,n):"softbreak"===e[a].type&&(r+="\n");return r},hce.prototype.render=function(e,t,n){var r,a,i,o="",s=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(i=e[r].type)?o+=this.renderInline(e[r].children,t,n):void 0!==s[i]?o+=s[e[r].type](e,r,t,n,this):o+=this.renderToken(e,r,t,n);return o};var mce=hce;function pce(){this.__rules__=[],this.__cache__=null}pce.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},pce.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},pce.prototype.at=function(e,t,n){var r=this.__find__(e),a=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=a.alt||[],this.__cache__=null},pce.prototype.before=function(e,t,n,r){var a=this.__find__(e),i=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},pce.prototype.after=function(e,t,n,r){var a=this.__find__(e),i=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},pce.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},pce.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},pce.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},pce.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},pce.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]};var fce=pce,gce=/\r\n?|\n/g,vce=/\0/g,yce=kle.arrayReplaceAt;function bce(e){return/^<a[>\s]/i.test(e)}function wce(e){return/^<\/a\s*>/i.test(e)}var xce=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,kce=/\((c|tm|r)\)/i,Sce=/\((c|tm|r)\)/gi,Ace={c:"©",r:"®",tm:"™"};function Ece(e,t){return Ace[t.toLowerCase()]}function _ce(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||r||(n.content=n.content.replace(Sce,Ece)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function Cce(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||r||xce.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}var Oce=kle.isWhiteSpace,Tce=kle.isPunctChar,Pce=kle.isMdAsciiPunct,Dce=/['"]/,Nce=/['"]/g;function Ice(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function Mce(e,t){var n,r,a,i,o,s,l,c,u,d,h,m,p,f,g,v,y,b,w,x,k;for(w=[],n=0;n<e.length;n++){for(r=e[n],l=e[n].level,y=w.length-1;y>=0&&!(w[y].level<=l);y--);if(w.length=y+1,"text"===r.type){o=0,s=(a=r.content).length;e:for(;o<s&&(Nce.lastIndex=o,i=Nce.exec(a));){if(g=v=!0,o=i.index+1,b="'"===i[0],u=32,i.index-1>=0)u=a.charCodeAt(i.index-1);else for(y=n-1;y>=0&&("softbreak"!==e[y].type&&"hardbreak"!==e[y].type);y--)if(e[y].content){u=e[y].content.charCodeAt(e[y].content.length-1);break}if(d=32,o<s)d=a.charCodeAt(o);else for(y=n+1;y<e.length&&("softbreak"!==e[y].type&&"hardbreak"!==e[y].type);y++)if(e[y].content){d=e[y].content.charCodeAt(0);break}if(h=Pce(u)||Tce(String.fromCharCode(u)),m=Pce(d)||Tce(String.fromCharCode(d)),p=Oce(u),(f=Oce(d))?g=!1:m&&(p||h||(g=!1)),p?v=!1:h&&(f||m||(v=!1)),34===d&&'"'===i[0]&&u>=48&&u<=57&&(v=g=!1),g&&v&&(g=h,v=m),g||v){if(v)for(y=w.length-1;y>=0&&(c=w[y],!(w[y].level<l));y--)if(c.single===b&&w[y].level===l){c=w[y],b?(x=t.md.options.quotes[2],k=t.md.options.quotes[3]):(x=t.md.options.quotes[0],k=t.md.options.quotes[1]),r.content=Ice(r.content,i.index,k),e[c.token].content=Ice(e[c.token].content,c.pos,x),o+=k.length-1,c.token===n&&(o+=x.length-1),s=(a=r.content).length,w.length=y;continue e}g?w.push({token:n,pos:i.index,single:b,level:l}):v&&b&&(r.content=Ice(r.content,i.index,"’"))}else b&&(r.content=Ice(r.content,i.index,"’"))}}}}function jce(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}jce.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n<r;n++)if(t[n][0]===e)return n;return-1},jce.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},jce.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},jce.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},jce.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t};var Rce=jce,zce=Rce;function Lce(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Lce.prototype.Token=zce;var Fce=Lce,Bce=fce,qce=[["normalize",function(e){var t;t=(t=e.src.replace(gce,"\n")).replace(vce,"�"),e.src=t}],["block",function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){var t,n,r,a=e.tokens;for(n=0,r=a.length;n<r;n++)"inline"===(t=a[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}],["linkify",function(e){var t,n,r,a,i,o,s,l,c,u,d,h,m,p,f,g,v,y=e.tokens;if(e.md.options.linkify)for(n=0,r=y.length;n<r;n++)if("inline"===y[n].type&&e.md.linkify.pretest(y[n].content))for(m=0,t=(a=y[n].children).length-1;t>=0;t--)if("link_close"!==(o=a[t]).type){if("html_inline"===o.type&&(bce(o.content)&&m>0&&m--,wce(o.content)&&m++),!(m>0)&&"text"===o.type&&e.md.linkify.test(o.content)){for(c=o.content,v=e.md.linkify.match(c),s=[],h=o.level,d=0,v.length>0&&0===v[0].index&&t>0&&"text_special"===a[t-1].type&&(v=v.slice(1)),l=0;l<v.length;l++)p=v[l].url,f=e.md.normalizeLink(p),e.md.validateLink(f)&&(g=v[l].text,g=v[l].schema?"mailto:"!==v[l].schema||/^mailto:/i.test(g)?e.md.normalizeLinkText(g):e.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,""),(u=v[l].index)>d&&((i=new e.Token("text","",0)).content=c.slice(d,u),i.level=h,s.push(i)),(i=new e.Token("link_open","a",1)).attrs=[["href",f]],i.level=h++,i.markup="linkify",i.info="auto",s.push(i),(i=new e.Token("text","",0)).content=g,i.level=h,s.push(i),(i=new e.Token("link_close","a",-1)).level=--h,i.markup="linkify",i.info="auto",s.push(i),d=v[l].lastIndex);d<c.length&&((i=new e.Token("text","",0)).content=c.slice(d),i.level=h,s.push(i)),y[n].children=a=yce(a,t,s)}}else for(t--;a[t].level!==o.level&&"link_open"!==a[t].type;)t--}],["replacements",function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(kce.test(e.tokens[t].content)&&_ce(e.tokens[t].children),xce.test(e.tokens[t].content)&&Cce(e.tokens[t].children))}],["smartquotes",function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&Dce.test(e.tokens[t].content)&&Mce(e.tokens[t].children,e)}],["text_join",function(e){var t,n,r,a,i,o,s=e.tokens;for(t=0,n=s.length;t<n;t++)if("inline"===s[t].type){for(i=(r=s[t].children).length,a=0;a<i;a++)"text_special"===r[a].type&&(r[a].type="text");for(a=o=0;a<i;a++)"text"===r[a].type&&a+1<i&&"text"===r[a+1].type?r[a+1].content=r[a].content+r[a+1].content:(a!==o&&(r[o]=r[a]),o++);a!==o&&(r.length=o)}}]];function Hce(){this.ruler=new Bce;for(var e=0;e<qce.length;e++)this.ruler.push(qce[e][0],qce[e][1])}Hce.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},Hce.prototype.State=Fce;var Uce=Hce,Vce=kle.isSpace;function Wce(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Gce(e){var t,n=[],r=0,a=e.length,i=!1,o=0,s="";for(t=e.charCodeAt(r);r<a;)124===t&&(i?(s+=e.substring(o,r-1),o=r):(n.push(s+e.substring(o,r)),s="",o=r+1)),i=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(o)),n}var $ce=kle.isSpace,Zce=kle.isSpace,Yce=kle.isSpace;function Kce(e,t){var n,r,a,i;return r=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],42!==(n=e.src.charCodeAt(r++))&&45!==n&&43!==n||r<a&&(i=e.src.charCodeAt(r),!Yce(i))?-1:r}function Xce(e,t){var n,r=e.bMarks[t]+e.tShift[t],a=r,i=e.eMarks[t];if(a+1>=i)return-1;if((n=e.src.charCodeAt(a++))<48||n>57)return-1;for(;;){if(a>=i)return-1;if(!((n=e.src.charCodeAt(a++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(a-r>=10)return-1}return a<i&&(n=e.src.charCodeAt(a),!Yce(n))?-1:a}var Qce=kle.normalizeReference,Jce=kle.isSpace,eue={},tue="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",nue="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",rue=new RegExp("^(?:"+tue+"|"+nue+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),aue=new RegExp("^(?:"+tue+"|"+nue+")");eue.HTML_TAG_RE=rue,eue.HTML_OPEN_CLOSE_TAG_RE=aue;var iue=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],oue=eue.HTML_OPEN_CLOSE_TAG_RE,sue=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+iue.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(oue.source+"\\s*$"),/^$/,!1]],lue=kle.isSpace,cue=Rce,uue=kle.isSpace;function due(e,t,n,r){var a,i,o,s,l,c,u,d;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",d=!1,o=s=c=u=0,l=(i=this.src).length;s<l;s++){if(a=i.charCodeAt(s),!d){if(uue(a)){c++,9===a?u+=4-u%4:u++;continue}d=!0}10!==a&&s!==l-1||(10!==a&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(c),this.sCount.push(u),this.bsCount.push(0),d=!1,c=0,u=0,o=s+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}due.prototype.push=function(e,t,n){var r=new cue(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},due.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},due.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},due.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),uue(t));e++);return e},due.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!uue(this.src.charCodeAt(--e)))return e+1;return e},due.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},due.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},due.prototype.getLines=function(e,t,n,r){var a,i,o,s,l,c,u,d=e;if(e>=t)return"";for(c=new Array(t-e),a=0;d<t;d++,a++){for(i=0,u=s=this.bMarks[d],l=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];s<l&&i<n;){if(o=this.src.charCodeAt(s),uue(o))9===o?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(s-u<this.tShift[d]))break;i++}s++}c[a]=i>n?new Array(i-n+1).join(" ")+this.src.slice(s,l):this.src.slice(s,l)}return c.join("")},due.prototype.Token=cue;var hue=due,mue=fce,pue=[["table",function(e,t,n,r){var a,i,o,s,l,c,u,d,h,m,p,f,g,v,y,b,w,x;if(t+2>n)return!1;if(c=t+1,e.sCount[c]<e.blkIndent)return!1;if(e.sCount[c]-e.blkIndent>=4)return!1;if((o=e.bMarks[c]+e.tShift[c])>=e.eMarks[c])return!1;if(124!==(w=e.src.charCodeAt(o++))&&45!==w&&58!==w)return!1;if(o>=e.eMarks[c])return!1;if(124!==(x=e.src.charCodeAt(o++))&&45!==x&&58!==x&&!Vce(x))return!1;if(45===w&&Vce(x))return!1;for(;o<e.eMarks[c];){if(124!==(a=e.src.charCodeAt(o))&&45!==a&&58!==a&&!Vce(a))return!1;o++}for(u=(i=Wce(e,t+1)).split("|"),m=[],s=0;s<u.length;s++){if(!(p=u[s].trim())){if(0===s||s===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(p))return!1;58===p.charCodeAt(p.length-1)?m.push(58===p.charCodeAt(0)?"center":"right"):58===p.charCodeAt(0)?m.push("left"):m.push("")}if(-1===(i=Wce(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((u=Gce(i)).length&&""===u[0]&&u.shift(),u.length&&""===u[u.length-1]&&u.pop(),0===(d=u.length)||d!==m.length)return!1;if(r)return!0;for(v=e.parentType,e.parentType="table",b=e.md.block.ruler.getRules("blockquote"),(h=e.push("table_open","table",1)).map=f=[t,0],(h=e.push("thead_open","thead",1)).map=[t,t+1],(h=e.push("tr_open","tr",1)).map=[t,t+1],s=0;s<u.length;s++)h=e.push("th_open","th",1),m[s]&&(h.attrs=[["style","text-align:"+m[s]]]),(h=e.push("inline","",0)).content=u[s].trim(),h.children=[],h=e.push("th_close","th",-1);for(h=e.push("tr_close","tr",-1),h=e.push("thead_close","thead",-1),c=t+2;c<n&&!(e.sCount[c]<e.blkIndent);c++){for(y=!1,s=0,l=b.length;s<l;s++)if(b[s](e,c,n,!0)){y=!0;break}if(y)break;if(!(i=Wce(e,c).trim()))break;if(e.sCount[c]-e.blkIndent>=4)break;for((u=Gce(i)).length&&""===u[0]&&u.shift(),u.length&&""===u[u.length-1]&&u.pop(),c===t+2&&((h=e.push("tbody_open","tbody",1)).map=g=[t+2,0]),(h=e.push("tr_open","tr",1)).map=[c,c+1],s=0;s<d;s++)h=e.push("td_open","td",1),m[s]&&(h.attrs=[["style","text-align:"+m[s]]]),(h=e.push("inline","",0)).content=u[s]?u[s].trim():"",h.children=[],h=e.push("td_close","td",-1);h=e.push("tr_close","tr",-1)}return g&&(h=e.push("tbody_close","tbody",-1),g[1]=c),h=e.push("table_close","table",-1),f[1]=c,e.parentType=v,e.line=c,!0},["paragraph","reference"]],["code",function(e,t,n){var r,a,i;if(e.sCount[t]-e.blkIndent<4)return!1;for(a=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;a=++r}return e.line=a,(i=e.push("code_block","code",0)).content=e.getLines(t,a,4+e.blkIndent,!1)+"\n",i.map=[t,e.line],!0}],["fence",function(e,t,n,r){var a,i,o,s,l,c,u,d=!1,h=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(h+3>m)return!1;if(126!==(a=e.src.charCodeAt(h))&&96!==a)return!1;if(l=h,(i=(h=e.skipChars(h,a))-l)<3)return!1;if(u=e.src.slice(l,h),o=e.src.slice(h,m),96===a&&o.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((h=l=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(h)===a&&!(e.sCount[s]-e.blkIndent>=4||(h=e.skipChars(h,a))-l<i||(h=e.skipSpaces(h))<m)){d=!0;break}return i=e.sCount[t],e.line=s+(d?1:0),(c=e.push("fence","code",0)).info=o,c.content=e.getLines(t+1,s,i,!0),c.markup=u,c.map=[t,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(e,t,n,r){var a,i,o,s,l,c,u,d,h,m,p,f,g,v,y,b,w,x,k,S,A=e.lineMax,E=e.bMarks[t]+e.tShift[t],_=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(E++))return!1;if(r)return!0;for(s=h=e.sCount[t]+1,32===e.src.charCodeAt(E)?(E++,s++,h++,a=!1,b=!0):9===e.src.charCodeAt(E)?(b=!0,(e.bsCount[t]+h)%4==3?(E++,s++,h++,a=!1):a=!0):b=!1,m=[e.bMarks[t]],e.bMarks[t]=E;E<_&&(i=e.src.charCodeAt(E),$ce(i));)9===i?h+=4-(h+e.bsCount[t]+(a?1:0))%4:h++,E++;for(p=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(b?1:0),c=E>=_,v=[e.sCount[t]],e.sCount[t]=h-s,y=[e.tShift[t]],e.tShift[t]=E-e.bMarks[t],x=e.md.block.ruler.getRules("blockquote"),g=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(S=e.sCount[d]<e.blkIndent,!((E=e.bMarks[d]+e.tShift[d])>=(_=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(E++)||S){if(c)break;for(w=!1,o=0,l=x.length;o<l;o++)if(x[o](e,d,n,!0)){w=!0;break}if(w){e.lineMax=d,0!==e.blkIndent&&(m.push(e.bMarks[d]),p.push(e.bsCount[d]),y.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}m.push(e.bMarks[d]),p.push(e.bsCount[d]),y.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]=-1}else{for(s=h=e.sCount[d]+1,32===e.src.charCodeAt(E)?(E++,s++,h++,a=!1,b=!0):9===e.src.charCodeAt(E)?(b=!0,(e.bsCount[d]+h)%4==3?(E++,s++,h++,a=!1):a=!0):b=!1,m.push(e.bMarks[d]),e.bMarks[d]=E;E<_&&(i=e.src.charCodeAt(E),$ce(i));)9===i?h+=4-(h+e.bsCount[d]+(a?1:0))%4:h++,E++;c=E>=_,p.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(b?1:0),v.push(e.sCount[d]),e.sCount[d]=h-s,y.push(e.tShift[d]),e.tShift[d]=E-e.bMarks[d]}for(f=e.blkIndent,e.blkIndent=0,(k=e.push("blockquote_open","blockquote",1)).markup=">",k.map=u=[t,0],e.md.block.tokenize(e,t,d),(k=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=A,e.parentType=g,u[1]=e.line,o=0;o<y.length;o++)e.bMarks[o+t]=m[o],e.tShift[o+t]=y[o],e.sCount[o+t]=v[o],e.bsCount[o+t]=p[o];return e.blkIndent=f,!0},["paragraph","reference","blockquote","list"]],["hr",function(e,t,n,r){var a,i,o,s,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(a=e.src.charCodeAt(l++))&&45!==a&&95!==a)return!1;for(i=1;l<c;){if((o=e.src.charCodeAt(l++))!==a&&!Zce(o))return!1;o===a&&i++}return!(i<3)&&(r||(e.line=t+1,(s=e.push("hr","hr",0)).map=[t,e.line],s.markup=Array(i+1).join(String.fromCharCode(a))),!0)},["paragraph","reference","blockquote","list"]],["list",function(e,t,n,r){var a,i,o,s,l,c,u,d,h,m,p,f,g,v,y,b,w,x,k,S,A,E,_,C,O,T,P,D,N=!1,I=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(N=!0),(_=Xce(e,t))>=0){if(u=!0,O=e.bMarks[t]+e.tShift[t],g=Number(e.src.slice(O,_-1)),N&&1!==g)return!1}else{if(!((_=Kce(e,t))>=0))return!1;u=!1}if(N&&e.skipSpaces(_)>=e.eMarks[t])return!1;if(f=e.src.charCodeAt(_-1),r)return!0;for(p=e.tokens.length,u?(D=e.push("ordered_list_open","ol",1),1!==g&&(D.attrs=[["start",g]])):D=e.push("bullet_list_open","ul",1),D.map=m=[t,0],D.markup=String.fromCharCode(f),y=t,C=!1,P=e.md.block.ruler.getRules("list"),x=e.parentType,e.parentType="list";y<n;){for(E=_,v=e.eMarks[y],c=b=e.sCount[y]+_-(e.bMarks[t]+e.tShift[t]);E<v;){if(9===(a=e.src.charCodeAt(E)))b+=4-(b+e.bsCount[y])%4;else{if(32!==a)break;b++}E++}if((l=(i=E)>=v?1:b-c)>4&&(l=1),s=c+l,(D=e.push("list_item_open","li",1)).markup=String.fromCharCode(f),D.map=d=[t,0],u&&(D.info=e.src.slice(O,_-1)),A=e.tight,S=e.tShift[t],k=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=s,e.tight=!0,e.tShift[t]=i-e.bMarks[t],e.sCount[t]=b,i>=v&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!C||(I=!1),C=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=S,e.sCount[t]=k,e.tight=A,(D=e.push("list_item_close","li",-1)).markup=String.fromCharCode(f),y=t=e.line,d[1]=y,i=e.bMarks[t],y>=n)break;if(e.sCount[y]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(T=!1,o=0,h=P.length;o<h;o++)if(P[o](e,y,n,!0)){T=!0;break}if(T)break;if(u){if((_=Xce(e,y))<0)break;O=e.bMarks[y]+e.tShift[y]}else if((_=Kce(e,y))<0)break;if(f!==e.src.charCodeAt(_-1))break}return(D=u?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(f),m[1]=y,e.line=y,e.parentType=x,I&&function(e,t){var n,r,a=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===a&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,p),!0},["paragraph","reference","blockquote"]],["reference",function(e,t,n,r){var a,i,o,s,l,c,u,d,h,m,p,f,g,v,y,b,w=0,x=e.bMarks[t]+e.tShift[t],k=e.eMarks[t],S=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(x))return!1;for(;++x<k;)if(93===e.src.charCodeAt(x)&&92!==e.src.charCodeAt(x-1)){if(x+1===k)return!1;if(58!==e.src.charCodeAt(x+1))return!1;break}for(s=e.lineMax,y=e.md.block.ruler.getRules("reference"),m=e.parentType,e.parentType="reference";S<s&&!e.isEmpty(S);S++)if(!(e.sCount[S]-e.blkIndent>3||e.sCount[S]<0)){for(v=!1,c=0,u=y.length;c<u;c++)if(y[c](e,S,s,!0)){v=!0;break}if(v)break}for(k=(g=e.getLines(t,S,e.blkIndent,!1).trim()).length,x=1;x<k;x++){if(91===(a=g.charCodeAt(x)))return!1;if(93===a){h=x;break}(10===a||92===a&&++x<k&&10===g.charCodeAt(x))&&w++}if(h<0||58!==g.charCodeAt(h+1))return!1;for(x=h+2;x<k;x++)if(10===(a=g.charCodeAt(x)))w++;else if(!Jce(a))break;if(!(p=e.md.helpers.parseLinkDestination(g,x,k)).ok)return!1;if(l=e.md.normalizeLink(p.str),!e.md.validateLink(l))return!1;for(i=x=p.pos,o=w+=p.lines,f=x;x<k;x++)if(10===(a=g.charCodeAt(x)))w++;else if(!Jce(a))break;for(p=e.md.helpers.parseLinkTitle(g,x,k),x<k&&f!==x&&p.ok?(b=p.str,x=p.pos,w+=p.lines):(b="",x=i,w=o);x<k&&(a=g.charCodeAt(x),Jce(a));)x++;if(x<k&&10!==g.charCodeAt(x)&&b)for(b="",x=i,w=o;x<k&&(a=g.charCodeAt(x),Jce(a));)x++;return!(x<k&&10!==g.charCodeAt(x))&&(!!(d=Qce(g.slice(1,h)))&&(r||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[d]&&(e.env.references[d]={title:b,href:l}),e.parentType=m,e.line=t+w+1),!0))}],["html_block",function(e,t,n,r){var a,i,o,s,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(s=e.src.slice(l,c),a=0;a<sue.length&&!sue[a][0].test(s);a++);if(a===sue.length)return!1;if(r)return sue[a][2];if(i=t+1,!sue[a][1].test(s))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(l=e.bMarks[i]+e.tShift[i],c=e.eMarks[i],s=e.src.slice(l,c),sue[a][1].test(s)){0!==s.length&&i++;break}return e.line=i,(o=e.push("html_block","",0)).map=[t,i],o.content=e.getLines(t,i,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,t,n,r){var a,i,o,s,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(a=e.src.charCodeAt(l))||l>=c)return!1;for(i=1,a=e.src.charCodeAt(++l);35===a&&l<c&&i<=6;)i++,a=e.src.charCodeAt(++l);return!(i>6||l<c&&!lue(a))&&(r||(c=e.skipSpacesBack(c,l),(o=e.skipCharsBack(c,35,l))>l&&lue(e.src.charCodeAt(o-1))&&(c=o),e.line=t+1,(s=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),s.map=[t,e.line],(s=e.push("inline","",0)).content=e.src.slice(l,c).trim(),s.map=[t,e.line],s.children=[],(s=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i)),!0)},["paragraph","reference","blockquote"]],["lheading",function(e,t,n){var r,a,i,o,s,l,c,u,d,h,m=t+1,p=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(h=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(d=e.src.charCodeAt(l))||61===d)&&(l=e.skipChars(l,d),(l=e.skipSpaces(l))>=c)){u=61===d?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,i=0,o=p.length;i<o;i++)if(p[i](e,m,n,!0)){a=!0;break}if(a)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(s=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(d),s.map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(d),e.parentType=h,!0)}],["paragraph",function(e,t){var n,r,a,i,o,s,l=t+1,c=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<u&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(r=!1,a=0,i=c.length;a<i;a++)if(c[a](e,l,u,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(o=e.push("paragraph_open","p",1)).map=[t,e.line],(o=e.push("inline","",0)).content=n,o.map=[t,e.line],o.children=[],o=e.push("paragraph_close","p",-1),e.parentType=s,!0}]];function fue(){this.ruler=new mue;for(var e=0;e<pue.length;e++)this.ruler.push(pue[e][0],pue[e][1],{alt:(pue[e][2]||[]).slice()})}fue.prototype.tokenize=function(e,t,n){for(var r,a=this.ruler.getRules(""),i=a.length,o=t,s=!1,l=e.md.options.maxNesting;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n))&&!(e.sCount[o]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<i&&!a[r](e,o,n,!1);r++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(o=e.line)<n&&e.isEmpty(o)&&(s=!0,o++,e.line=o)}},fue.prototype.parse=function(e,t,n,r){var a;e&&(a=new this.State(e,t,n,r),this.tokenize(a,a.line,a.lineMax))},fue.prototype.State=hue;var gue=fue;function vue(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}for(var yue=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,bue=kle.isSpace,wue=kle.isSpace,xue=[],kue=0;kue<256;kue++)xue.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){xue[e.charCodeAt(0)]=1}));var Sue={};function Aue(e,t){var n,r,a,i,o,s=[],l=t.length;for(n=0;n<l;n++)126===(a=t[n]).marker&&-1!==a.end&&(i=t[a.end],(o=e.tokens[a.token]).type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",(o=e.tokens[i.token]).type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[i.token-1].type&&"~"===e.tokens[i.token-1].content&&s.push(i.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(o=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=o)}}Sue.tokenize=function(e,t){var n,r,a,i,o=e.pos,s=e.src.charCodeAt(o);if(t)return!1;if(126!==s)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,i=String.fromCharCode(s),a<2)return!1;for(a%2&&(e.push("text","",0).content=i,a--),n=0;n<a;n+=2)e.push("text","",0).content=i+i,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},Sue.postProcess=function(e){var t,n=e.tokens_meta,r=e.tokens_meta.length;for(Aue(e,e.delimiters),t=0;t<r;t++)n[t]&&n[t].delimiters&&Aue(e,n[t].delimiters)};var Eue={};function _ue(e,t){var n,r,a,i,o,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===a.token+1,o=String.fromCharCode(r.marker),(i=e.tokens[r.token]).type=s?"strong_open":"em_open",i.tag=s?"strong":"em",i.nesting=1,i.markup=s?o+o:o,i.content="",(i=e.tokens[a.token]).type=s?"strong_close":"em_close",i.tag=s?"strong":"em",i.nesting=-1,i.markup=s?o+o:o,i.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}Eue.tokenize=function(e,t){var n,r,a=e.pos,i=e.src.charCodeAt(a);if(t)return!1;if(95!==i&&42!==i)return!1;for(r=e.scanDelims(e.pos,42===i),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(i),e.delimiters.push({marker:i,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},Eue.postProcess=function(e){var t,n=e.tokens_meta,r=e.tokens_meta.length;for(_ue(e,e.delimiters),t=0;t<r;t++)n[t]&&n[t].delimiters&&_ue(e,n[t].delimiters)};var Cue=kle.normalizeReference,Oue=kle.isSpace,Tue=kle.normalizeReference,Pue=kle.isSpace,Due=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Nue=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,Iue=eue.HTML_TAG_RE;var Mue=Sle,jue=kle.has,Rue=kle.isValidEntityCode,zue=kle.fromCodePoint,Lue=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Fue=/^&([a-z][a-z0-9]{1,31});/i;function Bue(e,t){var n,r,a,i,o,s,l,c,u={},d=t.length;if(d){var h=0,m=-2,p=[];for(n=0;n<d;n++)if(a=t[n],p.push(0),t[h].marker===a.marker&&m===a.token-1||(h=n),m=a.token,a.length=a.length||0,a.close){for(u.hasOwnProperty(a.marker)||(u[a.marker]=[-1,-1,-1,-1,-1,-1]),o=u[a.marker][(a.open?3:0)+a.length%3],s=r=h-p[h]-1;r>o;r-=p[r]+1)if((i=t[r]).marker===a.marker&&i.open&&i.end<0&&(l=!1,(i.close||a.open)&&(i.length+a.length)%3==0&&(i.length%3==0&&a.length%3==0||(l=!0)),!l)){c=r>0&&!t[r-1].open?p[r-1]+1:0,p[n]=n-r+c,p[r]=c,a.open=!1,i.end=n,i.close=!1,s=-1,m=-2;break}-1!==s&&(u[a.marker][(a.open?3:0)+(a.length||0)%3]=s)}}}var que=Rce,Hue=kle.isWhiteSpace,Uue=kle.isPunctChar,Vue=kle.isMdAsciiPunct;function Wue(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Wue.prototype.pushPending=function(){var e=new que("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Wue.prototype.push=function(e,t,n){this.pending&&this.pushPending();var r=new que(e,t,n),a=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],a={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(a),r},Wue.prototype.scanDelims=function(e,t){var n,r,a,i,o,s,l,c,u,d=e,h=!0,m=!0,p=this.posMax,f=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;d<p&&this.src.charCodeAt(d)===f;)d++;return a=d-e,r=d<p?this.src.charCodeAt(d):32,l=Vue(n)||Uue(String.fromCharCode(n)),u=Vue(r)||Uue(String.fromCharCode(r)),s=Hue(n),(c=Hue(r))?h=!1:u&&(s||l||(h=!1)),s?m=!1:l&&(c||u||(m=!1)),t?(i=h,o=m):(i=h&&(!m||l),o=m&&(!h||u)),{can_open:i,can_close:o,length:a}},Wue.prototype.Token=que;var Gue=Wue,$ue=fce,Zue=[["text",function(e,t){for(var n=e.pos;n<e.posMax&&!vue(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}],["linkify",function(e,t){var n,r,a,i,o,s,l;return!!e.md.options.linkify&&(!(e.linkLevel>0)&&(!((n=e.pos)+3>e.posMax)&&(58===e.src.charCodeAt(n)&&(47===e.src.charCodeAt(n+1)&&(47===e.src.charCodeAt(n+2)&&(!!(r=e.pending.match(yue))&&(a=r[1],!!(i=e.md.linkify.matchAtStart(e.src.slice(n-a.length)))&&(o=(o=i.url).replace(/\*+$/,""),s=e.md.normalizeLink(o),!!e.md.validateLink(s)&&(t||(e.pending=e.pending.slice(0,-a.length),(l=e.push("link_open","a",1)).attrs=[["href",s]],l.markup="linkify",l.info="auto",(l=e.push("text","",0)).content=e.md.normalizeLinkText(o),(l=e.push("link_close","a",-1)).markup="linkify",l.info="auto"),e.pos+=o.length-a.length,!0)))))))))}],["newline",function(e,t){var n,r,a,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;if(n=e.pending.length-1,r=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(a=n-1;a>=1&&32===e.pending.charCodeAt(a-1);)a--;e.pending=e.pending.slice(0,a),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(i++;i<r&&bue(e.src.charCodeAt(i));)i++;return e.pos=i,!0}],["escape",function(e,t){var n,r,a,i,o,s=e.pos,l=e.posMax;if(92!==e.src.charCodeAt(s))return!1;if(++s>=l)return!1;if(10===(n=e.src.charCodeAt(s))){for(t||e.push("hardbreak","br",0),s++;s<l&&(n=e.src.charCodeAt(s),wue(n));)s++;return e.pos=s,!0}return i=e.src[s],n>=55296&&n<=56319&&s+1<l&&(r=e.src.charCodeAt(s+1))>=56320&&r<=57343&&(i+=e.src[s+1],s++),a="\\"+i,t||(o=e.push("text_special","",0),n<256&&0!==xue[n]?o.content=i:o.content=a,o.markup=a,o.info="escape"),e.pos=s+1,!0}],["backticks",function(e,t){var n,r,a,i,o,s,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;if(l=(a=e.src.slice(n,u)).length,e.backticksScanned&&(e.backticks[l]||0)<=n)return t||(e.pending+=a),e.pos+=l,!0;for(o=s=u;-1!==(o=e.src.indexOf("`",s));){for(s=o+1;s<r&&96===e.src.charCodeAt(s);)s++;if((c=s-o)===l)return t||((i=e.push("code_inline","code",0)).markup=a,i.content=e.src.slice(u,o).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[c]=o}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=l,!0}],["strikethrough",Sue.tokenize],["emphasis",Eue.tokenize],["link",function(e,t){var n,r,a,i,o,s,l,c,u="",d="",h=e.pos,m=e.posMax,p=e.pos,f=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(o=e.pos+1,(i=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((s=i+1)<m&&40===e.src.charCodeAt(s)){for(f=!1,s++;s<m&&(r=e.src.charCodeAt(s),Oue(r)||10===r);s++);if(s>=m)return!1;if(p=s,(l=e.md.helpers.parseLinkDestination(e.src,s,e.posMax)).ok){for(u=e.md.normalizeLink(l.str),e.md.validateLink(u)?s=l.pos:u="",p=s;s<m&&(r=e.src.charCodeAt(s),Oue(r)||10===r);s++);if(l=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<m&&p!==s&&l.ok)for(d=l.str,s=l.pos;s<m&&(r=e.src.charCodeAt(s),Oue(r)||10===r);s++);}(s>=m||41!==e.src.charCodeAt(s))&&(f=!0),s++}if(f){if(void 0===e.env.references)return!1;if(s<m&&91===e.src.charCodeAt(s)?(p=s+1,(s=e.md.helpers.parseLinkLabel(e,s))>=0?a=e.src.slice(p,s++):s=i+1):s=i+1,a||(a=e.src.slice(o,i)),!(c=e.env.references[Cue(a)]))return e.pos=h,!1;u=c.href,d=c.title}return t||(e.pos=o,e.posMax=i,e.push("link_open","a",1).attrs=n=[["href",u]],d&&n.push(["title",d]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)),e.pos=s,e.posMax=m,!0}],["image",function(e,t){var n,r,a,i,o,s,l,c,u,d,h,m,p,f="",g=e.pos,v=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(s=e.pos+2,(o=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((l=o+1)<v&&40===e.src.charCodeAt(l)){for(l++;l<v&&(r=e.src.charCodeAt(l),Pue(r)||10===r);l++);if(l>=v)return!1;for(p=l,(u=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok&&(f=e.md.normalizeLink(u.str),e.md.validateLink(f)?l=u.pos:f=""),p=l;l<v&&(r=e.src.charCodeAt(l),Pue(r)||10===r);l++);if(u=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<v&&p!==l&&u.ok)for(d=u.str,l=u.pos;l<v&&(r=e.src.charCodeAt(l),Pue(r)||10===r);l++);else d="";if(l>=v||41!==e.src.charCodeAt(l))return e.pos=g,!1;l++}else{if(void 0===e.env.references)return!1;if(l<v&&91===e.src.charCodeAt(l)?(p=l+1,(l=e.md.helpers.parseLinkLabel(e,l))>=0?i=e.src.slice(p,l++):l=o+1):l=o+1,i||(i=e.src.slice(s,o)),!(c=e.env.references[Tue(i)]))return e.pos=g,!1;f=c.href,d=c.title}return t||(a=e.src.slice(s,o),e.md.inline.parse(a,e.md,e.env,m=[]),(h=e.push("image","img",0)).attrs=n=[["src",f],["alt",""]],h.children=m,h.content=a,d&&n.push(["title",d])),e.pos=l,e.posMax=v,!0}],["autolink",function(e,t){var n,r,a,i,o,s,l=e.pos;if(60!==e.src.charCodeAt(l))return!1;for(o=e.pos,s=e.posMax;;){if(++l>=s)return!1;if(60===(i=e.src.charCodeAt(l)))return!1;if(62===i)break}return n=e.src.slice(o+1,l),Nue.test(n)?(r=e.md.normalizeLink(n),!!e.md.validateLink(r)&&(t||((a=e.push("link_open","a",1)).attrs=[["href",r]],a.markup="autolink",a.info="auto",(a=e.push("text","",0)).content=e.md.normalizeLinkText(n),(a=e.push("link_close","a",-1)).markup="autolink",a.info="auto"),e.pos+=n.length+2,!0)):!!Due.test(n)&&(r=e.md.normalizeLink("mailto:"+n),!!e.md.validateLink(r)&&(t||((a=e.push("link_open","a",1)).attrs=[["href",r]],a.markup="autolink",a.info="auto",(a=e.push("text","",0)).content=e.md.normalizeLinkText(n),(a=e.push("link_close","a",-1)).markup="autolink",a.info="auto"),e.pos+=n.length+2,!0))}],["html_inline",function(e,t){var n,r,a,i,o=e.pos;return!!e.md.options.html&&(a=e.posMax,!(60!==e.src.charCodeAt(o)||o+2>=a)&&(!(33!==(n=e.src.charCodeAt(o+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(r=e.src.slice(o).match(Iue))&&(t||((i=e.push("html_inline","",0)).content=e.src.slice(o,o+r[0].length),function(e){return/^<a[>\s]/i.test(e)}(i.content)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(i.content)&&e.linkLevel--),e.pos+=r[0].length,!0))))}],["entity",function(e,t){var n,r,a,i=e.pos,o=e.posMax;if(38!==e.src.charCodeAt(i))return!1;if(i+1>=o)return!1;if(35===e.src.charCodeAt(i+1)){if(r=e.src.slice(i).match(Lue))return t||(n="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),(a=e.push("text_special","",0)).content=Rue(n)?zue(n):zue(65533),a.markup=r[0],a.info="entity"),e.pos+=r[0].length,!0}else if((r=e.src.slice(i).match(Fue))&&jue(Mue,r[1]))return t||((a=e.push("text_special","",0)).content=Mue[r[1]],a.markup=r[0],a.info="entity"),e.pos+=r[0].length,!0;return!1}]],Yue=[["balance_pairs",function(e){var t,n=e.tokens_meta,r=e.tokens_meta.length;for(Bue(0,e.delimiters),t=0;t<r;t++)n[t]&&n[t].delimiters&&Bue(0,n[t].delimiters)}],["strikethrough",Sue.postProcess],["emphasis",Eue.postProcess],["fragments_join",function(e){var t,n,r=0,a=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)a[t].nesting<0&&r--,a[t].level=r,a[t].nesting>0&&r++,"text"===a[t].type&&t+1<i&&"text"===a[t+1].type?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}]];function Kue(){var e;for(this.ruler=new $ue,e=0;e<Zue.length;e++)this.ruler.push(Zue[e][0],Zue[e][1]);for(this.ruler2=new $ue,e=0;e<Yue.length;e++)this.ruler2.push(Yue[e][0],Yue[e][1])}Kue.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),i=a.length,o=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<o)for(n=0;n<i&&(e.level++,t=a[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},Kue.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),a=r.length,i=e.posMax,o=e.md.options.maxNesting;e.pos<i;){if(e.level<o)for(n=0;n<a&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=i)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Kue.prototype.parse=function(e,t,n,r){var a,i,o,s=new this.State(e,t,n,r);for(this.tokenize(s),o=(i=this.ruler2.getRules("")).length,a=0;a<o;a++)i[a](s)},Kue.prototype.State=Gue;var Xue,Que,Jue=Kue;function ede(){return Que?Xue:(Que=1,Xue=function(e){var t={};e=e||{},t.src_Any=tce().source,t.src_Cc=nce().source,t.src_Z=rce().source,t.src_P=Ale.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var n="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t})}function tde(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function nde(e){return Object.prototype.toString.call(e)}function rde(e){return"[object Function]"===nde(e)}function ade(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var ide={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var ode={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},sde="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",lde="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function cde(e){var t=e.re=ede()(e.__opts__),n=e.__tlds__.slice();function r(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push(sde),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");var a=[];function i(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,function(e){return"[object Object]"===nde(e)}(n))return!function(e){return"[object RegExp]"===nde(e)}(n.validate)?rde(n.validate)?r.validate=n.validate:i(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(rde(n.normalize)?r.normalize=n.normalize:n.normalize?i(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===nde(e)}(n)?i(t,n):a.push(t)}})),a.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var o=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(ade).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function ude(e,t){var n=e.__index__,r=e.__last_index__,a=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=a,this.text=a,this.url=a}function dde(e,t){var n=new ude(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function hde(e,t){if(!(this instanceof hde))return new hde(e,t);t||function(e){return Object.keys(e||{}).reduce((function(e,t){return e||ide.hasOwnProperty(t)}),!1)}(e)&&(t=e,e={}),this.__opts__=tde({},ide,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=tde({},ode,e),this.__compiled__={},this.__tlds__=lde,this.__tlds_replaced__=!1,this.re={},cde(this)}hde.prototype.add=function(e,t){return this.__schemas__[e]=t,cde(this),this},hde.prototype.set=function(e){return this.__opts__=tde(this.__opts__,e),this},hde.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,a,i,o,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(a=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,o=r.index+r[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=o)),this.__index__>=0},hde.prototype.pretest=function(e){return this.re.pretest.test(e)},hde.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},hde.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(dde(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(dde(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},hde.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var t=this.re.schema_at_start.exec(e);if(!t)return null;var n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,dde(this,0)):null},hde.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),cde(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,cde(this),this)},hde.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},hde.prototype.onCompile=function(){};var mde=kle,pde=ice,fde=mce,gde=Uce,vde=gue,yde=Jue,bde=hde,wde=Ele,xde=S,kde={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Sde=/^(vbscript|javascript|file|data):/,Ade=/^data:image\/(gif|png|jpeg|webp);/;function Ede(e){var t=e.trim().toLowerCase();return!Sde.test(t)||!!Ade.test(t)}var _de=["http:","https:","mailto:"];function Cde(e){var t=wde.parse(e,!0);if(t.hostname&&(!t.protocol||_de.indexOf(t.protocol)>=0))try{t.hostname=xde.toASCII(t.hostname)}catch(e){}return wde.encode(wde.format(t))}function Ode(e){var t=wde.parse(e,!0);if(t.hostname&&(!t.protocol||_de.indexOf(t.protocol)>=0))try{t.hostname=xde.toUnicode(t.hostname)}catch(e){}return wde.decode(wde.format(t),wde.decode.defaultChars+"%")}function Tde(e,t){if(!(this instanceof Tde))return new Tde(e,t);t||mde.isString(e)||(t=e||{},e="default"),this.inline=new yde,this.block=new vde,this.core=new gde,this.renderer=new fde,this.linkify=new bde,this.validateLink=Ede,this.normalizeLink=Cde,this.normalizeLinkText=Ode,this.utils=mde,this.helpers=mde.assign({},pde),this.options={},this.configure(e),t&&this.set(t)}Tde.prototype.set=function(e){return mde.assign(this.options,e),this},Tde.prototype.configure=function(e){var t,n=this;if(mde.isString(e)&&!(e=kde[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},Tde.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},Tde.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},Tde.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Tde.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Tde.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Tde.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Tde.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Pde=C(Tde);function Dde(e){var n,r;let a,i=new Pde;a=e.inline?i.renderInline(null!==(n=e.text)&&void 0!==n?n:""):i.render(null!==(r=e.text)&&void 0!==r?r:""),a=null==a?void 0:a.trim();let o=aK(a,{replace:e=>{let t=e;"a"===t.name&&(t.attribs.target="_blank")}});return t.createElement(t.Fragment,null,o)}function Nde(e){return e.text?t.createElement("div",{className:"mdhui-step-title",style:xle(e)},t.createElement(Dde,{text:e.text,inline:!0})):null}function Ide(e){return e.text?t.createElement("div",{className:"mdhui-step-text",style:xle(e)},t.createElement(Dde,{text:e.text})):null}A(".mdhui-step-container .mdhui-step-text {\n font-size: 1em;\n line-height: 1.3em;\n text-align: center;\n margin-top: 15px;\n margin-bottom: 15px;\n margin-left: 20px;\n margin-right: 20px; \n white-space: pre-line;\n}");function Mde(e){return e.text?t.createElement("div",{className:"mdhui-step-detail-text",style:xle(e)},t.createElement(Dde,{text:e.text})):null}A(".mdhui-step-container .mdhui-step-detail-text {\n font-size: 1em;\n line-height: 1.3em;\n text-align: center;\n margin-top: 15px;\n margin-bottom: 15px;\n margin-left: 20px;\n margin-right: 20px;\n white-space: pre-line;\n}");function jde(e){const n=xle(e);if(e.gradient){var r="LeftToRight"===e.gradient.direction?`linear-gradient(to right, ${e.gradient.startColor} 0%, ${e.gradient.endColor} 100%)`:`linear-gradient(to bottom, ${e.gradient.startColor} 0%, ${e.gradient.endColor} 100%)`;n.backgroundImage=r}n.letterSpacing=e.letterSpacing,n.textTransform=e.textTransform,n.backgroundColor=e.backgroundColor;var a=e.text?e.text:az("next-button-text");return t.createElement("button",{className:"mdhui-step-next-button",style:n,disabled:e.disabled,onClick:e.onClick},a)}A(".mdhui-step-container .mdhui-step-next-button {\n margin: 20px;\n padding: 16px;\n background: var(--mdhui-color-primary);\n font-size: 1em;\n color: #FFF;\n font-weight: bold;\n border: solid 1px var(--mdhui-color-primary);\n border-radius: 5px;\n cursor: pointer;\n width: calc(100% - 40px);\n box-sizing: border-box;\n text-align: center;\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.mdhui-step-container .mdhui-step-next-button:disabled,\n.mdhui-step-container .mdhui-step-next-button[disabled] {\n opacity: 0.65;\n cursor: not-allowed;\n}");var Rde=150,zde=2,Lde=["DodgerBlue","OliveDrab","Gold","Pink","SlateBlue","LightBlue","Violet","PaleGreen","SteelBlue","SandyBrown","Chocolate","Crimson"],Fde=!1,Bde=null,qde=[],Hde=0;function Ude(e,t,n){return e.color=Lde[Math.random()*Lde.length|0],e.x=Math.random()*t,e.y=Math.random()*n-n,e.diameter=10*Math.random()+5,e.tilt=10*Math.random()-10,e.tiltAngleIncrement=.07*Math.random()+.05,e.tiltAngle=0,e}function Vde(){var e=window.innerWidth,t=window.innerHeight,n=window.requestAnimationFrame||function(e){return window.setTimeout(e,16.6666667)},r=document.getElementById("confetti-canvas");null===r&&((r=document.createElement("canvas")).setAttribute("id","confetti-canvas"),r.setAttribute("style","display:block;z-index:999999;pointer-events:none;position:fixed;top:0"),document.body.prepend(r),r.width=e,r.height=t,window.addEventListener("resize",(function(){r.width=window.innerWidth,r.height=window.innerHeight}),!0));for(var a=r.getContext("2d");qde.length<Rde;)qde.push(Ude({color:"",x:0,y:0,diameter:0,tilt:0,tiltAngleIncrement:0,tiltAngle:0},e,t));Fde=!0,null===Bde&&function e(){null==a||a.clearRect(0,0,window.innerWidth,window.innerHeight),0===qde.length?Bde=null:(!function(){var e,t=window.innerWidth,n=window.innerHeight;Hde+=.01;for(var r=0;r<qde.length;r++)e=qde[r],!Fde&&e.y<-15?e.y=n+100:(e.tiltAngle+=e.tiltAngleIncrement,e.x+=Math.sin(Hde),e.y+=.5*(Math.cos(Hde)+e.diameter+zde),e.tilt=15*Math.sin(e.tiltAngle)),(e.x>t+20||e.x<-20||e.y>n)&&(Fde&&qde.length<=Rde?Ude(e,t,n):(qde.splice(r,1),r--))}(),function(e){if(e)for(var t,n,r=0;r<qde.length;r++)t=qde[r],e.beginPath(),e.lineWidth=t.diameter,e.strokeStyle=t.color,n=t.x+t.tilt,e.moveTo(n+t.diameter/2,t.y),e.lineTo(n,t.y+t.tilt+t.diameter/2),e.stroke()}(a),Bde=n(e))}()}function Wde(e){return e.srcUrl?t.createElement("div",{className:"mdhui-step-image-icon"},t.createElement("img",{src:e.srcUrl})):null}A(".mdhui-step-container .mdhui-step-image-icon {\n text-align: center;\n}\n\n.mdhui-step-container .mdhui-step-image-icon img {\n max-width: 100%;\n max-height: 60px;\n padding: 0;\n margin: 0;\n padding-top: 50px;\n}");function Gde(e){return e.srcUrl?t.createElement("div",{className:"mdhui-step-image"},t.createElement("img",{src:e.srcUrl})):null}function $de(e){var n;function r(){0!==window.innerWidth&&0!==window.innerHeight?(Vde(),window.setTimeout((function(){Fde=!1}),1200)):window.setTimeout(r,50)}return f((()=>{r()}),[]),t.createElement(wle,null,t.createElement(Wde,{srcUrl:e.iconUrl}),t.createElement(Nde,{text:e.title,textAlign:e.styles.titleAlignment,color:e.styles.titleColor,fontSize:e.styles.titleFontSize,fontWeight:e.styles.titleFontWeight}),t.createElement(Ide,{text:e.text,textAlign:e.styles.textAlignment,color:e.styles.textColor,fontSize:e.styles.textFontSize,fontWeight:e.styles.textFontWeight}),t.createElement(Mde,{text:e.detailText,textAlign:e.styles.textAlignment,color:e.styles.textColor,fontSize:e.styles.textFontSize,fontWeight:e.styles.textFontWeight}),t.createElement(Gde,{srcUrl:e.imageUrl}),t.createElement(jde,{text:e.nextButtonText,color:e.styles.nextButtonTextColor,fontWeight:e.styles.nextButtonFontWeight,backgroundColor:e.styles.nextButtonBackgroundColor,letterSpacing:e.styles.nextButtonLetterSpacing,textTransform:null===(n=e.styles.nextButtonTextTransform)||void 0===n?void 0:n.toLowerCase(),gradient:e.styles.nextButtonBackgroundGradient,onClick:()=>b.completeStep("")}))}function Zde(){const[e,n]=m(),[r,a]=m(),[i,o]=m(),[s,l]=m(),[c,u]=m(),[d,h]=m(),[p,g]=m({});return f((()=>{b.getStepConfiguration().then((function(e){var t;e&&(n(e.properties.title),a(e.properties.text),o(e.properties.detailText),l(e.properties.iconImage),u(e.properties.image),h(e.properties.nextButtonText),g(null!==(t=e.styles)&&void 0!==t?t:{}))}))}),[]),t.createElement($de,{title:e,text:r,detailText:i,iconUrl:s,imageUrl:c,nextButtonText:d,styles:p})}function Yde(e){var n;const r=`Connect to ${e.deviceType}`;return t.createElement(wle,null,t.createElement(Nde,{text:e.title,textAlign:e.styles.titleAlignment,color:e.styles.titleColor,fontSize:e.styles.titleFontSize,fontWeight:e.styles.titleFontWeight}),t.createElement(Ide,{text:e.text,textAlign:e.styles.textAlignment,color:e.styles.textColor,fontSize:e.styles.textFontSize,fontWeight:e.styles.textFontWeight}),t.createElement(jde,{text:r,color:e.styles.nextButtonTextColor,fontWeight:e.styles.nextButtonFontWeight,backgroundColor:e.styles.nextButtonBackgroundColor,letterSpacing:e.styles.nextButtonLetterSpacing,textTransform:null===(n=e.styles.nextButtonTextTransform)||void 0===n?void 0:n.toLowerCase(),gradient:e.styles.nextButtonBackgroundGradient,onClick:e.onConnect}))}function Kde(e){const[n,r]=m(),[a,i]=m(),[o,s]=m({}),[l,c]=m(e.deviceType),[u,d]=m(!0);function h(e){switch(e){case"Fitbit":return pV();case"Omron":return gV();case"Garmin":return fV()}}function p(e){return Wq(this,void 0,void 0,(function*(){try{const t=yield b.getExternalAccounts(),n=h(e);t.some((e=>e.provider.id===n))&&b.completeStep(n)}finally{d(!1)}}))}return f((()=>{b.getStepConfiguration().then((function(e){var t;if(e){if(r(e.properties.title),i(e.properties.text),!e.properties.deviceType)throw new Error("deviceType is required");c(e.properties.deviceType),s(null!==(t=e.styles)&&void 0!==t?t:{}),p(e.properties.deviceType)}else p(l)}))}),[]),u?t.createElement(t.Fragment,null):t.createElement(Yde,{title:n,text:a,deviceType:l,providerID:h(l),styles:o,onConnect:function(){const e=h(l);b.connectExternalAccount(e,{openNewWindow:!0}).then((function(){b.completeStep(e)}))}})}function Xde(e){var n;return t.createElement(wle,null,t.createElement(Nde,{text:e.title,textAlign:e.styles.titleAlignment,color:e.styles.titleColor,fontSize:e.styles.titleFontSize,fontWeight:e.styles.titleFontWeight}),t.createElement(Ide,{text:e.text,textAlign:e.styles.textAlignment,color:e.styles.textColor,fontSize:e.styles.textFontSize,fontWeight:e.styles.textFontWeight}),t.createElement(hG,{previewState:e.previewState,providerCategories:["Provider","Health Plan"],onProviderConnected:e.onProviderConnected}),t.createElement(jde,{text:e.nextButtonText,disabled:e.nextButtonDisabled,color:e.styles.nextButtonTextColor,fontWeight:e.styles.nextButtonFontWeight,backgroundColor:e.styles.nextButtonBackgroundColor,letterSpacing:e.styles.nextButtonLetterSpacing,textTransform:null===(n=e.styles.nextButtonTextTransform)||void 0===n?void 0:n.toLowerCase(),gradient:e.styles.nextButtonBackgroundGradient,onClick:e.onNextButtonClick}))}function Qde(){const[e,n]=m(),[r,a]=m(),[i,o]=m(),[s,l]=m(),[c,u]=m(!0),[d,h]=m({}),[p,g]=m([]);return f((()=>{b.getStepConfiguration().then((function(e){var t;e&&(n(e.properties.title),a(e.properties.text),l(e.properties.nextButtonText),h(null!==(t=e.styles)&&void 0!==t?t:{}))})),b.getSurveyContext().then((function(e){e&&o(e)}))}),[]),t.createElement(Xde,{title:e,text:r,nextButtonText:s,nextButtonDisabled:c,styles:d,onProviderConnected:function(e){g((t=>[...t,e.id])),u(!1)},previewState:"Design"===(null==i?void 0:i.surveyMode)?"Default":void 0,onNextButtonClick:()=>b.completeStep(p.toString())})}function Jde(e){var n;let r=(e.height?e.height:"225")+"px",a=b.getCurrentLanguage();return t.createElement(wle,null,t.createElement(Nde,{text:e.title,textAlign:e.styles.titleAlignment,color:e.styles.titleColor,fontSize:e.styles.titleFontSize,fontWeight:e.styles.titleFontWeight}),t.createElement(Ide,{text:e.text,textAlign:e.styles.textAlignment,color:e.styles.textColor,fontSize:e.styles.textFontSize,fontWeight:e.styles.textFontWeight}),t.createElement("div",{style:{textAlign:"center",width:"100%"}},t.createElement("iframe",{style:{width:"100%",height:r,border:0},src:`https://www.youtube.com/embed/${e.videoId}?rel=0&cc_lang_pref=${a}&controls=1&autoplay=0&fs=1&modestbranding=1`,title:"YouTube video player",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",allowFullScreen:!0})),t.createElement(Mde,{text:e.transcript,textAlign:e.styles.detailTextAlignment,color:e.styles.detailTextColor,fontSize:e.styles.detailTextFontSize,fontWeight:e.styles.detailTextFontWeight}),t.createElement(jde,{text:e.nextButtonText,color:e.styles.nextButtonTextColor,fontWeight:e.styles.nextButtonFontWeight,backgroundColor:e.styles.nextButtonBackgroundColor,letterSpacing:e.styles.nextButtonLetterSpacing,textTransform:null===(n=e.styles.nextButtonTextTransform)||void 0===n?void 0:n.toLowerCase(),gradient:e.styles.nextButtonBackgroundGradient,onClick:()=>b.completeStep("")}))}function ehe(){const[e,n]=m(),[r,a]=m(),[i,o]=m(),[s,l]=m(""),[c,u]=m(),[d,h]=m(),[p,g]=m({});return f((()=>{b.getStepConfiguration().then((function(e){var t;e&&(n(e.properties.title),a(e.properties.text),o(e.properties.transcript),l(e.properties.videoId),u(e.properties.nextButtonText),h(e.properties.height),g(null!==(t=e.styles)&&void 0!==t?t:{}))}))}),[]),t.createElement(Jde,{title:e,text:r,transcript:i,nextButtonText:c,height:d,videoId:s,styles:p})}A(".mdhui-step-container .mdhui-step-image {\n text-align: center;\n}\n.mdhui-step-container .mdhui-step-image img {\n width: 100%;\n padding: 0;\n margin: 0;\n padding-top: 40px;\n padding-bottom: 40px;\n}");function the(e){var t,n;(null===(t=e.customFields.Symptoms)||void 0===t?void 0:t.length)||(e.customFields.Symptoms="[]"),(null===(n=e.customFields.Treatments)||void 0===n?void 0:n.length)||(e.customFields.Treatments="[]");var r=[];try{r=JSON.parse(e.customFields.Symptoms)}catch(t){r=JSON.parse(e.customFields.Symptoms.replace(/\\/g,""))}r.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0)),r.forEach((e=>{e.severityTracking||(e.severityTracking="None")}));var a=[];try{a=JSON.parse(e.customFields.Treatments)}catch(t){a=JSON.parse(e.customFields.Treatments.replace(/\\/g,""))}return a.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0)),{participantID:e.participantID,symptoms:r,treatments:a}}A(".ss-symptom-matrix {\n background: var(--mdhui-background-color-0);\n /* Default color for PDF Rendering, since evopdf does not support CSS variables */\n border-top: solid 1px #ddd;\n border-top: solid 1px var(--mdhui-border-color-1);\n}");var nhe={getConfiguration:function(){return b.getParticipantInfo().then((function(e){return the(e)}))},getDailyLogEntries:function(e,t){var n={},r=function(a){var i={namespace:"Project",type:"DailyLogEntry",pageID:a};return e&&(i.observedAfter=e),t&&(i.observedBefore=t),b.queryDeviceData(i).then((function(e){for(var t=e.deviceDataPoints,a=0;a<t.length;a++){var i=JSON.parse(t[a].value),o=t[a].observationDate;o&&(n[o.substring(0,10)]=rhe(i))}return e.nextPageID?r(e.nextPageID):n}))};return r()},saveDailyLogEntry:function(e,t){return b.persistDeviceData([{type:"DailyLogEntry",observationDate:e+"T00:00:00.000Z",value:JSON.stringify(t)}])}};function rhe(e){e.starred&&(e.icon="star");var t={overallFeeling:e.overallFeeling,notes:e.notes,symptoms:e.symptoms.map((e=>"string"==typeof e?{id:e}:e)),treatments:e.treatments.map((e=>"string"==typeof e?{id:e}:e)),icon:e.icon};return t}function ahe(e){return t.createElement("div",{ref:e.innerRef,className:"mdhui-ss-symptom-treatment-filters"},t.createElement(E,{className:"mdhui-ss-symptom-treatment-filter-dropdown-button",onClick:()=>"Symptoms"==e.expandedDropdown?e.onExpandedDropdownChange(null):e.onExpandedDropdownChange("Symptoms"),style:{fontWeight:e.selectedSymptoms.length>0?"bold":""}},az("select-symptoms")," ",t.createElement(Mq,{icon:"Symptoms"==e.expandedDropdown?on:bn}),t.createElement(Is,null)),t.createElement(E,{className:"mdhui-ss-symptom-treatment-filter-dropdown-button",onClick:()=>"Treatments"==e.expandedDropdown?e.onExpandedDropdownChange(null):e.onExpandedDropdownChange("Treatments"),style:{fontWeight:e.selectedTreatments.length>0?"bold":""}},az("select-treatments")," ",t.createElement(Mq,{icon:"Treatments"==e.expandedDropdown?on:bn}),t.createElement(Is,null)),"Symptoms"==e.expandedDropdown&&t.createElement("div",{className:"mdhui-ss-symptom-treatment-filter-items-list"},e.configuration.symptoms.filter((e=>!e.inactive)).map((n=>t.createElement(rL,{className:"mdhui-ss-symptom-treatment-filter-item",selected:-1!=e.selectedSymptoms.indexOf(n.id),onClick:()=>{return t=n,-1!=(r=[...e.selectedSymptoms]).indexOf(t.id)?r.splice(r.indexOf(t.id),1):r.push(t.id),void e.onSymptomsSelectionChange(r);var t,r},color:n.color,key:n.id,text:n.name})))),"Treatments"==e.expandedDropdown&&t.createElement("div",{className:"mdhui-ss-symptom-treatment-filter-items-list"},e.configuration.treatments.filter((e=>!e.inactive)).map((n=>t.createElement(rL,{className:"mdhui-ss-symptom-treatment-filter-item",selected:-1!=e.selectedTreatments.indexOf(n.id),onClick:()=>{return t=n,-1!=(r=[...e.selectedTreatments]).indexOf(t.id)?r.splice(r.indexOf(t.id),1):r.push(t.id),void e.onTreatmentsSelectionChange(r);var t,r},color:n.color,key:n.id,text:n.name})))))}A(".mdhui-ss-symptom-treatment-filters .mdhui-ss-symptom-treatment-filter-dropdown-button {\n width: 50%;\n display: inline-block;\n box-sizing: border-box;\n padding: 16px 8px;\n background: var(--mdhui-color-primary);\n text-align: center;\n font-size: .88em;\n cursor: pointer;\n color: #FFF;\n position: relative;\n white-space: nowrap;\n}\n\n.mdhui-ss-symptom-treatment-filters .mdhui-ss-symptom-treatment-filter-dropdown-button:first-child {\n border-right: solid 1px var(--mdhui-border-color-1);\n}\n\n.mdhui-ss-symptom-treatment-filters .mdhui-ss-symptom-treatment-filter-items-list {\n background: var(--mdhui-background-color-0);\n text-align: center;\n padding: 12px;\n padding-top: 8px;\n padding-bottom: 8px;\n border-bottom: solid 4px var(--ss-primary-theme-color);\n}\n\n.mdhui-ss-symptom-treatment-filters .mdhui-ss-symptom-treatment-filter-item {\n margin: 4px;\n}");var ihe=[{severityTracking:"10PointScale",color:"#c4291c",name:"Headache",id:"Headache"},{severityTracking:"3PointScale",color:"#e35c33",name:"Fatigue",id:"Fatigue"},{severityTracking:"None",color:"#5db37e",name:"Nausea",id:"Nausea"},{severityTracking:"None",color:"#429bdf",name:"Anxiety",id:"Anxiety"},{severityTracking:"None",color:"#7b88c6",name:"Brain Fog",id:"Brain Fog"},{severityTracking:"None",color:"#616161",name:"Back Pain",id:"Back Pain"},{severityTracking:"None",color:"#d98177",name:"Insomnia",id:"Insomnia"}],ohe=[{color:"#616161",id:"Tylenol",name:"Tylenol"},{color:"#429BDF",id:"Rest",name:"Rest"},{color:"#d98177",id:"Ice",name:"Ice"},{color:"#5db37e",id:"Stretching",name:"Stretching"},{color:"#e35c33",id:"Meditation",name:"Meditation"}];ihe.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0)),ohe.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0));var she={},lhe=Un(new Date,{days:-29});function che(e,t,n,r,a){she[pH(lhe)]={symptoms:e.map((e=>({id:e,severity:Math.floor(10*Math.random())+1}))),treatments:t.map((e=>({id:e}))),notes:a?"notes":"",icon:r,overallFeeling:n},lhe=Un(lhe,{days:1})}che(["Headache","Insomnia"],["Tylenol"],2,"moon-o",!0),che(["Brain Fog","Nausea"],["Tylenol","Ice"],4),che(["Headache"],["Tylenol"],3),che(["Headache","Insomnia"],["Tylenol"],3),che([],[],5),che(["Fatigue","Back Pain","Anxiety","Nausea"],["Stretching","Rest","Ice"],1),che([],[],5),che(["Fatigue","Back Pain","Anxiety","Nausea","Headache","Insomnia","Brain Fog"],["Stretching","Rest","Ice","Meditation","Tylenol"],1,"star-o",!0),che(["Fatigue","Nausea","Headache"],["Stretching"],2),che(["Anxiety","Brain Fog"],["Rest","Meditation"],3,void 0,!0),che([],[],5),che(["Back Pain","Headache"],["Ice","Tylenol"],4),che(["Fatigue","Back Pain","Nausea","Brain Fog"],["Meditation","Tylenol"],2),che([],[],5),che(["Fatigue","Insomnia","Brain Fog"],["Rest"],4,"star",!0),che(["Fatigue","Back Pain"],["Stretching","Rest"],3),che(["Fatigue","Nausea"],["Stretching","Rest","Ice","Meditation","Tylenol"],2,"flag",!0),che(["Headache","Insomnia","Brain Fog"],["Stretching","Tylenol"],4,"user-md",!0),che([],[],5),che([],[],5),che([],[],5),che(["Back Pain","Headache"],["Ice","Tylenol"],4),che(["Fatigue","Back Pain","Nausea","Brain Fog"],["Meditation","Tylenol"],2),che(["Fatigue","Back Pain","Anxiety","Nausea"],["Stretching","Rest","Ice"],1),che(["Fatigue","Insomnia","Brain Fog"],["Rest"],4,"question-circle-o",!0),che(["Fatigue","Back Pain","Anxiety","Nausea","Headache","Insomnia","Brain Fog"],["Stretching","Rest","Ice","Meditation","Tylenol"],1,"flask",!0),che([],[],5),che(["Headache","Insomnia"],["Tylenol"],3),che([],[],5),che(["Fatigue","Insomnia"],["Rest"],2,"trophy",!0);const uhe=o(null);function dhe(e){const[n,r]=m(null),[a,i]=m([]),[o,s]=m([]),[l,c]=m(null);let[u,d]=m(null);function h(){if("default"==e.previewState)return d({symptoms:ihe,treatments:ohe,participantID:"1"}),void r({symptoms:ihe,treatments:ohe,logEntries:she,hasFilteredSymptoms:!1});nhe.getConfiguration().then((function(e){nhe.getDailyLogEntries().then((function(t){d(e),u=e,r({symptoms:p(a),treatments:g(o),logEntries:t,hasFilteredSymptoms:!1})}))}))}function p(e){return u.symptoms.filter((t=>(!e.length||e.includes(t.id))&&!t.inactive))}function g(e){return u.treatments.filter((t=>(!e.length||e.includes(t.id))&&!t.inactive))}return f((()=>(h(),b.on("applicationDidBecomeVisible",h),()=>{b.off("applicationDidBecomeVisible",h)})),[]),n&&u?t.createElement("div",{ref:e.innerRef},t.createElement(uhe.Provider,{value:n},e.showFilters&&t.createElement(Vz,{noTopMargin:!0},t.createElement(ahe,{configuration:u,selectedSymptoms:a,onSymptomsSelectionChange:e=>function(e){r(Object.assign(Object.assign({},n),{symptoms:p(e),hasFilteredSymptoms:!!e.length})),i(e)}(e),selectedTreatments:o,onTreatmentsSelectionChange:e=>function(e){r(Object.assign(Object.assign({},n),{treatments:g(e)})),s(e)}(e),expandedDropdown:l,onExpandedDropdownChange:e=>c(e)})),e.children)):t.createElement(Dn,null)}function hhe(e){let n=i(uhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Matrix must be used inside a Symptom Shark Visualization Coordinator.");let r=i(vz),a=e.intervalStart||hr(new Date);if(r&&(a=r.intervalStart),!n.symptoms.length&&!n.treatments.length)return null;var o=oz(a.getFullYear(),a.getMonth()),s=n.symptoms.map((e=>({label:e.name,color:e.color,data:o.map((t=>!!function(e,t){var r=pH(e);return!!n.logEntries[r]&&n.logEntries[r].symptoms.find((e=>e.id==t))}(t,e.id)))}))),l=n.treatments.map((e=>({label:e.name,color:e.color,data:o.map((t=>!!function(e,t){var r=pH(e);return!!n.logEntries[r]&&n.logEntries[r].treatments.find((e=>e.id==t))}(t,e.id)))})));return t.createElement("div",{ref:e.innerRef,className:"ss-symptom-matrix"},t.createElement(Nz,{title:az("symptoms"),rows:s,intervalStart:a}),t.createElement(Nz,{title:az("treatments"),rows:l,intervalStart:a}))}function mhe(e){let n=i(uhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Calendar must be used inside a Symptom Shark Visualization Coordinator.");let{symptoms:r,treatments:a,logEntries:o}=n,s=i(vz),l=e.intervalStart||hr(new Date);return s&&(l=s.intervalStart),t.createElement(Ds,{innerRef:e.innerRef,className:"mdhui-ss-calendar",month:l.getMonth(),year:l.getFullYear(),dayRenderer:function(n,i,s){if(!s)return t.createElement("div",null);var c=new Date(n,i,s),u=o[pH(c)],d=!1;return c>new Date&&(d=!0),t.createElement(phe,{onClick:t=>function(t){var n=new Date(l.getFullYear(),l.getMonth(),t);n>new Date||e.onDaySelected(n)}(t),day:s,logEntry:u,symptomConfigurations:r,treatmentConfigurations:a,future:d})}})}function phe(e){var n;return t.createElement(E,{className:"mdhui-ss-calendar-day"+(e.future?" future":""),onClick:()=>e.onClick(e.day)},function(){if(!e.logEntry)return t.createElement(xz,{className:"mdhui-ss-day-tracker",primaryColors:[],secondaryColors:[]});var n=e.symptomConfigurations.filter((t=>!t.inactive&&e.logEntry.symptoms.find((e=>e.id==t.id)))).map((e=>e.color)),r=e.treatmentConfigurations.filter((t=>!t.inactive&&e.logEntry.treatments.find((e=>e.id==t.id)))).map((e=>e.color));return 0===n.length&&0===r.length?t.createElement(xz,{className:"mdhui-ss-day-tracker",primaryColors:[],secondaryColors:[]}):t.createElement(xz,{className:"mdhui-ss-day-tracker",key:Math.random(),primaryColors:n,secondaryColors:r})}(),t.createElement("div",{className:"day-label"}," ",e.day," ",(null===(n=e.logEntry)||void 0===n?void 0:n.notes.length)>0&&t.createElement(Mq,{icon:Qt,className:"mdhui-ss-notes-icon"})))}A(".mdhui-ss-calendar .mdhui-ss-calendar-day {\n width: 100%;\n}\n\n.mdhui-ss-calendar .mdhui-ss-calendar-day .mdhui-ss-day-label {\n font-size: 12px;\n color: var(--mdhui-text-color-2);\n}\n\n.mdhui-ss-calendar .mdhui-ss-calendar-day .mdhui-ss-day-label svg {\n font-size: 12px;\n}\n\n.mdhui-ss-calendar .mdhui-ss-calendar-day .mdhui-ss-day-label.future {\n opacity: .5;\n}\n\n.mdhui-ss-calendar .mdhui-ss-notes-icon {\n color: var(--mdhui-color-primary);\n position: absolute;\n right: calc(50% - 19px);\n bottom: 2px;\n}\n\n.mdhui-ss-calendar .mdhui-ss-calendar-day .mdhui-ss-day-tracker {\n padding-bottom: 2px;\n padding-top: 8px;\n}\n\n.mdhui-ss-calendar .mdhui-ss-calendar-day.future {\n opacity: .5;\n cursor: default;\n}");function fhe(e){let n=i(uhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Severity Chart must be used inside a Symptom Shark Visualization Coordinator.");let{logEntries:r}=n,a=i(vz),o=e.intervalStart||hr(new Date);a&&(o=a.intervalStart);var s=oz(o.getFullYear(),o.getMonth());function l(e){return s.filter((t=>{if(r[pH(t)]&&r[pH(t)].overallFeeling&&(!e||r[pH(t)].overallFeeling==e))return!0}))}var c=l();if(!c.length)return null;for(var u=s.length,d=100/u,h=100/(2*u),m=[],p=0;p<c.length-1;p++){var f=c[p],g=c[p+1],v=r[pH(f)].overallFeeling,y=r[pH(g)].overallFeeling;m.push({x1:h+d*(f.getDate()-1),y1:128-24*v,x2:h+d*(g.getDate()-1),y2:128-24*y,color:"#429bdf"})}let b=function(){var e=0,t=l();if(0==t.length)return null;for(var n=0;n<t.length;n++)e+=r[pH(t[n])].overallFeeling;return e/t.length}();return t.createElement("div",{ref:e.innerRef,className:"mdhui-ss-oe-chart"+("monthReport"==e.variant?" mdhui-ss-oe-chart-month-report":"")},t.createElement("div",{className:"mdhui-ss-oe-chart-title-container"},t.createElement(js,{title:az("daily-overall-experience")}),b&&t.createElement("div",{className:"mdhui-ss-oe-chart-average-wrapper"},az("average"),": ",t.createElement("div",{className:"mdhui-ss-oe-chart-average"},b.toFixed(1),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:parseInt(b.toFixed(0))})))),t.createElement("div",{className:"mdhui-ss-oe-chart-inner"},t.createElement("div",{className:"mdhui-ss-oe-chart-y-axis"},t.createElement("div",{className:"mdhui-ss-oe-chart-face-total"},l(5).length>0&&t.createElement("span",{className:"total"},l(5).length),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:5})),t.createElement("div",{className:"mdhui-ss-oe-chart-face-total"},l(4).length>0&&t.createElement("span",{className:"total"},l(4).length),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:4})),t.createElement("div",{className:"mdhui-ss-oe-chart-face-total"},l(3).length>0&&t.createElement("span",{className:"total"},l(3).length),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:3})),t.createElement("div",{className:"mdhui-ss-oe-chart-face-total"},l(2).length>0&&t.createElement("span",{className:"total"},l(2).length),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:2})),t.createElement("div",{className:"mdhui-ss-oe-chart-face-total"},l(1).length>0&&t.createElement("span",{className:"total"},l(1).length),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:1}))),t.createElement("div",{className:"mdhui-ss-oe-chart-x-axis-line"}),t.createElement("div",{className:"mdhui-ss-oe-chart-x-axis-line",style:{top:"48px"}}),t.createElement("div",{className:"mdhui-ss-oe-chart-x-axis-line",style:{top:"72px"}}),t.createElement("div",{className:"mdhui-ss-oe-chart-x-axis-line",style:{top:"96px"}}),t.createElement("div",{className:"mdhui-ss-oe-chart-x-axis-line",style:{top:"120px"}}),t.createElement("div",{style:{position:"relative",height:"100%"}},t.createElement("svg",{className:"mdhui-ss-oe-chart-lines"},m.map((e=>t.createElement("line",{key:e.x1,x1:e.x1+"%",y1:e.y1,x2:e.x2+"%",y2:e.y2,style:{stroke:e.color,strokeWidth:4,opacity:.5}})))),s.map((n=>{var a;return t.createElement("div",{key:n.getDate(),className:"mdhui-ss-oe-chart-day-wrapper",style:{width:100/s.length+"%"}},(e.showAllDays||(n.getDate()-1)%2==0)&&t.createElement("div",{className:"mdhui-ss-oe-chart-day-marker"},n.getDate()),(null===(a=r[pH(n)])||void 0===a?void 0:a.overallFeeling)&&t.createElement("div",{className:"mdhui-ss-oe-chart-dot",style:{bottom:24*r[pH(n)].overallFeeling-16+"px"}}))})))))}A(".mdhui-ss-oe-chart {\n position: relative;\n}\n\n.mdhui-ss-oe-chart .mdhui-ss-oe-chart-title-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n}\n\n.mdhui-ss-oe-chart .mdhui-ss-oe-chart-face {\n width: 16px;\n height: 16px;\n margin-left: 4px;\n vertical-align: text-top;\n display: inline-block;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-y-axis .mdhui-ss-oe-chart-face-total {\n height: 16px;\n margin-bottom: 8px;\n display: block;\n text-align: right;\n font-weight: bold;\n width: 56px;\n font-size: 15px;\n white-space: nowrap;\n}\n\n.mdhui-ss-oe-chart .mdhui-ss-oe-chart-face-total .mdhui-ss-oe-chart-total {\n vertical-align: text-top;\n}\n\n.mdhui-ss-oe-chart .mdhui-ss-oe-chart-average-wrapper {\n font-size: 17px;\n padding: 16px;\n padding-bottom: 0;\n}\n\n.mdhui-ss-oe-chart .mdhui-ss-oe-chart-average-wrapper .mdhui-ss-oe-chart-average {\n font-weight: bold;\n display: inline;\n}\n\n.mdhui-ss-oe-chart-inner {\n position: relative;\n height: 160px;\n padding: 16px;\n box-sizing: border-box;\n padding-left: 64px;\n page-break-inside: avoid;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-x-axis-line {\n position: absolute;\n width: calc(100% - 64px);\n height: 1px;\n /*Default color because evopdf doesn't support css variables*/\n background: #eee;\n background: var(--mdhui-background-color-1);\n left: 64px;\n top: 24px;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-lines {\n position: absolute;\n left: 0;\n right: 0;\n top: 0.5px;\n bottom: 0;\n width: 100%;\n height: 100%;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-y-axis {\n position: absolute;\n left: 0;\n top: 16px;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-day-wrapper {\n position: relative;\n float: left;\n height: 116px;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-day-wrapper .mdhui-ss-oe-chart-day-marker {\n position: absolute;\n left: 0;\n bottom: -16px;\n width: 100%;\n text-align: center;\n font-size: 12px;\n color: var(--mdhui-text-color-2);\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-day-wrapper .mdhui-ss-oe-chart-dot {\n position: absolute;\n width: 7px;\n height: 7px;\n /*Default color because evopdf doesn't support css variables*/\n background: #666;\n background: var(--mdhui-text-color-2);\n border-radius: 3.5px;\n left: calc(50% - 3px);\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-inner {\n padding-left: calc(25% + 8px);\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-y-axis {\n left: calc(25% - 56px);\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-x-axis-line {\n width: calc(75% - 32px);\n left: calc(25% + 16px);\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-average-wrapper {\n display: block;\n padding-top: 16px;\n font-size: 15px;\n text-transform: uppercase;\n font-weight: normal;\n position: absolute;\n left: 16px;\n top: 64px;\n text-align: left;\n padding: 0;\n padding-bottom: 8px;\n right: auto;\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-average-wrapper .mdhui-ss-oe-chart-average {\n margin-top: 8px;\n font-size: 34px;\n font-weight: bold;\n display: block;\n line-height: 34px;\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-average-wrapper .mdhui-ss-oe-chart-average .mdhui-face {\n height: 34px;\n width: 34px;\n vertical-align: top;\n border-radius: 18px;\n overflow: hidden;\n}");function ghe(e){var n,r,a,i,o;if(!e.configuration.symptoms.length)return null;function s(){e.onClick&&e.onClick(e.date)}let l=!1;e.logEntry&&(e.logEntry.symptoms.length>0||e.logEntry.treatments.length>0||e.logEntry&&e.logEntry.notes.length>0)||(l=!0);let c=null!==(n=e.title)&&void 0!==n?n:sz(e.date),u=null!==(r=e.highlight)&&void 0!==r?r:eo(e.date),d=e.title?void 0:null!==(a=e.subtitle)&&void 0!==a?a:lz(e.date);return l?t.createElement(Ms,{innerRef:e.innerRef,variant:u?"highlight":"subtle",className:"mdhui-ss-log-entry"},t.createElement(Xt,{title:c,subtitle:d,onClick:()=>s(),indicatorIcon:En},!!e.noDataMessage&&t.createElement("div",{className:"mdhui-ss-log-entry-section"},e.noDataMessage),t.createElement(Is,null))):t.createElement(Ms,{innerRef:e.innerRef,className:"mdhui-ss-log-entry"},t.createElement(Xt,{title:c,subtitle:d,onClick:()=>s(),indicatorPosition:"topRight",indicator:t.createElement(t.Fragment,null,(null===(i=e.logEntry)||void 0===i?void 0:i.overallFeeling)&&t.createElement(Pz,{faceValue:null===(o=e.logEntry)||void 0===o?void 0:o.overallFeeling,selected:!0}))},t.createElement(vhe,{configuration:e.configuration,logEntry:e.logEntry,highlightedSymptoms:e.highlightedSymptoms,highlightedTreatments:e.highlightedTreatments}),e.logEntry.notes&&t.createElement("div",{className:"mdhui-ss-log-entry-section"},t.createElement("div",{className:"mdhui-ss-section-header"},"Notes"),t.createElement("div",{className:"mdhui-ss-notes-content"},e.logEntry.notes))))}function vhe(e){var n=[],r=[];if(e.logEntry&&(e.logEntry.symptoms.forEach((t=>{var r,a=e.configuration.symptoms.find((e=>e.id==t.id));a&&("10PointScale"==a.severityTracking&&(r=t.severity?t.severity.toString():void 0),"3PointScale"==a.severityTracking&&(t.severity>7?r=az("severe-shortened"):t.severity>4?r=az("moderate-shortened"):t.severity>0&&(r=az("mild-shortened"))),n.push({id:t.id,severity:r,name:a.name,color:a.color}))})),n.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0)),e.logEntry.treatments.forEach((t=>{var n=e.configuration.treatments.find((e=>e.id==t.id));n&&r.push({id:t.id,name:n.name,color:n.color})})),r.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0))),!e.logEntry||!(n.length>0||r.length>0||e.logEntry.notes.length>0))return null;var a=[],i=[];return e.highlightedSymptoms&&(a=e.highlightedSymptoms),e.highlightedTreatments&&(i=e.highlightedTreatments),0==e.logEntry.symptoms.length&&0==e.logEntry.treatments.length?null:t.createElement("div",{className:"mdhui-ss-log-entry-section"},t.createElement("div",{className:"mdhui-ss-section-header"},"Symptoms & Treatments"),n.filter((e=>-1!=a.indexOf(e.id))).map((e=>t.createElement(rL,{noBoxShadow:!0,selected:!0,color:e.color,badge:e.severity,key:e.id,text:e.name}))),r.filter((e=>-1!=i.indexOf(e.id))).map((e=>t.createElement(rL,{noBoxShadow:!0,selected:!0,color:e.color,key:e.id,text:e.name,bordered:!0}))),n.filter((e=>-1==a.indexOf(e.id))).map((e=>t.createElement("span",{key:e.id,style:{opacity:a.length>0||i.length>0?.5:1}},t.createElement(rL,{noBoxShadow:!0,selected:!0,color:e.color,badge:e.severity,text:e.name})))),r.filter((e=>-1==i.indexOf(e.id))).map((e=>t.createElement("span",{key:e.id,style:{opacity:a.length>0||i.length>0?.5:1}},t.createElement(rL,{noBoxShadow:!0,selected:!0,color:e.color,text:e.name,bordered:!0})))))}A(".mdhui-ss-log-entry .mdhui-face {\n height: 18px;\n width: 18px;\n border-radius: 9px;\n}\n\n.mdhui-ss-log-entry .mdhui-ss-log-entry-section {\n margin-top: 16px;\n}\n\n.mdhui-ss-log-entry .mdhui-ss-section-header {\n font-size: .88em;\n font-weight: 500;\n color: var(--mdhui-text-color-3);\n margin-bottom: 4px;\n}\n\n.mdhui-ss-log-entry .mdhui-ss-notes-preview {\n font-size: .88em;\n white-space: pre-wrap;\n margin: 16px;\n margin-top: 0;\n}\n\n.mdhui-ss-log-entry .mdhui-tracker-item {\n margin-left: 0;\n margin-top: 0;\n}\n\n.mdhui-ss-log-entry .mdhui-ss-notes-content {\n font-size: .88em;\n white-space: pre-wrap;\n}");A(".ss-month-report {\n position: relative;\n width: 100%;\n font-family: ui-rounded, -apple-system, Helvetica, Arial, sans-serif;\n /* default color for PDF rendering */\n background: #FFF;\n background: var(--mdhui-background-color-0);\n}\n\n.ss-month-report>thead>tr>th {\n text-align: left;\n font-size: 21px;\n line-height: 21px;\n width: 100%;\n background: var(--mdhui-background-color-0);\n}\n\n.ss-month-report>thead>tr>th>.header {\n display: block;\n position: relative;\n padding: 16px;\n}\n\n.ss-month-report>thead>tr>th>.header .ss-month-report-product {\n position: absolute;\n right: 16px;\n top: 10px;\n font-size: 15px;\n font-weight: bold;\n padding-left: 40px;\n height: 32px;\n line-height: 18px;\n}\n\n.ss-month-report>thead>tr>th>.header .ss-month-report-product .ss-month-report-product-url {\n font-weight: normal;\n}\n\n.ss-month-report>thead>tr>th>.header .ss-month-report-product img {\n height: 32px;\n position: absolute;\n left: 0;\n top: 0;\n vertical-align: middle;\n}\n\n.ss-month-report>tfoot>tr>td {\n padding: 16px;\n text-align: center;\n font-size: 21px;\n line-height: 21px;\n width: 100%;\n background: var(--mdhui-background-color-0);\n border-top: solid 1px var(--mdhui-border-color-1);\n}");function yhe(e){let n=Object.assign(Object.assign({},bhe[e.icon||"star-o"]),{className:e.className});return t.createElement(Mq,Object.assign({},n))}A(".ss-notes-timeline {\n padding: 16px;\n padding-top: 48px;\n\n /* Default color for PDF Rendering, since pdf renderer does not support CSS variables */\n border-top: solid 1px #ddd;\n\n border-top: solid 1px var(--mdhui-border-color-1);\n padding-left: 64px;\n position: relative;\n}\n\n.ss-notes-timeline .ss-notes-timeline-title {\n font-size: 17px;\n color: var(--mdhui-text-color-1);\n font-weight: bold;\n position: absolute;\n left: 16px;\n top: 16px;\n}\n\n.ss-notes-timeline .ss-notes-timeline-line {\n position: absolute;\n top: 48px;\n left: 32px;\n\n /* Default color for PDF Rendering, since pdf renderer does not support CSS variables */\n background: #ddd;\n\n background: var(--mdhui-background-color-2);\n bottom: 48px;\n width: 1px;\n}\n\n.ss-notes-timeline .ss-notes-timeline-day {\n margin-bottom: 32px;\n page-break-inside: avoid;\n position: relative;\n\n /* Default color for PDF Rendering, since pdf renderer does not support CSS variables */\n border: solid 1px #ddd;\n\n border: solid 1px var(--mdhui-border-color-1);\n border-radius: 5px;\n padding: 16px;\n}\n\n.ss-notes-timeline .ss-notes-timeline-day .ss-notes-timeline-day-icon {\n font-size: 21px;\n position: absolute;\n left: -51px;\n top: calc(50% - 11px);\n width: 37px;\n text-align: center;\n display: block;\n}\n\n.ss-notes-timeline .ss-notes-timeline-day .ss-notes-timeline-day-circle {\n /* Default color for PDF Rendering, since pdf renderer does not support CSS variables */\n color: #429bdf;\n\n color: var(--mdhui-color-primary);\n}\n\n.notes-timeline .ss-notes-timeline-day .ss-notes-timeline-day-title {\n font-weight: bold;\n font-size: 17px;\n}\n\n.notes-timeline .ss-notes-timeline-day .ss-notes-timeline-note {\n white-space: pre-wrap;\n}");const bhe={star:{color:"#eec04c",icon:{prefix:"fas",iconName:"star",icon:[576,512,[11088,61446],"f005","M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"]}},"star-o":{color:"#eec04c",icon:{prefix:"far",iconName:"star",icon:[576,512,[11088,61446],"f005","M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.7 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z"]}},"user-md":{color:"#397d49",icon:fn},"hospital-o":{color:"#4154af",icon:{prefix:"fas",iconName:"hospital",icon:[640,512,[127973,62589,"hospital-alt","hospital-wide"],"f0f8","M192 48c0-26.5 21.5-48 48-48H400c26.5 0 48 21.5 48 48V512H368V432c0-26.5-21.5-48-48-48s-48 21.5-48 48v80H192V48zM48 96H160V512H48c-26.5 0-48-21.5-48-48V320H80c8.8 0 16-7.2 16-16s-7.2-16-16-16H0V224H80c8.8 0 16-7.2 16-16s-7.2-16-16-16H0V144c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v48H560c-8.8 0-16 7.2-16 16s7.2 16 16 16h80v64H560c-8.8 0-16 7.2-16 16s7.2 16 16 16h80V464c0 26.5-21.5 48-48 48H480V96H592zM312 64c-8.8 0-16 7.2-16 16v24H272c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16h24v24c0 8.8 7.2 16 16 16h16c8.8 0 16-7.2 16-16V152h24c8.8 0 16-7.2 16-16V120c0-8.8-7.2-16-16-16H344V80c0-8.8-7.2-16-16-16H312z"]}},ambulance:{color:"#f2471c",icon:nn},flag:{color:"#c4291c",icon:{prefix:"fas",iconName:"flag",icon:[448,512,[127988,61725],"f024","M64 32C64 14.3 49.7 0 32 0S0 14.3 0 32V64 368 480c0 17.7 14.3 32 32 32s32-14.3 32-32V352l64.3-16.1c41.1-10.3 84.6-5.5 122.5 13.4c44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30V66.1c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0c-35.1-17.6-75.4-22-113.5-12.5L64 48V32z"]}},"moon-o":{color:"#9d9083",icon:{prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]}},flask:{color:"#429bdf",icon:{prefix:"fas",iconName:"flask",icon:[448,512,[],"f0c3","M288 0H160 128C110.3 0 96 14.3 96 32s14.3 32 32 32V196.8c0 11.8-3.3 23.5-9.5 33.5L10.3 406.2C3.6 417.2 0 429.7 0 442.6C0 480.9 31.1 512 69.4 512H378.6c38.3 0 69.4-31.1 69.4-69.4c0-12.8-3.6-25.4-10.3-36.4L329.5 230.4c-6.2-10.1-9.5-21.7-9.5-33.5V64c17.7 0 32-14.3 32-32s-14.3-32-32-32H288zM192 196.8V64h64V196.8c0 23.7 6.6 46.9 19 67.1L309.5 320h-171L173 263.9c12.4-20.2 19-43.4 19-67.1z"]}},bolt:{color:"#f5b722",icon:{prefix:"fas",iconName:"bolt",icon:[448,512,[9889,"zap"],"f0e7","M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288H175.5L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7H272.5L349.4 44.6z"]}},"question-circle-o":{color:"#71aa3a",icon:hn},thermometer:{color:"#a3144d",icon:{prefix:"fas",iconName:"thermometer",icon:[512,512,[],"f491","M96 382.1V293.3c0-14.9 5.9-29.1 16.4-39.6l27.3-27.3 57 57c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-57-57 41.4-41.4 57 57c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-57-57 41.4-41.4 57 57c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-57-57 45.5-45.5C355.2 10.9 381.4 0 408.8 0C465.8 0 512 46.2 512 103.2c0 27.4-10.9 53.6-30.2 73L258.3 399.6c-10.5 10.5-24.7 16.4-39.6 16.4H129.9L41 505c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l89-89z"]}},trophy:{color:"#e0bc39",icon:{prefix:"fas",iconName:"trophy",icon:[576,512,[127942],"f091","M400 0H176c-26.5 0-48.1 21.8-47.1 48.2c.2 5.3 .4 10.6 .7 15.8H24C10.7 64 0 74.7 0 88c0 92.6 33.5 157 78.5 200.7c44.3 43.1 98.3 64.8 138.1 75.8c23.4 6.5 39.4 26 39.4 45.6c0 20.9-17 37.9-37.9 37.9H192c-17.7 0-32 14.3-32 32s14.3 32 32 32H384c17.7 0 32-14.3 32-32s-14.3-32-32-32H357.9C337 448 320 431 320 410.1c0-19.6 15.9-39.2 39.4-45.6c39.9-11 93.9-32.7 138.2-75.8C542.5 245 576 180.6 576 88c0-13.3-10.7-24-24-24H446.4c.3-5.2 .5-10.4 .7-15.8C448.1 21.8 426.5 0 400 0zM48.9 112h84.4c9.1 90.1 29.2 150.3 51.9 190.6c-24.9-11-50.8-26.5-73.2-48.3c-32-31.1-58-76-63-142.3zM464.1 254.3c-22.4 21.8-48.3 37.3-73.2 48.3c22.7-40.3 42.8-100.5 51.9-190.6h84.4c-5.1 66.3-31.1 111.2-63 142.3z"]}},spoon:{color:"#6e4b3f",icon:{prefix:"fas",iconName:"spoon",icon:[512,512,[129348,61873,"utensil-spoon"],"f2e5","M245.8 220.9c-14.5-17.6-21.8-39.2-21.8-60.8C224 80 320 0 416 0c53 0 96 43 96 96c0 96-80 192-160.2 192c-21.6 0-43.2-7.3-60.8-21.8L54.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L245.8 220.9z"]}}};function whe(e){var n,r;let a=i(uhe);if(!a)return t.createElement(nL,{innerRef:e.innerRef},"Error: Notes timeline must be used inside a Symptom Shark Visualization Coordinator.");let o=i(vz),s=null!==(r=null!==(n=null==o?void 0:o.intervalStart)&&void 0!==n?n:e.intervalStart)&&void 0!==r?r:hr(new Date);if(!a.symptoms.length&&!a.treatments.length)return null;var l=oz(s.getFullYear(),s.getMonth()).filter((e=>{var t,n;return null===(n=null===(t=a.logEntries[pH(e)])||void 0===t?void 0:t.notes)||void 0===n?void 0:n.length}));return l.length?t.createElement("div",{ref:e.innerRef,className:"ss-notes-timeline"},t.createElement("div",{className:"ss-notes-timeline-title"},az("notes")),t.createElement("div",{className:"ss-notes-timeline-line"}),l.map((e=>t.createElement("div",{key:e.toISOString(),className:"ss-notes-timeline-day"},a.logEntries[pH(e)].icon?t.createElement(yhe,{className:"ss-notes-timeline-day-icon",icon:a.logEntries[pH(e)].icon}):t.createElement(Mq,{className:"ss-notes-timeline-day-icon ss-notes-timeline-day-circle",icon:dn}),t.createElement("div",{className:"ss-notes-timeline-day-title"},ia(e,"MMMM d, yyyy")),t.createElement("div",{className:"ss-notes-timeline-note"},a.logEntries[pH(e)].notes))))):null}function xhe(e){let n=i(uhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Severity Chart must be used inside a Symptom Shark Visualization Coordinator.");let{logEntries:r}=n,a=i(vz),o=e.intervalStart||hr(new Date);a&&(o=a.intervalStart);let s=oz(o.getFullYear(),o.getMonth()),l=function(t){var n=pH(t);if(r[n]){var a=r[n].symptoms.find((t=>e.symptom.id==t.id));if(a&&a.severity)return"3PointScale"==e.symptom.severityTracking?a.severity<4?1:a.severity>=4&&a.severity<8?2:3:a.severity}return 0},c=function(e){for(var t=0,n=0;n<s.length;n++){l(s[n])==e&&t++}return t},u=function(){for(var t,n=0,a=[],i=0;i<s.length;i++){var o=pH(s[i]);if(r[o]){var l=r[o].symptoms.find((t=>t.id==e.symptom.id));l&&l.severity&&a.push(l)}}if("3PointScale"==e.symptom.severityTracking)n+=a.filter((e=>e.severity&&e.severity<4)).length,n+=2*a.filter((e=>e.severity&&e.severity>=4&&e.severity<8)).length,n+=3*a.filter((e=>e.severity&&e.severity>=8)).length;else for(var c=0;c<a.length;c++)n+=null!==(t=a[c].severity)&&void 0!==t?t:0;return n/a.length}();return isNaN(u)?null:t.createElement("div",{ref:e.innerRef,className:"mdhui-ss-severity-chart"+("monthReport"==e.variant?" mdhui-ss-severity-chart-month-report":"")},t.createElement(js,{title:e.symptom.name+" "+az("severity")}),"3PointScale"==e.symptom.severityTracking&&t.createElement(t.Fragment,null,t.createElement("div",{className:"mdhui-ss-severity-chart-inner mdhui-ss-severity-chart-three-point-scale"},t.createElement("div",{className:"mdhui-ss-severity-chart-y-axis"},t.createElement("div",{className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"},c(3)),"sev"),t.createElement("div",{className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"},c(2)),"mod"),t.createElement("div",{className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"},c(1)),"mild"),t.createElement("div",{className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"}),"n/a")),t.createElement("div",{className:"mdhui-ss-severity-chart-x-axis-line"}),t.createElement("div",{className:"mdhui-ss-severity-chart-x-axis-line",style:{top:"48px"}}),t.createElement("div",{className:"mdhui-ss-severity-chart-x-axis-line",style:{top:"72px"}}),t.createElement("div",{className:"mdhui-ss-severity-chart-x-axis-line",style:{top:"96px"}}),t.createElement("div",{style:{position:"relative",height:"100%"}},s.map((n=>t.createElement("div",{key:n.toISOString(),className:"mdhui-ss-severity-chart-day-wrapper",style:{width:100/s.length+"%"}},(e.showAllDays||(n.getDate()-1)%2==0)&&t.createElement("div",{className:"mdhui-ss-severity-chart-day-marker"},n.getDate()),t.createElement("div",{className:"mdhui-ss-severity-chart-bar",style:{height:24*l(n)+"px",backgroundColor:e.symptom.color}},t.createElement(Is,null))))))),u&&t.createElement("div",{className:"mdhui-ss-severity-chart-average-wrapper"},az("average")," ",t.createElement("div",{className:"mdhui-ss-severity-chart-average"},u.toFixed(1)," / 3"))),"10PointScale"==e.symptom.severityTracking&&t.createElement("div",null,t.createElement("div",{className:"mdhui-ss-severity-chart-inner mdhui-ss-severity-chart-ten-point-scale"},t.createElement("div",{className:"mdhui-ss-severity-chart-y-axis"},[10,9,8,7,6,5,4,3,2,1].map((e=>t.createElement("div",{key:e,className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"},c(e)),t.createElement("div",{className:"mdhui-ss-severity-chart-value-label"},e)))),t.createElement("div",{className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"}),t.createElement("div",{className:"mdhui-ss-severity-chart-value-label"},"0"))),[10,9,8,7,6,5,4,3,2,1].map((e=>t.createElement("div",{key:e,className:"mdhui-ss-severity-chart-x-axis-line",style:{top:24*(11-e)+"px"}}))),t.createElement("div",{style:{position:"relative",height:"100%"}},s.map((n=>t.createElement("div",{key:n.toISOString(),className:"mdhui-ss-severity-chart-day-wrapper",style:{width:100/s.length+"%"}},(e.showAllDays||(n.getDate()-1)%2==0)&&t.createElement("div",{className:"mdhui-ss-severity-chart-day-marker"},n.getDate()),t.createElement("div",{className:"mdhui-ss-severity-chart-bar",style:{height:24*l(n)+"px",backgroundColor:e.symptom.color}},t.createElement(Is,null))))))),u&&t.createElement("div",{className:"mdhui-ss-severity-chart-average-wrapper"},az("average")," ",t.createElement("div",{className:"mdhui-ss-severity-chart-average"},u.toFixed(1)," / 10"))))}function khe(e){var n,r;let a=i(uhe);if(!a)return t.createElement(nL,{innerRef:e.innerRef},"Error: Month report must be used inside a Symptom Shark Visualization Coordinator.");let o=i(vz),s=null!==(r=null!==(n=null==o?void 0:o.intervalStart)&&void 0!==n?n:e.intervalStart)&&void 0!==r?r:hr(new Date);return a.symptoms.length||a.treatments.length?t.createElement("table",{ref:e.innerRef,className:"ss-month-report",cellPadding:"0",cellSpacing:"0"},t.createElement("thead",null,t.createElement("tr",null,t.createElement("th",null,t.createElement("div",{className:"header"},cz(s.getMonth())," ",s.getFullYear(),t.createElement("div",{className:"product"},e.productLogo&&t.createElement("img",{src:e.productLogo}),e.productName&&t.createElement("div",{className:"product-name"},e.productName),e.productUrl&&t.createElement("a",{href:e.productUrl,className:"product-url"},e.productUrl)))))),t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",null,t.createElement(hhe,null),e.includeDailyOverallFeeling&&t.createElement(fhe,{variant:"monthReport",showAllDays:!0}),a.symptoms.filter((e=>!e.inactive&&e.severityTracking&&"None"!=e.severityTracking)).map((e=>t.createElement(xhe,{key:e.id,variant:"monthReport",symptom:e,showAllDays:!0}))),e.includeNotes&&t.createElement(whe,null))))):null}A(".mdhui-ss-severity-chart {\n position: relative;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-average-wrapper {\n font-size: 17px;\n padding: 16px;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-average-wrapper .mdhui-ss-severity-chart-average {\n font-weight: bold;\n display: inline;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-inner {\n position: relative;\n height: 304px;\n padding: 16px;\n box-sizing: border-box;\n padding-left: 64px;\n page-break-inside: avoid;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-inner .mdhui-ss-severity-chart-x-axis-line {\n position: absolute;\n width: calc(100% - 64px);\n height: 1px;\n\n /* Default color for PDF Rendering, since evopdf does not support CSS variables */\n background: #eee;\n\n background: var(--mdhui-background-color-1);\n left: 64px;\n top: 24px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-lines {\n position: absolute;\n left: 0;\n right: 0;\n top: 0.5px;\n bottom: 0;\n width: 100%;\n height: 100%;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-y-axis {\n position: absolute;\n left: 0;\n top: 16px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-value {\n height: 16px;\n margin-bottom: 8px;\n display: block;\n text-align: right;\n font-weight: bold;\n width: 56px;\n font-size: 9px;\n white-space: nowrap;\n position: relative;\n line-height: 16px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-value .mdhui-ss-severity-chart-value-label {\n border-radius: 32px;\n padding: 3px;\n font-size: 9px;\n font-weight: bold;\n text-align: center;\n min-width: 10px;\n display: inline-block;\n color: var(--mdhui-text-color-1);\n line-height: 10px;\n background: #eec04c;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-value .mdhui-ss-severity-chart-total {\n position: absolute;\n right: 24px;\n top: 0;\n font-size: 15px;\n}\n\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-day-wrapper {\n position: relative;\n float: left;\n height: 260px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-day-wrapper .mdhui-ss-severity-chart-day-marker {\n position: absolute;\n left: 0;\n bottom: -16px;\n width: 100%;\n text-align: center;\n font-size: 12px;\n color: var(--mdhui-text-color-2);\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-day-wrapper .mdhui-ss-severity-chart-day-star {\n position: absolute;\n left: 0;\n bottom: -32px;\n width: 100%;\n text-align: center;\n font-size: 9px;\n color: var(--ss-tertiary-theme-color);\n display: none;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-day-wrapper .mdhui-ss-severity-chart-bar {\n position: absolute;\n width: 7px;\n background: var(--ss-bar-graph-bar-color);\n left: 0;\n width: 100%;\n bottom: 12px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-three-point-scale {\n height: 136px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-three-point-scale .mdhui-ss-severity-chart-day-wrapper {\n height: 92px;\n}\n\n\n.mdhui-ss-severity-chart.mdhui-ss-severity-chart-month-report .mdhui-ss-severity-chart-inner {\n padding-left: calc(25% + 8px);\n}\n\n.mdhui-ss-severity-chart.mdhui-ss-severity-chart-month-report .mdhui-ss-severity-chart-y-axis {\n left: calc(25% - 56px);\n}\n\n.mdhui-ss-severity-chart.mdhui-ss-severity-chart-month-report .mdhui-ss-severity-chart-x-axis-line {\n width: calc(75% - 32px);\n left: calc(25% + 16px);\n}\n\n.mdhui-ss-severity-chart.mdhui-ss-severity-chart-month-report .mdhui-ss-severity-chart-average-wrapper {\n display: block;\n padding-top: 16px;\n font-size: 15px;\n text-transform: uppercase;\n font-weight: normal;\n position: absolute;\n left: 16px;\n top: 64px;\n text-align: left;\n padding: 0;\n padding-bottom: 8px;\n right: auto;\n}\n\n.mdhui-ss-severity-chart.mdhui-ss-severity-chart-month-report .mdhui-ss-severity-chart-average-wrapper .mdhui-ss-severity-chart-average {\n margin-top: 8px;\n font-size: 34px;\n font-weight: bold;\n display: block;\n line-height: 34px;\n}");function She(e){let n=i(uhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Treatment Histograms must be used inside a Symptom Shark Visualization Coordinator.");let{symptoms:r,treatments:a,logEntries:o}=n,s=i(vz),l=e.intervalStart||hr(new Date);s&&(l=s.intervalStart);var c=[];r.forEach((t=>{for(var n=0,r=l;r.getMonth()==l.getMonth();){var a=o[pH(r)];a&&a.symptoms.find((e=>e.id==t.id))&&n++,r=Un(r,{days:1})}var i=t.severityTracking&&"None"!=t.severityTracking?function(){e.onSymptomSelected(t.id,l)}:void 0;n>0&&c.push({color:t.color,label:t.name,value:n,onSelect:i})}));var u=[];return a.forEach((e=>{for(var t=0,n=l;n.getMonth()==l.getMonth();){var r=o[pH(n)];r&&r.treatments.find((t=>t.id==e.id))&&t++,n=Un(n,{days:1})}t>0&&u.push({color:e.color,label:e.name,value:t})})),u.length||c.length?t.createElement("div",{ref:e.innerRef,className:"mdhui-ss-histograms"},t.createElement("div",{className:"mdhui-ss-histogram"},t.createElement(bz,{className:"mdhui-ss-histogram-title",order:4},az("symptoms")),t.createElement(Dz,{className:"ss-histogram",entries:c})),t.createElement("div",{className:"mdhui-ss-histogram"},t.createElement(bz,{className:"mdhui-ss-histogram-title",order:4},az("treatments")),t.createElement(Dz,{className:"ss-histogram",entries:u})),t.createElement("div",{style:{clear:"both"}})):null}A(".mdhui-ss-histograms {\n border-top: solid 1px var(--mdhui-border-color-1);\n border-bottom: solid 1px var(--mdhui-border-color-1);\n box-shadow: var(--mdhui-box-shadow-0);\n}\n\n.mdhui-ss-histograms .mdhui-ss-histogram {\n padding: 16px;\n float: left;\n width: 50%;\n box-sizing: border-box;\n position: relative;\n padding-right: 32px;\n}\n\n.mdhui-ss-histograms .mdhui-ss-histogram .mdhui-ss-histogram-title {\n color: var(--mdhui-text-color-1);\n display: block;\n padding-bottom: 8px;\n}\n\n.mdhui-ss-histograms .mdhui-ss-histogram .ss-histogram {\n padding: 0;\n}");function Ahe(e){let n=i(uhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Severity Summary must be used inside a Symptom Shark Visualization Coordinator.");let{logEntries:r}=n,a=i(vz),o=e.intervalStart||hr(new Date);a&&(o=a.intervalStart);var s=oz(o.getFullYear(),o.getMonth()),l=function(t){var n=pH(t);if(r[n]){var a=r[n].symptoms.find((t=>e.symptom.id==t.id));if(a&&a.severity)return a.severity}return 0},c=function(e,t){for(var n=0,r=0;r<s.length;r++){var a=l(s[r]);a>=e&&a<=t&&n++}return n};return"3PointScale"!=e.symptom.severityTracking?null:t.createElement("div",{ref:e.innerRef,className:"mdhui-ss-symptom-severity-summaries"},t.createElement("div",{className:"mdhui-ss-symptom-severity-summary"},t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-label"},az("severe")),t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-count"},c(8,10))),t.createElement("div",{className:"mdhui-ss-symptom-severity-summary"},t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-label"},az("moderate")),t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-count"},c(4,7))),t.createElement("div",{className:"mdhui-ss-symptom-severity-summary"},t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-label"},az("mild")),t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-count"},c(1,3))),t.createElement("div",{style:{clear:"both"}}))}A(".mdhui-ss-symptom-severity-summaries .mdhui-ss-symptom-severity-summary {\n width: 33%;\n float: left;\n text-align: center;\n padding: 16px;\n box-sizing: border-box;\n}\n\n.mdhui-ss-symptom-severity-summaries .mdhui-ss-symptom-severity-summary-label {\n padding: 8px;\n}\n\n.mdhui-ss-symptom-severity-summaries .mdhui-ss-symptom-severity-summary-count {\n font-size: 34px;\n font-weight: bold;\n}");let Ehe={participantID:"123",symptoms:[{id:"1",color:"#c4291c",name:"Headache",severityTracking:"3PointScale"},{id:"2",color:"#e35c33",name:"Nausea",severityTracking:"10PointScale"},{id:"3",color:"#5db37e",name:"Dizziness",severityTracking:"None"}],treatments:[{id:"10",color:"#c4291c",name:"Tylenol"},{id:"12",color:"#e35c33",name:"Rest"}]},_he={symptoms:[{id:"1",severity:2},{id:"2",severity:7},{id:"3"}],treatments:[{id:"10"},{id:"12"}],overallFeeling:5,notes:"I'm feeling a little better today."};function Che(e){const[n,r]=m({}),[a,i]=m(null),[o,s]=m([new Date]);function l(){if(pH(o[0])!=pH(new Date)&&s([new Date]),"default"!=e.previewState)nhe.getConfiguration().then((function(e){nhe.getDailyLogEntries().then((function(t){i(e),r(t)}))}));else{i(Ehe);let e=pH(Un(new Date,{days:-1}));r(Object.assign(Object.assign({},n),{[e]:_he}))}}return f((()=>(l(),b.on("applicationDidBecomeVisible",l),()=>{b.off("applicationDidBecomeVisible",l)})),[]),t.createElement("div",{ref:e.innerRef,className:"log-entry-list"},a&&o.map((r=>t.createElement(ghe,{noDataMessage:pH(r)==pH(new Date)?az("tap-to-log-today"):void 0,key:pH(r),date:r,configuration:a,logEntry:n[pH(r)],onClick:()=>e.onDaySelected(r)}))),t.createElement(qV,{enabled:!!a,onTrigger:()=>function(){for(var e=[...o],t=0;t<30;t++){var n=Un(e[e.length-1],{days:-1});e.push(n)}s(e)}()}),t.createElement(Dn,null))}function Ohe(e){const[n,r]=m(null),[a,i]=m(void 0);var o=new Date;function s(){if("withLog"==e.previewState)return r(Ehe),void i(_he);"noLog"!=e.previewState?Promise.all([nhe.getDailyLogEntries(pH(Un(o,{days:-1}))),nhe.getConfiguration()]).then((function([e,t]){r(t),e[pH(o)]?i(e[pH(o)]):i(void 0)})):r(Ehe)}return o=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0,0),f((()=>(s(),b.on("applicationDidBecomeVisible",s),()=>{b.off("applicationDidBecomeVisible",s)})),[]),n&&n.symptoms.length?t.createElement(ghe,{onClick:t=>e.onClick(t),innerRef:e.innerRef,title:az(a?"todays-log":"log-todays-symptoms"),date:o,logEntry:a,configuration:n}):null}function The(e){const[n,r]=m(null),[a,i]=m(!1),[o,s]=m(null),[l,c]=m(!1),[u,d]=m(null);function h(e,t){t==az("mild-shortened")?t=2:t==az("moderate-shortened")?t=5:t==az("severe-shortened")&&(t=8);var r=Object.assign({},n),a=[...r.symptoms];a.find((t=>t.id==e.id))&&a.splice(a.findIndex((t=>t.id==e.id)),1),t&&a.push({id:e.id,severity:t}),r.symptoms=a,p(r),d(null)}function p(t){r(t),"default"!=e.previewState&&(c(!0),nhe.saveDailyLogEntry(pH(e.date),t).then((function(){c(!1)})))}function v(e){var t=Object.assign({},n);t.overallFeeling==e?t.overallFeeling=void 0:t.overallFeeling=e,p(t)}f((()=>{!function(){if("default"==e.previewState)return s(Ehe),void r(_he);var t=Un(e.date,{days:-14}),n=Un(e.date,{days:1});nhe.getConfiguration().then((function(a){nhe.getDailyLogEntries(ha(t),ha(n)).then((function(t){s(a),t[pH(e.date)]?r(t[pH(e.date)]):r({symptoms:[],treatments:[],notes:""}),e.promptForReviewAfterDays&&Object.keys(t).length>e.promptForReviewAfterDays&&i(!0)}))}))}()}),[]);const y=g((()=>$R.debounce(p,300)),[]);var w,x,k,S=sz(e.date);function A(e){var t=n.symptoms.find((t=>t.id==e.id));if(t){if("10PointScale"==e.severityTracking){if(!t.severity)return;return t.severity.toString()}if("3PointScale"==e.severityTracking){if(!t.severity)return;if(t.severity>0&&t.severity<=3)return az("mild-shortened");if(t.severity>3&&t.severity<=7)return az("moderate-shortened");if(t.severity>7)return az("severe-shortened")}}}return S+=", "+ia(e.date,"MMM d, yyyy"),t.createElement("div",{className:"mdhui-ss-log-entry-edit-wrapper"},t.createElement(Iz,{title:S,showBackButton:!0,variant:"compressed",backgroundColor:"var(--mdhui-background-color-0)",className:"mdhui-ss-edit-nav"}),t.createElement("div",{className:"mdhui-ss-log-entry-edit"},!n&&t.createElement(Dn,null),!!n&&!!o&&t.createElement(t.Fragment,null,t.createElement("div",{style:{width:"100%",overflow:"hidden"}},(x=(w=n).symptoms.map((e=>{var t;return null===(t=o.symptoms.find((t=>t.id==e.id)))||void 0===t?void 0:t.color})).filter((e=>!!e)).map((e=>e)),k=w.treatments.map((e=>{var t;return null===(t=o.treatments.find((t=>t.id==e.id)))||void 0===t?void 0:t.color})).filter((e=>!!e)).map((e=>e)),t.createElement(xz,{size:"large",key:x.join("|")+","+k.join("|"),primaryColors:x,secondaryColors:k}))),tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("symptoms-experiencing-today")),!tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("symptoms-experiencing-previous")),t.createElement("div",{className:"mdhui-ss-edit-items"},null==o?void 0:o.symptoms.filter((e=>!e.inactive)).map((e=>t.createElement(rL,{className:"mdhui-ss-edit-item",selected:!!n.symptoms.find((t=>t.id==e.id)),color:e.color,text:e.name,key:e.id,onClick:()=>function(e){if("10PointScale"!=e.severityTracking&&"3PointScale"!=e.severityTracking){var t=Object.assign({},n),r=[...t.symptoms];r.find((t=>t.id==e.id))?r.splice(r.findIndex((t=>t.id==e.id)),1):r.push({id:e.id}),t.symptoms=r,p(t)}else d(e)}(e),badge:A(e)})))),o.treatments.length>0&&t.createElement("div",null,tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("treatments-experiencing-today")),!tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("treatments-experiencing-previous")),t.createElement("div",{className:"mdhui-ss-edit-items"},null==o?void 0:o.treatments.filter((e=>!e.inactive)).map((e=>t.createElement(rL,{className:"mdhui-ss-edit-item",selected:!!n.treatments.find((t=>t.id==e.id)),color:e.color,text:e.name,key:e.id,onClick:()=>{return t=e,r=Object.assign({},n),(a=[...r.treatments]).find((e=>e.id==t.id))?a.splice(a.findIndex((e=>e.id==t.id)),1):a.push({id:t.id}),r.treatments=a,void p(r);var t,r,a},bordered:!0}))))),tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("feeling-overall-today")),!tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("feeling-overall-previous")),t.createElement("div",{className:"mdhui-ss-edit-items"},t.createElement(Pz,{className:"mdhui-ss-edit-face",faceValue:5,selected:5==n.overallFeeling,onClick:()=>v(5)}),t.createElement(Pz,{className:"mdhui-ss-edit-face",faceValue:4,selected:4==n.overallFeeling,onClick:()=>v(4)}),t.createElement(Pz,{className:"mdhui-ss-edit-face",faceValue:3,selected:3==n.overallFeeling,onClick:()=>v(3)}),t.createElement(Pz,{className:"mdhui-ss-edit-face",faceValue:2,selected:2==n.overallFeeling,onClick:()=>v(2)}),t.createElement(Pz,{className:"mdhui-ss-edit-face",faceValue:1,selected:1==n.overallFeeling,onClick:()=>v(1)})),t.createElement(bz,{className:"mdhui-ss-edit-title",order:3,style:{marginBottom:"16px"}},az("additional-notes")),t.createElement(Mz,{placeholder:az("add-notes"),autoTimestamp:tr(new Date,e.date),onChange:e=>{return t=e,(a=Object.assign({},n)).notes=t,r(a),void y(a);var t,a},value:n.notes}),t.createElement(Nn,{onClick:()=>(a&&b.requestReview(7),void(l||b.back()))},az("done")),u&&t.createElement("div",{className:"mdhui-ss-symptom-edit-modal"},t.createElement("div",{className:"mdhui-ss-symptom-edit-padder"},t.createElement("div",{className:"mdhui-ss-symptom-edit-container"},t.createElement(bz,{className:"mdhui-ss-edit-title",order:3,style:{marginBottom:"16px"}},tr(new Date,e.date)?az("how-severe-is"):az("how-severe-was")," ",u.name,"?"),"3PointScale"==u.severityTracking&&t.createElement(Wz,{variant:"optionsVertical",segments:[{key:az("mild-shortened"),title:az("mild")},{key:az("moderate-shortened"),title:az("moderate")},{key:az("severe-shortened"),title:az("severe")}],selectedSegment:A(u),onSegmentSelected:e=>h(u,e)}),"10PointScale"==u.severityTracking&&t.createElement(Wz,{variant:"optionsVertical",segments:[1,2,3,4,5,6,7,8,9,10].map((e=>({key:e.toString(),title:e.toString()}))),selectedSegment:A(u),onSegmentSelected:e=>h(u,parseInt(e))}),t.createElement(Nn,{className:"mdhui-ss-clear-symptom",variant:"subtle",onClick:()=>h(u,null)},az("clear-symptom"))))))))}A(".mdhui-ss-log-entry-edit-wrapper {\n background: var(--mdhui-background-color-0);\n}\n\n.mdhui-ss-log-entry-edit {\n text-align: center;\n padding-left: 16px;\n padding-right: 16px;\n padding-bottom: 16px;\n padding-top: 8px;\n position: relative;\n /*Prevents keyboard from covering notes on Android devices*/\n padding-bottom: 300px;\n overflow-x: hidden;\n width: 100%;\n box-sizing: border-box;\n}\n\n\n.mdhui-ss-log-entry-edit .mdhui-ss-edit-title {\n text-align: center;\n margin-bottom: 0;\n margin-top: 16px;\n display: block;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-edit-items {\n padding-top: 8px;\n padding-bottom: 16px;\n text-align: center;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-edit-item {\n margin: 4px;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-edit-face {\n margin-left: 8px;\n margin-right: 8px;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-symptom-edit-modal {\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: var(--mdhui-modal-overlay-color);\n overflow: auto;\n z-index: 999;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-symptom-edit-padder {\n padding-bottom: 16px;\n position: absolute;\n padding-top: 48px;\n top: env(safe-area-inset-top);\n left: 48px;\n right: 48px;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-symptom-edit-container {\n border-radius: var(--mdhui-card-border-radius);\n background: var(--mdhui-background-color-0);\n padding: 16px;\n}");function Phe(e){var n=hr(new Date);const[r,a]=m({}),[i,o]=m(null),[s,l]=m(n),[c,u]=m(!0),[h,p]=m(!1),[f,g]=m(!1),[v,y]=m(!0),[w,x]=m([]),[k,S]=m([]),[A,_]=m(!0),[C,O]=m(!1),[T,P]=m(!1),D=d(null);if(cU((()=>{if("default"==e.previewState)return o({participantID:"1",symptoms:ihe,treatments:ohe}),void a(she);nhe.getConfiguration().then((function(e){nhe.getDailyLogEntries().then((function(t){o(e),a(t)}))}))}),[],[]),!i||!r)return t.createElement("div",{ref:e.innerRef},t.createElement(Dn,null));function N(){P(!0);for(var e,t,n=document.head.getElementsByTagName("style"),r="",a=0;a<n.length;a++)r+=n[a].outerHTML;r+=D.current.innerHTML,(e=r,t=i.participantID,b.persistDeviceData([{type:"ReportHtml",observationDate:ha(new Date),value:e}]).then((function(){var e=b.baseUrl+"WebVisualization/WebVisualizationPDF?patientID="+t+"&modelType=VisualizationModel&visualizationKey=Shared.HtmlToPdf";return b.getDeviceInfo().then((function(t){t&&"Web"!=t.platform?window.webkit.messageHandlers.OpenFile.postMessage({url:e}):window.open(e)}))}))).then((function(){P(!1)}))}return t.createElement("div",{className:"ss-report-builder"},t.createElement(Vz,{className:"ss-report-builder-items",noTopMargin:!0},t.createElement("div",{className:"ss-report-builder-item ss-report-builder-month-selector"},t.createElement("div",{className:"ss-report-builder-selector-title"},az("choose-report-month")),t.createElement(dz,{className:"ss-report-date-chooser",variant:"rounded",intervalStart:s,intervalType:"Month",onIntervalChange:e=>l(e)})),t.createElement(E,{className:"ss-report-builder-item",onClick:()=>u(!c)},t.createElement("div",{className:"ss-report-builder-item-title"},az("include-symptoms")),t.createElement("div",{className:"ss-report-builder-item-status"},t.createElement(Mq,{icon:c?Rq:zq}))),c&&t.createElement("div",{className:"ss-report-builder-item"},t.createElement("div",{className:"ss-report-builder-item-title"},az("select-symptoms")),t.createElement(E,{className:"ss-report-builder-item-status",onClick:()=>p(!h)},0==w.length?"All":w.length+" Selected"," ",t.createElement(Mq,{icon:h?en:Sn})),h&&t.createElement("div",{className:"ss-report-items",style:{textAlign:"center"}},i.symptoms.filter((e=>!e.inactive)).map((e=>t.createElement(rL,{className:"ss-report-item",key:e.id,selected:-1!=w.indexOf(e.id),color:e.color,text:e.name,onClick:()=>{return t=e,(n=[...w]).includes(t.id)?n.splice(n.indexOf(t.id),1):n.push(t.id),void x(n);var t,n}}))))),i.treatments.length>0&&t.createElement(t.Fragment,null,t.createElement(E,{className:"ss-report-builder-item",onClick:()=>y(!v)},t.createElement("div",{className:"ss-report-builder-item-title"},az("include-treatments")),t.createElement("div",{className:"ss-report-builder-item-status"},t.createElement(Mq,{icon:v?Rq:zq}))),v&&t.createElement("div",{className:"ss-report-builder-item"},t.createElement("div",{className:"ss-report-builder-item-title"},az("select-treatments")),t.createElement(E,{className:"ss-report-builder-item-status",onClick:()=>g(!f)},0==k.length?"All":k.length+" Selected"," ",t.createElement(Mq,{icon:f?en:Sn})),f&&t.createElement("div",{className:"ss-report-items",style:{textAlign:"center"}},i.treatments.filter((e=>!e.inactive)).map((e=>t.createElement(rL,{bordered:!0,className:"ss-report-item",key:e.id,selected:-1!=k.indexOf(e.id),color:e.color,text:e.name,onClick:()=>{return t=e,(n=[...k]).includes(t.id)?n.splice(n.indexOf(t.id),1):n.push(t.id),void S(n);var t,n}})))))),t.createElement(E,{className:"ss-report-builder-item",onClick:()=>_(!A)},t.createElement("div",{className:"ss-report-builder-item-title"},az("include-overall-experience")),t.createElement("div",{className:"ss-report-builder-item-status"},t.createElement(Mq,{icon:A?Rq:zq}))),t.createElement(E,{className:"ss-report-builder-item",onClick:()=>O(!C)},t.createElement("div",{className:"ss-report-builder-item-title"},az("include-notes")),t.createElement("div",{className:"ss-report-builder-item-status"},t.createElement(Mq,{icon:C?Rq:zq})))),t.createElement("div",{style:{padding:"16px",paddingTop:"0"}},t.createElement(Nn,{loading:T,disabled:T||!c&&!v&&!C&&!A,onClick:()=>N()},!T&&t.createElement("span",null,az("create-report")))),t.createElement("div",{ref:D,style:{display:"none"}},t.createElement(vz.Provider,{value:{intervalStart:s,intervalType:"Month"}},t.createElement(uhe.Provider,{value:{logEntries:r,symptoms:c?i.symptoms.filter((e=>!w.length||-1!=w.indexOf(e.id))):[],treatments:v?i.treatments.filter((e=>!k.length||-1!=k.indexOf(e.id))):[],hasFilteredSymptoms:!!w.length}},t.createElement(khe,{includeDailyOverallFeeling:A,includeNotes:C,productLogo:e.productLogo,productUrl:e.productUrl,productName:e.productName})))))}function Dhe(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"light"},t.createElement(yz,{variant:"rounded",intervalType:"Month",sticky:!0},t.createElement(dhe,{showFilters:!0,previewState:e.previewState},t.createElement(Vz,null,t.createElement(mhe,{onDaySelected:e.onDaySelected})),t.createElement(Vz,null,t.createElement(She,{onSymptomSelected:e.onSymptomSelected})),t.createElement(Vz,null,t.createElement(fhe,null)),t.createElement(Nhe,null))))}function Nhe(){let e=i(uhe);if(!e)return t.createElement(nL,null,"Error: Calendar severity charts must be used inside a Symptom Shark Visualization Coordinator.");let{hasFilteredSymptoms:n,symptoms:r}=e;return n?t.createElement(t.Fragment,null,r.filter((e=>"None"!=e.severityTracking)).map((e=>t.createElement(Vz,{key:e.id},t.createElement(xhe,{symptom:e}))))):null}function Ihe(e){return t.createElement(Kt,{bodyBackgroundColor:"var(--mdhui-background-color-0)",colorScheme:e.colorScheme||"light"},t.createElement(The,Object.assign({},e)))}function Mhe(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"light"},t.createElement(Iz,{variant:"compressed",title:az("reports")}),t.createElement(Phe,{previewState:e.previewState}))}function jhe(e){return t.createElement(Kt,{colorScheme:e.colorScheme||"light",className:"symptom-detail-view symptom-shark-view"},t.createElement(dhe,{previewState:e.previewState},t.createElement(Rhe,Object.assign({},e))))}function Rhe(e){let n=i(uhe);if(!n)return null;let r=n.symptoms.find((t=>t.id==e.symptomId));if(!r)return null;var a=e.initialIntervalStart||hr(new Date);return t.createElement(t.Fragment,null,t.createElement(Iz,{title:r.name,showCloseButton:!0}),t.createElement(yz,{initialIntervalStart:a,intervalType:"Month",variant:"rounded"},t.createElement(Vz,{noTopMargin:!0},t.createElement(Ahe,{symptom:r})),t.createElement(Vz,null,t.createElement(xhe,{symptom:r}))))}function zhe(e){return t.createElement(Kt,null,t.createElement(Iz,{showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation},t.createElement(bz,{order:2,autosizeImage:!0,image:t.createElement("img",{src:FW}),imageAlignment:"left"},az("allergies-title"))),t.createElement(Ms,null,t.createElement(iV,{previewState:e.previewState,onViewTermInfo:t=>function(t){if(e.onViewTermInfo)e.onViewTermInfo(t);else{var n=new URLSearchParams({termFamily:t.TermFamily,termNamespace:t.TermNamespace,termCode:t.TermCode,lang:b.getCurrentLanguage()}).toString();b.openApplication("https://hw.careevolutionapps.com/TermInformation.html?"+n,{modal:!0})}}(t)})))}function Lhe(e){var n;return t.createElement(Kt,{bodyBackgroundColor:e.bodyBackgroundColor,colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",primaryColor:e.primaryColor},(e.showBackButton||e.showCloseButton)&&t.createElement(Iz,{title:e.title,showBackButton:e.showBackButton,showCloseButton:e.showCloseButton,subtitle:e.subtitle,titleColor:e.titleColor,subtitleColor:e.subtitleColor,buttonColor:e.navigationBarButtonColor}),!(e.showBackButton||e.showCloseButton)&&t.createElement(t.Fragment,null,t.createElement(tL,null),t.createElement(Fq,{title:e.title,subtitle:e.subtitle,titleColor:e.titleColor,subtitleColor:e.subtitleColor})),e.children)}function Fhe(e){return t.createElement(Kt,null,t.createElement(Iz,{showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation},t.createElement(bz,{order:2,autosizeImage:!0,image:t.createElement("img",{src:qW}),imageAlignment:"left"},az("conditions-title"))),t.createElement(Ms,null,t.createElement(mV,{previewState:e.previewState,onViewTermInfo:t=>function(t){if(e.onViewTermInfo)e.onViewTermInfo(t);else{var n=new URLSearchParams({termFamily:t.TermFamily,termNamespace:t.TermNamespace,termCode:t.TermCode,lang:b.getCurrentLanguage()}).toString();b.openApplication("https://hw.careevolutionapps.com/TermInformation.html?"+n,{modal:!0})}}(t)})))}function Bhe(e){var n;let r="",a=[];return e.excludeProviders||(a.push("Provider"),r+=az("connect-ehr-title-providers")),e.excludeHealthPlans||(a.push("Health Plan"),r.length>0&&(r+=az("connect-ehr-title-divider")),r+=az("connect-ehr-title-health-plans")),r=az("connect-ehr-title-prefix")+r,t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},e.presentation&&t.createElement(Iz,{title:r,showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(tL,null),t.createElement(nL,null,az("ehr-intro")),t.createElement(Ms,null,t.createElement(xW,{previewState:e.preview?"Default":void 0,applicationUrl:e.externalAccountsApplicationUrl,excludeProviders:e.excludeProviders,excludeHealthPlans:e.excludeHealthPlans,excludeDeviceManufacturers:!0})),t.createElement(Ms,null,t.createElement(hG,{previewState:e.preview?"Default":void 0,providerCategories:a})))}function qhe(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(tL,null),t.createElement(Ms,{allowOverflow:!0},t.createElement(FV,{previewState:e.preview?"Default":void 0})),t.createElement(Ms,null,t.createElement(IW,{previewState:e.preview?"connected":void 0})),t.createElement(Ms,null,t.createElement(zW,{previewState:e.preview?"connected":void 0})),t.createElement(Ms,null,t.createElement(EV,{previewState:e.preview?"Web":void 0})))}function Hhe(e){let n="",r=t.createElement(t.Fragment,null);switch(e.feed){case"Procedures":n=az("procedures-title"),r=t.createElement("img",{src:XV});break;case"Reports":n=az("reports-title"),r=t.createElement("img",{src:KV});break;case"Immunizations":n=az("immunizations-title"),r=t.createElement("img",{src:QV});break;case"LabReports":n=az("lab-results-title"),r=t.createElement("img",{src:JV})}return t.createElement(Kt,{colorScheme:e.colorScheme},t.createElement(Iz,{showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation},t.createElement(bz,{order:2,autosizeImage:!0,image:r,imageAlignment:"left"},n)),t.createElement(sW,{feed:e.feed,onEventSelected:e.onEventSelected,onReportSelected:e.onReportSelected,previewState:e.previewState}))}function Uhe(e){return t.createElement(Kt,{colorScheme:e.colorScheme},t.createElement(Iz,{variant:"compressed",showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),t.createElement(cW,{feed:e.feed,pageId:e.pageId,pageDate:e.pageDate,previewState:e.previewState,onViewLabObservationTermInfo:e.onViewLabObservationTermInfo}))}function Vhe(e){var n;let r="",a=[];return e.excludeProviders||(a.push("Provider"),r+=az("external-accounts-title-providers")),e.excludeHealthPlans||(a.push("Health Plan"),r.length>0&&(r+=az("external-accounts-title-divider")),r+=az("external-accounts-title-health-plans")),e.excludeDeviceManufacturers||(a.push("Device Manufacturer"),r.length>0&&(r+=az("external-accounts-title-divider")),r+=az("external-accounts-title-devices")),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},e.presentation&&t.createElement(Iz,{title:r,showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation,onBack:e.onBack,onClose:e.onClose}),!e.presentation&&t.createElement(tL,null),t.createElement(vW,{previewState:e.previewState,externalAccountProviderCategories:a,onExternalAccountsLoaded:function(t){0===t.length&&("Modal"===e.presentation?b.dismiss():b.back())},connectExternalAccountOptions:e.connectExternalAccountOptions}))}function Whe(e){var n,[r,a]=m(!1);return f((()=>{b.connect().then((()=>{a(!0)}))}),[]),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(tL,null),r&&t.createElement(t.Fragment,null,t.createElement(Ms,null,t.createElement(MV,{previewState:e.connectPreview,disabledBehavior:"displayError"})),t.createElement(Ms,null,t.createElement(IW,{previewState:e.devicesPreview})),t.createElement(Ms,{allowOverflow:!0},t.createElement(jW,{previewState:e.chartsPreview}))),!r&&t.createElement(Dn,null))}function Ghe(e){var[n,r]=m(!1);return f((()=>{b.connect().then((()=>{r(!0)}))}),[]),t.createElement(Kt,null,t.createElement(tL,{color:"var(--main-bg-color)"}),n&&t.createElement(t.Fragment,null,t.createElement(Ms,null,t.createElement(jV,{previewState:e.connectPreview,garminProviderID:e.garminProviderID,disabledBehavior:"displayError"})),t.createElement(Ms,null,t.createElement(zW,{previewState:e.devicesPreview})),t.createElement(Ms,{allowOverflow:!0},t.createElement(LW,{previewState:e.chartsPreview}))),!n&&t.createElement(Dn,null))}function $he(e){var n,r="Push";e.notificationType&&(r=e.notificationType);return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(tL,{color:"#FFFFFF"}),t.createElement(Ms,null,t.createElement(cV,{previewDevicePlatform:e.preview?"Web":void 0,previewProjectPlatforms:e.preview?["Web","Android","iOS"]:void 0})),t.createElement(Ms,null,t.createElement(eG,{notificationType:r,onViewMore:e.notificationsViewUrl?()=>{e.notificationsViewUrl&&b.openApplication(e.notificationsViewUrl)}:void 0,previewState:e.preview?"Default":void 0,hideAfterHours:e.notificationHideAfterHours})),t.createElement(AG,{variant:"singleCard",status:"incomplete",limit:3,title:az("tasks"),onDetailLinkClick:e.tasksViewUrl?()=>{e.tasksViewUrl&&b.openApplication(e.tasksViewUrl)}:void 0,previewState:e.preview?"IncompleteTasks":void 0}),t.createElement(Ms,null,t.createElement(EV,{headerVariant:"medium",previewState:e.preview?"Web":void 0})),t.createElement(Ms,null,e.ehrConnectApplicationUrl&&t.createElement(DV,{variant:"medium",previewState:e.preview?"enabled":void 0,applicationUrl:e.ehrConnectApplicationUrl})),t.createElement(Ms,null,t.createElement(sG,{previewState:e.preview?"Default":void 0})))}function Zhe(e){var n,r;function a(){b.openApplication("https://hw.careevolutionapps.com/LabReports.html?lang="+b.getCurrentLanguage())}function i(e){var t=new URLSearchParams({termFamily:e.TermFamily,termNamespace:e.TermNamespace,termCode:e.TermCode,lang:b.getCurrentLanguage()}).toString();b.openApplication("https://hw.careevolutionapps.com/TermInformation.html?"+t,{modal:!0})}let o=null!==(n=e.variant)&&void 0!==n?n:"default";function s(n){var r=function(){return t.createElement(HW,{concept:n,onClick:()=>function(e){b.openApplication("https://hw.careevolutionapps.com/"+e+".html")}(n),previewState:"default"==e.previewState?"Default":void 0,indicatorPosition:"cardBased"==o?"topRight":"default"})};return"cardBased"==e.variant?t.createElement(Ms,null,r()):r()}return t.createElement(Kt,{colorScheme:null!==(r=e.colorScheme)&&void 0!==r?r:"auto"},t.createElement(tL,null),t.createElement(bW,{previewState:"default"==e.previewState?"externalAccountsLoaded":void 0,externalAccountCategories:["Provider","Health Plan"]}),"default"==o&&t.createElement(Vz,{noTopMargin:!0},t.createElement(XW,{onViewTermInfo:e=>i(e),onClick:()=>a(),previewState:"default"==e.previewState?"ImportantLabs":void 0}),t.createElement($W,{previewState:"default"==e.previewState?"BloodTypeLabs":void 0}),s("Medications"),s("Immunizations"),s("Reports"),s("Allergies"),s("Conditions"),s("Procedures"),t.createElement(xW,{excludeDeviceManufacturers:!0,applicationUrl:e.externalAccountsApplicationUrl,previewState:"default"==e.previewState?"Default":void 0})),"cardBased"==o&&t.createElement(t.Fragment,null,t.createElement(Ms,null,t.createElement(XW,{onViewTermInfo:e=>i(e),onClick:()=>a(),previewState:"default"==e.previewState?"ImportantLabs":void 0})),t.createElement(Ms,null,t.createElement($W,{previewState:"default"==e.previewState?"BloodTypeLabs":void 0})),s("Medications"),s("Immunizations"),s("Reports"),s("Allergies"),s("Conditions"),s("Procedures"),t.createElement(Ms,null,t.createElement(xW,{excludeDeviceManufacturers:!0,applicationUrl:e.externalAccountsApplicationUrl,previewState:"default"==e.previewState?"Default":void 0}))),t.createElement(Ms,null,t.createElement(DV,{bottomBorder:!0,applicationUrl:e.connectEhrApplicationUrl,previewState:"default"==e.previewState?"enabledConnected":void 0})))}function Yhe(e){return t.createElement(Kt,null,t.createElement(Iz,{showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation},t.createElement(bz,{order:2,autosizeImage:!0,image:t.createElement("img",{src:BW}),imageAlignment:"left"},az("medications-title"))),t.createElement(Ms,null,t.createElement(QW,{previewState:e.previewState,onViewTermInfo:t=>function(t){if(e.onViewTermInfo)e.onViewTermInfo(t);else{var n=new URLSearchParams({termFamily:t.TermFamily,termNamespace:t.TermNamespace,termCode:t.TermCode,lang:b.getCurrentLanguage()}).toString();b.openApplication("https://hw.careevolutionapps.com/TermInformation.html?"+n,{modal:!0})}}(t)})))}function Khe(e){var n,r="Push";return e.notificationType&&(r=e.notificationType),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},e.presentation&&t.createElement(Iz,{title:az("notifications"),showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(tL,null),t.createElement(nG,{notificationType:r,previewState:e.preview?"Default":void 0}))}function Xhe(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},e.presentation&&t.createElement(Iz,{title:az("tasks"),showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(tL,null),!e.hideIncompleteTasks&&t.createElement(AG,{variant:"multiCard",title:az("incomplete-tasks"),status:"incomplete",previewState:e.preview?"IncompleteTasks":void 0}),!e.hideCompleteTasks&&t.createElement(AG,{variant:"multiCard",title:az("completed-tasks"),status:"complete",previewState:e.preview?"CompleteTasks":void 0}))}A(".ss-report-builder {\n padding-bottom: env(safe-area-inset-bottom);\n position: relative;\n padding-bottom: 16px;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item {\n border-bottom: solid 1px var(--mdhui-border-color-1);\n padding: 16px;\n background: var(--mdhui-background-color-0);\n position: relative;\n cursor: pointer;\n width: 100%;\n box-sizing: border-box;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item .ss-report-builder-item-title {\n font-weight: normal;\n font-size: 17px;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item .ss-report-builder-item-status {\n position: absolute;\n right: 0;\n top: 0;\n padding: 16px;\n cursor: pointer;\n text-align: right;\n width: 100%;\n font-weight: bold;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item svg {\n color: var(--mdhui-text-color-3);\n font-size: 17px;\n top: calc(50% - 16px);\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item .fa-circle-check {\n color: var(--mdhui-color-success);\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item.ss-report-builder-month-selector {\n text-align: center;\n font-size: 17px;\n font-weight: bold;\n cursor: auto;\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item.ss-report-month-selector .ss-report-builder-selector-title {\n text-transform: uppercase;\n font-size: 12px;\n color: var(--mdhui-text-color-2);\n padding-bottom: 4px;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-date-chooser {\n background: none;\n}\n\n.ss-report-builder .ss-report-items {\n margin-top: 12px;\n margin-bottom: -4px;\n}\n\n.ss-report-builder .ss-report-items .ss-report-item {\n margin: 4px;\n}\n\n.ss-report-builder .ss-report-report-date-chooser {\n margin: 0;\n}");function Qhe(e){var n,r;let a=e.entries.reduce(((e,t)=>e+(t.bonusPoints||0)),0),i=e.entries.reduce(((e,t)=>e+t.points),a);return t.createElement(Kt,{bodyBackgroundColor:"dark"===e.colorScheme?"":"#fff",colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",primaryColor:e.primaryColor},t.createElement("div",{className:"mdhui-new-points"},t.createElement(zz,{animate:!0},t.createElement("div",{className:"mdhui-new-points-total"},t.createElement("div",{className:"mdhui-new-points-total-points"},"+",i),t.createElement("div",{className:"mdhui-new-points-total-points-label"},"points"))),t.createElement("div",{className:"mdhui-new-points-content"},1==e.entries.length&&e.entries[0].message&&0===a&&t.createElement("div",null,t.createElement("div",{className:"mdhui-new-points-title"},e.entries[0].message.title),t.createElement("div",{className:"mdhui-new-points-text"},e.entries[0].message.text)),(e.entries.length>1||!e.entries[0].message||a>0)&&t.createElement("div",null,t.createElement("div",{className:"mdhui-new-points-title"},az("new-points-title")),t.createElement("div",{className:"mdhui-new-points-text"},az("new-points-text")),t.createElement("div",{className:"mdhui-new-points-entries"},e.entries.map(((e,n)=>t.createElement("div",{key:n,className:"mdhui-new-points-entry"},t.createElement("div",{className:"mdhui-new-points-entry-name"},e.name),t.createElement("div",{className:"mdhui-new-points-entry-points"},"+",e.points)))),a>0&&t.createElement("div",{className:"mdhui-new-points-entry"},t.createElement("div",{className:"mdhui-new-points-entry-name bonus"},"Bonus"),t.createElement("div",{className:"mdhui-new-points-entry-points bonus"},"+",a)))),e.pointsToNextReward&&t.createElement("div",{className:"mdhui-new-points-next-reward"},az("new-points-next-reward-prefix"),t.createElement("span",{className:"mdhui-new-points-next-reward-points"},e.pointsToNextReward),az("new-points-next-reward-suffix"))),t.createElement("div",{className:"mdhui-new-points-button-panel"},t.createElement(Nn,{onClick:()=>b.dismiss()},null!==(r=e.doneButtonText)&&void 0!==r?r:az("new-points-done-button-text")))))}function Jhe(e,t){let n={type:"MDHUI-NewPoints",value:JSON.stringify(e)};b.persistDeviceData([n]).then((()=>{b.openApplication(t||"https://viewlibrary.careevolutionapps.com/newpoints",{modal:!0})}))}A(".mdhui-new-points {\n margin: calc(20px + env(safe-area-inset-top, 0px)) 20px 20px;\n}\n\n.mdhui-new-points-total {\n margin-top: 10px;\n text-align: center;\n}\n\n.mdhui-new-points-total-points {\n font-weight: bold;\n font-size: 40px;\n height: 50px;\n line-height: 50px;\n color: var(--mdhui-color-primary);\n}\n\n.mdhui-new-points-content {\n text-align: center;\n opacity: 0;\n animation: fadein 750ms ease-in-out;\n animation-delay: 750ms;\n animation-fill-mode: forwards;\n}\n\n.mdhui-new-points-title {\n margin: 32px 0 20px 0;\n font-size: 2em;\n font-weight: bold;\n}\n\n.mdhui-new-points-text {\n padding: 0 20px;\n}\n\n.mdhui-new-points-entries {\n margin-top: 20px;\n text-align: left;\n}\n\n.mdhui-new-points-entry {\n display: grid;\n grid-template-columns: auto max-content;\n align-items: center;\n}\n\n.mdhui-new-points-entry-name {\n font-size: 1.1em;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.mdhui-new-points-entry-points {\n width: 50px;\n color: var(--mdhui-color-primary);\n font-size: 1.1em;\n font-weight: bold;\n text-align: end;\n}\n\n.mdhui-new-points-next-reward {\n margin-top: 20px;\n padding: 0 20px;\n}\n\n.mdhui-new-points-next-reward-points {\n color: var(--mdhui-color-primary);\n font-weight: bold;\n}\n\n.mdhui-new-points-entry .bonus {\n color: #ffcc5b;\n font-weight: bold;\n}\n\n.mdhui-new-points-button-panel {\n margin: 20px 0 36px 0;\n opacity: 0;\n animation: fadein 750ms ease-in-out;\n animation-delay: 750ms;\n animation-fill-mode: forwards;\n}");function eme(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(cK,null,t.createElement(tme,Object.assign({},e))))}function tme(e){const[n,r]=m(),[a,i]=m(),[o,s]=m();let l=!n&&!a&&!o,c=[...null!=n?n:[],...null!=a?a:[],...null!=o?o:[]];return t.createElement("div",{className:"mdhui-inbox"},t.createElement(Fq,{title:az("inbox-view-title")}),l&&t.createElement(Dn,null),!l&&0===c.length&&t.createElement("div",{className:"mdhui-inbox-empty-text"},az("inbox-view-empty-text")),t.createElement(hK,{previewState:"default"===e.previewState?"incomplete message":void 0,title:az("inbox-view-messages-title"),type:"message",status:"incomplete",sortOrder:"descending",sortColumn:"insertedDate",messageViewerUrl:e.messageViewerUrl,onItemsLoaded:r,hideLoadingIndicator:!0,category:e.itemCategory}),t.createElement(hK,{previewState:"default"===e.previewState?"incomplete survey":void 0,title:az("inbox-view-surveys-title"),type:"survey",status:"incomplete",sortOrder:"ascending",sortColumn:"dueDate",onItemsLoaded:i,hideLoadingIndicator:!0,surveyVariant:e.surveyVariant,category:e.itemCategory}),t.createElement(hK,{previewState:"default"===e.previewState?"incomplete resource":void 0,title:az("inbox-view-resources-title"),type:"resource",status:"incomplete",sortOrder:"descending",sortColumn:"insertedDate",onItemsLoaded:s,hideLoadingIndicator:!0,resourceImageAlignment:e.resourceImageAlignment,category:e.itemCategory}),t.createElement("div",{className:"mdhui-inbox-recently-completed"},t.createElement(hK,{previewState:"default"===e.previewState?"complete items":void 0,title:az("inbox-view-recently-completed-title"),status:"complete",sortOrder:"descending",sortColumn:"endDate",messageViewerUrl:e.messageViewerUrl,endsAfter:Un(new Date,{days:-3}).toISOString(),showTitleWhenEmpty:!0,emptyText:az("inbox-view-recently-completed-empty-text"),syncOnChanges:!0,category:e.itemCategory}),!l&&t.createElement(Ms,null,t.createElement(Xt,{title:az("inbox-view-history-button-text"),onClick:()=>{b.openApplication(e.historyViewerUrl,{modal:!0})}}))))}A(".mdhui-inbox {\n padding: calc(env(safe-area-inset-top, 0px) + 20px) 16px calc(env(safe-area-inset-bottom, 0px) + 20px);\n}\n\n.mdhui-inbox .mdhui-view-header {\n padding: 0;\n}\n\n.mdhui-inbox .mdhui-view-header .mdhui-view-header-title {\n font-size: 1.8em;\n}\n\n.mdhui-inbox-empty-text {\n color: var(--mdhui-text-color-3);\n padding: 16px 0;\n}\n\n.mdhui-inbox-recently-completed {\n margin-top: 20px;\n}\n\n.mdhui-inbox-recently-completed .mdhui-inbox-item-list-title {\n color: var(--mdhui-text-color-0);\n margin-bottom: 12px;\n font-size: 1.4em;\n font-weight: bold;\n}\n\n.mdhui-inbox-recently-completed .mdhui-card {\n margin: 12px 0 0 0;\n}");function nme(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(Iz,{showCloseButton:!0}),t.createElement("div",{className:"mdhui-inbox-history"},t.createElement(bz,{order:3},az("inbox-history-view-title")),t.createElement(hK,{previewState:"default"===e.previewState?"complete items":void 0,status:"complete",messageViewerUrl:e.messageViewerUrl,emptyText:az("inbox-history-view-empty-text")})))}function rme(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0},t.createElement(bz,{order:1},e.title)),t.createElement(Hz,{previewState:e.previewState,resources:e.resources,onViewResource:t=>{e.previewState||b.openEmbeddedUrl(t.url)},emptyText:e.emptyText,imageAlignment:e.resourceImageAlignment,buttonVariant:e.resourceButtonVariant,buttonText:e.resourceButtonText}))}A(".mdhui-inbox-history {\n padding: calc(env(safe-area-inset-top, 0px)) 16px calc(env(safe-area-inset-bottom, 0px) + 20px);\n}");function ame(e){return t.createElement("div",{className:"mdhui-report-content"},"text/html"==e.contentType&&t.createElement("iframe",{sandbox:"",srcDoc:e.content}),"application/pdf"==e.contentType&&t.createElement("div",{className:"mdhui-report-content-download-pdf","ng-if":"$ctrl.report.ContentType == 'application/pdf'","ng-show":"$ctrl.srcSet = true"},t.createElement("a",{href:"data:application/pdf;base64,"+e.content,download:e.type+".pdf",title:"Download PDF Report"},t.createElement(D,{icon:wn}),"Download PDF Report")))}A(".mdhui-report-content {\n min-height: 200px;\n}\n\n.mdhui-report-content iframe {\n border: none;\n padding: 0;\n margin: 0;\n width: 100%;\n height: 100%;\n background: #FFF;\n min-height: 200px;\n}\n\n.mdhui-report-content .mdhui-report-content-download-pdf a {\n padding: 16px;\n margin: 0 auto;\n background: var(--mdhui-color-primary);\n color: #FFF;\n font-weight: bold;\n border-radius: 6px;\n text-decoration: none;\n text-align: center;\n display: block;\n width: 200px;\n margin-top: var(--mdhui-padding-md);\n}\n\n.mdhui-report-content .mdhui-report-content-download-pdf svg {\n display: block;\n text-align: center;\n width: 100%;\n margin-bottom: var(--mdhui-padding-md);\n}");let ime='<!DOCTYPE html><html xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:n3="http://www.w3.org/1999/xhtml" xmlns:n1="urn:hl7-org:v3" xmlns:n2="urn:hl7-org:v3/meta/voc" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:in="urn:lantana-com:inline-variable-data"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\x3c!--\r\n Do NOT edit this HTML directly, it was generated via an XSLt\r\n transformation from the original release 2 CDA Document.\r\n --\x3e<title>Encounter Summary</title><style>\r\n \r\n body { font-family:Helvetica, Arial, sans-serif; font-size: 12px; margin: 16px; text-align: left; margin-bottom:0; } \r\n .title { font-size: 21px; font-weight: bold; line-height:1.5em;}\r\n .document-info { font-size:12px; margin-bottom:16px; color:#999; line-height:1.5em; }\r\n \r\n \r\n .patient-info-table { border-spacing: 0; width:100%; }\r\n .patient-info-table th { text-align:left; font-size:11px; color:#999; font-weight:normal; vertical-align:top; padding-right:8px; border-bottom:solid 1px #eee; padding-top:4px; padding-bottom:4px; }\r\n .patient-info-table td { text-align:left; font-size:12px; color:#000; vertical-align:top; border-bottom:solid 1px #eee; padding-top:4px; padding-bottom:4px; }\r\n .patient-info-table tr:last-child th, .patient-info-table tr:last-child td { border-bottom:none; }\r\n\r\n .data-table { margin-left: -16px; margin-right:-16px; margin-bottom:16px; }\r\n .data-table table, .data-table td, .data-table th { border:none; }\r\n\r\n .data-table > span { margin-left:16px; margin-right:16px; }\r\n .data-table table { border-collapse: collapse; }\r\n .data-table th { padding-bottom:4px; padding-top:4px; padding-right:8px; padding-left:8px; text-align: left; text-transform: uppercase; font-weight: normal; color: #666; font-size: 11px; border-bottom: #ddd 1px solid; vertical-align:bottom; }\r\n .data-table tr:nth-child(even) td { background-color: #f5f5f5; }\r\n .data-table td { vertical-align: top; font-size:12px; padding-bottom:4px; padding-top:4px; padding-right:8px; padding-left:8px;}\r\n .data-table td:first-child, .data-table th:first-child { padding-left:16px;}\r\n \r\n p { margin: 0 0 4px 0em; }\r\n\r\n .wrap-collabsible { position:relative; margin-left:-16px; margin-right:-16px; }\r\n input[type=\'checkbox\'] { display: none; }\r\n .lbl-toggle { display: block; font-size: 17px; text-align: left; padding:8px; padding-left:16px; padding-right:16px; border-top: solid 1px #ddd; cursor: pointer; transition: all 0.25s ease-out; position: sticky; position: -webkit-sticky; top: 0; left: 0; background: #FFF; color: #3e6e9a; font-weight: bold; }\r\n .lbl-toggle:hover { opacity:.9; }\r\n .lbl-toggle::before { content: \' \'; display: inline-block; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 5px solid currentColor; vertical-align: middle; margin-right: .7rem; transform: translateY(-2px); transition: transform .2s ease-out; position: absolute; right: 8px; top: 16px; }\r\n .toggle:checked + .lbl-toggle::before { transform: rotate(90deg) translateX(-3px); }\r\n .collapsible-content { max-height: 0px; overflow-x: auto; overflow-y: hidden; }\r\n .toggle:checked + .lbl-toggle + .collapsible-content { max-height: 999999px; }\r\n .collapsible-content .content-inner { background: #FFF; padding:8px; padding-left:16px; padding-right:16px; }\r\n \r\n </style></head><body><div class="title">Encounter Summary</div><div class="document-info"><div class="document-date">\r\n Document Created\r\n May 29, 2023</div><div class="custodian"><div>Custodian: Cedars-Sinai Health System</div></div></div><div class="wrap-collabsible"><input id="collapsible" class="toggle" type="checkbox" /><label for="collapsible" class="lbl-toggle">Patient Information</label><div class="collapsible-content"><div class="content-inner"><table class="patient-info-table" cellpadding="0" cellspacing="0"><tr><td colspan="2" style="font-size:14px;">AmbulatorySeniorF Xxxcshs </td></tr><tr><th>Date of Birth</th><td>January 1, 1947</td></tr><tr><th>Race</th><td>Unknown</td></tr><tr><th>Patient ID</th><td>CSHJWLL1B3TGMWX</td></tr><tr><th>Sex</th><td>Female</td></tr><tr><th>Ethnicity</th><td>Unknown</td></tr><tr><th>Preferred Language</th><td>Information not available</td></tr><tr><th>Address</th><td>6500 Wilshire Blvd<br /><br />LOS ANGELES, CA, 90046<br />tel:+1-626-315-4807</td></tr><tr><th>Care Team Member(s)</th><td>Dr. Masson of Cedars-Sinai Health System<br />, , <br />tel:+1-310-248-7000<br /><br /></td></tr><tr><th>Guardian</th><td><div><br /></div></td></tr><tr><th>Next of Kin</th><td><div><br /></div></td></tr><tr><th>Other Caregivers(s)</th><td /></tr><tr><th>Emergency Contact</th><td><div><br /></div></td></tr><tr><th>Comments:</th><td /></tr></table></div></div></div><div class="wrap-collabsible"><input id="ID0EDGAC" class="toggle" type="checkbox" /><label for="ID0EDGAC" class="lbl-toggle" data-loinc-code="X-DOCCMT">Note from Cedars-Sinai Health System</label><div class="collapsible-content"><div class="content-inner">This document contains information that was shared with AmbulatorySeniorF Xxxcshs. It may not contain the entire record from Cedars-Sinai Health System.</div></div></div><div class="wrap-collabsible"><input id="ID0EVGAC" class="toggle" type="checkbox" /><label for="ID0EVGAC" class="lbl-toggle" data-loinc-code="46240-8">Encounter Details</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%"><colgroup><col width="10%" /><col width="15%" /><col span="3" width="25%" /></colgroup><thead><tr><th>Date</th><th>Type</th><th>Department</th><th>Care Team</th><th>Description</th></tr></thead><tbody><tr ID="encounter2" style="" id="encounter2"><td>04/15/2019 9:30 AM PDT</td><td ID="encounter2type" id="encounter2type">Office Visit</td><td><p>CSMG Internal Medicine</p><p>8767 Wilshire Blvd</p><p>3rd Floor</p><p>BEVERLY HILLS, CA 90211</p><p>310-385-6031</p></td><td><p style="font-weight:bold;">Dr. Gray</p><p>8767 WILSHIRE BLVD</p><p>3RD FLOOR-SUITE 301</p><p>BEVERLY HILLS, CA 90211</p><p>310-385-6064 (Work)</p><p>424-314-8735 (Fax)</p></td><td><span id="encounter2desc" /></td></tr></tbody></table></div></div></div></div><div class="wrap-collabsible"><input id="ID0EJNAG" class="toggle" type="checkbox" /><label for="ID0EJNAG" class="lbl-toggle" data-loinc-code="29762-2">Social History</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%" ID="sochist14" id="sochist14"><colgroup><col span="2" width="25%" /><col width="13%" /><col width="12%" /><col width="25%" /></colgroup><thead><tr><th>Tobacco Use</th><th>Types</th><th>Packs/Day</th><th>Years Used</th><th>Date</th></tr></thead><tbody><tr><td>Smoking Tobacco: Former</td><td>Cigarettes</td><td ID="sochist14packsperday" id="sochist14packsperday">0.5</td><td /><td>1999 - 06/2010</td></tr></tbody></table></div><div class="data-table"><table width="100%"><colgroup><col width="25%" /><col width="75%" /></colgroup><thead><tr><th>Alcohol Use</th><th>Standard Drinks/Week</th></tr></thead><tbody><tr><td ID="alcoholStatus" id="alcoholStatus">Yes</td><td>3 (1 standard drink = 0.6 oz pure alcohol)</td></tr></tbody></table></div><div class="data-table"><table width="100%" ID="sdohassess1" id="sdohassess1"><colgroup><col width="50%" /><col span="2" width="25%" /></colgroup><thead><tr><th>Depression</th><th>Answer</th><th>Date Recorded</th></tr></thead><tbody><tr ID="sdohassess1pair1" id="sdohassess1pair1"><td ID="sdohassess1pair1ques" id="sdohassess1pair1ques">PHQ-9 Score</td><td ID="sdohassess1pair1ans" id="sdohassess1pair1ans">23</td><td>10/24/2022</td></tr><tr ID="sdohassess1pair2" id="sdohassess1pair2"><td ID="sdohassess1pair2ques" id="sdohassess1pair2ques">Screening Completed</td><td ID="sdohassess1pair2ans" id="sdohassess1pair2ans">PHQ-9</td><td>10/24/2022</td></tr></tbody></table></div><div class="data-table"><table width="100%"><colgroup><col width="50%" /><col span="2" width="25%" /></colgroup><thead><tr><th>Sex and Gender Information</th><th>Value</th><th>Date Recorded</th></tr></thead><tbody><tr ID="BirthSex17" id="BirthSex17"><td>Sex Assigned at Birth</td><td ID="BirthSex17Value" id="BirthSex17Value">Female</td><td>11/04/2018 3:08 AM PST</td></tr><tr ID="GenderIdentity15" id="GenderIdentity15"><td>Gender Identity</td><td ID="GenderIdentity15Value" id="GenderIdentity15Value">Female</td><td>06/12/2019 2:50 PM PDT</td></tr><tr ID="SexualOrientation16" id="SexualOrientation16"><td>Sexual Orientation</td><td ID="SexualOrientation16Value" id="SexualOrientation16Value">Choose not to disclose</td><td>11/04/2018 3:08 AM PST</td></tr></tbody></table></div>documented as of this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0EQHBG" class="toggle" type="checkbox" /><label for="ID0EQHBG" class="lbl-toggle" data-loinc-code="8716-3">Last Filed Vital Signs</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%"><colgroup><col span="4" width="25%" /></colgroup><thead><tr><th>Vital Sign</th><th>Reading</th><th>Time Taken</th><th>Comments</th></tr></thead><tbody><tr style=""><td style="">Blood Pressure</td><td><span id="sysBP_5642605800">120</span>/<span id="diaBP_5642605800">80</span></td><td>10/21/2019 3:30 PM PDT</td><td /></tr><tr ID="pulse_5642605800" style="" id="pulse_5642605800"><td style="">Pulse</td><td>80</td><td>10/21/2019 3:30 PM PDT</td><td /></tr><tr ID="temp_5642605800" style="" id="temp_5642605800"><td style="">Temperature</td><td>37.1 °C (98.8 °F)</td><td>10/21/2019 3:30 PM PDT</td><td /></tr><tr ID="resp_" style="" id="resp_"><td style="">Respiratory Rate</td><td>-</td><td>-</td><td /></tr><tr ID="SpO2_" style="" id="SpO2_"><td style="">Oxygen Saturation</td><td>-</td><td>-</td><td /></tr><tr ID="inhaled_" style="" id="inhaled_"><td style="">Inhaled Oxygen Concentration</td><td>-</td><td>-</td><td /></tr><tr ID="weight_5642605800" style="" id="weight_5642605800"><td style="">Weight</td><td>238.1 kg (525 lb)</td><td>10/21/2019 3:30 PM PDT</td><td /></tr><tr ID="height_5642605800" style="" id="height_5642605800"><td style="">Height</td><td>157.5 cm (5\' 2")</td><td>10/21/2019 3:30 PM PDT</td><td /></tr><tr ID="bmi_5642605800" style="" id="bmi_5642605800"><td style="">Body Mass Index</td><td>96.02</td><td>10/21/2019 3:30 PM PDT</td><td /></tr></tbody></table></div>documented in this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0EIZBG" class="toggle" type="checkbox" /><label for="ID0EIZBG" class="lbl-toggle" data-loinc-code="69730-0">Patient Instructions</label><div class="collapsible-content"><div class="content-inner"><ul style="" id="Instructions33"><li>Patient Instructions: <ul><li><p><span style="">Dr. Fazel - 04/15/2019 9:30 AM PDT</span></p><span><span style="">Formatting of this note is different from the original.</span><br /><span style="">Images from the original note were not included.</span><br />Patient Education <br /><br />Back Exercises<br />The following exercises strengthen the muscles that help to support the trunk and back. They also help to keep the lower back flexible. Doing these exercises can help to prevent back pain or lessen existing pain.<br />· If you have back pain or discomfort, try doing these exercises 2-3 times each day or as told by your health care provider.<br />· As your pain improves, do them once each day, but increase the number of times that you repeat the steps for each exercise (do more repetitions).<br />· To prevent the recurrence of back pain, continue to do these exercises once each day or as told by your health care provider.<br />Do exercises exactly as told by your health care provider and adjust them as directed. It is normal to feel mild stretching, pulling, tightness, or discomfort as you do these exercises, but you should stop right away if you feel sudden pain or your pain gets worse.<br />Exercises<br />Single knee to chest<br />Repeat these steps 3-5 times for each leg:<br />1. Lie on your back on a firm bed or the floor with your legs extended.<br />2. Bring one knee to your chest. Your other leg should stay extended and in contact with the floor.<br />3. Hold your knee in place by grabbing your knee or thigh with both hands and hold.<br />4. Pull on your knee until you feel a gentle stretch in your lower back or buttocks.<br />5. Hold the stretch for 10-30 seconds.<br />6. Slowly release and straighten your leg.<br />Pelvic tilt<br />Repeat these steps 5-10 times:<br />1. Lie on your back on a firm bed or the floor with your legs extended.<br />2. Bend your knees so they are pointing toward the ceiling and your feet are flat on the floor.<br />3. Tighten your lower abdominal muscles to press your lower back against the floor. This motion will tilt your pelvis so your tailbone points up toward the ceiling instead of pointing to your feet or the floor.<br />4. With gentle tension and even breathing, hold this position for 5-10 seconds.<br />Cat-cow<br />Repeat these steps until your lower back becomes more flexible:<br />1. Get into a hands-and-knees position on a firm surface. Keep your hands under your shoulders, and keep your knees under your hips. You may place padding under your knees for comfort.<br />2. Let your head hang down toward your chest. Contract your abdominal muscles and point your tailbone toward the floor so your lower back becomes rounded like the back of a cat.<br />3. Hold this position for 5 seconds.<br />4. Slowly lift your head, let your abdominal muscles relax and point your tailbone up toward the ceiling so your back forms a sagging arch like the back of a cow.<br />5. Hold this position for 5 seconds. <br />Press-ups<br />Repeat these steps 5-10 times:<br />1. Lie on your abdomen (face-down) on the floor.<br />2. Place your palms near your head, about shoulder-width apart.<br />3. Keeping your back as relaxed as possible and keeping your hips on the floor, slowly straighten your arms to raise the top half of your body and lift your shoulders. Do not use your back muscles to raise your upper torso. You may adjust the placement of your hands to make yourself more comfortable.<br />4. Hold this position for 5 seconds while you keep your back relaxed.<br />5. Slowly return to lying flat on the floor. <br />Bridges<br />Repeat these steps 10 times:<br />1. Lie on your back on a firm surface.<br />2. Bend your knees so they are pointing toward the ceiling and your feet are flat on the floor. Your arms should be flat at your sides, next to your body.<br />3. Tighten your buttocks muscles and lift your buttocks off the floor until your waist is at almost the same height as your knees. You should feel the muscles working in your buttocks and the back of your thighs. If you do not feel these muscles, slide your feet 1-2 inches farther away from your buttocks.<br />4. Hold this position for 3-5 seconds.<br />5. Slowly lower your hips to the starting position, and allow your buttocks muscles to relax completely.<br />If this exercise is too easy, try doing it with your arms crossed over your chest. <br />Abdominal crunches<br />Repeat these steps 5-10 times:<br />1. Lie on your back on a firm bed or the floor with your legs extended.<br />2. Bend your knees so they are pointing toward the ceiling and your feet are flat on the floor.<br />3. Cross your arms over your chest.<br />4. Tip your chin slightly toward your chest without bending your neck.<br />5. Tighten your abdominal muscles and slowly raise your trunk (torso) high enough to lift your shoulder blades a tiny bit off the floor. Avoid raising your torso higher than that because it can put too much stress on your low back and does not help to strengthen your abdominal muscles.<br />6. Slowly return to your starting position.<br />Back lifts<br />Repeat these steps 5-10 times:<br />1. Lie on your abdomen (face-down) with your arms at your sides, and rest your forehead on the floor.<br />2. Tighten the muscles in your legs and your buttocks.<br />3. Slowly lift your chest off the floor while you keep your hips pressed to the floor. Keep the back of your head in line with the curve in your back. Your eyes should be looking at the floor.<br />4. Hold this position for 3-5 seconds.<br />5. Slowly return to your starting position.<br />Contact a health care provider if:<br />· Your back pain or discomfort gets much worse when you do an exercise.<br />· Your worsening back pain or discomfort does not lessen within 2 hours after you exercise.<br />If you have any of these problems, stop doing these exercises right away. Do not do them again unless your health care provider says that you can.<br />Get help right away if:<br />· You develop sudden, severe back pain. If this happens, stop doing the exercises right away. Do not do them again unless your health care provider says that you can.<br />This information is not intended to replace advice given to you by your health care provider. Make sure you discuss any questions you have with your health care provider.<br />Document Revised: 04/23/2020 Document Reviewed: 09/19/2019<br />Elsevier Patient Education © 2021 Elsevier Inc.<br /><br /><br />Potassium <br />Date Value Ref Range Status <br />06/10/2015 5.2 (High) 3.5 - 5.0 MMOL/L Final <br /><br /></span><br /><span style="">Electronically signed by Dr. Fazel at 03/22/2022 1:35 PM PDT</span><br /><br /></li></ul></li></ul>documented in this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0ET6BG" class="toggle" type="checkbox" /><label for="ID0ET6BG" class="lbl-toggle" data-loinc-code="10164-2">Progress Notes</label><div class="collapsible-content"><div class="content-inner"><ul style=""><li>Dr. Masson - 04/15/2019 9:30 AM PDT: <span id="Note30"><span><span style="">Formatting of this note is different from the original.</span><br />PHQ-2 Total Score (Scale: 0 to 3) 9/6/2013 <br />PHQ-2 Total Score 6 <br /><br />CSHS ONC PHQ9 1/19/2018 3/8/2019 7/19/2020 <br />In the last two weeks, how often have you had little interest or pleasure in doing things? 0 0 1 <br />In the last two weeks, how often have you been feeling down, depressed or hopeless? - 1 1 <br />In the last two weeks, how often have you had trouble falling asleep, staying asleep or sleeping too much? 0 - - <br />In the last two weeks, how often have you been feeling tired or having little energy? - - - <br />In the last two weeks, how often have you had poor appetite or been overeating? - - - <br />In the last two weeks, how often have you been feeling bad about yourself, or that you\'re a failure or have let yourself or family down? - - - <br />In the last two weeks, how often have you had trouble concentrating on things, such as reading the newspaper or watching television? - - - <br />In the last two weeks, how often have you been moving or speaking so slowly that other people could have noticed; Or, the opposite - being fidgety or restless that you have been moving around a lot more than usual? - - - <br />In the last two weeks, how often have you had thoughts that you would be better off dead or of hurting yourself in some way? - - - <br />PHQ-9 Score 0 1 2 <br /><br /></span><br /><span style="">Electronically signed by Dr. Masson at 07/19/2020 2:23 PM PDT</span><br /></span></li><li>Dr. Rao - 04/15/2019 9:30 AM PDT: <span id="Note29"><span><span style="">Formatting of this note might be different from the original.</span><br />Blood pressure 120/80, pulse 80, temperature 98.8 °F (37.1 °C), temperature source Oral. <br />General appearance: alert, cooperative, no distress, appears stated age<br />Head: Normocephalic, without obvious abnormality, atraumatic<br />Eyes: conjunctivae/corneas clear. PERRL, EOM\'s intact. Fundi benign<br />Ears: normal TM\'s and external ear canals AU<br />Nose: Nares normal. Septum midline. Mucosa normal. No drainage or sinus tenderness.<br />Neck: supple, symmetrical, trachea midline, no adenopathy, thyroid: not enlarged, symmetric, no tenderness/mass/nodules, no carotid bruit, and no JVD<br />Lungs: clear to auscultation bilaterally<br />Heart: regular rate and rhythm, S1, S2 normal, no murmur, click, rub or gallop , no edema<br />Abdomen: soft, non-tender. Bowel sounds normal. No masses, no organomegaly<br />Extremities: extremities normal, atraumatic, no cyanosis or edema<br />Skin: Skin color, texture, turgor normal. No rashes or lesions<br />Neurologic: Grossly normal, no inattention, alert and oriented x3<br /><br /></span><br /><span style="">Electronically signed by Dr. Rao at 08/03/2021 5:11 PM PDT</span><br /></span></li><li>Roma Yogesh Gianchandani - 04/15/2019 9:30 AM PDT: <span id="Note28"><span><span style="">Formatting of this note might be different from the original.</span><br />This is a test of dictating later this is a test of dictating later this is a test of dictating later<br /><br />No results found for: HGBA1C <br />.uma<br /><br /></span><br /><span style="">Electronically signed by Roma Yogesh Gianchandani at 01/21/2022 2:37 PM PST</span><br /></span></li><li>Dr. Merchant - 04/15/2019 9:30 AM PDT: <span id="Note27"><span><span style="">Formatting of this note is different from the original.</span><br /><span style="">Images from the original note were not included.</span><br /><br /><br /><br /> Hematology and Cellular Therapy<br /><br />Patient Information <br /><br />Patient: AmbulatorySeniorF Xxxcshs<br />DOB: 1/1/1947<br />MRN: 200270896<br />Date of Service: 4/15/2019<br /><br />History of Present Illness <br /><br />CC: <br />Referring Provider: <br /><br />AmbulatorySeniorF Xxxcshs is a 75 year old woman <br /><br />Subjective History: fever<br /><br />Review of Systems:<br />A 14-point review of systems was performed with pertinent positives/negatives noted in the interval history, all others negative.<br /><br />Hematologic History:<br /><br />Patient Active Problem List <br /> Diagnosis Date Noted <br />• Rheumatoid arthritis, seropositive (HCC) 08/30/2021 <br />• COVID-19 virus infection 04/13/2020 <br />• Sucked into jet engine 10/25/2019 <br />• Moral distress 11/28/2018 <br /> Overview Note: <br /> https://onlinelibrary.wiley.com/doi/pdf/10.1111/j.2044-8341.1926.tb00623.x<br /><br />• Sucked into jet engine 05/06/2017 <br /> Overview Note: <br /> https://www.youtube.com/watch?v=2Aldwlro4DA&lt;/CITE&gt;<br /><br />• Spacecraft collision injuring occupant 05/06/2017 <br /> Overview Note: <br /> Fell a really long way <br /><br />• Diabetes mellitus type 2, noninsulin dependent (HCC) 06/09/2016 <br /><br />Past Medical History: <br />Diagnosis Date <br />• Abnormal Pap smear of cervix <br />• Anxiety <br />• Breast asymmetry 11/05/2017 <br /> testing <br />• Depressive disorder, not elsewhere classified <br />• ERRONEOUS ENCOUNTER--DISREGARD <br />• Family history of diabetes mellitus <br />• Frail elderly <br />• Headache(784.0) <br />• Heelies colliding with stationary object 5/6/2017 <br />• History of anemia <br />• History of bilateral breast implants <br />• Known health problems: none <br />• Known health problems: none <br />• NO SIGNIFICANT MEDICAL PROBLEMS <br />• NO SIGNIFICANT MEDICAL PROBLEMS <br />• Pneumonia 4/18/2010 <br />• Rash of back <br />• Sleep apnea <br />• Type 2 diabetes mellitus with hyperosmolarity without coma (HCC) 6/9/2016 <br /><br />Past Surgical History: <br />Procedure Laterality Date <br />• HX COLOSTOMY CLOSURE <br />• HX LOW ANTERIOR RESECTION <br />• HX THYROID NODULE RESECTION <br />• HX THYROIDECTOMY <br />• HX TONSILLECTOMY <br />• PAST SURGICAL HISTORY - NONE REPORTED <br />• PAST SURGICAL HISTORY - NONE REPORTED <br />• PR CESAREAN DELIVERY ONLY <br />• PR LAP GASTRIC BYPASS/ROUX-EN-Y <br />• PR REMOVAL COLON/PROCTEC/ ILEOANAL ANAST <br />• PR REMV STOMACH,PART,DISTAL,GASTRODUOD <br />• WOUND OSTOMY EVAL AND TREAT <br /><br />Social History <br /><br />Tobacco Use <br />• Smoking status: Former Smoker <br /> Packs/day: 0.50 <br /> Types: Cigarettes <br /> Start date: 1999 <br /> Quit date: 06/2010 <br /> Years since quitting: 11.7 <br />• Smokeless tobacco: Not on file <br />Substance Use Topics <br />• Alcohol use: Yes <br /> Alcohol/week: 3.0 standard drinks <br /> Types: 3 Shots of liquor per week <br />• Drug use: Yes <br /> Types: Marijuana <br /><br />Family History <br />Problem Relation Age of Onset <br />• Frailty Mother <br />• Tuberculosis Brother <br />• Hypertension Paternal Aunt <br />• Prostate Cancer Paternal Aunt <br />• Colon Polyps Paternal Grandmother <br />• Breast Cancer Paternal Grandmother <br />• Diabetes Maternal Aunt <br />• Ovarian Cancer Paternal Uncle <br />• Heart Disease Other <br /> fathers side <br />• Coronary Artery Disease Other <br /> mothers side <br />• Obesity Other <br />• Thoracic Aneurysm Other <br />• Diverticulosis Other <br />• Degenerative Disc Disease Other <br />• Carotid Stenosis Other <br />• Other Family History Maternal Grandmother <br /> Fraility <br />• History of Fragility Fracture Sister <br /><br /><br />Medications <br /><br />Current Outpatient Medications <br />Medication Sig <br />• ibuprofen (MOTRIN) 600 mg tablet Take 600 mg by mouth 3 times daily. Take with food. <br />• PREDNISONE, BULK, MISC <br />• metFORMIN (GLUCOPHAGE) 500 mg tablet <br />• acetaminophen (TYLENOL) 325 mg oral tablet Take 1 tablet by mouth every 4 hours as needed. Do NOT exceed 3000 mg of acetaminophen from all sources per 24 hours. (Patient not taking: Reported on 11/5/2020) <br />• atorvastatin (LIPITOR) 10 mg oral tablet Take 1 tablet by mouth daily. <br />• gabapentin (NEURONTIN) 100 mg capsule Take 1 capsule by mouth nightly. May increase to three times at night as necessary and tolerated <br />• naproxen (NAPROSYN) 500 mg oral tablet Take 1 tablet by mouth 2 times daily as needed. Take with food. (Patient taking differently: Take 500 mg by mouth as needed. Take with food.) <br /><br />Objective <br /><br />Vitals: <br /> 10/21/19 1530 <br />BP: 120/80 <br />Pulse: 80 <br />Temp: 98.8 °F (37.1 °C) <br />TempSrc: Oral <br /><br />ECOG Score: <br /><br />Physical Exam:<br />Constitutional: Oriented to person, place, and time. Appears well-developed and well-nourished. <br />Head: Normocephalic, atraumatic, no visible abnormalities<br />Nose: Nares normal. Septum midline. Mucosa normal. No drainage.<br />Mouth/Throat: No oropharyngeal exudate or mucositis. <br />Eyes: EOM are normal. No scleral icterus. <br />Neck: Normal range of motion. No tracheal deviation present. <br />Cardiovascular: Normal rate and regular rhythm. No murmurs, rubs, or gallops.<br />Pulmonary: Breath sounds normal. No respiratory distress. No wheezing, rales, or rhonchi.<br />Abdominal: Soft and non-distended. Bowel sounds are normal. <br />Musculoskeletal: Normal range of motion. <br />Skin: Skin color, texture, turgor normal. No rashes or lesions<br />Extremities: No cyanosis, clubbing, or edema<br />Neurological: No focal neurologic deficits. Strength intact in all extremities<br />Psychiatric: Normal mood and affect. <br />Lymph: No palpable cervical, supraclavicular, axillary, or inguinal lymphadenopathy<br /><br />Laboratory Results <br /><br />No results found for: WBC, HGB, HCT, MCV, RDW, PLT, POLY, LYMPH, MONOS, EOS, BASO, ANC, ALC, MONOSABS, EOSABS, BASOABS, RBCMORPH, DIFFTYPE <br />Lab Results <br />Component Value Date <br /> Glucose 67 04/22/2020 <br /> Creatinine 2.8 (High) 06/10/2015 <br /> Urea Nitrogen 30 (High) 06/10/2015 <br /> Sodium 139 06/10/2015 <br /> Potassium 5.2 (High) 06/10/2015 <br /> Chloride 104 06/10/2015 <br /> Carbon Dioxide 6 (Low) 06/10/2015 <br /> ALT 50 (High) 06/10/2015 <br /> AST 76 (High) 06/10/2015 <br /> Alkaline Phosphatase 102 06/10/2015 <br /> Bilirubin, Total 1.9 (High) 06/10/2015 <br /> Total Protein 5.6 (Low) 06/10/2015 <br /> Albumin 3.5 06/10/2015 <br /> Calcium, Serum 4.6 (Low) 06/10/2015 <br /><br />Imaging Results <br /><br />Pathology <br /><br />Assessment and Plan <br /><br />Diagnoses and all orders for this visit:<br /><br />History of non-Hodgkin\'s lymphoma<br /><br />Chronic obstructive pulmonary disease, unspecified COPD type (HCC)<br /><br />Screening-pulmonary TB<br />- PPD TEST<br />- ECG<br /><br />Lower abdominal pain<br />- ECG<br />- PR ANOSCOPY DX W/COLLJ SPEC BR/WA SPX WHEN PRFRMD<br /><br />Pneumothorax, unspecified type<br /><br />Non-seasonal allergic rhinitis, unspecified trigger<br /><br /><br /><br />A total time of 44 minutes was spent on today\'s encounter which included the following: <br />Obtaining and/or reviewing separately obtained history<br />Performing a medically appropriate exam and/or evaluation <br />Counseling and educating a patient/family/caregiver as noted above <br />Referring and communicating with other healthcare professionals (not separately reported) <br />Independently interpreting results (not separately reported) and communicating results to the patient/family/caregiver<br /><br />Akil Abid Merchant, MD <br />3/7/2022<br />5:39 PM</span><br /><span style="">Electronically signed by Dr. Merchant at 03/07/2022 5:50 PM PST</span><br /></span></li><li>Alexis Rieber - 04/15/2019 9:30 AM PDT: <span id="Note26"><span><span style="">Formatting of this note might be different from the original.</span><br /><span style="">Images from the original note were not included.</span><br /><br />Physical Exam<br /><br />This is a very cute dog<br /><br />This dog is white cell then sa<br /><br />This is a 42-year-old patient with hypertension past medical 7</span><br /><span style="">Electronically signed by Alexis Rieber at 07/05/2022 1:57 PM PDT</span><br /></span></li><li>Dr. Masson - 04/15/2019 9:30 AM PDT: <span id="Note25"><span><span style="">Formatting of this note might be different from the original.</span><br />Follow up Chronic Kidney Disease <br />Symptom symptoms one day daily <br /></span><br /><span style="">Electronically signed by Dr. Masson at 07/22/2022 11:08 AM PDT</span><br /></span></li><li>Dr. Masson - 04/15/2019 9:30 AM PDT: <span id="Note24"><span><span style="">Formatting of this note might be different from the original.</span><br />In my canal I can dictate later that is not a good workflow if you doing<br /></span><br /><span style="">Electronically signed by Dr. Masson at 09/26/2022 10:59 AM PDT</span><br /></span></li><li>Dr. Masson - 04/15/2019 9:30 AM PDT: <span id="Note23"><span><span style="">Formatting of this note might be different from the original.</span><br />Diagnoses and all orders for this visit:<br /><br />History of non-Hodgkin\'s lymphoma<br /><br />Chronic obstructive pulmonary disease, unspecified COPD type (HCC)<br /><br />Screening-pulmonary TB<br />- PPD TEST<br /><br />Lower abdominal pain<br /><br />Pneumothorax, unspecified type<br /><br />Non-seasonal allergic rhinitis, unspecified trigger<br /><br />Primary hypertension<br /><br />Ace inhibitor <br /><br /></span><br /><span style="">Electronically signed by Dr. Masson at 10/08/2022 6:20 PM PDT</span><br /></span></li><li>Dr. Masson - 04/15/2019 9:30 AM PDT: <span id="Note22"><span><span style="">Formatting of this note might be different from the original.</span><br /><br />..lastim<br /><br />No results found for this or any previous visit from the past 365 days 10 hours.<br /><br /></span><br /><span style="">Electronically signed by Dr. Masson at 04/14/2023 5:33 PM PDT</span><br /></span></li></ul>documented in this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0E1LBI" class="toggle" type="checkbox" /><label for="ID0E1LBI" class="lbl-toggle" data-loinc-code="18776-5">Plan of Treatment</label><div class="collapsible-content"><div class="content-inner"><p>Not on file</p>documented as of this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0EJMBI" class="toggle" type="checkbox" /><label for="ID0EJMBI" class="lbl-toggle" data-loinc-code="61146-7">Goals</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%"><colgroup><col width="30%" /><col width="10%" /><col width="15%" /><col width="20%" /><col width="12%" /><col width="13%" /></colgroup><thead><tr><th>Goal</th><th>Patient Goal Type</th><th>Associated Problems</th><th>Recent Progress</th><th>Patient-Stated?</th><th>Author</th></tr></thead><tbody><tr style=""><td><p id="goal1">Hemoglobin A1C &lt;= 7.0</p></td><td>Result Component</td><td /><td /><td>No</td><td>Dr. Masson</td></tr><tr style=""><td><p id="goal2">Hemoglobin A1C &lt;= 7.0</p></td><td>Result Component</td><td>Diabetes mellitus type 2, noninsulin dependent</td><td /><td>No</td><td>Jeff Oostmeyer</td></tr><tr style=""><td style="" colspan="6"><p style="">Note: </p><span id="goal2note"><span style="">Formatting of this note might be different from the original.</span><br />Test</span><br /></td></tr><tr style=""><td><p id="goal3">LDL CALC &lt;= 100</p></td><td>Result Component</td><td>Diabetes mellitus type 2, noninsulin dependent</td><td /><td>No</td><td>Jeff Oostmeyer</td></tr><tr style=""><td style="" colspan="6"><p style="">Note: </p><span id="goal3note"><span style="">Formatting of this note might be different from the original.</span><br />Test</span><br /></td></tr></tbody></table></div>documented as of this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0EQVBI" class="toggle" type="checkbox" /><label for="ID0EQVBI" class="lbl-toggle" data-loinc-code="30954-2">Results</label><div class="collapsible-content"><div class="content-inner"><ul style=""><li id="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Procedure">PPD TEST - Final result (04/15/2019 9:32 AM PDT): <div class="data-table"><table width="100%"><colgroup><col width="20%" /><col width="12%" /><col width="8%" /><col width="20%" /><col span="2" width="10%" /><col width="20%" /></colgroup><thead><tr><th>Component</th><th>Value</th><th>Ref Range</th><th>Test Method</th><th>Analysis Time</th><th>Performed At</th><th>Pathologist Signature</th></tr></thead><tbody><tr ID="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1" style="" id="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1"><td ID="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1Name" id="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1Name">Induration PPD</td><td>10</td><td>0 - 10 mm</td><td /><td /><td /><td ID="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1Signature" id="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1Signature" /></tr></tbody></table></div><div class="data-table"><table width="100%"><colgroup><col span="5" width="20%" /></colgroup><thead><tr><th>Specimen (Source)</th><th>Anatomical Location / Laterality</th><th>Collection Method / Volume</th><th>Collection Time</th><th>Received Time</th></tr></thead><tbody><tr style=""><td ID="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Specimen" id="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Specimen" /><td /><td /><td>04/15/2019 9:32 AM PDT</td><td /></tr></tbody></table></div><div class="data-table"><table width="100%"><thead><tr><th>Narrative</th></tr></thead><tbody><tr><td style=""><p /></td></tr></tbody></table></div><div class="data-table"><table width="100%"><colgroup><col width="20%" /><col width="80%" /></colgroup><thead><tr><th>Authorizing Provider</th><th>Result Type</th></tr></thead><tbody><tr><td>Dr. Gray</td><td>IMMUNIZATION ORDERABLES</td></tr></tbody></table></div></li></ul>documented in this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0E36BI" class="toggle" type="checkbox" /><label for="ID0E36BI" class="lbl-toggle" data-loinc-code="51848-0">Visit Diagnoses</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%"><colgroup><col width="100%" /></colgroup><thead><tr><th>Diagnosis</th></tr></thead><tbody><tr ID="vdx3" style="" id="vdx3"><td><p><span id="vdx3Name">History of non-Hodgkin\'s lymphoma</span><span> - Primary</span></p></td></tr><tr ID="vdx4" style="" id="vdx4"><td><p><span id="vdx4Name">Chronic obstructive pulmonary disease, unspecified COPD type (HCC)</span></p></td></tr><tr ID="vdx5" style="" id="vdx5"><td><p><span id="vdx5Name">Screening-pulmonary TB</span></p></td></tr><tr ID="vdx6" style="" id="vdx6"><td><p><span id="vdx6Name">Lower abdominal pain</span></p></td></tr><tr ID="vdx7" style="" id="vdx7"><td><p><span id="vdx7Name">Pneumothorax, unspecified type</span></p></td></tr><tr ID="vdx8" style="" id="vdx8"><td><p><span id="vdx8Name">Non-seasonal allergic rhinitis, unspecified trigger</span></p></td></tr><tr ID="vdx9" style="" id="vdx9"><td><p><span id="vdx9Name">Primary hypertension</span></p></td></tr><tr ID="vdx10" style="" id="vdx10"><td><p><span id="vdx10Name">Coronary artery disease involving native heart without angina pectoris, unspecified vessel or lesion type</span></p></td></tr><tr ID="vdx11" style="" id="vdx11"><td><p><span id="vdx11Name">Chronic sinusitis, unspecified location</span></p></td></tr></tbody></table></div>documented in this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0EWCCI" class="toggle" type="checkbox" /><label for="ID0EWCCI" class="lbl-toggle" data-loinc-code="85847-2">Care Teams</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%" ID="ct54" id="ct54"><colgroup><col span="3" width="25%" /><col width="13%" /><col width="12%" /></colgroup><thead><tr><th>Team Member</th><th>Relationship</th><th>Specialty</th><th>Start Date</th><th>End Date</th></tr></thead><tbody><tr style=""><td><p style="font-weight:bold;">Dr. Masson</p><p>NPI: 1326098302</p><p>310-248-7000 (Work)</p><p>310-248-7033 (Fax)</p></td><td>PCP - General</td><td>Family Medicine</td><td>3/15/18</td><td /></tr></tbody></table></div>documented as of this encounter</div></div></div><table class="header_table"><tbody><tr><td class="td_header_role_name"><span class="td_label"><b>Author:</b></span></td><td class="td_header_role_value">Epic - Version 10.3 - Epic - Version 10.3</td></tr><tr><td class="td_header_role_name"><span class="td_label" /></td><td class="td_header_role_value"><br /><br /></td></tr></tbody></table><table class="header_table"><tbody><tr><td class="td_header_role_name"><span class="td_label"><b>Legal Authenticator:</b></span></td><td class="td_header_role_value">Health Information Executive Director Cshs</td></tr><tr><td class="td_header_role_name"><span class="td_label" /></td><td class="td_header_role_value"><br /><br /></td></tr></tbody></table>Signed on May 29, 2023, 07:40:37</body></html>',ome="JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoVW50aXRsZWQgZG9jdW1lbnQpCi9Qcm9kdWNlciAoU2tpYS9QREYgbTEyNSBHb29nbGUgRG9jcyBSZW5kZXJlcik+PgplbmRvYmoKMyAwIG9iago8PC9jYSAxCi9CTSAvTm9ybWFsPj4KZW5kb2JqCjUgMCBvYmoKPDwvRmlsdGVyIC9GbGF0ZURlY29kZQovTGVuZ3RoIDIwMT4+IHN0cmVhbQp4nI2OTWoDMQyF9zqFLhBFP5ZlQ8mi0Gad4hu0TaDQRdL7Q+wxmYEuSi1ji/fQpyfIvXbSn6iK799wBQpf1MffRcFRb0ecze0C+6Ph5QeGXySjsGe8fcIZTr8IoeN2Bi9SZ8xmYzw32L8mlER5nMB2BtlyUYpaJKxiG5CdGGmEJSvYPvCJ2eKA7QuCTHPNbn1mGqksRiFxEY6yGp7XiSLqmz5JL+3vTMZUncX/Ec0WYKUIz5x03aRzkzB5SRppC631keEEd14/VDIKZW5kc3RyZWFtCmVuZG9iagoyIDAgb2JqCjw8L1R5cGUgL1BhZ2UKL1Jlc291cmNlcyA8PC9Qcm9jU2V0IFsvUERGIC9UZXh0IC9JbWFnZUIgL0ltYWdlQyAvSW1hZ2VJXQovRXh0R1N0YXRlIDw8L0czIDMgMCBSPj4KL0ZvbnQgPDwvRjQgNCAwIFI+Pj4+Ci9NZWRpYUJveCBbMCAwIDYxMiA3OTJdCi9Db250ZW50cyA1IDAgUgovU3RydWN0UGFyZW50cyAwCi9QYXJlbnQgNiAwIFI+PgplbmRvYmoKNiAwIG9iago8PC9UeXBlIC9QYWdlcwovQ291bnQgMQovS2lkcyBbMiAwIFJdPj4KZW5kb2JqCjcgMCBvYmoKPDwvVHlwZSAvQ2F0YWxvZwovUGFnZXMgNiAwIFIKL1ZpZXdlclByZWZlcmVuY2VzIDw8L1R5cGUgL1ZpZXdlclByZWZlcmVuY2VzCi9EaXNwbGF5RG9jVGl0bGUgdHJ1ZT4+Pj4KZW5kb2JqCjggMCBvYmoKPDwvTGVuZ3RoMSAxNzk0OAovRmlsdGVyIC9GbGF0ZURlY29kZQovTGVuZ3RoIDg3MzY+PiBzdHJlYW0KeJztegl4VEXW9qm6vaXTne6EbJ100rfTSQfSYUuAsETS2QCN7IsJJpIAkbDJElRQlDAjChFFcRsZR9zFBe0sYhN1YEQddxh13AVEVJwRQUdxJfd7q7pD0qLf5F++5/99nqnKeetU1alTVeeeOre6O8SIqA9AR4PGlpWPYQvZHCKejNaRYydNnNo0+E9XESl21K8YO3V6ifnPxo1ELID6oIlTB+atHL7jKORFvXZG2fjKSZsXfEM0ZD1R7I1zFtctZQe4C/3T0F8956IV6p3Ot/5JZPgcNO38pfMWv7yqaguR1Y/6BfPqGpdSMkVBfyHk7fMWrTr/vsoz3ibqi/VYLmiYu3jlnnXfPY8FYz7Ttob6urkH45+DPnYQ8sMa0BCXH+VGHWukzIbFK1ZmbVKeJtKLNdcuWjKnrmhi4VTs50b0ty6uW7lU32ZtQt/ZqKsX1C2uT6od/AGMMQ5tZUuXNK7Qcuhm8ItE/9Ll9Uuz3hy/i8hZSRT9Z7QpZCJOscQ0DbywZSV9RYX0JzKi3U4DaQa0PQxZPeoKyaRlC52/kDDeOLpzApXa6YdHf7jELlsiUqVsMdMAZH3d8rrZpM5ZtXwRqfOW1y8ktaF+9nJSF9WtuIDUbp2kd2w58PDDY2fZCr8xpZpk810fZeeI8qVJo3b88OjJeXYyWVCNOjWjKC1hnmM3obZsZEb9kBnlIzMqQGY0Dplhr+eEx3NpG6L4sFXi4V+wKcVIexmojMbQJJpG9bQClqMe9UZN0z7qzqdZQFHWs+tgTZN+iz4fS0oNlcrf6HweZ9LzaIOOi6Sjn1lv/MQJE8mPmVboX++czPKNo1mrXzw4zK/z6p8QTxirDNm3hKpJkZbNDVlW2lTsQjw/DVK8B8968FjKwvrlkO2J4bUIOQ4LMEkWCq0xTmooQM84LY1mgIgS/q/m1+l1NuIX8nuhzKv/XVbqfj3rf2cokAY20kzxtHU4v7SAmsI8gzUvCvMcz78hzCt4Fn3DvK6HjJ5SIBXiDeCIimk5zac6WkTj4SEz4CPLqREtS0h4+VCchME0CP3jZcsSWkGraCmkVDqTFqN9HmQvAKrUH9StTaUpkJpHF4KvQ2tkrVvuAUjmYYbByCpW0CB1nz5bKWrLwQusQ3tohQPknIvC883HDA3oawzP3ih3cxFwLg0wnObs//8k/V/pdlHqPqJtvZKfEZLvShg36P90DbpGqvjfGkdUxEdQpr6DHKAU/f3k0HnxpiHtU9ARUXbO146IflHyf2BQMEyE/W5n82k77aKn2XGMepR2Ujs9T0mIJbfRarqRroKnzkTLBjzTKfDgMrqRObR2RP874cl30iuQPYcupw5KZMnaZ7SG1imvY9Q6slIGvGMSPOUadrZ2IaLOAd3vEQvOhucsZU1apXattlm7h+6lncrz2kmKxumYg/yK9oX+be19eHQ13US30gG2OeoxnKhzcO52Kn+CT21RanRMm6f9gBW46WKsQQeffYXt5j5or6dPWTJbrZRCy91aQHsGUk6qgW9uoQ42lI3lbn21Nl57hRIxx0povZVaaQdykJ6id5lFf1y7RztODsrFKVsDe7zKdiudJ9d2FomHDyv1oxHoWUJ/pr/SPuZhf+FL9BZ9nt6vv0R7AxFxME3Hau/HyE/Yt/xy5DXKc7oxWgnO/Dq6XlibnqUPWQobyCayGbwfX8JvV5YjcubKkzgXZ2kD/QHa9zMf28EtfK9yt+4h3Y+GtM6DWgyeiJf+iPfwX5gVO1VZI/sde5N9xEv5LP5Hfki5UfeA7jVjHXZ9HqLENfQQfcvi2HA2mZ3LGthqdhW7nt3KXmH72BFezKfxhfyY0qAsU57SlSBP1TXqfq+/Un+14UhnZecznX/r/FbL066kyfCHtVj9TfD+dvjJXnoH+QAdYnoWzWKQVeZm09mlyJeza9hdbBt7gLVjln3sEPuMfcW+YT9yBEpu4KnczTOQPXw5v5jfyG/je5H38c/590qSkqH4lKFKoVKlLMGqrlKuQ35M+VCXotur02DnPP3N+q36bfqH9E/rjxssxt+ZyPTyT3efzDm5v5M613fe3Nna2a59iLeDAz7lJBduLZMRt+oQu1fifnIv/Px1ZoHtUlgOG83OhmVmsQVsGVsJS17BtrB75dofYU/CSm+xY1izlTvlmgfwobyET0Q+j9fzZfw6vpm38zf5D4pRiVZsSoKSo4xVapR6ZYWySrlZCSgvKx8oh5QTyk/Ims6sc+kydF6dTzdWN0t3oe523ae6T/XV+pf0HxvMhsWGKw1Bw5fGYcbRxknGycYa4ybjDuMbplp45x56jB7vefbZQWWtUq48RtfyfJ2Dv8pfhT/PornKeA5P5dvYen4Za+eZ+pWGUXwUm0DHdV7Y+jm+lZ/go5TxrIJNpQV8cEibIV73IIpC3R46qnsSe3sVmlcaLOxyfsxgoVZcC0ZgzmeVQTqf8hK9qxxgRt2d9J7OzJLYUX6/Mgle8JRutL6S3Mpt9IiyjF1Gj/FyXDl+NG2EH09gDyIuTGN57DsFN0o+AV5UoHxEv6eF/G06inO8nm5hc3Xz6FrKZ6vpU7oPp6Kf/gJDjiGBvcDn65p5H9ZOXPcAdjeCZTJFH09XsBpli+EYfwdvt706M+1XHsbq9/JHlPG64/oprAEn4DK6kpZpa2mVvlL3GptHCptBWbqDiG6rlTydG+UaRJVqxLQdON0diAPFyni0JMNzzoZfTEeE2IL8B8QJHTxoPs74OYhir1K7YRoP0jx9DEPUQTR+qXMKzdTuo1u1eXSBtpn6Ix5cpa2Gxm30MW2ibWxd56V4j6bj5OxnZ+vH8L36MVp/3szf4VP5zZHPF9bOYsn0D+RHUBmNe1yz7i2aSkXaRu3v8O6+iLC30mw6iw5jl19ghnHKbsrvnMBbtDHKUuz3AE3W7tdczEwN2iKaSE/SvUY91Rl9eMYB9hr2eynV8ynaCqW+cz7ssAlW8MNaFyL+bPCXTp9W7C8afUbhqJEjhhcMHZKfN3jQwAH9c305/fpme7MyPRlu1ZWe5kxNcSQnJSbE94mLtdtirJZoc5TJaNDrFM4ot9wzplYNeGsDOq9n3Lj+ou6pQ0Ndj4bagIqmMZEyAbVWiqmRkn5Inv8zSX9I0n9KktnVQirsn6uWe9TAK2UeNchmTq4Ef02Zp0oNHJX8eMlfJ3kreLcbA9Ty5IYyNcBq1fLAmIsamstry6CuJdpc6imtN/fPpRZzNNhocIEkz9IWljSaSYYnlY9swQ3YikUFUjxl5QGHp0ysIKBkldfNDUyaXFlelup2V/XPDbDSOZ7ZAfKUBGw+KUKlcpqAoTRglNOo88Vu6Gq1JXd388agnWbX+ixzPXPrqisDSl2VmCPWh3nLAkmXHE7urkJ5XGnlVT17U5Xm8uT5qqg2N1+lBu6YXNmz1y2wqgo6MJZnjaltHoOpN8KIFVNVzMbXVVUG2DpMqYqdiF2F9lfvKRcttQvUQJSnxNPQvKAWjyalOUBTVrlbU1L8O7WDlFKuNk+r9LgDRameqroyZ0s8NU9Z1ebwq47Inv65LfbYkGFbYmxhxmLtydSf6pOcFBdcxZRTlmViRZ4z4RABdY6KlVR6sKfhAuqHU/Oc4RBDqmIYFZiLJzI/EFVa22wfKdrF+IA+y+5Rm78heIDn6OeRLXXhFkOW/RsSrPCTU66G/i4+4PMFcnKEixhL8UyxxtGyPrR/7kVB7vEstasoYD6aBNvWVY0cCPO73eIBXx3002xUAk2TK0N1lWantpJ/oK8qwGtFz+6unoTpoqepq+fU8FoPPLld3rgTAibvqT+bPbFPecPIAEv8b7rrQ/0VUz0Vk2dWquXNtWHbVkyLqIX6h5/qC3OBPqWVSioPczxVkb1wyupTwqJSaQnosvBnkE49N2g0wStlC1PHBOy140JYZXa7ezkoqB0Xo2TRPSy8zMBIX2R9VEQ9YnmWZgULxquyYtrM5mZzRB9cLTThmeECHk/TKt1qaYCm42Rm4S+o7R4uqCo14IfJSoUA/C/UFK5GCKaG+Sok4Z39c8cg0DU3j/GoY5prm+uCWtNsj2r3NO/kT/Onm5eW13Y5TlDruDo1MGZjFWzVwEbiUHAqafGw9ZNb/Gz91JmVO+345L9+WmUrZ7y0tqSqJRN9lTtVIr9s5aJVNIqKKipUwbDJVm6S8qk7/URNslcnG2R9TpCRbDN1tTGaE+ShNntXG0ebLtTml20iiRhTOq2yp/fII1nVX77wxHdz1dEmU+8+/BhxE+5KhjBFpMgGg0JkiYrqne6o8PdCIpnkXKdNHlGDbqvZ3Fvdph78v9eND3m26Oje6Y6m7g2aw/ojUqRtTdBtt1h+LvTLyULdG4z+Jd2RDUJ3rNX6P6a7T0xM73THUPcGrUR02nYjbWvWIzDa7b3TbaPuDcb8ku7Ihmi4ZHJcXO90x0J7V7KH9UekSNta4Dap8fG90x0P7d3zhPRHJFtELQZuk5aY2DvdCdS9wT5hikiRk9mgW01O7p3uJOreYMIv6Y6NqNnhNm6Ho3e6k3voTgzr/290x0J3ltPZO92pWHlXEstJ+rlA5HOLw2nIUdXe6U7Hp9yuJJaT8nOByMni4ZIDPJ7e6XZT9wZdYf0RKXKyJLhkntfbO92ZUmPXPNSjFk6Rkzng/8P69eud7mypsWse6lELp/SIWircfWRubu9051C38bLD+iOSGlFLg7uX5uX1Tvcg6t6geCeett2siFoG/L9i+PDe6R5GA07xeWH9ESknouaF/08dPbp3ugsp/xQvvjMf8nOBARG1HLhkdXl573SXUPcGzwCN+LlAfkRtAFxybkUvv04dJzWGUinotO1G2jYPLrmTpil927zJrn1PKv3oIIgr/Vp9aa6dSraS1jrK5Q8qnra4hDxbcX9Fxd1ooEQVuAT0KGiXIn6PmaWko90OXANqAj0K2gXaB8KbAih6VdAS0FbQQdGjpCnOVtVlL85WHBjrwF3LpiTRMZAGUsgFHAiaCJoF2gTaCjJIOdGyBLQGtAt0XPb4laTWzflYe1Lr1bJoW7AoT1brQtXqGlltO6cqVI6fHCrLzgyJjQyJDR4Sah5QEiqzc0NlXFZekyjN1rzdxYlKIjaZiIUvBTL+DNkYQwC4Q0mgAIgrhnCLX4lry/Tmbd2l6IgpXGE0l1zaboW1WmPzis1c48fwunHxL/jRUA8/2hYTm7e1+Cx+iB4F7QIp/BDyh/xDWsMPCpsDi0BbQbtAe0HHQAZ+EPkA8n6+n2z8AxoIKgLNAm0F7QIdAxn5B0A7f198jpIo+CIQ5+8D7fw9bOs9oI2/C+5d/i6W9nprwYi8nZLxDQwzrqwwk5QaZuIS84L8tdbv+8GjvHjS8KgnlAy4Zr6S0Zo12BVUklsL57uC/KM21ee6o3gQf4MCII6VvIGZ3yAVNAlUC1oKMoB7E9yb1AS6DnQHKACClwHtIJW/CHoZ9CYNAvlBk0Amvq8V0wT53lZvias4kb/K/4o3iou/wp+X5cv8OVm+xJ+V5Qso01G+yJ9rTXdRcTT6CWPsKO0oB6Jfz//Slhnn0opj+S7YzgUcCCoCTQTNAm0CGfguntE61xUHJU/Qi7gouHgrfSbL++guE/kXuPzeUjigKsA78gxwgK3qVi/3e2++FVUB3ms3gxPgvWIjOAHeS9aCE+BddBE4Ad65C8AJ8M6cBU6Ad+I0cIAgv/3xzGxXwcSFTC228YthpYthpYthpYtJxy8Wmb7XibX9sTUnBxbb4vf1y3E1dbCmJ1nTFNZ0F2uqZ02Xs6a1rKmQNZ3Hmnysycma0lmTnzU9wYbDFE3M3x5RHeFPZk0vsqbtrKmRNXlZUxZrymRNKivwB7m79cx8WZTLoq1YHDqUZ4xG9LFxNyzqhs+7ERN2AfeCNFnzQ0jNCAk70kWZ0ZZTFKoPGJm3pHgc34OBe/AY9tABkA4PaA/caA+U7IECG7AINAu0G3QMpIEMkM7AwjdJtAEHgopAs0BrQMdABrmcYyBOS8JLfFQubGB40RNFje9BFj8UuLnbn2Z32n32ccomJ7Ols4npWjovIHknjYs1xQaZdce31u++tVJUcRS/lm+iNDyI68Llptbv01xB9odW7xOu4gR2C6Xr4HVsBHlZFsrh1CjrQ8lpEuUQcvKHUOa1OmdgmK3Vm+vqYDFi1A7X987Drs+cQQ72iPMJ11tqUMdaXX9Hy0M7XG84N7heGBg0oeVJb5Ch6FCl6E7ncNf2F6XoWnRsaXVdLoodrsucY10LnbKjPtRxXiNqfptrinemaxz0lTlnu/yN0LnDVeQ8z1UYkhoqxuxwDcISfCE2B4vt55STetKlwukFQdbgzzXebKw0TjQOM+YZc41uo8uYZkw1xpviTHZTjMliMptMJoNJZ+ImMsUHtYN+n/jtPt4g/0nDoJM/7kvezkn+e4D8yZ8zE6ezKNBHqeAVU0tYRWD3HKqYrQZOTPUEmXnyzIDeU8ICcRVUMa0kMNxXETRqUwIFvoqAcdK5lS2MXVuF1gBfH2Q0rTLINNG0LlV8f7mTGItdd02qKPuuu6aqipITLypKLoobHTtiTNkvQG0Yfd0pOYJPC9xcMbUy8GBaVSBPMFpaVUXgBvEF5072FTteXraTfSmKqsqdymj2VfkU0a6MLquqqgiyGVKOVPYl5OAxX0o5E17MQo5UU3pIbktILgvjIZcpCshFRVGWlMuKipJyOibkWhozy8taMjOlTJJKjVKmMUntKfNiFmSysqRMYhO9KGVeTGwSMoHRUsTphEi6U4qwFHJKESdLkSIzukUGhkU2nBLZIGdSWLeMMyRjPdglYz0IGV9vU32Jz8faRlXNqRZfDtd6yutBtYGrL2pIDjTNVtWWOVXhb429tbPnNIiyrj5Q5akvC8zxlKkto6p/obtadI/ylLXgvjitsqXaX1/WOso/qtxTV1bVNnbSkIKIuTacmmvIpF9QNkkoGyLmGlvwC90FonusmKtAzFUg5hrrHyvnIunjkypbTFRSVVodKtt4tBn+WpvqripJtC8dLZ13lDv58tQO3Fa2UbSvKmDxlASsINHVv7h/sejCmRJdMeIXgHBX8uWj3KkdbFu4y47mWE8J+VZc2HghJZfPLwv9NSKhacWFwuAh9DX+WkJfecBfV9a4Ap8SAjlTKwJFk2dWthiNaK0VWwqM7GqLji4PartDjQPQOFI0KsopQdFWKNqiosKCpz//C8NlqTgFTfyJNuZPZyuosUoJpFdM4wgF08JftXbgLiVeD41V2GAj87HGLh3hZft8FKqT2HMXrbgwzIVtsSJchkZiSGOXSU4lYSzfKYutgEIRuUj8kK8X/8dlxEfDWHdsFkD8C9NPqrL7J7+efiRVt1v8r9ftkJyp7yAbpTGHP051sVKTMy2dMx5rT7eRKSmodbZbLCXTwXzVHh0tmRP+DIsVnFeNYi6/1cqnR6l2O9BsswGTZUtQ+9qfbbEYpkeluNLsMWKo3WzFMLtF6LOrTH5qEOMIKtvFUMmI0WB+wLSS+bZdaAHznR/jwdWkj6pO9tlPhCxQU3gSWBiu1hwVRi0qPFkoaPCg0lX+YUqqEfFfjzeAzuBITknmhmizxWw1K4aExPjEPomKIVVJcrO4GECyyelmieZYN54P8/lykNaymvxYd15SYlJiXEI8j+GeLHfesIJhw4YO8WZ7Pe7b2fcPzby8akXjhEuuf2VdZwsbcf29g8vH37JowvbOl/UdCWlnz+7c+8z9nZ0P1OVtHza4/LP7Pvk2R3wy2kakWwfbR9Fd/jMM+nSTaZORGY2k6IT9yWS8TeVqNOcp0booLmwWJa0YZRbGj/q39vNHSwNaoqOl9Tq7zHi8y4xmYcYJ9q99XYYcLy05wX6iZvxhKhIGjBsxsKbQLgwJEyS4JW1TPvjpYx44OUnfsb1z5PaT54f9SHcSe7FSMh33p9fHLoznFfaK+HPt58broi3ptpgYSkoO7Suuy6fiunwKzHc7hG/EeU3CvWIFbzKLnZjsYv0m4U39xQZMKWoKw19KslXaxCptYpU2sf6v2uSH02zi6OlaXb41wb6sRjaND3lX2DLSwVgNhdwjncM53O5Y8Kc8g/fbPH7R5qovOl/oXM8uffL2mrMHX9G5Qd8RE1e/Y/ETnSdPPqywjWuqf59gFVeOQbBhB2xopP1+h0HuzijRYBR7NEpkQe17aTOs+nt/rOAMerF5o0R0/9guGHT/6I8VnJ6n6xThTga9LirIG9tUHdPhFvW4QWV8oMIU8I8xabmgdsQfLa1nCpvuq65TeKjLhj912ayzXZpMaDTtuLXngbR/LZzmcM0n9kJ7YchcMFR30IIfDRWexPt0pumaO1P11u3bf/gXvKhCO6JL142mBESj2/1JLnIm8OlKjb4manp0vbJQvySqPtqUENQOy6ljwfinCC7NKTA77h39D/EnUnSD40Y6BjuL48anFDsnx1U7pjjr4han1DlXGlYmnOAnku2UyGzWpKRJibWJS/FR3Wm7zn6HndvtulSn2Ugd/EFi2u52YQjYc7c/xm43TLczxm7q49RFIwAePy0khtw3yW8Nau9LS4H5Qq4SzD+kyaxCVVR2zpCAlVlTXKi1ZXmHiPLxdM+QQS7mSoR1/dVCUWK+3SSjZChummTczDT6M3OGuIxFuOsqRhlFjRbRY1Sjo/l0Y7J4VEanmN0YIzzc6BTzGhPFMoyO9CEFPY+7r8Ynz/thtC3z+U4s6+HgR0/WoKPoqDz+J5cVsti4ESPiRoS8HRJs2XKWZDB4MijWTvl5FBtvdCcm5ucNY27h+BkG5byO3C92ftZ5jMW//3cWw346Ym5dN2fjyXf5ZMvwGRtWP8BmJN3dzlxMYRbWt3N/5/d29dGOBnbTlaUN94mzUKQdUVrgCYOUFn+fJGmFZIkOiX0RD+QzyO5ivF1MVheT2cV4upiMLsbdxagirqwRnC4jPmNk1FlRZZkzMuozVkddG3VF5n19Hsp9WrFGJaUkJw2qyH0zSZ/Kp3Nuz2Pm5GpTdVS1uTq62lJtXWBaELXAvCB6gWWBtd3bnm3L9mZmZ/YbljnTXBU91zu37wrPisymzBvMt1k2970l96ZB95gfsNydfU/fNu+z3kS5F/GIMroYTxeT2cWE92vo2oKha1OGrm3iEAS1/f649BEzTdlZFrMuRfUm6KIHpKUE+YP+DEeucBGXo8gx0THL8ahjr8Ngc7gcSxwHHDqXY5ODO57C6U5AKJe+748X4nbmZ9zO9iFoMzvj4iy0xScOkWfCHhM7hLEB1WmL0niaM8GoE8sQg8B80i4OjGD8fWw2cM4B0S6E7EyHv0/ykDwxfKiIL47kEAqPdSQK73WoYqRDFaMcdrErh/Re0Ytn38HPJaP21Q4ZDjNzoOgx54h9OSxHzCnGgzkio75kxPgccfyECjBf7xBaclLkCtw4ibV5u/N4UV5THs8TxzuT5FLILgObGjI+l04idyS9xSXWpkovVDNtdrFlm1y7TRXCNvGW8Yol2GLE/DaLUGYziJltGQeIFdFERDrH4PBprFk2vutEirPns6NcPsFes8wXCqfLxJn8ujt2Hl2O44my6OgynE6c4mXLfYftJ2WBU4o/HNakEfLm48/un+7Rx+d6Y+1x9j52xZBhVVMpqq8xlen7A9LjUXXHeFIpw2O1mPqZU1nf7CizwadLJZc9LZXhEiRCeAhkAM/xrV27lk6tpmYZq1m+rKa7QQj1KZCxYOiQbG/2AD50iLgr5eclJiYZvSI2JMSLq5R8X4oQ4i1qtW24dPXKoVk3PHfrxOLhOddPveypmbEBS+P81QsSEwemXrHrlhnzn7ts7zvsDOfC5fVlZ3iSs/LOXDth7Kq+Lt+4S+clT6meUuBxpvUxZ+YXr66eufWch0UEydS+4jn6WymJuXaSJXzjiO66epi6GGMXY+hizMLNPd4hUcJLpoJpcjBiFquZKZRoj/LZzIZEpxJts2dQBrPGydgcJ/0hzixvNVkWphlN5VHltcalxibjdUYdGVXjHcaAcbdxn9FgFG8G8W4xCr8SnmIUL5KYGMl8J11OMjKci0uK8D2juKREC98zGmRUFw4uA3sHX0DJbFjL+T0uLuLJfH3YfjR8Nz78NV7DR8V7OBZhPDY/3/6CiOVh0awk8Ri8Q2M9Q/NjC2LzEzyx8eIJcnvK2YWzF+VecUXbY4/18fVNv3OrfXT9XXzORmZc1HnNxpM3jM8N/TymkMJE0isKwgSjZP3n0bvpO5NGJjJpnbjhRmknyUxm+X/Q0UALHslJ3BatwBiJNooB2skGjAX+RHEUC+xDccB46gNMAP5IiRQPTKIEYDLwB3JQEvgUcoBPpRSgU2IapQLTyal9Ty6JKqUB3eQCZpAK9AC/o0xyA7MoA+gFfkvZ5AH2hR99S/3IC8yR6KNs7QTlUl9gf4kDKAc4kHzAQdQfOBj4DeXRAGA+DQQOoUHa1zRU4jAaDCygfOBwGqL9i0ZIHElDgaMkFtIw4BlUABxNw4FFNEL7ivw0ElhMo4AlVAgsBX5JZXQGsJxGA8fg7XmcxpIfOI6KgWdSCfAsiRVUCjybyoDjaYx2jCZInEhjgZNoHHAynal9QVMkTqWzgNNwNztK02k8cIbEc2gCsJImap9TFU0CzgQepXNpMvhqmgqsoWnA8yTOounaP6mWZgDr6BzgbOA/aA5VAefSTGA9nQs8n6q1z2iexAaqAc6n87QjtIBqwS+UuIjqgItpNtovoDnAJRKX0lztU1pG9cDlNA/YKHEFNWif0IU0H3gRLQBeDPyYVtJC4CpaDLyELgBeKnE1LQFeRkuBl9My7TCtkdhEjcC1tAL4O7pQE//fexHwConr6GLtEF1JK4FX0SrgeroEuIEu1T6kZloNvJouQ8tG4Id0DV0OvJbWADfRWuB1wIN0Pf0OuJl+D7yBrtAO0I0Sb6J1wJvpKuAttB69fwAeoFtpA3ALNWv76Y90NfA22gj8k8Tb6VrgVtoEvIOuA94J/IDuouuBd9Nm4D10A/BeulF7n+6jm7T36H66GbiNbgE+IPFB+gPwIboV+DD9Ebhd4iN0G/BR+hMwQLcDW4DvUittBbbRHcB2ukt7hx6ju7W3aYfEx+keYJDuBe6k+4AdEp+gbcAn6QHtLXqKHgT+WeIuegi4mx4G/oW2A5+mR4B76FHtTXqGAsBnqUX7Oz0n8a/UCnye2rQ36AVqB75IjwFfoh3Al+lx4Cv4GPMGvUo7gXsl7qMO4N/oSeBr9JT2Or0OfI3eoD8D/067gG/Sbu1v9JbEt+lp4Du0B/guPQN8T+L79CzwA3oOuJ/+qu2jAxIP0gvaXvqQXgQeopeAH0k8TC8DP6ZXgJ/Qq8BPaZ/2Kh2R+Bn9DfgPek17hf5JrwM/l3iU3gB+QW9qL9Mxegt4XOKX9DbwK3oH+C96F/i1xG/ofe0lOkEfAL+l/cDvgC/S93QA+AMdBP5IHwJ/kniSPtJeoE46DNToY+B/Yvr/fEz/8jce0//Z65j+2a/E9M9Oi+lHfiWmf3paTP+kFzH98KmYvjwipn/0KzH9IxnTPzotph+SMf1Qj5h+SMb0QzKmH+oR0z88LaYflDH9oIzpB3+DMf2d/0cx/Y3/xPT/xPTfXEz/rd/Tf7sx/dfu6f+J6f+J6b8c05//7cf0/wK993M1CmVuZHN0cmVhbQplbmRvYmoKOSAwIG9iago8PC9UeXBlIC9Gb250RGVzY3JpcHRvcgovRm9udE5hbWUgL0FBQUFBQStBcmlhbE1UCi9GbGFncyA0Ci9Bc2NlbnQgOTA1LjI3MzQ0Ci9EZXNjZW50IC0yMTEuOTE0MDYKL1N0ZW1WIDQ1Ljg5ODQzOAovQ2FwSGVpZ2h0IDcxNS44MjAzMQovSXRhbGljQW5nbGUgMAovRm9udEJCb3ggWy02NjQuNTUwNzggLTMyNC43MDcwMyAyMDAwIDEwMDUuODU5MzhdCi9Gb250RmlsZTIgOCAwIFI+PgplbmRvYmoKMTAgMCBvYmoKPDwvVHlwZSAvRm9udAovRm9udERlc2NyaXB0b3IgOSAwIFIKL0Jhc2VGb250IC9BQUFBQUErQXJpYWxNVAovU3VidHlwZSAvQ0lERm9udFR5cGUyCi9DSURUb0dJRE1hcCAvSWRlbnRpdHkKL0NJRFN5c3RlbUluZm8gPDwvUmVnaXN0cnkgKEFkb2JlKQovT3JkZXJpbmcgKElkZW50aXR5KQovU3VwcGxlbWVudCAwPj4KL1cgWzAgWzc1MF0gMzkgWzcyMi4xNjc5NyAwIDYxMC44Mzk4NF0gNTEgWzY2Ni45OTIxOSAwIDAgMCA2MTAuODM5ODRdIDcyIFs1NTYuMTUyMzRdIDg3IFsyNzcuODMyMDNdXQovRFcgNTAwPj4KZW5kb2JqCjExIDAgb2JqCjw8L0ZpbHRlciAvRmxhdGVEZWNvZGUKL0xlbmd0aCAyNjU+PiBzdHJlYW0KeJxdkctqxDAMRff+Ci2niyHvTAdCoEwpZNEHTfsBjq2khsY2jrPI39ePNIUKbDjoXlmSk1v32ElhIXkzivVoYRSSG1zUahjCgJOQJMuBC2Z3CjebqSaJM/fbYnHu5KhI0wAk7y67WLPB6YGrAe9I8mo4GiEnOH3eesf9qvU3zigtpKRtgePoKj1T/UJnhCTYzh13eWG3s/P8KT42jZAHzmI3THFcNGVoqJyQNKmLFponFy1Byf/lq+gaRvZFjVfnF6dO07JsA10j1YGKIlCVRorKKirL+0B1FV7Z62W/1Y9mqjqaovdS7OqY9+35NR6zs9UYN3bYdZjXTyokHt+hlfYuf34A/WeHbwplbmRzdHJlYW0KZW5kb2JqCjQgMCBvYmoKPDwvVHlwZSAvRm9udAovU3VidHlwZSAvVHlwZTAKL0Jhc2VGb250IC9BQUFBQUErQXJpYWxNVAovRW5jb2RpbmcgL0lkZW50aXR5LUgKL0Rlc2NlbmRhbnRGb250cyBbMTAgMCBSXQovVG9Vbmljb2RlIDExIDAgUj4+CmVuZG9iagp4cmVmCjAgMTIKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDE1IDAwMDAwIG4gCjAwMDAwMDA0MTYgMDAwMDAgbiAKMDAwMDAwMDEwOCAwMDAwMCBuIAowMDAwMDEwNDk1IDAwMDAwIG4gCjAwMDAwMDAxNDUgMDAwMDAgbiAKMDAwMDAwMDYyNCAwMDAwMCBuIAowMDAwMDAwNjc5IDAwMDAwIG4gCjAwMDAwMDA3OTYgMDAwMDAgbiAKMDAwMDAwOTYxOCAwMDAwMCBuIAowMDAwMDA5ODUyIDAwMDAwIG4gCjAwMDAwMTAxNTkgMDAwMDAgbiAKdHJhaWxlcgo8PC9TaXplIDEyCi9Sb290IDcgMCBSCi9JbmZvIDEgMCBSPj4Kc3RhcnR4cmVmCjEwNjM0CiUlRU9GCg==";function sme(e){let[n,r]=m(null);f((()=>{if("html"!=e.previewState)if("pdf"!=e.previewState){var t=new URLSearchParams({ReportID:e.reportId}).toString();b.invokeCustomApi("HealthAndWellnessApi.DownloadReport","GET",t,!0).then((function(e){r(e)}))}else r({Type:"ResearchKitConsentDocument",Summary:"Summary",Content:ome,ContentType:"application/pdf"});else r({Type:"Subsequent evaluation note",Summary:"Summary",Content:ime,ContentType:"text/html"})}),[]);let a="";return n&&(a=n.Type,n.Summary&&(a+=" • "+n.Summary)),t.createElement(Kt,{className:"mdhui-report-view"},t.createElement(Iz,{subtitle:a,variant:"compressedModal",showCloseButton:!0}),!n&&t.createElement(Dn,null),n&&t.createElement(ame,{type:n.Type,content:n.Content,contentType:n.ContentType}))}function lme(e){return t.createElement(Kt,null,t.createElement(Iz,{showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),t.createElement(iK,{previewState:e.previewState,term:e.term,labObservationID:e.labObservationID,openLinksInNewWindow:e.openLinksInNewWindow}))}function cme(e){let[n,r]=t.useState([{key:"Dashboard"}]);function a(e){r([...n,e])}function i(e){a({key:"TermInformation",properties:{term:{TermFamily:e.TermFamily,TermNamespace:e.TermNamespace,TermCode:e.TermCode}}})}function o(){a({key:"ExternalAccounts"})}function s(){r(n.slice(0,n.length-1)),2==n.length&&b.triggerEvent({type:"applicationDidBecomeVisible"})}function l(n){return t.createElement(HW,{concept:n,onClick:()=>function(e){a("Reports"==e||"Immunizations"==e||"Procedures"==e?{key:"NewsFeed",properties:{feed:e}}:{key:e})}(n),previewState:"default"==e.previewState?"Default":void 0})}function c(c){var u,d,h,m,p,f;if("Dashboard"==c.key)return t.createElement(Kt,{colorScheme:null!==(u=e.colorScheme)&&void 0!==u?u:"auto"},t.createElement(bW,{previewState:"default"==e.previewState?"externalAccountsLoaded":void 0,externalAccountCategories:["Provider","Health Plan"],triggerWebExternalAccountSyncComplete:!0}),t.createElement(Vz,{noTopMargin:!0},t.createElement(fW,{previewState:"default"==e.previewState?"externalAccountWithIssue":void 0,externalAccountCategories:["Provider","Health Plan"],onClick:()=>o()}),t.createElement(xW,{excludeDeviceManufacturers:!0,onClick:()=>o(),previewState:"default"==e.previewState?"Default":void 0}),t.createElement(XW,{onViewTermInfo:e=>i(e),onClick:()=>{a({key:"NewsFeed",properties:{feed:"LabReports"}})},previewState:"default"==e.previewState?"ImportantLabs":void 0}),t.createElement($W,{previewState:"default"==e.previewState?"BloodTypeLabs":void 0,onClick:()=>function(){let e="https://medlineplus.gov/ency/article/003345.htm";b.getCurrentLanguage().toLowerCase().startsWith("es")&&(e="https://medlineplus.gov/spanish/ency/article/003345.htm"),window.open(e,"_blank")}()}),l("Medications"),l("Immunizations"),l("Reports"),l("Allergies"),l("Conditions"),l("Procedures")),t.createElement(Ms,null,t.createElement(DV,{previewState:"default"==e.previewState?"enabled":void 0,variant:"small",hideWhenConnected:!0,onClick:()=>a({key:"ConnectEhr"})})));if("NewsFeed"==c.key)return t.createElement(Hhe,{feed:null===(d=c.properties)||void 0===d?void 0:d.feed,previewState:e.previewState,presentation:"Push",colorScheme:e.colorScheme,onEventSelected:e=>{r([...n,{key:"NewsFeedEventDetail",properties:{eventReference:e}}])},onReportSelected:e=>{a({key:"ReportDetail",properties:{reportID:e}})}});if("NewsFeedEventDetail"==c.key){let n,r=null===(h=c.properties)||void 0===h?void 0:h.eventReference,i=r.feed;return e.previewState&&("Procedures"==i&&(n="ProcedureGroup"),"LabReports"==i&&(n="LabReport")),t.createElement(Uhe,{feed:r.feed,presentation:"Push",pageDate:r.pageDate,pageId:r.pageId,onViewLabObservationTermInfo:e=>{a({key:"TermInformation",properties:{labObservationID:e}})},previewState:n})}return"TermInformation"==c.key?t.createElement(lme,{presentation:"Modal",openLinksInNewWindow:!0,previewState:e.previewState,term:null===(m=c.properties)||void 0===m?void 0:m.term,labObservationID:null===(p=c.properties)||void 0===p?void 0:p.labObservationID}):"Medications"==c.key?t.createElement(Yhe,{presentation:"Push",previewState:e.previewState,onViewTermInfo:e=>i(e)}):"Conditions"==c.key?t.createElement(Fhe,{presentation:"Push",previewState:e.previewState,onViewTermInfo:e=>i(e)}):"Allergies"==c.key?t.createElement(zhe,{presentation:"Push",previewState:e.previewState,onViewTermInfo:e=>i(e)}):"ReportDetail"==c.key?t.createElement(sme,{previewState:"html",reportId:null===(f=c.properties)||void 0===f?void 0:f.reportId}):"ExternalAccounts"==c.key?t.createElement(Vhe,{presentation:"Push",onBack:()=>s(),excludeDeviceManufacturers:!0,colorScheme:e.colorScheme,previewState:e.previewState,connectExternalAccountOptions:e.connectExternalAccountOptions}):"ConnectEhr"==c.key?t.createElement(Kt,{colorScheme:e.colorScheme},t.createElement(Iz,{showBackButton:!0}),t.createElement(Vz,null,t.createElement(hG,{providerCategories:["Provider","Health Plan"],connectExternalAccountOptions:e.connectExternalAccountOptions}))):void 0}return b.back=s,b.dismiss=s,t.createElement(t.Fragment,null,n.map(((e,r)=>t.createElement("div",{key:e.key,style:{display:r!=n.length-1?"none":void 0}},c(e)))))}A(".mdhui-report-view {\n height: calc(100dvh - 8px);\n display: flex;\n flex-direction: column;\n}\n\n.mdhui-report-view .mdhui-report-content {\n flex-grow: 1;\n}");export{Xt as Action,On as ActivityMeter,iV as AllergiesList,zhe as AllergiesView,cV as AppDownload,IU as AsthmaActionPlanManager,rV as AsthmaActionPlanView,ule as AsthmaActivityView,jU as AsthmaAirQualities,dle as AsthmaAirQualityView,RU as AsthmaAlertTakeoverNotice,zU as AsthmaAlertTakeoverTrigger,hle as AsthmaAlertTakeoverView,FU as AsthmaBiometrics,HU as AsthmaControlCalendar,WU as AsthmaControlStatusHeader,mU as AsthmaDailyDataType,mle as AsthmaDayView,ple as AsthmaHeartAndLungsView,ZU as AsthmaLogEntryDetails,vle as AsthmaLogEntryEditorView,QU as AsthmaLogEntryHeader,Zq as AsthmaParticipant,JU as AsthmaPostEnrollmentSurveyTrigger,tV as AsthmaProviderReport,yle as AsthmaProviderReportView,nV as AsthmaRecommendedArticle,ble as AsthmaSleepView,Lhe as BlankView,hV as BloodPressureVisualization,Nn as Button,Ds as Calendar,Ns as CalendarDay,Ms as Card,js as CardTitle,$de as CelebrationStep,Zde as CelebrationStepContainer,mV as ConditionsList,Fhe as ConditionsView,Yde as ConnectDeviceAccountStep,Kde as ConnectDeviceAccountStepContainer,EV as ConnectDevicesMenu,DV as ConnectEhr,Xde as ConnectEhrStep,Qde as ConnectEhrStepContainer,Bhe as ConnectEhrView,MV as ConnectFitbit,jV as ConnectGarmin,RV as DailyDataChart,fH as DailyDataType,ZR as DataChart,vz as DateRangeContext,yz as DateRangeCoordinator,dz as DateRangeNavigator,wz as DateRangeTitle,xz as DayTrackerSymbol,LV as DeviceDataMonthChart,FV as DeviceDataMonthCharts,qhe as DeviceDataView,Az as DumbbellChart,sW as EhrNewsFeed,cW as EhrNewsFeedEventDetail,Uhe as EhrNewsFeedEventDetailView,Hhe as EhrNewsFeedView,fW as ExternalAccountConnectionAlert,vW as ExternalAccountList,bW as ExternalAccountsLoadingIndicator,xW as ExternalAccountsPreview,Vhe as ExternalAccountsView,Pz as Face,IW as FitbitDevices,jW as FitbitMonthCharts,Whe as FitbitView,zW as GarminDevices,LW as GarminMonthCharts,Ghe as GarminView,Zhe as HealthAndWellnessView,HW as HealthPreviewSection,Dz as Histogram,$he as HomeView,qq as InboxCompletedListItem,nme as InboxHistoryView,hK as InboxItemList,cK as InboxItemListCoordinator,Hq as InboxMessageListItem,uK as InboxMessageView,Uq as InboxResourceListItem,Vq as InboxSurveyListItem,eme as InboxView,$W as LabResultsBloodType,XW as LabResultsSummary,Kt as Layout,Yt as LayoutContext,Dn as LoadingIndicator,QW as MedicationsList,Yhe as MedicationsView,Nz as MonthlyEventMatrix,eG as MostRecentNotification,cle as MyDataHelpsAssistant,Iz as NavigationBar,Qhe as NewPointsView,Mz as NotesInput,nG as NotificationList,Khe as NotificationsView,oV as PlatformSpecificContent,jz as ProgressBar,Rz as ProgressBarStep,zz as ProgressRing,rG as ProjectHeader,sG as ProjectSupport,hG as ProviderSearch,mG as RecentDailyDataBarChart,yG as RelativeActivity,gG as RelativeActivityDayCoordinator,pG as RelativeActivityDayNavigator,bG as RelativeActivityToday,Fz as Resource,Hz as ResourceList,rme as ResourceListView,wG as RestingHeartRateCalendar,Uz as RotatingComponentCoordinator,Vz as Section,Wz as SegmentedControl,OG as SeverityCalendar,Is as ShinyOverlay,Gz as SingleDataPoint,Yz as SingleExternalAccount,Kz as SingleNotification,Qz as SingleSurveyTask,Jz as SparkBarChart,cme as StandaloneHealthAndWellnessView,tL as StatusBarBackground,Mde as StepDetailText,Gde as StepImage,Wde as StepImageIcon,wle as StepLayout,Dde as StepMarkdown,jde as StepNextButton,Ide as StepText,Nde as StepTitle,xG as SurveyAnswerChart,AG as SurveyTaskList,Xhe as SurveyTasksView,eL as Switch,mhe as SymptomSharkCalendar,Dhe as SymptomSharkCalendarView,ghe as SymptomSharkLogEntry,The as SymptomSharkLogEntryEdit,Ihe as SymptomSharkLogEntryEditView,Che as SymptomSharkLogEntryList,Ohe as SymptomSharkLogToday,khe as SymptomSharkMonthReport,whe as SymptomSharkNotesTimeline,fhe as SymptomSharkOverallExperienceChart,Phe as SymptomSharkReportBuilder,Mhe as SymptomSharkReportBuilderView,jhe as SymptomSharkSymptomDetailView,hhe as SymptomSharkSymptomMatrix,xhe as SymptomSharkSymptomSeverityChart,Ahe as SymptomSharkSymptomSeveritySummary,ahe as SymptomSharkSymptomTreatmentFilters,She as SymptomSharkSymptomTreatmentHistograms,dhe as SymptomSharkVisualizationCoordinator,iK as TermInformation,lme as TermInformationView,nL as TextBlock,bz as Title,rL as TrackerItem,E as UnstyledButton,Lq as ValueSelector,oK as ViewEhr,Fq as ViewHeader,Bq as WeekCalendar,Jde as YouTubeStep,ehe as YouTubeStepContainer,NU as asthmaDataService,sU as bloodPressureDataProvider,tU as checkDailyDataAvailability,Kq as computeAsthmaControlState,the as convertToSymptomSharkConfiguration,KH as dailyDataTypeDefinitions,Yq as dateToAsthmaLogEntryIdentifier,fz as get6MonthStart,aU as getAllDailyDataTypes,sH as getAsthmaAirQualityDescriptionText,Qq as getAsthmaDataStatusColor,Xq as getAsthmaDataStatusText,rH as getAsthmaImpactTexts,aH as getAsthmaImpacts,eH as getAsthmaSymptomLevel,Jq as getAsthmaSymptomLevelText,tH as getAsthmaSymptomTexts,nH as getAsthmaSymptoms,iH as getAsthmaTriggerTexts,oH as getAsthmaTriggers,iU as getDailyDataTypeDefinition,pH as getDayKey,gz as getDefaultIntervalStart,iz as getLanguageFromIso,Ps as getLocaleFromIso,pz as getMonthStart,mz as getWeekStart,mH as isBloodOxygenLevelWithinRange,lH as isDaytimeRestingHeartRateWithinRange,cH as isNighttimeRestingHeartRateWithinRange,uH as isRespiratoryRateWithinRange,hH as isSleepDisturbancesWithinRange,dH as isStepsWithinRange,az as language,nU as queryDailyData,rU as queryPreviewDailyData,uU as queryRelativeActivity,JH as registerDailyDataProvider,eU as registerDailyDataTypeDefinition,N as resolveColor,Jhe as showNewPoints,UH as simpleAvailabilityCheck,cU as useInitializeView,BV as useInterval};
174
- //# sourceMappingURL=index.js.map
173
+ */var wie=Object.prototype.toString,xie=Array.isArray||function(e){return"[object Array]"===wie.call(e)};function kie(e){return"function"==typeof e}function Sie(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Aie(e,t){return null!=e&&"object"==typeof e&&t in e}var Eie=RegExp.prototype.test;var _ie=/\S/;function Cie(e){return!function(e,t){return Eie.call(e,t)}(_ie,e)}var Oie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};var Tie=/\s*/,Pie=/\s+/,Die=/\s*=/,Nie=/\s*\}/,Iie=/#|\^|\/|>|\{|&|=|!/;function Mie(e){this.string=e,this.tail=e,this.pos=0}function jie(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function Rie(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Mie.prototype.eos=function(){return""===this.tail},Mie.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},Mie.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},jie.prototype.push=function(e){return new jie(e,this)},jie.prototype.lookup=function(e){var t,n,r,a=this.cache;if(a.hasOwnProperty(e))t=a[e];else{for(var i,o,s,l=this,c=!1;l;){if(e.indexOf(".")>0)for(i=l.view,o=e.split("."),s=0;null!=i&&s<o.length;)s===o.length-1&&(c=Aie(i,o[s])||(n=i,r=o[s],null!=n&&"object"!=typeof n&&n.hasOwnProperty&&n.hasOwnProperty(r))),i=i[o[s++]];else i=l.view[e],c=Aie(l.view,e);if(c){t=i;break}l=l.parent}a[e]=t}return kie(t)&&(t=t.call(this.view)),t},Rie.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},Rie.prototype.parse=function(e,t){var n=this.templateCache,r=e+":"+(t||zie.tags).join(":"),a=void 0!==n,i=a?n.get(r):void 0;return null==i&&(i=function(e,t){if(!e)return[];var n,r,a,i=!1,o=[],s=[],l=[],c=!1,u=!1,d="",h=0;function m(){if(c&&!u)for(;l.length;)delete s[l.pop()];else l=[];c=!1,u=!1}function p(e){if("string"==typeof e&&(e=e.split(Pie,2)),!xie(e)||2!==e.length)throw new Error("Invalid tags: "+e);n=new RegExp(Sie(e[0])+"\\s*"),r=new RegExp("\\s*"+Sie(e[1])),a=new RegExp("\\s*"+Sie("}"+e[1]))}p(t||zie.tags);for(var f,g,v,y,b,w,x=new Mie(e);!x.eos();){if(f=x.pos,v=x.scanUntil(n))for(var k=0,S=v.length;k<S;++k)Cie(y=v.charAt(k))?(l.push(s.length),d+=y):(u=!0,i=!0,d+=" "),s.push(["text",y,f,f+1]),f+=1,"\n"===y&&(m(),d="",h=0,i=!1);if(!x.scan(n))break;if(c=!0,g=x.scan(Iie)||"name",x.scan(Tie),"="===g?(v=x.scanUntil(Die),x.scan(Die),x.scanUntil(r)):"{"===g?(v=x.scanUntil(a),x.scan(Nie),x.scanUntil(r),g="&"):v=x.scanUntil(r),!x.scan(r))throw new Error("Unclosed tag at "+x.pos);if(b=">"==g?[g,v,f,x.pos,d,h,i]:[g,v,f,x.pos],h++,s.push(b),"#"===g||"^"===g)o.push(b);else if("/"===g){if(!(w=o.pop()))throw new Error('Unopened section "'+v+'" at '+f);if(w[1]!==v)throw new Error('Unclosed section "'+w[1]+'" at '+f)}else"name"===g||"{"===g||"&"===g?u=!0:"="===g&&p(v)}if(m(),w=o.pop())throw new Error('Unclosed section "'+w[1]+'" at '+x.pos);return function(e){for(var t,n=[],r=n,a=[],i=0,o=e.length;i<o;++i)switch((t=e[i])[0]){case"#":case"^":r.push(t),a.push(t),r=t[4]=[];break;case"/":a.pop()[5]=t[2],r=a.length>0?a[a.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],a=0,i=e.length;a<i;++a)(t=e[a])&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(r.push(t),n=t));return r}(s))}(e,t),a&&n.set(r,i)),i},Rie.prototype.render=function(e,t,n,r){var a=this.getConfigTags(r),i=this.parse(e,a),o=t instanceof jie?t:new jie(t,void 0);return this.renderTokens(i,o,n,e,r)},Rie.prototype.renderTokens=function(e,t,n,r,a){for(var i,o,s,l="",c=0,u=e.length;c<u;++c)s=void 0,"#"===(o=(i=e[c])[0])?s=this.renderSection(i,t,n,r,a):"^"===o?s=this.renderInverted(i,t,n,r,a):">"===o?s=this.renderPartial(i,t,n,a):"&"===o?s=this.unescapedValue(i,t):"name"===o?s=this.escapedValue(i,t,a):"text"===o&&(s=this.rawValue(i)),void 0!==s&&(l+=s);return l},Rie.prototype.renderSection=function(e,t,n,r,a){var i=this,o="",s=t.lookup(e[1]);if(s){if(xie(s))for(var l=0,c=s.length;l<c;++l)o+=this.renderTokens(e[4],t.push(s[l]),n,r,a);else if("object"==typeof s||"string"==typeof s||"number"==typeof s)o+=this.renderTokens(e[4],t.push(s),n,r,a);else if(kie(s)){if("string"!=typeof r)throw new Error("Cannot use higher-order sections without the original template");null!=(s=s.call(t.view,r.slice(e[3],e[5]),(function(e){return i.render(e,t,n,a)})))&&(o+=s)}else o+=this.renderTokens(e[4],t,n,r,a);return o}},Rie.prototype.renderInverted=function(e,t,n,r,a){var i=t.lookup(e[1]);if(!i||xie(i)&&0===i.length)return this.renderTokens(e[4],t,n,r,a)},Rie.prototype.indentPartial=function(e,t,n){for(var r=t.replace(/[^ \t]/g,""),a=e.split("\n"),i=0;i<a.length;i++)a[i].length&&(i>0||!n)&&(a[i]=r+a[i]);return a.join("\n")},Rie.prototype.renderPartial=function(e,t,n,r){if(n){var a=this.getConfigTags(r),i=kie(n)?n(e[1]):n[e[1]];if(null!=i){var o=e[6],s=e[5],l=e[4],c=i;0==s&&l&&(c=this.indentPartial(i,l,o));var u=this.parse(c,a);return this.renderTokens(u,t,n,c,r)}}},Rie.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},Rie.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||zie.escape,a=t.lookup(e[1]);if(null!=a)return"number"==typeof a&&r===zie.escape?String(a):r(a)},Rie.prototype.rawValue=function(e){return e[1]},Rie.prototype.getConfigTags=function(e){return xie(e)?e:e&&"object"==typeof e?e.tags:void 0},Rie.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!xie(e)?e.escape:void 0};var zie={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){Lie.templateCache=e},get templateCache(){return Lie.templateCache}},Lie=new Rie;function Fie(){zie.escape=e=>e}zie.clearCache=function(){return Lie.clearCache()},zie.parse=function(e,t){return Lie.parse(e,t)},zie.render=function(e,t,n,r){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+function(e){return xie(e)?"array":typeof e}(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Lie.render(e,t,n,r)},zie.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return Oie[e]}))},zie.Scanner=Mie,zie.Context=jie,zie.Writer=Rie;const Bie=e=>{const t=e.split(""),n=[],r=(e,n)=>{for(let r=n;r<t.length;r+=1)if(e.includes(t[r]))return r;return-1};let a=0;for(;a<t.length;)if("{"===t[a]&&a+1<t.length&&"{"===t[a+1])n.push({type:"literal",text:"{"}),a+=2;else if("}"===t[a]&&a+1<t.length&&"}"===t[a+1])n.push({type:"literal",text:"}"}),a+=2;else if("{"===t[a]){const e=r("}",a);if(e<0)throw new Error("Unclosed '{' in template.");n.push({type:"variable",name:t.slice(a+1,e).join("")}),a=e+1}else{if("}"===t[a])throw new Error("Single '}' in template.");{const e=r("{}",a),i=(e<0?t.slice(a):t.slice(a,e)).join("");n.push({type:"literal",text:i}),a=e<0?t.length:e}}return n},qie=e=>{Fie();return(e=>e.map((e=>"name"===e[0]?{type:"variable",name:e[1].includes(".")?e[1].split(".")[0]:e[1]}:["#","&","^",">"].includes(e[0])?{type:"variable",name:e[1]}:{type:"literal",text:e[1]})))(zie.parse(e))},Hie=(e,t)=>Bie(e).reduce(((e,n)=>{if("variable"===n.type){if(n.name in t)return e+t[n.name];throw new Error(`(f-string) Missing value for input ${n.name}`)}return e+n.text}),""),Uie=(e,t)=>(Fie(),zie.render(e,t)),Vie={"f-string":Hie,mustache:Uie},Wie={"f-string":Bie,mustache:qie},Gie=(e,t,n)=>Vie[t](e,n),$ie=(e,t)=>Wie[t](e),Zie=(e,t,n)=>{if(!(t in Vie)){const e=Object.keys(Vie);throw new Error(`Invalid template format. Got \`${t}\`;\n should be one of ${e}`)}try{const r=n.reduce(((e,t)=>(e[t]="foo",e)),{});Array.isArray(e)?e.forEach((e=>{if("text"===e.type)Gie(e.text,t,r);else{if("image_url"!==e.type)throw new Error(`Invalid message template received. ${JSON.stringify(e,null,2)}`);if("string"==typeof e.image_url)Gie(e.image_url,t,r);else{const n=e.image_url.url;Gie(n,t,r)}}})):Gie(e,t,r)}catch(e){throw new Error(`Invalid prompt schema: ${e.message}`)}};class Yie extends bie{static lc_name(){return"PromptTemplate"}constructor(e){if(super(e),Object.defineProperty(this,"template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:"f-string"}),Object.defineProperty(this,"validateTemplate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),"mustache"===e.templateFormat&&void 0===e.validateTemplate&&(this.validateTemplate=!1),Object.assign(this,e),this.validateTemplate){if("mustache"===this.templateFormat)throw new Error("Mustache templates cannot be validated.");let e=this.inputVariables;this.partialVariables&&(e=e.concat(Object.keys(this.partialVariables))),Zie(this.template,this.templateFormat,e)}}_getPromptType(){return"prompt"}async format(e){const t=await this.mergePartialAndUserVariables(e);return Gie(this.template,this.templateFormat,t)}static fromExamples(e,t,n,r="\n\n",a=""){const i=[a,...e,t].join(r);return new Yie({inputVariables:n,template:i})}static fromTemplate(e,t){const{templateFormat:n="f-string",...r}=t??{},a=new Set;return $ie(e,n).forEach((e=>{"variable"===e.type&&a.add(e.name)})),new Yie({inputVariables:[...a],templateFormat:n,template:e,...r})}async partial(e){const t=this.inputVariables.filter((t=>!(t in e))),n={...this.partialVariables??{},...e},r={...this,inputVariables:t,partialVariables:n};return new Yie(r)}serialize(){if(void 0!==this.outputParser)throw new Error("Cannot serialize a prompt template with an output parser");return{_type:this._getPromptType(),input_variables:this.inputVariables,template:this.template,template_format:this.templateFormat}}static async deserialize(e){if(!e.template)throw new Error("Prompt template must have a template");return new Yie({inputVariables:e.input_variables,template:e.template,templateFormat:e.template_format})}}var Kie=Object.freeze({__proto__:null,PromptTemplate:Yie});class Xie extends yie{static lc_name(){return"ImagePromptTemplate"}constructor(e){if(super(e),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","prompts","image"]}),Object.defineProperty(this,"template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:"f-string"}),Object.defineProperty(this,"validateTemplate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),this.template=e.template,this.templateFormat=e.templateFormat??this.templateFormat,this.validateTemplate=e.validateTemplate??this.validateTemplate,this.validateTemplate){let e=this.inputVariables;this.partialVariables&&(e=e.concat(Object.keys(this.partialVariables))),Zie([{type:"image_url",image_url:this.template}],this.templateFormat,e)}}_getPromptType(){return"prompt"}async partial(e){const t=this.inputVariables.filter((t=>!(t in e))),n={...this.partialVariables??{},...e},r={...this,inputVariables:t,partialVariables:n};return new Xie(r)}async format(e){const t={};for(const[n,r]of Object.entries(this.template))t[n]="string"==typeof r?Gie(r,this.templateFormat,e):r;const n=e.url||t.url,r=e.detail||t.detail;if(!n)throw new Error("Must provide either an image URL.");if("string"!=typeof n)throw new Error("url must be a string.");const a={url:n};return r&&(a.detail=r),a}async formatPromptValue(e){const t=await this.format(e);return new Lne(t)}}class Qie extends s9{constructor(){super(...arguments),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","prompts","chat"]}),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0})}async invoke(e,t){return this._callWithConfig((e=>this.formatMessages(e)),e,{...t,runType:"prompt"})}}class Jie extends Qie{static lc_name(){return"MessagesPlaceholder"}constructor(e){"string"==typeof e&&(e={variableName:e}),super(e),Object.defineProperty(this,"variableName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"optional",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.variableName=e.variableName,this.optional=e.optional??!1}get inputVariables(){return[this.variableName]}async formatMessages(e){const t=e[this.variableName];if(this.optional&&!t)return[];if(!t){const e=new Error(`Field "${this.variableName}" in prompt uses a MessagesPlaceholder, which expects an array of BaseMessages as an input value. Received: undefined`);throw e.name="InputFormatError",e}let n;try{n=Array.isArray(t)?t.map(J1):[J1(t)]}catch(e){const n="string"==typeof t?t:JSON.stringify(t,null,2),r=new Error([`Field "${this.variableName}" in prompt uses a MessagesPlaceholder, which expects an array of BaseMessages or coerceable values as input.`,`Received value: ${n}`,`Additional message: ${e.message}`].join("\n\n"));throw r.name="InputFormatError",r}return n}}class eoe extends Qie{constructor(e){"prompt"in e||(e={prompt:e}),super(e),Object.defineProperty(this,"prompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.prompt=e.prompt}get inputVariables(){return this.prompt.inputVariables}async formatMessages(e){return[await this.format(e)]}}class toe extends yie{constructor(e){super(e)}async format(e){return(await this.formatPromptValue(e)).toString()}async formatPromptValue(e){const t=await this.formatMessages(e);return new zne(t)}}class noe extends eoe{static lc_name(){return"ChatMessagePromptTemplate"}constructor(e,t){"prompt"in e||(e={prompt:e,role:t}),super(e),Object.defineProperty(this,"role",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.role=e.role}async format(e){return new V1(await this.prompt.format(e),this.role)}static fromTemplate(e,t,n){return new this(Yie.fromTemplate(e,{templateFormat:n?.templateFormat}),t)}}class roe extends Qie{static _messageClass(){throw new Error("Can not invoke _messageClass from inside _StringImageMessagePromptTemplate")}constructor(e,t){if("prompt"in e||(e={prompt:e}),super(e),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","prompts","chat"]}),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"inputVariables",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"additionalOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"prompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"messageClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"chatMessageClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.prompt=e.prompt,Array.isArray(this.prompt)){let e=[];this.prompt.forEach((t=>{"inputVariables"in t&&(e=e.concat(t.inputVariables))})),this.inputVariables=e}else this.inputVariables=this.prompt.inputVariables;this.additionalOptions=t??this.additionalOptions}createMessage(e){const t=this.constructor;if(t._messageClass()){return new(t._messageClass())({content:e})}if(t.chatMessageClass){const n=t.chatMessageClass();return new n({content:e,role:this.getRoleFromMessageClass(n.lc_name())})}throw new Error("No message class defined")}getRoleFromMessageClass(e){switch(e){case"HumanMessage":return"human";case"AIMessage":return"ai";case"SystemMessage":return"system";case"ChatMessage":return"chat";default:throw new Error("Invalid message class name")}}static fromTemplate(e,t){if("string"==typeof e)return new this(Yie.fromTemplate(e,t));const n=[];for(const r of e)if("string"==typeof r||"object"==typeof r&&"text"in r){let e="";"string"==typeof r?e=r:"string"==typeof r.text&&(e=r.text??""),n.push(Yie.fromTemplate(e,t))}else if("object"==typeof r&&"image_url"in r){let e,a=r.image_url??"",i=[];if("string"==typeof a){let n;n="mustache"===t?.templateFormat?qie(a):Bie(a);const r=n.flatMap((e=>"variable"===e.type?[e.name]:[]));if((r?.length??0)>0){if(r.length>1)throw new Error(`Only one format variable allowed per image template.\nGot: ${r}\nFrom: ${a}`);i=[r[0]]}else i=[];a={url:a},e=new Xie({template:a,inputVariables:i,templateFormat:t?.templateFormat})}else{if("object"!=typeof a)throw new Error("Invalid image template");if("url"in a){let e;e="mustache"===t?.templateFormat?qie(a.url):Bie(a.url),i=e.flatMap((e=>"variable"===e.type?[e.name]:[]))}else i=[];e=new Xie({template:a,inputVariables:i,templateFormat:t?.templateFormat})}n.push(e)}return new this({prompt:n,additionalOptions:t})}async format(e){if(this.prompt instanceof bie){const t=await this.prompt.format(e);return this.createMessage(t)}{const t=[];for(const n of this.prompt){let r={};if(!("inputVariables"in n))throw new Error(`Prompt ${n} does not have inputVariables defined.`);for(const t of n.inputVariables)r||(r={[t]:e[t]}),r={...r,[t]:e[t]};if(n instanceof bie){const e=await n.format(r);t.push({type:"text",text:e})}else if(n instanceof Xie){const e=await n.format(r);t.push({type:"image_url",image_url:e})}}return this.createMessage(t)}}async formatMessages(e){return[await this.format(e)]}}class aoe extends roe{static _messageClass(){return Z1}static lc_name(){return"HumanMessagePromptTemplate"}}class ioe extends roe{static _messageClass(){return q1}static lc_name(){return"AIMessagePromptTemplate"}}class ooe extends roe{static _messageClass(){return K1}static lc_name(){return"SystemMessagePromptTemplate"}}function soe(e,t){if("function"==typeof e.formatMessages||z1(e))return e;if(Array.isArray(e)&&"placeholder"===e[0]){const t=e[1];if("string"!=typeof t||"{"!==t[0]||"}"!==t[t.length-1])throw new Error(`Invalid placeholder template: "${e[1]}". Expected a variable name surrounded by curly braces.`);const n=t.slice(1,-1);return new Jie({variableName:n,optional:!0})}const n=J1(e);let r;if(r="string"==typeof n.content?n.content:n.content.map((e=>"text"in e?{text:e.text}:"image_url"in e?{image_url:e.image_url}:e)),"human"===n._getType())return aoe.fromTemplate(r,t);if("ai"===n._getType())return ioe.fromTemplate(r,t);if("system"===n._getType())return ooe.fromTemplate(r,t);if(V1.isInstance(n))return noe.fromTemplate(n.content,n.role,t);throw new Error(`Could not coerce message prompt template from input. Received message type: "${n._getType()}".`)}function loe(e){return"MessagesPlaceholder"===e.constructor.lc_name()}class coe extends toe{static lc_name(){return"ChatPromptTemplate"}get lc_aliases(){return{promptMessages:"messages"}}constructor(e){if(super(e),Object.defineProperty(this,"promptMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"validateTemplate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:"f-string"}),"mustache"===e.templateFormat&&void 0===e.validateTemplate&&(this.validateTemplate=!1),Object.assign(this,e),this.validateTemplate){const e=new Set;for(const t of this.promptMessages)if(!(t instanceof N1))for(const n of t.inputVariables)e.add(n);const t=this.inputVariables,n=new Set(this.partialVariables?t.concat(Object.keys(this.partialVariables)):t),r=new Set([...n].filter((t=>!e.has(t))));if(r.size>0)throw new Error(`Input variables \`${[...r]}\` are not used in any of the prompt messages.`);const a=new Set([...e].filter((e=>!n.has(e))));if(a.size>0)throw new Error(`Input variables \`${[...a]}\` are used in prompt messages but not in the prompt template.`)}}_getPromptType(){return"chat"}async _parseImagePrompts(e,t){if("string"==typeof e.content)return e;const n=await Promise.all(e.content.map((async e=>{if("image_url"!==e.type)return e;let n="";n="string"==typeof e.image_url?e.image_url:e.image_url.url;const r=Yie.fromTemplate(n,{templateFormat:this.templateFormat}),a=await r.format(t);return"string"!=typeof e.image_url&&"url"in e.image_url?e.image_url.url=a:e.image_url=a,e})));return e.content=n,e}async formatMessages(e){const t=await this.mergePartialAndUserVariables(e);let n=[];for(const e of this.promptMessages)if(e instanceof N1)n.push(await this._parseImagePrompts(e,t));else{const r=e.inputVariables.reduce(((n,r)=>{if(!(r in t||loe(e)&&e.optional))throw new Error(`Missing value for input variable \`${r.toString()}\``);return n[r]=t[r],n}),{}),a=await e.formatMessages(r);n=n.concat(a)}return n}async partial(e){const t=this.inputVariables.filter((t=>!(t in e))),n={...this.partialVariables??{},...e},r={...this,inputVariables:t,partialVariables:n};return new coe(r)}static fromTemplate(e,t){const n=Yie.fromTemplate(e,t),r=new aoe({prompt:n});return this.fromMessages([r])}static fromMessages(e,t){const n=e.reduce(((e,n)=>e.concat(n instanceof coe?n.promptMessages:[soe(n,t)])),[]),r=e.reduce(((e,t)=>t instanceof coe?Object.assign(e,t.partialVariables):e),Object.create(null)),a=new Set;for(const e of n)if(!(e instanceof N1))for(const t of e.inputVariables)t in r||a.add(t);return new this({...t,inputVariables:[...a],promptMessages:n,partialVariables:r,templateFormat:t?.templateFormat})}static fromPromptMessages(e){return this.fromMessages(e)}}class uoe extends bie{constructor(e){if(super(e),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"examples",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"exampleSelector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"examplePrompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"suffix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"exampleSeparator",{enumerable:!0,configurable:!0,writable:!0,value:"\n\n"}),Object.defineProperty(this,"prefix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:"f-string"}),Object.defineProperty(this,"validateTemplate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.assign(this,e),void 0!==this.examples&&void 0!==this.exampleSelector)throw new Error("Only one of 'examples' and 'example_selector' should be provided");if(void 0===this.examples&&void 0===this.exampleSelector)throw new Error("One of 'examples' and 'example_selector' should be provided");if(this.validateTemplate){let e=this.inputVariables;this.partialVariables&&(e=e.concat(Object.keys(this.partialVariables))),Zie(this.prefix+this.suffix,this.templateFormat,e)}}_getPromptType(){return"few_shot"}static lc_name(){return"FewShotPromptTemplate"}async getExamples(e){if(void 0!==this.examples)return this.examples;if(void 0!==this.exampleSelector)return this.exampleSelector.selectExamples(e);throw new Error("One of 'examples' and 'example_selector' should be provided")}async partial(e){const t=this.inputVariables.filter((t=>!(t in e))),n={...this.partialVariables??{},...e},r={...this,inputVariables:t,partialVariables:n};return new uoe(r)}async format(e){const t=await this.mergePartialAndUserVariables(e),n=await this.getExamples(t),r=await Promise.all(n.map((e=>this.examplePrompt.format(e)))),a=[this.prefix,...r,this.suffix].join(this.exampleSeparator);return Gie(a,this.templateFormat,t)}serialize(){if(this.exampleSelector||!this.examples)throw new Error("Serializing an example selector is not currently supported");if(void 0!==this.outputParser)throw new Error("Serializing an output parser is not currently supported");return{_type:this._getPromptType(),input_variables:this.inputVariables,example_prompt:this.examplePrompt.serialize(),example_separator:this.exampleSeparator,suffix:this.suffix,prefix:this.prefix,template_format:this.templateFormat,examples:this.examples}}static async deserialize(e){const{example_prompt:t}=e;if(!t)throw new Error("Missing example prompt");const n=await Yie.deserialize(t);let r;if(!Array.isArray(e.examples))throw new Error("Invalid examples format. Only list or string are supported.");return r=e.examples,new uoe({inputVariables:e.input_variables,examplePrompt:n,examples:r,exampleSeparator:e.example_separator,prefix:e.prefix,suffix:e.suffix,templateFormat:e.template_format})}}class doe extends toe{_getPromptType(){return"few_shot_chat"}static lc_name(){return"FewShotChatMessagePromptTemplate"}constructor(e){if(super(e),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"examples",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"exampleSelector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"examplePrompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"suffix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"exampleSeparator",{enumerable:!0,configurable:!0,writable:!0,value:"\n\n"}),Object.defineProperty(this,"prefix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:"f-string"}),Object.defineProperty(this,"validateTemplate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),this.examples=e.examples,this.examplePrompt=e.examplePrompt,this.exampleSeparator=e.exampleSeparator??"\n\n",this.exampleSelector=e.exampleSelector,this.prefix=e.prefix??"",this.suffix=e.suffix??"",this.templateFormat=e.templateFormat??"f-string",this.validateTemplate=e.validateTemplate??!0,void 0!==this.examples&&void 0!==this.exampleSelector)throw new Error("Only one of 'examples' and 'example_selector' should be provided");if(void 0===this.examples&&void 0===this.exampleSelector)throw new Error("One of 'examples' and 'example_selector' should be provided");if(this.validateTemplate){let e=this.inputVariables;this.partialVariables&&(e=e.concat(Object.keys(this.partialVariables))),Zie(this.prefix+this.suffix,this.templateFormat,e)}}async getExamples(e){if(void 0!==this.examples)return this.examples;if(void 0!==this.exampleSelector)return this.exampleSelector.selectExamples(e);throw new Error("One of 'examples' and 'example_selector' should be provided")}async formatMessages(e){const t=await this.mergePartialAndUserVariables(e);let n=await this.getExamples(t);n=n.map((e=>{const t={};return this.examplePrompt.inputVariables.forEach((n=>{t[n]=e[n]})),t}));const r=[];for(const e of n){const t=await this.examplePrompt.formatMessages(e);r.push(...t)}return r}async format(e){const t=await this.mergePartialAndUserVariables(e),n=await this.getExamples(t),r=(await Promise.all(n.map((e=>this.examplePrompt.formatMessages(e))))).flat().map((e=>e.content)),a=[this.prefix,...r,this.suffix].join(this.exampleSeparator);return Gie(a,this.templateFormat,t)}async partial(e){const t=this.inputVariables.filter((t=>!(t in e))),n={...this.partialVariables??{},...e},r={...this,inputVariables:t,partialVariables:n};return new doe(r)}}var hoe=Object.freeze({__proto__:null,FewShotPromptTemplate:uoe,FewShotChatMessagePromptTemplate:doe});class moe extends yie{static lc_name(){return"PipelinePromptTemplate"}constructor(e){super({...e,inputVariables:[]}),Object.defineProperty(this,"pipelinePrompts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"finalPrompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.pipelinePrompts=e.pipelinePrompts,this.finalPrompt=e.finalPrompt,this.inputVariables=this.computeInputValues()}computeInputValues(){const e=this.pipelinePrompts.map((e=>e.name)),t=this.pipelinePrompts.map((t=>t.prompt.inputVariables.filter((t=>!e.includes(t))))).flat();return[...new Set(t)]}static extractRequiredInputValues(e,t){return t.reduce(((t,n)=>(t[n]=e[n],t)),{})}async formatPipelinePrompts(e){const t=await this.mergePartialAndUserVariables(e);for(const{name:e,prompt:n}of this.pipelinePrompts){const r=moe.extractRequiredInputValues(t,n.inputVariables);t[e]=n instanceof coe?await n.formatMessages(r):await n.format(r)}return moe.extractRequiredInputValues(t,this.finalPrompt.inputVariables)}async formatPromptValue(e){return this.finalPrompt.formatPromptValue(await this.formatPipelinePrompts(e))}async format(e){return this.finalPrompt.format(await this.formatPipelinePrompts(e))}async partial(e){const t={...this};return t.inputVariables=this.inputVariables.filter((t=>!(t in e))),t.partialVariables={...this.partialVariables??{},...e},new moe(t)}serialize(){throw new Error("Not implemented.")}_getPromptType(){return"pipeline"}}function poe(e){return"object"==typeof e&&null!=e&&"withStructuredOutput"in e&&"function"==typeof e.withStructuredOutput}class foe extends coe{get lc_aliases(){return{...super.lc_aliases,schema:"schema_"}}constructor(e){super(e),Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","prompts","structured"]}),this.schema=e.schema}pipe(e){if(poe(e))return super.pipe(e.withStructuredOutput(this.schema));if(function(e){return"object"==typeof e&&null!=e&&"lc_id"in e&&Array.isArray(e.lc_id)&&"langchain_core/runnables/RunnableBinding"===e.lc_id.join("/")}(e)&&poe(e.bound))return super.pipe(e.bound.withStructuredOutput(this.schema).bind(e.kwargs??{}).withConfig(e.config));throw new Error('Structured prompts need to be piped to a language model that supports the "withStructuredOutput()" method.')}static fromMessagesAndSchema(e,t){return foe.fromMessages(e,{schema:t})}}var goe=Object.freeze({__proto__:null,BasePromptTemplate:yie,BaseMessagePromptTemplate:Qie,MessagesPlaceholder:Jie,BaseMessageStringPromptTemplate:eoe,BaseChatPromptTemplate:toe,ChatMessagePromptTemplate:noe,HumanMessagePromptTemplate:aoe,AIMessagePromptTemplate:ioe,SystemMessagePromptTemplate:ooe,ChatPromptTemplate:coe,FewShotPromptTemplate:uoe,FewShotChatMessagePromptTemplate:doe,PipelinePromptTemplate:moe,PromptTemplate:Yie,BaseStringPromptTemplate:bie,parseFString:Bie,parseMustache:qie,interpolateFString:Hie,interpolateMustache:Uie,DEFAULT_FORMATTER_MAPPING:Vie,DEFAULT_PARSER_MAPPING:Wie,renderTemplate:Gie,parseTemplate:$ie,checkValidTemplate:Zie,ImagePromptTemplate:Xie,StructuredPrompt:foe});class voe extends s9{constructor(e){super(e),Object.defineProperty(this,"callbacks",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tags",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metadata",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"verbose",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.callbacks=e?.callbacks,this.tags=e?.tags??[],this.metadata=e?.metadata??{},this.verbose=e?.verbose??!1}_getRelevantDocuments(e,t){throw new Error("Not implemented!")}async invoke(e,t){return this.getRelevantDocuments(e,g8(t))}async getRelevantDocuments(e,t){const n=g8(N5(t)),r=await F5.configure(n.callbacks,this.callbacks,n.tags,this.tags,n.metadata,this.metadata,{verbose:this.verbose}),a=await(r?.handleRetrieverStart(this.toJSON(),e,n.runId,void 0,void 0,void 0,n.runName));try{const t=await this._getRelevantDocuments(e,a);return await(a?.handleRetrieverEnd(t)),t}catch(e){throw await(a?.handleRetrieverError(e)),e}}}var yoe=Object.freeze({__proto__:null,BaseRetriever:voe});class boe extends C1{}var woe=Object.freeze({__proto__:null,BaseStore:boe,InMemoryStore:class extends boe{constructor(){super(...arguments),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain","storage"]}),Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:{}})}async mget(e){return e.map((e=>this.store[e]))}async mset(e){for(const[t,n]of e)this.store[t]=n}async mdelete(e){for(const t of e)delete this.store[t]}async*yieldKeys(e){const t=Object.keys(this.store);for(const n of t)(void 0===e||n.startsWith(e))&&(yield n)}}});class xoe extends k6{constructor(){super(),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"langchain_tracer"}),Object.defineProperty(this,"endpoint",{enumerable:!0,configurable:!0,writable:!0,value:f6("LANGCHAIN_ENDPOINT")||"http://localhost:1984"}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:{"Content-Type":"application/json"}}),Object.defineProperty(this,"session",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const e=f6("LANGCHAIN_API_KEY");e&&(this.headers["x-api-key"]=e)}async newSession(e){const t={start_time:Date.now(),name:e},n=await this.persistSession(t);return this.session=n,n}async loadSession(e){const t=`${this.endpoint}/sessions?name=${e}`;return this._handleSessionResponse(t)}async loadDefaultSession(){const e=`${this.endpoint}/sessions?name=default`;return this._handleSessionResponse(e)}async convertV2RunToRun(e){const t=this.session??await this.loadDefaultSession(),n=e.serialized;let r;if("llm"===e.run_type){const a=e.inputs.prompts?e.inputs.prompts:e.inputs.messages.map((e=>e2(e)));r={uuid:e.id,start_time:e.start_time,end_time:e.end_time,execution_order:e.execution_order,child_execution_order:e.child_execution_order,serialized:n,type:e.run_type,session_id:t.id,prompts:a,response:e.outputs}}else if("chain"===e.run_type){const a=await Promise.all(e.child_runs.map((e=>this.convertV2RunToRun(e))));r={uuid:e.id,start_time:e.start_time,end_time:e.end_time,execution_order:e.execution_order,child_execution_order:e.child_execution_order,serialized:n,type:e.run_type,session_id:t.id,inputs:e.inputs,outputs:e.outputs,child_llm_runs:a.filter((e=>"llm"===e.type)),child_chain_runs:a.filter((e=>"chain"===e.type)),child_tool_runs:a.filter((e=>"tool"===e.type))}}else{if("tool"!==e.run_type)throw new Error(`Unknown run type: ${e.run_type}`);{const a=await Promise.all(e.child_runs.map((e=>this.convertV2RunToRun(e))));r={uuid:e.id,start_time:e.start_time,end_time:e.end_time,execution_order:e.execution_order,child_execution_order:e.child_execution_order,serialized:n,type:e.run_type,session_id:t.id,tool_input:e.inputs.input,output:e.outputs?.output,action:JSON.stringify(n),child_llm_runs:a.filter((e=>"llm"===e.type)),child_chain_runs:a.filter((e=>"chain"===e.type)),child_tool_runs:a.filter((e=>"tool"===e.type))}}}return r}async persistRun(e){let t,n;n=void 0!==e.run_type?await this.convertV2RunToRun(e):e,t="llm"===n.type?`${this.endpoint}/llm-runs`:"chain"===n.type?`${this.endpoint}/chain-runs`:`${this.endpoint}/tool-runs`;const r=await fetch(t,{method:"POST",headers:this.headers,body:JSON.stringify(n)});r.ok||console.error(`Failed to persist run: ${r.status} ${r.statusText}`)}async persistSession(e){const t=`${this.endpoint}/sessions`,n=await fetch(t,{method:"POST",headers:this.headers,body:JSON.stringify(e)});return n.ok?{id:(await n.json()).id,...e}:(console.error(`Failed to persist session: ${n.status} ${n.statusText}, using default session.`),{id:1,...e})}async _handleSessionResponse(e){const t=await fetch(e,{method:"GET",headers:this.headers});let n;if(!t.ok)return console.error(`Failed to load session: ${t.status} ${t.statusText}`),n={id:1,start_time:Date.now()},this.session=n,n;const r=await t.json();return 0===r.length?(n={id:1,start_time:Date.now()},this.session=n,n):([n]=r,this.session=n,n)}}var koe=Object.freeze({__proto__:null,LangChainTracerV1:xoe});var Soe=Object.freeze({__proto__:null,getTracingCallbackHandler:async function(e){const t=new xoe;return e?await t.loadSession(e):await t.loadDefaultSession(),t},getTracingV2CallbackHandler:async function(){return new C5}});var Aoe=Object.freeze({__proto__:null,RunCollectorCallbackHandler:class extends k6{constructor({exampleId:e}={}){super({_awaitHandler:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"run_collector"}),Object.defineProperty(this,"exampleId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tracedRuns",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.exampleId=e,this.tracedRuns=[]}async persistRun(e){const t={...e};t.reference_example_id=this.exampleId,this.tracedRuns.push(t)}}}),Eoe=Object.freeze({__proto__:null,deepCompareStrict:Are,Validator:class{constructor(e,t="2019-09",n=!0){Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"draft",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"shortCircuit",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"lookup",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.lookup=Pre(e)}validate(e){return rae(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),Pre(e,this.lookup)}}});function _oe(e,t){return Math.sqrt(function(e,t){let n=0;for(let r=0;r<e.length;r++)n+=(e[r]-t[r])*(e[r]-t[r]);return n}(e,t))}function Coe(e,t){let n=0;for(let r=0;r<e.length;r++)n+=e[r]*t[r];return n}function Ooe(e,t){let n=0,r=0,a=0;for(let i=0;i<e.length;i++)n+=e[i]*t[i],r+=e[i]*e[i],a+=t[i]*t[i];return n/(Math.sqrt(r)*Math.sqrt(a))}function Toe(e,t,n){if(0===e.length||0===e[0].length||0===t.length||0===t[0].length)return[[]];if(e[0].length!==t[0].length)throw new Error(`Number of columns in X and Y must be the same. X has shape ${[e.length,e[0].length]} and Y has shape ${[t.length,t[0].length]}.`);return e.map((e=>t.map((t=>n(e,t))).map((e=>Number.isNaN(e)?0:e))))}function Poe(e,t){return Toe(e,t,Ooe)}function Doe(e){if(0===e.length)return{maxIndex:-1,maxValue:NaN};let t=e[0],n=0;for(let r=1;r<e.length;r+=1)e[r]>t&&(n=r,t=e[r]);return{maxIndex:n,maxValue:t}}var Noe=Object.freeze({__proto__:null,matrixFunc:Toe,normalize:function(e,t=!1){const n=e.reduce(((e,t)=>Math.max(e,Doe(t).maxValue)),0);return e.map((e=>e.map((e=>t?1-e/n:e/n))))},cosineSimilarity:Poe,innerProduct:function(e,t){return Toe(e,t,Coe)},euclideanDistance:function(e,t){return Toe(e,t,_oe)},maximalMarginalRelevance:function(e,t,n=.5,r=4){if(Math.min(r,t.length)<=0)return[];const a=Poe(Array.isArray(e[0])?e:[e],t)[0],i=Doe(a).maxIndex,o=[t[i]],s=[i];for(;s.length<Math.min(r,t.length);){let e=-1/0,r=-1;const i=Poe(t,o);a.forEach(((t,a)=>{if(s.includes(a))return;const o=Math.max(...i[a]),l=n*t-(1-n)*o;l>e&&(e=l,r=a)})),o.push(t[r]),s.push(r)}return s}});var Ioe=Object.freeze({__proto__:null,FakeSplitIntoListParser:class extends kre{constructor(){super(...arguments),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["tests","fake"]})}getFormatInstructions(){return""}async parse(e){return e.split(",").map((e=>e.trim()))}},FakeRunnable:class extends s9{constructor(e){super(e),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["tests","fake"]}),Object.defineProperty(this,"returnOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.returnOptions=e.returnOptions}async invoke(e,t){return this.returnOptions?t??{}:{input:e}}},FakeLLM:class extends Nae{constructor(e){super(e),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thrownErrorString",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.response=e.response,this.thrownErrorString=e.thrownErrorString}_llmType(){return"fake"}async _call(e,t,n){if(this.thrownErrorString)throw new Error(this.thrownErrorString);const r=this.response??e;return await(n?.handleLLMNewToken(r)),r}},FakeStreamingLLM:class extends Nae{constructor(e){super(e),Object.defineProperty(this,"sleep",{enumerable:!0,configurable:!0,writable:!0,value:50}),Object.defineProperty(this,"responses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thrownErrorString",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.sleep=e.sleep??this.sleep,this.responses=e.responses,this.thrownErrorString=e.thrownErrorString}_llmType(){return"fake"}async _call(e){if(this.thrownErrorString)throw new Error(this.thrownErrorString);const t=this.responses?.[0];return this.responses=this.responses?.slice(1),t??e}async*_streamResponseChunks(e,t,n){if(this.thrownErrorString)throw new Error(this.thrownErrorString);const r=this.responses?.[0];this.responses=this.responses?.slice(1);for(const t of r??e)await new Promise((e=>setTimeout(e,this.sleep))),yield{text:t,generationInfo:{}},await(n?.handleLLMNewToken(t))}},FakeChatModel:class extends mre{_combineLLMOutput(){return[]}_llmType(){return"fake"}async _generate(e,t,n){if(t?.stop?.length)return{generations:[{message:new q1(t.stop[0]),text:t.stop[0]}]};const r=e.map((e=>"string"==typeof e.content?e.content:JSON.stringify(e.content,null,2))).join("\n");return await(n?.handleLLMNewToken(r)),{generations:[{message:new q1(r),text:r}],llmOutput:{}}}},FakeStreamingChatModel:class extends mre{constructor(e){super(e),Object.defineProperty(this,"sleep",{enumerable:!0,configurable:!0,writable:!0,value:50}),Object.defineProperty(this,"responses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"thrownErrorString",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.sleep=e.sleep??this.sleep,this.responses=e.responses,this.thrownErrorString=e.thrownErrorString}_llmType(){return"fake"}async _generate(e,t,n){if(this.thrownErrorString)throw new Error(this.thrownErrorString);const r=this.responses?.[0].content??e[0].content;return{generations:[{text:"",message:new q1({content:r})}]}}async*_streamResponseChunks(e,t,n){if(this.thrownErrorString)throw new Error(this.thrownErrorString);const r=this.responses?.[0].content??e[0].content;if("string"!=typeof r)for(const t of this.responses??e)yield new l8({text:"",message:new U1({content:r})});else for(const t of this.responses??e)yield new l8({text:r,message:new U1({content:r})})}},FakeRetriever:class extends voe{constructor(e){super(),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["test","fake"]}),Object.defineProperty(this,"output",{enumerable:!0,configurable:!0,writable:!0,value:[new oie({pageContent:"foo"}),new oie({pageContent:"bar"})]}),this.output=e?.output??this.output}async _getRelevantDocuments(e){return this.output}},FakeListChatModel:class extends mre{static lc_name(){return"FakeListChatModel"}constructor({responses:e,sleep:t}){super({}),Object.defineProperty(this,"responses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"i",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"sleep",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.responses=e,this.sleep=t}_combineLLMOutput(){return[]}_llmType(){return"fake-list"}async _generate(e,t){if(await this._sleepIfRequested(),t?.stop?.length)return{generations:[this._formatGeneration(t.stop[0])]};{const e=this._currentResponse();return this._incrementResponse(),{generations:[this._formatGeneration(e)],llmOutput:{}}}}_formatGeneration(e){return{message:new q1(e),text:e}}async*_streamResponseChunks(e,t,n){const r=this._currentResponse();this._incrementResponse();for await(const e of r){await this._sleepIfRequested();const t=this._createResponseChunk(e);yield t,n?.handleLLMNewToken(e)}}async _sleepIfRequested(){void 0!==this.sleep&&await this._sleep()}async _sleep(){return new Promise((e=>{setTimeout((()=>e()),this.sleep)}))}_createResponseChunk(e){return new l8({message:new U1({content:e}),text:e})}_currentResponse(){return this.responses[this.i]}_incrementResponse(){this.i<this.responses.length-1?this.i+=1:this.i=0}withStructuredOutput(e,t){return p9.from((async e=>{const t=await this.invoke(e);return JSON.parse(t.content)}))}},FakeChatMessageHistory:class extends rie{constructor(){super(),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","message","fake"]}),Object.defineProperty(this,"messages",{enumerable:!0,configurable:!0,writable:!0,value:[]})}async getMessages(){return this.messages}async addMessage(e){this.messages.push(e)}async addUserMessage(e){this.messages.push(new Z1(e))}async addAIChatMessage(e){this.messages.push(new q1(e))}async clear(){this.messages=[]}},FakeListChatMessageHistory:class extends aie{constructor(){super(),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","message","fake"]}),Object.defineProperty(this,"messages",{enumerable:!0,configurable:!0,writable:!0,value:[]})}async addMessage(e){this.messages.push(e)}async getMessages(){return this.messages}},FakeTracer:class extends k6{constructor(){super(),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"fake_tracer"}),Object.defineProperty(this,"runs",{enumerable:!0,configurable:!0,writable:!0,value:[]})}persistRun(e){return this.runs.push(e),Promise.resolve()}},FakeTool:class extends zae{constructor(e){super(e),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.description=e.description,this.schema=e.schema}async _call(e,t){return JSON.stringify(e)}},FakeEmbeddings:class extends jae{constructor(e){super(e??{})}embedDocuments(e){return Promise.resolve(e.map((()=>[.1,.2,.3,.4])))}embedQuery(e){return Promise.resolve([.1,.2,.3,.4])}},SyntheticEmbeddings:class extends jae{constructor(e){super(e??{}),Object.defineProperty(this,"vectorSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.vectorSize=e?.vectorSize??4}async embedDocuments(e){return Promise.all(e.map((e=>this.embedQuery(e))))}async embedQuery(e){let t=e;t=t.toLowerCase().replaceAll(/[^a-z ]/g,"");const n=t.length%this.vectorSize,r=0===n?0:this.vectorSize-n,a=t.length+r;t=t.padEnd(a," ");const i=t.length/this.vectorSize,o=[];for(let e=0;e<t.length;e+=i)o.push(t.slice(e,e+i));const s=o.map((e=>{let t=0;for(let n=0;n<e.length;n+=1)t+=" "===e?0:e.charCodeAt(n);return t%26/26}));return s}},SingleRunExtractor:class extends k6{constructor(){super(),Object.defineProperty(this,"runPromiseResolver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"runPromise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"single_run_extractor"}),this.runPromise=new Promise((e=>{this.runPromiseResolver=e}))}async persistRun(e){this.runPromiseResolver(e)}async extract(){return this.runPromise}}}),Moe=Object.freeze({__proto__:null,isZodSchema:hre});class joe extends voe{static lc_name(){return"VectorStoreRetriever"}get lc_namespace(){return["langchain_core","vectorstores"]}_vectorstoreType(){return this.vectorStore._vectorstoreType()}constructor(e){super(e),Object.defineProperty(this,"vectorStore",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"k",{enumerable:!0,configurable:!0,writable:!0,value:4}),Object.defineProperty(this,"searchType",{enumerable:!0,configurable:!0,writable:!0,value:"similarity"}),Object.defineProperty(this,"searchKwargs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"filter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.vectorStore=e.vectorStore,this.k=e.k??this.k,this.searchType=e.searchType??this.searchType,this.filter=e.filter,"mmr"===e.searchType&&(this.searchKwargs=e.searchKwargs)}async _getRelevantDocuments(e,t){if("mmr"===this.searchType){if("function"!=typeof this.vectorStore.maxMarginalRelevanceSearch)throw new Error(`The vector store backing this retriever, ${this._vectorstoreType()} does not support max marginal relevance search.`);return this.vectorStore.maxMarginalRelevanceSearch(e,{k:this.k,filter:this.filter,...this.searchKwargs},t?.getChild("vectorstore"))}return this.vectorStore.similaritySearch(e,this.k,this.filter,t?.getChild("vectorstore"))}async addDocuments(e,t){return this.vectorStore.addDocuments(e,t)}}class Roe extends C1{constructor(e,t){super(t),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain","vectorstores",this._vectorstoreType()]}),Object.defineProperty(this,"embeddings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.embeddings=e}async delete(e){throw new Error("Not implemented.")}async similaritySearch(e,t=4,n=void 0,r=void 0){return(await this.similaritySearchVectorWithScore(await this.embeddings.embedQuery(e),t,n)).map((e=>e[0]))}async similaritySearchWithScore(e,t=4,n=void 0,r=void 0){return this.similaritySearchVectorWithScore(await this.embeddings.embedQuery(e),t,n)}static fromTexts(e,t,n,r){throw new Error("the Langchain vectorstore implementation you are using forgot to override this, please report a bug")}static fromDocuments(e,t,n){throw new Error("the Langchain vectorstore implementation you are using forgot to override this, please report a bug")}asRetriever(e,t,n,r,a,i){if("number"==typeof e)return new joe({vectorStore:this,k:e,filter:t,tags:[...r??[],this._vectorstoreType()],metadata:a,verbose:i,callbacks:n});{const t={vectorStore:this,k:e?.k,filter:e?.filter,tags:[...e?.tags??[],this._vectorstoreType()],metadata:e?.metadata,verbose:e?.verbose,callbacks:e?.callbacks,searchType:e?.searchType};return new joe("mmr"===e?.searchType?{...t,searchKwargs:e.searchKwargs}:{...t})}}}var zoe=Object.freeze({__proto__:null,VectorStoreRetriever:joe,VectorStore:Roe,SaveableVectorStore:class extends Roe{static load(e,t){throw new Error("Not implemented")}}}),Loe=Object.freeze({__proto__:null,agents:nie,caches:Mne,callbacks__base:b6,callbacks__manager:H5,callbacks__promises:D5,chat_history:iie,documents:lie,embeddings:Rae,example_selectors:fie,language_models__base:ure,language_models__chat_models:pre,language_models__llms:Iae,load__serializable:P1,memory:vie,messages:P9,output_parsers:vae,outputs:c8,prompts:goe,prompt_values:Fne,runnables:wre,retrievers:yoe,stores:woe,tools:Hae,tracers__base:S6,tracers__console:_5,tracers__initialize:Soe,tracers__log_stream:i8,tracers__run_collector:Aoe,tracers__tracer_langchain:O5,tracers__tracer_langchain_v1:koe,utils__async_caller:x8,utils__chunk_array:Mae,utils__env:g6,utils__function_calling:bre,utils__hash:Tne,utils__json_patch:cae,utils__json_schema:Eoe,utils__math:Noe,utils__stream:Q5,utils__testing:Ioe,utils__tiktoken:ire,utils__types:Moe,vectorstores:zoe});async function Foe(e){const{optionalImportsMap:t={},optionalImportEntrypoints:n=[],importMap:r={},secretsMap:a={},path:i=["$"]}=this,o=i.join(".");if("object"==typeof e&&null!==e&&!Array.isArray(e)&&"lc"in e&&"type"in e&&"id"in e&&1===e.lc&&"secret"===e.type){const t=e,[n]=t.id;if(n in a)return a[n];{const e=f6(n);if(e)return e;throw new Error(`Missing key "${n}" for ${o} in load(secretsMap={})`)}}if("object"==typeof e&&null!==e&&!Array.isArray(e)&&"lc"in e&&"type"in e&&"id"in e&&1===e.lc&&"not_implemented"===e.type){const t=e,n=JSON.stringify(t);throw new Error(`Trying to load an object that doesn't implement serialization: ${o} -> ${n}`)}if("object"==typeof e&&null!==e&&!Array.isArray(e)&&"lc"in e&&"type"in e&&"id"in e&&"kwargs"in e&&1===e.lc){const a=e,s=JSON.stringify(a),[l,...c]=a.id.slice().reverse(),u=c.reverse(),d={langchain_core:Loe,langchain:r};let h=null;const m=[u.join("/")];"langchain_community"===u[0]&&m.push(["langchain",...u.slice(1)].join("/"));const p=m.find((e=>e in t));if(tie.concat(n).includes(u.join("/"))||p){if(void 0===p)throw new Error(`Missing key "${u.join("/")}" for ${o} in load(optionalImportsMap={})`);h=await t[p]}else{let e,t;if("langchain"!==u[0]&&"langchain_core"!==u[0])throw new Error(`Invalid namespace: ${o} -> ${s}`);if(e=d[u[0]],u.shift(),0===u.length)throw new Error(`Invalid namespace: ${o} -> ${s}`);do{if(t=u.join("__"),t in e)break;u.pop()}while(u.length>0);t in e&&(h=e[t])}if("object"!=typeof h||null===h)throw new Error(`Invalid namespace: ${o} -> ${s}`);const f=h[l]??Object.values(h).find((e=>"function"==typeof e&&_1(e)===l));if("function"!=typeof f)throw new Error(`Invalid identifer: ${o} -> ${s}`);const g=await Foe.call({...this,path:[...i,"kwargs"]},a.kwargs);if("constructor"===a.type){const e=new f(S1(g,k1,function(e){const t={};for(let n=e;n&&n.prototype;n=Object.getPrototypeOf(n))Object.assign(t,Reflect.get(n.prototype,"lc_aliases"));return Object.entries(t).reduce(((e,[t,n])=>(e[n]=t,e)),{})}(f)));return Object.defineProperty(e.constructor,"name",{value:l}),e}throw new Error(`Invalid type: ${o} -> ${s}`)}return"object"==typeof e&&null!==e?Array.isArray(e)?Promise.all(e.map(((e,t)=>Foe.call({...this,path:[...i,`${t}`]},e)))):Object.fromEntries(await Promise.all(Object.entries(e).map((async([e,t])=>[e,await Foe.call({...this,path:[...i,e]},t)])))):e}const Boe={stringify:JSON.stringify,parse:async function(e,t){const n=JSON.parse(e);return Foe.call({...t},n)}};var qoe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Hoe(e){if(!function(e){return"string"==typeof e&&qoe.test(e)}(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}for(var Uoe,Voe=[],Woe=0;Woe<256;++Woe)Voe.push((Woe+256).toString(16).slice(1));function Goe(e,t=0){return(Voe[e[t+0]]+Voe[e[t+1]]+Voe[e[t+2]]+Voe[e[t+3]]+"-"+Voe[e[t+4]]+Voe[e[t+5]]+"-"+Voe[e[t+6]]+Voe[e[t+7]]+"-"+Voe[e[t+8]]+Voe[e[t+9]]+"-"+Voe[e[t+10]]+Voe[e[t+11]]+Voe[e[t+12]]+Voe[e[t+13]]+Voe[e[t+14]]+Voe[e[t+15]]).toLowerCase()}var $oe,Zoe,Yoe=new Uint8Array(16);function Koe(){if(!Uoe&&!(Uoe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Uoe(Yoe)}var Xoe=0,Qoe=0;function Joe(e){var t=function(e,t=!1){return Uint8Array.of((15&e[6])<<4|e[7]>>4&15,(15&e[7])<<4|(240&e[4])>>4,(15&e[4])<<4|(240&e[5])>>4,(15&e[5])<<4|(240&e[0])>>4,(15&e[0])<<4|(240&e[1])>>4,(15&e[1])<<4|(240&e[2])>>4,96|15&e[2],e[3],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}("string"==typeof e?Hoe(e):e);return"string"==typeof e?Goe(t):t}var ese={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function tse(e,t,n){if(ese.randomUUID&&!t&&!e)return ese.randomUUID();var r=(e=e||{}).random||(e.rng||Koe)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return Goe(r)}function nse(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rse(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nse(Object(n),!0).forEach((function(t){ase(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nse(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ase(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ise(e={},t,n=0){var r=function(e,t,n){var r=t&&n||0,a=t||new Array(16),i=(e=e||{}).node,o=e.clockseq;if(e._v6||(i||(i=$oe),null==o&&(o=Zoe)),null==i||null==o){var s=e.random||(e.rng||Koe)();null==i&&(i=[s[0],s[1],s[2],s[3],s[4],s[5]],$oe||e._v6||(i[0]|=1,$oe=i)),null==o&&(o=16383&(s[6]<<8|s[7]),void 0!==Zoe||e._v6||(Zoe=o))}var l=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:Qoe+1,u=l-Xoe+(c-Qoe)/1e4;if(u<0&&void 0===e.clockseq&&(o=o+1&16383),(u<0||l>Xoe)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Xoe=l,Qoe=c,Zoe=o;var d=(1e4*(268435455&(l+=122192928e5))+c)%4294967296;a[r++]=d>>>24&255,a[r++]=d>>>16&255,a[r++]=d>>>8&255,a[r++]=255&d;var h=l/4294967296*1e4&268435455;a[r++]=h>>>8&255,a[r++]=255&h,a[r++]=h>>>24&15|16,a[r++]=h>>>16&255,a[r++]=o>>>8|128,a[r++]=255&o;for(var m=0;m<6;++m)a[r+m]=i[m];return t||Goe(a)}(rse(rse({},e),{},{_v6:!0}),new Uint8Array(16));if(r=Joe(r),t){for(var a=0;a<16;a++)t[n+a]=r[a];return t}return Goe(r)}function ose(e){return ise({clockseq:e})}function sse(e,t){return e.channel_versions[t]??0}function lse(e,t,n){return e.versions_seen[t]?.[n]??0}function cse(e){if("object"!=typeof e||null===e)return e;const t=Array.isArray(e)?[]:{};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=cse(e[n]));return t}function use(){return{v:1,id:ose(-2),ts:(new Date).toISOString(),channel_values:{},channel_versions:{},versions_seen:{}}}function dse(e){return{v:e.v,id:e.id,ts:e.ts,channel_values:{...e.channel_values},channel_versions:{...e.channel_versions},versions_seen:cse(e.versions_seen)}}class hse{constructor(e){Object.defineProperty(this,"serde",{enumerable:!0,configurable:!0,writable:!0,value:Boe}),this.serde=e||this.serde}async get(e){const t=await this.getTuple(e);return t?t.checkpoint:void 0}}class mse extends Error{constructor(e){super(e),this.name="GraphRecursionError"}static get unminifiable_name(){return"GraphRecursionError"}}class pse extends Error{constructor(e){super(e),this.name="GraphValueError"}static get unminifiable_name(){return"GraphValueError"}}class fse extends Error{constructor(e){super(e),this.name="EmptyChannelError"}static get unminifiable_name(){return"EmptyChannelError"}}class gse extends Error{constructor(e){super(e),this.name="InvalidUpdateError"}static get unminifiable_name(){return"InvalidUpdateError"}}class vse{}function yse(e,t){const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const a=t.channel_values[r];n[r]=e[r].fromCheckpoint(a)}return n}function bse(e,t,n){const r={};for(const e of Object.keys(t))try{r[e]=t[e].checkpoint()}catch(e){if(e.name!==fse.unminifiable_name)throw e}return{v:1,id:ose(n),ts:(new Date).toISOString(),channel_values:r,channel_versions:{...e.channel_versions},versions_seen:cse(e.versions_seen)}}class wse extends Error{constructor(e){super(e),this.name="GraphValidationError"}}function xse(e,t){if(Array.isArray(e)){for(const n of e)if(!(n in t))throw new Error(`Key ${String(n)} not found in channels`)}else if(!(e in t))throw new Error(`Key ${String(e)} not found in channels`)}function kse(e,t,n=!0,r=!1){try{return e[t].get()}catch(e){if(e.name===fse.unminifiable_name){if(r)return e;if(n)return null}throw e}}function Sse(e,t,n=!0){if(Array.isArray(t)){const r={};for(const a of t)try{r[a]=kse(e,a,!n)}catch(e){if(e.name===fse.unminifiable_name)continue}return r}return kse(e,t)}function*Ase(e,t){if(null!=t)if(Array.isArray(e)&&"object"==typeof t&&!Array.isArray(t))for(const n in t)e.includes(n)&&(yield[n,t[n]]);else{if(Array.isArray(e))throw new Error("Input chunk must be an object when inputChannels is an array");yield[e,t]}}function*Ese(e,t,n){Array.isArray(e)?t.find((([t,n])=>e.includes(t)))&&(yield Sse(n,e)):t.some((([t,n])=>t===e))&&(yield kse(n,e))}function*_se(e,t){const n=t.filter((e=>void 0===e.config||!e.config.tags?.includes(Gae)));if(Array.isArray(e)){const t={};for(const r of n)if(r.writes.some((([t,n])=>e.includes(t)))){const n={};for(const[t,a]of r.writes)e.includes(t)&&(n[t]=a);t[r.name]=n}Object.keys(t).length>0&&(yield t)}else{const t={};for(const r of n)for(const[n,a]of r.writes)n===e&&(t[r.name]=a);Object.keys(t).length>0&&(yield t)}}function Cse(e){for(const t of e)return t;return null}class Ose{static subscribeTo(e,t){const{key:n,tags:r}=t??{};if(Array.isArray(e)&&void 0!==n)throw new Error("Can't specify a key when subscribing to multiple channels");let a;a=function(e){return"string"==typeof e}(e)?n?{[n]:e}:[e]:Object.fromEntries(e.map((e=>[e,e])));const i=Array.isArray(e)?e:[e];return new eie({channels:a,triggers:i,tags:r})}static writeTo(e,t){const n=[];for(const t of e)n.push({channel:t,value:Yae,skipNone:!1});for(const[e,r]of Object.entries(t??{}))s9.isRunnable(r)||"function"==typeof r?n.push({channel:e,value:Yae,skipNone:!0,mapper:g9(r)}):n.push({channel:e,value:r,skipNone:!1});return new Xae(n)}}class Tse extends s9{static lc_name(){return"LangGraph"}constructor(e){super(e),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langgraph","pregel"]}),Object.defineProperty(this,"nodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"channels",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inputs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"outputs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"autoValidate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"streamMode",{enumerable:!0,configurable:!0,writable:!0,value:"values"}),Object.defineProperty(this,"streamChannels",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"interruptAfter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"interruptBefore",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"debug",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"checkpointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nodes=e.nodes,this.channels=e.channels,this.autoValidate=e.autoValidate??this.autoValidate,this.streamMode=e.streamMode??this.streamMode,this.outputs=e.outputs,this.streamChannels=e.streamChannels??this.streamChannels,this.interruptAfter=e.interruptAfter,this.interruptBefore=e.interruptBefore,this.inputs=e.inputs,this.stepTimeout=e.stepTimeout??this.stepTimeout,this.debug=e.debug??this.debug,this.checkpointer=e.checkpointer,this._transform=this._transform.bind(this),this.autoValidate&&this.validate()}validate(){return function({nodes:e,channels:t,inputChannels:n,outputChannels:r,streamChannels:a,interruptAfterNodes:i,interruptBeforeNodes:o}){if(!t)throw new wse("Channels not provided");const s=new Set,l=new Set;for(const[t,n]of Object.entries(e)){if(t===Wae)throw new wse(`"Node name ${Wae} is reserved"`);if(n.constructor!==eie)throw new wse(`Invalid node type ${typeof n}, expected PregelNode`);n.triggers.forEach((e=>s.add(e)))}for(const e of s)if(!(e in t))throw new wse(`Subcribed channel '${String(e)}' not in channels`);if(Array.isArray(n)){if(n.every((e=>!s.has(e))))throw new wse(`None of the input channels ${n} are subscribed to by any node`)}else if(!s.has(n))throw new wse(`Input channel ${String(n)} is not subscribed to by any node`);Array.isArray(r)?r.forEach((e=>l.add(e))):l.add(r),a&&!Array.isArray(a)?l.add(a):Array.isArray(a)&&a.forEach((e=>l.add(e)));for(const e of l)if(!(e in t))throw new wse(`Output channel '${String(e)}' not in channels`);if(i&&"*"!==i)for(const t of i)if(!(t in e))throw new wse(`Node ${String(t)} not in nodes`);if(o&&"*"!==o)for(const t of o)if(!(t in e))throw new wse(`Node ${String(t)} not in nodes`)}({nodes:this.nodes,channels:this.channels,outputChannels:this.outputs,inputChannels:this.inputs,streamChannels:this.streamChannels,interruptAfterNodes:this.interruptAfter,interruptBeforeNodes:this.interruptBefore}),this}get streamChannelsList(){return Array.isArray(this.streamChannels)?this.streamChannels:this.streamChannels?[this.streamChannels]:Object.keys(this.channels)}get streamChannelsAsIs(){return this.streamChannels?this.streamChannels:Object.keys(this.channels)}async getState(e){if(!this.checkpointer)throw new pse("No checkpointer set");const t=await this.checkpointer.getTuple(e),n=t?t.checkpoint:use(),r=yse(this.channels,n),[a,i]=Mse(n,this.nodes,r,!1);return{values:Sse(r,this.streamChannelsAsIs),next:i.map((e=>e.name)),metadata:t?.metadata,config:t?t.config:e,createdAt:t?.checkpoint.ts,parentConfig:t?.parentConfig}}async*getStateHistory(e,t,n){if(!this.checkpointer)throw new pse("No checkpointer set");for await(const r of this.checkpointer.list(e,t,n)){const e=yse(this.channels,r.checkpoint),[t,n]=Mse(r.checkpoint,this.nodes,e,!1);yield{values:Sse(e,this.streamChannelsAsIs),next:n.map((e=>e.name)),metadata:r.metadata,config:r.config,createdAt:r.checkpoint.ts,parentConfig:r.parentConfig}}}async updateState(e,t,n){if(!this.checkpointer)throw new pse("No checkpointer set");const r=await this.checkpointer.getTuple(e),a=r?dse(r.checkpoint):use(),i=Object.entries(a.versions_seen).reduce(((e,[t,n])=>{const r=Math.max(...Object.values(n));return r&&(e[r]||(e[r]=[]),e[r].push(t)),e}),{});if(n||Object.keys(i).length){if(!n){const e=i[Math.max(...Object.keys(i).map(Number))];1===e.length&&(n=e[0])}}else!Array.isArray(this.inputs)&&this.inputs in this.nodes&&(n=this.inputs);if(!n)throw new gse("Ambiguous update, specify as_node");const o=yse(this.channels,a),s=this.nodes[n].getWriters();if(!s.length)throw new gse(`No writers found for node ${n}`);const l={name:n,input:t,proc:s.length>1?d9.from(s):s[0],writes:[],config:void 0};await l.proc.invoke(l.input,v8(e,{runName:`${this.name}UpdateState`,configurable:{[Uae]:e=>l.writes.push(...e),[Vae]:Nse.bind(void 0,a,o,l.writes)}})),Ise(a,o,l.writes);const c=(r?.metadata?.step??-2)+1;return await this.checkpointer.put(r?.config??e,bse(a,o,c),{source:"update",step:c,writes:{[n]:t}})}_defaults(e){const{debug:t,streamMode:n,inputKeys:r,outputKeys:a,interruptAfter:i,interruptBefore:o,...s}=e,l=void 0!==t?t:this.debug;let c=a;void 0===c?c=this.streamChannelsAsIs:xse(c,this.channels);let u=r;void 0===u?u=this.inputs:xse(u,this.channels);const d=o??this.interruptBefore??[],h=i??this.interruptAfter??[];let m;return m=void 0!==n?n:this.streamMode,void 0!==e.configurable&&void 0!==e.configurable[Vae]&&(m="values"),[l,m,u,c,s,d,h]}async*_transform(e,t,n={}){const r=[];try{if(n.recursionLimit&&n.recursionLimit<1)throw new pse(`Recursion limit must be greater than 0, got ${n.recursionLimit}`);if(this.checkpointer&&!n.configurable)throw new pse("Checkpointer requires one or more of the following 'configurable' keys: thread_id, checkpoint_id");const[a,i,o,s,l,c,u]=this._defaults(n),d={...this.nodes},h=this.checkpointer?await this.checkpointer.getTuple(n):null;let m=h?h.checkpoint:use(),p=h?h.config:n,f=(h?.metadata?.step??-2)+1;const g=yse(this.channels,m),v=[];for await(const t of e)for(const e of Ase(o,t))v.push(e);if(v.length){const e=Mse(m,d,g,!0);m=e[0],Ise(m,g,v),this.checkpointer&&(m=bse(m,g,f),r.push(this.checkpointer.put(p,m,{source:"input",step:f,writes:Object.fromEntries(v)})),p={configurable:{...p.configurable,checkpoint_id:m.id}}),f+=1}else{m=dse(m);for(const e of this.streamChannelsList){const t=m.channel_versions[e]??0;m.versions_seen[Wae]||(m.versions_seen[Wae]={}),m.versions_seen[Wae][e]=t}}const y=f+(n.recursionLimit??25);for(let e=f;e<y+1;e+=1){const[o,h]=Mse(m,d,g,!0);if(0===h.length&&e===f)throw new pse("No tasks to run in graph.");if(0===h.length)break;if(e===y)throw new mse(`Recursion limit of ${n.recursionLimit} reached without hitting a stop condition. You can increase the limit by setting the "recursionLimit" config key.`);if(Dse(m,c,this.streamChannelsList,h))break;m=o,a&&console.log(h);const v=h.map(((r,a)=>[r.proc,r.input,v8(p8(l,d[r.name].config,{metadata:{langgraph_step:e,langgraph_node:r.name,langgraph_triggers:["__pregel_tasks"],langgraph_task_idx:a}}),{callbacks:t?.getChild(`graph:step:${e}`),runName:r.name,configurable:{...n.configurable,[Uae]:e=>r.writes.push(...e),[Vae]:Nse.bind(void 0,m,g,r.writes)}})])),b=v.map((([e,t,n])=>()=>e.invoke(t,n)));await Pse(b,this.stepTimeout);const w=[];for(const e of h)w.push(...e.writes);if(Ise(m,g,w),"values"===i?yield*Ese(s,w,g):"updates"===i&&(yield*_se(s,h)),this.checkpointer&&(m=bse(m,g,e),r.push(this.checkpointer.put(p,m,{source:"loop",step:e,writes:Cse("values"===this.streamMode?Ese(s,w,g):_se(s,h))})),p={configurable:{...p.configurable,checkpoint_id:m.id}}),Dse(m,u,this.streamChannelsList,h))break}}finally{await Promise.all(r)}}async invoke(e,t){const n=g8(t);let r;n?.outputKeys||(n.outputKeys=this.outputs),n?.streamMode||(n.streamMode="values");for await(const t of await this.stream(e,n))r=t;if(r)return r}async stream(e,t){const n=async function*(){yield e}();return $5.fromAsyncGenerator(this.transform(n,t))}async*transform(e,t){for await(const n of this._transformStreamWithConfig(e,this._transform,t))yield n}}async function Pse(e,t){const n=e.map((e=>{return t?Promise.race([e(),t?(n=t,new Promise((e=>{setTimeout(e,n)}))):Promise.resolve()]):e();var n})),r=await Promise.allSettled(n);for(const e of r)if("rejected"===e.status)throw e.reason}function Dse(e,t,n,r){const a=n.some((t=>sse(e,t)>lse(e,Wae,t))),i=r.some((e=>"*"===t?!e.config?.tags?.includes(Gae):t.includes(e.name)));return a&&i}function Nse(e,t,n,r,a=!1){if(a){const a=bse(e,t,-1),i=yse(t,a);return Ise(dse(a),i,n),Sse(i,r)}return Sse(t,r)}function Ise(e,t,n){const r={};for(const[e,t]of n)e in r?r[e].push(t):r[e]=[t];let a=0;Object.keys(e.channel_versions).length>0&&(a=Math.max(...Object.values(e.channel_versions)));const i=new Set;for(const[n,o]of Object.entries(r))if(n in t){try{t[n].update(o)}catch(e){if(e.name===gse.unminifiable_name)throw new gse(`Invalid update for channel ${n}. Values: ${o}`)}e.channel_versions[n]=a+1,i.add(n)}else console.warn(`Skipping write for channel ${n} which has no readers`);for(const e in t)i.has(e)||t[e].update([])}function Mse(e,t,n,r){const a=dse(e),i=[],o=[];for(const[e,s]of Object.entries(t))if(s.triggers.filter((e=>{try{return kse(n,e,!1),!0}catch(e){return!1}})).some((t=>sse(a,t)>lse(a,e,t)))){let t;if(Array.isArray(s.channels)){let e=0;for(const r of s.channels)try{t=kse(n,r,!1);break}catch(t){if(t.name===fse.unminifiable_name){e+=1;continue}throw t}if(e===s.channels.length)continue}else{if("object"!=typeof s.channels)throw new Error(`Invalid channels type, expected list or dict, got ${s.channels}`);t={};try{for(const[e,r]of Object.entries(s.channels))t[e]=kse(n,r,!s.triggers.includes(r))}catch(e){if(e.name===fse.unminifiable_name)continue;throw e}}if(void 0!==s.mapper&&(t=s.mapper(t)),r){a.versions_seen[e]||(a.versions_seen[e]={}),s.triggers.forEach((t=>{const n=a.channel_versions[t];void 0!==n&&(a.versions_seen[e][t]=n)}));const n=s.getNode();void 0!==n&&i.push({name:e,input:t,proc:n,writes:[],config:s.config})}else o.push({name:e,input:t})}return[a,r?i:o]}class jse extends vse{constructor(e=!0){super(),Object.defineProperty(this,"lc_graph_name",{enumerable:!0,configurable:!0,writable:!0,value:"EphemeralValue"}),Object.defineProperty(this,"guard",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.guard=e}fromCheckpoint(e){const t=new jse;return e&&(t.value=e),t}update(e){if(0!==e.length){if(1!==e.length&&this.guard)throw new gse("EphemeralValue can only receive one value per step.");this.value=e[e.length-1]}else this.value=void 0}get(){if(void 0===this.value)throw new fse;return this.value}checkpoint(){if(void 0===this.value)throw new fse;return this.value}}const Rse="__start__",zse="__end__";class Lse{constructor(e){Object.defineProperty(this,"condition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ends",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.condition=e.path,this.ends=Array.isArray(e.pathMap)?e.pathMap.reduce(((e,t)=>(e[t]=t,e)),{}):e.pathMap}compile(e,t){return Xae.registerWriter(new $ae({func:(n,r)=>this._route(n,r,e,t)}))}async _route(e,t,n,r){let a,i=await this.condition(r?r(t):e,t);if(Array.isArray(i)||(i=[i]),a=this.ends?i.map((e=>this.ends[e])):i,a.some((e=>!e)))throw new Error("Branch condition returned unknown or null destination");return n(a)}}class Fse{constructor(){Object.defineProperty(this,"nodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"edges",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"branches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"entryPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"compiled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"supportMultipleEdges",{enumerable:!0,configurable:!0,writable:!0,value:!1}),this.nodes={},this.edges=new Set,this.branches={}}warnIfCompiled(e){this.compiled&&console.warn(e)}get allEdges(){return this.edges}addNode(e,t){if(this.warnIfCompiled("Adding a node to a graph that has already been compiled. This will not be reflected in the compiled graph."),e in this.nodes)throw new Error(`Node \`${e}\` already present.`);if(e===zse)throw new Error(`Node \`${e}\` is reserved.`);return this.nodes[e]=g9(t),this}addEdge(e,t){if(this.warnIfCompiled("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph."),e===zse)throw new Error("END cannot be a start node");if(t===Rse)throw new Error("START cannot be an end node");if(!this.supportMultipleEdges&&Array.from(this.edges).some((([t])=>t===e)))throw new Error(`Already found path for ${e}`);return this.edges.add([e,t]),this}addConditionalEdges(e,t,n){const r="object"==typeof e?e:{source:e,path:t,pathMap:n};this.warnIfCompiled("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph.");const a=r.path.name||"condition";if(this.branches[r.source]&&this.branches[r.source][a])throw new Error(`Condition \`${a}\` already present for node \`${e}\``);return this.branches[r.source]||(this.branches[r.source]={}),this.branches[r.source][a]=new Lse(r),this}setEntryPoint(e){return this.warnIfCompiled("Setting the entry point of a graph that has already been compiled. This will not be reflected in the compiled graph."),this.addEdge(Rse,e)}setFinishPoint(e){return this.warnIfCompiled("Setting a finish point of a graph that has already been compiled. This will not be reflected in the compiled graph."),this.addEdge(e,zse)}compile({checkpointer:e,interruptBefore:t,interruptAfter:n}={}){this.validate([...Array.isArray(t)?t:[],...Array.isArray(n)?n:[]]);const r=new Bse({builder:this,checkpointer:e,interruptAfter:n,interruptBefore:t,autoValidate:!1,nodes:{},channels:{[Rse]:new jse,[zse]:new jse},inputs:Rse,outputs:zse,streamChannels:[],streamMode:"values"});for(const[e,t]of Object.entries(this.nodes))r.attachNode(e,t);for(const[e,t]of this.edges)r.attachEdge(e,t);for(const[e,t]of Object.entries(this.branches))for(const[n,a]of Object.entries(t))r.attachBranch(e,n,a);return r.validate()}validate(e){const t=new Set([...this.allEdges].map((([e,t])=>e)));for(const[e]of Object.entries(this.branches))t.add(e);for(const e of Object.keys(this.nodes))if(!t.has(e))throw new Error(`Node \`${e}\` is a dead-end`);for(const e of t)if(e!==Rse&&!(e in this.nodes))throw new Error(`Found edge starting at unknown node \`${e}\``);const n=new Set([...this.allEdges].map((([e,t])=>t)));for(const[e,t]of Object.entries(this.branches))for(const r of Object.values(t))if(r.ends)for(const e of Object.values(r.ends))n.add(e);else{n.add(zse);for(const t of Object.keys(this.nodes))t!==e&&n.add(t)}for(const e of Object.keys(this.nodes))if(!n.has(e))throw new Error(`Node \`${e}\` is not reachable`);for(const e of n)if(e!==zse&&!(e in this.nodes))throw new Error(`Found edge ending at unknown node \`${e}\``);if(e)for(const t of e)if(!(t in this.nodes))throw new Error(`Interrupt node \`${t}\` is not present`);this.compiled=!0}}class Bse extends Tse{constructor({builder:e,...t}){super(t),Object.defineProperty(this,"builder",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.builder=e}attachNode(e,t){this.channels[e]=new jse,this.nodes[e]=new eie({channels:[],triggers:[]}).pipe(t).pipe(new Xae([{channel:e,value:Yae}],[Gae])),this.streamChannels.push(e)}attachEdge(e,t){if(t===zse){if(e===Rse)throw new Error("Cannot have an edge from START to END");this.nodes[e].writers.push(new Xae([{channel:zse,value:Yae}],[Gae]))}else this.nodes[t].triggers.push(e),this.nodes[t].channels.push(e)}attachBranch(e,t,n){e===Rse&&this.nodes[Rse]&&(this.nodes[Rse]=Ose.subscribeTo(Rse,{tags:[Gae]})),this.nodes[e].pipe(n.compile((n=>{const r=n.map((n=>n===zse?zse:`branch:${e}:${t}:${n}`));return new Xae(r.map((e=>({channel:e,value:Yae}))),[Gae])})));const r=n.ends?Object.values(n.ends):Object.keys(this.nodes);for(const n of r)if(n!==zse){const r=`branch:${e}:${t}:${n}`;this.channels[r]=new jse,this.nodes[n].triggers.push(r),this.nodes[n].channels.push(r)}}getGraph(e){const t=e?.xray,n=new J8,r={[Rse]:n.addNode({schema:v4.any()},Rse)},a={[zse]:n.addNode({schema:v4.any()},zse)};for(const[i,o]of Object.entries(this.builder.nodes))if(e?.xray){const s=qse(o)?o.getGraph({...e,xray:"number"==typeof t&&t>0?t-1:t}):o.getGraph(e);if(s.trimFirstNode(),s.trimLastNode(),Object.keys(s.nodes).length>1){const[e,t]=n.extend(s,i);void 0!==e&&(a[i]=e),void 0!==t&&(r[i]=t)}else{const e=n.addNode(o,i);r[i]=e,a[i]=e}}else{const e=n.addNode(o,i);r[i]=e,a[i]=e}for(const[e,t]of this.builder.allEdges)n.addEdge(r[e],a[t]);for(const[e,t]of Object.entries(this.builder.branches)){const i={...Object.fromEntries(Object.keys(this.builder.nodes).filter((t=>t!==e)).map((e=>[e,e]))),[zse]:zse};for(const o of Object.values(t)){let t;t=void 0!==o.ends?o.ends:i;for(const[i,o]of Object.entries(t))n.addEdge(r[e],a[o],i!==o?i:void 0,!0)}}return n}}function qse(e){return"function"==typeof e.attachNode&&"function"==typeof e.attachEdge}class Hse extends vse{constructor(e,t){super(),Object.defineProperty(this,"lc_graph_name",{enumerable:!0,configurable:!0,writable:!0,value:"BinaryOperatorAggregate"}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"operator",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"initialValueFactory",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.operator=e,this.initialValueFactory=t,this.value=t?.()}fromCheckpoint(e){const t=new Hse(this.operator,this.initialValueFactory);return e&&(t.value=e),t}update(e){let t=e;if(t.length){void 0===this.value&&([this.value]=t,t=t.slice(1));for(const e of t)void 0!==this.value&&(this.value=this.operator(this.value,e))}}get(){if(void 0===this.value)throw new fse;return this.value}checkpoint(){if(void 0===this.value)throw new fse;return this.value}}class Use extends vse{constructor(){super(...arguments),Object.defineProperty(this,"lc_graph_name",{enumerable:!0,configurable:!0,writable:!0,value:"LastValue"}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}fromCheckpoint(e){const t=new Use;return e&&(t.value=e),t}update(e){if(0!==e.length){if(1!==e.length)throw new gse;this.value=e[e.length-1]}}get(){if(void 0===this.value)throw new fse;return this.value}checkpoint(){if(void 0===this.value)throw new fse;return this.value}}const Vse=(e,t)=>e.size===t.size&&[...e].every((e=>t.has(e)));class Wse extends vse{constructor(e){super(),Object.defineProperty(this,"lc_graph_name",{enumerable:!0,configurable:!0,writable:!0,value:"NamedBarrierValue"}),Object.defineProperty(this,"names",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"seen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.names=e,this.seen=new Set}fromCheckpoint(e){const t=new Wse(this.names);return e&&(t.seen=new Set(e)),t}update(e){Vse(this.names,this.seen)&&(this.seen=new Set);for(const t of e){if(!this.names.has(t))throw new Error(`Value ${JSON.stringify(t)} not in names ${JSON.stringify(this.names)}`);this.seen.add(t)}}get(){if(!Vse(this.names,this.seen))throw new fse}checkpoint(){return[...this.seen]}}const Gse="__root__";class $se extends Fse{constructor(e){super(),Object.defineProperty(this,"channels",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"waitingEdges",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),this.channels=function(e){const t={};for(const[n,r]of Object.entries(e))t[n]=Zse(r);return t}(e.channels);for(const e of Object.values(this.channels))if("BinaryOperatorAggregate"===e.lc_graph_name){this.supportMultipleEdges=!0;break}}get allEdges(){return new Set([...this.edges,...Array.from(this.waitingEdges).flatMap((([e,t])=>e.map((e=>[e,t]))))])}addNode(e,t){if(e in this.channels)throw new Error(`${e} is already being used as a state attribute (a.k.a. a channel), cannot also be used as a node name.`);return super.addNode(e,t)}addEdge(e,t){if("string"==typeof e)return super.addEdge(e,t);this.compiled&&console.warn("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph.");for(const t of e){if(t===zse)throw new Error("END cannot be a start node");if(!Object.keys(this.nodes).some((e=>e===t)))throw new Error(`Need to add_node ${t} first`)}if(t===zse)throw new Error("END cannot be an end node");if(!Object.keys(this.nodes).some((e=>e===t)))throw new Error(`Need to add_node ${t} first`);return this.waitingEdges.add([e,t]),this}compile({checkpointer:e,interruptBefore:t,interruptAfter:n}={}){this.validate([...Array.isArray(t)?t:[],...Array.isArray(n)?n:[]]);const r=Object.keys(this.channels),a=1===r.length&&r[0]===Gse?r[0]:r,i=new Yse({builder:this,checkpointer:e,interruptAfter:n,interruptBefore:t,autoValidate:!1,nodes:{},channels:{...this.channels,[Rse]:new jse},inputs:Rse,outputs:a,streamChannels:a,streamMode:"updates"});i.attachNode(Rse);for(const[e,t]of Object.entries(this.nodes))i.attachNode(e,t);for(const[e,t]of this.edges)i.attachEdge(e,t);for(const[e,t]of this.waitingEdges)i.attachEdge(e,t);for(const[e,t]of Object.entries(this.branches))for(const[n,r]of Object.entries(t))i.attachBranch(e,n,r);return i.validate()}}function Zse(e){return"object"==typeof e&&e&&"reducer"in e&&e.reducer?new Hse(e.reducer,e.default):"object"==typeof e&&e&&"value"in e&&e.value?new Hse(e.value,e.default):new Use}class Yse extends Bse{attachNode(e,t){const n=Object.keys(this.builder.channels);function r(e,t){if(t){if("object"!=typeof t||Array.isArray(t))throw new gse("Expected dict, got "+typeof t);return e in t?t[e]:Zae}return Zae}const a=n.map((e=>e===Gse?{channel:e,value:Yae,skipNone:!0}:{channel:e,value:Yae,mapper:new $ae({func:r.bind(null,e),trace:!1,recurse:!1})}));e===Rse?this.nodes[e]=new eie({tags:[Gae],triggers:[Rse],channels:[Rse],writers:[new Xae(a,[Gae])]}):(this.channels[e]=new jse,this.nodes[e]=new eie({triggers:[],channels:1===n.length&&n[0]===Gse?n:n.reduce(((e,t)=>(e[t]=t,e)),{}),writers:[new Xae(a.concat({channel:e,value:e}),[Gae])],bound:t}))}attachEdge(e,t){if(t!==zse)if(Array.isArray(e)){const n=`join:${e.join("+")}:${t}`;this.channels[n]=new Wse(new Set(e)),this.nodes[t].triggers.push(n);for(const t of e)this.nodes[t].writers.push(new Xae([{channel:n,value:t}],[Gae]))}else if(e===Rse){const e=`start:${t}`;this.channels[e]=new jse,this.nodes[t].triggers.push(e),this.nodes[Rse].writers.push(new Xae([{channel:e,value:Rse}],[Gae]))}else this.nodes[t].triggers.push(e)}attachBranch(e,t,n){this.nodes[e].writers.push(n.compile((n=>{const r=n.filter((e=>e!==zse));if(!r.length)return;const a=r.map((n=>({channel:`branch:${e}:${t}:${n}`,value:e})));return new Xae(a,[Gae])}),(e=>Qae.doRead(e,this.outputs,!0))));const r=n.ends?Object.values(n.ends):Object.keys(this.builder.nodes);for(const n of r){if(n===zse)continue;const r=`branch:${e}:${t}:${n}`;this.channels[r]=new jse,this.nodes[n].triggers.push(r)}}}function Kse(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],a=n.map(J1),i=r.map(J1);for(const e of a)null!==e.id&&void 0!==e.id||(e.id=tse());for(const e of i)null!==e.id&&void 0!==e.id||(e.id=tse());const o=new Map(a.map(((e,t)=>[e.id,t]))),s=[...a],l=new Set;for(const e of i){const t=o.get(e.id);if(void 0!==t)"remove"===e._getType()?l.add(e.id):s[t]=e;else{if("remove"===e._getType())throw new Error(`Attempting to delete a message with an ID that doesn't exist ('${e.id}')`);s.push(e)}}return s.filter((e=>!l.has(e.id)))}class Xse extends hse{constructor(e){super(e),Object.defineProperty(this,"storage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.storage={}}async getTuple(e){const t=e.configurable?.thread_id,n=e.configurable?.checkpoint_id,r=this.storage[t];if(n){const t=r[n];if(t)return{config:e,checkpoint:await this.serde.parse(t[0]),metadata:await this.serde.parse(t[1])}}else if(r){const e=Object.keys(r).sort(((e,t)=>t.localeCompare(e)))[0],n=r[e];return{config:{configurable:{thread_id:t,checkpoint_id:e}},checkpoint:await this.serde.parse(n[0]),metadata:await this.serde.parse(n[1])}}}async*list(e,t,n){const r=e.configurable?.thread_id,a=this.storage[r]??{};for(const[e,i]of Object.entries(a).filter((e=>!n||e[0]<n.configurable?.checkpoint_id)).sort(((e,t)=>t[0].localeCompare(e[0]))).slice(0,t))yield{config:{configurable:{thread_id:r,checkpoint_id:e}},checkpoint:await this.serde.parse(i[0]),metadata:await this.serde.parse(i[1])}}async put(e,t,n){const r=e.configurable?.thread_id;return this.storage[r]?this.storage[r][t.id]=[this.serde.stringify(t),this.serde.stringify(n)]:this.storage[r]={[t.id]:[this.serde.stringify(t),this.serde.stringify(n)]},{configurable:{thread_id:r,checkpoint_id:t.id}}}}class Qse extends $ae{constructor(e,t){const{name:n,tags:r,handleToolErrors:a}=t??{};super({name:n,tags:r,func:(e,t)=>this.run(e,t)}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"handleToolErrors",{enumerable:!0,configurable:!0,writable:!0,value:!0}),this.tools=e,this.handleToolErrors=a??this.handleToolErrors}async run(e,t){const n=Array.isArray(e)?e[e.length-1]:e.messages[e.messages.length-1];if("ai"!==n._getType())throw new Error("ToolNode only accepts AIMessages as input.");const r=await Promise.all(n.tool_calls?.map((async e=>{const n=this.tools.find((t=>t.name===e.name));try{if(void 0===n)throw new Error(`Tool "${e.name}" not found.`);const r=await n.invoke({...e,type:"tool_call"},t);return z1(r)&&"tool"===r._getType()?r:new F1({name:n.name,content:"string"==typeof r?r:JSON.stringify(r),tool_call_id:e.id})}catch(t){if(!this.handleToolErrors)throw t;return new F1({content:`Error: ${t.message}\n Please fix your mistakes.`,name:e.name,tool_call_id:e.id??""})}}))??[]);return Array.isArray(e)?r:{messages:r}}}class Jse extends zae{constructor(){super(...arguments),this.schema=v4.object({demographics:v4.object({email:v4.string().optional().describe("The email address of the participant."),mobilePhone:v4.string().optional().describe("The mobile phone number of the participant."),firstName:v4.string().optional().describe("The first name of the participant."),middleName:v4.string().optional().describe("The middle name of the participant."),lastName:v4.string().optional().describe("The last name of the participant."),dateOfBirth:v4.string().optional().describe("The date of birth of the participant."),gender:v4.string().optional().describe("The gender of the participant."),preferredLanguage:v4.string().optional().describe("The preferred language of the participant."),street1:v4.string().optional().describe("The first line of the participant's street address."),street2:v4.string().optional().describe("The second line of the participant's street address."),city:v4.string().optional().describe("The city of the participant."),state:v4.string().optional().describe("The state of the participant."),postalCode:v4.string().optional().describe("The postal code of the participant."),unsubscribedFromEmails:v4.string().optional().describe("Whether the participant is unsubscribed from email messages."),unsubscribedFromSms:v4.string().optional().describe("Whether the participant is unsubscribed from SMS messages.")}).optional().describe("Demographic information about the participant."),customFields:v4.record(v4.string(),v4.string()).optional().describe("Custom fields where dynamic information can be saved for the participant.")}),this.name="persistParticipantInfo",this.description="Can be used to save data about the current participant, including dynamic information in the participant's custom fields."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.persistParticipantInfo(e.demographics,e.customFields);return JSON.stringify(t)}))}}const ele=v4.object({endDate:v4.string().optional().describe("The end of the date range for the query. This is a datetime in the participant's local timezone."),startDate:v4.string().optional().describe("The start of the date range for the query. This is a datetime in the participant's local timezone."),pageSize:v4.number().optional().describe("The number of items to return."),pageID:v4.string().optional().describe("The page ID to continue from.")});class tle extends zae{constructor(){super(...arguments),this.schema=ele,this.name="queryAppleHealthWorkouts",this.description="Query the participant's workouts from Apple Health."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryAppleHealthWorkouts(e);return JSON.stringify(t)}))}}class nle extends zae{constructor(){super(...arguments),this.schema=ele,this.name="queryAppleHealthActivitySummaries",this.description="Query the participant's Apple Health activity summaries. These include Active Energy Burned,\n Active Energy Burned Goal, Apple Exercise Time, Apple Exercise Time Goal, Apple Stand Hours and Apple Stand Hours Goal."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryAppleHealthActivitySummaries(e);return JSON.stringify(t)}))}}class rle extends zae{constructor(){super(...arguments),this.schema=v4.object({type:v4.enum(["Sms","Push","Email"]).optional().describe("The type of notification to query."),statusCode:v4.enum(["Succeeded","Unsubscribed","MissingContactInfo","NoRegisteredMobileDevice","NoAssociatedUser","ServiceError"]).optional().describe("The status code of the notification."),sentBefore:v4.string().optional().describe("The end of the date range for the query. This is a datetime in the participant's local timezone."),sentAfter:v4.string().optional().describe("The start of the date range for the query. This is a datetime in the participant's local timezone."),identifier:v4.string().optional().describe("The identifier of the notification.")}),this.name="queryNotifications",this.description="Query notifications sent to the participant."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryNotifications(e);return JSON.stringify(t)}))}}class ale extends zae{constructor(){super(...arguments),this.schema=v4.object({surveyResultID:v4.string().optional().describe("The ID of the survey result."),surveyID:v4.string().optional().describe("The ID of the survey."),surveyName:v4.string().optional().describe("The name of the survey."),after:v4.string().optional().describe("The start of the date range for the query. Survey answers submitted after this date will be retrieved.\n This is a datetime in the participant's local timezone."),before:v4.string().optional().describe("The end of the date range for the query. Survey answers submitted before this date will be retrieved.\n This is a datetime in the participant's local timezone."),stepIdentifier:v4.string().optional().describe("The step identifier."),resultIdentifier:v4.string().optional().describe("The result identifier."),answer:v4.string().optional().describe("A particular answer."),pageID:v4.string().optional().describe("The page ID to continue from.")}),this.name="querySurveyAnswers",this.description="Query answers to surveys the participant has completed."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.querySurveyAnswers(e);return JSON.stringify(t)}))}}class ile extends zae{constructor(){super(...arguments),this.schema=v4.object({namespace:v4.enum(["Fitbit","AppleHealth"]).describe("The namespace of the device data, representing the manufacturer of the devices used to collect the data."),type:v4.string().describe("The device data type is specific to the namespace."),observedAfter:v4.string().optional().describe("The start of the date range for the query. This is a datetime in the participant's local timezone."),observedBefore:v4.string().optional().describe("The end of the date range for the query. This is a datetime in the participant's local timezone.")}),this.name="queryDeviceDataV2",this.description="Can query a participant's device data. This represents raw individual fine grained data points, not aggregated in any way.\n For sleep this is the function you would query to determine the time a participant went to bed or woke up."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryDeviceDataV2(e);return JSON.stringify(t.deviceDataPoints.map((({value:e,startDate:t,startDateOffset:n,observationDate:r,observationDateOffset:a,units:i,dataSource:o})=>{var s;return{value:e,startDate:t,startDateOffset:n,observationDate:r,observationDateOffset:a,units:i,dataSource:null===(s=null==o?void 0:o.properties)||void 0===s?void 0:s.sourceName}})))}))}}class ole extends zae{constructor(){super(...arguments),this.schema=v4.object({namespace:v4.enum(["Fitbit","AppleHealth"]).describe("The namespace of the device data, representing the manufacturer of the devices used to collect the data."),type:v4.string().describe("The device data type is specific to the namespace. Example data types for AppleHealth are Steps, Heart Rate."),observedAfter:v4.string().optional().describe("The start of the date range for the query. This is a datetime in the participant's local timezone."),observedBefore:v4.string().optional().describe("The end of the date range for the query. This is a datetime in the participant's local timezone."),intervalAmount:v4.number().describe("The number of periods to aggregate over. Together with intervalType this can be 1 Days or 3 Minutes."),intervalType:v4.enum(["Minutes","Hours","Days","Weeks","Months"]).describe("The type of interval to aggregate over. Together with intervalAmount this can be 1 Days or 3 Minutes."),aggregateFunctions:v4.array(v4.enum(["sum","avg","count","min","max"])).describe("The aggregations functions to apply to the granular data.")}),this.name="queryDeviceDataV2Aggregate",this.description="Can query a participant's aggregated device data. This can be used to get for instance a participant's hourly steps \n count or their min max heart rate every day."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryDeviceDataV2Aggregate(e);return JSON.stringify(t.intervals.map((({date:e,statistics:t})=>({date:e,statistics:t}))))}))}}class sle extends zae{constructor(){super(...arguments),this.schema=v4.object({namespace:v4.enum(["Fitbit","AppleHealth"]).describe("The namespace of the device data, representing the manufacturer of the devices used to collect the data."),type:v4.string().describe("The device data type is specific to the namespace. For Apple Health this is called Sleep Analysis, for Fitbit it is called Sleep."),observedAfter:v4.string().optional().describe("The start of the date range for the query. This is a date (no time) in the participant's local time. This is inclusive."),observedBefore:v4.string().optional().describe("The end of the date range for the query. This is a date (no time) in the participant's local time. This is inclusive.")}),this.name="queryDeviceDataV2DailySleep",this.description="Can query daily aggregated sleep data. This will include sleep broken down by sleep stage.\n Use this function when you need to do sleep aggregate queries instead of deviceDataV2Aggregate."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield b.queryDeviceDataV2DailySleep(e);return JSON.stringify(t.sleepStageSummaries.map((({date:e,duration:t,source:n,value:r})=>({date:e,duration:t,source:n,value:r}))))}))}}class lle extends zae{constructor(){super(...arguments),this.schema=v4.object({type:v4.string().describe("The type of daily data to query."),startDate:v4.date().describe("The start of the date range for the query. This is a datetime in the participant's local timezone."),endDate:v4.date().describe("The end of the date range for the query. This is a datetime in the participant's local timezone.")}),this.name="queryDailyData",this.description="Query daily data for a participant."}_call(e){return Wq(this,void 0,void 0,(function*(){let t=yield nU(e.type,e.startDate,e.endDate,!1);return JSON.stringify(t)}))}}class cle{constructor(e="",t=[]){this.initialized=!1,this.baseUrl="https://2f4jcc2e2wgkjtpckvv2hhaani0ilmam.lambda-url.us-east-1.on.aws/",this.defaultTools=[new sle,new Jse,new ile,new ole,new rle,new tle,new nle,new ale,new lle],this.additionalInstructions=e,this.tools=t.length?t:this.defaultTools}ask(e,t){var n,r,a,i;return Wq(this,void 0,void 0,(function*(){if(!this.initialized){let e=yield b.getParticipantInfo();this.initialize(e)}let o={configurable:{thread_id:this.participantId}},s={messages:[new Z1(e)]};try{for(var l,c=!0,u=$q(yield this.graph.streamEvents(s,Object.assign(Object.assign({},o),{streamMode:"values",version:"v1"})));l=yield u.next(),!(n=l.done);){i=l.value,c=!1;try{t(i)}finally{c=!0}}}catch(e){r={error:e}}finally{try{c||n||!(a=u.return)||(yield a.call(u))}finally{if(r)throw r.error}}}))}initialize(e){const t=new Qse(this.tools),n={messages:{reducer:Kse},participantInfo:{value:(e,t)=>t||e,default:()=>"{}"}},r=new Tae({model:"gpt-4o",temperature:0,apiKey:b.token.access_token},{baseURL:this.baseUrl}).bindTools(this.tools),a=coe.fromMessages([ooe.fromTemplate(`\n\t\t\tYou are a health and wellness assistant. Your purpose is to help users understand their health and wearable data.\n\t\t\t\n\t\t\tUser information: {participantInfo}\n\t\t\t\n\t\t\tThe time right now is ${(new Date).toISOString()}.\n\n ${this.additionalInstructions}\n\t\t\t`),new Jie("messages")]),i=new $se({channels:n}).addNode("setParticipantInfo",(()=>Wq(this,void 0,void 0,(function*(){return{participantInfo:JSON.stringify(e)}})))).addNode("agent",((e,t)=>Wq(this,void 0,void 0,(function*(){const{messages:n,participantInfo:i}=e,o=a.pipe(r);return{messages:[yield o.invoke({messages:n,participantInfo:i},t)]}})))).addNode("tools",t).addEdge(Rse,"setParticipantInfo").addEdge("setParticipantInfo","agent").addConditionalEdges("agent",(e=>{var t;const{messages:n}=e;return(null===(t=n[n.length-1].tool_calls)||void 0===t?void 0:t.length)?"tools":zse})).addEdge("tools","agent"),o=new Xse;this.graph=i.compile({checkpointer:o}),this.initialized=!0,this.participantId=e.participantID}}function ule(e){const[n,r]=m(""),[a,i]=m([]),[o,s]=m(""),[l,c]=m(!0),u=d(),h=d(null);f((()=>{void 0===u.current&&(u.current=new cle(e.additionalInstructions))}),[]),f((()=>{h.current&&(h.current.scrollTop=h.current.scrollHeight)}),[a]);const p=function(){var t;return Wq(this,void 0,void 0,(function*(){let a=n;i((e=>[...e,{type:"user",content:a}])),r(""),yield null===(t=u.current)||void 0===t?void 0:t.ask(a,(function(t){var n;const[r,a]=t.event.split("_").slice(1);if("stream"===a&&"chain"!==r){let r=(null===(n=t.data)||void 0===n?void 0:n.chunk).message;r.content&&"string"==typeof r.content?g(t.run_id,r.content):e.debug&&r.tool_call_chunks&&r.tool_call_chunks.length>0&&(r.tool_call_chunks[0].args?g(t.run_id,r.tool_call_chunks[0].args):r.tool_call_chunks[0].name&&g(t.run_id,r.tool_call_chunks[0].name+" "))}"tool"===r&&("start"===a?s("Querying your data..."):"end"===a&&s(""))}))}))},g=function(e,t){i((n=>{let r=n.find((t=>t.runId===e));if(r){const a=Object.assign(Object.assign({},r),{content:r.content+t});return n.map((t=>t.runId===e?a:t))}return[...n,{type:"ai",content:t,runId:e}]}))};return t.createElement(t.Fragment,null,l&&t.createElement("div",{className:"mdh-assistant-collapsed",onClick:()=>Wq(this,void 0,void 0,(function*(){c(!1)}))},t.createElement(D,{icon:gK.faFlask,size:"lg"})),!l&&t.createElement("div",{className:"mdh-assistant"},t.createElement("div",{className:"mdh-assistant-header"},t.createElement("div",null,t.createElement(D,{icon:gK.faFlask}),"MyDataHelps Assistant"),t.createElement(D,{icon:yK.faChevronDown,className:"collapse-button",onClick:()=>c(!0)})),t.createElement("div",{id:"log",ref:h},a&&a.map(((e,n)=>"user"===e.type?t.createElement("div",{className:"user-message",key:n},t.createElement(D,{icon:pK.faUser}),t.createElement("p",null,e.content)):"ai"===e.type?t.createElement("div",{className:"ai-message",key:n},t.createElement(D,{icon:fK.faGear}),t.createElement(a1,null,e.content)):void 0)),o&&t.createElement("div",{id:"loading"},t.createElement(D,{icon:vK.faSpinner,spin:!0}),t.createElement("p",null,o))),t.createElement("div",{className:"input"},t.createElement("div",{className:"input-group"},t.createElement("input",{type:"text",id:"user-input",value:n,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&p()}}),t.createElement("button",{type:"button",id:"send",onClick:p},t.createElement(D,{icon:mK.faPaperPlane}))))))}function dle(e){var n;const[r,a]=m();let i;return"default"===e.previewState&&(i=(e,t)=>HH(e,t,2e3,2e4)),cU((()=>{"default"!==e.previewState?NU.loadParticipant().then((e=>{a(e.getStepsBaseline())})):a(1e4)})),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0,backgroundColor:"var(--mdhui-background-color-0)"},t.createElement(bz,{order:1},az("asthma-activity-view-title"))),t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:i,title:az("asthma-activity-view-chart-title"),dailyDataType:mU.Steps,highlight:e=>!!r&&!dH(r,e),emptyDomain:[0,1e4]}),"Steps"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-activity-view-alert-message"),logEntrySurveyName:e.logEntrySurveyName}))}function hle(e){var n;let r;return"default"===e.previewState&&(r=(e,t)=>HH(e,t,30,130)),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0,backgroundColor:"var(--mdhui-background-color-0)"},t.createElement(bz,{order:1},az("asthma-air-quality-view-title"))),(!e.alert||"HomeAirQuality"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:r,title:az("asthma-air-quality-view-home-aqi-chart-title"),dailyDataType:fH.HomeAirQuality,highlight:e=>e>100,emptyDomain:[0,160]}),(!e.alert||"WorkAirQuality"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:r,title:az("asthma-air-quality-view-work-aqi-chart-title"),dailyDataType:fH.WorkAirQuality,highlight:e=>e>100,emptyDomain:[0,160]}),"HomeAirQuality"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-air-quality-view-home-aqi-alert-message"),logEntrySurveyName:e.logEntrySurveyName}),"WorkAirQuality"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-air-quality-view-work-aqi-alert-message"),logEntrySurveyName:e.logEntrySurveyName}))}function mle(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{showCloseButton:!0,backgroundColor:"var(--mdhui-background-color-0)"}),t.createElement("div",{style:{background:"#ccc",height:160,width:160,borderRadius:"50%",margin:"32px auto"}}),t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-alert-takeover-message"),logEntrySurveyName:e.logEntrySurveyName}))}function ple(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0},t.createElement(bz,{order:2},ia(e.date,"PPP",{locale:Ps(b.getCurrentLanguage())}))),t.createElement(Ms,null,t.createElement(ZU,{previewState:e.previewState?"logged with mild symptoms":void 0,date:e.date,logTodayEntrySurveyName:e.logTodayEntrySurveyName,logYesterdayEntrySurveyName:e.logYesterdayEntrySurveyName,editLogEntryUrl:e.editLogEntryUrl,infoUrl:e.logEntryInfoUrl})),t.createElement(Ms,null,t.createElement(FU,{previewState:e.previewState?"all data":void 0,heartAndLungsUrl:e.heartAndLungsUrl,activityUrl:e.activityUrl,sleepUrl:e.sleepUrl,date:e.date})),t.createElement(Ms,null,t.createElement(jU,{previewState:e.previewState?"all data":void 0,airQualityUrl:e.airQualityUrl,date:e.date})))}function fle(e){var n;const[r,a]=m(),[i,o]=m(),[s,l]=m(),[c,u]=m(),[d,h]=m();let p,f,g;return"default"===e.previewState&&(p=(e,t)=>HH(e,t,30,150,!1),f=(e,t)=>HH(e,t,10,50),g=(e,t)=>HH(e,t,.85,1,!1)),cU((()=>{if("default"===e.previewState)return a(90),o(90),l(30),u(.97),void h(.96);NU.loadParticipant().then((e=>{a(e.getDaytimeRestingHeartRateBaseline()),o(e.getNighttimeRestingHeartRateBaseline()),l(e.getRespiratoryRateBaseline()),u(e.getDaytimeBloodOxygenLevelBaseline()),h(e.getNighttimeBloodOxygenLevelBaseline())}))})),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0,backgroundColor:"var(--mdhui-background-color-0)"},t.createElement(bz,{order:1},az("asthma-heart-and-lungs-view-title"))),(!e.alert||"DaytimeRestingHeartRate"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:p,title:az("asthma-heart-and-lungs-view-dhr-chart-title"),dailyDataType:mU.DaytimeRestingHeartRate,valueFormatter:e=>Number(e).toFixed(0),highlight:e=>!!r&&!lH(r,e),emptyDomain:[0,120]}),(!e.alert||"NighttimeRestingHeartRate"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:p,title:az("asthma-heart-and-lungs-view-nhr-chart-title"),dailyDataType:mU.NighttimeRestingHeartRate,valueFormatter:e=>Number(e).toFixed(0),highlight:e=>!!i&&!cH(i,e),emptyDomain:[0,120]}),(!e.alert||"RespiratoryRate"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:f,title:az("asthma-heart-and-lungs-view-rr-chart-title"),dailyDataType:mU.RespiratoryRate,highlight:e=>!!s&&!uH(s,e),emptyDomain:[0,40]}),(!e.alert||"DaytimeBloodOxygenLevel"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:g,title:az("asthma-heart-and-lungs-view-dbol-chart-title"),dailyDataType:mU.DaytimeBloodOxygenLevel,valueConverter:e=>100*e,valueFormatter:e=>Number(e).toFixed(0),highlight:e=>!!c&&!mH(c,e),domain:[80,100],emptyDomain:[80,100]}),(!e.alert||"NighttimeBloodOxygenLevel"===e.alert)&&t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:g,title:az("asthma-heart-and-lungs-view-nbol-chart-title"),dailyDataType:mU.NighttimeBloodOxygenLevel,valueConverter:e=>100*e,valueFormatter:e=>Number(e).toFixed(0),highlight:e=>!!d&&!mH(d,e),domain:[80,100],emptyDomain:[80,100]}),"DaytimeRestingHeartRate"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-heart-and-lungs-view-dhr-alert-message"),logEntrySurveyName:e.logEntrySurveyName}),"NighttimeRestingHeartRate"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-heart-and-lungs-view-nhr-alert-message"),logEntrySurveyName:e.logEntrySurveyName}),"RespiratoryRate"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-heart-and-lungs-view-rr-alert-message"),logEntrySurveyName:e.logEntrySurveyName}),"DaytimeBloodOxygenLevel"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-heart-and-lungs-view-dbol-alert-message"),logEntrySurveyName:e.logEntrySurveyName}),"NighttimeBloodOxygenLevel"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-heart-and-lungs-view-nbol-alert-message"),logEntrySurveyName:e.logEntrySurveyName}))}A(":root {\n --ce-grey-1: #FBFCFC;\n --ce-grey-2: #f8f9fb;\n --ce-grey-3: #F4F6F7;\n --ce-grey-4: #F1F2F5;\n --ce-grey-5: #EDEFF2;\n --ce-grey-10: #DFE1E7;\n --ce-grey-20: #C6CAD5;\n --ce-grey-30: #A9ADBF;\n --ce-grey-40: #8E90A6;\n --ce-grey-50: #73748B;\n --ce-grey-55: #6B6B81;\n --ce-grey-60: #595A6B;\n --ce-grey-70: #434351;\n --ce-grey-80: #2E2D35;\n --ce-grey-90: #1D1C21;\n --mdh-blue-1: #fafcff;\n --mdh-blue-2: #f4f8ff;\n --mdh-blue-3: #f1f6ff;\n --mdh-blue-4: #ebf3fe;\n --mdh-blue-5: #e5effe;\n --mdh-blue-10: #d1e2fd;\n --mdh-blue-20: #cde3ff;\n --mdh-blue-30: #7daffa;\n --mdh-blue-40: #4c91f8;\n --mdh-blue-50: #146ef6;\n --mdh-blue-55: #0c64eb;\n --mdh-blue-60: #0954c8;\n --mdh-blue-70: #063e98;\n --mdh-blue-80: #032a6a;\n --mdh-blue-90: #001a48;\n --mdh-blue-95: #001843;\n --mdh-blue-96: #00173f;\n --mdh-blue-97: #001438;\n --mdh-blue-98: #001232;\n --mdh-blue-99: #00102d;\n --border: 1px solid var(--ce-grey-10);\n --border-radius: 10px;\n --touch: 44px;\n --lg-padding: 20px;\n}\n\n.mdh-assistant-collapsed {\n position: fixed;\n bottom: 20px;\n right: 20px;\n width: var(--touch);\n height: var(--touch);\n background: var(--mdhui-color-primary);\n display: flex;\n box-shadow: var(--mdhui-box-shadow-1);\n border-radius: 200px;\n align-items: center;\n justify-content: center;\n color: #fff;\n cursor: pointer;\n}\n\n.mdh-assistant {\n position: fixed;\n bottom: 0;\n background-color: white;\n font-size: 14px;\n width: calc(100% - 1rem);\n border: var(--border);\n border-radius: 12px;\n overflow: hidden;\n margin: .5rem;\n z-index: 3;\n max-width: 800px;\n right: 0;\n box-shadow: var(--mdhui-box-shadow-1);\n}\n\n.mdh-assistant-header {\n display: flex;\n align-items: center;\n height: 44px;\n padding: 0 12px;\n justify-content: space-between;\n border-bottom: var(--border);\n font-weight: 600;\n color: var(--ce-grey-55);\n}\n\n.mdh-assistant-header .collapse-button {\n color: var(--mdhui-color-primary);\n cursor: pointer;\n}\n\n.mdh-assistant-header svg {\n padding-right: 0.5rem\n}\n\n.mdh-assistant #log {\n overflow-y: auto;\n overflow-x: hidden;\n height: 80vh;\n}\n\n/* typography */\n.mdh-assistant p,\n.mdh-assistant ul {\n margin: .25rem 0;\n word-break: break-word;\n line-height: 1.4;\n font-size: 15px;\n color: var(--ce-grey-80);\n}\n\n/* form elements */\n.mdh-assistant input,\n.mdh-assistant button {\n min-height: var(--touch);\n min-width: var(--touch);\n border: 0;\n border-radius: var(--border-radius);\n}\n\n.mdh-assistant input {\n flex: 1;\n min-height: calc(var(--touch) + 4px);\n min-width: calc(var(--touch) + 4px);\n padding: 5px 50px 5px 15px;\n font-size: 1rem;\n color: var(--ce-grey-80);\n}\n\n.mdh-assistant button {\n background: transparent;\n border: 2px solid transparent;\n cursor: pointer;\n color: var(--mdh-blue-55);\n position: absolute;\n right: 4px;\n}\n\n.mdh-assistant button:hover {\n background: var(--mdh-blue-5);\n border: 2px solid transparent;\n}\n\n.mdh-assistant .input-group {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n background: #fff;\n border-top: var(--border);\n}\n\n/* other */\n.mdh-assistant input {\n padding: 15px 35px 15px 15px;\n box-sizing: border-box;\n margin: 2px 3px;\n width: calc(100% - 6px);\n}\n\n.mdh-assistant .ai-message,\n.mdh-assistant .user-message,\n.mdh-assistant #loading {\n padding: 4px 8px 4px 20px;\n position: relative;\n border-bottom: 1px solid var(--ce-grey-5);\n}\n\n.mdh-assistant .user-message {\n background: var(--ce-grey-3);\n min-height: 27px;\n}\n\n.mdh-assistant .ai-message .svg-inline--fa,\n.mdh-assistant .user-message .svg-inline--fa,\n.mdh-assistant #loading .svg-inline--fa {\n color: var(--ce-grey-40);\n position: absolute;\n left: 6px;\n top: 10px;\n font-size: 9px;\n margin: .25rem 0;\n}\n\n.mdh-assistant #loading .svg-inline--fa {\n font-weight: 700;\n}\n\n.mdh-assistant input:focus-visible {\n outline: 1px solid var(--mdhui-color-primary);\n}\n");const gle={identifier:Yq(new Date),symptomLevel:"none",symptoms:[],impacts:[],triggers:[]},vle={"no symptoms":{logEntry:gle},"mild symptoms":{logEntry:Object.assign(Object.assign({},gle),{symptomLevel:"mild",symptoms:["Coughing"],impacts:["Wake up at night","Use your rescue inhaler"],triggers:["Cold/viral illness","Seasonal allergens/pollen","Smoke (tobacco or wood burning)","Air pollution","Dust mites","Mold"]})},"moderate symptoms":{logEntry:Object.assign(Object.assign({},gle),{symptomLevel:"moderate",symptoms:["Coughing"],triggers:["Cold/viral illness","Mold"]})},"severe symptoms":{logEntry:Object.assign(Object.assign({},gle),{symptomLevel:"severe",symptoms:["Coughing","Wheezing"],impacts:["Use your rescue inhaler"]})}};function yle(e){var n;let r=Un(uo(),{days:-1});if(fa(e.date,r))return b.dismiss(),null;const[a,i]=m(!0),[o,s]=m();cU((()=>{if(i(!0),"loading"===e.previewState)return;if(e.previewState)return s(vle[e.previewState].logEntry),void i(!1);let t=Un(new Date(e.date),{days:-1}),n=Un(new Date(e.date),{days:1});NU.loadLogEntries(t,n).then((t=>{let n=Yq(e.date),r=t.find((e=>e.identifier===n));r?s(r):b.dismiss(),i(!1)}))}),[],[e.previewState]);const l=e=>{(e=>{let t=Object.assign(Object.assign({},o),{symptomLevel:e});"none"===e&&(t.symptoms=[]),s(t)})(eH(e))},c=e=>{(e=>{let t=Object.assign(Object.assign({},o),{symptoms:e});e.length>0&&"none"===t.symptomLevel&&(t.symptomLevel="mild"),s(t)})(nH(e))},u=t.createElement(E,{className:"button",style:{left:"16px"},onClick:()=>{e.previewState||b.dismiss()}},"Cancel"),d=t.createElement(E,{className:"button",style:{color:"#fff",background:"#369cff",right:"16px",padding:"0 16px"},onClick:()=>{a||e.previewState||NU.saveLogEntry(o).then((()=>{b.dismiss()}))}},"Save");return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{title:ia(e.date,"PPP",{locale:Ps(b.getCurrentLanguage())}),navigationBarLeft:u,navigationBarRight:d,variant:"compressed",backgroundColor:"var(--mdhui-background-color-0)"}),a&&t.createElement(Dn,null),!a&&o&&t.createElement("div",null,t.createElement(Ms,{backgroundColor:"var(--mdhui-background-color-1)"},t.createElement(Lq,{title:az("asthma-log-entry-editor-view-symptom-level-title"),subtitle:az("asthma-log-entry-editor-view-select-one-subtitle"),values:[az("asthma-symptom-level-none"),az("asthma-symptom-level-mild"),az("asthma-symptom-level-moderate"),az("asthma-symptom-level-severe")],selectedValues:[Jq(o.symptomLevel)],preventEmptySelections:!0,onChange:e=>l(e[0])})),t.createElement(Ms,{backgroundColor:"var(--mdhui-background-color-1)"},t.createElement(Lq,{title:az("asthma-log-entry-editor-view-symptoms-title"),subtitle:az("asthma-log-entry-editor-view-select-all-subtitle"),values:[az("asthma-symptom-difficulty-breathing"),az("asthma-symptom-wheezing"),az("asthma-symptom-coughing"),az("asthma-symptom-chest-tightness")],selectedValues:tH(o.symptoms),variant:"checkboxes",multiSelect:!0,onChange:e=>c(e)})),t.createElement(Ms,{backgroundColor:"var(--mdhui-background-color-1)"},t.createElement(Lq,{title:az("asthma-log-entry-editor-view-impacts-title"),subtitle:az("asthma-log-entry-editor-view-select-all-subtitle"),values:[az("asthma-impact-waking-at-night"),az("asthma-impact-limit-daily-activity"),az("asthma-impact-using-rescue-inhaler")],selectedValues:rH(o.impacts),variant:"checkboxes",multiSelect:!0,onChange:e=>{return t=e,void s(Object.assign(Object.assign({},o),{impacts:aH(t)}));var t}})),t.createElement(Ms,{backgroundColor:"var(--mdhui-background-color-1)"},t.createElement(Lq,{title:az("asthma-log-entry-editor-view-triggers-title"),subtitle:az("asthma-log-entry-editor-view-select-all-subtitle"),values:[az("asthma-trigger-cold-illness"),az("asthma-trigger-animal-exposure"),az("asthma-trigger-seasonal-allergens"),az("asthma-trigger-smoke"),az("asthma-trigger-weather-changes"),az("asthma-trigger-air-pollution"),az("asthma-trigger-strong-smells"),az("asthma-trigger-chemicals"),az("asthma-trigger-dust"),az("asthma-trigger-mold"),az("asthma-trigger-dust-mites"),az("asthma-trigger-rodents"),az("asthma-trigger-cockroaches"),az("asthma-trigger-nsaid"),az("asthma-trigger-beta-blocker"),az("asthma-trigger-heartburn"),az("asthma-trigger-red-wine"),az("asthma-trigger-new-foods"),az("asthma-trigger-cooked-without-ventilation"),az("asthma-trigger-pet-in-bed"),az("asthma-trigger-incense-or-candle")],selectedValues:iH(o.triggers),variant:"checkboxes",multiSelect:!0,onChange:e=>{return t=e,void s(Object.assign(Object.assign({},o),{triggers:oH(t)}));var t}}))))}function ble(e){return t.createElement(Kt,{colorScheme:"light"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0},t.createElement(bz,{order:1},"Provider Report")),t.createElement(tV,{previewState:e.previewState,logEntrySurveyName:e.logEntrySurveyName}))}function wle(e){var n;const[r,a]=m();let i;return"default"===e.previewState&&(i=(e,t)=>HH(e,t,0,15)),cU((()=>{"default"!==e.previewState?NU.loadParticipant().then((e=>{a(e.getSleepDisturbancesBaseline())})):a(5)})),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",bodyBackgroundColor:"var(--mdhui-background-color-0)"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0,backgroundColor:"var(--mdhui-background-color-0)"},t.createElement(bz,{order:1},az("asthma-sleep-view-title"))),t.createElement(mG,{previewState:"default"===e.previewState?"loaded with data":void 0,previewDataProvider:i,title:az("asthma-sleep-view-chart-title"),dailyDataType:mU.SleepDisturbances,highlight:e=>!!r&&!hH(r,e),emptyDomain:[0,16]}),"SleepDisturbances"===e.alert&&t.createElement(RU,{previewState:e.previewState?"loaded":void 0,message:az("asthma-sleep-view-alert-message"),logEntrySurveyName:e.logEntrySurveyName}))}function xle(e){return t.createElement(Kt,{colorScheme:"light",className:"mdhui-step-container",bodyBackgroundColor:"#FFFFFF"},e.children)}function kle(e){return{textAlign:e.textAlign,color:e.color,fontSize:e.fontSize?`${e.fontSize}px`:void 0,fontWeight:e.fontWeight,backgroundImage:""}}A(".mdhui-step-container {\n background-color: #FFFFFF;\n}\n\n.mdhui-step-container div,\n.mdhui-step-container dl,\n.mdhui-step-container dt,\n.mdhui-step-container dd,\n.mdhui-step-container ul,\n.mdhui-step-container ol,\n.mdhui-step-container li,\n.mdhui-step-container h1,\n.mdhui-step-container h2,\n.mdhui-step-container h3,\n.mdhui-step-container h4,\n.mdhui-step-container h5,\n.mdhui-step-container h6,\n.mdhui-step-container pre,\n.mdhui-step-container form,\n.mdhui-step-container fieldset,\n.mdhui-step-container input,\n.mdhui-step-container textarea,\n.mdhui-step-container p,\n.mdhui-step-container blockquote,\n.mdhui-step-container th,\n.mdhui-step-container td {\n margin: 0;\n padding: 0;\n}\n\n.mdhui-step-container a {\n color: var(--mdhui-color-primary);\n text-decoration: none;\n}\n\n.mdhui-step-container ol {\n list-style-type: decimal;\n white-space: normal;\n list-style-position: inside;\n}\n\n.mdhui-step-container ul {\n list-style-type: disc;\n text-align: left;\n display: block;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding-inline-start: 40px;\n white-space: normal;\n}\n\n.mdhui-step-container ul ul {\n list-style-type: circle;\n}\n\n.mdhui-step-container ul ul ul {\n list-style-type: square;\n}");A(".mdhui-step-container .mdhui-step-title {\n text-align: center;\n font-size: 1.7em;\n line-height: 1.2em;\n font-weight: normal;\n margin-top: 20px;\n margin-bottom: 15px;\n margin-left: 20px;\n margin-right: 20px; \n position: relative;\n display: block;\n}");var Sle={},Ale={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},Ele=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,_le={},Cle={};function Ole(e,t,n){var r,a,i,o,s,l="";for("string"!=typeof t&&(n=t,t=Ole.defaultChars),void 0===n&&(n=!0),s=function(e){var t,n,r=Cle[e];if(r)return r;for(r=Cle[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t];return r}(t),r=0,a=e.length;r<a;r++)if(i=e.charCodeAt(r),n&&37===i&&r+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3)))l+=e.slice(r,r+3),r+=2;else if(i<128)l+=s[i];else if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&r+1<a&&(o=e.charCodeAt(r+1))>=56320&&o<=57343){l+=encodeURIComponent(e[r]+e[r+1]),r++;continue}l+="%EF%BF%BD"}else l+=encodeURIComponent(e[r]);return l}Ole.defaultChars=";/?:@&=+$,-_.!~*'()#",Ole.componentChars="-_.!~*'()";var Tle=Ole,Ple={};function Dle(e,t){var n;return"string"!=typeof t&&(t=Dle.defaultChars),n=function(e){var t,n,r=Ple[e];if(r)return r;for(r=Ple[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),r.push(n);for(t=0;t<e.length;t++)r[n=e.charCodeAt(t)]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return r}(t),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,r,a,i,o,s,l,c="";for(t=0,r=e.length;t<r;t+=3)(a=parseInt(e.slice(t+1,t+3),16))<128?c+=n[a]:192==(224&a)&&t+3<r&&128==(192&(i=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=a<<6&1984|63&i)<128?"��":String.fromCharCode(l),t+=3):224==(240&a)&&t+6<r&&(i=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),128==(192&i)&&128==(192&o))?(c+=(l=a<<12&61440|i<<6&4032|63&o)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&a)&&t+9<r&&(i=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&i)&&128==(192&o)&&128==(192&s))?((l=a<<18&1835008|i<<12&258048|o<<6&4032|63&s)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}Dle.defaultChars=";/?:@&=+$,#",Dle.componentChars="";var Nle=Dle;function Ile(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Mle=/^([a-z0-9.+-]+:)/i,jle=/:[0-9]*$/,Rle=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,zle=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Lle=["'"].concat(zle),Fle=["%","/","?",";","#"].concat(Lle),Ble=["/","?","#"],qle=/^[+a-z0-9A-Z_-]{0,63}$/,Hle=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ule={javascript:!0,"javascript:":!0},Vle={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};Ile.prototype.parse=function(e,t){var n,r,a,i,o,s=e;if(s=s.trim(),!t&&1===e.split("#").length){var l=Rle.exec(s);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var c=Mle.exec(s);if(c&&(a=(c=c[0]).toLowerCase(),this.protocol=c,s=s.substr(c.length)),(t||c||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(o="//"===s.substr(0,2))||c&&Ule[c]||(s=s.substr(2),this.slashes=!0)),!Ule[c]&&(o||c&&!Vle[c])){var u,d,h=-1;for(n=0;n<Ble.length;n++)-1!==(i=s.indexOf(Ble[n]))&&(-1===h||i<h)&&(h=i);for(-1!==(d=-1===h?s.lastIndexOf("@"):s.lastIndexOf("@",h))&&(u=s.slice(0,d),s=s.slice(d+1),this.auth=u),h=-1,n=0;n<Fle.length;n++)-1!==(i=s.indexOf(Fle[n]))&&(-1===h||i<h)&&(h=i);-1===h&&(h=s.length),":"===s[h-1]&&h--;var m=s.slice(0,h);s=s.slice(h),this.parseHost(m),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p){var f=this.hostname.split(/\./);for(n=0,r=f.length;n<r;n++){var g=f[n];if(g&&!g.match(qle)){for(var v="",y=0,b=g.length;y<b;y++)g.charCodeAt(y)>127?v+="x":v+=g[y];if(!v.match(qle)){var w=f.slice(0,n),x=f.slice(n+1),k=g.match(Hle);k&&(w.push(k[1]),x.unshift(k[2])),x.length&&(s=x.join(".")+s),this.hostname=w.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var S=s.indexOf("#");-1!==S&&(this.hash=s.substr(S),s=s.slice(0,S));var A=s.indexOf("?");return-1!==A&&(this.search=s.substr(A),s=s.slice(0,A)),s&&(this.pathname=s),Vle[a]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Ile.prototype.parseHost=function(e){var t=jle.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Wle=function(e,t){if(e&&e instanceof Ile)return e;var n=new Ile;return n.parse(e,t),n};_le.encode=Tle,_le.decode=Nle,_le.format=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""},_le.parse=Wle;var Gle,$le,Zle,Yle,Kle,Xle,Qle,Jle,ece,tce={};function nce(){return $le?Gle:($le=1,Gle=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/)}function rce(){return Yle?Zle:(Yle=1,Zle=/[\0-\x1F\x7F-\x9F]/)}function ace(){return Jle?Qle:(Jle=1,Qle=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/)}function ice(){return ece||(ece=1,tce.Any=nce(),tce.Cc=rce(),tce.Cf=Xle?Kle:(Xle=1,Kle=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),tce.P=Ele,tce.Z=ace()),tce}!function(e){var t=Object.prototype.hasOwnProperty;function n(e,n){return t.call(e,n)}function r(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var i=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,o=new RegExp(i.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),s=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,l=Ale;var c=/[&<>"]/,u=/[&<>"]/g,d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function h(e){return d[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var p=Ele;e.lib={},e.lib.mdurl=_le,e.lib.ucmicro=ice(),e.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},e.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},e.has=n,e.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(i,"$1")},e.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(o,(function(e,t,i){return t||function(e,t){var i=0;return n(l,t)?l[t]:35===t.charCodeAt(0)&&s.test(t)&&r(i="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(i):e}(e,i)}))},e.isValidEntityCode=r,e.fromCodePoint=a,e.escapeHtml=function(e){return c.test(e)?e.replace(u,h):e},e.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},e.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},e.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},e.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},e.isPunctChar=function(e){return p.test(e)},e.escapeRE=function(e){return e.replace(m,"\\$&")},e.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}}(Sle);var oce={},sce=Sle.unescapeAll,lce=Sle.unescapeAll;oce.parseLinkLabel=function(e,t,n){var r,a,i,o,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(i=e.src.charCodeAt(e.pos))&&0===--r){a=!0;break}if(o=e.pos,e.md.inline.skipToken(e),91===i)if(o===e.pos-1)r++;else if(n)return e.pos=c,-1}return a&&(s=e.pos),e.pos=c,s},oce.parseLinkDestination=function(e,t,n){var r,a,i=t,o={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(r=e.charCodeAt(t)))return o;if(60===r)return o;if(62===r)return o.pos=t+1,o.str=sce(e.slice(i+1,t)),o.ok=!0,o;92===r&&t+1<n?t+=2:t++}return o}for(a=0;t<n&&32!==(r=e.charCodeAt(t))&&!(r<32||127===r);)if(92===r&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===r&&++a>32)return o;if(41===r){if(0===a)break;a--}t++}return i===t||0!==a||(o.str=sce(e.slice(i,t)),o.lines=0,o.pos=t,o.ok=!0),o},oce.parseLinkTitle=function(e,t,n){var r,a,i=0,o=t,s={ok:!1,pos:0,lines:0,str:""};if(t>=n)return s;if(34!==(a=e.charCodeAt(t))&&39!==a&&40!==a)return s;for(t++,40===a&&(a=41);t<n;){if((r=e.charCodeAt(t))===a)return s.pos=t+1,s.lines=i,s.str=lce(e.slice(o+1,t)),s.ok=!0,s;if(40===r&&41===a)return s;10===r?i++:92===r&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return s};var cce=Sle.assign,uce=Sle.unescapeAll,dce=Sle.escapeHtml,hce={};function mce(){this.rules=cce({},hce)}hce.code_inline=function(e,t,n,r,a){var i=e[t];return"<code"+a.renderAttrs(i)+">"+dce(e[t].content)+"</code>"},hce.code_block=function(e,t,n,r,a){var i=e[t];return"<pre"+a.renderAttrs(i)+"><code>"+dce(e[t].content)+"</code></pre>\n"},hce.fence=function(e,t,n,r,a){var i,o,s,l,c,u=e[t],d=u.info?uce(u.info).trim():"",h="",m="";return d&&(h=(s=d.split(/(\s+)/g))[0],m=s.slice(2).join("")),0===(i=n.highlight&&n.highlight(u.content,h,m)||dce(u.content)).indexOf("<pre")?i+"\n":d?(o=u.attrIndex("class"),l=u.attrs?u.attrs.slice():[],o<0?l.push(["class",n.langPrefix+h]):(l[o]=l[o].slice(),l[o][1]+=" "+n.langPrefix+h),c={attrs:l},"<pre><code"+a.renderAttrs(c)+">"+i+"</code></pre>\n"):"<pre><code"+a.renderAttrs(u)+">"+i+"</code></pre>\n"},hce.image=function(e,t,n,r,a){var i=e[t];return i.attrs[i.attrIndex("alt")][1]=a.renderInlineAsText(i.children,n,r),a.renderToken(e,t,n)},hce.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},hce.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},hce.text=function(e,t){return dce(e[t].content)},hce.html_block=function(e,t){return e[t].content},hce.html_inline=function(e,t){return e[t].content},mce.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+dce(e.attrs[t][0])+'="'+dce(e.attrs[t][1])+'"';return r},mce.prototype.renderToken=function(e,t,n){var r,a="",i=!1,o=e[t];return o.hidden?"":(o.block&&-1!==o.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===o.nesting?"</":"<")+o.tag,a+=this.renderAttrs(o),0===o.nesting&&n.xhtmlOut&&(a+=" /"),o.block&&(i=!0,1===o.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===o.tag)&&(i=!1)),a+=i?">\n":">")},mce.prototype.renderInline=function(e,t,n){for(var r,a="",i=this.rules,o=0,s=e.length;o<s;o++)void 0!==i[r=e[o].type]?a+=i[r](e,o,t,n,this):a+=this.renderToken(e,o,t);return a},mce.prototype.renderInlineAsText=function(e,t,n){for(var r="",a=0,i=e.length;a<i;a++)"text"===e[a].type?r+=e[a].content:"image"===e[a].type?r+=this.renderInlineAsText(e[a].children,t,n):"softbreak"===e[a].type&&(r+="\n");return r},mce.prototype.render=function(e,t,n){var r,a,i,o="",s=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(i=e[r].type)?o+=this.renderInline(e[r].children,t,n):void 0!==s[i]?o+=s[e[r].type](e,r,t,n,this):o+=this.renderToken(e,r,t,n);return o};var pce=mce;function fce(){this.__rules__=[],this.__cache__=null}fce.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},fce.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},fce.prototype.at=function(e,t,n){var r=this.__find__(e),a=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=a.alt||[],this.__cache__=null},fce.prototype.before=function(e,t,n,r){var a=this.__find__(e),i=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},fce.prototype.after=function(e,t,n,r){var a=this.__find__(e),i=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},fce.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},fce.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},fce.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},fce.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},fce.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]};var gce=fce,vce=/\r\n?|\n/g,yce=/\0/g,bce=Sle.arrayReplaceAt;function wce(e){return/^<a[>\s]/i.test(e)}function xce(e){return/^<\/a\s*>/i.test(e)}var kce=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Sce=/\((c|tm|r)\)/i,Ace=/\((c|tm|r)\)/gi,Ece={c:"©",r:"®",tm:"™"};function _ce(e,t){return Ece[t.toLowerCase()]}function Cce(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||r||(n.content=n.content.replace(Ace,_ce)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function Oce(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||r||kce.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}var Tce=Sle.isWhiteSpace,Pce=Sle.isPunctChar,Dce=Sle.isMdAsciiPunct,Nce=/['"]/,Ice=/['"]/g;function Mce(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function jce(e,t){var n,r,a,i,o,s,l,c,u,d,h,m,p,f,g,v,y,b,w,x,k;for(w=[],n=0;n<e.length;n++){for(r=e[n],l=e[n].level,y=w.length-1;y>=0&&!(w[y].level<=l);y--);if(w.length=y+1,"text"===r.type){o=0,s=(a=r.content).length;e:for(;o<s&&(Ice.lastIndex=o,i=Ice.exec(a));){if(g=v=!0,o=i.index+1,b="'"===i[0],u=32,i.index-1>=0)u=a.charCodeAt(i.index-1);else for(y=n-1;y>=0&&("softbreak"!==e[y].type&&"hardbreak"!==e[y].type);y--)if(e[y].content){u=e[y].content.charCodeAt(e[y].content.length-1);break}if(d=32,o<s)d=a.charCodeAt(o);else for(y=n+1;y<e.length&&("softbreak"!==e[y].type&&"hardbreak"!==e[y].type);y++)if(e[y].content){d=e[y].content.charCodeAt(0);break}if(h=Dce(u)||Pce(String.fromCharCode(u)),m=Dce(d)||Pce(String.fromCharCode(d)),p=Tce(u),(f=Tce(d))?g=!1:m&&(p||h||(g=!1)),p?v=!1:h&&(f||m||(v=!1)),34===d&&'"'===i[0]&&u>=48&&u<=57&&(v=g=!1),g&&v&&(g=h,v=m),g||v){if(v)for(y=w.length-1;y>=0&&(c=w[y],!(w[y].level<l));y--)if(c.single===b&&w[y].level===l){c=w[y],b?(x=t.md.options.quotes[2],k=t.md.options.quotes[3]):(x=t.md.options.quotes[0],k=t.md.options.quotes[1]),r.content=Mce(r.content,i.index,k),e[c.token].content=Mce(e[c.token].content,c.pos,x),o+=k.length-1,c.token===n&&(o+=x.length-1),s=(a=r.content).length,w.length=y;continue e}g?w.push({token:n,pos:i.index,single:b,level:l}):v&&b&&(r.content=Mce(r.content,i.index,"’"))}else b&&(r.content=Mce(r.content,i.index,"’"))}}}}function Rce(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Rce.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n<r;n++)if(t[n][0]===e)return n;return-1},Rce.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},Rce.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},Rce.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},Rce.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t};var zce=Rce,Lce=zce;function Fce(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Fce.prototype.Token=Lce;var Bce=Fce,qce=gce,Hce=[["normalize",function(e){var t;t=(t=e.src.replace(vce,"\n")).replace(yce,"�"),e.src=t}],["block",function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){var t,n,r,a=e.tokens;for(n=0,r=a.length;n<r;n++)"inline"===(t=a[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}],["linkify",function(e){var t,n,r,a,i,o,s,l,c,u,d,h,m,p,f,g,v,y=e.tokens;if(e.md.options.linkify)for(n=0,r=y.length;n<r;n++)if("inline"===y[n].type&&e.md.linkify.pretest(y[n].content))for(m=0,t=(a=y[n].children).length-1;t>=0;t--)if("link_close"!==(o=a[t]).type){if("html_inline"===o.type&&(wce(o.content)&&m>0&&m--,xce(o.content)&&m++),!(m>0)&&"text"===o.type&&e.md.linkify.test(o.content)){for(c=o.content,v=e.md.linkify.match(c),s=[],h=o.level,d=0,v.length>0&&0===v[0].index&&t>0&&"text_special"===a[t-1].type&&(v=v.slice(1)),l=0;l<v.length;l++)p=v[l].url,f=e.md.normalizeLink(p),e.md.validateLink(f)&&(g=v[l].text,g=v[l].schema?"mailto:"!==v[l].schema||/^mailto:/i.test(g)?e.md.normalizeLinkText(g):e.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,""),(u=v[l].index)>d&&((i=new e.Token("text","",0)).content=c.slice(d,u),i.level=h,s.push(i)),(i=new e.Token("link_open","a",1)).attrs=[["href",f]],i.level=h++,i.markup="linkify",i.info="auto",s.push(i),(i=new e.Token("text","",0)).content=g,i.level=h,s.push(i),(i=new e.Token("link_close","a",-1)).level=--h,i.markup="linkify",i.info="auto",s.push(i),d=v[l].lastIndex);d<c.length&&((i=new e.Token("text","",0)).content=c.slice(d),i.level=h,s.push(i)),y[n].children=a=bce(a,t,s)}}else for(t--;a[t].level!==o.level&&"link_open"!==a[t].type;)t--}],["replacements",function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(Sce.test(e.tokens[t].content)&&Cce(e.tokens[t].children),kce.test(e.tokens[t].content)&&Oce(e.tokens[t].children))}],["smartquotes",function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&Nce.test(e.tokens[t].content)&&jce(e.tokens[t].children,e)}],["text_join",function(e){var t,n,r,a,i,o,s=e.tokens;for(t=0,n=s.length;t<n;t++)if("inline"===s[t].type){for(i=(r=s[t].children).length,a=0;a<i;a++)"text_special"===r[a].type&&(r[a].type="text");for(a=o=0;a<i;a++)"text"===r[a].type&&a+1<i&&"text"===r[a+1].type?r[a+1].content=r[a].content+r[a+1].content:(a!==o&&(r[o]=r[a]),o++);a!==o&&(r.length=o)}}]];function Uce(){this.ruler=new qce;for(var e=0;e<Hce.length;e++)this.ruler.push(Hce[e][0],Hce[e][1])}Uce.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},Uce.prototype.State=Bce;var Vce=Uce,Wce=Sle.isSpace;function Gce(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function $ce(e){var t,n=[],r=0,a=e.length,i=!1,o=0,s="";for(t=e.charCodeAt(r);r<a;)124===t&&(i?(s+=e.substring(o,r-1),o=r):(n.push(s+e.substring(o,r)),s="",o=r+1)),i=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(o)),n}var Zce=Sle.isSpace,Yce=Sle.isSpace,Kce=Sle.isSpace;function Xce(e,t){var n,r,a,i;return r=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],42!==(n=e.src.charCodeAt(r++))&&45!==n&&43!==n||r<a&&(i=e.src.charCodeAt(r),!Kce(i))?-1:r}function Qce(e,t){var n,r=e.bMarks[t]+e.tShift[t],a=r,i=e.eMarks[t];if(a+1>=i)return-1;if((n=e.src.charCodeAt(a++))<48||n>57)return-1;for(;;){if(a>=i)return-1;if(!((n=e.src.charCodeAt(a++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(a-r>=10)return-1}return a<i&&(n=e.src.charCodeAt(a),!Kce(n))?-1:a}var Jce=Sle.normalizeReference,eue=Sle.isSpace,tue={},nue="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",rue="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",aue=new RegExp("^(?:"+nue+"|"+rue+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),iue=new RegExp("^(?:"+nue+"|"+rue+")");tue.HTML_TAG_RE=aue,tue.HTML_OPEN_CLOSE_TAG_RE=iue;var oue=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],sue=tue.HTML_OPEN_CLOSE_TAG_RE,lue=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+oue.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(sue.source+"\\s*$"),/^$/,!1]],cue=Sle.isSpace,uue=zce,due=Sle.isSpace;function hue(e,t,n,r){var a,i,o,s,l,c,u,d;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",d=!1,o=s=c=u=0,l=(i=this.src).length;s<l;s++){if(a=i.charCodeAt(s),!d){if(due(a)){c++,9===a?u+=4-u%4:u++;continue}d=!0}10!==a&&s!==l-1||(10!==a&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(c),this.sCount.push(u),this.bsCount.push(0),d=!1,c=0,u=0,o=s+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}hue.prototype.push=function(e,t,n){var r=new uue(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},hue.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},hue.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},hue.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),due(t));e++);return e},hue.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!due(this.src.charCodeAt(--e)))return e+1;return e},hue.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},hue.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},hue.prototype.getLines=function(e,t,n,r){var a,i,o,s,l,c,u,d=e;if(e>=t)return"";for(c=new Array(t-e),a=0;d<t;d++,a++){for(i=0,u=s=this.bMarks[d],l=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];s<l&&i<n;){if(o=this.src.charCodeAt(s),due(o))9===o?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(s-u<this.tShift[d]))break;i++}s++}c[a]=i>n?new Array(i-n+1).join(" ")+this.src.slice(s,l):this.src.slice(s,l)}return c.join("")},hue.prototype.Token=uue;var mue=hue,pue=gce,fue=[["table",function(e,t,n,r){var a,i,o,s,l,c,u,d,h,m,p,f,g,v,y,b,w,x;if(t+2>n)return!1;if(c=t+1,e.sCount[c]<e.blkIndent)return!1;if(e.sCount[c]-e.blkIndent>=4)return!1;if((o=e.bMarks[c]+e.tShift[c])>=e.eMarks[c])return!1;if(124!==(w=e.src.charCodeAt(o++))&&45!==w&&58!==w)return!1;if(o>=e.eMarks[c])return!1;if(124!==(x=e.src.charCodeAt(o++))&&45!==x&&58!==x&&!Wce(x))return!1;if(45===w&&Wce(x))return!1;for(;o<e.eMarks[c];){if(124!==(a=e.src.charCodeAt(o))&&45!==a&&58!==a&&!Wce(a))return!1;o++}for(u=(i=Gce(e,t+1)).split("|"),m=[],s=0;s<u.length;s++){if(!(p=u[s].trim())){if(0===s||s===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(p))return!1;58===p.charCodeAt(p.length-1)?m.push(58===p.charCodeAt(0)?"center":"right"):58===p.charCodeAt(0)?m.push("left"):m.push("")}if(-1===(i=Gce(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((u=$ce(i)).length&&""===u[0]&&u.shift(),u.length&&""===u[u.length-1]&&u.pop(),0===(d=u.length)||d!==m.length)return!1;if(r)return!0;for(v=e.parentType,e.parentType="table",b=e.md.block.ruler.getRules("blockquote"),(h=e.push("table_open","table",1)).map=f=[t,0],(h=e.push("thead_open","thead",1)).map=[t,t+1],(h=e.push("tr_open","tr",1)).map=[t,t+1],s=0;s<u.length;s++)h=e.push("th_open","th",1),m[s]&&(h.attrs=[["style","text-align:"+m[s]]]),(h=e.push("inline","",0)).content=u[s].trim(),h.children=[],h=e.push("th_close","th",-1);for(h=e.push("tr_close","tr",-1),h=e.push("thead_close","thead",-1),c=t+2;c<n&&!(e.sCount[c]<e.blkIndent);c++){for(y=!1,s=0,l=b.length;s<l;s++)if(b[s](e,c,n,!0)){y=!0;break}if(y)break;if(!(i=Gce(e,c).trim()))break;if(e.sCount[c]-e.blkIndent>=4)break;for((u=$ce(i)).length&&""===u[0]&&u.shift(),u.length&&""===u[u.length-1]&&u.pop(),c===t+2&&((h=e.push("tbody_open","tbody",1)).map=g=[t+2,0]),(h=e.push("tr_open","tr",1)).map=[c,c+1],s=0;s<d;s++)h=e.push("td_open","td",1),m[s]&&(h.attrs=[["style","text-align:"+m[s]]]),(h=e.push("inline","",0)).content=u[s]?u[s].trim():"",h.children=[],h=e.push("td_close","td",-1);h=e.push("tr_close","tr",-1)}return g&&(h=e.push("tbody_close","tbody",-1),g[1]=c),h=e.push("table_close","table",-1),f[1]=c,e.parentType=v,e.line=c,!0},["paragraph","reference"]],["code",function(e,t,n){var r,a,i;if(e.sCount[t]-e.blkIndent<4)return!1;for(a=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;a=++r}return e.line=a,(i=e.push("code_block","code",0)).content=e.getLines(t,a,4+e.blkIndent,!1)+"\n",i.map=[t,e.line],!0}],["fence",function(e,t,n,r){var a,i,o,s,l,c,u,d=!1,h=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(h+3>m)return!1;if(126!==(a=e.src.charCodeAt(h))&&96!==a)return!1;if(l=h,(i=(h=e.skipChars(h,a))-l)<3)return!1;if(u=e.src.slice(l,h),o=e.src.slice(h,m),96===a&&o.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((h=l=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(h)===a&&!(e.sCount[s]-e.blkIndent>=4||(h=e.skipChars(h,a))-l<i||(h=e.skipSpaces(h))<m)){d=!0;break}return i=e.sCount[t],e.line=s+(d?1:0),(c=e.push("fence","code",0)).info=o,c.content=e.getLines(t+1,s,i,!0),c.markup=u,c.map=[t,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(e,t,n,r){var a,i,o,s,l,c,u,d,h,m,p,f,g,v,y,b,w,x,k,S,A=e.lineMax,E=e.bMarks[t]+e.tShift[t],_=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(E++))return!1;if(r)return!0;for(s=h=e.sCount[t]+1,32===e.src.charCodeAt(E)?(E++,s++,h++,a=!1,b=!0):9===e.src.charCodeAt(E)?(b=!0,(e.bsCount[t]+h)%4==3?(E++,s++,h++,a=!1):a=!0):b=!1,m=[e.bMarks[t]],e.bMarks[t]=E;E<_&&(i=e.src.charCodeAt(E),Zce(i));)9===i?h+=4-(h+e.bsCount[t]+(a?1:0))%4:h++,E++;for(p=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(b?1:0),c=E>=_,v=[e.sCount[t]],e.sCount[t]=h-s,y=[e.tShift[t]],e.tShift[t]=E-e.bMarks[t],x=e.md.block.ruler.getRules("blockquote"),g=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(S=e.sCount[d]<e.blkIndent,!((E=e.bMarks[d]+e.tShift[d])>=(_=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(E++)||S){if(c)break;for(w=!1,o=0,l=x.length;o<l;o++)if(x[o](e,d,n,!0)){w=!0;break}if(w){e.lineMax=d,0!==e.blkIndent&&(m.push(e.bMarks[d]),p.push(e.bsCount[d]),y.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}m.push(e.bMarks[d]),p.push(e.bsCount[d]),y.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]=-1}else{for(s=h=e.sCount[d]+1,32===e.src.charCodeAt(E)?(E++,s++,h++,a=!1,b=!0):9===e.src.charCodeAt(E)?(b=!0,(e.bsCount[d]+h)%4==3?(E++,s++,h++,a=!1):a=!0):b=!1,m.push(e.bMarks[d]),e.bMarks[d]=E;E<_&&(i=e.src.charCodeAt(E),Zce(i));)9===i?h+=4-(h+e.bsCount[d]+(a?1:0))%4:h++,E++;c=E>=_,p.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(b?1:0),v.push(e.sCount[d]),e.sCount[d]=h-s,y.push(e.tShift[d]),e.tShift[d]=E-e.bMarks[d]}for(f=e.blkIndent,e.blkIndent=0,(k=e.push("blockquote_open","blockquote",1)).markup=">",k.map=u=[t,0],e.md.block.tokenize(e,t,d),(k=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=A,e.parentType=g,u[1]=e.line,o=0;o<y.length;o++)e.bMarks[o+t]=m[o],e.tShift[o+t]=y[o],e.sCount[o+t]=v[o],e.bsCount[o+t]=p[o];return e.blkIndent=f,!0},["paragraph","reference","blockquote","list"]],["hr",function(e,t,n,r){var a,i,o,s,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(a=e.src.charCodeAt(l++))&&45!==a&&95!==a)return!1;for(i=1;l<c;){if((o=e.src.charCodeAt(l++))!==a&&!Yce(o))return!1;o===a&&i++}return!(i<3)&&(r||(e.line=t+1,(s=e.push("hr","hr",0)).map=[t,e.line],s.markup=Array(i+1).join(String.fromCharCode(a))),!0)},["paragraph","reference","blockquote","list"]],["list",function(e,t,n,r){var a,i,o,s,l,c,u,d,h,m,p,f,g,v,y,b,w,x,k,S,A,E,_,C,O,T,P,D,N=!1,I=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(N=!0),(_=Qce(e,t))>=0){if(u=!0,O=e.bMarks[t]+e.tShift[t],g=Number(e.src.slice(O,_-1)),N&&1!==g)return!1}else{if(!((_=Xce(e,t))>=0))return!1;u=!1}if(N&&e.skipSpaces(_)>=e.eMarks[t])return!1;if(f=e.src.charCodeAt(_-1),r)return!0;for(p=e.tokens.length,u?(D=e.push("ordered_list_open","ol",1),1!==g&&(D.attrs=[["start",g]])):D=e.push("bullet_list_open","ul",1),D.map=m=[t,0],D.markup=String.fromCharCode(f),y=t,C=!1,P=e.md.block.ruler.getRules("list"),x=e.parentType,e.parentType="list";y<n;){for(E=_,v=e.eMarks[y],c=b=e.sCount[y]+_-(e.bMarks[t]+e.tShift[t]);E<v;){if(9===(a=e.src.charCodeAt(E)))b+=4-(b+e.bsCount[y])%4;else{if(32!==a)break;b++}E++}if((l=(i=E)>=v?1:b-c)>4&&(l=1),s=c+l,(D=e.push("list_item_open","li",1)).markup=String.fromCharCode(f),D.map=d=[t,0],u&&(D.info=e.src.slice(O,_-1)),A=e.tight,S=e.tShift[t],k=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=s,e.tight=!0,e.tShift[t]=i-e.bMarks[t],e.sCount[t]=b,i>=v&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!C||(I=!1),C=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=S,e.sCount[t]=k,e.tight=A,(D=e.push("list_item_close","li",-1)).markup=String.fromCharCode(f),y=t=e.line,d[1]=y,i=e.bMarks[t],y>=n)break;if(e.sCount[y]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(T=!1,o=0,h=P.length;o<h;o++)if(P[o](e,y,n,!0)){T=!0;break}if(T)break;if(u){if((_=Qce(e,y))<0)break;O=e.bMarks[y]+e.tShift[y]}else if((_=Xce(e,y))<0)break;if(f!==e.src.charCodeAt(_-1))break}return(D=u?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(f),m[1]=y,e.line=y,e.parentType=x,I&&function(e,t){var n,r,a=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===a&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,p),!0},["paragraph","reference","blockquote"]],["reference",function(e,t,n,r){var a,i,o,s,l,c,u,d,h,m,p,f,g,v,y,b,w=0,x=e.bMarks[t]+e.tShift[t],k=e.eMarks[t],S=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(x))return!1;for(;++x<k;)if(93===e.src.charCodeAt(x)&&92!==e.src.charCodeAt(x-1)){if(x+1===k)return!1;if(58!==e.src.charCodeAt(x+1))return!1;break}for(s=e.lineMax,y=e.md.block.ruler.getRules("reference"),m=e.parentType,e.parentType="reference";S<s&&!e.isEmpty(S);S++)if(!(e.sCount[S]-e.blkIndent>3||e.sCount[S]<0)){for(v=!1,c=0,u=y.length;c<u;c++)if(y[c](e,S,s,!0)){v=!0;break}if(v)break}for(k=(g=e.getLines(t,S,e.blkIndent,!1).trim()).length,x=1;x<k;x++){if(91===(a=g.charCodeAt(x)))return!1;if(93===a){h=x;break}(10===a||92===a&&++x<k&&10===g.charCodeAt(x))&&w++}if(h<0||58!==g.charCodeAt(h+1))return!1;for(x=h+2;x<k;x++)if(10===(a=g.charCodeAt(x)))w++;else if(!eue(a))break;if(!(p=e.md.helpers.parseLinkDestination(g,x,k)).ok)return!1;if(l=e.md.normalizeLink(p.str),!e.md.validateLink(l))return!1;for(i=x=p.pos,o=w+=p.lines,f=x;x<k;x++)if(10===(a=g.charCodeAt(x)))w++;else if(!eue(a))break;for(p=e.md.helpers.parseLinkTitle(g,x,k),x<k&&f!==x&&p.ok?(b=p.str,x=p.pos,w+=p.lines):(b="",x=i,w=o);x<k&&(a=g.charCodeAt(x),eue(a));)x++;if(x<k&&10!==g.charCodeAt(x)&&b)for(b="",x=i,w=o;x<k&&(a=g.charCodeAt(x),eue(a));)x++;return!(x<k&&10!==g.charCodeAt(x))&&(!!(d=Jce(g.slice(1,h)))&&(r||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[d]&&(e.env.references[d]={title:b,href:l}),e.parentType=m,e.line=t+w+1),!0))}],["html_block",function(e,t,n,r){var a,i,o,s,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(s=e.src.slice(l,c),a=0;a<lue.length&&!lue[a][0].test(s);a++);if(a===lue.length)return!1;if(r)return lue[a][2];if(i=t+1,!lue[a][1].test(s))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(l=e.bMarks[i]+e.tShift[i],c=e.eMarks[i],s=e.src.slice(l,c),lue[a][1].test(s)){0!==s.length&&i++;break}return e.line=i,(o=e.push("html_block","",0)).map=[t,i],o.content=e.getLines(t,i,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,t,n,r){var a,i,o,s,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(a=e.src.charCodeAt(l))||l>=c)return!1;for(i=1,a=e.src.charCodeAt(++l);35===a&&l<c&&i<=6;)i++,a=e.src.charCodeAt(++l);return!(i>6||l<c&&!cue(a))&&(r||(c=e.skipSpacesBack(c,l),(o=e.skipCharsBack(c,35,l))>l&&cue(e.src.charCodeAt(o-1))&&(c=o),e.line=t+1,(s=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),s.map=[t,e.line],(s=e.push("inline","",0)).content=e.src.slice(l,c).trim(),s.map=[t,e.line],s.children=[],(s=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i)),!0)},["paragraph","reference","blockquote"]],["lheading",function(e,t,n){var r,a,i,o,s,l,c,u,d,h,m=t+1,p=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(h=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(d=e.src.charCodeAt(l))||61===d)&&(l=e.skipChars(l,d),(l=e.skipSpaces(l))>=c)){u=61===d?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,i=0,o=p.length;i<o;i++)if(p[i](e,m,n,!0)){a=!0;break}if(a)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(s=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(d),s.map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(d),e.parentType=h,!0)}],["paragraph",function(e,t){var n,r,a,i,o,s,l=t+1,c=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<u&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(r=!1,a=0,i=c.length;a<i;a++)if(c[a](e,l,u,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(o=e.push("paragraph_open","p",1)).map=[t,e.line],(o=e.push("inline","",0)).content=n,o.map=[t,e.line],o.children=[],o=e.push("paragraph_close","p",-1),e.parentType=s,!0}]];function gue(){this.ruler=new pue;for(var e=0;e<fue.length;e++)this.ruler.push(fue[e][0],fue[e][1],{alt:(fue[e][2]||[]).slice()})}gue.prototype.tokenize=function(e,t,n){for(var r,a=this.ruler.getRules(""),i=a.length,o=t,s=!1,l=e.md.options.maxNesting;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n))&&!(e.sCount[o]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<i&&!a[r](e,o,n,!1);r++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(o=e.line)<n&&e.isEmpty(o)&&(s=!0,o++,e.line=o)}},gue.prototype.parse=function(e,t,n,r){var a;e&&(a=new this.State(e,t,n,r),this.tokenize(a,a.line,a.lineMax))},gue.prototype.State=mue;var vue=gue;function yue(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}for(var bue=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,wue=Sle.isSpace,xue=Sle.isSpace,kue=[],Sue=0;Sue<256;Sue++)kue.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){kue[e.charCodeAt(0)]=1}));var Aue={};function Eue(e,t){var n,r,a,i,o,s=[],l=t.length;for(n=0;n<l;n++)126===(a=t[n]).marker&&-1!==a.end&&(i=t[a.end],(o=e.tokens[a.token]).type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",(o=e.tokens[i.token]).type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[i.token-1].type&&"~"===e.tokens[i.token-1].content&&s.push(i.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(o=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=o)}}Aue.tokenize=function(e,t){var n,r,a,i,o=e.pos,s=e.src.charCodeAt(o);if(t)return!1;if(126!==s)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,i=String.fromCharCode(s),a<2)return!1;for(a%2&&(e.push("text","",0).content=i,a--),n=0;n<a;n+=2)e.push("text","",0).content=i+i,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},Aue.postProcess=function(e){var t,n=e.tokens_meta,r=e.tokens_meta.length;for(Eue(e,e.delimiters),t=0;t<r;t++)n[t]&&n[t].delimiters&&Eue(e,n[t].delimiters)};var _ue={};function Cue(e,t){var n,r,a,i,o,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===a.token+1,o=String.fromCharCode(r.marker),(i=e.tokens[r.token]).type=s?"strong_open":"em_open",i.tag=s?"strong":"em",i.nesting=1,i.markup=s?o+o:o,i.content="",(i=e.tokens[a.token]).type=s?"strong_close":"em_close",i.tag=s?"strong":"em",i.nesting=-1,i.markup=s?o+o:o,i.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}_ue.tokenize=function(e,t){var n,r,a=e.pos,i=e.src.charCodeAt(a);if(t)return!1;if(95!==i&&42!==i)return!1;for(r=e.scanDelims(e.pos,42===i),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(i),e.delimiters.push({marker:i,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},_ue.postProcess=function(e){var t,n=e.tokens_meta,r=e.tokens_meta.length;for(Cue(e,e.delimiters),t=0;t<r;t++)n[t]&&n[t].delimiters&&Cue(e,n[t].delimiters)};var Oue=Sle.normalizeReference,Tue=Sle.isSpace,Pue=Sle.normalizeReference,Due=Sle.isSpace,Nue=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Iue=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,Mue=tue.HTML_TAG_RE;var jue=Ale,Rue=Sle.has,zue=Sle.isValidEntityCode,Lue=Sle.fromCodePoint,Fue=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Bue=/^&([a-z][a-z0-9]{1,31});/i;function que(e,t){var n,r,a,i,o,s,l,c,u={},d=t.length;if(d){var h=0,m=-2,p=[];for(n=0;n<d;n++)if(a=t[n],p.push(0),t[h].marker===a.marker&&m===a.token-1||(h=n),m=a.token,a.length=a.length||0,a.close){for(u.hasOwnProperty(a.marker)||(u[a.marker]=[-1,-1,-1,-1,-1,-1]),o=u[a.marker][(a.open?3:0)+a.length%3],s=r=h-p[h]-1;r>o;r-=p[r]+1)if((i=t[r]).marker===a.marker&&i.open&&i.end<0&&(l=!1,(i.close||a.open)&&(i.length+a.length)%3==0&&(i.length%3==0&&a.length%3==0||(l=!0)),!l)){c=r>0&&!t[r-1].open?p[r-1]+1:0,p[n]=n-r+c,p[r]=c,a.open=!1,i.end=n,i.close=!1,s=-1,m=-2;break}-1!==s&&(u[a.marker][(a.open?3:0)+(a.length||0)%3]=s)}}}var Hue=zce,Uue=Sle.isWhiteSpace,Vue=Sle.isPunctChar,Wue=Sle.isMdAsciiPunct;function Gue(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Gue.prototype.pushPending=function(){var e=new Hue("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Gue.prototype.push=function(e,t,n){this.pending&&this.pushPending();var r=new Hue(e,t,n),a=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],a={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(a),r},Gue.prototype.scanDelims=function(e,t){var n,r,a,i,o,s,l,c,u,d=e,h=!0,m=!0,p=this.posMax,f=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;d<p&&this.src.charCodeAt(d)===f;)d++;return a=d-e,r=d<p?this.src.charCodeAt(d):32,l=Wue(n)||Vue(String.fromCharCode(n)),u=Wue(r)||Vue(String.fromCharCode(r)),s=Uue(n),(c=Uue(r))?h=!1:u&&(s||l||(h=!1)),s?m=!1:l&&(c||u||(m=!1)),t?(i=h,o=m):(i=h&&(!m||l),o=m&&(!h||u)),{can_open:i,can_close:o,length:a}},Gue.prototype.Token=Hue;var $ue=Gue,Zue=gce,Yue=[["text",function(e,t){for(var n=e.pos;n<e.posMax&&!yue(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}],["linkify",function(e,t){var n,r,a,i,o,s,l;return!!e.md.options.linkify&&(!(e.linkLevel>0)&&(!((n=e.pos)+3>e.posMax)&&(58===e.src.charCodeAt(n)&&(47===e.src.charCodeAt(n+1)&&(47===e.src.charCodeAt(n+2)&&(!!(r=e.pending.match(bue))&&(a=r[1],!!(i=e.md.linkify.matchAtStart(e.src.slice(n-a.length)))&&(o=(o=i.url).replace(/\*+$/,""),s=e.md.normalizeLink(o),!!e.md.validateLink(s)&&(t||(e.pending=e.pending.slice(0,-a.length),(l=e.push("link_open","a",1)).attrs=[["href",s]],l.markup="linkify",l.info="auto",(l=e.push("text","",0)).content=e.md.normalizeLinkText(o),(l=e.push("link_close","a",-1)).markup="linkify",l.info="auto"),e.pos+=o.length-a.length,!0)))))))))}],["newline",function(e,t){var n,r,a,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;if(n=e.pending.length-1,r=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(a=n-1;a>=1&&32===e.pending.charCodeAt(a-1);)a--;e.pending=e.pending.slice(0,a),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(i++;i<r&&wue(e.src.charCodeAt(i));)i++;return e.pos=i,!0}],["escape",function(e,t){var n,r,a,i,o,s=e.pos,l=e.posMax;if(92!==e.src.charCodeAt(s))return!1;if(++s>=l)return!1;if(10===(n=e.src.charCodeAt(s))){for(t||e.push("hardbreak","br",0),s++;s<l&&(n=e.src.charCodeAt(s),xue(n));)s++;return e.pos=s,!0}return i=e.src[s],n>=55296&&n<=56319&&s+1<l&&(r=e.src.charCodeAt(s+1))>=56320&&r<=57343&&(i+=e.src[s+1],s++),a="\\"+i,t||(o=e.push("text_special","",0),n<256&&0!==kue[n]?o.content=i:o.content=a,o.markup=a,o.info="escape"),e.pos=s+1,!0}],["backticks",function(e,t){var n,r,a,i,o,s,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;if(l=(a=e.src.slice(n,u)).length,e.backticksScanned&&(e.backticks[l]||0)<=n)return t||(e.pending+=a),e.pos+=l,!0;for(o=s=u;-1!==(o=e.src.indexOf("`",s));){for(s=o+1;s<r&&96===e.src.charCodeAt(s);)s++;if((c=s-o)===l)return t||((i=e.push("code_inline","code",0)).markup=a,i.content=e.src.slice(u,o).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[c]=o}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=l,!0}],["strikethrough",Aue.tokenize],["emphasis",_ue.tokenize],["link",function(e,t){var n,r,a,i,o,s,l,c,u="",d="",h=e.pos,m=e.posMax,p=e.pos,f=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(o=e.pos+1,(i=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((s=i+1)<m&&40===e.src.charCodeAt(s)){for(f=!1,s++;s<m&&(r=e.src.charCodeAt(s),Tue(r)||10===r);s++);if(s>=m)return!1;if(p=s,(l=e.md.helpers.parseLinkDestination(e.src,s,e.posMax)).ok){for(u=e.md.normalizeLink(l.str),e.md.validateLink(u)?s=l.pos:u="",p=s;s<m&&(r=e.src.charCodeAt(s),Tue(r)||10===r);s++);if(l=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<m&&p!==s&&l.ok)for(d=l.str,s=l.pos;s<m&&(r=e.src.charCodeAt(s),Tue(r)||10===r);s++);}(s>=m||41!==e.src.charCodeAt(s))&&(f=!0),s++}if(f){if(void 0===e.env.references)return!1;if(s<m&&91===e.src.charCodeAt(s)?(p=s+1,(s=e.md.helpers.parseLinkLabel(e,s))>=0?a=e.src.slice(p,s++):s=i+1):s=i+1,a||(a=e.src.slice(o,i)),!(c=e.env.references[Oue(a)]))return e.pos=h,!1;u=c.href,d=c.title}return t||(e.pos=o,e.posMax=i,e.push("link_open","a",1).attrs=n=[["href",u]],d&&n.push(["title",d]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)),e.pos=s,e.posMax=m,!0}],["image",function(e,t){var n,r,a,i,o,s,l,c,u,d,h,m,p,f="",g=e.pos,v=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(s=e.pos+2,(o=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((l=o+1)<v&&40===e.src.charCodeAt(l)){for(l++;l<v&&(r=e.src.charCodeAt(l),Due(r)||10===r);l++);if(l>=v)return!1;for(p=l,(u=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok&&(f=e.md.normalizeLink(u.str),e.md.validateLink(f)?l=u.pos:f=""),p=l;l<v&&(r=e.src.charCodeAt(l),Due(r)||10===r);l++);if(u=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<v&&p!==l&&u.ok)for(d=u.str,l=u.pos;l<v&&(r=e.src.charCodeAt(l),Due(r)||10===r);l++);else d="";if(l>=v||41!==e.src.charCodeAt(l))return e.pos=g,!1;l++}else{if(void 0===e.env.references)return!1;if(l<v&&91===e.src.charCodeAt(l)?(p=l+1,(l=e.md.helpers.parseLinkLabel(e,l))>=0?i=e.src.slice(p,l++):l=o+1):l=o+1,i||(i=e.src.slice(s,o)),!(c=e.env.references[Pue(i)]))return e.pos=g,!1;f=c.href,d=c.title}return t||(a=e.src.slice(s,o),e.md.inline.parse(a,e.md,e.env,m=[]),(h=e.push("image","img",0)).attrs=n=[["src",f],["alt",""]],h.children=m,h.content=a,d&&n.push(["title",d])),e.pos=l,e.posMax=v,!0}],["autolink",function(e,t){var n,r,a,i,o,s,l=e.pos;if(60!==e.src.charCodeAt(l))return!1;for(o=e.pos,s=e.posMax;;){if(++l>=s)return!1;if(60===(i=e.src.charCodeAt(l)))return!1;if(62===i)break}return n=e.src.slice(o+1,l),Iue.test(n)?(r=e.md.normalizeLink(n),!!e.md.validateLink(r)&&(t||((a=e.push("link_open","a",1)).attrs=[["href",r]],a.markup="autolink",a.info="auto",(a=e.push("text","",0)).content=e.md.normalizeLinkText(n),(a=e.push("link_close","a",-1)).markup="autolink",a.info="auto"),e.pos+=n.length+2,!0)):!!Nue.test(n)&&(r=e.md.normalizeLink("mailto:"+n),!!e.md.validateLink(r)&&(t||((a=e.push("link_open","a",1)).attrs=[["href",r]],a.markup="autolink",a.info="auto",(a=e.push("text","",0)).content=e.md.normalizeLinkText(n),(a=e.push("link_close","a",-1)).markup="autolink",a.info="auto"),e.pos+=n.length+2,!0))}],["html_inline",function(e,t){var n,r,a,i,o=e.pos;return!!e.md.options.html&&(a=e.posMax,!(60!==e.src.charCodeAt(o)||o+2>=a)&&(!(33!==(n=e.src.charCodeAt(o+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(r=e.src.slice(o).match(Mue))&&(t||((i=e.push("html_inline","",0)).content=e.src.slice(o,o+r[0].length),function(e){return/^<a[>\s]/i.test(e)}(i.content)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(i.content)&&e.linkLevel--),e.pos+=r[0].length,!0))))}],["entity",function(e,t){var n,r,a,i=e.pos,o=e.posMax;if(38!==e.src.charCodeAt(i))return!1;if(i+1>=o)return!1;if(35===e.src.charCodeAt(i+1)){if(r=e.src.slice(i).match(Fue))return t||(n="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),(a=e.push("text_special","",0)).content=zue(n)?Lue(n):Lue(65533),a.markup=r[0],a.info="entity"),e.pos+=r[0].length,!0}else if((r=e.src.slice(i).match(Bue))&&Rue(jue,r[1]))return t||((a=e.push("text_special","",0)).content=jue[r[1]],a.markup=r[0],a.info="entity"),e.pos+=r[0].length,!0;return!1}]],Kue=[["balance_pairs",function(e){var t,n=e.tokens_meta,r=e.tokens_meta.length;for(que(0,e.delimiters),t=0;t<r;t++)n[t]&&n[t].delimiters&&que(0,n[t].delimiters)}],["strikethrough",Aue.postProcess],["emphasis",_ue.postProcess],["fragments_join",function(e){var t,n,r=0,a=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)a[t].nesting<0&&r--,a[t].level=r,a[t].nesting>0&&r++,"text"===a[t].type&&t+1<i&&"text"===a[t+1].type?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}]];function Xue(){var e;for(this.ruler=new Zue,e=0;e<Yue.length;e++)this.ruler.push(Yue[e][0],Yue[e][1]);for(this.ruler2=new Zue,e=0;e<Kue.length;e++)this.ruler2.push(Kue[e][0],Kue[e][1])}Xue.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),i=a.length,o=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<o)for(n=0;n<i&&(e.level++,t=a[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},Xue.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),a=r.length,i=e.posMax,o=e.md.options.maxNesting;e.pos<i;){if(e.level<o)for(n=0;n<a&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=i)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Xue.prototype.parse=function(e,t,n,r){var a,i,o,s=new this.State(e,t,n,r);for(this.tokenize(s),o=(i=this.ruler2.getRules("")).length,a=0;a<o;a++)i[a](s)},Xue.prototype.State=$ue;var Que,Jue,ede=Xue;function tde(){return Jue?Que:(Jue=1,Que=function(e){var t={};e=e||{},t.src_Any=nce().source,t.src_Cc=rce().source,t.src_Z=ace().source,t.src_P=Ele.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var n="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t})}function nde(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function rde(e){return Object.prototype.toString.call(e)}function ade(e){return"[object Function]"===rde(e)}function ide(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var ode={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var sde={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},lde="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",cde="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function ude(e){var t=e.re=tde()(e.__opts__),n=e.__tlds__.slice();function r(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push(lde),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");var a=[];function i(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,function(e){return"[object Object]"===rde(e)}(n))return!function(e){return"[object RegExp]"===rde(e)}(n.validate)?ade(n.validate)?r.validate=n.validate:i(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(ade(n.normalize)?r.normalize=n.normalize:n.normalize?i(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===rde(e)}(n)?i(t,n):a.push(t)}})),a.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var o=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(ide).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function dde(e,t){var n=e.__index__,r=e.__last_index__,a=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=a,this.text=a,this.url=a}function hde(e,t){var n=new dde(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function mde(e,t){if(!(this instanceof mde))return new mde(e,t);t||function(e){return Object.keys(e||{}).reduce((function(e,t){return e||ode.hasOwnProperty(t)}),!1)}(e)&&(t=e,e={}),this.__opts__=nde({},ode,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=nde({},sde,e),this.__compiled__={},this.__tlds__=cde,this.__tlds_replaced__=!1,this.re={},ude(this)}mde.prototype.add=function(e,t){return this.__schemas__[e]=t,ude(this),this},mde.prototype.set=function(e){return this.__opts__=nde(this.__opts__,e),this},mde.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,a,i,o,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(a=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,o=r.index+r[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=o)),this.__index__>=0},mde.prototype.pretest=function(e){return this.re.pretest.test(e)},mde.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},mde.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(hde(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(hde(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},mde.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var t=this.re.schema_at_start.exec(e);if(!t)return null;var n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,hde(this,0)):null},mde.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),ude(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,ude(this),this)},mde.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},mde.prototype.onCompile=function(){};var pde=Sle,fde=oce,gde=pce,vde=Vce,yde=vue,bde=ede,wde=mde,xde=_le,kde=S,Sde={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Ade=/^(vbscript|javascript|file|data):/,Ede=/^data:image\/(gif|png|jpeg|webp);/;function _de(e){var t=e.trim().toLowerCase();return!Ade.test(t)||!!Ede.test(t)}var Cde=["http:","https:","mailto:"];function Ode(e){var t=xde.parse(e,!0);if(t.hostname&&(!t.protocol||Cde.indexOf(t.protocol)>=0))try{t.hostname=kde.toASCII(t.hostname)}catch(e){}return xde.encode(xde.format(t))}function Tde(e){var t=xde.parse(e,!0);if(t.hostname&&(!t.protocol||Cde.indexOf(t.protocol)>=0))try{t.hostname=kde.toUnicode(t.hostname)}catch(e){}return xde.decode(xde.format(t),xde.decode.defaultChars+"%")}function Pde(e,t){if(!(this instanceof Pde))return new Pde(e,t);t||pde.isString(e)||(t=e||{},e="default"),this.inline=new bde,this.block=new yde,this.core=new vde,this.renderer=new gde,this.linkify=new wde,this.validateLink=_de,this.normalizeLink=Ode,this.normalizeLinkText=Tde,this.utils=pde,this.helpers=pde.assign({},fde),this.options={},this.configure(e),t&&this.set(t)}Pde.prototype.set=function(e){return pde.assign(this.options,e),this},Pde.prototype.configure=function(e){var t,n=this;if(pde.isString(e)&&!(e=Sde[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},Pde.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},Pde.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},Pde.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Pde.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Pde.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Pde.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Pde.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Dde=C(Pde);function Nde(e){var n,r;let a,i=new Dde;a=e.inline?i.renderInline(null!==(n=e.text)&&void 0!==n?n:""):i.render(null!==(r=e.text)&&void 0!==r?r:""),a=null==a?void 0:a.trim();let o=aK(a,{replace:e=>{let t=e;"a"===t.name&&(t.attribs.target="_blank")}});return t.createElement(t.Fragment,null,o)}function Ide(e){return e.text?t.createElement("div",{className:"mdhui-step-title",style:kle(e)},t.createElement(Nde,{text:e.text,inline:!0})):null}function Mde(e){return e.text?t.createElement("div",{className:"mdhui-step-text",style:kle(e)},t.createElement(Nde,{text:e.text})):null}A(".mdhui-step-container .mdhui-step-text {\n font-size: 1em;\n line-height: 1.3em;\n text-align: center;\n margin-top: 15px;\n margin-bottom: 15px;\n margin-left: 20px;\n margin-right: 20px; \n white-space: pre-line;\n}");function jde(e){return e.text?t.createElement("div",{className:"mdhui-step-detail-text",style:kle(e)},t.createElement(Nde,{text:e.text})):null}A(".mdhui-step-container .mdhui-step-detail-text {\n font-size: 1em;\n line-height: 1.3em;\n text-align: center;\n margin-top: 15px;\n margin-bottom: 15px;\n margin-left: 20px;\n margin-right: 20px;\n white-space: pre-line;\n}");function Rde(e){const n=kle(e);if(e.gradient){var r="LeftToRight"===e.gradient.direction?`linear-gradient(to right, ${e.gradient.startColor} 0%, ${e.gradient.endColor} 100%)`:`linear-gradient(to bottom, ${e.gradient.startColor} 0%, ${e.gradient.endColor} 100%)`;n.backgroundImage=r}n.letterSpacing=e.letterSpacing,n.textTransform=e.textTransform,n.backgroundColor=e.backgroundColor;var a=e.text?e.text:az("next-button-text");return t.createElement("button",{className:"mdhui-step-next-button",style:n,disabled:e.disabled,onClick:e.onClick},a)}A(".mdhui-step-container .mdhui-step-next-button {\n margin: 20px;\n padding: 16px;\n background: var(--mdhui-color-primary);\n font-size: 1em;\n color: #FFF;\n font-weight: bold;\n border: solid 1px var(--mdhui-color-primary);\n border-radius: 5px;\n cursor: pointer;\n width: calc(100% - 40px);\n box-sizing: border-box;\n text-align: center;\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.mdhui-step-container .mdhui-step-next-button:disabled,\n.mdhui-step-container .mdhui-step-next-button[disabled] {\n opacity: 0.65;\n cursor: not-allowed;\n}");var zde=150,Lde=2,Fde=["DodgerBlue","OliveDrab","Gold","Pink","SlateBlue","LightBlue","Violet","PaleGreen","SteelBlue","SandyBrown","Chocolate","Crimson"],Bde=!1,qde=null,Hde=[],Ude=0;function Vde(e,t,n){return e.color=Fde[Math.random()*Fde.length|0],e.x=Math.random()*t,e.y=Math.random()*n-n,e.diameter=10*Math.random()+5,e.tilt=10*Math.random()-10,e.tiltAngleIncrement=.07*Math.random()+.05,e.tiltAngle=0,e}function Wde(){var e=window.innerWidth,t=window.innerHeight,n=window.requestAnimationFrame||function(e){return window.setTimeout(e,16.6666667)},r=document.getElementById("confetti-canvas");null===r&&((r=document.createElement("canvas")).setAttribute("id","confetti-canvas"),r.setAttribute("style","display:block;z-index:999999;pointer-events:none;position:fixed;top:0"),document.body.prepend(r),r.width=e,r.height=t,window.addEventListener("resize",(function(){r.width=window.innerWidth,r.height=window.innerHeight}),!0));for(var a=r.getContext("2d");Hde.length<zde;)Hde.push(Vde({color:"",x:0,y:0,diameter:0,tilt:0,tiltAngleIncrement:0,tiltAngle:0},e,t));Bde=!0,null===qde&&function e(){null==a||a.clearRect(0,0,window.innerWidth,window.innerHeight),0===Hde.length?qde=null:(!function(){var e,t=window.innerWidth,n=window.innerHeight;Ude+=.01;for(var r=0;r<Hde.length;r++)e=Hde[r],!Bde&&e.y<-15?e.y=n+100:(e.tiltAngle+=e.tiltAngleIncrement,e.x+=Math.sin(Ude),e.y+=.5*(Math.cos(Ude)+e.diameter+Lde),e.tilt=15*Math.sin(e.tiltAngle)),(e.x>t+20||e.x<-20||e.y>n)&&(Bde&&Hde.length<=zde?Vde(e,t,n):(Hde.splice(r,1),r--))}(),function(e){if(e)for(var t,n,r=0;r<Hde.length;r++)t=Hde[r],e.beginPath(),e.lineWidth=t.diameter,e.strokeStyle=t.color,n=t.x+t.tilt,e.moveTo(n+t.diameter/2,t.y),e.lineTo(n,t.y+t.tilt+t.diameter/2),e.stroke()}(a),qde=n(e))}()}function Gde(e){return e.srcUrl?t.createElement("div",{className:"mdhui-step-image-icon"},t.createElement("img",{src:e.srcUrl})):null}A(".mdhui-step-container .mdhui-step-image-icon {\n text-align: center;\n}\n\n.mdhui-step-container .mdhui-step-image-icon img {\n max-width: 100%;\n max-height: 60px;\n padding: 0;\n margin: 0;\n padding-top: 50px;\n}");function $de(e){return e.srcUrl?t.createElement("div",{className:"mdhui-step-image"},t.createElement("img",{src:e.srcUrl})):null}function Zde(e){var n;function r(){0!==window.innerWidth&&0!==window.innerHeight?(Wde(),window.setTimeout((function(){Bde=!1}),1200)):window.setTimeout(r,50)}return f((()=>{r()}),[]),t.createElement(xle,null,t.createElement(Gde,{srcUrl:e.iconUrl}),t.createElement(Ide,{text:e.title,textAlign:e.styles.titleAlignment,color:e.styles.titleColor,fontSize:e.styles.titleFontSize,fontWeight:e.styles.titleFontWeight}),t.createElement(Mde,{text:e.text,textAlign:e.styles.textAlignment,color:e.styles.textColor,fontSize:e.styles.textFontSize,fontWeight:e.styles.textFontWeight}),t.createElement(jde,{text:e.detailText,textAlign:e.styles.textAlignment,color:e.styles.textColor,fontSize:e.styles.textFontSize,fontWeight:e.styles.textFontWeight}),t.createElement($de,{srcUrl:e.imageUrl}),t.createElement(Rde,{text:e.nextButtonText,color:e.styles.nextButtonTextColor,fontWeight:e.styles.nextButtonFontWeight,backgroundColor:e.styles.nextButtonBackgroundColor,letterSpacing:e.styles.nextButtonLetterSpacing,textTransform:null===(n=e.styles.nextButtonTextTransform)||void 0===n?void 0:n.toLowerCase(),gradient:e.styles.nextButtonBackgroundGradient,onClick:()=>b.completeStep("")}))}function Yde(){const[e,n]=m(),[r,a]=m(),[i,o]=m(),[s,l]=m(),[c,u]=m(),[d,h]=m(),[p,g]=m({});return f((()=>{b.getStepConfiguration().then((function(e){var t;e&&(n(e.properties.title),a(e.properties.text),o(e.properties.detailText),l(e.properties.iconImage),u(e.properties.image),h(e.properties.nextButtonText),g(null!==(t=e.styles)&&void 0!==t?t:{}))}))}),[]),t.createElement(Zde,{title:e,text:r,detailText:i,iconUrl:s,imageUrl:c,nextButtonText:d,styles:p})}function Kde(e){var n;const r=`Connect to ${e.deviceType}`;return t.createElement(xle,null,t.createElement(Ide,{text:e.title,textAlign:e.styles.titleAlignment,color:e.styles.titleColor,fontSize:e.styles.titleFontSize,fontWeight:e.styles.titleFontWeight}),t.createElement(Mde,{text:e.text,textAlign:e.styles.textAlignment,color:e.styles.textColor,fontSize:e.styles.textFontSize,fontWeight:e.styles.textFontWeight}),t.createElement(Rde,{text:r,color:e.styles.nextButtonTextColor,fontWeight:e.styles.nextButtonFontWeight,backgroundColor:e.styles.nextButtonBackgroundColor,letterSpacing:e.styles.nextButtonLetterSpacing,textTransform:null===(n=e.styles.nextButtonTextTransform)||void 0===n?void 0:n.toLowerCase(),gradient:e.styles.nextButtonBackgroundGradient,onClick:e.onConnect}))}function Xde(e){const[n,r]=m(),[a,i]=m(),[o,s]=m({}),[l,c]=m(e.deviceType),[u,d]=m(!0);function h(e){switch(e){case"Fitbit":return pV();case"Omron":return gV();case"Garmin":return fV()}}function p(e){return Wq(this,void 0,void 0,(function*(){try{const t=yield b.getExternalAccounts(),n=h(e);t.some((e=>e.provider.id===n))&&b.completeStep(n)}finally{d(!1)}}))}return f((()=>{b.getStepConfiguration().then((function(e){var t;if(e){if(r(e.properties.title),i(e.properties.text),!e.properties.deviceType)throw new Error("deviceType is required");c(e.properties.deviceType),s(null!==(t=e.styles)&&void 0!==t?t:{}),p(e.properties.deviceType)}else p(l)}))}),[]),u?t.createElement(t.Fragment,null):t.createElement(Kde,{title:n,text:a,deviceType:l,providerID:h(l),styles:o,onConnect:function(){const e=h(l);b.connectExternalAccount(e,{openNewWindow:!0}).then((function(){b.completeStep(e)}))}})}function Qde(e){var n;return t.createElement(xle,null,t.createElement(Ide,{text:e.title,textAlign:e.styles.titleAlignment,color:e.styles.titleColor,fontSize:e.styles.titleFontSize,fontWeight:e.styles.titleFontWeight}),t.createElement(Mde,{text:e.text,textAlign:e.styles.textAlignment,color:e.styles.textColor,fontSize:e.styles.textFontSize,fontWeight:e.styles.textFontWeight}),t.createElement(hG,{previewState:e.previewState,providerCategories:["Provider","Health Plan"],onProviderConnected:e.onProviderConnected}),t.createElement(Rde,{text:e.nextButtonText,disabled:e.nextButtonDisabled,color:e.styles.nextButtonTextColor,fontWeight:e.styles.nextButtonFontWeight,backgroundColor:e.styles.nextButtonBackgroundColor,letterSpacing:e.styles.nextButtonLetterSpacing,textTransform:null===(n=e.styles.nextButtonTextTransform)||void 0===n?void 0:n.toLowerCase(),gradient:e.styles.nextButtonBackgroundGradient,onClick:e.onNextButtonClick}))}function Jde(){const[e,n]=m(),[r,a]=m(),[i,o]=m(),[s,l]=m(),[c,u]=m(!0),[d,h]=m({}),[p,g]=m([]);return f((()=>{b.getStepConfiguration().then((function(e){var t;e&&(n(e.properties.title),a(e.properties.text),l(e.properties.nextButtonText),h(null!==(t=e.styles)&&void 0!==t?t:{}))})),b.getSurveyContext().then((function(e){e&&o(e)}))}),[]),t.createElement(Qde,{title:e,text:r,nextButtonText:s,nextButtonDisabled:c,styles:d,onProviderConnected:function(e){g((t=>[...t,e.id])),u(!1)},previewState:"Design"===(null==i?void 0:i.surveyMode)?"Default":void 0,onNextButtonClick:()=>b.completeStep(p.toString())})}function ehe(e){var n;let r=(e.height?e.height:"225")+"px",a=b.getCurrentLanguage();return t.createElement(xle,null,t.createElement(Ide,{text:e.title,textAlign:e.styles.titleAlignment,color:e.styles.titleColor,fontSize:e.styles.titleFontSize,fontWeight:e.styles.titleFontWeight}),t.createElement(Mde,{text:e.text,textAlign:e.styles.textAlignment,color:e.styles.textColor,fontSize:e.styles.textFontSize,fontWeight:e.styles.textFontWeight}),t.createElement("div",{style:{textAlign:"center",width:"100%"}},t.createElement("iframe",{style:{width:"100%",height:r,border:0},src:`https://www.youtube.com/embed/${e.videoId}?rel=0&cc_lang_pref=${a}&controls=1&autoplay=0&fs=1&modestbranding=1`,title:"YouTube video player",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",allowFullScreen:!0})),t.createElement(jde,{text:e.transcript,textAlign:e.styles.detailTextAlignment,color:e.styles.detailTextColor,fontSize:e.styles.detailTextFontSize,fontWeight:e.styles.detailTextFontWeight}),t.createElement(Rde,{text:e.nextButtonText,color:e.styles.nextButtonTextColor,fontWeight:e.styles.nextButtonFontWeight,backgroundColor:e.styles.nextButtonBackgroundColor,letterSpacing:e.styles.nextButtonLetterSpacing,textTransform:null===(n=e.styles.nextButtonTextTransform)||void 0===n?void 0:n.toLowerCase(),gradient:e.styles.nextButtonBackgroundGradient,onClick:()=>b.completeStep("")}))}function the(){const[e,n]=m(),[r,a]=m(),[i,o]=m(),[s,l]=m(""),[c,u]=m(),[d,h]=m(),[p,g]=m({});return f((()=>{b.getStepConfiguration().then((function(e){var t;e&&(n(e.properties.title),a(e.properties.text),o(e.properties.transcript),l(e.properties.videoId),u(e.properties.nextButtonText),h(e.properties.height),g(null!==(t=e.styles)&&void 0!==t?t:{}))}))}),[]),t.createElement(ehe,{title:e,text:r,transcript:i,nextButtonText:c,height:d,videoId:s,styles:p})}A(".mdhui-step-container .mdhui-step-image {\n text-align: center;\n}\n.mdhui-step-container .mdhui-step-image img {\n width: 100%;\n padding: 0;\n margin: 0;\n padding-top: 40px;\n padding-bottom: 40px;\n}");function nhe(e){var t,n;(null===(t=e.customFields.Symptoms)||void 0===t?void 0:t.length)||(e.customFields.Symptoms="[]"),(null===(n=e.customFields.Treatments)||void 0===n?void 0:n.length)||(e.customFields.Treatments="[]");var r=[];try{r=JSON.parse(e.customFields.Symptoms)}catch(t){r=JSON.parse(e.customFields.Symptoms.replace(/\\/g,""))}r.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0)),r.forEach((e=>{e.severityTracking||(e.severityTracking="None")}));var a=[];try{a=JSON.parse(e.customFields.Treatments)}catch(t){a=JSON.parse(e.customFields.Treatments.replace(/\\/g,""))}return a.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0)),{participantID:e.participantID,symptoms:r,treatments:a}}A(".ss-symptom-matrix {\n background: var(--mdhui-background-color-0);\n /* Default color for PDF Rendering, since evopdf does not support CSS variables */\n border-top: solid 1px #ddd;\n border-top: solid 1px var(--mdhui-border-color-1);\n}");var rhe={getConfiguration:function(){return b.getParticipantInfo().then((function(e){return nhe(e)}))},getDailyLogEntries:function(e,t){var n={},r=function(a){var i={namespace:"Project",type:"DailyLogEntry",pageID:a};return e&&(i.observedAfter=e),t&&(i.observedBefore=t),b.queryDeviceData(i).then((function(e){for(var t=e.deviceDataPoints,a=0;a<t.length;a++){var i=JSON.parse(t[a].value),o=t[a].observationDate;o&&(n[o.substring(0,10)]=ahe(i))}return e.nextPageID?r(e.nextPageID):n}))};return r()},saveDailyLogEntry:function(e,t){return b.persistDeviceData([{type:"DailyLogEntry",observationDate:e+"T00:00:00.000Z",value:JSON.stringify(t)}])}};function ahe(e){e.starred&&(e.icon="star");var t={overallFeeling:e.overallFeeling,notes:e.notes,symptoms:e.symptoms.map((e=>"string"==typeof e?{id:e}:e)),treatments:e.treatments.map((e=>"string"==typeof e?{id:e}:e)),icon:e.icon};return t}function ihe(e){return t.createElement("div",{ref:e.innerRef,className:"mdhui-ss-symptom-treatment-filters"},t.createElement(E,{className:"mdhui-ss-symptom-treatment-filter-dropdown-button",onClick:()=>"Symptoms"==e.expandedDropdown?e.onExpandedDropdownChange(null):e.onExpandedDropdownChange("Symptoms"),style:{fontWeight:e.selectedSymptoms.length>0?"bold":""}},az("select-symptoms")," ",t.createElement(Mq,{icon:"Symptoms"==e.expandedDropdown?on:bn}),t.createElement(Is,null)),t.createElement(E,{className:"mdhui-ss-symptom-treatment-filter-dropdown-button",onClick:()=>"Treatments"==e.expandedDropdown?e.onExpandedDropdownChange(null):e.onExpandedDropdownChange("Treatments"),style:{fontWeight:e.selectedTreatments.length>0?"bold":""}},az("select-treatments")," ",t.createElement(Mq,{icon:"Treatments"==e.expandedDropdown?on:bn}),t.createElement(Is,null)),"Symptoms"==e.expandedDropdown&&t.createElement("div",{className:"mdhui-ss-symptom-treatment-filter-items-list"},e.configuration.symptoms.filter((e=>!e.inactive)).map((n=>t.createElement(rL,{className:"mdhui-ss-symptom-treatment-filter-item",selected:-1!=e.selectedSymptoms.indexOf(n.id),onClick:()=>{return t=n,-1!=(r=[...e.selectedSymptoms]).indexOf(t.id)?r.splice(r.indexOf(t.id),1):r.push(t.id),void e.onSymptomsSelectionChange(r);var t,r},color:n.color,key:n.id,text:n.name})))),"Treatments"==e.expandedDropdown&&t.createElement("div",{className:"mdhui-ss-symptom-treatment-filter-items-list"},e.configuration.treatments.filter((e=>!e.inactive)).map((n=>t.createElement(rL,{className:"mdhui-ss-symptom-treatment-filter-item",selected:-1!=e.selectedTreatments.indexOf(n.id),onClick:()=>{return t=n,-1!=(r=[...e.selectedTreatments]).indexOf(t.id)?r.splice(r.indexOf(t.id),1):r.push(t.id),void e.onTreatmentsSelectionChange(r);var t,r},color:n.color,key:n.id,text:n.name})))))}A(".mdhui-ss-symptom-treatment-filters .mdhui-ss-symptom-treatment-filter-dropdown-button {\n width: 50%;\n display: inline-block;\n box-sizing: border-box;\n padding: 16px 8px;\n background: var(--mdhui-color-primary);\n text-align: center;\n font-size: .88em;\n cursor: pointer;\n color: #FFF;\n position: relative;\n white-space: nowrap;\n}\n\n.mdhui-ss-symptom-treatment-filters .mdhui-ss-symptom-treatment-filter-dropdown-button:first-child {\n border-right: solid 1px var(--mdhui-border-color-1);\n}\n\n.mdhui-ss-symptom-treatment-filters .mdhui-ss-symptom-treatment-filter-items-list {\n background: var(--mdhui-background-color-0);\n text-align: center;\n padding: 12px;\n padding-top: 8px;\n padding-bottom: 8px;\n border-bottom: solid 4px var(--ss-primary-theme-color);\n}\n\n.mdhui-ss-symptom-treatment-filters .mdhui-ss-symptom-treatment-filter-item {\n margin: 4px;\n}");var ohe=[{severityTracking:"10PointScale",color:"#c4291c",name:"Headache",id:"Headache"},{severityTracking:"3PointScale",color:"#e35c33",name:"Fatigue",id:"Fatigue"},{severityTracking:"None",color:"#5db37e",name:"Nausea",id:"Nausea"},{severityTracking:"None",color:"#429bdf",name:"Anxiety",id:"Anxiety"},{severityTracking:"None",color:"#7b88c6",name:"Brain Fog",id:"Brain Fog"},{severityTracking:"None",color:"#616161",name:"Back Pain",id:"Back Pain"},{severityTracking:"None",color:"#d98177",name:"Insomnia",id:"Insomnia"}],she=[{color:"#616161",id:"Tylenol",name:"Tylenol"},{color:"#429BDF",id:"Rest",name:"Rest"},{color:"#d98177",id:"Ice",name:"Ice"},{color:"#5db37e",id:"Stretching",name:"Stretching"},{color:"#e35c33",id:"Meditation",name:"Meditation"}];ohe.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0)),she.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0));var lhe={},che=Un(new Date,{days:-29});function uhe(e,t,n,r,a){lhe[pH(che)]={symptoms:e.map((e=>({id:e,severity:Math.floor(10*Math.random())+1}))),treatments:t.map((e=>({id:e}))),notes:a?"notes":"",icon:r,overallFeeling:n},che=Un(che,{days:1})}uhe(["Headache","Insomnia"],["Tylenol"],2,"moon-o",!0),uhe(["Brain Fog","Nausea"],["Tylenol","Ice"],4),uhe(["Headache"],["Tylenol"],3),uhe(["Headache","Insomnia"],["Tylenol"],3),uhe([],[],5),uhe(["Fatigue","Back Pain","Anxiety","Nausea"],["Stretching","Rest","Ice"],1),uhe([],[],5),uhe(["Fatigue","Back Pain","Anxiety","Nausea","Headache","Insomnia","Brain Fog"],["Stretching","Rest","Ice","Meditation","Tylenol"],1,"star-o",!0),uhe(["Fatigue","Nausea","Headache"],["Stretching"],2),uhe(["Anxiety","Brain Fog"],["Rest","Meditation"],3,void 0,!0),uhe([],[],5),uhe(["Back Pain","Headache"],["Ice","Tylenol"],4),uhe(["Fatigue","Back Pain","Nausea","Brain Fog"],["Meditation","Tylenol"],2),uhe([],[],5),uhe(["Fatigue","Insomnia","Brain Fog"],["Rest"],4,"star",!0),uhe(["Fatigue","Back Pain"],["Stretching","Rest"],3),uhe(["Fatigue","Nausea"],["Stretching","Rest","Ice","Meditation","Tylenol"],2,"flag",!0),uhe(["Headache","Insomnia","Brain Fog"],["Stretching","Tylenol"],4,"user-md",!0),uhe([],[],5),uhe([],[],5),uhe([],[],5),uhe(["Back Pain","Headache"],["Ice","Tylenol"],4),uhe(["Fatigue","Back Pain","Nausea","Brain Fog"],["Meditation","Tylenol"],2),uhe(["Fatigue","Back Pain","Anxiety","Nausea"],["Stretching","Rest","Ice"],1),uhe(["Fatigue","Insomnia","Brain Fog"],["Rest"],4,"question-circle-o",!0),uhe(["Fatigue","Back Pain","Anxiety","Nausea","Headache","Insomnia","Brain Fog"],["Stretching","Rest","Ice","Meditation","Tylenol"],1,"flask",!0),uhe([],[],5),uhe(["Headache","Insomnia"],["Tylenol"],3),uhe([],[],5),uhe(["Fatigue","Insomnia"],["Rest"],2,"trophy",!0);const dhe=o(null);function hhe(e){const[n,r]=m(null),[a,i]=m([]),[o,s]=m([]),[l,c]=m(null);let[u,d]=m(null);function h(){if("default"==e.previewState)return d({symptoms:ohe,treatments:she,participantID:"1"}),void r({symptoms:ohe,treatments:she,logEntries:lhe,hasFilteredSymptoms:!1});rhe.getConfiguration().then((function(e){rhe.getDailyLogEntries().then((function(t){d(e),u=e,r({symptoms:p(a),treatments:g(o),logEntries:t,hasFilteredSymptoms:!1})}))}))}function p(e){return u.symptoms.filter((t=>(!e.length||e.includes(t.id))&&!t.inactive))}function g(e){return u.treatments.filter((t=>(!e.length||e.includes(t.id))&&!t.inactive))}return f((()=>(h(),b.on("applicationDidBecomeVisible",h),()=>{b.off("applicationDidBecomeVisible",h)})),[]),n&&u?t.createElement("div",{ref:e.innerRef},t.createElement(dhe.Provider,{value:n},e.showFilters&&t.createElement(Vz,{noTopMargin:!0},t.createElement(ihe,{configuration:u,selectedSymptoms:a,onSymptomsSelectionChange:e=>function(e){r(Object.assign(Object.assign({},n),{symptoms:p(e),hasFilteredSymptoms:!!e.length})),i(e)}(e),selectedTreatments:o,onTreatmentsSelectionChange:e=>function(e){r(Object.assign(Object.assign({},n),{treatments:g(e)})),s(e)}(e),expandedDropdown:l,onExpandedDropdownChange:e=>c(e)})),e.children)):t.createElement(Dn,null)}function mhe(e){let n=i(dhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Matrix must be used inside a Symptom Shark Visualization Coordinator.");let r=i(vz),a=e.intervalStart||hr(new Date);if(r&&(a=r.intervalStart),!n.symptoms.length&&!n.treatments.length)return null;var o=oz(a.getFullYear(),a.getMonth()),s=n.symptoms.map((e=>({label:e.name,color:e.color,data:o.map((t=>!!function(e,t){var r=pH(e);return!!n.logEntries[r]&&n.logEntries[r].symptoms.find((e=>e.id==t))}(t,e.id)))}))),l=n.treatments.map((e=>({label:e.name,color:e.color,data:o.map((t=>!!function(e,t){var r=pH(e);return!!n.logEntries[r]&&n.logEntries[r].treatments.find((e=>e.id==t))}(t,e.id)))})));return t.createElement("div",{ref:e.innerRef,className:"ss-symptom-matrix"},t.createElement(Nz,{title:az("symptoms"),rows:s,intervalStart:a}),t.createElement(Nz,{title:az("treatments"),rows:l,intervalStart:a}))}function phe(e){let n=i(dhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Calendar must be used inside a Symptom Shark Visualization Coordinator.");let{symptoms:r,treatments:a,logEntries:o}=n,s=i(vz),l=e.intervalStart||hr(new Date);return s&&(l=s.intervalStart),t.createElement(Ds,{innerRef:e.innerRef,className:"mdhui-ss-calendar",month:l.getMonth(),year:l.getFullYear(),dayRenderer:function(n,i,s){if(!s)return t.createElement("div",null);var c=new Date(n,i,s),u=o[pH(c)],d=!1;return c>new Date&&(d=!0),t.createElement(fhe,{onClick:t=>function(t){var n=new Date(l.getFullYear(),l.getMonth(),t);n>new Date||e.onDaySelected(n)}(t),day:s,logEntry:u,symptomConfigurations:r,treatmentConfigurations:a,future:d})}})}function fhe(e){var n;return t.createElement(E,{className:"mdhui-ss-calendar-day"+(e.future?" future":""),onClick:()=>e.onClick(e.day)},function(){if(!e.logEntry)return t.createElement(xz,{className:"mdhui-ss-day-tracker",primaryColors:[],secondaryColors:[]});var n=e.symptomConfigurations.filter((t=>!t.inactive&&e.logEntry.symptoms.find((e=>e.id==t.id)))).map((e=>e.color)),r=e.treatmentConfigurations.filter((t=>!t.inactive&&e.logEntry.treatments.find((e=>e.id==t.id)))).map((e=>e.color));return 0===n.length&&0===r.length?t.createElement(xz,{className:"mdhui-ss-day-tracker",primaryColors:[],secondaryColors:[]}):t.createElement(xz,{className:"mdhui-ss-day-tracker",key:Math.random(),primaryColors:n,secondaryColors:r})}(),t.createElement("div",{className:"day-label"}," ",e.day," ",(null===(n=e.logEntry)||void 0===n?void 0:n.notes.length)>0&&t.createElement(Mq,{icon:Qt,className:"mdhui-ss-notes-icon"})))}A(".mdhui-ss-calendar .mdhui-ss-calendar-day {\n width: 100%;\n}\n\n.mdhui-ss-calendar .mdhui-ss-calendar-day .mdhui-ss-day-label {\n font-size: 12px;\n color: var(--mdhui-text-color-2);\n}\n\n.mdhui-ss-calendar .mdhui-ss-calendar-day .mdhui-ss-day-label svg {\n font-size: 12px;\n}\n\n.mdhui-ss-calendar .mdhui-ss-calendar-day .mdhui-ss-day-label.future {\n opacity: .5;\n}\n\n.mdhui-ss-calendar .mdhui-ss-notes-icon {\n color: var(--mdhui-color-primary);\n position: absolute;\n right: calc(50% - 19px);\n bottom: 2px;\n}\n\n.mdhui-ss-calendar .mdhui-ss-calendar-day .mdhui-ss-day-tracker {\n padding-bottom: 2px;\n padding-top: 8px;\n}\n\n.mdhui-ss-calendar .mdhui-ss-calendar-day.future {\n opacity: .5;\n cursor: default;\n}");function ghe(e){let n=i(dhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Severity Chart must be used inside a Symptom Shark Visualization Coordinator.");let{logEntries:r}=n,a=i(vz),o=e.intervalStart||hr(new Date);a&&(o=a.intervalStart);var s=oz(o.getFullYear(),o.getMonth());function l(e){return s.filter((t=>{if(r[pH(t)]&&r[pH(t)].overallFeeling&&(!e||r[pH(t)].overallFeeling==e))return!0}))}var c=l();if(!c.length)return null;for(var u=s.length,d=100/u,h=100/(2*u),m=[],p=0;p<c.length-1;p++){var f=c[p],g=c[p+1],v=r[pH(f)].overallFeeling,y=r[pH(g)].overallFeeling;m.push({x1:h+d*(f.getDate()-1),y1:128-24*v,x2:h+d*(g.getDate()-1),y2:128-24*y,color:"#429bdf"})}let b=function(){var e=0,t=l();if(0==t.length)return null;for(var n=0;n<t.length;n++)e+=r[pH(t[n])].overallFeeling;return e/t.length}();return t.createElement("div",{ref:e.innerRef,className:"mdhui-ss-oe-chart"+("monthReport"==e.variant?" mdhui-ss-oe-chart-month-report":"")},t.createElement("div",{className:"mdhui-ss-oe-chart-title-container"},t.createElement(js,{title:az("daily-overall-experience")}),b&&t.createElement("div",{className:"mdhui-ss-oe-chart-average-wrapper"},az("average"),": ",t.createElement("div",{className:"mdhui-ss-oe-chart-average"},b.toFixed(1),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:parseInt(b.toFixed(0))})))),t.createElement("div",{className:"mdhui-ss-oe-chart-inner"},t.createElement("div",{className:"mdhui-ss-oe-chart-y-axis"},t.createElement("div",{className:"mdhui-ss-oe-chart-face-total"},l(5).length>0&&t.createElement("span",{className:"total"},l(5).length),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:5})),t.createElement("div",{className:"mdhui-ss-oe-chart-face-total"},l(4).length>0&&t.createElement("span",{className:"total"},l(4).length),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:4})),t.createElement("div",{className:"mdhui-ss-oe-chart-face-total"},l(3).length>0&&t.createElement("span",{className:"total"},l(3).length),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:3})),t.createElement("div",{className:"mdhui-ss-oe-chart-face-total"},l(2).length>0&&t.createElement("span",{className:"total"},l(2).length),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:2})),t.createElement("div",{className:"mdhui-ss-oe-chart-face-total"},l(1).length>0&&t.createElement("span",{className:"total"},l(1).length),t.createElement(Pz,{className:"mdhui-ss-oe-chart-face",selected:!0,faceValue:1}))),t.createElement("div",{className:"mdhui-ss-oe-chart-x-axis-line"}),t.createElement("div",{className:"mdhui-ss-oe-chart-x-axis-line",style:{top:"48px"}}),t.createElement("div",{className:"mdhui-ss-oe-chart-x-axis-line",style:{top:"72px"}}),t.createElement("div",{className:"mdhui-ss-oe-chart-x-axis-line",style:{top:"96px"}}),t.createElement("div",{className:"mdhui-ss-oe-chart-x-axis-line",style:{top:"120px"}}),t.createElement("div",{style:{position:"relative",height:"100%"}},t.createElement("svg",{className:"mdhui-ss-oe-chart-lines"},m.map((e=>t.createElement("line",{key:e.x1,x1:e.x1+"%",y1:e.y1,x2:e.x2+"%",y2:e.y2,style:{stroke:e.color,strokeWidth:4,opacity:.5}})))),s.map((n=>{var a;return t.createElement("div",{key:n.getDate(),className:"mdhui-ss-oe-chart-day-wrapper",style:{width:100/s.length+"%"}},(e.showAllDays||(n.getDate()-1)%2==0)&&t.createElement("div",{className:"mdhui-ss-oe-chart-day-marker"},n.getDate()),(null===(a=r[pH(n)])||void 0===a?void 0:a.overallFeeling)&&t.createElement("div",{className:"mdhui-ss-oe-chart-dot",style:{bottom:24*r[pH(n)].overallFeeling-16+"px"}}))})))))}A(".mdhui-ss-oe-chart {\n position: relative;\n}\n\n.mdhui-ss-oe-chart .mdhui-ss-oe-chart-title-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n}\n\n.mdhui-ss-oe-chart .mdhui-ss-oe-chart-face {\n width: 16px;\n height: 16px;\n margin-left: 4px;\n vertical-align: text-top;\n display: inline-block;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-y-axis .mdhui-ss-oe-chart-face-total {\n height: 16px;\n margin-bottom: 8px;\n display: block;\n text-align: right;\n font-weight: bold;\n width: 56px;\n font-size: 15px;\n white-space: nowrap;\n}\n\n.mdhui-ss-oe-chart .mdhui-ss-oe-chart-face-total .mdhui-ss-oe-chart-total {\n vertical-align: text-top;\n}\n\n.mdhui-ss-oe-chart .mdhui-ss-oe-chart-average-wrapper {\n font-size: 17px;\n padding: 16px;\n padding-bottom: 0;\n}\n\n.mdhui-ss-oe-chart .mdhui-ss-oe-chart-average-wrapper .mdhui-ss-oe-chart-average {\n font-weight: bold;\n display: inline;\n}\n\n.mdhui-ss-oe-chart-inner {\n position: relative;\n height: 160px;\n padding: 16px;\n box-sizing: border-box;\n padding-left: 64px;\n page-break-inside: avoid;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-x-axis-line {\n position: absolute;\n width: calc(100% - 64px);\n height: 1px;\n /*Default color because evopdf doesn't support css variables*/\n background: #eee;\n background: var(--mdhui-background-color-1);\n left: 64px;\n top: 24px;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-lines {\n position: absolute;\n left: 0;\n right: 0;\n top: 0.5px;\n bottom: 0;\n width: 100%;\n height: 100%;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-y-axis {\n position: absolute;\n left: 0;\n top: 16px;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-day-wrapper {\n position: relative;\n float: left;\n height: 116px;\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-day-wrapper .mdhui-ss-oe-chart-day-marker {\n position: absolute;\n left: 0;\n bottom: -16px;\n width: 100%;\n text-align: center;\n font-size: 12px;\n color: var(--mdhui-text-color-2);\n}\n\n.mdhui-ss-oe-chart-inner .mdhui-ss-oe-chart-day-wrapper .mdhui-ss-oe-chart-dot {\n position: absolute;\n width: 7px;\n height: 7px;\n /*Default color because evopdf doesn't support css variables*/\n background: #666;\n background: var(--mdhui-text-color-2);\n border-radius: 3.5px;\n left: calc(50% - 3px);\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-inner {\n padding-left: calc(25% + 8px);\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-y-axis {\n left: calc(25% - 56px);\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-x-axis-line {\n width: calc(75% - 32px);\n left: calc(25% + 16px);\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-average-wrapper {\n display: block;\n padding-top: 16px;\n font-size: 15px;\n text-transform: uppercase;\n font-weight: normal;\n position: absolute;\n left: 16px;\n top: 64px;\n text-align: left;\n padding: 0;\n padding-bottom: 8px;\n right: auto;\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-average-wrapper .mdhui-ss-oe-chart-average {\n margin-top: 8px;\n font-size: 34px;\n font-weight: bold;\n display: block;\n line-height: 34px;\n}\n\n.mdhui-ss-oe-chart.mdhui-ss-oe-chart-month-report .mdhui-ss-oe-chart-average-wrapper .mdhui-ss-oe-chart-average .mdhui-face {\n height: 34px;\n width: 34px;\n vertical-align: top;\n border-radius: 18px;\n overflow: hidden;\n}");function vhe(e){var n,r,a,i,o;if(!e.configuration.symptoms.length)return null;function s(){e.onClick&&e.onClick(e.date)}let l=!1;e.logEntry&&(e.logEntry.symptoms.length>0||e.logEntry.treatments.length>0||e.logEntry&&e.logEntry.notes.length>0)||(l=!0);let c=null!==(n=e.title)&&void 0!==n?n:sz(e.date),u=null!==(r=e.highlight)&&void 0!==r?r:eo(e.date),d=e.title?void 0:null!==(a=e.subtitle)&&void 0!==a?a:lz(e.date);return l?t.createElement(Ms,{innerRef:e.innerRef,variant:u?"highlight":"subtle",className:"mdhui-ss-log-entry"},t.createElement(Xt,{title:c,subtitle:d,onClick:()=>s(),indicatorIcon:En},!!e.noDataMessage&&t.createElement("div",{className:"mdhui-ss-log-entry-section"},e.noDataMessage),t.createElement(Is,null))):t.createElement(Ms,{innerRef:e.innerRef,className:"mdhui-ss-log-entry"},t.createElement(Xt,{title:c,subtitle:d,onClick:()=>s(),indicatorPosition:"topRight",indicator:t.createElement(t.Fragment,null,(null===(i=e.logEntry)||void 0===i?void 0:i.overallFeeling)&&t.createElement(Pz,{faceValue:null===(o=e.logEntry)||void 0===o?void 0:o.overallFeeling,selected:!0}))},t.createElement(yhe,{configuration:e.configuration,logEntry:e.logEntry,highlightedSymptoms:e.highlightedSymptoms,highlightedTreatments:e.highlightedTreatments}),e.logEntry.notes&&t.createElement("div",{className:"mdhui-ss-log-entry-section"},t.createElement("div",{className:"mdhui-ss-section-header"},"Notes"),t.createElement("div",{className:"mdhui-ss-notes-content"},e.logEntry.notes))))}function yhe(e){var n=[],r=[];if(e.logEntry&&(e.logEntry.symptoms.forEach((t=>{var r,a=e.configuration.symptoms.find((e=>e.id==t.id));a&&("10PointScale"==a.severityTracking&&(r=t.severity?t.severity.toString():void 0),"3PointScale"==a.severityTracking&&(t.severity>7?r=az("severe-shortened"):t.severity>4?r=az("moderate-shortened"):t.severity>0&&(r=az("mild-shortened"))),n.push({id:t.id,severity:r,name:a.name,color:a.color}))})),n.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0)),e.logEntry.treatments.forEach((t=>{var n=e.configuration.treatments.find((e=>e.id==t.id));n&&r.push({id:t.id,name:n.name,color:n.color})})),r.sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0))),!e.logEntry||!(n.length>0||r.length>0||e.logEntry.notes.length>0))return null;var a=[],i=[];return e.highlightedSymptoms&&(a=e.highlightedSymptoms),e.highlightedTreatments&&(i=e.highlightedTreatments),0==e.logEntry.symptoms.length&&0==e.logEntry.treatments.length?null:t.createElement("div",{className:"mdhui-ss-log-entry-section"},t.createElement("div",{className:"mdhui-ss-section-header"},"Symptoms & Treatments"),n.filter((e=>-1!=a.indexOf(e.id))).map((e=>t.createElement(rL,{noBoxShadow:!0,selected:!0,color:e.color,badge:e.severity,key:e.id,text:e.name}))),r.filter((e=>-1!=i.indexOf(e.id))).map((e=>t.createElement(rL,{noBoxShadow:!0,selected:!0,color:e.color,key:e.id,text:e.name,bordered:!0}))),n.filter((e=>-1==a.indexOf(e.id))).map((e=>t.createElement("span",{key:e.id,style:{opacity:a.length>0||i.length>0?.5:1}},t.createElement(rL,{noBoxShadow:!0,selected:!0,color:e.color,badge:e.severity,text:e.name})))),r.filter((e=>-1==i.indexOf(e.id))).map((e=>t.createElement("span",{key:e.id,style:{opacity:a.length>0||i.length>0?.5:1}},t.createElement(rL,{noBoxShadow:!0,selected:!0,color:e.color,text:e.name,bordered:!0})))))}A(".mdhui-ss-log-entry .mdhui-face {\n height: 18px;\n width: 18px;\n border-radius: 9px;\n}\n\n.mdhui-ss-log-entry .mdhui-ss-log-entry-section {\n margin-top: 16px;\n}\n\n.mdhui-ss-log-entry .mdhui-ss-section-header {\n font-size: .88em;\n font-weight: 500;\n color: var(--mdhui-text-color-3);\n margin-bottom: 4px;\n}\n\n.mdhui-ss-log-entry .mdhui-ss-notes-preview {\n font-size: .88em;\n white-space: pre-wrap;\n margin: 16px;\n margin-top: 0;\n}\n\n.mdhui-ss-log-entry .mdhui-tracker-item {\n margin-left: 0;\n margin-top: 0;\n}\n\n.mdhui-ss-log-entry .mdhui-ss-notes-content {\n font-size: .88em;\n white-space: pre-wrap;\n}");A(".ss-month-report {\n position: relative;\n width: 100%;\n font-family: ui-rounded, -apple-system, Helvetica, Arial, sans-serif;\n /* default color for PDF rendering */\n background: #FFF;\n background: var(--mdhui-background-color-0);\n}\n\n.ss-month-report>thead>tr>th {\n text-align: left;\n font-size: 21px;\n line-height: 21px;\n width: 100%;\n background: var(--mdhui-background-color-0);\n}\n\n.ss-month-report>thead>tr>th>.header {\n display: block;\n position: relative;\n padding: 16px;\n}\n\n.ss-month-report>thead>tr>th>.header .ss-month-report-product {\n position: absolute;\n right: 16px;\n top: 10px;\n font-size: 15px;\n font-weight: bold;\n padding-left: 40px;\n height: 32px;\n line-height: 18px;\n}\n\n.ss-month-report>thead>tr>th>.header .ss-month-report-product .ss-month-report-product-url {\n font-weight: normal;\n}\n\n.ss-month-report>thead>tr>th>.header .ss-month-report-product img {\n height: 32px;\n position: absolute;\n left: 0;\n top: 0;\n vertical-align: middle;\n}\n\n.ss-month-report>tfoot>tr>td {\n padding: 16px;\n text-align: center;\n font-size: 21px;\n line-height: 21px;\n width: 100%;\n background: var(--mdhui-background-color-0);\n border-top: solid 1px var(--mdhui-border-color-1);\n}");function bhe(e){let n=Object.assign(Object.assign({},whe[e.icon||"star-o"]),{className:e.className});return t.createElement(Mq,Object.assign({},n))}A(".ss-notes-timeline {\n padding: 16px;\n padding-top: 48px;\n\n /* Default color for PDF Rendering, since pdf renderer does not support CSS variables */\n border-top: solid 1px #ddd;\n\n border-top: solid 1px var(--mdhui-border-color-1);\n padding-left: 64px;\n position: relative;\n}\n\n.ss-notes-timeline .ss-notes-timeline-title {\n font-size: 17px;\n color: var(--mdhui-text-color-1);\n font-weight: bold;\n position: absolute;\n left: 16px;\n top: 16px;\n}\n\n.ss-notes-timeline .ss-notes-timeline-line {\n position: absolute;\n top: 48px;\n left: 32px;\n\n /* Default color for PDF Rendering, since pdf renderer does not support CSS variables */\n background: #ddd;\n\n background: var(--mdhui-background-color-2);\n bottom: 48px;\n width: 1px;\n}\n\n.ss-notes-timeline .ss-notes-timeline-day {\n margin-bottom: 32px;\n page-break-inside: avoid;\n position: relative;\n\n /* Default color for PDF Rendering, since pdf renderer does not support CSS variables */\n border: solid 1px #ddd;\n\n border: solid 1px var(--mdhui-border-color-1);\n border-radius: 5px;\n padding: 16px;\n}\n\n.ss-notes-timeline .ss-notes-timeline-day .ss-notes-timeline-day-icon {\n font-size: 21px;\n position: absolute;\n left: -51px;\n top: calc(50% - 11px);\n width: 37px;\n text-align: center;\n display: block;\n}\n\n.ss-notes-timeline .ss-notes-timeline-day .ss-notes-timeline-day-circle {\n /* Default color for PDF Rendering, since pdf renderer does not support CSS variables */\n color: #429bdf;\n\n color: var(--mdhui-color-primary);\n}\n\n.notes-timeline .ss-notes-timeline-day .ss-notes-timeline-day-title {\n font-weight: bold;\n font-size: 17px;\n}\n\n.notes-timeline .ss-notes-timeline-day .ss-notes-timeline-note {\n white-space: pre-wrap;\n}");const whe={star:{color:"#eec04c",icon:{prefix:"fas",iconName:"star",icon:[576,512,[11088,61446],"f005","M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"]}},"star-o":{color:"#eec04c",icon:{prefix:"far",iconName:"star",icon:[576,512,[11088,61446],"f005","M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.7 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z"]}},"user-md":{color:"#397d49",icon:fn},"hospital-o":{color:"#4154af",icon:{prefix:"fas",iconName:"hospital",icon:[640,512,[127973,62589,"hospital-alt","hospital-wide"],"f0f8","M192 48c0-26.5 21.5-48 48-48H400c26.5 0 48 21.5 48 48V512H368V432c0-26.5-21.5-48-48-48s-48 21.5-48 48v80H192V48zM48 96H160V512H48c-26.5 0-48-21.5-48-48V320H80c8.8 0 16-7.2 16-16s-7.2-16-16-16H0V224H80c8.8 0 16-7.2 16-16s-7.2-16-16-16H0V144c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v48H560c-8.8 0-16 7.2-16 16s7.2 16 16 16h80v64H560c-8.8 0-16 7.2-16 16s7.2 16 16 16h80V464c0 26.5-21.5 48-48 48H480V96H592zM312 64c-8.8 0-16 7.2-16 16v24H272c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16h24v24c0 8.8 7.2 16 16 16h16c8.8 0 16-7.2 16-16V152h24c8.8 0 16-7.2 16-16V120c0-8.8-7.2-16-16-16H344V80c0-8.8-7.2-16-16-16H312z"]}},ambulance:{color:"#f2471c",icon:nn},flag:{color:"#c4291c",icon:{prefix:"fas",iconName:"flag",icon:[448,512,[127988,61725],"f024","M64 32C64 14.3 49.7 0 32 0S0 14.3 0 32V64 368 480c0 17.7 14.3 32 32 32s32-14.3 32-32V352l64.3-16.1c41.1-10.3 84.6-5.5 122.5 13.4c44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30V66.1c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0c-35.1-17.6-75.4-22-113.5-12.5L64 48V32z"]}},"moon-o":{color:"#9d9083",icon:{prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]}},flask:{color:"#429bdf",icon:{prefix:"fas",iconName:"flask",icon:[448,512,[],"f0c3","M288 0H160 128C110.3 0 96 14.3 96 32s14.3 32 32 32V196.8c0 11.8-3.3 23.5-9.5 33.5L10.3 406.2C3.6 417.2 0 429.7 0 442.6C0 480.9 31.1 512 69.4 512H378.6c38.3 0 69.4-31.1 69.4-69.4c0-12.8-3.6-25.4-10.3-36.4L329.5 230.4c-6.2-10.1-9.5-21.7-9.5-33.5V64c17.7 0 32-14.3 32-32s-14.3-32-32-32H288zM192 196.8V64h64V196.8c0 23.7 6.6 46.9 19 67.1L309.5 320h-171L173 263.9c12.4-20.2 19-43.4 19-67.1z"]}},bolt:{color:"#f5b722",icon:{prefix:"fas",iconName:"bolt",icon:[448,512,[9889,"zap"],"f0e7","M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288H175.5L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7H272.5L349.4 44.6z"]}},"question-circle-o":{color:"#71aa3a",icon:hn},thermometer:{color:"#a3144d",icon:{prefix:"fas",iconName:"thermometer",icon:[512,512,[],"f491","M96 382.1V293.3c0-14.9 5.9-29.1 16.4-39.6l27.3-27.3 57 57c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-57-57 41.4-41.4 57 57c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-57-57 41.4-41.4 57 57c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-57-57 45.5-45.5C355.2 10.9 381.4 0 408.8 0C465.8 0 512 46.2 512 103.2c0 27.4-10.9 53.6-30.2 73L258.3 399.6c-10.5 10.5-24.7 16.4-39.6 16.4H129.9L41 505c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l89-89z"]}},trophy:{color:"#e0bc39",icon:{prefix:"fas",iconName:"trophy",icon:[576,512,[127942],"f091","M400 0H176c-26.5 0-48.1 21.8-47.1 48.2c.2 5.3 .4 10.6 .7 15.8H24C10.7 64 0 74.7 0 88c0 92.6 33.5 157 78.5 200.7c44.3 43.1 98.3 64.8 138.1 75.8c23.4 6.5 39.4 26 39.4 45.6c0 20.9-17 37.9-37.9 37.9H192c-17.7 0-32 14.3-32 32s14.3 32 32 32H384c17.7 0 32-14.3 32-32s-14.3-32-32-32H357.9C337 448 320 431 320 410.1c0-19.6 15.9-39.2 39.4-45.6c39.9-11 93.9-32.7 138.2-75.8C542.5 245 576 180.6 576 88c0-13.3-10.7-24-24-24H446.4c.3-5.2 .5-10.4 .7-15.8C448.1 21.8 426.5 0 400 0zM48.9 112h84.4c9.1 90.1 29.2 150.3 51.9 190.6c-24.9-11-50.8-26.5-73.2-48.3c-32-31.1-58-76-63-142.3zM464.1 254.3c-22.4 21.8-48.3 37.3-73.2 48.3c22.7-40.3 42.8-100.5 51.9-190.6h84.4c-5.1 66.3-31.1 111.2-63 142.3z"]}},spoon:{color:"#6e4b3f",icon:{prefix:"fas",iconName:"spoon",icon:[512,512,[129348,61873,"utensil-spoon"],"f2e5","M245.8 220.9c-14.5-17.6-21.8-39.2-21.8-60.8C224 80 320 0 416 0c53 0 96 43 96 96c0 96-80 192-160.2 192c-21.6 0-43.2-7.3-60.8-21.8L54.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L245.8 220.9z"]}}};function xhe(e){var n,r;let a=i(dhe);if(!a)return t.createElement(nL,{innerRef:e.innerRef},"Error: Notes timeline must be used inside a Symptom Shark Visualization Coordinator.");let o=i(vz),s=null!==(r=null!==(n=null==o?void 0:o.intervalStart)&&void 0!==n?n:e.intervalStart)&&void 0!==r?r:hr(new Date);if(!a.symptoms.length&&!a.treatments.length)return null;var l=oz(s.getFullYear(),s.getMonth()).filter((e=>{var t,n;return null===(n=null===(t=a.logEntries[pH(e)])||void 0===t?void 0:t.notes)||void 0===n?void 0:n.length}));return l.length?t.createElement("div",{ref:e.innerRef,className:"ss-notes-timeline"},t.createElement("div",{className:"ss-notes-timeline-title"},az("notes")),t.createElement("div",{className:"ss-notes-timeline-line"}),l.map((e=>t.createElement("div",{key:e.toISOString(),className:"ss-notes-timeline-day"},a.logEntries[pH(e)].icon?t.createElement(bhe,{className:"ss-notes-timeline-day-icon",icon:a.logEntries[pH(e)].icon}):t.createElement(Mq,{className:"ss-notes-timeline-day-icon ss-notes-timeline-day-circle",icon:dn}),t.createElement("div",{className:"ss-notes-timeline-day-title"},ia(e,"MMMM d, yyyy")),t.createElement("div",{className:"ss-notes-timeline-note"},a.logEntries[pH(e)].notes))))):null}function khe(e){let n=i(dhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Severity Chart must be used inside a Symptom Shark Visualization Coordinator.");let{logEntries:r}=n,a=i(vz),o=e.intervalStart||hr(new Date);a&&(o=a.intervalStart);let s=oz(o.getFullYear(),o.getMonth()),l=function(t){var n=pH(t);if(r[n]){var a=r[n].symptoms.find((t=>e.symptom.id==t.id));if(a&&a.severity)return"3PointScale"==e.symptom.severityTracking?a.severity<4?1:a.severity>=4&&a.severity<8?2:3:a.severity}return 0},c=function(e){for(var t=0,n=0;n<s.length;n++){l(s[n])==e&&t++}return t},u=function(){for(var t,n=0,a=[],i=0;i<s.length;i++){var o=pH(s[i]);if(r[o]){var l=r[o].symptoms.find((t=>t.id==e.symptom.id));l&&l.severity&&a.push(l)}}if("3PointScale"==e.symptom.severityTracking)n+=a.filter((e=>e.severity&&e.severity<4)).length,n+=2*a.filter((e=>e.severity&&e.severity>=4&&e.severity<8)).length,n+=3*a.filter((e=>e.severity&&e.severity>=8)).length;else for(var c=0;c<a.length;c++)n+=null!==(t=a[c].severity)&&void 0!==t?t:0;return n/a.length}();return isNaN(u)?null:t.createElement("div",{ref:e.innerRef,className:"mdhui-ss-severity-chart"+("monthReport"==e.variant?" mdhui-ss-severity-chart-month-report":"")},t.createElement(js,{title:e.symptom.name+" "+az("severity")}),"3PointScale"==e.symptom.severityTracking&&t.createElement(t.Fragment,null,t.createElement("div",{className:"mdhui-ss-severity-chart-inner mdhui-ss-severity-chart-three-point-scale"},t.createElement("div",{className:"mdhui-ss-severity-chart-y-axis"},t.createElement("div",{className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"},c(3)),"sev"),t.createElement("div",{className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"},c(2)),"mod"),t.createElement("div",{className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"},c(1)),"mild"),t.createElement("div",{className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"}),"n/a")),t.createElement("div",{className:"mdhui-ss-severity-chart-x-axis-line"}),t.createElement("div",{className:"mdhui-ss-severity-chart-x-axis-line",style:{top:"48px"}}),t.createElement("div",{className:"mdhui-ss-severity-chart-x-axis-line",style:{top:"72px"}}),t.createElement("div",{className:"mdhui-ss-severity-chart-x-axis-line",style:{top:"96px"}}),t.createElement("div",{style:{position:"relative",height:"100%"}},s.map((n=>t.createElement("div",{key:n.toISOString(),className:"mdhui-ss-severity-chart-day-wrapper",style:{width:100/s.length+"%"}},(e.showAllDays||(n.getDate()-1)%2==0)&&t.createElement("div",{className:"mdhui-ss-severity-chart-day-marker"},n.getDate()),t.createElement("div",{className:"mdhui-ss-severity-chart-bar",style:{height:24*l(n)+"px",backgroundColor:e.symptom.color}},t.createElement(Is,null))))))),u&&t.createElement("div",{className:"mdhui-ss-severity-chart-average-wrapper"},az("average")," ",t.createElement("div",{className:"mdhui-ss-severity-chart-average"},u.toFixed(1)," / 3"))),"10PointScale"==e.symptom.severityTracking&&t.createElement("div",null,t.createElement("div",{className:"mdhui-ss-severity-chart-inner mdhui-ss-severity-chart-ten-point-scale"},t.createElement("div",{className:"mdhui-ss-severity-chart-y-axis"},[10,9,8,7,6,5,4,3,2,1].map((e=>t.createElement("div",{key:e,className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"},c(e)),t.createElement("div",{className:"mdhui-ss-severity-chart-value-label"},e)))),t.createElement("div",{className:"mdhui-ss-severity-chart-value"},t.createElement("span",{className:"mdhui-ss-severity-chart-total"}),t.createElement("div",{className:"mdhui-ss-severity-chart-value-label"},"0"))),[10,9,8,7,6,5,4,3,2,1].map((e=>t.createElement("div",{key:e,className:"mdhui-ss-severity-chart-x-axis-line",style:{top:24*(11-e)+"px"}}))),t.createElement("div",{style:{position:"relative",height:"100%"}},s.map((n=>t.createElement("div",{key:n.toISOString(),className:"mdhui-ss-severity-chart-day-wrapper",style:{width:100/s.length+"%"}},(e.showAllDays||(n.getDate()-1)%2==0)&&t.createElement("div",{className:"mdhui-ss-severity-chart-day-marker"},n.getDate()),t.createElement("div",{className:"mdhui-ss-severity-chart-bar",style:{height:24*l(n)+"px",backgroundColor:e.symptom.color}},t.createElement(Is,null))))))),u&&t.createElement("div",{className:"mdhui-ss-severity-chart-average-wrapper"},az("average")," ",t.createElement("div",{className:"mdhui-ss-severity-chart-average"},u.toFixed(1)," / 10"))))}function She(e){var n,r;let a=i(dhe);if(!a)return t.createElement(nL,{innerRef:e.innerRef},"Error: Month report must be used inside a Symptom Shark Visualization Coordinator.");let o=i(vz),s=null!==(r=null!==(n=null==o?void 0:o.intervalStart)&&void 0!==n?n:e.intervalStart)&&void 0!==r?r:hr(new Date);return a.symptoms.length||a.treatments.length?t.createElement("table",{ref:e.innerRef,className:"ss-month-report",cellPadding:"0",cellSpacing:"0"},t.createElement("thead",null,t.createElement("tr",null,t.createElement("th",null,t.createElement("div",{className:"header"},cz(s.getMonth())," ",s.getFullYear(),t.createElement("div",{className:"product"},e.productLogo&&t.createElement("img",{src:e.productLogo}),e.productName&&t.createElement("div",{className:"product-name"},e.productName),e.productUrl&&t.createElement("a",{href:e.productUrl,className:"product-url"},e.productUrl)))))),t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",null,t.createElement(mhe,null),e.includeDailyOverallFeeling&&t.createElement(ghe,{variant:"monthReport",showAllDays:!0}),a.symptoms.filter((e=>!e.inactive&&e.severityTracking&&"None"!=e.severityTracking)).map((e=>t.createElement(khe,{key:e.id,variant:"monthReport",symptom:e,showAllDays:!0}))),e.includeNotes&&t.createElement(xhe,null))))):null}A(".mdhui-ss-severity-chart {\n position: relative;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-average-wrapper {\n font-size: 17px;\n padding: 16px;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-average-wrapper .mdhui-ss-severity-chart-average {\n font-weight: bold;\n display: inline;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-inner {\n position: relative;\n height: 304px;\n padding: 16px;\n box-sizing: border-box;\n padding-left: 64px;\n page-break-inside: avoid;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-inner .mdhui-ss-severity-chart-x-axis-line {\n position: absolute;\n width: calc(100% - 64px);\n height: 1px;\n\n /* Default color for PDF Rendering, since evopdf does not support CSS variables */\n background: #eee;\n\n background: var(--mdhui-background-color-1);\n left: 64px;\n top: 24px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-lines {\n position: absolute;\n left: 0;\n right: 0;\n top: 0.5px;\n bottom: 0;\n width: 100%;\n height: 100%;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-y-axis {\n position: absolute;\n left: 0;\n top: 16px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-value {\n height: 16px;\n margin-bottom: 8px;\n display: block;\n text-align: right;\n font-weight: bold;\n width: 56px;\n font-size: 9px;\n white-space: nowrap;\n position: relative;\n line-height: 16px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-value .mdhui-ss-severity-chart-value-label {\n border-radius: 32px;\n padding: 3px;\n font-size: 9px;\n font-weight: bold;\n text-align: center;\n min-width: 10px;\n display: inline-block;\n color: var(--mdhui-text-color-1);\n line-height: 10px;\n background: #eec04c;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-value .mdhui-ss-severity-chart-total {\n position: absolute;\n right: 24px;\n top: 0;\n font-size: 15px;\n}\n\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-day-wrapper {\n position: relative;\n float: left;\n height: 260px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-day-wrapper .mdhui-ss-severity-chart-day-marker {\n position: absolute;\n left: 0;\n bottom: -16px;\n width: 100%;\n text-align: center;\n font-size: 12px;\n color: var(--mdhui-text-color-2);\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-day-wrapper .mdhui-ss-severity-chart-day-star {\n position: absolute;\n left: 0;\n bottom: -32px;\n width: 100%;\n text-align: center;\n font-size: 9px;\n color: var(--ss-tertiary-theme-color);\n display: none;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-day-wrapper .mdhui-ss-severity-chart-bar {\n position: absolute;\n width: 7px;\n background: var(--ss-bar-graph-bar-color);\n left: 0;\n width: 100%;\n bottom: 12px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-three-point-scale {\n height: 136px;\n}\n\n.mdhui-ss-severity-chart .mdhui-ss-severity-chart-three-point-scale .mdhui-ss-severity-chart-day-wrapper {\n height: 92px;\n}\n\n\n.mdhui-ss-severity-chart.mdhui-ss-severity-chart-month-report .mdhui-ss-severity-chart-inner {\n padding-left: calc(25% + 8px);\n}\n\n.mdhui-ss-severity-chart.mdhui-ss-severity-chart-month-report .mdhui-ss-severity-chart-y-axis {\n left: calc(25% - 56px);\n}\n\n.mdhui-ss-severity-chart.mdhui-ss-severity-chart-month-report .mdhui-ss-severity-chart-x-axis-line {\n width: calc(75% - 32px);\n left: calc(25% + 16px);\n}\n\n.mdhui-ss-severity-chart.mdhui-ss-severity-chart-month-report .mdhui-ss-severity-chart-average-wrapper {\n display: block;\n padding-top: 16px;\n font-size: 15px;\n text-transform: uppercase;\n font-weight: normal;\n position: absolute;\n left: 16px;\n top: 64px;\n text-align: left;\n padding: 0;\n padding-bottom: 8px;\n right: auto;\n}\n\n.mdhui-ss-severity-chart.mdhui-ss-severity-chart-month-report .mdhui-ss-severity-chart-average-wrapper .mdhui-ss-severity-chart-average {\n margin-top: 8px;\n font-size: 34px;\n font-weight: bold;\n display: block;\n line-height: 34px;\n}");function Ahe(e){let n=i(dhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Treatment Histograms must be used inside a Symptom Shark Visualization Coordinator.");let{symptoms:r,treatments:a,logEntries:o}=n,s=i(vz),l=e.intervalStart||hr(new Date);s&&(l=s.intervalStart);var c=[];r.forEach((t=>{for(var n=0,r=l;r.getMonth()==l.getMonth();){var a=o[pH(r)];a&&a.symptoms.find((e=>e.id==t.id))&&n++,r=Un(r,{days:1})}var i=t.severityTracking&&"None"!=t.severityTracking?function(){e.onSymptomSelected(t.id,l)}:void 0;n>0&&c.push({color:t.color,label:t.name,value:n,onSelect:i})}));var u=[];return a.forEach((e=>{for(var t=0,n=l;n.getMonth()==l.getMonth();){var r=o[pH(n)];r&&r.treatments.find((t=>t.id==e.id))&&t++,n=Un(n,{days:1})}t>0&&u.push({color:e.color,label:e.name,value:t})})),u.length||c.length?t.createElement("div",{ref:e.innerRef,className:"mdhui-ss-histograms"},t.createElement("div",{className:"mdhui-ss-histogram"},t.createElement(bz,{className:"mdhui-ss-histogram-title",order:4},az("symptoms")),t.createElement(Dz,{className:"ss-histogram",entries:c})),t.createElement("div",{className:"mdhui-ss-histogram"},t.createElement(bz,{className:"mdhui-ss-histogram-title",order:4},az("treatments")),t.createElement(Dz,{className:"ss-histogram",entries:u})),t.createElement("div",{style:{clear:"both"}})):null}A(".mdhui-ss-histograms {\n border-top: solid 1px var(--mdhui-border-color-1);\n border-bottom: solid 1px var(--mdhui-border-color-1);\n box-shadow: var(--mdhui-box-shadow-0);\n}\n\n.mdhui-ss-histograms .mdhui-ss-histogram {\n padding: 16px;\n float: left;\n width: 50%;\n box-sizing: border-box;\n position: relative;\n padding-right: 32px;\n}\n\n.mdhui-ss-histograms .mdhui-ss-histogram .mdhui-ss-histogram-title {\n color: var(--mdhui-text-color-1);\n display: block;\n padding-bottom: 8px;\n}\n\n.mdhui-ss-histograms .mdhui-ss-histogram .ss-histogram {\n padding: 0;\n}");function Ehe(e){let n=i(dhe);if(!n)return t.createElement(nL,{innerRef:e.innerRef},"Error: Symptom Severity Summary must be used inside a Symptom Shark Visualization Coordinator.");let{logEntries:r}=n,a=i(vz),o=e.intervalStart||hr(new Date);a&&(o=a.intervalStart);var s=oz(o.getFullYear(),o.getMonth()),l=function(t){var n=pH(t);if(r[n]){var a=r[n].symptoms.find((t=>e.symptom.id==t.id));if(a&&a.severity)return a.severity}return 0},c=function(e,t){for(var n=0,r=0;r<s.length;r++){var a=l(s[r]);a>=e&&a<=t&&n++}return n};return"3PointScale"!=e.symptom.severityTracking?null:t.createElement("div",{ref:e.innerRef,className:"mdhui-ss-symptom-severity-summaries"},t.createElement("div",{className:"mdhui-ss-symptom-severity-summary"},t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-label"},az("severe")),t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-count"},c(8,10))),t.createElement("div",{className:"mdhui-ss-symptom-severity-summary"},t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-label"},az("moderate")),t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-count"},c(4,7))),t.createElement("div",{className:"mdhui-ss-symptom-severity-summary"},t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-label"},az("mild")),t.createElement("div",{className:"mdhui-ss-symptom-severity-summary-count"},c(1,3))),t.createElement("div",{style:{clear:"both"}}))}A(".mdhui-ss-symptom-severity-summaries .mdhui-ss-symptom-severity-summary {\n width: 33%;\n float: left;\n text-align: center;\n padding: 16px;\n box-sizing: border-box;\n}\n\n.mdhui-ss-symptom-severity-summaries .mdhui-ss-symptom-severity-summary-label {\n padding: 8px;\n}\n\n.mdhui-ss-symptom-severity-summaries .mdhui-ss-symptom-severity-summary-count {\n font-size: 34px;\n font-weight: bold;\n}");let _he={participantID:"123",symptoms:[{id:"1",color:"#c4291c",name:"Headache",severityTracking:"3PointScale"},{id:"2",color:"#e35c33",name:"Nausea",severityTracking:"10PointScale"},{id:"3",color:"#5db37e",name:"Dizziness",severityTracking:"None"}],treatments:[{id:"10",color:"#c4291c",name:"Tylenol"},{id:"12",color:"#e35c33",name:"Rest"}]},Che={symptoms:[{id:"1",severity:2},{id:"2",severity:7},{id:"3"}],treatments:[{id:"10"},{id:"12"}],overallFeeling:5,notes:"I'm feeling a little better today."};function Ohe(e){const[n,r]=m({}),[a,i]=m(null),[o,s]=m([new Date]);function l(){if(pH(o[0])!=pH(new Date)&&s([new Date]),"default"!=e.previewState)rhe.getConfiguration().then((function(e){rhe.getDailyLogEntries().then((function(t){i(e),r(t)}))}));else{i(_he);let e=pH(Un(new Date,{days:-1}));r(Object.assign(Object.assign({},n),{[e]:Che}))}}return f((()=>(l(),b.on("applicationDidBecomeVisible",l),()=>{b.off("applicationDidBecomeVisible",l)})),[]),t.createElement("div",{ref:e.innerRef,className:"log-entry-list"},a&&o.map((r=>t.createElement(vhe,{noDataMessage:pH(r)==pH(new Date)?az("tap-to-log-today"):void 0,key:pH(r),date:r,configuration:a,logEntry:n[pH(r)],onClick:()=>e.onDaySelected(r)}))),t.createElement(qV,{enabled:!!a,onTrigger:()=>function(){for(var e=[...o],t=0;t<30;t++){var n=Un(e[e.length-1],{days:-1});e.push(n)}s(e)}()}),t.createElement(Dn,null))}function The(e){const[n,r]=m(null),[a,i]=m(void 0);var o=new Date;function s(){if("withLog"==e.previewState)return r(_he),void i(Che);"noLog"!=e.previewState?Promise.all([rhe.getDailyLogEntries(pH(Un(o,{days:-1}))),rhe.getConfiguration()]).then((function([e,t]){r(t),e[pH(o)]?i(e[pH(o)]):i(void 0)})):r(_he)}return o=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0,0),f((()=>(s(),b.on("applicationDidBecomeVisible",s),()=>{b.off("applicationDidBecomeVisible",s)})),[]),n&&n.symptoms.length?t.createElement(vhe,{onClick:t=>e.onClick(t),innerRef:e.innerRef,title:az(a?"todays-log":"log-todays-symptoms"),date:o,logEntry:a,configuration:n}):null}function Phe(e){const[n,r]=m(null),[a,i]=m(!1),[o,s]=m(null),[l,c]=m(!1),[u,d]=m(null);function h(e,t){t==az("mild-shortened")?t=2:t==az("moderate-shortened")?t=5:t==az("severe-shortened")&&(t=8);var r=Object.assign({},n),a=[...r.symptoms];a.find((t=>t.id==e.id))&&a.splice(a.findIndex((t=>t.id==e.id)),1),t&&a.push({id:e.id,severity:t}),r.symptoms=a,p(r),d(null)}function p(t){r(t),"default"!=e.previewState&&(c(!0),rhe.saveDailyLogEntry(pH(e.date),t).then((function(){c(!1)})))}function v(e){var t=Object.assign({},n);t.overallFeeling==e?t.overallFeeling=void 0:t.overallFeeling=e,p(t)}f((()=>{!function(){if("default"==e.previewState)return s(_he),void r(Che);var t=Un(e.date,{days:-14}),n=Un(e.date,{days:1});rhe.getConfiguration().then((function(a){rhe.getDailyLogEntries(ha(t),ha(n)).then((function(t){s(a),t[pH(e.date)]?r(t[pH(e.date)]):r({symptoms:[],treatments:[],notes:""}),e.promptForReviewAfterDays&&Object.keys(t).length>e.promptForReviewAfterDays&&i(!0)}))}))}()}),[]);const y=g((()=>$R.debounce(p,300)),[]);var w,x,k,S=sz(e.date);function A(e){var t=n.symptoms.find((t=>t.id==e.id));if(t){if("10PointScale"==e.severityTracking){if(!t.severity)return;return t.severity.toString()}if("3PointScale"==e.severityTracking){if(!t.severity)return;if(t.severity>0&&t.severity<=3)return az("mild-shortened");if(t.severity>3&&t.severity<=7)return az("moderate-shortened");if(t.severity>7)return az("severe-shortened")}}}return S+=", "+ia(e.date,"MMM d, yyyy"),t.createElement("div",{className:"mdhui-ss-log-entry-edit-wrapper"},t.createElement(Iz,{title:S,showBackButton:!0,variant:"compressed",backgroundColor:"var(--mdhui-background-color-0)",className:"mdhui-ss-edit-nav"}),t.createElement("div",{className:"mdhui-ss-log-entry-edit"},!n&&t.createElement(Dn,null),!!n&&!!o&&t.createElement(t.Fragment,null,t.createElement("div",{style:{width:"100%",overflow:"hidden"}},(x=(w=n).symptoms.map((e=>{var t;return null===(t=o.symptoms.find((t=>t.id==e.id)))||void 0===t?void 0:t.color})).filter((e=>!!e)).map((e=>e)),k=w.treatments.map((e=>{var t;return null===(t=o.treatments.find((t=>t.id==e.id)))||void 0===t?void 0:t.color})).filter((e=>!!e)).map((e=>e)),t.createElement(xz,{size:"large",key:x.join("|")+","+k.join("|"),primaryColors:x,secondaryColors:k}))),tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("symptoms-experiencing-today")),!tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("symptoms-experiencing-previous")),t.createElement("div",{className:"mdhui-ss-edit-items"},null==o?void 0:o.symptoms.filter((e=>!e.inactive)).map((e=>t.createElement(rL,{className:"mdhui-ss-edit-item",selected:!!n.symptoms.find((t=>t.id==e.id)),color:e.color,text:e.name,key:e.id,onClick:()=>function(e){if("10PointScale"!=e.severityTracking&&"3PointScale"!=e.severityTracking){var t=Object.assign({},n),r=[...t.symptoms];r.find((t=>t.id==e.id))?r.splice(r.findIndex((t=>t.id==e.id)),1):r.push({id:e.id}),t.symptoms=r,p(t)}else d(e)}(e),badge:A(e)})))),o.treatments.length>0&&t.createElement("div",null,tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("treatments-experiencing-today")),!tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("treatments-experiencing-previous")),t.createElement("div",{className:"mdhui-ss-edit-items"},null==o?void 0:o.treatments.filter((e=>!e.inactive)).map((e=>t.createElement(rL,{className:"mdhui-ss-edit-item",selected:!!n.treatments.find((t=>t.id==e.id)),color:e.color,text:e.name,key:e.id,onClick:()=>{return t=e,r=Object.assign({},n),(a=[...r.treatments]).find((e=>e.id==t.id))?a.splice(a.findIndex((e=>e.id==t.id)),1):a.push({id:t.id}),r.treatments=a,void p(r);var t,r,a},bordered:!0}))))),tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("feeling-overall-today")),!tr(new Date,e.date)&&t.createElement(bz,{className:"mdhui-ss-edit-title",order:3},az("feeling-overall-previous")),t.createElement("div",{className:"mdhui-ss-edit-items"},t.createElement(Pz,{className:"mdhui-ss-edit-face",faceValue:5,selected:5==n.overallFeeling,onClick:()=>v(5)}),t.createElement(Pz,{className:"mdhui-ss-edit-face",faceValue:4,selected:4==n.overallFeeling,onClick:()=>v(4)}),t.createElement(Pz,{className:"mdhui-ss-edit-face",faceValue:3,selected:3==n.overallFeeling,onClick:()=>v(3)}),t.createElement(Pz,{className:"mdhui-ss-edit-face",faceValue:2,selected:2==n.overallFeeling,onClick:()=>v(2)}),t.createElement(Pz,{className:"mdhui-ss-edit-face",faceValue:1,selected:1==n.overallFeeling,onClick:()=>v(1)})),t.createElement(bz,{className:"mdhui-ss-edit-title",order:3,style:{marginBottom:"16px"}},az("additional-notes")),t.createElement(Mz,{placeholder:az("add-notes"),autoTimestamp:tr(new Date,e.date),onChange:e=>{return t=e,(a=Object.assign({},n)).notes=t,r(a),void y(a);var t,a},value:n.notes}),t.createElement(Nn,{onClick:()=>(a&&b.requestReview(7),void(l||b.back()))},az("done")),u&&t.createElement("div",{className:"mdhui-ss-symptom-edit-modal"},t.createElement("div",{className:"mdhui-ss-symptom-edit-padder"},t.createElement("div",{className:"mdhui-ss-symptom-edit-container"},t.createElement(bz,{className:"mdhui-ss-edit-title",order:3,style:{marginBottom:"16px"}},tr(new Date,e.date)?az("how-severe-is"):az("how-severe-was")," ",u.name,"?"),"3PointScale"==u.severityTracking&&t.createElement(Wz,{variant:"optionsVertical",segments:[{key:az("mild-shortened"),title:az("mild")},{key:az("moderate-shortened"),title:az("moderate")},{key:az("severe-shortened"),title:az("severe")}],selectedSegment:A(u),onSegmentSelected:e=>h(u,e)}),"10PointScale"==u.severityTracking&&t.createElement(Wz,{variant:"optionsVertical",segments:[1,2,3,4,5,6,7,8,9,10].map((e=>({key:e.toString(),title:e.toString()}))),selectedSegment:A(u),onSegmentSelected:e=>h(u,parseInt(e))}),t.createElement(Nn,{className:"mdhui-ss-clear-symptom",variant:"subtle",onClick:()=>h(u,null)},az("clear-symptom"))))))))}A(".mdhui-ss-log-entry-edit-wrapper {\n background: var(--mdhui-background-color-0);\n}\n\n.mdhui-ss-log-entry-edit {\n text-align: center;\n padding-left: 16px;\n padding-right: 16px;\n padding-bottom: 16px;\n padding-top: 8px;\n position: relative;\n /*Prevents keyboard from covering notes on Android devices*/\n padding-bottom: 300px;\n overflow-x: hidden;\n width: 100%;\n box-sizing: border-box;\n}\n\n\n.mdhui-ss-log-entry-edit .mdhui-ss-edit-title {\n text-align: center;\n margin-bottom: 0;\n margin-top: 16px;\n display: block;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-edit-items {\n padding-top: 8px;\n padding-bottom: 16px;\n text-align: center;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-edit-item {\n margin: 4px;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-edit-face {\n margin-left: 8px;\n margin-right: 8px;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-symptom-edit-modal {\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: var(--mdhui-modal-overlay-color);\n overflow: auto;\n z-index: 999;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-symptom-edit-padder {\n padding-bottom: 16px;\n position: absolute;\n padding-top: 48px;\n top: env(safe-area-inset-top);\n left: 48px;\n right: 48px;\n}\n\n.mdhui-ss-log-entry-edit .mdhui-ss-symptom-edit-container {\n border-radius: var(--mdhui-card-border-radius);\n background: var(--mdhui-background-color-0);\n padding: 16px;\n}");function Dhe(e){var n=hr(new Date);const[r,a]=m({}),[i,o]=m(null),[s,l]=m(n),[c,u]=m(!0),[h,p]=m(!1),[f,g]=m(!1),[v,y]=m(!0),[w,x]=m([]),[k,S]=m([]),[A,_]=m(!0),[C,O]=m(!1),[T,P]=m(!1),D=d(null);if(cU((()=>{if("default"==e.previewState)return o({participantID:"1",symptoms:ohe,treatments:she}),void a(lhe);rhe.getConfiguration().then((function(e){rhe.getDailyLogEntries().then((function(t){o(e),a(t)}))}))}),[],[]),!i||!r)return t.createElement("div",{ref:e.innerRef},t.createElement(Dn,null));function N(){P(!0);for(var e,t,n=document.head.getElementsByTagName("style"),r="",a=0;a<n.length;a++)r+=n[a].outerHTML;r+=D.current.innerHTML,(e=r,t=i.participantID,b.persistDeviceData([{type:"ReportHtml",observationDate:ha(new Date),value:e}]).then((function(){var e=b.baseUrl+"WebVisualization/WebVisualizationPDF?patientID="+t+"&modelType=VisualizationModel&visualizationKey=Shared.HtmlToPdf";return b.getDeviceInfo().then((function(t){t&&"Web"!=t.platform?window.webkit.messageHandlers.OpenFile.postMessage({url:e}):window.open(e)}))}))).then((function(){P(!1)}))}return t.createElement("div",{className:"ss-report-builder"},t.createElement(Vz,{className:"ss-report-builder-items",noTopMargin:!0},t.createElement("div",{className:"ss-report-builder-item ss-report-builder-month-selector"},t.createElement("div",{className:"ss-report-builder-selector-title"},az("choose-report-month")),t.createElement(dz,{className:"ss-report-date-chooser",variant:"rounded",intervalStart:s,intervalType:"Month",onIntervalChange:e=>l(e)})),t.createElement(E,{className:"ss-report-builder-item",onClick:()=>u(!c)},t.createElement("div",{className:"ss-report-builder-item-title"},az("include-symptoms")),t.createElement("div",{className:"ss-report-builder-item-status"},t.createElement(Mq,{icon:c?Rq:zq}))),c&&t.createElement("div",{className:"ss-report-builder-item"},t.createElement("div",{className:"ss-report-builder-item-title"},az("select-symptoms")),t.createElement(E,{className:"ss-report-builder-item-status",onClick:()=>p(!h)},0==w.length?"All":w.length+" Selected"," ",t.createElement(Mq,{icon:h?en:Sn})),h&&t.createElement("div",{className:"ss-report-items",style:{textAlign:"center"}},i.symptoms.filter((e=>!e.inactive)).map((e=>t.createElement(rL,{className:"ss-report-item",key:e.id,selected:-1!=w.indexOf(e.id),color:e.color,text:e.name,onClick:()=>{return t=e,(n=[...w]).includes(t.id)?n.splice(n.indexOf(t.id),1):n.push(t.id),void x(n);var t,n}}))))),i.treatments.length>0&&t.createElement(t.Fragment,null,t.createElement(E,{className:"ss-report-builder-item",onClick:()=>y(!v)},t.createElement("div",{className:"ss-report-builder-item-title"},az("include-treatments")),t.createElement("div",{className:"ss-report-builder-item-status"},t.createElement(Mq,{icon:v?Rq:zq}))),v&&t.createElement("div",{className:"ss-report-builder-item"},t.createElement("div",{className:"ss-report-builder-item-title"},az("select-treatments")),t.createElement(E,{className:"ss-report-builder-item-status",onClick:()=>g(!f)},0==k.length?"All":k.length+" Selected"," ",t.createElement(Mq,{icon:f?en:Sn})),f&&t.createElement("div",{className:"ss-report-items",style:{textAlign:"center"}},i.treatments.filter((e=>!e.inactive)).map((e=>t.createElement(rL,{bordered:!0,className:"ss-report-item",key:e.id,selected:-1!=k.indexOf(e.id),color:e.color,text:e.name,onClick:()=>{return t=e,(n=[...k]).includes(t.id)?n.splice(n.indexOf(t.id),1):n.push(t.id),void S(n);var t,n}})))))),t.createElement(E,{className:"ss-report-builder-item",onClick:()=>_(!A)},t.createElement("div",{className:"ss-report-builder-item-title"},az("include-overall-experience")),t.createElement("div",{className:"ss-report-builder-item-status"},t.createElement(Mq,{icon:A?Rq:zq}))),t.createElement(E,{className:"ss-report-builder-item",onClick:()=>O(!C)},t.createElement("div",{className:"ss-report-builder-item-title"},az("include-notes")),t.createElement("div",{className:"ss-report-builder-item-status"},t.createElement(Mq,{icon:C?Rq:zq})))),t.createElement("div",{style:{padding:"16px",paddingTop:"0"}},t.createElement(Nn,{loading:T,disabled:T||!c&&!v&&!C&&!A,onClick:()=>N()},!T&&t.createElement("span",null,az("create-report")))),t.createElement("div",{ref:D,style:{display:"none"}},t.createElement(vz.Provider,{value:{intervalStart:s,intervalType:"Month"}},t.createElement(dhe.Provider,{value:{logEntries:r,symptoms:c?i.symptoms.filter((e=>!w.length||-1!=w.indexOf(e.id))):[],treatments:v?i.treatments.filter((e=>!k.length||-1!=k.indexOf(e.id))):[],hasFilteredSymptoms:!!w.length}},t.createElement(She,{includeDailyOverallFeeling:A,includeNotes:C,productLogo:e.productLogo,productUrl:e.productUrl,productName:e.productName})))))}function Nhe(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"light"},t.createElement(yz,{variant:"rounded",intervalType:"Month",sticky:!0},t.createElement(hhe,{showFilters:!0,previewState:e.previewState},t.createElement(Vz,null,t.createElement(phe,{onDaySelected:e.onDaySelected})),t.createElement(Vz,null,t.createElement(Ahe,{onSymptomSelected:e.onSymptomSelected})),t.createElement(Vz,null,t.createElement(ghe,null)),t.createElement(Ihe,null))))}function Ihe(){let e=i(dhe);if(!e)return t.createElement(nL,null,"Error: Calendar severity charts must be used inside a Symptom Shark Visualization Coordinator.");let{hasFilteredSymptoms:n,symptoms:r}=e;return n?t.createElement(t.Fragment,null,r.filter((e=>"None"!=e.severityTracking)).map((e=>t.createElement(Vz,{key:e.id},t.createElement(khe,{symptom:e}))))):null}function Mhe(e){return t.createElement(Kt,{bodyBackgroundColor:"var(--mdhui-background-color-0)",colorScheme:e.colorScheme||"light"},t.createElement(Phe,Object.assign({},e)))}function jhe(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"light"},t.createElement(Iz,{variant:"compressed",title:az("reports")}),t.createElement(Dhe,{previewState:e.previewState}))}function Rhe(e){return t.createElement(Kt,{colorScheme:e.colorScheme||"light",className:"symptom-detail-view symptom-shark-view"},t.createElement(hhe,{previewState:e.previewState},t.createElement(zhe,Object.assign({},e))))}function zhe(e){let n=i(dhe);if(!n)return null;let r=n.symptoms.find((t=>t.id==e.symptomId));if(!r)return null;var a=e.initialIntervalStart||hr(new Date);return t.createElement(t.Fragment,null,t.createElement(Iz,{title:r.name,showCloseButton:!0}),t.createElement(yz,{initialIntervalStart:a,intervalType:"Month",variant:"rounded"},t.createElement(Vz,{noTopMargin:!0},t.createElement(Ehe,{symptom:r})),t.createElement(Vz,null,t.createElement(khe,{symptom:r}))))}function Lhe(e){return t.createElement(Kt,null,t.createElement(Iz,{showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation},t.createElement(bz,{order:2,autosizeImage:!0,image:t.createElement("img",{src:FW}),imageAlignment:"left"},az("allergies-title"))),t.createElement(Ms,null,t.createElement(iV,{previewState:e.previewState,onViewTermInfo:t=>function(t){if(e.onViewTermInfo)e.onViewTermInfo(t);else{var n=new URLSearchParams({termFamily:t.TermFamily,termNamespace:t.TermNamespace,termCode:t.TermCode,lang:b.getCurrentLanguage()}).toString();b.openApplication("https://hw.careevolutionapps.com/TermInformation.html?"+n,{modal:!0})}}(t)})))}function Fhe(e){var n;return t.createElement(Kt,{bodyBackgroundColor:e.bodyBackgroundColor,colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",primaryColor:e.primaryColor},(e.showBackButton||e.showCloseButton)&&t.createElement(Iz,{title:e.title,showBackButton:e.showBackButton,showCloseButton:e.showCloseButton,subtitle:e.subtitle,titleColor:e.titleColor,subtitleColor:e.subtitleColor,buttonColor:e.navigationBarButtonColor}),!(e.showBackButton||e.showCloseButton)&&t.createElement(t.Fragment,null,t.createElement(tL,null),t.createElement(Fq,{title:e.title,subtitle:e.subtitle,titleColor:e.titleColor,subtitleColor:e.subtitleColor})),e.children)}function Bhe(e){return t.createElement(Kt,null,t.createElement(Iz,{showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation},t.createElement(bz,{order:2,autosizeImage:!0,image:t.createElement("img",{src:qW}),imageAlignment:"left"},az("conditions-title"))),t.createElement(Ms,null,t.createElement(mV,{previewState:e.previewState,onViewTermInfo:t=>function(t){if(e.onViewTermInfo)e.onViewTermInfo(t);else{var n=new URLSearchParams({termFamily:t.TermFamily,termNamespace:t.TermNamespace,termCode:t.TermCode,lang:b.getCurrentLanguage()}).toString();b.openApplication("https://hw.careevolutionapps.com/TermInformation.html?"+n,{modal:!0})}}(t)})))}function qhe(e){var n;let r="",a=[];return e.excludeProviders||(a.push("Provider"),r+=az("connect-ehr-title-providers")),e.excludeHealthPlans||(a.push("Health Plan"),r.length>0&&(r+=az("connect-ehr-title-divider")),r+=az("connect-ehr-title-health-plans")),r=az("connect-ehr-title-prefix")+r,t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},e.presentation&&t.createElement(Iz,{title:r,showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(tL,null),t.createElement(nL,null,az("ehr-intro")),t.createElement(Ms,null,t.createElement(xW,{previewState:e.preview?"Default":void 0,applicationUrl:e.externalAccountsApplicationUrl,excludeProviders:e.excludeProviders,excludeHealthPlans:e.excludeHealthPlans,excludeDeviceManufacturers:!0})),t.createElement(Ms,null,t.createElement(hG,{previewState:e.preview?"Default":void 0,providerCategories:a})))}function Hhe(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(tL,null),t.createElement(Ms,{allowOverflow:!0},t.createElement(FV,{previewState:e.preview?"Default":void 0})),t.createElement(Ms,null,t.createElement(IW,{previewState:e.preview?"connected":void 0})),t.createElement(Ms,null,t.createElement(zW,{previewState:e.preview?"connected":void 0})),t.createElement(Ms,null,t.createElement(EV,{previewState:e.preview?"Web":void 0})))}function Uhe(e){let n="",r=t.createElement(t.Fragment,null);switch(e.feed){case"Procedures":n=az("procedures-title"),r=t.createElement("img",{src:XV});break;case"Reports":n=az("reports-title"),r=t.createElement("img",{src:KV});break;case"Immunizations":n=az("immunizations-title"),r=t.createElement("img",{src:QV});break;case"LabReports":n=az("lab-results-title"),r=t.createElement("img",{src:JV})}return t.createElement(Kt,{colorScheme:e.colorScheme},t.createElement(Iz,{showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation},t.createElement(bz,{order:2,autosizeImage:!0,image:r,imageAlignment:"left"},n)),t.createElement(sW,{feed:e.feed,onEventSelected:e.onEventSelected,onReportSelected:e.onReportSelected,previewState:e.previewState}))}function Vhe(e){return t.createElement(Kt,{colorScheme:e.colorScheme},t.createElement(Iz,{variant:"compressed",showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),t.createElement(cW,{feed:e.feed,pageId:e.pageId,pageDate:e.pageDate,previewState:e.previewState,onViewLabObservationTermInfo:e.onViewLabObservationTermInfo}))}function Whe(e){var n;let r="",a=[];return e.excludeProviders||(a.push("Provider"),r+=az("external-accounts-title-providers")),e.excludeHealthPlans||(a.push("Health Plan"),r.length>0&&(r+=az("external-accounts-title-divider")),r+=az("external-accounts-title-health-plans")),e.excludeDeviceManufacturers||(a.push("Device Manufacturer"),r.length>0&&(r+=az("external-accounts-title-divider")),r+=az("external-accounts-title-devices")),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},e.presentation&&t.createElement(Iz,{title:r,showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation,onBack:e.onBack,onClose:e.onClose}),!e.presentation&&t.createElement(tL,null),t.createElement(vW,{previewState:e.previewState,externalAccountProviderCategories:a,onExternalAccountsLoaded:function(t){0===t.length&&("Modal"===e.presentation?b.dismiss():b.back())},connectExternalAccountOptions:e.connectExternalAccountOptions}))}function Ghe(e){var n,[r,a]=m(!1);return f((()=>{b.connect().then((()=>{a(!0)}))}),[]),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(tL,null),r&&t.createElement(t.Fragment,null,t.createElement(Ms,null,t.createElement(MV,{previewState:e.connectPreview,disabledBehavior:"displayError"})),t.createElement(Ms,null,t.createElement(IW,{previewState:e.devicesPreview})),t.createElement(Ms,{allowOverflow:!0},t.createElement(jW,{previewState:e.chartsPreview}))),!r&&t.createElement(Dn,null))}function $he(e){var[n,r]=m(!1);return f((()=>{b.connect().then((()=>{r(!0)}))}),[]),t.createElement(Kt,null,t.createElement(tL,{color:"var(--main-bg-color)"}),n&&t.createElement(t.Fragment,null,t.createElement(Ms,null,t.createElement(jV,{previewState:e.connectPreview,garminProviderID:e.garminProviderID,disabledBehavior:"displayError"})),t.createElement(Ms,null,t.createElement(zW,{previewState:e.devicesPreview})),t.createElement(Ms,{allowOverflow:!0},t.createElement(LW,{previewState:e.chartsPreview}))),!n&&t.createElement(Dn,null))}function Zhe(e){var n,r="Push";e.notificationType&&(r=e.notificationType);return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(tL,{color:"#FFFFFF"}),t.createElement(Ms,null,t.createElement(cV,{previewDevicePlatform:e.preview?"Web":void 0,previewProjectPlatforms:e.preview?["Web","Android","iOS"]:void 0})),t.createElement(Ms,null,t.createElement(eG,{notificationType:r,onViewMore:e.notificationsViewUrl?()=>{e.notificationsViewUrl&&b.openApplication(e.notificationsViewUrl)}:void 0,previewState:e.preview?"Default":void 0,hideAfterHours:e.notificationHideAfterHours})),t.createElement(AG,{variant:"singleCard",status:"incomplete",limit:3,title:az("tasks"),onDetailLinkClick:e.tasksViewUrl?()=>{e.tasksViewUrl&&b.openApplication(e.tasksViewUrl)}:void 0,previewState:e.preview?"IncompleteTasks":void 0}),t.createElement(Ms,null,t.createElement(EV,{headerVariant:"medium",previewState:e.preview?"Web":void 0})),t.createElement(Ms,null,e.ehrConnectApplicationUrl&&t.createElement(DV,{variant:"medium",previewState:e.preview?"enabled":void 0,applicationUrl:e.ehrConnectApplicationUrl})),t.createElement(Ms,null,t.createElement(sG,{previewState:e.preview?"Default":void 0})))}function Yhe(e){var n,r;function a(){b.openApplication("https://hw.careevolutionapps.com/LabReports.html?lang="+b.getCurrentLanguage())}function i(e){var t=new URLSearchParams({termFamily:e.TermFamily,termNamespace:e.TermNamespace,termCode:e.TermCode,lang:b.getCurrentLanguage()}).toString();b.openApplication("https://hw.careevolutionapps.com/TermInformation.html?"+t,{modal:!0})}let o=null!==(n=e.variant)&&void 0!==n?n:"default";function s(n){var r=function(){return t.createElement(HW,{concept:n,onClick:()=>function(e){b.openApplication("https://hw.careevolutionapps.com/"+e+".html")}(n),previewState:"default"==e.previewState?"Default":void 0,indicatorPosition:"cardBased"==o?"topRight":"default"})};return"cardBased"==e.variant?t.createElement(Ms,null,r()):r()}return t.createElement(Kt,{colorScheme:null!==(r=e.colorScheme)&&void 0!==r?r:"auto"},t.createElement(tL,null),t.createElement(bW,{previewState:"default"==e.previewState?"externalAccountsLoaded":void 0,externalAccountCategories:["Provider","Health Plan"]}),"default"==o&&t.createElement(Vz,{noTopMargin:!0},t.createElement(XW,{onViewTermInfo:e=>i(e),onClick:()=>a(),previewState:"default"==e.previewState?"ImportantLabs":void 0}),t.createElement($W,{previewState:"default"==e.previewState?"BloodTypeLabs":void 0}),s("Medications"),s("Immunizations"),s("Reports"),s("Allergies"),s("Conditions"),s("Procedures"),t.createElement(xW,{excludeDeviceManufacturers:!0,applicationUrl:e.externalAccountsApplicationUrl,previewState:"default"==e.previewState?"Default":void 0})),"cardBased"==o&&t.createElement(t.Fragment,null,t.createElement(Ms,null,t.createElement(XW,{onViewTermInfo:e=>i(e),onClick:()=>a(),previewState:"default"==e.previewState?"ImportantLabs":void 0})),t.createElement(Ms,null,t.createElement($W,{previewState:"default"==e.previewState?"BloodTypeLabs":void 0})),s("Medications"),s("Immunizations"),s("Reports"),s("Allergies"),s("Conditions"),s("Procedures"),t.createElement(Ms,null,t.createElement(xW,{excludeDeviceManufacturers:!0,applicationUrl:e.externalAccountsApplicationUrl,previewState:"default"==e.previewState?"Default":void 0}))),t.createElement(Ms,null,t.createElement(DV,{bottomBorder:!0,applicationUrl:e.connectEhrApplicationUrl,previewState:"default"==e.previewState?"enabledConnected":void 0})))}function Khe(e){return t.createElement(Kt,null,t.createElement(Iz,{showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation},t.createElement(bz,{order:2,autosizeImage:!0,image:t.createElement("img",{src:BW}),imageAlignment:"left"},az("medications-title"))),t.createElement(Ms,null,t.createElement(QW,{previewState:e.previewState,onViewTermInfo:t=>function(t){if(e.onViewTermInfo)e.onViewTermInfo(t);else{var n=new URLSearchParams({termFamily:t.TermFamily,termNamespace:t.TermNamespace,termCode:t.TermCode,lang:b.getCurrentLanguage()}).toString();b.openApplication("https://hw.careevolutionapps.com/TermInformation.html?"+n,{modal:!0})}}(t)})))}function Xhe(e){var n,r="Push";return e.notificationType&&(r=e.notificationType),t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},e.presentation&&t.createElement(Iz,{title:az("notifications"),showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(tL,null),t.createElement(nG,{notificationType:r,previewState:e.preview?"Default":void 0}))}function Qhe(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},e.presentation&&t.createElement(Iz,{title:az("tasks"),showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(tL,null),!e.hideIncompleteTasks&&t.createElement(AG,{variant:"multiCard",title:az("incomplete-tasks"),status:"incomplete",previewState:e.preview?"IncompleteTasks":void 0}),!e.hideCompleteTasks&&t.createElement(AG,{variant:"multiCard",title:az("completed-tasks"),status:"complete",previewState:e.preview?"CompleteTasks":void 0}))}A(".ss-report-builder {\n padding-bottom: env(safe-area-inset-bottom);\n position: relative;\n padding-bottom: 16px;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item {\n border-bottom: solid 1px var(--mdhui-border-color-1);\n padding: 16px;\n background: var(--mdhui-background-color-0);\n position: relative;\n cursor: pointer;\n width: 100%;\n box-sizing: border-box;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item .ss-report-builder-item-title {\n font-weight: normal;\n font-size: 17px;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item .ss-report-builder-item-status {\n position: absolute;\n right: 0;\n top: 0;\n padding: 16px;\n cursor: pointer;\n text-align: right;\n width: 100%;\n font-weight: bold;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item svg {\n color: var(--mdhui-text-color-3);\n font-size: 17px;\n top: calc(50% - 16px);\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item .fa-circle-check {\n color: var(--mdhui-color-success);\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item.ss-report-builder-month-selector {\n text-align: center;\n font-size: 17px;\n font-weight: bold;\n cursor: auto;\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-builder-item.ss-report-month-selector .ss-report-builder-selector-title {\n text-transform: uppercase;\n font-size: 12px;\n color: var(--mdhui-text-color-2);\n padding-bottom: 4px;\n}\n\n.ss-report-builder .ss-report-builder-items .ss-report-date-chooser {\n background: none;\n}\n\n.ss-report-builder .ss-report-items {\n margin-top: 12px;\n margin-bottom: -4px;\n}\n\n.ss-report-builder .ss-report-items .ss-report-item {\n margin: 4px;\n}\n\n.ss-report-builder .ss-report-report-date-chooser {\n margin: 0;\n}");function Jhe(e){var n,r;let a=e.entries.reduce(((e,t)=>e+(t.bonusPoints||0)),0),i=e.entries.reduce(((e,t)=>e+t.points),a);return t.createElement(Kt,{bodyBackgroundColor:"dark"===e.colorScheme?"":"#fff",colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto",primaryColor:e.primaryColor},t.createElement("div",{className:"mdhui-new-points"},t.createElement(zz,{animate:!0},t.createElement("div",{className:"mdhui-new-points-total"},t.createElement("div",{className:"mdhui-new-points-total-points"},"+",i),t.createElement("div",{className:"mdhui-new-points-total-points-label"},"points"))),t.createElement("div",{className:"mdhui-new-points-content"},1==e.entries.length&&e.entries[0].message&&0===a&&t.createElement("div",null,t.createElement("div",{className:"mdhui-new-points-title"},e.entries[0].message.title),t.createElement("div",{className:"mdhui-new-points-text"},e.entries[0].message.text)),(e.entries.length>1||!e.entries[0].message||a>0)&&t.createElement("div",null,t.createElement("div",{className:"mdhui-new-points-title"},az("new-points-title")),t.createElement("div",{className:"mdhui-new-points-text"},az("new-points-text")),t.createElement("div",{className:"mdhui-new-points-entries"},e.entries.map(((e,n)=>t.createElement("div",{key:n,className:"mdhui-new-points-entry"},t.createElement("div",{className:"mdhui-new-points-entry-name"},e.name),t.createElement("div",{className:"mdhui-new-points-entry-points"},"+",e.points)))),a>0&&t.createElement("div",{className:"mdhui-new-points-entry"},t.createElement("div",{className:"mdhui-new-points-entry-name bonus"},"Bonus"),t.createElement("div",{className:"mdhui-new-points-entry-points bonus"},"+",a)))),e.pointsToNextReward&&t.createElement("div",{className:"mdhui-new-points-next-reward"},az("new-points-next-reward-prefix"),t.createElement("span",{className:"mdhui-new-points-next-reward-points"},e.pointsToNextReward),az("new-points-next-reward-suffix"))),t.createElement("div",{className:"mdhui-new-points-button-panel"},t.createElement(Nn,{onClick:()=>b.dismiss()},null!==(r=e.doneButtonText)&&void 0!==r?r:az("new-points-done-button-text")))))}function eme(e,t){let n={type:"MDHUI-NewPoints",value:JSON.stringify(e)};b.persistDeviceData([n]).then((()=>{b.openApplication(t||"https://viewlibrary.careevolutionapps.com/newpoints",{modal:!0})}))}A(".mdhui-new-points {\n margin: calc(20px + env(safe-area-inset-top, 0px)) 20px 20px;\n}\n\n.mdhui-new-points-total {\n margin-top: 10px;\n text-align: center;\n}\n\n.mdhui-new-points-total-points {\n font-weight: bold;\n font-size: 40px;\n height: 50px;\n line-height: 50px;\n color: var(--mdhui-color-primary);\n}\n\n.mdhui-new-points-content {\n text-align: center;\n opacity: 0;\n animation: fadein 750ms ease-in-out;\n animation-delay: 750ms;\n animation-fill-mode: forwards;\n}\n\n.mdhui-new-points-title {\n margin: 32px 0 20px 0;\n font-size: 2em;\n font-weight: bold;\n}\n\n.mdhui-new-points-text {\n padding: 0 20px;\n}\n\n.mdhui-new-points-entries {\n margin-top: 20px;\n text-align: left;\n}\n\n.mdhui-new-points-entry {\n display: grid;\n grid-template-columns: auto max-content;\n align-items: center;\n}\n\n.mdhui-new-points-entry-name {\n font-size: 1.1em;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.mdhui-new-points-entry-points {\n width: 50px;\n color: var(--mdhui-color-primary);\n font-size: 1.1em;\n font-weight: bold;\n text-align: end;\n}\n\n.mdhui-new-points-next-reward {\n margin-top: 20px;\n padding: 0 20px;\n}\n\n.mdhui-new-points-next-reward-points {\n color: var(--mdhui-color-primary);\n font-weight: bold;\n}\n\n.mdhui-new-points-entry .bonus {\n color: #ffcc5b;\n font-weight: bold;\n}\n\n.mdhui-new-points-button-panel {\n margin: 20px 0 36px 0;\n opacity: 0;\n animation: fadein 750ms ease-in-out;\n animation-delay: 750ms;\n animation-fill-mode: forwards;\n}");function tme(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(cK,null,t.createElement(nme,Object.assign({},e))))}function nme(e){const[n,r]=m(),[a,i]=m(),[o,s]=m();let l=!n&&!a&&!o,c=[...null!=n?n:[],...null!=a?a:[],...null!=o?o:[]];return t.createElement("div",{className:"mdhui-inbox"},t.createElement(Fq,{title:az("inbox-view-title")}),l&&t.createElement(Dn,null),!l&&0===c.length&&t.createElement("div",{className:"mdhui-inbox-empty-text"},az("inbox-view-empty-text")),t.createElement(hK,{previewState:"default"===e.previewState?"incomplete message":void 0,title:az("inbox-view-messages-title"),type:"message",status:"incomplete",sortOrder:"descending",sortColumn:"insertedDate",messageViewerUrl:e.messageViewerUrl,onItemsLoaded:r,hideLoadingIndicator:!0,category:e.itemCategory}),t.createElement(hK,{previewState:"default"===e.previewState?"incomplete survey":void 0,title:az("inbox-view-surveys-title"),type:"survey",status:"incomplete",sortOrder:"ascending",sortColumn:"dueDate",onItemsLoaded:i,hideLoadingIndicator:!0,surveyVariant:e.surveyVariant,category:e.itemCategory}),t.createElement(hK,{previewState:"default"===e.previewState?"incomplete resource":void 0,title:az("inbox-view-resources-title"),type:"resource",status:"incomplete",sortOrder:"descending",sortColumn:"insertedDate",onItemsLoaded:s,hideLoadingIndicator:!0,resourceImageAlignment:e.resourceImageAlignment,category:e.itemCategory}),t.createElement("div",{className:"mdhui-inbox-recently-completed"},t.createElement(hK,{previewState:"default"===e.previewState?"complete items":void 0,title:az("inbox-view-recently-completed-title"),status:"complete",sortOrder:"descending",sortColumn:"endDate",messageViewerUrl:e.messageViewerUrl,endsAfter:Un(new Date,{days:-3}).toISOString(),showTitleWhenEmpty:!0,emptyText:az("inbox-view-recently-completed-empty-text"),syncOnChanges:!0,category:e.itemCategory}),!l&&t.createElement(Ms,null,t.createElement(Xt,{title:az("inbox-view-history-button-text"),onClick:()=>{b.openApplication(e.historyViewerUrl,{modal:!0})}}))))}A(".mdhui-inbox {\n padding: calc(env(safe-area-inset-top, 0px) + 20px) 16px calc(env(safe-area-inset-bottom, 0px) + 20px);\n}\n\n.mdhui-inbox .mdhui-view-header {\n padding: 0;\n}\n\n.mdhui-inbox .mdhui-view-header .mdhui-view-header-title {\n font-size: 1.8em;\n}\n\n.mdhui-inbox-empty-text {\n color: var(--mdhui-text-color-3);\n padding: 16px 0;\n}\n\n.mdhui-inbox-recently-completed {\n margin-top: 20px;\n}\n\n.mdhui-inbox-recently-completed .mdhui-inbox-item-list-title {\n color: var(--mdhui-text-color-0);\n margin-bottom: 12px;\n font-size: 1.4em;\n font-weight: bold;\n}\n\n.mdhui-inbox-recently-completed .mdhui-card {\n margin: 12px 0 0 0;\n}");function rme(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(Iz,{showCloseButton:!0}),t.createElement("div",{className:"mdhui-inbox-history"},t.createElement(bz,{order:3},az("inbox-history-view-title")),t.createElement(hK,{previewState:"default"===e.previewState?"complete items":void 0,status:"complete",messageViewerUrl:e.messageViewerUrl,emptyText:az("inbox-history-view-empty-text")})))}function ame(e){var n;return t.createElement(Kt,{colorScheme:null!==(n=e.colorScheme)&&void 0!==n?n:"auto"},t.createElement(Iz,{variant:"compressed",showCloseButton:!0},t.createElement(bz,{order:1},e.title)),t.createElement(Hz,{previewState:e.previewState,resources:e.resources,onViewResource:t=>{e.previewState||b.openEmbeddedUrl(t.url)},emptyText:e.emptyText,imageAlignment:e.resourceImageAlignment,buttonVariant:e.resourceButtonVariant,buttonText:e.resourceButtonText}))}A(".mdhui-inbox-history {\n padding: calc(env(safe-area-inset-top, 0px)) 16px calc(env(safe-area-inset-bottom, 0px) + 20px);\n}");function ime(e){return t.createElement("div",{className:"mdhui-report-content"},"text/html"==e.contentType&&t.createElement("iframe",{sandbox:"",srcDoc:e.content}),"application/pdf"==e.contentType&&t.createElement("div",{className:"mdhui-report-content-download-pdf","ng-if":"$ctrl.report.ContentType == 'application/pdf'","ng-show":"$ctrl.srcSet = true"},t.createElement("a",{href:"data:application/pdf;base64,"+e.content,download:e.type+".pdf",title:"Download PDF Report"},t.createElement(D,{icon:wn}),"Download PDF Report")))}A(".mdhui-report-content {\n min-height: 200px;\n}\n\n.mdhui-report-content iframe {\n border: none;\n padding: 0;\n margin: 0;\n width: 100%;\n height: 100%;\n background: #FFF;\n min-height: 200px;\n}\n\n.mdhui-report-content .mdhui-report-content-download-pdf a {\n padding: 16px;\n margin: 0 auto;\n background: var(--mdhui-color-primary);\n color: #FFF;\n font-weight: bold;\n border-radius: 6px;\n text-decoration: none;\n text-align: center;\n display: block;\n width: 200px;\n margin-top: var(--mdhui-padding-md);\n}\n\n.mdhui-report-content .mdhui-report-content-download-pdf svg {\n display: block;\n text-align: center;\n width: 100%;\n margin-bottom: var(--mdhui-padding-md);\n}");let ome='<!DOCTYPE html><html xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:n3="http://www.w3.org/1999/xhtml" xmlns:n1="urn:hl7-org:v3" xmlns:n2="urn:hl7-org:v3/meta/voc" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:in="urn:lantana-com:inline-variable-data"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\x3c!--\r\n Do NOT edit this HTML directly, it was generated via an XSLt\r\n transformation from the original release 2 CDA Document.\r\n --\x3e<title>Encounter Summary</title><style>\r\n \r\n body { font-family:Helvetica, Arial, sans-serif; font-size: 12px; margin: 16px; text-align: left; margin-bottom:0; } \r\n .title { font-size: 21px; font-weight: bold; line-height:1.5em;}\r\n .document-info { font-size:12px; margin-bottom:16px; color:#999; line-height:1.5em; }\r\n \r\n \r\n .patient-info-table { border-spacing: 0; width:100%; }\r\n .patient-info-table th { text-align:left; font-size:11px; color:#999; font-weight:normal; vertical-align:top; padding-right:8px; border-bottom:solid 1px #eee; padding-top:4px; padding-bottom:4px; }\r\n .patient-info-table td { text-align:left; font-size:12px; color:#000; vertical-align:top; border-bottom:solid 1px #eee; padding-top:4px; padding-bottom:4px; }\r\n .patient-info-table tr:last-child th, .patient-info-table tr:last-child td { border-bottom:none; }\r\n\r\n .data-table { margin-left: -16px; margin-right:-16px; margin-bottom:16px; }\r\n .data-table table, .data-table td, .data-table th { border:none; }\r\n\r\n .data-table > span { margin-left:16px; margin-right:16px; }\r\n .data-table table { border-collapse: collapse; }\r\n .data-table th { padding-bottom:4px; padding-top:4px; padding-right:8px; padding-left:8px; text-align: left; text-transform: uppercase; font-weight: normal; color: #666; font-size: 11px; border-bottom: #ddd 1px solid; vertical-align:bottom; }\r\n .data-table tr:nth-child(even) td { background-color: #f5f5f5; }\r\n .data-table td { vertical-align: top; font-size:12px; padding-bottom:4px; padding-top:4px; padding-right:8px; padding-left:8px;}\r\n .data-table td:first-child, .data-table th:first-child { padding-left:16px;}\r\n \r\n p { margin: 0 0 4px 0em; }\r\n\r\n .wrap-collabsible { position:relative; margin-left:-16px; margin-right:-16px; }\r\n input[type=\'checkbox\'] { display: none; }\r\n .lbl-toggle { display: block; font-size: 17px; text-align: left; padding:8px; padding-left:16px; padding-right:16px; border-top: solid 1px #ddd; cursor: pointer; transition: all 0.25s ease-out; position: sticky; position: -webkit-sticky; top: 0; left: 0; background: #FFF; color: #3e6e9a; font-weight: bold; }\r\n .lbl-toggle:hover { opacity:.9; }\r\n .lbl-toggle::before { content: \' \'; display: inline-block; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 5px solid currentColor; vertical-align: middle; margin-right: .7rem; transform: translateY(-2px); transition: transform .2s ease-out; position: absolute; right: 8px; top: 16px; }\r\n .toggle:checked + .lbl-toggle::before { transform: rotate(90deg) translateX(-3px); }\r\n .collapsible-content { max-height: 0px; overflow-x: auto; overflow-y: hidden; }\r\n .toggle:checked + .lbl-toggle + .collapsible-content { max-height: 999999px; }\r\n .collapsible-content .content-inner { background: #FFF; padding:8px; padding-left:16px; padding-right:16px; }\r\n \r\n </style></head><body><div class="title">Encounter Summary</div><div class="document-info"><div class="document-date">\r\n Document Created\r\n May 29, 2023</div><div class="custodian"><div>Custodian: Cedars-Sinai Health System</div></div></div><div class="wrap-collabsible"><input id="collapsible" class="toggle" type="checkbox" /><label for="collapsible" class="lbl-toggle">Patient Information</label><div class="collapsible-content"><div class="content-inner"><table class="patient-info-table" cellpadding="0" cellspacing="0"><tr><td colspan="2" style="font-size:14px;">AmbulatorySeniorF Xxxcshs </td></tr><tr><th>Date of Birth</th><td>January 1, 1947</td></tr><tr><th>Race</th><td>Unknown</td></tr><tr><th>Patient ID</th><td>CSHJWLL1B3TGMWX</td></tr><tr><th>Sex</th><td>Female</td></tr><tr><th>Ethnicity</th><td>Unknown</td></tr><tr><th>Preferred Language</th><td>Information not available</td></tr><tr><th>Address</th><td>6500 Wilshire Blvd<br /><br />LOS ANGELES, CA, 90046<br />tel:+1-626-315-4807</td></tr><tr><th>Care Team Member(s)</th><td>Dr. Masson of Cedars-Sinai Health System<br />, , <br />tel:+1-310-248-7000<br /><br /></td></tr><tr><th>Guardian</th><td><div><br /></div></td></tr><tr><th>Next of Kin</th><td><div><br /></div></td></tr><tr><th>Other Caregivers(s)</th><td /></tr><tr><th>Emergency Contact</th><td><div><br /></div></td></tr><tr><th>Comments:</th><td /></tr></table></div></div></div><div class="wrap-collabsible"><input id="ID0EDGAC" class="toggle" type="checkbox" /><label for="ID0EDGAC" class="lbl-toggle" data-loinc-code="X-DOCCMT">Note from Cedars-Sinai Health System</label><div class="collapsible-content"><div class="content-inner">This document contains information that was shared with AmbulatorySeniorF Xxxcshs. It may not contain the entire record from Cedars-Sinai Health System.</div></div></div><div class="wrap-collabsible"><input id="ID0EVGAC" class="toggle" type="checkbox" /><label for="ID0EVGAC" class="lbl-toggle" data-loinc-code="46240-8">Encounter Details</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%"><colgroup><col width="10%" /><col width="15%" /><col span="3" width="25%" /></colgroup><thead><tr><th>Date</th><th>Type</th><th>Department</th><th>Care Team</th><th>Description</th></tr></thead><tbody><tr ID="encounter2" style="" id="encounter2"><td>04/15/2019 9:30 AM PDT</td><td ID="encounter2type" id="encounter2type">Office Visit</td><td><p>CSMG Internal Medicine</p><p>8767 Wilshire Blvd</p><p>3rd Floor</p><p>BEVERLY HILLS, CA 90211</p><p>310-385-6031</p></td><td><p style="font-weight:bold;">Dr. Gray</p><p>8767 WILSHIRE BLVD</p><p>3RD FLOOR-SUITE 301</p><p>BEVERLY HILLS, CA 90211</p><p>310-385-6064 (Work)</p><p>424-314-8735 (Fax)</p></td><td><span id="encounter2desc" /></td></tr></tbody></table></div></div></div></div><div class="wrap-collabsible"><input id="ID0EJNAG" class="toggle" type="checkbox" /><label for="ID0EJNAG" class="lbl-toggle" data-loinc-code="29762-2">Social History</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%" ID="sochist14" id="sochist14"><colgroup><col span="2" width="25%" /><col width="13%" /><col width="12%" /><col width="25%" /></colgroup><thead><tr><th>Tobacco Use</th><th>Types</th><th>Packs/Day</th><th>Years Used</th><th>Date</th></tr></thead><tbody><tr><td>Smoking Tobacco: Former</td><td>Cigarettes</td><td ID="sochist14packsperday" id="sochist14packsperday">0.5</td><td /><td>1999 - 06/2010</td></tr></tbody></table></div><div class="data-table"><table width="100%"><colgroup><col width="25%" /><col width="75%" /></colgroup><thead><tr><th>Alcohol Use</th><th>Standard Drinks/Week</th></tr></thead><tbody><tr><td ID="alcoholStatus" id="alcoholStatus">Yes</td><td>3 (1 standard drink = 0.6 oz pure alcohol)</td></tr></tbody></table></div><div class="data-table"><table width="100%" ID="sdohassess1" id="sdohassess1"><colgroup><col width="50%" /><col span="2" width="25%" /></colgroup><thead><tr><th>Depression</th><th>Answer</th><th>Date Recorded</th></tr></thead><tbody><tr ID="sdohassess1pair1" id="sdohassess1pair1"><td ID="sdohassess1pair1ques" id="sdohassess1pair1ques">PHQ-9 Score</td><td ID="sdohassess1pair1ans" id="sdohassess1pair1ans">23</td><td>10/24/2022</td></tr><tr ID="sdohassess1pair2" id="sdohassess1pair2"><td ID="sdohassess1pair2ques" id="sdohassess1pair2ques">Screening Completed</td><td ID="sdohassess1pair2ans" id="sdohassess1pair2ans">PHQ-9</td><td>10/24/2022</td></tr></tbody></table></div><div class="data-table"><table width="100%"><colgroup><col width="50%" /><col span="2" width="25%" /></colgroup><thead><tr><th>Sex and Gender Information</th><th>Value</th><th>Date Recorded</th></tr></thead><tbody><tr ID="BirthSex17" id="BirthSex17"><td>Sex Assigned at Birth</td><td ID="BirthSex17Value" id="BirthSex17Value">Female</td><td>11/04/2018 3:08 AM PST</td></tr><tr ID="GenderIdentity15" id="GenderIdentity15"><td>Gender Identity</td><td ID="GenderIdentity15Value" id="GenderIdentity15Value">Female</td><td>06/12/2019 2:50 PM PDT</td></tr><tr ID="SexualOrientation16" id="SexualOrientation16"><td>Sexual Orientation</td><td ID="SexualOrientation16Value" id="SexualOrientation16Value">Choose not to disclose</td><td>11/04/2018 3:08 AM PST</td></tr></tbody></table></div>documented as of this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0EQHBG" class="toggle" type="checkbox" /><label for="ID0EQHBG" class="lbl-toggle" data-loinc-code="8716-3">Last Filed Vital Signs</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%"><colgroup><col span="4" width="25%" /></colgroup><thead><tr><th>Vital Sign</th><th>Reading</th><th>Time Taken</th><th>Comments</th></tr></thead><tbody><tr style=""><td style="">Blood Pressure</td><td><span id="sysBP_5642605800">120</span>/<span id="diaBP_5642605800">80</span></td><td>10/21/2019 3:30 PM PDT</td><td /></tr><tr ID="pulse_5642605800" style="" id="pulse_5642605800"><td style="">Pulse</td><td>80</td><td>10/21/2019 3:30 PM PDT</td><td /></tr><tr ID="temp_5642605800" style="" id="temp_5642605800"><td style="">Temperature</td><td>37.1 °C (98.8 °F)</td><td>10/21/2019 3:30 PM PDT</td><td /></tr><tr ID="resp_" style="" id="resp_"><td style="">Respiratory Rate</td><td>-</td><td>-</td><td /></tr><tr ID="SpO2_" style="" id="SpO2_"><td style="">Oxygen Saturation</td><td>-</td><td>-</td><td /></tr><tr ID="inhaled_" style="" id="inhaled_"><td style="">Inhaled Oxygen Concentration</td><td>-</td><td>-</td><td /></tr><tr ID="weight_5642605800" style="" id="weight_5642605800"><td style="">Weight</td><td>238.1 kg (525 lb)</td><td>10/21/2019 3:30 PM PDT</td><td /></tr><tr ID="height_5642605800" style="" id="height_5642605800"><td style="">Height</td><td>157.5 cm (5\' 2")</td><td>10/21/2019 3:30 PM PDT</td><td /></tr><tr ID="bmi_5642605800" style="" id="bmi_5642605800"><td style="">Body Mass Index</td><td>96.02</td><td>10/21/2019 3:30 PM PDT</td><td /></tr></tbody></table></div>documented in this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0EIZBG" class="toggle" type="checkbox" /><label for="ID0EIZBG" class="lbl-toggle" data-loinc-code="69730-0">Patient Instructions</label><div class="collapsible-content"><div class="content-inner"><ul style="" id="Instructions33"><li>Patient Instructions: <ul><li><p><span style="">Dr. Fazel - 04/15/2019 9:30 AM PDT</span></p><span><span style="">Formatting of this note is different from the original.</span><br /><span style="">Images from the original note were not included.</span><br />Patient Education <br /><br />Back Exercises<br />The following exercises strengthen the muscles that help to support the trunk and back. They also help to keep the lower back flexible. Doing these exercises can help to prevent back pain or lessen existing pain.<br />· If you have back pain or discomfort, try doing these exercises 2-3 times each day or as told by your health care provider.<br />· As your pain improves, do them once each day, but increase the number of times that you repeat the steps for each exercise (do more repetitions).<br />· To prevent the recurrence of back pain, continue to do these exercises once each day or as told by your health care provider.<br />Do exercises exactly as told by your health care provider and adjust them as directed. It is normal to feel mild stretching, pulling, tightness, or discomfort as you do these exercises, but you should stop right away if you feel sudden pain or your pain gets worse.<br />Exercises<br />Single knee to chest<br />Repeat these steps 3-5 times for each leg:<br />1. Lie on your back on a firm bed or the floor with your legs extended.<br />2. Bring one knee to your chest. Your other leg should stay extended and in contact with the floor.<br />3. Hold your knee in place by grabbing your knee or thigh with both hands and hold.<br />4. Pull on your knee until you feel a gentle stretch in your lower back or buttocks.<br />5. Hold the stretch for 10-30 seconds.<br />6. Slowly release and straighten your leg.<br />Pelvic tilt<br />Repeat these steps 5-10 times:<br />1. Lie on your back on a firm bed or the floor with your legs extended.<br />2. Bend your knees so they are pointing toward the ceiling and your feet are flat on the floor.<br />3. Tighten your lower abdominal muscles to press your lower back against the floor. This motion will tilt your pelvis so your tailbone points up toward the ceiling instead of pointing to your feet or the floor.<br />4. With gentle tension and even breathing, hold this position for 5-10 seconds.<br />Cat-cow<br />Repeat these steps until your lower back becomes more flexible:<br />1. Get into a hands-and-knees position on a firm surface. Keep your hands under your shoulders, and keep your knees under your hips. You may place padding under your knees for comfort.<br />2. Let your head hang down toward your chest. Contract your abdominal muscles and point your tailbone toward the floor so your lower back becomes rounded like the back of a cat.<br />3. Hold this position for 5 seconds.<br />4. Slowly lift your head, let your abdominal muscles relax and point your tailbone up toward the ceiling so your back forms a sagging arch like the back of a cow.<br />5. Hold this position for 5 seconds. <br />Press-ups<br />Repeat these steps 5-10 times:<br />1. Lie on your abdomen (face-down) on the floor.<br />2. Place your palms near your head, about shoulder-width apart.<br />3. Keeping your back as relaxed as possible and keeping your hips on the floor, slowly straighten your arms to raise the top half of your body and lift your shoulders. Do not use your back muscles to raise your upper torso. You may adjust the placement of your hands to make yourself more comfortable.<br />4. Hold this position for 5 seconds while you keep your back relaxed.<br />5. Slowly return to lying flat on the floor. <br />Bridges<br />Repeat these steps 10 times:<br />1. Lie on your back on a firm surface.<br />2. Bend your knees so they are pointing toward the ceiling and your feet are flat on the floor. Your arms should be flat at your sides, next to your body.<br />3. Tighten your buttocks muscles and lift your buttocks off the floor until your waist is at almost the same height as your knees. You should feel the muscles working in your buttocks and the back of your thighs. If you do not feel these muscles, slide your feet 1-2 inches farther away from your buttocks.<br />4. Hold this position for 3-5 seconds.<br />5. Slowly lower your hips to the starting position, and allow your buttocks muscles to relax completely.<br />If this exercise is too easy, try doing it with your arms crossed over your chest. <br />Abdominal crunches<br />Repeat these steps 5-10 times:<br />1. Lie on your back on a firm bed or the floor with your legs extended.<br />2. Bend your knees so they are pointing toward the ceiling and your feet are flat on the floor.<br />3. Cross your arms over your chest.<br />4. Tip your chin slightly toward your chest without bending your neck.<br />5. Tighten your abdominal muscles and slowly raise your trunk (torso) high enough to lift your shoulder blades a tiny bit off the floor. Avoid raising your torso higher than that because it can put too much stress on your low back and does not help to strengthen your abdominal muscles.<br />6. Slowly return to your starting position.<br />Back lifts<br />Repeat these steps 5-10 times:<br />1. Lie on your abdomen (face-down) with your arms at your sides, and rest your forehead on the floor.<br />2. Tighten the muscles in your legs and your buttocks.<br />3. Slowly lift your chest off the floor while you keep your hips pressed to the floor. Keep the back of your head in line with the curve in your back. Your eyes should be looking at the floor.<br />4. Hold this position for 3-5 seconds.<br />5. Slowly return to your starting position.<br />Contact a health care provider if:<br />· Your back pain or discomfort gets much worse when you do an exercise.<br />· Your worsening back pain or discomfort does not lessen within 2 hours after you exercise.<br />If you have any of these problems, stop doing these exercises right away. Do not do them again unless your health care provider says that you can.<br />Get help right away if:<br />· You develop sudden, severe back pain. If this happens, stop doing the exercises right away. Do not do them again unless your health care provider says that you can.<br />This information is not intended to replace advice given to you by your health care provider. Make sure you discuss any questions you have with your health care provider.<br />Document Revised: 04/23/2020 Document Reviewed: 09/19/2019<br />Elsevier Patient Education © 2021 Elsevier Inc.<br /><br /><br />Potassium <br />Date Value Ref Range Status <br />06/10/2015 5.2 (High) 3.5 - 5.0 MMOL/L Final <br /><br /></span><br /><span style="">Electronically signed by Dr. Fazel at 03/22/2022 1:35 PM PDT</span><br /><br /></li></ul></li></ul>documented in this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0ET6BG" class="toggle" type="checkbox" /><label for="ID0ET6BG" class="lbl-toggle" data-loinc-code="10164-2">Progress Notes</label><div class="collapsible-content"><div class="content-inner"><ul style=""><li>Dr. Masson - 04/15/2019 9:30 AM PDT: <span id="Note30"><span><span style="">Formatting of this note is different from the original.</span><br />PHQ-2 Total Score (Scale: 0 to 3) 9/6/2013 <br />PHQ-2 Total Score 6 <br /><br />CSHS ONC PHQ9 1/19/2018 3/8/2019 7/19/2020 <br />In the last two weeks, how often have you had little interest or pleasure in doing things? 0 0 1 <br />In the last two weeks, how often have you been feeling down, depressed or hopeless? - 1 1 <br />In the last two weeks, how often have you had trouble falling asleep, staying asleep or sleeping too much? 0 - - <br />In the last two weeks, how often have you been feeling tired or having little energy? - - - <br />In the last two weeks, how often have you had poor appetite or been overeating? - - - <br />In the last two weeks, how often have you been feeling bad about yourself, or that you\'re a failure or have let yourself or family down? - - - <br />In the last two weeks, how often have you had trouble concentrating on things, such as reading the newspaper or watching television? - - - <br />In the last two weeks, how often have you been moving or speaking so slowly that other people could have noticed; Or, the opposite - being fidgety or restless that you have been moving around a lot more than usual? - - - <br />In the last two weeks, how often have you had thoughts that you would be better off dead or of hurting yourself in some way? - - - <br />PHQ-9 Score 0 1 2 <br /><br /></span><br /><span style="">Electronically signed by Dr. Masson at 07/19/2020 2:23 PM PDT</span><br /></span></li><li>Dr. Rao - 04/15/2019 9:30 AM PDT: <span id="Note29"><span><span style="">Formatting of this note might be different from the original.</span><br />Blood pressure 120/80, pulse 80, temperature 98.8 °F (37.1 °C), temperature source Oral. <br />General appearance: alert, cooperative, no distress, appears stated age<br />Head: Normocephalic, without obvious abnormality, atraumatic<br />Eyes: conjunctivae/corneas clear. PERRL, EOM\'s intact. Fundi benign<br />Ears: normal TM\'s and external ear canals AU<br />Nose: Nares normal. Septum midline. Mucosa normal. No drainage or sinus tenderness.<br />Neck: supple, symmetrical, trachea midline, no adenopathy, thyroid: not enlarged, symmetric, no tenderness/mass/nodules, no carotid bruit, and no JVD<br />Lungs: clear to auscultation bilaterally<br />Heart: regular rate and rhythm, S1, S2 normal, no murmur, click, rub or gallop , no edema<br />Abdomen: soft, non-tender. Bowel sounds normal. No masses, no organomegaly<br />Extremities: extremities normal, atraumatic, no cyanosis or edema<br />Skin: Skin color, texture, turgor normal. No rashes or lesions<br />Neurologic: Grossly normal, no inattention, alert and oriented x3<br /><br /></span><br /><span style="">Electronically signed by Dr. Rao at 08/03/2021 5:11 PM PDT</span><br /></span></li><li>Roma Yogesh Gianchandani - 04/15/2019 9:30 AM PDT: <span id="Note28"><span><span style="">Formatting of this note might be different from the original.</span><br />This is a test of dictating later this is a test of dictating later this is a test of dictating later<br /><br />No results found for: HGBA1C <br />.uma<br /><br /></span><br /><span style="">Electronically signed by Roma Yogesh Gianchandani at 01/21/2022 2:37 PM PST</span><br /></span></li><li>Dr. Merchant - 04/15/2019 9:30 AM PDT: <span id="Note27"><span><span style="">Formatting of this note is different from the original.</span><br /><span style="">Images from the original note were not included.</span><br /><br /><br /><br /> Hematology and Cellular Therapy<br /><br />Patient Information <br /><br />Patient: AmbulatorySeniorF Xxxcshs<br />DOB: 1/1/1947<br />MRN: 200270896<br />Date of Service: 4/15/2019<br /><br />History of Present Illness <br /><br />CC: <br />Referring Provider: <br /><br />AmbulatorySeniorF Xxxcshs is a 75 year old woman <br /><br />Subjective History: fever<br /><br />Review of Systems:<br />A 14-point review of systems was performed with pertinent positives/negatives noted in the interval history, all others negative.<br /><br />Hematologic History:<br /><br />Patient Active Problem List <br /> Diagnosis Date Noted <br />• Rheumatoid arthritis, seropositive (HCC) 08/30/2021 <br />• COVID-19 virus infection 04/13/2020 <br />• Sucked into jet engine 10/25/2019 <br />• Moral distress 11/28/2018 <br /> Overview Note: <br /> https://onlinelibrary.wiley.com/doi/pdf/10.1111/j.2044-8341.1926.tb00623.x<br /><br />• Sucked into jet engine 05/06/2017 <br /> Overview Note: <br /> https://www.youtube.com/watch?v=2Aldwlro4DA&lt;/CITE&gt;<br /><br />• Spacecraft collision injuring occupant 05/06/2017 <br /> Overview Note: <br /> Fell a really long way <br /><br />• Diabetes mellitus type 2, noninsulin dependent (HCC) 06/09/2016 <br /><br />Past Medical History: <br />Diagnosis Date <br />• Abnormal Pap smear of cervix <br />• Anxiety <br />• Breast asymmetry 11/05/2017 <br /> testing <br />• Depressive disorder, not elsewhere classified <br />• ERRONEOUS ENCOUNTER--DISREGARD <br />• Family history of diabetes mellitus <br />• Frail elderly <br />• Headache(784.0) <br />• Heelies colliding with stationary object 5/6/2017 <br />• History of anemia <br />• History of bilateral breast implants <br />• Known health problems: none <br />• Known health problems: none <br />• NO SIGNIFICANT MEDICAL PROBLEMS <br />• NO SIGNIFICANT MEDICAL PROBLEMS <br />• Pneumonia 4/18/2010 <br />• Rash of back <br />• Sleep apnea <br />• Type 2 diabetes mellitus with hyperosmolarity without coma (HCC) 6/9/2016 <br /><br />Past Surgical History: <br />Procedure Laterality Date <br />• HX COLOSTOMY CLOSURE <br />• HX LOW ANTERIOR RESECTION <br />• HX THYROID NODULE RESECTION <br />• HX THYROIDECTOMY <br />• HX TONSILLECTOMY <br />• PAST SURGICAL HISTORY - NONE REPORTED <br />• PAST SURGICAL HISTORY - NONE REPORTED <br />• PR CESAREAN DELIVERY ONLY <br />• PR LAP GASTRIC BYPASS/ROUX-EN-Y <br />• PR REMOVAL COLON/PROCTEC/ ILEOANAL ANAST <br />• PR REMV STOMACH,PART,DISTAL,GASTRODUOD <br />• WOUND OSTOMY EVAL AND TREAT <br /><br />Social History <br /><br />Tobacco Use <br />• Smoking status: Former Smoker <br /> Packs/day: 0.50 <br /> Types: Cigarettes <br /> Start date: 1999 <br /> Quit date: 06/2010 <br /> Years since quitting: 11.7 <br />• Smokeless tobacco: Not on file <br />Substance Use Topics <br />• Alcohol use: Yes <br /> Alcohol/week: 3.0 standard drinks <br /> Types: 3 Shots of liquor per week <br />• Drug use: Yes <br /> Types: Marijuana <br /><br />Family History <br />Problem Relation Age of Onset <br />• Frailty Mother <br />• Tuberculosis Brother <br />• Hypertension Paternal Aunt <br />• Prostate Cancer Paternal Aunt <br />• Colon Polyps Paternal Grandmother <br />• Breast Cancer Paternal Grandmother <br />• Diabetes Maternal Aunt <br />• Ovarian Cancer Paternal Uncle <br />• Heart Disease Other <br /> fathers side <br />• Coronary Artery Disease Other <br /> mothers side <br />• Obesity Other <br />• Thoracic Aneurysm Other <br />• Diverticulosis Other <br />• Degenerative Disc Disease Other <br />• Carotid Stenosis Other <br />• Other Family History Maternal Grandmother <br /> Fraility <br />• History of Fragility Fracture Sister <br /><br /><br />Medications <br /><br />Current Outpatient Medications <br />Medication Sig <br />• ibuprofen (MOTRIN) 600 mg tablet Take 600 mg by mouth 3 times daily. Take with food. <br />• PREDNISONE, BULK, MISC <br />• metFORMIN (GLUCOPHAGE) 500 mg tablet <br />• acetaminophen (TYLENOL) 325 mg oral tablet Take 1 tablet by mouth every 4 hours as needed. Do NOT exceed 3000 mg of acetaminophen from all sources per 24 hours. (Patient not taking: Reported on 11/5/2020) <br />• atorvastatin (LIPITOR) 10 mg oral tablet Take 1 tablet by mouth daily. <br />• gabapentin (NEURONTIN) 100 mg capsule Take 1 capsule by mouth nightly. May increase to three times at night as necessary and tolerated <br />• naproxen (NAPROSYN) 500 mg oral tablet Take 1 tablet by mouth 2 times daily as needed. Take with food. (Patient taking differently: Take 500 mg by mouth as needed. Take with food.) <br /><br />Objective <br /><br />Vitals: <br /> 10/21/19 1530 <br />BP: 120/80 <br />Pulse: 80 <br />Temp: 98.8 °F (37.1 °C) <br />TempSrc: Oral <br /><br />ECOG Score: <br /><br />Physical Exam:<br />Constitutional: Oriented to person, place, and time. Appears well-developed and well-nourished. <br />Head: Normocephalic, atraumatic, no visible abnormalities<br />Nose: Nares normal. Septum midline. Mucosa normal. No drainage.<br />Mouth/Throat: No oropharyngeal exudate or mucositis. <br />Eyes: EOM are normal. No scleral icterus. <br />Neck: Normal range of motion. No tracheal deviation present. <br />Cardiovascular: Normal rate and regular rhythm. No murmurs, rubs, or gallops.<br />Pulmonary: Breath sounds normal. No respiratory distress. No wheezing, rales, or rhonchi.<br />Abdominal: Soft and non-distended. Bowel sounds are normal. <br />Musculoskeletal: Normal range of motion. <br />Skin: Skin color, texture, turgor normal. No rashes or lesions<br />Extremities: No cyanosis, clubbing, or edema<br />Neurological: No focal neurologic deficits. Strength intact in all extremities<br />Psychiatric: Normal mood and affect. <br />Lymph: No palpable cervical, supraclavicular, axillary, or inguinal lymphadenopathy<br /><br />Laboratory Results <br /><br />No results found for: WBC, HGB, HCT, MCV, RDW, PLT, POLY, LYMPH, MONOS, EOS, BASO, ANC, ALC, MONOSABS, EOSABS, BASOABS, RBCMORPH, DIFFTYPE <br />Lab Results <br />Component Value Date <br /> Glucose 67 04/22/2020 <br /> Creatinine 2.8 (High) 06/10/2015 <br /> Urea Nitrogen 30 (High) 06/10/2015 <br /> Sodium 139 06/10/2015 <br /> Potassium 5.2 (High) 06/10/2015 <br /> Chloride 104 06/10/2015 <br /> Carbon Dioxide 6 (Low) 06/10/2015 <br /> ALT 50 (High) 06/10/2015 <br /> AST 76 (High) 06/10/2015 <br /> Alkaline Phosphatase 102 06/10/2015 <br /> Bilirubin, Total 1.9 (High) 06/10/2015 <br /> Total Protein 5.6 (Low) 06/10/2015 <br /> Albumin 3.5 06/10/2015 <br /> Calcium, Serum 4.6 (Low) 06/10/2015 <br /><br />Imaging Results <br /><br />Pathology <br /><br />Assessment and Plan <br /><br />Diagnoses and all orders for this visit:<br /><br />History of non-Hodgkin\'s lymphoma<br /><br />Chronic obstructive pulmonary disease, unspecified COPD type (HCC)<br /><br />Screening-pulmonary TB<br />- PPD TEST<br />- ECG<br /><br />Lower abdominal pain<br />- ECG<br />- PR ANOSCOPY DX W/COLLJ SPEC BR/WA SPX WHEN PRFRMD<br /><br />Pneumothorax, unspecified type<br /><br />Non-seasonal allergic rhinitis, unspecified trigger<br /><br /><br /><br />A total time of 44 minutes was spent on today\'s encounter which included the following: <br />Obtaining and/or reviewing separately obtained history<br />Performing a medically appropriate exam and/or evaluation <br />Counseling and educating a patient/family/caregiver as noted above <br />Referring and communicating with other healthcare professionals (not separately reported) <br />Independently interpreting results (not separately reported) and communicating results to the patient/family/caregiver<br /><br />Akil Abid Merchant, MD <br />3/7/2022<br />5:39 PM</span><br /><span style="">Electronically signed by Dr. Merchant at 03/07/2022 5:50 PM PST</span><br /></span></li><li>Alexis Rieber - 04/15/2019 9:30 AM PDT: <span id="Note26"><span><span style="">Formatting of this note might be different from the original.</span><br /><span style="">Images from the original note were not included.</span><br /><br />Physical Exam<br /><br />This is a very cute dog<br /><br />This dog is white cell then sa<br /><br />This is a 42-year-old patient with hypertension past medical 7</span><br /><span style="">Electronically signed by Alexis Rieber at 07/05/2022 1:57 PM PDT</span><br /></span></li><li>Dr. Masson - 04/15/2019 9:30 AM PDT: <span id="Note25"><span><span style="">Formatting of this note might be different from the original.</span><br />Follow up Chronic Kidney Disease <br />Symptom symptoms one day daily <br /></span><br /><span style="">Electronically signed by Dr. Masson at 07/22/2022 11:08 AM PDT</span><br /></span></li><li>Dr. Masson - 04/15/2019 9:30 AM PDT: <span id="Note24"><span><span style="">Formatting of this note might be different from the original.</span><br />In my canal I can dictate later that is not a good workflow if you doing<br /></span><br /><span style="">Electronically signed by Dr. Masson at 09/26/2022 10:59 AM PDT</span><br /></span></li><li>Dr. Masson - 04/15/2019 9:30 AM PDT: <span id="Note23"><span><span style="">Formatting of this note might be different from the original.</span><br />Diagnoses and all orders for this visit:<br /><br />History of non-Hodgkin\'s lymphoma<br /><br />Chronic obstructive pulmonary disease, unspecified COPD type (HCC)<br /><br />Screening-pulmonary TB<br />- PPD TEST<br /><br />Lower abdominal pain<br /><br />Pneumothorax, unspecified type<br /><br />Non-seasonal allergic rhinitis, unspecified trigger<br /><br />Primary hypertension<br /><br />Ace inhibitor <br /><br /></span><br /><span style="">Electronically signed by Dr. Masson at 10/08/2022 6:20 PM PDT</span><br /></span></li><li>Dr. Masson - 04/15/2019 9:30 AM PDT: <span id="Note22"><span><span style="">Formatting of this note might be different from the original.</span><br /><br />..lastim<br /><br />No results found for this or any previous visit from the past 365 days 10 hours.<br /><br /></span><br /><span style="">Electronically signed by Dr. Masson at 04/14/2023 5:33 PM PDT</span><br /></span></li></ul>documented in this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0E1LBI" class="toggle" type="checkbox" /><label for="ID0E1LBI" class="lbl-toggle" data-loinc-code="18776-5">Plan of Treatment</label><div class="collapsible-content"><div class="content-inner"><p>Not on file</p>documented as of this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0EJMBI" class="toggle" type="checkbox" /><label for="ID0EJMBI" class="lbl-toggle" data-loinc-code="61146-7">Goals</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%"><colgroup><col width="30%" /><col width="10%" /><col width="15%" /><col width="20%" /><col width="12%" /><col width="13%" /></colgroup><thead><tr><th>Goal</th><th>Patient Goal Type</th><th>Associated Problems</th><th>Recent Progress</th><th>Patient-Stated?</th><th>Author</th></tr></thead><tbody><tr style=""><td><p id="goal1">Hemoglobin A1C &lt;= 7.0</p></td><td>Result Component</td><td /><td /><td>No</td><td>Dr. Masson</td></tr><tr style=""><td><p id="goal2">Hemoglobin A1C &lt;= 7.0</p></td><td>Result Component</td><td>Diabetes mellitus type 2, noninsulin dependent</td><td /><td>No</td><td>Jeff Oostmeyer</td></tr><tr style=""><td style="" colspan="6"><p style="">Note: </p><span id="goal2note"><span style="">Formatting of this note might be different from the original.</span><br />Test</span><br /></td></tr><tr style=""><td><p id="goal3">LDL CALC &lt;= 100</p></td><td>Result Component</td><td>Diabetes mellitus type 2, noninsulin dependent</td><td /><td>No</td><td>Jeff Oostmeyer</td></tr><tr style=""><td style="" colspan="6"><p style="">Note: </p><span id="goal3note"><span style="">Formatting of this note might be different from the original.</span><br />Test</span><br /></td></tr></tbody></table></div>documented as of this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0EQVBI" class="toggle" type="checkbox" /><label for="ID0EQVBI" class="lbl-toggle" data-loinc-code="30954-2">Results</label><div class="collapsible-content"><div class="content-inner"><ul style=""><li id="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Procedure">PPD TEST - Final result (04/15/2019 9:32 AM PDT): <div class="data-table"><table width="100%"><colgroup><col width="20%" /><col width="12%" /><col width="8%" /><col width="20%" /><col span="2" width="10%" /><col width="20%" /></colgroup><thead><tr><th>Component</th><th>Value</th><th>Ref Range</th><th>Test Method</th><th>Analysis Time</th><th>Performed At</th><th>Pathologist Signature</th></tr></thead><tbody><tr ID="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1" style="" id="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1"><td ID="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1Name" id="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1Name">Induration PPD</td><td>10</td><td>0 - 10 mm</td><td /><td /><td /><td ID="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1Signature" id="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Comp1Signature" /></tr></tbody></table></div><div class="data-table"><table width="100%"><colgroup><col span="5" width="20%" /></colgroup><thead><tr><th>Specimen (Source)</th><th>Anatomical Location / Laterality</th><th>Collection Method / Volume</th><th>Collection Time</th><th>Received Time</th></tr></thead><tbody><tr style=""><td ID="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Specimen" id="Result.1.2.840.114350.1.13.202.2.7.2.798268.326239047.Specimen" /><td /><td /><td>04/15/2019 9:32 AM PDT</td><td /></tr></tbody></table></div><div class="data-table"><table width="100%"><thead><tr><th>Narrative</th></tr></thead><tbody><tr><td style=""><p /></td></tr></tbody></table></div><div class="data-table"><table width="100%"><colgroup><col width="20%" /><col width="80%" /></colgroup><thead><tr><th>Authorizing Provider</th><th>Result Type</th></tr></thead><tbody><tr><td>Dr. Gray</td><td>IMMUNIZATION ORDERABLES</td></tr></tbody></table></div></li></ul>documented in this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0E36BI" class="toggle" type="checkbox" /><label for="ID0E36BI" class="lbl-toggle" data-loinc-code="51848-0">Visit Diagnoses</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%"><colgroup><col width="100%" /></colgroup><thead><tr><th>Diagnosis</th></tr></thead><tbody><tr ID="vdx3" style="" id="vdx3"><td><p><span id="vdx3Name">History of non-Hodgkin\'s lymphoma</span><span> - Primary</span></p></td></tr><tr ID="vdx4" style="" id="vdx4"><td><p><span id="vdx4Name">Chronic obstructive pulmonary disease, unspecified COPD type (HCC)</span></p></td></tr><tr ID="vdx5" style="" id="vdx5"><td><p><span id="vdx5Name">Screening-pulmonary TB</span></p></td></tr><tr ID="vdx6" style="" id="vdx6"><td><p><span id="vdx6Name">Lower abdominal pain</span></p></td></tr><tr ID="vdx7" style="" id="vdx7"><td><p><span id="vdx7Name">Pneumothorax, unspecified type</span></p></td></tr><tr ID="vdx8" style="" id="vdx8"><td><p><span id="vdx8Name">Non-seasonal allergic rhinitis, unspecified trigger</span></p></td></tr><tr ID="vdx9" style="" id="vdx9"><td><p><span id="vdx9Name">Primary hypertension</span></p></td></tr><tr ID="vdx10" style="" id="vdx10"><td><p><span id="vdx10Name">Coronary artery disease involving native heart without angina pectoris, unspecified vessel or lesion type</span></p></td></tr><tr ID="vdx11" style="" id="vdx11"><td><p><span id="vdx11Name">Chronic sinusitis, unspecified location</span></p></td></tr></tbody></table></div>documented in this encounter</div></div></div><div class="wrap-collabsible"><input id="ID0EWCCI" class="toggle" type="checkbox" /><label for="ID0EWCCI" class="lbl-toggle" data-loinc-code="85847-2">Care Teams</label><div class="collapsible-content"><div class="content-inner"><div class="data-table"><table width="100%" ID="ct54" id="ct54"><colgroup><col span="3" width="25%" /><col width="13%" /><col width="12%" /></colgroup><thead><tr><th>Team Member</th><th>Relationship</th><th>Specialty</th><th>Start Date</th><th>End Date</th></tr></thead><tbody><tr style=""><td><p style="font-weight:bold;">Dr. Masson</p><p>NPI: 1326098302</p><p>310-248-7000 (Work)</p><p>310-248-7033 (Fax)</p></td><td>PCP - General</td><td>Family Medicine</td><td>3/15/18</td><td /></tr></tbody></table></div>documented as of this encounter</div></div></div><table class="header_table"><tbody><tr><td class="td_header_role_name"><span class="td_label"><b>Author:</b></span></td><td class="td_header_role_value">Epic - Version 10.3 - Epic - Version 10.3</td></tr><tr><td class="td_header_role_name"><span class="td_label" /></td><td class="td_header_role_value"><br /><br /></td></tr></tbody></table><table class="header_table"><tbody><tr><td class="td_header_role_name"><span class="td_label"><b>Legal Authenticator:</b></span></td><td class="td_header_role_value">Health Information Executive Director Cshs</td></tr><tr><td class="td_header_role_name"><span class="td_label" /></td><td class="td_header_role_value"><br /><br /></td></tr></tbody></table>Signed on May 29, 2023, 07:40:37</body></html>',sme="JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoVW50aXRsZWQgZG9jdW1lbnQpCi9Qcm9kdWNlciAoU2tpYS9QREYgbTEyNSBHb29nbGUgRG9jcyBSZW5kZXJlcik+PgplbmRvYmoKMyAwIG9iago8PC9jYSAxCi9CTSAvTm9ybWFsPj4KZW5kb2JqCjUgMCBvYmoKPDwvRmlsdGVyIC9GbGF0ZURlY29kZQovTGVuZ3RoIDIwMT4+IHN0cmVhbQp4nI2OTWoDMQyF9zqFLhBFP5ZlQ8mi0Gad4hu0TaDQRdL7Q+wxmYEuSi1ji/fQpyfIvXbSn6iK799wBQpf1MffRcFRb0ecze0C+6Ph5QeGXySjsGe8fcIZTr8IoeN2Bi9SZ8xmYzw32L8mlER5nMB2BtlyUYpaJKxiG5CdGGmEJSvYPvCJ2eKA7QuCTHPNbn1mGqksRiFxEY6yGp7XiSLqmz5JL+3vTMZUncX/Ec0WYKUIz5x03aRzkzB5SRppC631keEEd14/VDIKZW5kc3RyZWFtCmVuZG9iagoyIDAgb2JqCjw8L1R5cGUgL1BhZ2UKL1Jlc291cmNlcyA8PC9Qcm9jU2V0IFsvUERGIC9UZXh0IC9JbWFnZUIgL0ltYWdlQyAvSW1hZ2VJXQovRXh0R1N0YXRlIDw8L0czIDMgMCBSPj4KL0ZvbnQgPDwvRjQgNCAwIFI+Pj4+Ci9NZWRpYUJveCBbMCAwIDYxMiA3OTJdCi9Db250ZW50cyA1IDAgUgovU3RydWN0UGFyZW50cyAwCi9QYXJlbnQgNiAwIFI+PgplbmRvYmoKNiAwIG9iago8PC9UeXBlIC9QYWdlcwovQ291bnQgMQovS2lkcyBbMiAwIFJdPj4KZW5kb2JqCjcgMCBvYmoKPDwvVHlwZSAvQ2F0YWxvZwovUGFnZXMgNiAwIFIKL1ZpZXdlclByZWZlcmVuY2VzIDw8L1R5cGUgL1ZpZXdlclByZWZlcmVuY2VzCi9EaXNwbGF5RG9jVGl0bGUgdHJ1ZT4+Pj4KZW5kb2JqCjggMCBvYmoKPDwvTGVuZ3RoMSAxNzk0OAovRmlsdGVyIC9GbGF0ZURlY29kZQovTGVuZ3RoIDg3MzY+PiBzdHJlYW0KeJztegl4VEXW9qm6vaXTne6EbJ100rfTSQfSYUuAsETS2QCN7IsJJpIAkbDJElRQlDAjChFFcRsZR9zFBe0sYhN1YEQddxh13AVEVJwRQUdxJfd7q7pD0qLf5F++5/99nqnKeetU1alTVeeeOre6O8SIqA9AR4PGlpWPYQvZHCKejNaRYydNnNo0+E9XESl21K8YO3V6ifnPxo1ELID6oIlTB+atHL7jKORFvXZG2fjKSZsXfEM0ZD1R7I1zFtctZQe4C/3T0F8956IV6p3Ot/5JZPgcNO38pfMWv7yqaguR1Y/6BfPqGpdSMkVBfyHk7fMWrTr/vsoz3ibqi/VYLmiYu3jlnnXfPY8FYz7Ttob6urkH45+DPnYQ8sMa0BCXH+VGHWukzIbFK1ZmbVKeJtKLNdcuWjKnrmhi4VTs50b0ty6uW7lU32ZtQt/ZqKsX1C2uT6od/AGMMQ5tZUuXNK7Qcuhm8ItE/9Ll9Uuz3hy/i8hZSRT9Z7QpZCJOscQ0DbywZSV9RYX0JzKi3U4DaQa0PQxZPeoKyaRlC52/kDDeOLpzApXa6YdHf7jELlsiUqVsMdMAZH3d8rrZpM5ZtXwRqfOW1y8ktaF+9nJSF9WtuIDUbp2kd2w58PDDY2fZCr8xpZpk810fZeeI8qVJo3b88OjJeXYyWVCNOjWjKC1hnmM3obZsZEb9kBnlIzMqQGY0Dplhr+eEx3NpG6L4sFXi4V+wKcVIexmojMbQJJpG9bQClqMe9UZN0z7qzqdZQFHWs+tgTZN+iz4fS0oNlcrf6HweZ9LzaIOOi6Sjn1lv/MQJE8mPmVboX++czPKNo1mrXzw4zK/z6p8QTxirDNm3hKpJkZbNDVlW2lTsQjw/DVK8B8968FjKwvrlkO2J4bUIOQ4LMEkWCq0xTmooQM84LY1mgIgS/q/m1+l1NuIX8nuhzKv/XVbqfj3rf2cokAY20kzxtHU4v7SAmsI8gzUvCvMcz78hzCt4Fn3DvK6HjJ5SIBXiDeCIimk5zac6WkTj4SEz4CPLqREtS0h4+VCchME0CP3jZcsSWkGraCmkVDqTFqN9HmQvAKrUH9StTaUpkJpHF4KvQ2tkrVvuAUjmYYbByCpW0CB1nz5bKWrLwQusQ3tohQPknIvC883HDA3oawzP3ih3cxFwLg0wnObs//8k/V/pdlHqPqJtvZKfEZLvShg36P90DbpGqvjfGkdUxEdQpr6DHKAU/f3k0HnxpiHtU9ARUXbO146IflHyf2BQMEyE/W5n82k77aKn2XGMepR2Ujs9T0mIJbfRarqRroKnzkTLBjzTKfDgMrqRObR2RP874cl30iuQPYcupw5KZMnaZ7SG1imvY9Q6slIGvGMSPOUadrZ2IaLOAd3vEQvOhucsZU1apXattlm7h+6lncrz2kmKxumYg/yK9oX+be19eHQ13US30gG2OeoxnKhzcO52Kn+CT21RanRMm6f9gBW46WKsQQeffYXt5j5or6dPWTJbrZRCy91aQHsGUk6qgW9uoQ42lI3lbn21Nl57hRIxx0povZVaaQdykJ6id5lFf1y7RztODsrFKVsDe7zKdiudJ9d2FomHDyv1oxHoWUJ/pr/SPuZhf+FL9BZ9nt6vv0R7AxFxME3Hau/HyE/Yt/xy5DXKc7oxWgnO/Dq6XlibnqUPWQobyCayGbwfX8JvV5YjcubKkzgXZ2kD/QHa9zMf28EtfK9yt+4h3Y+GtM6DWgyeiJf+iPfwX5gVO1VZI/sde5N9xEv5LP5Hfki5UfeA7jVjHXZ9HqLENfQQfcvi2HA2mZ3LGthqdhW7nt3KXmH72BFezKfxhfyY0qAsU57SlSBP1TXqfq+/Un+14UhnZecznX/r/FbL066kyfCHtVj9TfD+dvjJXnoH+QAdYnoWzWKQVeZm09mlyJeza9hdbBt7gLVjln3sEPuMfcW+YT9yBEpu4KnczTOQPXw5v5jfyG/je5H38c/590qSkqH4lKFKoVKlLMGqrlKuQ35M+VCXotur02DnPP3N+q36bfqH9E/rjxssxt+ZyPTyT3efzDm5v5M613fe3Nna2a59iLeDAz7lJBduLZMRt+oQu1fifnIv/Px1ZoHtUlgOG83OhmVmsQVsGVsJS17BtrB75dofYU/CSm+xY1izlTvlmgfwobyET0Q+j9fzZfw6vpm38zf5D4pRiVZsSoKSo4xVapR6ZYWySrlZCSgvKx8oh5QTyk/Ims6sc+kydF6dTzdWN0t3oe523ae6T/XV+pf0HxvMhsWGKw1Bw5fGYcbRxknGycYa4ybjDuMbplp45x56jB7vefbZQWWtUq48RtfyfJ2Dv8pfhT/PornKeA5P5dvYen4Za+eZ+pWGUXwUm0DHdV7Y+jm+lZ/go5TxrIJNpQV8cEibIV73IIpC3R46qnsSe3sVmlcaLOxyfsxgoVZcC0ZgzmeVQTqf8hK9qxxgRt2d9J7OzJLYUX6/Mgle8JRutL6S3Mpt9IiyjF1Gj/FyXDl+NG2EH09gDyIuTGN57DsFN0o+AV5UoHxEv6eF/G06inO8nm5hc3Xz6FrKZ6vpU7oPp6Kf/gJDjiGBvcDn65p5H9ZOXPcAdjeCZTJFH09XsBpli+EYfwdvt706M+1XHsbq9/JHlPG64/oprAEn4DK6kpZpa2mVvlL3GptHCptBWbqDiG6rlTydG+UaRJVqxLQdON0diAPFyni0JMNzzoZfTEeE2IL8B8QJHTxoPs74OYhir1K7YRoP0jx9DEPUQTR+qXMKzdTuo1u1eXSBtpn6Ix5cpa2Gxm30MW2ibWxd56V4j6bj5OxnZ+vH8L36MVp/3szf4VP5zZHPF9bOYsn0D+RHUBmNe1yz7i2aSkXaRu3v8O6+iLC30mw6iw5jl19ghnHKbsrvnMBbtDHKUuz3AE3W7tdczEwN2iKaSE/SvUY91Rl9eMYB9hr2eynV8ynaCqW+cz7ssAlW8MNaFyL+bPCXTp9W7C8afUbhqJEjhhcMHZKfN3jQwAH9c305/fpme7MyPRlu1ZWe5kxNcSQnJSbE94mLtdtirJZoc5TJaNDrFM4ot9wzplYNeGsDOq9n3Lj+ou6pQ0Ndj4bagIqmMZEyAbVWiqmRkn5Inv8zSX9I0n9KktnVQirsn6uWe9TAK2UeNchmTq4Ef02Zp0oNHJX8eMlfJ3kreLcbA9Ty5IYyNcBq1fLAmIsamstry6CuJdpc6imtN/fPpRZzNNhocIEkz9IWljSaSYYnlY9swQ3YikUFUjxl5QGHp0ysIKBkldfNDUyaXFlelup2V/XPDbDSOZ7ZAfKUBGw+KUKlcpqAoTRglNOo88Vu6Gq1JXd388agnWbX+ixzPXPrqisDSl2VmCPWh3nLAkmXHE7urkJ5XGnlVT17U5Xm8uT5qqg2N1+lBu6YXNmz1y2wqgo6MJZnjaltHoOpN8KIFVNVzMbXVVUG2DpMqYqdiF2F9lfvKRcttQvUQJSnxNPQvKAWjyalOUBTVrlbU1L8O7WDlFKuNk+r9LgDRameqroyZ0s8NU9Z1ebwq47Inv65LfbYkGFbYmxhxmLtydSf6pOcFBdcxZRTlmViRZ4z4RABdY6KlVR6sKfhAuqHU/Oc4RBDqmIYFZiLJzI/EFVa22wfKdrF+IA+y+5Rm78heIDn6OeRLXXhFkOW/RsSrPCTU66G/i4+4PMFcnKEixhL8UyxxtGyPrR/7kVB7vEstasoYD6aBNvWVY0cCPO73eIBXx3002xUAk2TK0N1lWantpJ/oK8qwGtFz+6unoTpoqepq+fU8FoPPLld3rgTAibvqT+bPbFPecPIAEv8b7rrQ/0VUz0Vk2dWquXNtWHbVkyLqIX6h5/qC3OBPqWVSioPczxVkb1wyupTwqJSaQnosvBnkE49N2g0wStlC1PHBOy140JYZXa7ezkoqB0Xo2TRPSy8zMBIX2R9VEQ9YnmWZgULxquyYtrM5mZzRB9cLTThmeECHk/TKt1qaYCm42Rm4S+o7R4uqCo14IfJSoUA/C/UFK5GCKaG+Sok4Z39c8cg0DU3j/GoY5prm+uCWtNsj2r3NO/kT/Onm5eW13Y5TlDruDo1MGZjFWzVwEbiUHAqafGw9ZNb/Gz91JmVO+345L9+WmUrZ7y0tqSqJRN9lTtVIr9s5aJVNIqKKipUwbDJVm6S8qk7/URNslcnG2R9TpCRbDN1tTGaE+ShNntXG0ebLtTml20iiRhTOq2yp/fII1nVX77wxHdz1dEmU+8+/BhxE+5KhjBFpMgGg0JkiYrqne6o8PdCIpnkXKdNHlGDbqvZ3Fvdph78v9eND3m26Oje6Y6m7g2aw/ojUqRtTdBtt1h+LvTLyULdG4z+Jd2RDUJ3rNX6P6a7T0xM73THUPcGrUR02nYjbWvWIzDa7b3TbaPuDcb8ku7Ihmi4ZHJcXO90x0J7V7KH9UekSNta4Dap8fG90x0P7d3zhPRHJFtELQZuk5aY2DvdCdS9wT5hikiRk9mgW01O7p3uJOreYMIv6Y6NqNnhNm6Ho3e6k3voTgzr/290x0J3ltPZO92pWHlXEstJ+rlA5HOLw2nIUdXe6U7Hp9yuJJaT8nOByMni4ZIDPJ7e6XZT9wZdYf0RKXKyJLhkntfbO92ZUmPXPNSjFk6Rkzng/8P69eud7mypsWse6lELp/SIWircfWRubu9051C38bLD+iOSGlFLg7uX5uX1Tvcg6t6geCeett2siFoG/L9i+PDe6R5GA07xeWH9ESknouaF/08dPbp3ugsp/xQvvjMf8nOBARG1HLhkdXl573SXUPcGzwCN+LlAfkRtAFxybkUvv04dJzWGUinotO1G2jYPLrmTpil927zJrn1PKv3oIIgr/Vp9aa6dSraS1jrK5Q8qnra4hDxbcX9Fxd1ooEQVuAT0KGiXIn6PmaWko90OXANqAj0K2gXaB8KbAih6VdAS0FbQQdGjpCnOVtVlL85WHBjrwF3LpiTRMZAGUsgFHAiaCJoF2gTaCjJIOdGyBLQGtAt0XPb4laTWzflYe1Lr1bJoW7AoT1brQtXqGlltO6cqVI6fHCrLzgyJjQyJDR4Sah5QEiqzc0NlXFZekyjN1rzdxYlKIjaZiIUvBTL+DNkYQwC4Q0mgAIgrhnCLX4lry/Tmbd2l6IgpXGE0l1zaboW1WmPzis1c48fwunHxL/jRUA8/2hYTm7e1+Cx+iB4F7QIp/BDyh/xDWsMPCpsDi0BbQbtAe0HHQAZ+EPkA8n6+n2z8AxoIKgLNAm0F7QIdAxn5B0A7f198jpIo+CIQ5+8D7fw9bOs9oI2/C+5d/i6W9nprwYi8nZLxDQwzrqwwk5QaZuIS84L8tdbv+8GjvHjS8KgnlAy4Zr6S0Zo12BVUklsL57uC/KM21ee6o3gQf4MCII6VvIGZ3yAVNAlUC1oKMoB7E9yb1AS6DnQHKACClwHtIJW/CHoZ9CYNAvlBk0Amvq8V0wT53lZvias4kb/K/4o3iou/wp+X5cv8OVm+xJ+V5Qso01G+yJ9rTXdRcTT6CWPsKO0oB6Jfz//Slhnn0opj+S7YzgUcCCoCTQTNAm0CGfguntE61xUHJU/Qi7gouHgrfSbL++guE/kXuPzeUjigKsA78gxwgK3qVi/3e2++FVUB3ms3gxPgvWIjOAHeS9aCE+BddBE4Ad65C8AJ8M6cBU6Ad+I0cIAgv/3xzGxXwcSFTC228YthpYthpYthpYtJxy8Wmb7XibX9sTUnBxbb4vf1y3E1dbCmJ1nTFNZ0F2uqZ02Xs6a1rKmQNZ3Hmnysycma0lmTnzU9wYbDFE3M3x5RHeFPZk0vsqbtrKmRNXlZUxZrymRNKivwB7m79cx8WZTLoq1YHDqUZ4xG9LFxNyzqhs+7ERN2AfeCNFnzQ0jNCAk70kWZ0ZZTFKoPGJm3pHgc34OBe/AY9tABkA4PaA/caA+U7IECG7AINAu0G3QMpIEMkM7AwjdJtAEHgopAs0BrQMdABrmcYyBOS8JLfFQubGB40RNFje9BFj8UuLnbn2Z32n32ccomJ7Ols4npWjovIHknjYs1xQaZdce31u++tVJUcRS/lm+iNDyI68Llptbv01xB9odW7xOu4gR2C6Xr4HVsBHlZFsrh1CjrQ8lpEuUQcvKHUOa1OmdgmK3Vm+vqYDFi1A7X987Drs+cQQ72iPMJ11tqUMdaXX9Hy0M7XG84N7heGBg0oeVJb5Ch6FCl6E7ncNf2F6XoWnRsaXVdLoodrsucY10LnbKjPtRxXiNqfptrinemaxz0lTlnu/yN0LnDVeQ8z1UYkhoqxuxwDcISfCE2B4vt55STetKlwukFQdbgzzXebKw0TjQOM+YZc41uo8uYZkw1xpviTHZTjMliMptMJoNJZ+ImMsUHtYN+n/jtPt4g/0nDoJM/7kvezkn+e4D8yZ8zE6ezKNBHqeAVU0tYRWD3HKqYrQZOTPUEmXnyzIDeU8ICcRVUMa0kMNxXETRqUwIFvoqAcdK5lS2MXVuF1gBfH2Q0rTLINNG0LlV8f7mTGItdd02qKPuuu6aqipITLypKLoobHTtiTNkvQG0Yfd0pOYJPC9xcMbUy8GBaVSBPMFpaVUXgBvEF5072FTteXraTfSmKqsqdymj2VfkU0a6MLquqqgiyGVKOVPYl5OAxX0o5E17MQo5UU3pIbktILgvjIZcpCshFRVGWlMuKipJyOibkWhozy8taMjOlTJJKjVKmMUntKfNiFmSysqRMYhO9KGVeTGwSMoHRUsTphEi6U4qwFHJKESdLkSIzukUGhkU2nBLZIGdSWLeMMyRjPdglYz0IGV9vU32Jz8faRlXNqRZfDtd6yutBtYGrL2pIDjTNVtWWOVXhb429tbPnNIiyrj5Q5akvC8zxlKkto6p/obtadI/ylLXgvjitsqXaX1/WOso/qtxTV1bVNnbSkIKIuTacmmvIpF9QNkkoGyLmGlvwC90FonusmKtAzFUg5hrrHyvnIunjkypbTFRSVVodKtt4tBn+WpvqripJtC8dLZ13lDv58tQO3Fa2UbSvKmDxlASsINHVv7h/sejCmRJdMeIXgHBX8uWj3KkdbFu4y47mWE8J+VZc2HghJZfPLwv9NSKhacWFwuAh9DX+WkJfecBfV9a4Ap8SAjlTKwJFk2dWthiNaK0VWwqM7GqLji4PartDjQPQOFI0KsopQdFWKNqiosKCpz//C8NlqTgFTfyJNuZPZyuosUoJpFdM4wgF08JftXbgLiVeD41V2GAj87HGLh3hZft8FKqT2HMXrbgwzIVtsSJchkZiSGOXSU4lYSzfKYutgEIRuUj8kK8X/8dlxEfDWHdsFkD8C9NPqrL7J7+efiRVt1v8r9ftkJyp7yAbpTGHP051sVKTMy2dMx5rT7eRKSmodbZbLCXTwXzVHh0tmRP+DIsVnFeNYi6/1cqnR6l2O9BsswGTZUtQ+9qfbbEYpkeluNLsMWKo3WzFMLtF6LOrTH5qEOMIKtvFUMmI0WB+wLSS+bZdaAHznR/jwdWkj6pO9tlPhCxQU3gSWBiu1hwVRi0qPFkoaPCg0lX+YUqqEfFfjzeAzuBITknmhmizxWw1K4aExPjEPomKIVVJcrO4GECyyelmieZYN54P8/lykNaymvxYd15SYlJiXEI8j+GeLHfesIJhw4YO8WZ7Pe7b2fcPzby8akXjhEuuf2VdZwsbcf29g8vH37JowvbOl/UdCWlnz+7c+8z9nZ0P1OVtHza4/LP7Pvk2R3wy2kakWwfbR9Fd/jMM+nSTaZORGY2k6IT9yWS8TeVqNOcp0booLmwWJa0YZRbGj/q39vNHSwNaoqOl9Tq7zHi8y4xmYcYJ9q99XYYcLy05wX6iZvxhKhIGjBsxsKbQLgwJEyS4JW1TPvjpYx44OUnfsb1z5PaT54f9SHcSe7FSMh33p9fHLoznFfaK+HPt58broi3ptpgYSkoO7Suuy6fiunwKzHc7hG/EeU3CvWIFbzKLnZjsYv0m4U39xQZMKWoKw19KslXaxCptYpU2sf6v2uSH02zi6OlaXb41wb6sRjaND3lX2DLSwVgNhdwjncM53O5Y8Kc8g/fbPH7R5qovOl/oXM8uffL2mrMHX9G5Qd8RE1e/Y/ETnSdPPqywjWuqf59gFVeOQbBhB2xopP1+h0HuzijRYBR7NEpkQe17aTOs+nt/rOAMerF5o0R0/9guGHT/6I8VnJ6n6xThTga9LirIG9tUHdPhFvW4QWV8oMIU8I8xabmgdsQfLa1nCpvuq65TeKjLhj912ayzXZpMaDTtuLXngbR/LZzmcM0n9kJ7YchcMFR30IIfDRWexPt0pumaO1P11u3bf/gXvKhCO6JL142mBESj2/1JLnIm8OlKjb4manp0vbJQvySqPtqUENQOy6ljwfinCC7NKTA77h39D/EnUnSD40Y6BjuL48anFDsnx1U7pjjr4han1DlXGlYmnOAnku2UyGzWpKRJibWJS/FR3Wm7zn6HndvtulSn2Ugd/EFi2u52YQjYc7c/xm43TLczxm7q49RFIwAePy0khtw3yW8Nau9LS4H5Qq4SzD+kyaxCVVR2zpCAlVlTXKi1ZXmHiPLxdM+QQS7mSoR1/dVCUWK+3SSjZChummTczDT6M3OGuIxFuOsqRhlFjRbRY1Sjo/l0Y7J4VEanmN0YIzzc6BTzGhPFMoyO9CEFPY+7r8Ynz/thtC3z+U4s6+HgR0/WoKPoqDz+J5cVsti4ESPiRoS8HRJs2XKWZDB4MijWTvl5FBtvdCcm5ucNY27h+BkG5byO3C92ftZ5jMW//3cWw346Ym5dN2fjyXf5ZMvwGRtWP8BmJN3dzlxMYRbWt3N/5/d29dGOBnbTlaUN94mzUKQdUVrgCYOUFn+fJGmFZIkOiX0RD+QzyO5ivF1MVheT2cV4upiMLsbdxagirqwRnC4jPmNk1FlRZZkzMuozVkddG3VF5n19Hsp9WrFGJaUkJw2qyH0zSZ/Kp3Nuz2Pm5GpTdVS1uTq62lJtXWBaELXAvCB6gWWBtd3bnm3L9mZmZ/YbljnTXBU91zu37wrPisymzBvMt1k2970l96ZB95gfsNydfU/fNu+z3kS5F/GIMroYTxeT2cWE92vo2oKha1OGrm3iEAS1/f649BEzTdlZFrMuRfUm6KIHpKUE+YP+DEeucBGXo8gx0THL8ahjr8Ngc7gcSxwHHDqXY5ODO57C6U5AKJe+748X4nbmZ9zO9iFoMzvj4iy0xScOkWfCHhM7hLEB1WmL0niaM8GoE8sQg8B80i4OjGD8fWw2cM4B0S6E7EyHv0/ykDwxfKiIL47kEAqPdSQK73WoYqRDFaMcdrErh/Re0Ytn38HPJaP21Q4ZDjNzoOgx54h9OSxHzCnGgzkio75kxPgccfyECjBf7xBaclLkCtw4ibV5u/N4UV5THs8TxzuT5FLILgObGjI+l04idyS9xSXWpkovVDNtdrFlm1y7TRXCNvGW8Yol2GLE/DaLUGYziJltGQeIFdFERDrH4PBprFk2vutEirPns6NcPsFes8wXCqfLxJn8ujt2Hl2O44my6OgynE6c4mXLfYftJ2WBU4o/HNakEfLm48/un+7Rx+d6Y+1x9j52xZBhVVMpqq8xlen7A9LjUXXHeFIpw2O1mPqZU1nf7CizwadLJZc9LZXhEiRCeAhkAM/xrV27lk6tpmYZq1m+rKa7QQj1KZCxYOiQbG/2AD50iLgr5eclJiYZvSI2JMSLq5R8X4oQ4i1qtW24dPXKoVk3PHfrxOLhOddPveypmbEBS+P81QsSEwemXrHrlhnzn7ts7zvsDOfC5fVlZ3iSs/LOXDth7Kq+Lt+4S+clT6meUuBxpvUxZ+YXr66eufWch0UEydS+4jn6WymJuXaSJXzjiO66epi6GGMXY+hizMLNPd4hUcJLpoJpcjBiFquZKZRoj/LZzIZEpxJts2dQBrPGydgcJ/0hzixvNVkWphlN5VHltcalxibjdUYdGVXjHcaAcbdxn9FgFG8G8W4xCr8SnmIUL5KYGMl8J11OMjKci0uK8D2juKREC98zGmRUFw4uA3sHX0DJbFjL+T0uLuLJfH3YfjR8Nz78NV7DR8V7OBZhPDY/3/6CiOVh0awk8Ri8Q2M9Q/NjC2LzEzyx8eIJcnvK2YWzF+VecUXbY4/18fVNv3OrfXT9XXzORmZc1HnNxpM3jM8N/TymkMJE0isKwgSjZP3n0bvpO5NGJjJpnbjhRmknyUxm+X/Q0UALHslJ3BatwBiJNooB2skGjAX+RHEUC+xDccB46gNMAP5IiRQPTKIEYDLwB3JQEvgUcoBPpRSgU2IapQLTyal9Ty6JKqUB3eQCZpAK9AC/o0xyA7MoA+gFfkvZ5AH2hR99S/3IC8yR6KNs7QTlUl9gf4kDKAc4kHzAQdQfOBj4DeXRAGA+DQQOoUHa1zRU4jAaDCygfOBwGqL9i0ZIHElDgaMkFtIw4BlUABxNw4FFNEL7ivw0ElhMo4AlVAgsBX5JZXQGsJxGA8fg7XmcxpIfOI6KgWdSCfAsiRVUCjybyoDjaYx2jCZInEhjgZNoHHAynal9QVMkTqWzgNNwNztK02k8cIbEc2gCsJImap9TFU0CzgQepXNpMvhqmgqsoWnA8yTOounaP6mWZgDr6BzgbOA/aA5VAefSTGA9nQs8n6q1z2iexAaqAc6n87QjtIBqwS+UuIjqgItpNtovoDnAJRKX0lztU1pG9cDlNA/YKHEFNWif0IU0H3gRLQBeDPyYVtJC4CpaDLyELgBeKnE1LQFeRkuBl9My7TCtkdhEjcC1tAL4O7pQE//fexHwConr6GLtEF1JK4FX0SrgeroEuIEu1T6kZloNvJouQ8tG4Id0DV0OvJbWADfRWuB1wIN0Pf0OuJl+D7yBrtAO0I0Sb6J1wJvpKuAttB69fwAeoFtpA3ALNWv76Y90NfA22gj8k8Tb6VrgVtoEvIOuA94J/IDuouuBd9Nm4D10A/BeulF7n+6jm7T36H66GbiNbgE+IPFB+gPwIboV+DD9Ebhd4iN0G/BR+hMwQLcDW4DvUittBbbRHcB2ukt7hx6ju7W3aYfEx+keYJDuBe6k+4AdEp+gbcAn6QHtLXqKHgT+WeIuegi4mx4G/oW2A5+mR4B76FHtTXqGAsBnqUX7Oz0n8a/UCnye2rQ36AVqB75IjwFfoh3Al+lx4Cv4GPMGvUo7gXsl7qMO4N/oSeBr9JT2Or0OfI3eoD8D/067gG/Sbu1v9JbEt+lp4Du0B/guPQN8T+L79CzwA3oOuJ/+qu2jAxIP0gvaXvqQXgQeopeAH0k8TC8DP6ZXgJ/Qq8BPaZ/2Kh2R+Bn9DfgPek17hf5JrwM/l3iU3gB+QW9qL9Mxegt4XOKX9DbwK3oH+C96F/i1xG/ofe0lOkEfAL+l/cDvgC/S93QA+AMdBP5IHwJ/kniSPtJeoE46DNToY+B/Yvr/fEz/8jce0//Z65j+2a/E9M9Oi+lHfiWmf3paTP+kFzH98KmYvjwipn/0KzH9IxnTPzotph+SMf1Qj5h+SMb0QzKmH+oR0z88LaYflDH9oIzpB3+DMf2d/0cx/Y3/xPT/xPTfXEz/rd/Tf7sx/dfu6f+J6f+J6b8c05//7cf0/wK993M1CmVuZHN0cmVhbQplbmRvYmoKOSAwIG9iago8PC9UeXBlIC9Gb250RGVzY3JpcHRvcgovRm9udE5hbWUgL0FBQUFBQStBcmlhbE1UCi9GbGFncyA0Ci9Bc2NlbnQgOTA1LjI3MzQ0Ci9EZXNjZW50IC0yMTEuOTE0MDYKL1N0ZW1WIDQ1Ljg5ODQzOAovQ2FwSGVpZ2h0IDcxNS44MjAzMQovSXRhbGljQW5nbGUgMAovRm9udEJCb3ggWy02NjQuNTUwNzggLTMyNC43MDcwMyAyMDAwIDEwMDUuODU5MzhdCi9Gb250RmlsZTIgOCAwIFI+PgplbmRvYmoKMTAgMCBvYmoKPDwvVHlwZSAvRm9udAovRm9udERlc2NyaXB0b3IgOSAwIFIKL0Jhc2VGb250IC9BQUFBQUErQXJpYWxNVAovU3VidHlwZSAvQ0lERm9udFR5cGUyCi9DSURUb0dJRE1hcCAvSWRlbnRpdHkKL0NJRFN5c3RlbUluZm8gPDwvUmVnaXN0cnkgKEFkb2JlKQovT3JkZXJpbmcgKElkZW50aXR5KQovU3VwcGxlbWVudCAwPj4KL1cgWzAgWzc1MF0gMzkgWzcyMi4xNjc5NyAwIDYxMC44Mzk4NF0gNTEgWzY2Ni45OTIxOSAwIDAgMCA2MTAuODM5ODRdIDcyIFs1NTYuMTUyMzRdIDg3IFsyNzcuODMyMDNdXQovRFcgNTAwPj4KZW5kb2JqCjExIDAgb2JqCjw8L0ZpbHRlciAvRmxhdGVEZWNvZGUKL0xlbmd0aCAyNjU+PiBzdHJlYW0KeJxdkctqxDAMRff+Ci2niyHvTAdCoEwpZNEHTfsBjq2khsY2jrPI39ePNIUKbDjoXlmSk1v32ElhIXkzivVoYRSSG1zUahjCgJOQJMuBC2Z3CjebqSaJM/fbYnHu5KhI0wAk7y67WLPB6YGrAe9I8mo4GiEnOH3eesf9qvU3zigtpKRtgePoKj1T/UJnhCTYzh13eWG3s/P8KT42jZAHzmI3THFcNGVoqJyQNKmLFponFy1Byf/lq+gaRvZFjVfnF6dO07JsA10j1YGKIlCVRorKKirL+0B1FV7Z62W/1Y9mqjqaovdS7OqY9+35NR6zs9UYN3bYdZjXTyokHt+hlfYuf34A/WeHbwplbmRzdHJlYW0KZW5kb2JqCjQgMCBvYmoKPDwvVHlwZSAvRm9udAovU3VidHlwZSAvVHlwZTAKL0Jhc2VGb250IC9BQUFBQUErQXJpYWxNVAovRW5jb2RpbmcgL0lkZW50aXR5LUgKL0Rlc2NlbmRhbnRGb250cyBbMTAgMCBSXQovVG9Vbmljb2RlIDExIDAgUj4+CmVuZG9iagp4cmVmCjAgMTIKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDE1IDAwMDAwIG4gCjAwMDAwMDA0MTYgMDAwMDAgbiAKMDAwMDAwMDEwOCAwMDAwMCBuIAowMDAwMDEwNDk1IDAwMDAwIG4gCjAwMDAwMDAxNDUgMDAwMDAgbiAKMDAwMDAwMDYyNCAwMDAwMCBuIAowMDAwMDAwNjc5IDAwMDAwIG4gCjAwMDAwMDA3OTYgMDAwMDAgbiAKMDAwMDAwOTYxOCAwMDAwMCBuIAowMDAwMDA5ODUyIDAwMDAwIG4gCjAwMDAwMTAxNTkgMDAwMDAgbiAKdHJhaWxlcgo8PC9TaXplIDEyCi9Sb290IDcgMCBSCi9JbmZvIDEgMCBSPj4Kc3RhcnR4cmVmCjEwNjM0CiUlRU9GCg==";function lme(e){let[n,r]=m(null);f((()=>{if("html"!=e.previewState)if("pdf"!=e.previewState){var t=new URLSearchParams({ReportID:e.reportId}).toString();b.invokeCustomApi("HealthAndWellnessApi.DownloadReport","GET",t,!0).then((function(e){r(e)}))}else r({Type:"ResearchKitConsentDocument",Summary:"Summary",Content:sme,ContentType:"application/pdf"});else r({Type:"Subsequent evaluation note",Summary:"Summary",Content:ome,ContentType:"text/html"})}),[]);let a="";return n&&(a=n.Type,n.Summary&&(a+=" • "+n.Summary)),t.createElement(Kt,{className:"mdhui-report-view"},t.createElement(Iz,{subtitle:a,variant:"compressedModal",showCloseButton:!0}),!n&&t.createElement(Dn,null),n&&t.createElement(ime,{type:n.Type,content:n.Content,contentType:n.ContentType}))}function cme(e){return t.createElement(Kt,null,t.createElement(Iz,{showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),t.createElement(iK,{previewState:e.previewState,term:e.term,labObservationID:e.labObservationID,openLinksInNewWindow:e.openLinksInNewWindow}))}function ume(e){let[n,r]=t.useState([{key:"Dashboard"}]);function a(e){r([...n,e])}function i(e){a({key:"TermInformation",properties:{term:{TermFamily:e.TermFamily,TermNamespace:e.TermNamespace,TermCode:e.TermCode}}})}function o(){a({key:"ExternalAccounts"})}function s(){r(n.slice(0,n.length-1)),2==n.length&&b.triggerEvent({type:"applicationDidBecomeVisible"})}function l(n){return t.createElement(HW,{concept:n,onClick:()=>function(e){a("Reports"==e||"Immunizations"==e||"Procedures"==e?{key:"NewsFeed",properties:{feed:e}}:{key:e})}(n),previewState:"default"==e.previewState?"Default":void 0})}function c(c){var u,d,h,m,p,f;if("Dashboard"==c.key)return t.createElement(Kt,{colorScheme:null!==(u=e.colorScheme)&&void 0!==u?u:"auto"},t.createElement(bW,{previewState:"default"==e.previewState?"externalAccountsLoaded":void 0,externalAccountCategories:["Provider","Health Plan"],triggerWebExternalAccountSyncComplete:!0}),t.createElement(Vz,{noTopMargin:!0},t.createElement(fW,{previewState:"default"==e.previewState?"externalAccountWithIssue":void 0,externalAccountCategories:["Provider","Health Plan"],onClick:()=>o()}),t.createElement(xW,{excludeDeviceManufacturers:!0,onClick:()=>o(),previewState:"default"==e.previewState?"Default":void 0}),t.createElement(XW,{onViewTermInfo:e=>i(e),onClick:()=>{a({key:"NewsFeed",properties:{feed:"LabReports"}})},previewState:"default"==e.previewState?"ImportantLabs":void 0}),t.createElement($W,{previewState:"default"==e.previewState?"BloodTypeLabs":void 0,onClick:()=>function(){let e="https://medlineplus.gov/ency/article/003345.htm";b.getCurrentLanguage().toLowerCase().startsWith("es")&&(e="https://medlineplus.gov/spanish/ency/article/003345.htm"),window.open(e,"_blank")}()}),l("Medications"),l("Immunizations"),l("Reports"),l("Allergies"),l("Conditions"),l("Procedures")),t.createElement(Ms,null,t.createElement(DV,{previewState:"default"==e.previewState?"enabled":void 0,variant:"small",hideWhenConnected:!0,onClick:()=>a({key:"ConnectEhr"})})));if("NewsFeed"==c.key)return t.createElement(Uhe,{feed:null===(d=c.properties)||void 0===d?void 0:d.feed,previewState:e.previewState,presentation:"Push",colorScheme:e.colorScheme,onEventSelected:e=>{r([...n,{key:"NewsFeedEventDetail",properties:{eventReference:e}}])},onReportSelected:e=>{a({key:"ReportDetail",properties:{reportID:e}})}});if("NewsFeedEventDetail"==c.key){let n,r=null===(h=c.properties)||void 0===h?void 0:h.eventReference,i=r.feed;return e.previewState&&("Procedures"==i&&(n="ProcedureGroup"),"LabReports"==i&&(n="LabReport")),t.createElement(Vhe,{feed:r.feed,presentation:"Push",pageDate:r.pageDate,pageId:r.pageId,onViewLabObservationTermInfo:e=>{a({key:"TermInformation",properties:{labObservationID:e}})},previewState:n})}return"TermInformation"==c.key?t.createElement(cme,{presentation:"Modal",openLinksInNewWindow:!0,previewState:e.previewState,term:null===(m=c.properties)||void 0===m?void 0:m.term,labObservationID:null===(p=c.properties)||void 0===p?void 0:p.labObservationID}):"Medications"==c.key?t.createElement(Khe,{presentation:"Push",previewState:e.previewState,onViewTermInfo:e=>i(e)}):"Conditions"==c.key?t.createElement(Bhe,{presentation:"Push",previewState:e.previewState,onViewTermInfo:e=>i(e)}):"Allergies"==c.key?t.createElement(Lhe,{presentation:"Push",previewState:e.previewState,onViewTermInfo:e=>i(e)}):"ReportDetail"==c.key?t.createElement(lme,{previewState:"html",reportId:null===(f=c.properties)||void 0===f?void 0:f.reportId}):"ExternalAccounts"==c.key?t.createElement(Whe,{presentation:"Push",onBack:()=>s(),excludeDeviceManufacturers:!0,colorScheme:e.colorScheme,previewState:e.previewState,connectExternalAccountOptions:e.connectExternalAccountOptions}):"ConnectEhr"==c.key?t.createElement(Kt,{colorScheme:e.colorScheme},t.createElement(Iz,{showBackButton:!0}),t.createElement(Vz,null,t.createElement(hG,{providerCategories:["Provider","Health Plan"],connectExternalAccountOptions:e.connectExternalAccountOptions}))):void 0}return b.back=s,b.dismiss=s,t.createElement(t.Fragment,null,n.map(((e,r)=>t.createElement("div",{key:e.key,style:{display:r!=n.length-1?"none":void 0}},c(e)))))}A(".mdhui-report-view {\n height: calc(100dvh - 8px);\n display: flex;\n flex-direction: column;\n}\n\n.mdhui-report-view .mdhui-report-content {\n flex-grow: 1;\n}");export{Xt as Action,On as ActivityMeter,iV as AllergiesList,Lhe as AllergiesView,cV as AppDownload,IU as AsthmaActionPlanManager,rV as AsthmaActionPlanView,dle as AsthmaActivityView,jU as AsthmaAirQualities,hle as AsthmaAirQualityView,RU as AsthmaAlertTakeoverNotice,zU as AsthmaAlertTakeoverTrigger,mle as AsthmaAlertTakeoverView,FU as AsthmaBiometrics,HU as AsthmaControlCalendar,WU as AsthmaControlStatusHeader,mU as AsthmaDailyDataType,ple as AsthmaDayView,fle as AsthmaHeartAndLungsView,ZU as AsthmaLogEntryDetails,yle as AsthmaLogEntryEditorView,QU as AsthmaLogEntryHeader,Zq as AsthmaParticipant,JU as AsthmaPostEnrollmentSurveyTrigger,tV as AsthmaProviderReport,ble as AsthmaProviderReportView,nV as AsthmaRecommendedArticle,wle as AsthmaSleepView,Fhe as BlankView,hV as BloodPressureVisualization,Nn as Button,Ds as Calendar,Ns as CalendarDay,Ms as Card,js as CardTitle,Zde as CelebrationStep,Yde as CelebrationStepContainer,mV as ConditionsList,Bhe as ConditionsView,Kde as ConnectDeviceAccountStep,Xde as ConnectDeviceAccountStepContainer,EV as ConnectDevicesMenu,DV as ConnectEhr,Qde as ConnectEhrStep,Jde as ConnectEhrStepContainer,qhe as ConnectEhrView,MV as ConnectFitbit,jV as ConnectGarmin,RV as DailyDataChart,fH as DailyDataType,ZR as DataChart,vz as DateRangeContext,yz as DateRangeCoordinator,dz as DateRangeNavigator,wz as DateRangeTitle,xz as DayTrackerSymbol,LV as DeviceDataMonthChart,FV as DeviceDataMonthCharts,Hhe as DeviceDataView,Az as DumbbellChart,sW as EhrNewsFeed,cW as EhrNewsFeedEventDetail,Vhe as EhrNewsFeedEventDetailView,Uhe as EhrNewsFeedView,fW as ExternalAccountConnectionAlert,vW as ExternalAccountList,bW as ExternalAccountsLoadingIndicator,xW as ExternalAccountsPreview,Whe as ExternalAccountsView,Pz as Face,IW as FitbitDevices,jW as FitbitMonthCharts,Ghe as FitbitView,zW as GarminDevices,LW as GarminMonthCharts,$he as GarminView,Yhe as HealthAndWellnessView,HW as HealthPreviewSection,Dz as Histogram,Zhe as HomeView,qq as InboxCompletedListItem,rme as InboxHistoryView,hK as InboxItemList,cK as InboxItemListCoordinator,Hq as InboxMessageListItem,uK as InboxMessageView,Uq as InboxResourceListItem,Vq as InboxSurveyListItem,tme as InboxView,$W as LabResultsBloodType,XW as LabResultsSummary,Kt as Layout,Yt as LayoutContext,Dn as LoadingIndicator,QW as MedicationsList,Khe as MedicationsView,Nz as MonthlyEventMatrix,eG as MostRecentNotification,ule as MyDataHelpsAssistant,Iz as NavigationBar,Jhe as NewPointsView,Mz as NotesInput,nG as NotificationList,Xhe as NotificationsView,oV as PlatformSpecificContent,jz as ProgressBar,Rz as ProgressBarStep,zz as ProgressRing,rG as ProjectHeader,sG as ProjectSupport,hG as ProviderSearch,mG as RecentDailyDataBarChart,yG as RelativeActivity,gG as RelativeActivityDayCoordinator,pG as RelativeActivityDayNavigator,bG as RelativeActivityToday,Fz as Resource,Hz as ResourceList,ame as ResourceListView,wG as RestingHeartRateCalendar,Uz as RotatingComponentCoordinator,Vz as Section,Wz as SegmentedControl,OG as SeverityCalendar,Is as ShinyOverlay,Gz as SingleDataPoint,Yz as SingleExternalAccount,Kz as SingleNotification,Qz as SingleSurveyTask,Jz as SparkBarChart,ume as StandaloneHealthAndWellnessView,tL as StatusBarBackground,jde as StepDetailText,$de as StepImage,Gde as StepImageIcon,xle as StepLayout,Nde as StepMarkdown,Rde as StepNextButton,Mde as StepText,Ide as StepTitle,xG as SurveyAnswerChart,AG as SurveyTaskList,Qhe as SurveyTasksView,eL as Switch,phe as SymptomSharkCalendar,Nhe as SymptomSharkCalendarView,vhe as SymptomSharkLogEntry,Phe as SymptomSharkLogEntryEdit,Mhe as SymptomSharkLogEntryEditView,Ohe as SymptomSharkLogEntryList,The as SymptomSharkLogToday,She as SymptomSharkMonthReport,xhe as SymptomSharkNotesTimeline,ghe as SymptomSharkOverallExperienceChart,Dhe as SymptomSharkReportBuilder,jhe as SymptomSharkReportBuilderView,Rhe as SymptomSharkSymptomDetailView,mhe as SymptomSharkSymptomMatrix,khe as SymptomSharkSymptomSeverityChart,Ehe as SymptomSharkSymptomSeveritySummary,ihe as SymptomSharkSymptomTreatmentFilters,Ahe as SymptomSharkSymptomTreatmentHistograms,hhe as SymptomSharkVisualizationCoordinator,iK as TermInformation,cme as TermInformationView,nL as TextBlock,bz as Title,rL as TrackerItem,E as UnstyledButton,Lq as ValueSelector,oK as ViewEhr,Fq as ViewHeader,Bq as WeekCalendar,ehe as YouTubeStep,the as YouTubeStepContainer,NU as asthmaDataService,sU as bloodPressureDataProvider,tU as checkDailyDataAvailability,Kq as computeAsthmaControlState,nhe as convertToSymptomSharkConfiguration,KH as dailyDataTypeDefinitions,Yq as dateToAsthmaLogEntryIdentifier,fz as get6MonthStart,aU as getAllDailyDataTypes,sH as getAsthmaAirQualityDescriptionText,Qq as getAsthmaDataStatusColor,Xq as getAsthmaDataStatusText,rH as getAsthmaImpactTexts,aH as getAsthmaImpacts,eH as getAsthmaSymptomLevel,Jq as getAsthmaSymptomLevelText,tH as getAsthmaSymptomTexts,nH as getAsthmaSymptoms,iH as getAsthmaTriggerTexts,oH as getAsthmaTriggers,iU as getDailyDataTypeDefinition,pH as getDayKey,gz as getDefaultIntervalStart,iz as getLanguageFromIso,Ps as getLocaleFromIso,pz as getMonthStart,mz as getWeekStart,mH as isBloodOxygenLevelWithinRange,lH as isDaytimeRestingHeartRateWithinRange,cH as isNighttimeRestingHeartRateWithinRange,uH as isRespiratoryRateWithinRange,hH as isSleepDisturbancesWithinRange,dH as isStepsWithinRange,az as language,nU as queryDailyData,rU as queryPreviewDailyData,uU as queryRelativeActivity,JH as registerDailyDataProvider,eU as registerDailyDataTypeDefinition,N as resolveColor,eme as showNewPoints,UH as simpleAvailabilityCheck,cU as useInitializeView,BV as useInterval};