/*! For license information please see main.ab77a5d8.js.LICENSE.txt */ (()=>{var e={102:(e,t,n)=>{"use strict";var r=n(9814);function i(){}var a=null,o={};function s(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("Promise constructor's argument is not a function");this._x=0,this._y=0,this._z=null,this._A=null,e!==i&&p(e,this)}function l(e,t){for(;3===e._y;)e=e._z;if(s._B&&s._B(e),0===e._y)return 0===e._x?(e._x=1,void(e._A=t)):1===e._x?(e._x=2,void(e._A=[e._A,t])):void e._A.push(t);!function(e,t){r((function(){var n=1===e._y?t.onFulfilled:t.onRejected;if(null!==n){var r=function(e,t){try{return e(t)}catch(n){return a=n,o}}(n,e._z);r===o?u(t.promise,a):c(t.promise,r)}else 1===e._y?c(t.promise,e._z):u(t.promise,e._z)}))}(e,t)}function c(e,t){if(t===e)return u(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"===typeof t||"function"===typeof t)){var n=function(e){try{return e.then}catch(t){return a=t,o}}(t);if(n===o)return u(e,a);if(n===e.then&&t instanceof s)return e._y=3,e._z=t,void h(e);if("function"===typeof n)return void p(n.bind(t),e)}e._y=1,e._z=t,h(e)}function u(e,t){e._y=2,e._z=t,s._C&&s._C(e,t),h(e)}function h(e){if(1===e._x&&(l(e,e._A),e._A=null),2===e._x){for(var t=0;t{"use strict";var r=n(9167),i=TypeError;e.exports=function(e){if(r(e))throw new i("Can't call method on "+e);return e}},252:(e,t,n)=>{"use strict";var r=n(5711),i=n(7483),a=n(5640),o=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&i(n=e.toString)&&!a(s=r(n,e)))return s;if(i(n=e.valueOf)&&!a(s=r(n,e)))return s;if("string"!==t&&i(n=e.toString)&&!a(s=r(n,e)))return s;throw new o("Can't convert object to primitive value")}},329:(e,t,n)=>{"use strict";var r=n(970),i=n(5640),a=r.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},579:(e,t,n)=>{"use strict";e.exports=n(2799)},769:(e,t,n)=>{"use strict";var r=n(970),i=n(7483);e.exports=function(e,t){return arguments.length<2?(n=r[e],i(n)?n:void 0):r[e]&&r[e][t];var n}},781:(e,t,n)=>{"use strict";var r,i,a=n(970),o=n(1909),s=a.process,l=a.Deno,c=s&&s.versions||l&&l.version,u=c&&c.v8;u&&(i=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},945:(e,t,n)=>{"use strict";var r=n(3054),i=n(5711),a=n(7179),o=n(8394),s=n(8703),l=n(7143),c=n(8107),u=n(7831),h=Object.getOwnPropertyDescriptor;t.f=r?h:function(e,t){if(e=s(e),t=l(t),u)try{return h(e,t)}catch(n){}if(c(e,t))return o(!i(a.f,e,t),e[t])}},970:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},990:(e,t,n)=>{"use strict";var r=n(9581);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1151:(e,t,n)=>{"use strict";var r=n(970),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},1497:(e,t,n)=>{"use strict";var r=n(3218);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},1909:(e,t,n)=>{"use strict";var r=n(970).navigator,i=r&&r.userAgent;e.exports=i?String(i):""},2009:(e,t,n)=>{"use strict";var r=n(9386),i=n(7609),a=n(2846),o=Object,s=r("".split);e.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"===a(e)?s(e,""):o(e)}:o},2123:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,i){for(var a,o,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l{"use strict";var r=n(3054),i=n(7831),a=n(7128),o=n(5157),s=n(7143),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",p="writable";t.f=r?a?function(e,t,n){if(o(e),t=s(t),o(n),"function"===typeof e&&"prototype"===t&&"value"in n&&p in n&&!n[p]){var r=u(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:h in n?n[h]:r[h],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(o(e),t=s(t),o(n),i)try{return c(e,t,n)}catch(r){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},2576:function(e){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";function n(e){var t=e.getContext("2d"),n=e.width,r=e.height,i=t.getImageData(0,0,n,r).data,s=a(!0,n,r,i),l=a(!1,n,r,i),c=o(!0,n,r,i),u=o(!1,n,r,i)-c+1,h=l-s+1,d=t.getImageData(c,s,u,h);return e.width=u,e.height=h,t.clearRect(0,0,u,h),t.putImageData(d,0,0),e}function r(e,t,n,r){return{red:r[4*(n*t+e)],green:r[4*(n*t+e)+1],blue:r[4*(n*t+e)+2],alpha:r[4*(n*t+e)+3]}}function i(e,t,n,i){return r(e,t,n,i).alpha}function a(e,t,n,r){for(var a=e?1:-1,o=e?0:n-1;e?o-1;o+=a)for(var s=0;s-1;o+=a)for(var s=0;s{"use strict";var r=n(5711),i=n(5640),a=n(9023),o=n(9908),s=n(252),l=n(8593),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!i(e)||a(e))return e;var n,l=o(e,u);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!i(n)||a(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},2799:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:i,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=i,t.jsxs=i},2846:(e,t,n)=>{"use strict";var r=n(9386),i=r({}.toString),a=r("".slice);e.exports=function(e){return a(i(e),8,-1)}},3054:(e,t,n)=>{"use strict";var r=n(7609);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},3218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4027:(e,t,n)=>{"use strict";n(5405),n(8339),n(4546),"undefined"===typeof Promise&&(n(4382).enable(),self.Promise=n(7806)),"undefined"!==typeof window&&n(4953),Object.assign=n(2123)},4138:(e,t,n)=>{"use strict";var r=n(9386),i=0,a=Math.random(),o=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++i+a,36)}},4288:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var x=v.prototype=new y;x.constructor=v,m(x,b.prototype),x.isPureReactComponent=!0;var w=Array.isArray,_={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function S(e,t,r,i,a,o){return r=o.ref,{$$typeof:n,type:e,key:t,ref:void 0!==r?r:null,props:o}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var M=/\/+/g;function T(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function E(){}function A(e,t,i,a,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l,c,u=!1;if(null===e)u=!0;else switch(s){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0;break;case d:return A((u=e._init)(e._payload),t,i,a,o)}}if(u)return o=o(e),u=""===a?"."+T(e,0):a,w(o)?(i="",null!=u&&(i=u.replace(M,"$&/")+"/"),A(o,t,i,"",(function(e){return e}))):null!=o&&(C(o)&&(l=o,c=i+(null==o.key||e&&e.key===o.key?"":(""+o.key).replace(M,"$&/")+"/")+u,o=S(l.type,c,void 0,0,0,l.props)),t.push(o)),1;u=0;var h,f=""===a?".":a+":";if(w(e))for(var m=0;m{"use strict";var r=n(4557),i=n(8107),a=n(7341),o=n(2267).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||o(t,e,{value:a.f(e)})}},4376:(e,t,n)=>{"use strict";var r=n(7483),i=n(9705),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not a function")}},4382:(e,t,n)=>{"use strict";var r=n(102),i=[ReferenceError,TypeError,RangeError],a=!1;function o(){a=!1,r._B=null,r._C=null}function s(e,t){return t.some((function(t){return e instanceof t}))}t.disable=o,t.enable=function(e){e=e||{},a&&o();a=!0;var t=0,n=0,l={};function c(t){(e.allRejections||s(l[t].error,e.whitelist||i))&&(l[t].displayId=n++,e.onUnhandled?(l[t].logged=!0,e.onUnhandled(l[t].displayId,l[t].error)):(l[t].logged=!0,function(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((t&&(t.stack||t))+"").split("\n").forEach((function(e){console.warn(" "+e)}))}(l[t].displayId,l[t].error)))}r._B=function(t){2===t._y&&l[t._E]&&(l[t._E].logged?function(t){l[t].logged&&(e.onHandled?e.onHandled(l[t].displayId,l[t].error):l[t].onUnhandled||(console.warn("Promise Rejection Handled (id: "+l[t].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+l[t].displayId+".")))}(t._E):clearTimeout(l[t._E].timeout),delete l[t._E])},r._C=function(e,n){0===e._x&&(e._E=t++,l[e._E]={displayId:null,error:n,timeout:setTimeout(c.bind(null,e._E),s(n,i)?100:2e3),logged:!1})}}},4391:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(7004)},4546:(e,t,n)=>{"use strict";n(4361)("patternMatch")},4557:(e,t,n)=>{"use strict";var r=n(970);e.exports=r},4953:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DOMException:()=>_,Headers:()=>u,Request:()=>b,Response:()=>x,fetch:()=>k});var r="undefined"!==typeof globalThis&&globalThis||"undefined"!==typeof self&&self||"undefined"!==typeof n.g&&n.g||{},i={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};if(i.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(e){return"string"!==typeof e&&(e=String(e)),e}function c(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i.iterable&&(t[Symbol.iterator]=function(){return t}),t}function u(e){this.map={},e instanceof u?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function d(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function p(e){var t=new FileReader,n=d(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:i.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():i.arrayBuffer&&i.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(i.blob)return this.blob().then(p);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=d(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in r)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),("GET"===this.method||"HEAD"===this.method)&&("no-store"===t.cache||"no-cache"===t.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function y(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function v(e){var t=new u;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();try{t.append(r,i)}catch(a){console.warn("Response "+a.message)}}})),t}function x(e,t){if(!(this instanceof x))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},m.call(b.prototype),m.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var w=[301,302,303,307,308];x.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})};var _=r.DOMException;try{new _}catch(S){(_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),_.prototype.constructor=_}function k(e,t){return new Promise((function(n,a){var o=new b(e,t);if(o.signal&&o.signal.aborted)return a(new _("Aborted","AbortError"));var c=new XMLHttpRequest;function h(){c.abort()}if(c.onload=function(){var e={statusText:c.statusText,headers:v(c.getAllResponseHeaders()||"")};0===o.url.indexOf("file://")&&(c.status<200||c.status>599)?e.status=200:e.status=c.status,e.url="responseURL"in c?c.responseURL:e.headers.get("X-Request-URL");var t="response"in c?c.response:c.responseText;setTimeout((function(){n(new x(t,e))}),0)},c.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request timed out"))}),0)},c.onabort=function(){setTimeout((function(){a(new _("Aborted","AbortError"))}),0)},c.open(o.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(o.url),!0),"include"===o.credentials?c.withCredentials=!0:"omit"===o.credentials&&(c.withCredentials=!1),"responseType"in c&&(i.blob?c.responseType="blob":i.arrayBuffer&&(c.responseType="arraybuffer")),t&&"object"===typeof t.headers&&!(t.headers instanceof u||r.Headers&&t.headers instanceof r.Headers)){var d=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){d.push(s(e)),c.setRequestHeader(e,l(t.headers[e]))})),o.headers.forEach((function(e,t){-1===d.indexOf(t)&&c.setRequestHeader(t,e)}))}else o.headers.forEach((function(e,t){c.setRequestHeader(t,e)}));o.signal&&(o.signal.addEventListener("abort",h),c.onreadystatechange=function(){4===c.readyState&&o.signal.removeEventListener("abort",h)}),c.send("undefined"===typeof o._bodyInit?null:o._bodyInit)}))}k.polyfill=!0,r.fetch||(r.fetch=k,r.Headers=u,r.Request=b,r.Response=x)},4997:e=>{"use strict";e.exports=!1},5043:(e,t,n)=>{"use strict";e.exports=n(4288)},5157:(e,t,n)=>{"use strict";var r=n(5640),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not an object")}},5173:(e,t,n)=>{e.exports=n(1497)()},5323:(e,t,n)=>{"use strict";var r=n(208),i=Object;e.exports=function(e){return i(r(e))}},5405:(e,t,n)=>{"use strict";var r=n(970),i=n(4361),a=n(2267).f,o=n(945).f,s=r.Symbol;if(i("dispose"),s){var l=o(s,"dispose");l.enumerable&&l.configurable&&l.writable&&a(s,"dispose",{value:l.value,enumerable:!1,configurable:!1,writable:!1})}},5640:(e,t,n)=>{"use strict";var r=n(7483);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},5711:(e,t,n)=>{"use strict";var r=n(8898),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},5896:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(!(0>>1;ra(l,n))ca(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(ca(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],h=1,d=null,p=3,f=!1,m=!1,g=!1,b="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,v="undefined"!==typeof setImmediate?setImmediate:null;function x(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(g=!1,x(e),!m)if(null!==r(c))m=!0,P();else{var t=r(u);null!==t&&z(w,t.startTime-e)}}var _,k=!1,S=-1,C=5,M=-1;function T(){return!(t.unstable_now()-Me&&T());){var o=d.callback;if("function"===typeof o){d.callback=null,p=d.priorityLevel;var s=o(d.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof s){d.callback=s,x(e),n=!0;break t}d===r(c)&&i(c),x(e)}else i(c);d=r(c)}if(null!==d)n=!0;else{var l=r(u);null!==l&&z(w,l.startTime-e),n=!1}}break e}finally{d=null,p=a,f=!1}n=void 0}}finally{n?_():k=!1}}}if("function"===typeof v)_=function(){v(E)};else if("undefined"!==typeof MessageChannel){var A=new MessageChannel,N=A.port2;A.port1.onmessage=E,_=function(){N.postMessage(null)}}else _=function(){b(E,0)};function P(){k||(k=!0,_())}function z(e,n){S=b((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,P())},t.unstable_forceFrameRate=function(e){0>e||125o?(e.sortIndex=a,n(u,e),null===r(c)&&e===r(u)&&(g?(y(S),S=-1):g=!0,z(w,a-o))):(e.sortIndex=s,n(c,e),m||f||(m=!0,P())),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},5927:(e,t,n)=>{"use strict";var r=n(4997),i=n(970),a=n(1151),o="__core-js_shared__",s=e.exports=i[o]||a(o,{});(s.versions||(s.versions=[])).push({version:"3.41.0",mode:r?"pure":"global",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5959:(e,t,n)=>{"use strict";var r=n(5927);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},6672:(e,t,n)=>{"use strict";var r=n(5043);function i(e){var t="https://react.dev/errors/"+e;if(1{"use strict";var r=n(8853),i=n(5043),a=n(7950);function o(e){var t="https://react.dev/errors/"+e;if(1)":-1--i||l[r]!==c[i]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}}while(1<=r&&0<=i);break}}}finally{O=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?z(n):""}function j(e){switch(e.tag){case 26:case 27:case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 15:return e=R(e.type,!1);case 11:return e=R(e.type.render,!1);case 1:return e=R(e.type,!0);default:return""}}function L(e){try{var t="";do{t+=j(e),e=e.return}while(e);return t}catch(n){return"\nError generating stack: "+n.message+"\n"+n.stack}}function D(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function I(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function B(e){if(D(e)!==e)throw Error(o(188))}function F(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=F(e)))return t;e=e.sibling}return null}var H=Array.isArray,$=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},q=[],W=-1;function V(e){return{current:e}}function Y(e){0>W||(e.current=q[W],q[W]=null,W--)}function G(e,t){W++,q[W]=e.current,e.current=t}var X=V(null),Q=V(null),K=V(null),J=V(null);function Z(e,t){switch(G(K,t),G(Q,e),G(X,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Qu(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=Ku(e=Qu(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Y(X),G(X,t)}function ee(){Y(X),Y(Q),Y(K)}function te(e){null!==e.memoizedState&&G(J,e);var t=X.current,n=Ku(t,e.type);t!==n&&(G(Q,e),G(X,n))}function ne(e){Q.current===e&&(Y(X),Y(Q)),J.current===e&&(Y(J),Lh._currentValue=U)}var re=Object.prototype.hasOwnProperty,ie=r.unstable_scheduleCallback,ae=r.unstable_cancelCallback,oe=r.unstable_shouldYield,se=r.unstable_requestPaint,le=r.unstable_now,ce=r.unstable_getCurrentPriorityLevel,ue=r.unstable_ImmediatePriority,he=r.unstable_UserBlockingPriority,de=r.unstable_NormalPriority,pe=r.unstable_LowPriority,fe=r.unstable_IdlePriority,me=r.log,ge=r.unstable_setDisableYieldValue,be=null,ye=null;function ve(e){if("function"===typeof me&&ge(e),ye&&"function"===typeof ye.setStrictMode)try{ye.setStrictMode(be,e)}catch(t){}}var xe=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(we(e)/_e|0)|0},we=Math.log,_e=Math.LN2;var ke=128,Se=4194304;function Ce(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Me(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=e.warmLanes;e=0!==e.finishedLanes;var s=134217727&n;return 0!==s?0!==(n=s&~i)?r=Ce(n):0!==(a&=s)?r=Ce(a):e||0!==(o=s&~o)&&(r=Ce(o)):0!==(s=n&~i)?r=Ce(s):0!==a?r=Ce(a):e||0!==(o=n&~o)&&(r=Ce(o)),0===r?0:0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||32===i&&0!==(4194176&o))?t:r}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ee(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ae(){var e=ke;return 0===(4194176&(ke<<=1))&&(ke=128),e}function Ne(){var e=Se;return 0===(62914560&(Se<<=1))&&(Se=4194304),e}function Pe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ze(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-xe(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function Re(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xe(n),i=1<=_n),Cn=String.fromCharCode(32),Mn=!1;function Tn(e,t){switch(e){case"keyup":return-1!==xn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function En(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var An=!1;var Nn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Pn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Nn[e.type]:"textarea"===t}function zn(e,t,n,r){zt?Ot?Ot.push(r):Ot=[r]:zt=r,0<(t=Lu(t,"onChange")).length&&(n=new Jt("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var On=null,Rn=null;function jn(e){Eu(e,0)}function Ln(e){if(dt(Xe(e)))return e}function Dn(e,t){if("change"===e)return t}var In=!1;if(nt){var Bn;if(nt){var Fn="oninput"in document;if(!Fn){var Hn=document.createElement("div");Hn.setAttribute("oninput","return;"),Fn="function"===typeof Hn.oninput}Bn=Fn}else Bn=!1;In=Bn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Qn(r)}}function Jn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Jn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Zn(e){for(var t=pt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=pt((e=t.contentWindow).document)}return t}function er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function tr(e,t){var n=Zn(t);t=e.focusedElem;var r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Jn(t.ownerDocument.documentElement,t)){if(null!==r&&er(t))if(e=r.start,void 0===(n=r.end)&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if((n=(e=t.ownerDocument||document)&&e.defaultView||window).getSelection){n=n.getSelection();var i=t.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!n.extend&&a>r&&(i=r,r=a,a=i),i=Kn(t,a);var o=Kn(t,r);i&&o&&(1!==n.rangeCount||n.anchorNode!==i.node||n.anchorOffset!==i.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&((e=e.createRange()).setStart(i.node,i.offset),n.removeAllRanges(),a>r?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}for(e=[],n=t;n=n.parentNode;)1===n.nodeType&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for("function"===typeof t.focus&&t.focus(),t=0;t=document.documentMode,rr=null,ir=null,ar=null,or=!1;function sr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;or||null==rr||rr!==pt(r)||("selectionStart"in(r=rr)&&er(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ar&&Xn(ar,r)||(ar=r,0<(r=Lu(ir,"onSelect")).length&&(t=new Jt("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=rr)))}function lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var cr={animationend:lr("Animation","AnimationEnd"),animationiteration:lr("Animation","AnimationIteration"),animationstart:lr("Animation","AnimationStart"),transitionrun:lr("Transition","TransitionRun"),transitionstart:lr("Transition","TransitionStart"),transitioncancel:lr("Transition","TransitionCancel"),transitionend:lr("Transition","TransitionEnd")},ur={},hr={};function dr(e){if(ur[e])return ur[e];if(!cr[e])return e;var t,n=cr[e];for(t in n)if(n.hasOwnProperty(t)&&t in hr)return ur[e]=n[t];return e}nt&&(hr=document.createElement("div").style,"AnimationEvent"in window||(delete cr.animationend.animation,delete cr.animationiteration.animation,delete cr.animationstart.animation),"TransitionEvent"in window||delete cr.transitionend.transition);var pr=dr("animationend"),fr=dr("animationiteration"),mr=dr("animationstart"),gr=dr("transitionrun"),br=dr("transitionstart"),yr=dr("transitioncancel"),vr=dr("transitionend"),xr=new Map,wr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function _r(e,t){xr.set(e,t),et(t,[e])}var kr=[],Sr=0,Cr=0;function Mr(){for(var e=Sr,t=Cr=Sr=0;t>=o,i-=o,$r=1<<32-xe(t)+i|n<d?(p=h,h=null):p=h.sibling;var f=b(i,h,s[d],l);if(null===f){null===h&&(h=p);break}e&&h&&null===f.alternate&&t(i,h),o=a(f,o,d),null===u?c=f:u.sibling=f,u=f,h=p}if(d===s.length)return n(i,h),Qr&&qr(i,d),c;if(null===h){for(;dp?(f=d,d=null):f=d.sibling;var v=b(i,d,g.value,c);if(null===v){null===d&&(d=f);break}e&&d&&null===v.alternate&&t(i,d),s=a(v,s,p),null===h?u=v:h.sibling=v,h=v,d=f}if(g.done)return n(i,d),Qr&&qr(i,p),u;if(null===d){for(;!g.done;p++,g=l.next())null!==(g=m(i,g.value,c))&&(s=a(g,s,p),null===h?u=g:h.sibling=g,h=g);return Qr&&qr(i,p),u}for(d=r(d);!g.done;p++,g=l.next())null!==(g=y(d,i,p,g.value,c))&&(e&&null!==g.alternate&&d.delete(null===g.key?p:g.key),s=a(g,s,p),null===h?u=g:h.sibling=g,h=g);return e&&d.forEach((function(e){return t(i,e)})),Qr&&qr(i,p),u}(l,d,p=x.call(p),f)}if("function"===typeof p.then)return v(l,d,gi(p),f);if(p.$$typeof===g)return v(l,d,Ms(l,p),f);yi(l,p)}return"string"===typeof p&&""!==p||"number"===typeof p||"bigint"===typeof p?(p=""+p,null!==d&&6===d.tag?(n(l,d.sibling),(f=i(d,p)).return=l,l=f):(n(l,d),(f=$l(p,l.mode,f)).return=l,l=f),s(l)):n(l,d)}return function(e,t,n,r){try{mi=0;var i=v(e,t,n,r);return fi=null,i}catch(o){if(o===oi)throw o;var a=jl(29,o,null,e.mode);return a.lanes=r,a.return=e,a}}}var wi=xi(!0),_i=xi(!1),ki=V(null),Si=V(0);function Ci(e,t){G(Si,e=cc),G(ki,t),cc=e|t.baseLanes}function Mi(){G(Si,cc),G(ki,ki.current)}function Ti(){cc=Si.current,Y(ki),Y(Si)}var Ei=V(null),Ai=null;function Ni(e){var t=e.alternate;G(Ri,1&Ri.current),G(Ei,e),null===Ai&&(null===t||null!==ki.current||null!==t.memoizedState)&&(Ai=e)}function Pi(e){if(22===e.tag){if(G(Ri,Ri.current),G(Ei,e),null===Ai){var t=e.alternate;null!==t&&null!==t.memoizedState&&(Ai=e)}}else zi()}function zi(){G(Ri,Ri.current),G(Ei,Ei.current)}function Oi(e){Y(Ei),Ai===e&&(Ai=null),Y(Ri)}var Ri=V(0);function ji(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Li="undefined"!==typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach((function(e){return e()}))}},Di=r.unstable_scheduleCallback,Ii=r.unstable_NormalPriority,Bi={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fi(){return{controller:new Li,data:new Map,refCount:0}}function Hi(e){e.refCount--,0===e.refCount&&Di(Ii,(function(){e.controller.abort()}))}var $i=null,Ui=0,qi=0,Wi=null;function Vi(){if(0===--Ui&&null!==$i){null!==Wi&&(Wi.status="fulfilled");var e=$i;$i=null,qi=0,Wi=null;for(var t=0;ta?a:8;var o=N.T,s={};N.T=s,wo(e,!1,t,n);try{var l=i(),c=N.S;if(null!==c&&c(s,l),null!==l&&"object"===typeof l&&"function"===typeof l.then)xo(e,t,function(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then((function(){r.status="fulfilled",r.value=t;for(var e=0;e title"))),Vu(a,r,n),a[Ie]=e,Ke(a),r=a;break e;case"link":var s=Th("link","href",i).get(r+(n.href||""));if(s)for(var l=0;l<\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"===typeof r.is?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"===typeof r.is?i.createElement(n,{is:r.is}):i.createElement(n)}}e[Ie]=t,e[Be]=r;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)e.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(Vu(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ql(t)}}return Gl(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&ql(t);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));if(e=K.current,ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=Gr))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Ie]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||$u(e.nodeValue,n)))||ei(t)}else(e=Xu(e).createTextNode(r))[Ie]=t,t.stateNode=e}return Gl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=ri(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(o(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(o(317));i[Ie]=t}else ii(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Gl(t),i=!1}else null!==Kr&&(Rc(Kr),Kr=null),i=!0;if(!i)return 256&t.flags?(Oi(t),t):(Oi(t),null)}if(Oi(t),0!==(128&t.flags))return t.lanes=n,t;if(n=null!==r,e=null!==e&&null!==e.memoizedState,n){i=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool);var a=null;null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Vl(t,t.updateQueue),Gl(t),null;case 4:return ee(),null===e&&zu(t.stateNode.containerInfo),Gl(t),null;case 10:return vs(t.type),Gl(t),null;case 19:if(Y(Ri),null===(i=t.memoizedState))return Gl(t),null;if(r=0!==(128&t.flags),null===(a=i.rendering))if(r)Yl(i,!1);else{if(0!==uc||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=ji(e))){for(t.flags|=128,Yl(i,!1),e=a.updateQueue,t.updateQueue=e,Vl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Il(n,e),n=n.sibling;return G(Ri,1&Ri.current|2),t.child}e=e.sibling}null!==i.tail&&le()>xc&&(t.flags|=128,r=!0,Yl(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ji(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Vl(t,e),Yl(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!Qr)return Gl(t),null}else 2*le()-i.renderingStartTime>xc&&536870912!==n&&(t.flags|=128,r=!0,Yl(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=i.last)?e.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=le(),t.sibling=null,e=Ri.current,G(Ri,r?1&e|2:1&e),t):(Gl(t),null);case 22:case 23:return Oi(t),Ti(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!==(536870912&n)&&0===(128&t.flags)&&(Gl(t),6&t.subtreeFlags&&(t.flags|=8192)):Gl(t),null!==(n=t.updateQueue)&&Vl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&Y(Gi),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),vs(Bi),Gl(t),null;case 25:return null}throw Error(o(156,t.tag))}function Ql(e,t){switch(Yr(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return vs(Bi),ee(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return ne(t),null;case 13:if(Oi(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));ii()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Y(Ri),null;case 4:return ee(),null;case 10:return vs(t.type),null;case 22:case 23:return Oi(t),Ti(),null!==e&&Y(Gi),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return vs(Bi),null;default:return null}}function Kl(e,t){switch(Yr(t),t.tag){case 3:vs(Bi),ee();break;case 26:case 27:case 5:ne(t);break;case 4:ee();break;case 13:Oi(t);break;case 19:Y(Ri);break;case 10:vs(t.type);break;case 22:case 23:Oi(t),Ti(),null!==e&&Y(Gi);break;case 24:vs(Bi)}}var Jl={getCacheForType:function(e){var t=Cs(Bi),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},Zl="function"===typeof WeakMap?WeakMap:Map,ec=0,tc=null,nc=null,rc=0,ic=0,ac=null,oc=!1,sc=!1,lc=!1,cc=0,uc=0,hc=0,dc=0,pc=0,fc=0,mc=0,gc=null,bc=null,yc=!1,vc=0,xc=1/0,wc=null,_c=null,kc=!1,Sc=null,Cc=0,Mc=0,Tc=null,Ec=0,Ac=null;function Nc(){if(0!==(2&ec)&&0!==rc)return rc&-rc;if(null!==N.T){return 0!==qi?qi:wu()}return Le()}function Pc(){0===fc&&(fc=0===(536870912&rc)||Qr?Ae():536870912);var e=Ei.current;return null!==e&&(e.flags|=32),fc}function zc(e,t,n){(e===tc&&2===ic||null!==e.cancelPendingCommit)&&(Fc(e,0),Dc(e,rc,fc,!1)),ze(e,n),0!==(2&ec)&&e===tc||(e===tc&&(0===(2&ec)&&(dc|=n),4===uc&&Dc(e,rc,fc,!1)),mu(e))}function Oc(e,t,n){if(0!==(6&ec))throw Error(o(327));for(var r=!n&&0===(60&t)&&0===(t&e.expiredLanes)||Te(e,t),i=r?function(e,t){var n=ec;ec|=2;var r=$c(),i=Uc();tc!==e||rc!==t?(wc=null,xc=le()+500,Fc(e,t)):sc=Te(e,t);e:for(;;)try{if(0!==ic&&null!==nc){t=nc;var a=ac;t:switch(ic){case 1:ic=0,ac=null,Qc(e,t,a,1);break;case 2:if(ci(a)){ic=0,ac=null,Xc(t);break}t=function(){2===ic&&tc===e&&(ic=7),mu(e)},a.then(t,t);break e;case 3:ic=7;break e;case 4:ic=5;break e;case 7:ci(a)?(ic=0,ac=null,Xc(t)):(ic=0,ac=null,Qc(e,t,a,7));break;case 5:var s=null;switch(nc.tag){case 26:s=nc.memoizedState;case 5:case 27:var l=nc;if(!s||Ah(s)){ic=0,ac=null;var c=l.sibling;if(null!==c)nc=c;else{var u=l.return;null!==u?(nc=u,Kc(u)):nc=null}break t}}ic=0,ac=null,Qc(e,t,a,5);break;case 6:ic=0,ac=null,Qc(e,t,a,6);break;case 8:Bc(),uc=6;break e;default:throw Error(o(462))}}Yc();break}catch(h){Hc(e,h)}return bs=gs=null,N.H=r,N.A=i,ec=n,null!==nc?0:(tc=null,rc=0,Mr(),uc)}(e,t):Wc(e,t,!0),a=r;;){if(0===i){sc&&!r&&Dc(e,t,0,!1);break}if(6===i)Dc(e,t,0,!oc);else{if(n=e.current.alternate,a&&!Lc(n)){i=Wc(e,t,!1),a=!1;continue}if(2===i){if(a=t,e.errorRecoveryDisabledLanes&a)var s=0;else s=0!==(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var l=e;i=gc;var c=l.current.memoizedState.isDehydrated;if(c&&(Fc(l,s).flags|=256),2!==(s=Wc(l,s,!1))){if(lc&&!c){l.errorRecoveryDisabledLanes|=a,dc|=a,i=4;break e}a=bc,bc=i,null!==a&&Rc(a)}i=s}if(a=!1,2!==i)continue}}if(1===i){Fc(e,0),Dc(e,t,0,!0);break}e:{switch(r=e,i){case 0:case 1:throw Error(o(345));case 4:if((4194176&t)===t){Dc(r,t,fc,!oc);break e}break;case 2:bc=null;break;case 3:case 5:break;default:throw Error(o(329))}if(r.finishedWork=n,r.finishedLanes=t,(62914560&t)===t&&10<(a=vc+300-le())){if(Dc(r,t,fc,!oc),0!==Me(r,0))break e;r.timeoutHandle=eh(jc.bind(null,r,n,bc,wc,yc,t,fc,dc,mc,oc,2,-0,0),a)}else jc(r,n,bc,wc,yc,t,fc,dc,mc,oc,0,-0,0)}}break}mu(e)}function Rc(e){null===bc?bc=e:bc.push.apply(bc,e)}function jc(e,t,n,r,i,a,s,l,c,u,h,d,p){var f=t.subtreeFlags;if((8192&f||16785408===(16785408&f))&&(Nh={stylesheets:null,count:0,unsuspend:Ph},El(t),null!==(t=function(){if(null===Nh)throw Error(o(475));var e=Nh;return e.stylesheets&&0===e.count&&Rh(e,e.stylesheets),0n?32:n,N.T=null,null===Sc)var a=!1;else{n=Tc,Tc=null;var s=Sc,l=Cc;if(Sc=null,Cc=0,0!==(6&ec))throw Error(o(331));var c=ec;if(ec|=4,Pl(s.current),kl(s,s.current,l,n),ec=c,gu(0,!1),ye&&"function"===typeof ye.onPostCommitFiberRoot)try{ye.onPostCommitFiberRoot(be,s)}catch(u){}a=!0}return a}finally{$.p=i,N.T=r,eu(e,t)}}return!1}function nu(e,t,n){t=Rr(n,t),null!==(e=zs(e,t=Fo(e.stateNode,t,2),2))&&(ze(e,2),mu(e))}function ru(e,t,n){if(3===e.tag)nu(e,e,n);else for(;null!==t;){if(3===t.tag){nu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===_c||!_c.has(r))){e=Rr(n,e),null!==(r=zs(t,n=Ho(2),2))&&($o(n,r,t,e),ze(r,2),mu(r));break}}t=t.return}}function iu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Zl;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(lc=!0,i.add(n),e=au.bind(null,e,t,n),t.then(e,e))}function au(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,tc===e&&(rc&n)===n&&(4===uc||3===uc&&(62914560&rc)===rc&&300>le()-vc?0===(2&ec)&&Fc(e,0):pc|=n,mc===rc&&(mc=0)),mu(e)}function ou(e,t){0===t&&(t=Ne()),null!==(e=Ar(e,t))&&(ze(e,t),mu(e))}function su(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),ou(e,n)}function lu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}null!==r&&r.delete(t),ou(e,n)}var cu=null,uu=null,hu=!1,du=!1,pu=!1,fu=0;function mu(e){var t;e!==uu&&null===e.next&&(null===uu?cu=uu=e:uu=uu.next=e),du=!0,hu||(hu=!0,t=bu,rh((function(){0!==(6&ec)?ie(ue,t):t()})))}function gu(e,t){if(!pu&&du){pu=!0;do{for(var n=!1,r=cu;null!==r;){if(!t)if(0!==e){var i=r.pendingLanes;if(0===i)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-xe(42|e)+1)-1,a=201326677&(a&=i&~(o&~s))?201326677&a|1:a?2|a:0}0!==a&&(n=!0,xu(r,a))}else a=rc,0===(3&(a=Me(r,r===tc?a:0)))||Te(r,a)||(n=!0,xu(r,a));r=r.next}}while(n);pu=!1}}function bu(){du=hu=!1;var e=0;0!==fu&&(function(){var e=window.event;if(e&&"popstate"===e.type)return e!==Zu&&(Zu=e,!0);return Zu=null,!1}()&&(e=fu),fu=0);for(var t=le(),n=null,r=cu;null!==r;){var i=r.next,a=yu(r,t);0===a?(r.next=null,null===n?cu=i:n.next=i,null===i&&(uu=n)):(n=r,(0!==e||0!==(3&a))&&(du=!0)),r=i}gu(e,!1)}function yu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=-62914561&e.pendingLanes;0 title"):null)}function Ah(e){return"stylesheet"!==e.type||0!==(3&e.state.loading)}var Nh=null;function Ph(){}function zh(){if(this.count--,0===this.count)if(this.stylesheets)Rh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Oh=null;function Rh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Oh=new Map,t.forEach(jh,e),Oh=null,zh.call(e))}function jh(e,t){if(!(4&t.state.loading)){var n=Oh.get(e);if(n)var r=n.get(null);else{n=new Map,Oh.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a{"use strict";var r=n(9386);e.exports=r({}.isPrototypeOf)},7128:(e,t,n)=>{"use strict";var r=n(3054),i=n(7609);e.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},7143:(e,t,n)=>{"use strict";var r=n(2611),i=n(9023);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},7179:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7341:(e,t,n)=>{"use strict";var r=n(8593);t.f=r},7483:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports="undefined"==typeof t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},7609:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},7806:(e,t,n)=>{"use strict";var r=n(102);e.exports=r;var i=u(!0),a=u(!1),o=u(null),s=u(void 0),l=u(0),c=u("");function u(e){var t=new r(r._D);return t._y=1,t._z=e,t}r.resolve=function(e){if(e instanceof r)return e;if(null===e)return o;if(void 0===e)return s;if(!0===e)return i;if(!1===e)return a;if(0===e)return l;if(""===e)return c;if("object"===typeof e||"function"===typeof e)try{var t=e.then;if("function"===typeof t)return new r(t.bind(e))}catch(n){return new r((function(e,t){t(n)}))}return u(e)};var h=function(e){return"function"===typeof Array.from?(h=Array.from,Array.from(e)):(h=function(e){return Array.prototype.slice.call(e)},Array.prototype.slice.call(e))};function d(e){return{status:"fulfilled",value:e}}function p(e){return{status:"rejected",reason:e}}function f(e){if(e&&("object"===typeof e||"function"===typeof e)){if(e instanceof r&&e.then===r.prototype.then)return e.then(d,p);var t=e.then;if("function"===typeof t)return new r(t.bind(e)).then(d,p)}return d(e)}function m(e){if("function"===typeof AggregateError)return new AggregateError(e,"All promises were rejected");var t=new Error("All promises were rejected");return t.name="AggregateError",t.errors=e,t}r.all=function(e){var t=h(e);return new r((function(e,n){if(0===t.length)return e([]);var i=t.length;function a(o,s){if(s&&("object"===typeof s||"function"===typeof s)){if(s instanceof r&&s.then===r.prototype.then){for(;3===s._y;)s=s._z;return 1===s._y?a(o,s._z):(2===s._y&&n(s._z),void s.then((function(e){a(o,e)}),n))}var l=s.then;if("function"===typeof l)return void new r(l.bind(s)).then((function(e){a(o,e)}),n)}t[o]=s,0===--i&&e(t)}for(var o=0;o{"use strict";var r=n(3054),i=n(7609),a=n(329);e.exports=!r&&!i((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},7950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(6672)},8107:(e,t,n)=>{"use strict";var r=n(9386),i=n(5323),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},8339:(e,t,n)=>{"use strict";n(4361)("observable")},8394:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},8593:(e,t,n)=>{"use strict";var r=n(970),i=n(5959),a=n(8107),o=n(4138),s=n(9581),l=n(990),c=r.Symbol,u=i("wks"),h=l?c.for||c:c&&c.withoutSetter||o;e.exports=function(e){return a(u,e)||(u[e]=s&&a(c,e)?c[e]:h("Symbol."+e)),u[e]}},8703:(e,t,n)=>{"use strict";var r=n(2009),i=n(208);e.exports=function(e){return r(i(e))}},8853:(e,t,n)=>{"use strict";e.exports=n(5896)},8898:(e,t,n)=>{"use strict";var r=n(7609);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},9023:(e,t,n)=>{"use strict";var r=n(769),i=n(7483),a=n(7071),o=n(990),s=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&a(t.prototype,s(e))}},9167:e=>{"use strict";e.exports=function(e){return null===e||void 0===e}},9386:(e,t,n)=>{"use strict";var r=n(8898),i=Function.prototype,a=i.call,o=r&&i.bind.bind(a,a);e.exports=r?o:function(e){return function(){return a.apply(e,arguments)}}},9581:(e,t,n)=>{"use strict";var r=n(781),i=n(7609),a=n(970).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},9705:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(n){return"Object"}}},9814:(e,t,n)=>{"use strict";function r(e){a.length||(i(),!0),a[a.length]=e}e.exports=r;var i,a=[],o=0;function s(){for(;o1024){for(var t=0,n=a.length-o;t{"use strict";var r=n(4376),i=n(9167);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>ot,hasStandardBrowserEnv:()=>lt,hasStandardBrowserWebWorkerEnv:()=>ct,navigator:()=>st,origin:()=>ut});n(4027);var t,r=n(5043),i=n(4391);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}const f=(0,r.createContext)(null);const m=(0,r.createContext)(null);const g=(0,r.createContext)({outlet:null,matches:[]});function b(e,t){if(!e)throw new Error(t)}function y(e,t,n){void 0===n&&(n="/");let r=P(("string"===typeof t?p(t):t).pathname||"/",n);if(null==r)return null;let i=v(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let o=0;null==a&&o{let a={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(a.relativePath.startsWith(r)||b(!1),a.relativePath=a.relativePath.slice(r.length));let o=z([r,a.relativePath]),s=n.concat(a);e.children&&e.children.length>0&&(!0===e.index&&b(!1),v(e.children,t,s,o)),(null!=e.path||e.index)&&t.push({path:o,score:T(o,e.index),routesMeta:s})})),t}const x=/^:\w+$/,w=3,_=2,k=1,S=10,C=-2,M=e=>"*"===e;function T(e,t){let n=e.split("/"),r=n.length;return n.some(M)&&(r+=C),t&&(r+=_),n.filter((e=>!M(e))).reduce(((e,t)=>e+(x.test(t)?w:""===t?k:S)),r)}function E(e,t){let{routesMeta:n}=e,r={},i="/",a=[];for(let o=0;o(r.push(t),"([^\\/]+)")));e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):i+=n?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)";let a=new RegExp(i,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1),l=r.reduce(((e,t,n)=>{if("*"===t){let e=s[n]||"";o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e){try{return decodeURIComponent(e)}catch(t){return e}}(s[n]||""),e}),{});return{params:l,pathname:a,pathnameBase:o,pattern:e}}function N(e,t,n){let r,i="string"===typeof e?p(e):e,a=""===e||""===i.pathname?"/":i.pathname;if(null==a)r=n;else{let e=t.length-1;if(a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}r=e>=0?t[e]:"/"}let o=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?p(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:R(r),hash:j(i)}}(i,r);return a&&"/"!==a&&a.endsWith("/")&&!o.pathname.endsWith("/")&&(o.pathname+="/"),o}function P(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}const z=e=>e.join("/").replace(/\/\/+/g,"/"),O=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",j=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function L(e){D()||b(!1);let{basename:t,navigator:n}=(0,r.useContext)(f),{hash:i,pathname:a,search:o}=F(e),s=a;if("/"!==t){let n=function(e){return""===e||""===e.pathname?"/":"string"===typeof e?p(e).pathname:e.pathname}(e),r=null!=n&&n.endsWith("/");s="/"===a?t+(r?"/":""):z([t,a])}return n.createHref({pathname:s,search:o,hash:i})}function D(){return null!=(0,r.useContext)(m)}function I(){return D()||b(!1),(0,r.useContext)(m).location}function B(){D()||b(!1);let{basename:e,navigator:t}=(0,r.useContext)(f),{matches:n}=(0,r.useContext)(g),{pathname:i}=I(),a=JSON.stringify(n.map((e=>e.pathnameBase))),o=(0,r.useRef)(!1);(0,r.useEffect)((()=>{o.current=!0}));let s=(0,r.useCallback)((function(n,r){if(void 0===r&&(r={}),!o.current)return;if("number"===typeof n)return void t.go(n);let s=N(n,JSON.parse(a),i);"/"!==e&&(s.pathname=z([e,s.pathname])),(r.replace?t.replace:t.push)(s,r.state)}),[e,t,a,i]);return s}function F(e){let{matches:t}=(0,r.useContext)(g),{pathname:n}=I(),i=JSON.stringify(t.map((e=>e.pathnameBase)));return(0,r.useMemo)((()=>N(e,JSON.parse(i),n)),[e,i,n])}function H(e,t){return void 0===t&&(t=[]),null==e?null:e.reduceRight(((n,i,a)=>(0,r.createElement)(g.Provider,{children:void 0!==i.route.element?i.route.element:n,value:{outlet:n,matches:t.concat(e.slice(0,a+1))}})),null)}function $(e){let{to:t,replace:n,state:i}=e;D()||b(!1);let a=B();return(0,r.useEffect)((()=>{a(t,{replace:n,state:i})})),null}function U(e){b(!1)}function q(e){let{basename:n="/",children:i=null,location:a,navigationType:o=t.Pop,navigator:s,static:l=!1}=e;D()&&b(!1);let c=O(n),u=(0,r.useMemo)((()=>({basename:c,navigator:s,static:l})),[c,s,l]);"string"===typeof a&&(a=p(a));let{pathname:h="/",search:d="",hash:g="",state:y=null,key:v="default"}=a,x=(0,r.useMemo)((()=>{let e=P(h,c);return null==e?null:{pathname:e,search:d,hash:g,state:y,key:v}}),[c,h,d,g,y,v]);return null==x?null:(0,r.createElement)(f.Provider,{value:u},(0,r.createElement)(m.Provider,{children:i,value:{location:x,navigationType:o}}))}function W(e){let{children:t,location:n}=e;return function(e,t){D()||b(!1);let{matches:n}=(0,r.useContext)(g),i=n[n.length-1],a=i?i.params:{},o=(i&&i.pathname,i?i.pathnameBase:"/");i&&i.route;let s,l=I();if(t){var c;let e="string"===typeof t?p(t):t;"/"===o||(null==(c=e.pathname)?void 0:c.startsWith(o))||b(!1),s=e}else s=l;let u=s.pathname||"/",h=y(e,{pathname:"/"===o?u:u.slice(o.length)||"/"});return H(h&&h.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:z([o,e.pathname]),pathnameBase:"/"===e.pathnameBase?o:z([o,e.pathnameBase])}))),n)}(V(t),n)}function V(e){let t=[];return r.Children.forEach(e,(e=>{if(!(0,r.isValidElement)(e))return;if(e.type===r.Fragment)return void t.push.apply(t,V(e.props.children));e.type!==U&&b(!1);let n={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(n.children=V(e.props.children)),t.push(n)})),t}function Y(){return Y=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}const X=["onClick","reloadDocument","replace","state","target","to"],Q=["aria-current","caseSensitive","className","end","style","to","children"];function K(e){let{basename:n,children:i,window:f}=e,m=(0,r.useRef)();null==m.current&&(m.current=function(e){void 0===e&&(e={});var n=e.window,r=void 0===n?document.defaultView:n,i=r.history;function f(){var e=r.location,t=e.pathname,n=e.search,a=e.hash,s=i.state||{};return[s.idx,o({pathname:t,search:n,hash:a,state:s.usr||null,key:s.key||"default"})]}var m=null;r.addEventListener(l,(function(){if(m)w.call(m),m=null;else{var e=t.Pop,n=f(),r=n[0],i=n[1];if(w.length){if(null!=r){var a=y-r;a&&(m={action:e,location:i,retry:function(){T(-1*a)}},T(a))}}else M(e)}}));var g=t.Pop,b=f(),y=b[0],v=b[1],x=u(),w=u();function _(e){return"string"===typeof e?e:d(e)}function k(e,t){return void 0===t&&(t=null),o(a({pathname:v.pathname,hash:"",search:""},"string"===typeof e?p(e):e,{state:t,key:h()}))}function S(e,t){return[{usr:e.state,key:e.key,idx:t},_(e)]}function C(e,t,n){return!w.length||(w.call({action:e,location:t,retry:n}),!1)}function M(e){g=e;var t=f();y=t[0],v=t[1],x.call({action:g,location:v})}function T(e){i.go(e)}null==y&&(y=0,i.replaceState(a({},i.state,{idx:y}),""));var E={get action(){return g},get location(){return v},createHref:_,push:function e(n,a){var o=t.Push,s=k(n,a);if(C(o,s,(function(){e(n,a)}))){var l=S(s,y+1),c=l[0],u=l[1];try{i.pushState(c,"",u)}catch(h){r.location.assign(u)}M(o)}},replace:function e(n,r){var a=t.Replace,o=k(n,r);if(C(a,o,(function(){e(n,r)}))){var s=S(o,y),l=s[0],c=s[1];i.replaceState(l,"",c),M(a)}},go:T,back:function(){T(-1)},forward:function(){T(1)},listen:function(e){return x.push(e)},block:function(e){var t=w.push(e);return 1===w.length&&r.addEventListener(s,c),function(){t(),w.length||r.removeEventListener(s,c)}}};return E}({window:f}));let g=m.current,[b,y]=(0,r.useState)({action:g.action,location:g.location});return(0,r.useLayoutEffect)((()=>g.listen(y)),[g]),(0,r.createElement)(q,{basename:n,children:i,location:b.location,navigationType:b.action,navigator:g})}const J=(0,r.forwardRef)((function(e,t){let{onClick:n,reloadDocument:i,replace:a=!1,state:o,target:s,to:l}=e,c=G(e,X),u=L(l),h=function(e,t){let{target:n,replace:i,state:a}=void 0===t?{}:t,o=B(),s=I(),l=F(e);return(0,r.useCallback)((t=>{if(0===t.button&&(!n||"_self"===n)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t)){t.preventDefault();let n=!!i||d(s)===d(l);o(e,{replace:n,state:a})}}),[s,o,l,i,a,n,e])}(l,{replace:a,state:o,target:s});return(0,r.createElement)("a",Y({},c,{href:u,onClick:function(e){n&&n(e),e.defaultPrevented||i||h(e)},ref:t,target:s}))}));const Z=(0,r.forwardRef)((function(e,t){let{"aria-current":n="page",caseSensitive:i=!1,className:a="",end:o=!1,style:s,to:l,children:c}=e,u=G(e,Q),h=I(),d=F(l),p=h.pathname,f=d.pathname;i||(p=p.toLowerCase(),f=f.toLowerCase());let m,g=p===f||!o&&p.startsWith(f)&&"/"===p.charAt(f.length),b=g?n:void 0;m="function"===typeof a?a({isActive:g}):[a,g?"active":null].filter(Boolean).join(" ");let y="function"===typeof s?s({isActive:g}):s;return(0,r.createElement)(J,Y({},u,{"aria-current":b,className:m,ref:t,style:y,to:l}),"function"===typeof c?c({isActive:g}):c)}));function ee(e){let t=(0,r.useRef)(te(e)),n=I(),i=(0,r.useMemo)((()=>{let e=te(n.search);for(let n of t.current.keys())e.has(n)||t.current.getAll(n).forEach((t=>{e.append(n,t)}));return e}),[n.search]),a=B();return[i,(0,r.useCallback)(((e,t)=>{a("?"+te(e),t)}),[a])]}function te(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}function ne(e,t){return function(){return e.apply(t,arguments)}}const{toString:re}=Object.prototype,{getPrototypeOf:ie}=Object,{iterator:ae,toStringTag:oe}=Symbol,se=(le=Object.create(null),e=>{const t=re.call(e);return le[t]||(le[t]=t.slice(8,-1).toLowerCase())});var le;const ce=e=>(e=e.toLowerCase(),t=>se(t)===e),ue=e=>t=>typeof t===e,{isArray:he}=Array,de=ue("undefined");const pe=ce("ArrayBuffer");const fe=ue("string"),me=ue("function"),ge=ue("number"),be=e=>null!==e&&"object"===typeof e,ye=e=>{if("object"!==se(e))return!1;const t=ie(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(oe in e)&&!(ae in e)},ve=ce("Date"),xe=ce("File"),we=ce("Blob"),_e=ce("FileList"),ke=ce("URLSearchParams"),[Se,Ce,Me,Te]=["ReadableStream","Request","Response","Headers"].map(ce);function Ee(e,t){let n,r,{allOwnKeys:i=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),he(e))for(n=0,r=e.length;n0;)if(r=n[i],t===r.toLowerCase())return r;return null}const Ne="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,Pe=e=>!de(e)&&e!==Ne;const ze=(Oe="undefined"!==typeof Uint8Array&&ie(Uint8Array),e=>Oe&&e instanceof Oe);var Oe;const Re=ce("HTMLFormElement"),je=(e=>{let{hasOwnProperty:t}=e;return(e,n)=>t.call(e,n)})(Object.prototype),Le=ce("RegExp"),De=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ee(n,((n,i)=>{let a;!1!==(a=t(n,i,e))&&(r[i]=a||n)})),Object.defineProperties(e,r)};const Ie=ce("AsyncFunction"),Be=((e,t)=>{return e?setImmediate:t?(n=`axios@${Math.random()}`,r=[],Ne.addEventListener("message",(e=>{let{source:t,data:i}=e;t===Ne&&i===n&&r.length&&r.shift()()}),!1),e=>{r.push(e),Ne.postMessage(n,"*")}):e=>setTimeout(e);var n,r})("function"===typeof setImmediate,me(Ne.postMessage)),Fe="undefined"!==typeof queueMicrotask?queueMicrotask.bind(Ne):"undefined"!==typeof process&&process.nextTick||Be,He={isArray:he,isArrayBuffer:pe,isBuffer:function(e){return null!==e&&!de(e)&&null!==e.constructor&&!de(e.constructor)&&me(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||me(e.append)&&("formdata"===(t=se(e))||"object"===t&&me(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&pe(e.buffer),t},isString:fe,isNumber:ge,isBoolean:e=>!0===e||!1===e,isObject:be,isPlainObject:ye,isReadableStream:Se,isRequest:Ce,isResponse:Me,isHeaders:Te,isUndefined:de,isDate:ve,isFile:xe,isBlob:we,isRegExp:Le,isFunction:me,isStream:e=>be(e)&&me(e.pipe),isURLSearchParams:ke,isTypedArray:ze,isFileList:_e,forEach:Ee,merge:function e(){const{caseless:t}=Pe(this)&&this||{},n={},r=(r,i)=>{const a=t&&Ae(n,i)||i;ye(n[a])&&ye(r)?n[a]=e(n[a],r):ye(r)?n[a]=e({},r):he(r)?n[a]=r.slice():n[a]=r};for(let i=0,a=arguments.length;i3&&void 0!==arguments[3]?arguments[3]:{};return Ee(t,((t,r)=>{n&&me(t)?e[r]=ne(t,n):e[r]=t}),{allOwnKeys:r}),e},trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],r&&!r(o,e,t)||s[o]||(t[o]=e[o],s[o]=!0);e=!1!==n&&ie(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:se,kindOfTest:ce,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(he(e))return e;let t=e.length;if(!ge(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[ae]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Re,hasOwnProperty:je,hasOwnProp:je,reduceDescriptors:De,freezeMethods:e=>{De(e,((t,n)=>{if(me(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];me(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return he(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Ae,global:Ne,isContextDefined:Pe,isSpecCompliantForm:function(e){return!!(e&&me(e.append)&&"FormData"===e[oe]&&e[ae])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(be(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=he(e)?[]:{};return Ee(e,((e,t)=>{const a=n(e,r+1);!de(a)&&(i[t]=a)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:Ie,isThenable:e=>e&&(be(e)||me(e))&&me(e.then)&&me(e.catch),setImmediate:Be,asap:Fe,isIterable:e=>null!=e&&me(e[ae])};function $e(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}He.inherits($e,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:He.toJSONObject(this.config),code:this.code,status:this.status}}});const Ue=$e.prototype,qe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{qe[e]={value:e}})),Object.defineProperties($e,qe),Object.defineProperty(Ue,"isAxiosError",{value:!0}),$e.from=(e,t,n,r,i,a)=>{const o=Object.create(Ue);return He.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),$e.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const We=$e;function Ve(e){return He.isPlainObject(e)||He.isArray(e)}function Ye(e){return He.endsWith(e,"[]")?e.slice(0,-2):e}function Ge(e,t,n){return e?e.concat(t).map((function(e,t){return e=Ye(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Xe=He.toFlatObject(He,{},null,(function(e){return/^is[A-Z]/.test(e)}));const Qe=function(e,t,n){if(!He.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=He.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!He.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,a=n.dots,o=n.indexes,s=(n.Blob||"undefined"!==typeof Blob&&Blob)&&He.isSpecCompliantForm(t);if(!He.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(He.isDate(e))return e.toISOString();if(He.isBoolean(e))return e.toString();if(!s&&He.isBlob(e))throw new We("Blob is not supported. Use a Buffer instead.");return He.isArrayBuffer(e)||He.isTypedArray(e)?s&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let s=e;if(e&&!i&&"object"===typeof e)if(He.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(He.isArray(e)&&function(e){return He.isArray(e)&&!e.some(Ve)}(e)||(He.isFileList(e)||He.endsWith(n,"[]"))&&(s=He.toArray(e)))return n=Ye(n),s.forEach((function(e,r){!He.isUndefined(e)&&null!==e&&t.append(!0===o?Ge([n],r,a):null===o?n:n+"[]",l(e))})),!1;return!!Ve(e)||(t.append(Ge(i,n,a),l(e)),!1)}const u=[],h=Object.assign(Xe,{defaultVisitor:c,convertValue:l,isVisitable:Ve});if(!He.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!He.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),He.forEach(n,(function(n,a){!0===(!(He.isUndefined(n)||null===n)&&i.call(t,n,He.isString(a)?a.trim():a,r,h))&&e(n,r?r.concat(a):[a])})),u.pop()}}(e),t};function Ke(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Je(e,t){this._pairs=[],e&&Qe(e,this,t)}const Ze=Je.prototype;Ze.append=function(e,t){this._pairs.push([e,t])},Ze.toString=function(e){const t=e?function(t){return e.call(this,t,Ke)}:Ke;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const et=Je;function tt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nt(e,t,n){if(!t)return e;const r=n&&n.encode||tt;He.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let a;if(a=i?i(t,n):He.isURLSearchParams(t)?t.toString():new et(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const rt=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){He.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},it={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},at={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:et,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ot="undefined"!==typeof window&&"undefined"!==typeof document,st="object"===typeof navigator&&navigator||void 0,lt=ot&&(!st||["ReactNative","NativeScript","NS"].indexOf(st.product)<0),ct="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,ut=ot&&window.location.href||"http://localhost",ht={...e,...at};const dt=function(e){function t(e,n,r,i){let a=e[i++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),s=i>=e.length;if(a=!a&&He.isArray(r)?r.length:a,s)return He.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o;r[a]&&He.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],i)&&He.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r{t(function(e){return He.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const pt={transitional:it,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=He.isObject(e);i&&He.isHTMLForm(e)&&(e=new FormData(e));if(He.isFormData(e))return r?JSON.stringify(dt(e)):e;if(He.isArrayBuffer(e)||He.isBuffer(e)||He.isStream(e)||He.isFile(e)||He.isBlob(e)||He.isReadableStream(e))return e;if(He.isArrayBufferView(e))return e.buffer;if(He.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Qe(e,new ht.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ht.isNode&&He.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=He.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Qe(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(He.isString(e))try{return(t||JSON.parse)(e),He.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||pt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(He.isResponse(e)||He.isReadableStream(e))return e;if(e&&He.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(i){if(n){if("SyntaxError"===i.name)throw We.from(i,We.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};He.forEach(["delete","get","head","post","put","patch"],(e=>{pt.headers[e]={}}));const ft=pt,mt=He.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gt=Symbol("internals");function bt(e){return e&&String(e).trim().toLowerCase()}function yt(e){return!1===e||null==e?e:He.isArray(e)?e.map(yt):String(e)}function vt(e,t,n,r,i){return He.isFunction(r)?r.call(this,t,n):(i&&(t=n),He.isString(t)?He.isString(r)?-1!==t.indexOf(r):He.isRegExp(r)?r.test(t):void 0:void 0)}class xt{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=bt(t);if(!i)throw new Error("header name must be a non-empty string");const a=He.findKey(r,i);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=yt(e))}const a=(e,t)=>He.forEach(e,((e,n)=>i(e,n,t)));if(He.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(He.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&mt[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(He.isObject(e)&&He.isIterable(e)){let n,r,i={};for(const t of e){if(!He.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[r=t[0]]=(n=i[r])?He.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(i,t)}else null!=e&&i(t,e,n);return this}get(e,t){if(e=bt(e)){const n=He.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(He.isFunction(t))return t.call(this,e,n);if(He.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=bt(e)){const n=He.findKey(this,e);return!(!n||void 0===this[n]||t&&!vt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=bt(e)){const i=He.findKey(n,e);!i||t&&!vt(0,n[i],i,t)||(delete n[i],r=!0)}}return He.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!vt(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return He.forEach(this,((r,i)=>{const a=He.findKey(n,i);if(a)return t[a]=yt(r),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();o!==i&&delete t[i],t[o]=yt(r),n[o]=!0})),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n{null!=n&&!1!==n&&(t[r]=e&&He.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((e=>{let[t,n]=e;return t+": "+n})).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;it.set(e))),t}static accessor(e){const t=(this[gt]=this[gt]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=bt(e);t[r]||(!function(e,t){const n=He.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return He.isArray(e)?e.forEach(r):r(e),this}}xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),He.reduceDescriptors(xt.prototype,((e,t)=>{let{value:n}=e,r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[r]=e}}})),He.freezeMethods(xt);const wt=xt;function _t(e,t){const n=this||ft,r=t||n,i=wt.from(r.headers);let a=r.data;return He.forEach(e,(function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)})),i.normalize(),a}function kt(e){return!(!e||!e.__CANCEL__)}function St(e,t,n){We.call(this,null==e?"canceled":e,We.ERR_CANCELED,t,n),this.name="CanceledError"}He.inherits(St,We,{__CANCEL__:!0});const Ct=St;function Mt(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new We("Request failed with status code "+n.status,[We.ERR_BAD_REQUEST,We.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Tt=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,a=0,o=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[o];i||(i=l),n[a]=s,r[a]=l;let u=o,h=0;for(;u!==a;)h+=n[u++],u%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),l-i1&&void 0!==arguments[1]?arguments[1]:Date.now();i=a,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[function(){const e=Date.now(),t=e-i;for(var s=arguments.length,l=new Array(s),c=0;c=a?o(l,e):(n=l,r||(r=setTimeout((()=>{r=null,o(n)}),a-t)))},()=>n&&o(n)]},At=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0;const i=Tt(50,250);return Et((n=>{const a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,l=i(s);r=a;e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&a<=o?(o-a)/l:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},Nt=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pt=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;re(...n)))},zt=ht.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ht.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ht.origin),ht.navigator&&/(msie|trident)/i.test(ht.navigator.userAgent)):()=>!0,Ot=ht.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const o=[e+"="+encodeURIComponent(t)];He.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),He.isString(r)&&o.push("path="+r),He.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Rt(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const jt=e=>e instanceof wt?{...e}:e;function Lt(e,t){t=t||{};const n={};function r(e,t,n,r){return He.isPlainObject(e)&&He.isPlainObject(t)?He.merge.call({caseless:r},e,t):He.isPlainObject(t)?He.merge({},t):He.isArray(t)?t.slice():t}function i(e,t,n,i){return He.isUndefined(t)?He.isUndefined(e)?void 0:r(void 0,e,0,i):r(e,t,0,i)}function a(e,t){if(!He.isUndefined(t))return r(void 0,t)}function o(e,t){return He.isUndefined(t)?He.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,a){return a in t?r(n,i):a in e?r(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(jt(e),jt(t),0,!0)};return He.forEach(Object.keys(Object.assign({},e,t)),(function(r){const a=l[r]||i,o=a(e[r],t[r],r);He.isUndefined(o)&&a!==s||(n[r]=o)})),n}const Dt=e=>{const t=Lt({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:a,xsrfCookieName:o,headers:s,auth:l}=t;if(t.headers=s=wt.from(s),t.url=nt(Rt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),He.isFormData(r))if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(ht.hasStandardBrowserEnv&&(i&&He.isFunction(i)&&(i=i(t)),i||!1!==i&&zt(t.url))){const e=a&&o&&Ot.read(o);e&&s.set(a,e)}return t},It="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Dt(e);let i=r.data;const a=wt.from(r.headers).normalize();let o,s,l,c,u,{responseType:h,onUploadProgress:d,onDownloadProgress:p}=r;function f(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=wt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Mt((function(e){t(e),f()}),(function(e){n(e),f()}),{data:h&&"text"!==h&&"json"!==h?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new We("Request aborted",We.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new We("Network Error",We.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||it;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new We(t,i.clarifyTimeoutError?We.ETIMEDOUT:We.ECONNABORTED,e,m)),m=null},void 0===i&&a.setContentType(null),"setRequestHeader"in m&&He.forEach(a.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),He.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),h&&"json"!==h&&(m.responseType=r.responseType),p&&([l,u]=At(p,!0),m.addEventListener("progress",l)),d&&m.upload&&([s,c]=At(d),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(o=t=>{m&&(n(!t||t.type?new Ct(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===ht.protocols.indexOf(b)?n(new We("Unsupported protocol "+b+":",We.ERR_BAD_REQUEST,e)):m.send(i||null)}))},Bt=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof We?t:new Ct(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{a=null,i(new We(`timeout ${t} of ms exceeded`,We.ETIMEDOUT))}),t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:s}=r;return s.unsubscribe=()=>He.asap(o),s}},Ft=function*(e,t){let n=e.byteLength;if(!t||n{const i=async function*(e,t){for await(const n of Ht(e))yield*Ft(n,t)}(e,t);let a,o=0,s=e=>{a||(a=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return s(),void e.close();let a=r.byteLength;if(n){let e=o+=a;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),i.return())},{highWaterMark:2})},Ut="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,qt=Ut&&"function"===typeof ReadableStream,Wt=Ut&&("function"===typeof TextEncoder?(Vt=new TextEncoder,e=>Vt.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Vt;const Yt=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{let e=!1;const t=new Request(ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Xt=qt&&Yt((()=>He.isReadableStream(new Response("").body))),Qt={stream:Xt&&(e=>e.body)};var Kt;Ut&&(Kt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Qt[e]&&(Qt[e]=He.isFunction(Kt[e])?t=>t[e]():(t,n)=>{throw new We(`Response type '${e}' is not supported`,We.ERR_NOT_SUPPORT,n)})})));const Jt=async(e,t)=>{const n=He.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(He.isBlob(e))return e.size;if(He.isSpecCompliantForm(e)){const t=new Request(ht.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return He.isArrayBufferView(e)||He.isArrayBuffer(e)?e.byteLength:(He.isURLSearchParams(e)&&(e+=""),He.isString(e)?(await Wt(e)).byteLength:void 0)})(t):n},Zt=Ut&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:o,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:h="same-origin",fetchOptions:d}=Dt(e);c=c?(c+"").toLowerCase():"text";let p,f=Bt([i,a&&a.toAbortSignal()],o);const m=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let g;try{if(l&&Gt&&"get"!==n&&"head"!==n&&0!==(g=await Jt(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(He.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Nt(g,At(Pt(l)));r=$t(n.body,65536,e,t)}}He.isString(h)||(h=h?"include":"omit");const i="credentials"in Request.prototype;p=new Request(t,{...d,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:i?h:void 0});let a=await fetch(p,d);const o=Xt&&("stream"===c||"response"===c);if(Xt&&(s||o&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=a[t]}));const t=He.toFiniteNumber(a.headers.get("content-length")),[n,r]=s&&Nt(t,At(Pt(s),!0))||[];a=new Response($t(a.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let b=await Qt[He.findKey(Qt,c)||"text"](a,e);return!o&&m&&m(),await new Promise(((t,n)=>{Mt(t,n,{data:b,headers:wt.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:p})}))}catch(b){if(m&&m(),b&&"TypeError"===b.name&&/Load failed|fetch/i.test(b.message))throw Object.assign(new We("Network Error",We.ERR_NETWORK,e,p),{cause:b.cause||b});throw We.from(b,b&&b.code,e,p)}}),en={http:null,xhr:It,fetch:Zt};He.forEach(en,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const tn=e=>`- ${e}`,nn=e=>He.isFunction(e)||null===e||!1===e,rn=e=>{e=He.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a{let[t,n]=e;return`adapter ${t} `+(!1===n?"is not supported by the environment":"is not available in the build")}));let n=t?e.length>1?"since :\n"+e.map(tn).join("\n"):" "+tn(e[0]):"as no adapter specified";throw new We("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function an(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ct(null,e)}function on(e){an(e),e.headers=wt.from(e.headers),e.data=_t.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return rn(e.adapter||ft.adapter)(e).then((function(t){return an(e),t.data=_t.call(e,e.transformResponse,t),t.headers=wt.from(t.headers),t}),(function(t){return kt(t)||(an(e),t&&t.response&&(t.response.data=_t.call(e,e.transformResponse,t.response),t.response.headers=wt.from(t.response.headers))),Promise.reject(t)}))}const sn="1.10.0",ln={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ln[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const cn={};ln.transitional=function(e,t,n){function r(e,t){return"[Axios v"+sn+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,a)=>{if(!1===e)throw new We(r(i," has been removed"+(t?" in "+t:"")),We.ERR_DEPRECATED);return t&&!cn[i]&&(cn[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}},ln.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const un={assertOptions:function(e,t,n){if("object"!==typeof e)throw new We("options must be an object",We.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const t=e[a],n=void 0===t||o(t,a,e);if(!0!==n)throw new We("option "+a+" must be "+n,We.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new We("Unknown option "+a,We.ERR_BAD_OPTION)}},validators:ln},hn=un.validators;class dn{constructor(e){this.defaults=e||{},this.interceptors={request:new rt,response:new rt}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=Lt(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&un.assertOptions(n,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean)},!1),null!=r&&(He.isFunction(r)?t.paramsSerializer={serialize:r}:un.assertOptions(r,{encode:hn.function,serialize:hn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),un.assertOptions(t,{baseUrl:hn.spelling("baseURL"),withXsrfToken:hn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&He.merge(i.common,i[t.method]);i&&He.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=wt.concat(a,i);const o=[];let s=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,h=0;if(!s){const e=[on.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);h{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new Ct(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new fn((function(t){e=t})),cancel:e}}}const mn=fn;const gn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gn).forEach((e=>{let[t,n]=e;gn[n]=t}));const bn=gn;const yn=function e(t){const n=new pn(t),r=ne(pn.prototype.request,n);return He.extend(r,pn.prototype,n,{allOwnKeys:!0}),He.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Lt(t,n))},r}(ft);yn.Axios=pn,yn.CanceledError=Ct,yn.CancelToken=mn,yn.isCancel=kt,yn.VERSION=sn,yn.toFormData=Qe,yn.AxiosError=We,yn.Cancel=yn.CanceledError,yn.all=function(e){return Promise.all(e)},yn.spread=function(e){return function(t){return e.apply(null,t)}},yn.isAxiosError=function(e){return He.isObject(e)&&!0===e.isAxiosError},yn.mergeConfig=Lt,yn.AxiosHeaders=wt,yn.formToJSON=e=>dt(He.isHTMLForm(e)?new FormData(e):e),yn.getAdapter=rn,yn.HttpStatusCode=bn,yn.default=yn;const vn=yn;var xn=n(579);const wn="https://api.racine-ai.com",_n=(0,r.createContext)(),kn=()=>(0,r.useContext)(_n);function Sn(e){let{children:t}=e;const[n,i]=(0,r.useState)(null),[a,o]=(0,r.useState)(!0),s=(0,r.useCallback)((async()=>{try{const{data:e}=await vn.get(`${wn}/auth/me`,{withCredentials:!0});i(e)}catch{i(null)}finally{o(!1)}}),[]);(0,r.useEffect)((()=>{s()}),[s]);const l={user:n,loading:a,refresh:s,signUp:async(e,t)=>{await vn.post(`${wn}/auth/signup`,{email:e,password:t},{withCredentials:!0}),await s()},login:async(e,t)=>{await vn.post(`${wn}/auth/login`,{email:e,password:t},{withCredentials:!0}),await s()},logout:async()=>{await vn.post(`${wn}/auth/logout`,{},{withCredentials:!0}),i(null)},googleLogin:()=>{window.location.href=`${wn}/auth/google/login`}};return(0,xn.jsx)(_n.Provider,{value:l,children:t})}function Cn(e){let{children:t}=e;const{user:n,loading:r}=kn(),i=I();if(r)return null;if(!n){const e=i.pathname+i.search+i.hash;return sessionStorage.setItem("returnAfterLogin",e||"/"),(0,xn.jsx)($,{to:"/signin",replace:!0})}const a=!(n.first_name&&n.last_name);if(a&&"/onboarding"!==i.pathname)return(0,xn.jsx)($,{to:"/onboarding",replace:!0});return Array.isArray(n.subscriptions)&&n.subscriptions.length>0||a||"/subscribe"===i.pathname?t:(0,xn.jsx)($,{to:"/subscribe",replace:!0})}var Mn={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Tn=r.createContext&&r.createContext(Mn),En=["attr","size","title"];function An(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Nn(){return Nn=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement(e.tag,zn({key:t},e.attr),Rn(e.child))))}function jn(e){return t=>r.createElement(Ln,Nn({attr:zn({},e.attr)},t),Rn(e.child))}function Ln(e){var t=t=>{var n,{attr:i,size:a,title:o}=e,s=An(e,En),l=a||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),r.createElement("svg",Nn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,s,{className:n,style:zn(zn({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&r.createElement("title",null,o),e.children)};return void 0!==Tn?r.createElement(Tn.Consumer,null,(e=>t(e))):t(Mn)}function Dn(e){return jn({tag:"svg",attr:{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"path",attr:{fill:"#FFC107",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r\n\tc0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r\n\tc0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"},child:[]},{tag:"path",attr:{fill:"#FF3D00",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r\n\tC34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"},child:[]},{tag:"path",attr:{fill:"#4CAF50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r\n\tc-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"},child:[]},{tag:"path",attr:{fill:"#1976D2",d:"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r\n\tc0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"},child:[]}]})(e)}const In="Auth_page__Rvvzg",Bn="Auth_wrapper__OMtgK",Fn="Auth_form__9UsPq",Hn="Auth_switch__5+YP2",$n="Auth_primary__+oMhU",Un="Auth_google__oIa61",qn="Auth_err__Jy-xX",Wn="Auth_logo__yTKoC";function Vn(){const[e,t]=(0,r.useState)(""),[n,i]=(0,r.useState)(""),[a,o]=(0,r.useState)(""),{user:s,login:l,googleLogin:c}=kn(),u=B(),h=()=>sessionStorage.getItem("returnAfterLogin")||"/";return(0,r.useEffect)((()=>{s&&(u(h(),{replace:!0}),sessionStorage.removeItem("returnAfterLogin"))}),[s,u]),(0,xn.jsx)("div",{className:In,children:(0,xn.jsxs)("div",{className:Bn,children:[(0,xn.jsx)("img",{src:"/assets/logo-Racine.png",alt:"Racine logo",className:Wn}),(0,xn.jsx)("h2",{children:"Sign\xa0in"}),(0,xn.jsxs)("form",{onSubmit:async t=>{t.preventDefault();try{await l(e,n),u(h(),{replace:!0}),sessionStorage.removeItem("returnAfterLogin")}catch{o("Invalid credentials")}},className:Fn,children:[(0,xn.jsx)("input",{type:"email",placeholder:"Email",value:e,onChange:e=>t(e.target.value),required:!0}),(0,xn.jsx)("input",{type:"password",placeholder:"Password",value:n,onChange:e=>i(e.target.value),required:!0}),a&&(0,xn.jsx)("div",{className:qn,children:a}),(0,xn.jsx)("button",{className:$n,children:"Sign\xa0in"})]}),(0,xn.jsxs)("button",{type:"button",className:Un,onClick:()=>{sessionStorage.getItem("returnAfterLogin")||sessionStorage.setItem("returnAfterLogin","/"),c()},children:[(0,xn.jsx)(Dn,{size:20})," Continue with Google"]}),(0,xn.jsxs)("p",{className:Hn,children:["No account? ",(0,xn.jsx)(J,{to:"/signup",children:"Sign\xa0up"})]})]})})}function Yn(){const[e,t]=(0,r.useState)(""),[n,i]=(0,r.useState)(""),[a,o]=(0,r.useState)(""),s=B(),{signUp:l}=kn();return(0,xn.jsx)("div",{className:In,children:(0,xn.jsxs)("div",{className:Bn,children:[(0,xn.jsx)("img",{src:"/assets/logo-Racine.png",alt:"Racine logo",className:Wn}),(0,xn.jsx)("h2",{children:"Create account"}),(0,xn.jsxs)("form",{onSubmit:async t=>{t.preventDefault();try{await l(e,n),s("/onboarding")}catch{o("Email already exists")}},className:Fn,children:[(0,xn.jsx)("input",{type:"email",placeholder:"Email",value:e,onChange:e=>t(e.target.value),required:!0}),(0,xn.jsx)("input",{type:"password",placeholder:"Password",value:n,onChange:e=>i(e.target.value),required:!0}),a&&(0,xn.jsx)("div",{className:qn,children:a}),(0,xn.jsx)("button",{className:$n,children:"Sign\xa0up"})]}),(0,xn.jsxs)("p",{className:Hn,children:["Already have an account? ",(0,xn.jsx)(J,{to:"/signin",children:"Sign\xa0in"})]})]})})}function Gn(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 144v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48h88l12.3-32.9c7-18.7 24.9-31.1 44.9-31.1h125.5c20 0 37.9 12.4 44.9 31.1L376 96h88c26.5 0 48 21.5 48 48zM376 288c0-66.2-53.8-120-120-120s-120 53.8-120 120 53.8 120 120 120 120-53.8 120-120zm-32 0c0 48.5-39.5 88-88 88s-88-39.5-88-88 39.5-88 88-88 88 39.5 88 88z"},child:[]}]})(e)}function Xn(e){return jn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(e)}function Qn(e){return jn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"},child:[]}]})(e)}function Kn(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"},child:[]}]})(e)}function Jn(e){return jn({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"},child:[]}]})(e)}function Zn(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"},child:[]}]})(e)}function er(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"},child:[]}]})(e)}function tr(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"},child:[]}]})(e)}function nr(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function rr(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"},child:[]}]})(e)}function ir(e){return jn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM224 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm176-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h328c6.6 0 12 5.4 12 12v312z"},child:[]}]})(e)}function ar(e){return jn({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M288 32C128.94 32 0 160.94 0 320c0 52.8 14.25 102.26 39.06 144.8 5.61 9.62 16.3 15.2 27.44 15.2h443c11.14 0 21.83-5.58 27.44-15.2C561.75 422.26 576 372.8 576 320c0-159.06-128.94-288-288-288zm0 64c14.71 0 26.58 10.13 30.32 23.65-1.11 2.26-2.64 4.23-3.45 6.67l-9.22 27.67c-5.13 3.49-10.97 6.01-17.64 6.01-17.67 0-32-14.33-32-32S270.33 96 288 96zM96 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm48-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm246.77-72.41l-61.33 184C343.13 347.33 352 364.54 352 384c0 11.72-3.38 22.55-8.88 32H232.88c-5.5-9.45-8.88-20.28-8.88-32 0-33.94 26.5-61.43 59.9-63.59l61.34-184.01c4.17-12.56 17.73-19.45 30.36-15.17 12.57 4.19 19.35 17.79 15.17 30.36zm14.66 57.2l15.52-46.55c3.47-1.29 7.13-2.23 11.05-2.23 17.67 0 32 14.33 32 32s-14.33 32-32 32c-11.38-.01-20.89-6.28-26.57-15.22zM480 384c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(e)}function or(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"},child:[]}]})(e)}const sr={page:"Dashboard_page__u38JC",main:"Dashboard_main__aTxC3",top:"Dashboard_top__BghNN",wave:"Dashboard_wave__gFuc1",topRight:"Dashboard_topRight__VzNuL",searchWrap:"Dashboard_searchWrap__wycrD",searchInput:"Dashboard_searchInput__zipJ+",searchIcon:"Dashboard_searchIcon__DNlSO",bell:"Dashboard_bell__aEkpX",bellDot:"Dashboard_bellDot__EtAFj",avatar:"Dashboard_avatar__+jHLJ",grid:"Dashboard_grid__pobsP",leftCol:"Dashboard_leftCol__cQzU6",rightCol:"Dashboard_rightCol__AxJ45",card:"Dashboard_card__SmfXa",courseBadge:"Dashboard_courseBadge__H8+07",courseName:"Dashboard_courseName__bHjmD",progressChip:"Dashboard_progressChip__mqLfv",viewAll:"Dashboard_viewAll__66oG6",profileWrapper:"Dashboard_profileWrapper__ydZ7F",profileMenu:"Dashboard_profileMenu__9RBNM",profileEmail:"Dashboard_profileEmail__9Wvt4",logoutButton:"Dashboard_logoutButton__I0Z3J",logoutIcon:"Dashboard_logoutIcon__hlR3Q",underConstruction:"Dashboard_underConstruction__JqWZg","uc-stripes":"Dashboard_uc-stripes__3mx2Q","underConstruction--striped":"Dashboard_underConstruction--striped__uD0Yb",subInfo:"Dashboard_subInfo__b6vGn",cancelBtn:"Dashboard_cancelBtn__rMPbM",upgradeBtn:"Dashboard_upgradeBtn__MYQ+t",cancelMsg:"Dashboard_cancelMsg__BOMIb"},lr={cardBase:"ResumeCard_cardBase__pZD+N",iconCell:"ResumeCard_iconCell__pZpJz",headerTxt:"ResumeCard_headerTxt__Cgp7D",meta:"ResumeCard_meta__EMaCt",title:"ResumeCard_title__xs-Ji",subtitle:"ResumeCard_subtitle__Lbgw0",barWrap:"ResumeCard_barWrap__jKL18",barFill:"ResumeCard_barFill__vBIzc",percent:"ResumeCard_percent__5i+JI",continueBtn:"ResumeCard_continueBtn__m1OSF",arrow:"ResumeCard_arrow__5PPxK",compact:"ResumeCard_compact__ooGkq",compactIcon:"ResumeCard_compactIcon__YEQHh",cTitle:"ResumeCard_cTitle__Mfpik",cBtn:"ResumeCard_cBtn__iQJBM"};function cr(e){let{icon:t,title:n,subtitle:r,progress:i,buttonLabel:a,link:o="#",onButtonClick:s,className:l=""}=e;const c=()=>window.location.href=o,u=e=>{e.stopPropagation(),s?s(e):c()};return null==i?(0,xn.jsxs)("article",{className:`${lr.cardBase} ${lr.compact} ${l}`,tabIndex:0,role:"link",onClick:c,onKeyDown:e=>[" ","Enter"].includes(e.key)&&c(),children:[(0,xn.jsx)("div",{className:lr.compactIcon,children:t}),(0,xn.jsx)("h4",{className:lr.cTitle,children:n}),r&&(0,xn.jsx)("p",{className:lr.cSub,children:r}),a&&(0,xn.jsx)("button",{className:lr.cBtn,onClick:u,children:a})]}):(0,xn.jsxs)("article",{className:`${lr.cardBase} ${lr.course}`,tabIndex:0,role:"link",onClick:c,onKeyDown:e=>[" ","Enter"].includes(e.key)&&c(),children:[(0,xn.jsx)("div",{className:lr.iconCell,children:t}),(0,xn.jsxs)("div",{className:lr.headerTxt,children:[(0,xn.jsx)("p",{className:lr.meta,children:"COURSE PROGRESS"}),(0,xn.jsx)("h4",{className:lr.title,children:n}),r&&(0,xn.jsx)("p",{className:lr.subtitle,children:r})]}),(0,xn.jsx)("div",{className:lr.barWrap,children:(0,xn.jsx)("div",{className:lr.barFill,style:{width:`${Math.max(i,2)}%`}})}),(0,xn.jsxs)("p",{className:lr.percent,children:[i,"% Complete"]}),(0,xn.jsxs)("button",{className:lr.continueBtn,onClick:u,children:[a," ",(0,xn.jsx)("span",{className:lr.arrow,children:"\u2192"})]})]})}const ur="StatCard_statCard__iQtRe",hr="StatCard_statIcon__Ac6Zy",dr="StatCard_textBlock__xmAkU",pr="StatCard_label__hEHjj",fr="StatCard_sub__0cwcL";function mr(e){let{icon:t,label:n,sub:r="",color:i}=e;return(0,xn.jsxs)("div",{className:ur,children:[(0,xn.jsx)("span",{className:hr,style:i?{backgroundColor:i}:void 0,children:t}),(0,xn.jsxs)("div",{className:dr,children:[(0,xn.jsx)("span",{className:pr,children:n}),(0,xn.jsx)("br",{}),r&&(0,xn.jsx)("span",{className:fr,children:r})]})]})}function gr(){return(0,xn.jsxs)("svg",{version:"1.1",id:"IconStreak",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 92.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st8 { fill: #EC6F59; }\n .st9 { fill: #FAD15C; }\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("path",{class:"st8",d:"M18.61,54.89C15.7,28.8,30.94,10.45,59.52,0C42.02,22.71,74.44,47.31,76.23,70.89 c4.19-7.15,6.57-16.69,7.04-29.45c21.43,33.62,3.66,88.57-43.5,80.67c-4.33-0.72-8.5-2.09-12.3-4.13C10.27,108.8,0,88.79,0,69.68 C0,57.5,5.21,46.63,11.95,37.99C12.85,46.45,14.77,52.76,18.61,54.89L18.61,54.89z"}),(0,xn.jsx)("path",{class:"st9",d:"M33.87,92.58c-4.86-12.55-4.19-32.82,9.42-39.93c0.1,23.3,23.05,26.27,18.8,51.14 c3.92-4.44,5.9-11.54,6.25-17.15c6.22,14.24,1.34,25.63-7.53,31.43c-26.97,17.64-50.19-18.12-34.75-37.72 C26.53,84.73,31.89,91.49,33.87,92.58L33.87,92.58z"})]})]})}function br(){return(0,xn.jsxs)("svg",{viewBox:"0 0 130.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st2 { fill: var(--colorPurple); }\n .st3 { fill: var(--colorMint); }\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("path",{class:"st0",d:"M69.43,4.04c0-2.22,2.19-4.04,4.92-4.04s4.92,1.8,4.92,4.04V21.7c0,2.22-2.19,4.04-4.92,4.04 s-4.92-1.8-4.92-4.04V4.04L69.43,4.04L69.43,4.04z M13.41,57.17c-0.28,0-0.53-1.23-0.53-2.73s0.22-2.72,0.53-2.72h13.44 c0.28,0,0.53,1.23,0.53,2.72c0,1.5-0.22,2.73-0.53,2.73H13.41L13.41,57.17L13.41,57.17z M34.82,57.17c-0.28,0-0.53-1.23-0.53-2.73 s0.22-2.72,0.53-2.72h13.44c0.28,0,0.53,1.23,0.53,2.72c0,1.5-0.22,2.73-0.53,2.73H34.82L34.82,57.17L34.82,57.17z M56.24,57.17 c-0.28,0-0.53-1.23-0.53-2.73s0.22-2.72,0.53-2.72h13.44c0.28,0,0.53,1.22,0.53,2.71c-1.35,0.84-2.64,1.75-3.88,2.74H56.24 L56.24,57.17L56.24,57.17z M13.44,72.8c-0.28,0-0.53-1.23-0.53-2.73c0-1.5,0.22-2.73,0.53-2.73h13.44c0.28,0,0.53,1.23,0.53,2.73 c0,1.51-0.22,2.73-0.53,2.73H13.44L13.44,72.8L13.44,72.8z M34.85,72.8c-0.28,0-0.53-1.23-0.53-2.73c0-1.5,0.22-2.73,0.53-2.73 h13.44c0.28,0,0.53,1.23,0.53,2.73c0,1.51-0.22,2.73-0.53,2.73H34.85L34.85,72.8L34.85,72.8z M13.46,88.43 c-0.28,0-0.53-1.23-0.53-2.73c0-1.51,0.22-2.73,0.53-2.73H26.9c0.28,0,0.53,1.23,0.53,2.73c0,1.5-0.22,2.73-0.53,2.73H13.46 L13.46,88.43L13.46,88.43z M34.88,88.43c-0.28,0-0.53-1.23-0.53-2.73c0-1.51,0.22-2.73,0.53-2.73h13.44c0.28,0,0.53,1.23,0.53,2.73 c0,1.5-0.22,2.73-0.53,2.73H34.88L34.88,88.43L34.88,88.43z M25.21,4.04C25.21,1.81,27.4,0,30.13,0c2.73,0,4.92,1.8,4.92,4.04V21.7 c0,2.22-2.2,4.04-4.92,4.04c-2.73,0-4.92-1.8-4.92-4.04V4.04L25.21,4.04L25.21,4.04z M5.42,38.61h93.77V18.28 c0-0.7-0.28-1.31-0.73-1.75c-0.45-0.45-1.09-0.73-1.75-0.73h-8.99c-1.51,0-2.73-1.23-2.73-2.73c0-1.5,1.22-2.73,2.73-2.73h8.99 c2.2,0,4.18,0.89,5.62,2.33c1.45,1.45,2.33,3.42,2.33,5.62v32.28c-1.79-0.62-3.64-1.12-5.53-1.49v-5.04h0.06H5.42V96.7 c0,0.7,0.28,1.31,0.73,1.75c0.45,0.45,1.09,0.73,1.75,0.73h44.56c0.51,1.89,1.15,3.74,1.91,5.51H7.95c-2.19,0-4.18-0.89-5.62-2.33 C0.89,100.92,0,98.95,0,96.75V18.3c0-2.19,0.89-4.18,2.33-5.62c1.45-1.45,3.42-2.33,5.62-2.33h9.6c1.5,0,2.73,1.23,2.73,2.73 s-1.23,2.73-2.73,2.73h-9.6c-0.7,0-1.31,0.28-1.75,0.73c-0.45,0.45-0.73,1.09-0.73,1.75v20.33L5.42,38.61L5.42,38.61L5.42,38.61z M42.93,15.8c-1.5,0-2.73-1.23-2.73-2.73c0-1.5,1.23-2.73,2.73-2.73h18.3c1.51,0,2.73,1.23,2.73,2.73c0,1.51-1.23,2.73-2.73,2.73 H42.93L42.93,15.8L42.93,15.8z"}),(0,xn.jsx)("path",{class:"st1",d:"M91.09,56.53c8.78,0,16.73,3.56,22.48,9.31c5.74,5.76,9.3,13.71,9.3,22.48s-3.56,16.73-9.3,22.48 c-5.76,5.75-13.71,9.31-22.48,9.31s-16.73-3.56-22.48-9.31c-5.75-5.76-9.31-13.71-9.31-22.48c0-8.77,3.56-16.73,9.31-22.48 C74.36,60.09,82.31,56.53,91.09,56.53L91.09,56.53z M77.09,91.7c-0.15-0.16-0.28-0.33-0.39-0.51c-0.12-0.18-0.21-0.37-0.3-0.57 c-0.28-0.66-0.35-1.36-0.23-2.04c0.12-0.67,0.42-1.31,0.9-1.83l0.18-0.18c1.19-1.13,2.99-1.34,4.4-0.49 c0.2,0.12,0.39,0.26,0.57,0.43l0.02,0.02c1,0.96,2.69,2.53,3.8,3.51l0.95,0.85l11.66-12.23c0.16-0.17,0.34-0.32,0.54-0.45 c0.2-0.14,0.4-0.25,0.61-0.34c0.21-0.09,0.44-0.17,0.67-0.22c0.23-0.05,0.47-0.08,0.7-0.08h0.01c0.23,0,0.46,0.01,0.69,0.05 c0.23,0.04,0.45,0.1,0.69,0.19c0.22,0.08,0.43,0.19,0.63,0.31c0.19,0.12,0.37,0.26,0.55,0.43l0.08,0.08 c0.16,0.16,0.31,0.34,0.44,0.53c0.13,0.19,0.25,0.4,0.34,0.61c0.1,0.21,0.17,0.44,0.22,0.67c0.05,0.23,0.08,0.46,0.09,0.7v0.12 c0,0.21-0.02,0.42-0.06,0.62c-0.04,0.22-0.1,0.45-0.18,0.66c-0.08,0.22-0.19,0.43-0.31,0.63c-0.12,0.2-0.27,0.38-0.43,0.55 L89.83,98.49c-0.17,0.18-0.34,0.33-0.53,0.46c-0.19,0.14-0.4,0.25-0.61,0.35s-0.44,0.17-0.67,0.23s-0.46,0.09-0.7,0.1l-0.06,0 c-0.22,0-0.44-0.01-0.64-0.04l-0.05-0.01c-0.21-0.04-0.42-0.09-0.62-0.16c-0.22-0.08-0.43-0.18-0.63-0.3l-0.03-0.02 c-0.19-0.12-0.37-0.25-0.54-0.39l-0.03-0.03c-0.82-0.76-1.71-1.53-2.6-2.31C80.55,95.02,78.39,93.07,77.09,91.7L77.09,91.7 L77.09,91.7L77.09,91.7z"})]})]})}function yr(){return(0,xn.jsxs)("svg",{viewBox:"0 0 92.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st2 { fill: var(--colorPurple); }\n .st15 { fill: var(--colorSidebar); }\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("rect",{className:"st2",x:"5",y:"5",width:"82",height:"100",rx:"8",ry:"8"}),(0,xn.jsx)("rect",{className:"st15",x:"15",y:"15",width:"62",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"20",y:"40",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"40",y:"40",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"60",y:"40",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"20",y:"60",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"40",y:"60",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"60",y:"60",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"20",y:"80",width:"55",height:"15",rx:"3",ry:"3"})]})]})}function vr(){return(0,xn.jsxs)("svg",{viewBox:"0 0 122.88 121.71",xmlns:"http://www.w3.org/2000/svg",children:[(0,xn.jsx)("style",{children:"\n .st0 { fill: var(--colorPurple); }\n "}),(0,xn.jsx)("g",{children:(0,xn.jsx)("path",{className:"st0",fillRule:"evenodd",clipRule:"evenodd",d:"M74.63,71.74l0.13-24.69l5.21-7.65l-0.12-8.21c0-0.23-0.19-0.42-0.42-0.42H63.31v-9.44\r l22-8.91l-22-8.83V1.74c0-2.32-3.52-2.32-3.52,0v29.04H44.61c-0.23,0-0.42,0.19-0.42,0.42l-0.12,8.21l5.53,7.49v24.85h-6.49v-7.4\r H30.64l0.04-8.39l5.21-7.65l-0.12-8.21c0-0.23-0.19-0.42-0.42-0.42H0.54c-0.23,0-0.42,0.19-0.42,0.42L0,48.3l5.53,7.49v65.92h24.69\r h0.12h20.12V96.5c0-6.28,5.14-11.43,11.43-11.43h0c6.28,0,11.43,5.14,11.43,11.43v25.22h19.2h0.12h24.69l0.35-65.76l5.21-7.65\r l-0.12-8.21c0-0.23-0.19-0.42-0.42-0.42H87.52c-0.23,0-0.42,0.19-0.42,0.42l-0.12,8.21l5.53,7.49v8.55H80.21v7.4H74.63\r L74.63,71.74z M62.02,38.75c2.59,0,4.69,2.1,4.69,4.69c0,2.59-2.1,4.69-4.69,4.69c-2.59,0-4.69-2.1-4.69-4.69\r C57.32,40.86,59.42,38.75,62.02,38.75L62.02,38.75z M104.93,46.08c2.59,0,4.69,2.1,4.69,4.69c0,2.59-2.1,4.69-4.69,4.69\r c-2.59,0-4.69-2.1-4.69-4.69C100.24,48.18,102.34,46.08,104.93,46.08L104.93,46.08z M56.67,61.65h10.69c0.15,0,0.27,0.12,0.27,0.27\r v9.55c0,0.15-0.12,0.27-0.27,0.27H56.67c-0.15,0-0.27-0.12-0.27-0.27v-9.55C56.4,61.78,56.52,61.65,56.67,61.65L56.67,61.65z\r M17.95,46.08c2.59,0,4.69,2.1,4.69,4.69c0,2.59-2.1,4.69-4.69,4.69c-2.59,0-4.69-2.1-4.69-4.69C13.25,48.18,15.36,46.08,17.95,46.08\r L17.95,46.08z"})})]})}function xr(){return(0,xn.jsxs)("svg",{viewBox:"0 0 92.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st4 { fill: var(--colorPurple); }\n .st5 { fill: var(--colorMint); }\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("path",{className:"st4",d:"M46.13,15l-46,20l46,20l46-20L46.13,15z\r M20,35v15c0,8,12,15,26,15s26-7,26-15V35L46.13,45L20,35z"}),(0,xn.jsx)("path",{className:"st5",d:"M60.13,25v10c5,2,8,6,8,13h6c-1-10-5-16-14-21z"})]})]})}function wr(){return(0,xn.jsxs)("svg",{viewBox:"0 0 92.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st2 { fill: var(--colorPurple); }\n .st3 { fill: var(--colorMint); }\n .st15 { fill: var(--colorSidebar); }\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("rect",{className:"st2",x:"5",y:"5",width:"82",height:"100",rx:"5",ry:"5"}),(0,xn.jsx)("rect",{className:"st3",x:"5",y:"5",width:"82",height:"12"}),(0,xn.jsx)("circle",{className:"st15",cx:"15",cy:"5",r:"3"}),(0,xn.jsx)("circle",{className:"st15",cx:"30",cy:"5",r:"3"}),(0,xn.jsx)("circle",{className:"st15",cx:"45",cy:"5",r:"3"}),(0,xn.jsx)("circle",{className:"st15",cx:"60",cy:"5",r:"3"}),(0,xn.jsx)("circle",{className:"st15",cx:"75",cy:"5",r:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"15",y:"30",width:"60",height:"5"}),(0,xn.jsx)("rect",{className:"st15",x:"15",y:"45",width:"60",height:"5"}),(0,xn.jsx)("rect",{className:"st15",x:"15",y:"60",width:"60",height:"5"}),(0,xn.jsx)("rect",{className:"st15",x:"15",y:"75",width:"60",height:"5"})]})]})}function _r(){return(0,xn.jsx)("svg",{viewBox:"0 0 442 512.12",xmlns:"http://www.w3.org/2000/svg",children:(0,xn.jsxs)("g",{id:"Layer_x0020_1",children:[(0,xn.jsx)("metadata",{id:"CorelCorpID_0Corel-Layer"}),(0,xn.jsx)("path",{fill:"#FF7B24",d:"M56.642 62.995c190.964,-132.008 206.819,128.832 394.358,-34.293l0 266.205c-178.869,160.839 -219.046,-98.605 -394.358,33.463l0 -265.375z"}),(0,xn.jsx)("path",{fill:"#6E350F",d:"M57.161 62.944l0 386.537c8.162,6.463 13.394,16.446 13.394,27.664 0,19.486 -15.794,35.281 -35.28,35.281 -19.485,0 -35.275,-15.795 -35.275,-35.281 0,-11.888 5.88,-22.404 14.89,-28.793l0 -384.279c-9.01,-6.389 -14.89,-16.905 -14.89,-28.793 0,-19.485 15.79,-35.28 35.275,-35.28 19.486,0 35.28,15.795 35.28,35.28 0,11.218 -5.232,21.202 -13.394,27.664z"})]})})}function kr(){return(0,xn.jsxs)("svg",{viewBox:"0 0 122.88 122.88",preserveAspectRatio:"xMidYMid meet",children:[(0,xn.jsx)("style",{children:"\n .st10 { fill: rgb(87, 169, 0); }\n \n "}),(0,xn.jsx)("g",{children:(0,xn.jsx)("path",{class:"st10",d:"M122.88,61.44c0,33.93-27.51,61.44-61.44,61.44C27.51,122.88,0,95.37,0,61.44C0,27.51,27.51,0,61.44,0 C95.37,0,122.88,27.51,122.88,61.44L122.88,61.44z M88.07,77.9V59.54L61.44,40.21L34.81,59.54V77.9l26.63-19.33L88.07,77.9 L88.07,77.9L88.07,77.9z"})})]})}const Sr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.charAt(0).toUpperCase()+e.slice(1)},Cr=(e,t)=>{const n=(e||"").toLowerCase(),r=(t||"").toLowerCase();return n.includes("math")||n.includes("calc")||r.includes("math")||r.includes("calc")?(0,xn.jsx)(yr,{}):n.includes("history")||r.includes("history")?(0,xn.jsx)(vr,{}):(0,xn.jsx)(xr,{})};function Mr(){var e,t,n;const{user:i,logout:a}=kn(),o=B(),s=null!==(e=null===i||void 0===i?void 0:i.first_name)&&void 0!==e?e:"there",l=[{icon:(0,xn.jsx)(gr,{}),sub:"Day Streak",label:"15-day streak"},{icon:(0,xn.jsx)(_r,{}),sub:"Questions to Answer",label:2},{icon:(0,xn.jsx)(kr,{}),sub:"more practice than your peers",label:"+25%"}],c={icon:(0,xn.jsx)(br,{}),title:"No Study Plan Yet",subtitle:"Create a study plan to organize your learning.",buttonLabel:"Create a Plan",link:"/practice/settings"},u=e=>{var t;return new Date(null!==(t=e.last_used)&&void 0!==t?t:0).getTime()},[h,d]=(0,r.useState)(!1),[p,f]=(0,r.useState)(""),m="https://api.racine-ai.com".replace(/\/+$/,""),g=null!==(t=null===i||void 0===i?void 0:i.subscriptions.slice().sort(((e,t)=>u(t)-u(e))))&&void 0!==t?t:[],b=g.slice(0,2).map((e=>({icon:Cr(e.course,e.grade),title:Sr(e.chapter)||Sr(e.course),subtitle:`${e.grade} \u2013 ${e.course}`,progress:Math.floor(e.progress/100),buttonLabel:"Continue",link:`/courses/session?course_name=${e.course}&chapter=${e.chapter}&grade=${e.grade}`})));return(0,xn.jsx)("div",{className:sr.page,children:(0,xn.jsxs)("main",{className:sr.main,children:[(0,xn.jsxs)("header",{className:sr.top,children:[(0,xn.jsxs)("div",{children:[(0,xn.jsxs)("h1",{children:["Hello, ",s,"! ",(0,xn.jsx)("span",{className:sr.wave,children:"\ud83d\udc4b"})]}),(0,xn.jsx)("p",{children:"Ready to continue your learning journey?"})]}),(0,xn.jsxs)("div",{className:sr.topRight,children:[(0,xn.jsxs)("div",{className:sr.searchWrap,children:[(0,xn.jsx)(nr,{className:sr.searchIcon}),(0,xn.jsx)("input",{type:"text",placeholder:"Search for courses\u2026",className:sr.searchInput})]}),i&&(0,xn.jsxs)("div",{className:sr.profileWrapper,tabIndex:0,children:[(0,xn.jsx)("div",{className:sr.avatar,children:null===(n=i.first_name)||void 0===n?void 0:n.charAt(0).toUpperCase()}),(0,xn.jsxs)("div",{className:sr.profileMenu,children:[(0,xn.jsx)("span",{className:sr.profileEmail,children:i.email}),null!==i&&void 0!==i&&i.is_premium?(0,xn.jsxs)(xn.Fragment,{children:[(0,xn.jsxs)("p",{className:sr.subInfo,children:["PRO until ",(0,xn.jsx)("strong",{children:new Date(i.premium_until).toLocaleDateString()})]}),(0,xn.jsx)("button",{className:sr.cancelBtn,onClick:async()=>{if(window.confirm("Are you sure you want to cancel your subscription?")){d(!0);try{if(!(await fetch(`${m}/billing/cancel-subscription`,{method:"POST"})).ok)throw new Error;f("Subscription canceled.")}catch{alert("Failed to cancel. Please try again or contact us directly at racine-ai-contact@gmail.com.")}finally{d(!1)}}},disabled:h,children:h?"Canceling...":"Cancel Subscription"}),p&&(0,xn.jsx)("p",{className:sr.cancelMsg,children:p})]}):(0,xn.jsx)("button",{className:sr.upgradeBtn,onClick:()=>o("/subscribe/plans"),children:"Become PRO"}),(0,xn.jsxs)("button",{className:sr.logoutButton,onClick:()=>a(),children:[(0,xn.jsx)(rr,{className:sr.logoutIcon})," Logout"]})]})]})]})]}),(0,xn.jsxs)("section",{className:sr.grid,children:[(0,xn.jsxs)("div",{className:sr.leftCol,children:[b.length>0&&(0,xn.jsx)(cr,{...b[0],className:sr.resumeCard}),(0,xn.jsx)("div",{className:sr.underConstruction,children:(0,xn.jsx)(cr,{...c,className:sr.resumeCard})})]}),(0,xn.jsxs)("aside",{className:sr.rightCol,children:[(0,xn.jsx)("div",{className:sr.underConstruction,children:(0,xn.jsxs)("div",{className:sr.card,children:[(0,xn.jsx)("h3",{children:"Your Weekly Progress"}),l.map(((e,t)=>(0,xn.jsx)(mr,{icon:e.icon,label:e.label,sub:e.sub},t)))]})}),(0,xn.jsxs)("div",{className:sr.card,children:[(0,xn.jsx)("h3",{children:"My Courses"}),g.slice(0,4).map((e=>(0,xn.jsxs)("button",{className:sr.courseBadge,onClick:()=>o(`/courses/session?course_name=${e.course}&chapter=${e.chapter}&grade=${e.grade}`),children:[(0,xn.jsx)("span",{className:sr.courseName,children:e.chapter})," ",(0,xn.jsxs)("span",{className:sr.progressChip,children:[Math.floor(e.progress/100),"%"]})]},e.course))),(0,xn.jsx)("button",{className:sr.viewAll,onClick:()=>o("/courses"),children:"View All Courses"})]})]})]})]})})}const Tr="ComingSoon_wrapper__xYpRh",Er="ComingSoon_headerBar__c1lmH",Ar="ComingSoon_backArrow__IartU",Nr="ComingSoon_title__BY5xV",Pr="ComingSoon_content__yLn7R",zr="ComingSoon_illustration__iuRMW",Or="ComingSoon_headline__XqxHf",Rr="ComingSoon_description__redol";const jr=function(){const e=B(),t=()=>{window.history.length>2?e(-1):e("/")};return(0,xn.jsxs)("div",{className:Tr,children:[(0,xn.jsxs)("section",{className:Er,children:[(0,xn.jsx)("div",{className:Ar,role:"button",tabIndex:0,onClick:t,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||t()},children:(0,xn.jsx)("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,xn.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,xn.jsx)("h2",{className:Nr,children:"Coming\xa0Soon"})]}),(0,xn.jsxs)("div",{className:Pr,children:[(0,xn.jsx)("div",{className:zr,children:"\ud83d\udea7"}),(0,xn.jsx)("h3",{className:Or,children:"This page is under construction"}),(0,xn.jsx)("p",{className:Rr,children:"We're working hard to bring you this feature. Check back again soon!"})]})]})},Lr="AddCourseCard_addCard__56ucZ",Dr="AddCourseCard_plusSign__Fdlpq";const Ir=function(e){let{onClick:t}=e;return(0,xn.jsx)("div",{className:Lr,onClick:t,role:"button",tabIndex:0,children:(0,xn.jsx)("span",{className:Dr,children:"+"})})},Br="Courses_coursesWrapper__wqyQe",Fr="Courses_headerSection__m+Geu",Hr="Courses_heading__wxqxu",$r="Courses_coursesSection__SVf8-",Ur=(e,t)=>{const n=(e||"").toLowerCase(),r=(t||"").toLowerCase();return n.includes("math")||n.includes("calc")||r.includes("math")||r.includes("calc")?(0,xn.jsx)(yr,{}):n.includes("history")||r.includes("history")?(0,xn.jsx)(vr,{}):(0,xn.jsx)(xr,{})};const qr=function(){var e;const{user:t}=kn(),n=[...null!==(e=null===t||void 0===t?void 0:t.subscriptions)&&void 0!==e?e:[]].sort(((e,t)=>new Date(t.last_used)-new Date(e.last_used))).slice(0,6).map((e=>{const t=new URLSearchParams({grade:e.grade,course_name:e.course,chapter:e.chapter}).toString();return{icon:Ur(e.course,e.grade),title:e.chapter||e.course,subtitle:`${e.grade} \u2013 ${e.course}`,progress:Math.floor(e.progress/100),stats:[{icon:(0,xn.jsx)(kr,{}),text:`${e.progress}% covered`}],link:`/courses/session?${t}`}}));return(0,xn.jsxs)("div",{className:Br,children:[(0,xn.jsx)("section",{className:Fr,children:(0,xn.jsx)("h2",{className:Hr,children:"Courses"})}),(0,xn.jsxs)("section",{className:$r,children:[n.map(((e,t)=>(0,xn.jsx)(cr,{icon:e.icon,title:e.title,stats:e.stats,progress:e.progress,link:e.link},t))),(0,xn.jsx)(Ir,{onClick:()=>{window.location.href="/subscribe"}})]})]})},Wr="CoursePage_wrapper__-uslF",Vr="CoursePage_headerSection__6JA0g",Yr="CoursePage_backArrow__np4Ah",Gr="CoursePage_heading__GHVk8",Xr="CoursePage_contentSection__aoASb",Qr="CoursePage_card__o-UY6",Kr="CoursePage_cardIcon__5iehu",Jr="CoursePage_cardIconSvg__09Thi",Zr="CoursePage_cardTitle__SHQp7",ei="CoursePage_progressBar__B3YcF",ti="CoursePage_progressFill__z1kD8",ni="CoursePage_statLine__v9KtP",ri="CoursePage_statIcon__PSys9",ii="CoursePage_statText__CQnhc";const ai=function(){const e=B(),[t]=ee(),n=t.get("grade"),r=t.get("course_name"),i=t.get("chapter"),a={name:i,learnProgress:60,practiceStat:"+15% Lesson coverage"};return(0,xn.jsxs)("div",{className:Wr,children:[(0,xn.jsxs)("section",{className:Vr,children:[(0,xn.jsx)("div",{className:Yr,onClick:()=>{window.history.length>2?e(-1):e("/courses")},role:"button",tabIndex:0,onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&window.history.length>2?e(-1):"Enter"!==t.key&&" "!==t.key||e("/courses")},children:(0,xn.jsx)("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,xn.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,xn.jsx)("h2",{className:Gr,children:a.name})]}),(0,xn.jsxs)("section",{className:Xr,children:[(0,xn.jsxs)("div",{className:Qr,onClick:()=>{window.location.href=`/course/learn?grade=${encodeURIComponent(n)}&course_name=${encodeURIComponent(r)}&chapter=${encodeURIComponent(i)}`},children:[(0,xn.jsx)("div",{className:Kr,children:(0,xn.jsx)(xr,{className:Jr})}),(0,xn.jsx)("h3",{className:Zr,children:"Learn"}),(0,xn.jsx)("div",{className:ei,children:(0,xn.jsx)("div",{className:ti,style:{width:`${a.learnProgress}%`}})})]}),(0,xn.jsxs)("div",{className:Qr,onClick:()=>{e("/practice",{state:{grade:n,course_name:r,chapter:i}})},children:[(0,xn.jsx)("div",{className:Kr,children:(0,xn.jsx)(wr,{className:Jr})}),(0,xn.jsx)("h3",{className:Zr,children:"Practice"}),(0,xn.jsxs)("div",{className:ni,children:[(0,xn.jsx)("img",{src:"/assets/increase.png",alt:a.practiceStat,className:ri}),(0,xn.jsx)("span",{className:ii,children:a.practiceStat})]})]})]})]})};function oi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let si={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function li(e){si=e}const ci={exec:()=>null};function ui(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="string"===typeof e?e:e.source;const r={replace:(e,t)=>{let i="string"===typeof t?t:t.source;return i=i.replace(hi.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}const hi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},di=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,pi=/(?:[*+-]|\d{1,9}[.)])/,fi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,mi=ui(fi).replace(/bull/g,pi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),gi=ui(fi).replace(/bull/g,pi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),bi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,yi=/(?!\s*\])(?:\\.|[^\[\]\\])+/,vi=ui(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",yi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),xi=ui(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,pi).getRegex(),wi="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_i=/|$))/,ki=ui("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",_i).replace("tag",wi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Si=ui(bi).replace("hr",di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",wi).getRegex(),Ci={blockquote:ui(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Si).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:vi,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:di,html:ki,lheading:mi,list:xi,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Si,table:ci,text:/^[^\n]+/},Mi=ui("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",wi).getRegex(),Ti={...Ci,lheading:gi,table:Mi,paragraph:ui(bi).replace("hr",di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",wi).getRegex()},Ei={...Ci,html:ui("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_i).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ci,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ui(bi).replace("hr",di).replace("heading"," *#{1,6} *[^\n]").replace("lheading",mi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ai=/^( {2,}|\\)\n(?!\s*$)/,Ni=/[\p{P}\p{S}]/u,Pi=/[\s\p{P}\p{S}]/u,zi=/[^\s\p{P}\p{S}]/u,Oi=ui(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Pi).getRegex(),Ri=/(?!~)[\p{P}\p{S}]/u,ji=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Li=ui(ji,"u").replace(/punct/g,Ni).getRegex(),Di=ui(ji,"u").replace(/punct/g,Ri).getRegex(),Ii="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Bi=ui(Ii,"gu").replace(/notPunctSpace/g,zi).replace(/punctSpace/g,Pi).replace(/punct/g,Ni).getRegex(),Fi=ui(Ii,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Ri).getRegex(),Hi=ui("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zi).replace(/punctSpace/g,Pi).replace(/punct/g,Ni).getRegex(),$i=ui(/\\(punct)/,"gu").replace(/punct/g,Ni).getRegex(),Ui=ui(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),qi=ui(_i).replace("(?:--\x3e|$)","--\x3e").getRegex(),Wi=ui("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",qi).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Vi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Yi=ui(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Vi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Gi=ui(/^!?\[(label)\]\[(ref)\]/).replace("label",Vi).replace("ref",yi).getRegex(),Xi=ui(/^!?\[(ref)\](?:\[\])?/).replace("ref",yi).getRegex(),Qi={_backpedal:ci,anyPunctuation:$i,autolink:Ui,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:Ai,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ci,emStrongLDelim:Li,emStrongRDelimAst:Bi,emStrongRDelimUnd:Hi,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Yi,nolink:Xi,punctuation:Oi,reflink:Gi,reflinkSearch:ui("reflink|nolink(?!\\()","g").replace("reflink",Gi).replace("nolink",Xi).getRegex(),tag:Wi,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},ra=e=>na[e];function ia(e,t){if(t){if(hi.escapeTest.test(e))return e.replace(hi.escapeReplace,ra)}else if(hi.escapeTestNoEncode.test(e))return e.replace(hi.escapeReplaceNoEncode,ra);return e}function aa(e){try{e=encodeURI(e).replace(hi.percentDecode,"%")}catch{return null}return e}function oa(e,t){const n=e.replace(hi.findPipe,((e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(hi.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:sa(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(null===r)return t;const i=r[1];return t.split("\n").map((e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[r]=t;return r.length>=i.length?e.slice(i.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=sa(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:sa(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=sa(t[0],"\n").split("\n"),n="",r="";const i=[];for(;e.length>0;){let t=!1;const a=[];let o;for(o=0;o1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const a=this.rules.other.listItemRegex(n);let o=!1;for(;e;){let n=!1,r="",s="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!l.trim(),h=0;if(this.options.pedantic?(h=2,s=l.trimStart()):u?h=t[1].length+1:(h=t[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,s=l.slice(h),h+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(h),n=this.rules.other.hrRegex(h),i=this.rules.other.fencesBeginRegex(h),a=this.rules.other.headingBeginRegex(h),o=this.rules.other.htmlBeginRegex(h);for(;e;){const d=e.split("\n",1)[0];let p;if(c=d,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),p=c):p=c.replace(this.rules.other.tabCharGlobal," "),i.test(c))break;if(a.test(c))break;if(o.test(c))break;if(t.test(c))break;if(n.test(c))break;if(p.search(this.rules.other.nonSpaceChar)>=h||!c.trim())s+="\n"+p.slice(h);else{if(u)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(i.test(l))break;if(a.test(l))break;if(n.test(l))break;s+="\n"+c}u||c.trim()||(u=!0),r+=d+"\n",e=e.substring(d.length+1),l=p.slice(h)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let d,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(d="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!p,checked:d,loose:!1,text:s,tokens:[]}),i.raw+=r}const s=i.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));i.loose=n}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=sa(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),la(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return la(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let i,a,o=n,s=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=l.exec(t));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);const t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class ua{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||si,this.options.tokenizer=this.options.tokenizer||new ca,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:hi,block:ea.normal,inline:ta.normal};this.options.pedantic?(t.block=ea.pedantic,t.inline=ta.pedantic):this.options.gfm&&(t.block=ea.gfm,this.options.breaks?t.inline=ta.breaks:t.inline=ta.gfm),this.tokenizer.rules=t}static get rules(){return{block:ea,inline:ta}}static lex(e,t){return new ua(t).lex(e)}static lexInline(e,t){return new ua(t).inlineTokens(e)}lex(e){e=e.replace(hi.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(hi.tabCharGlobal," ").replace(hi.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);const n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){const a=t.at(-1);n&&"paragraph"===a?.type?(a.raw+="\n"+r.raw,a.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length)}else if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);const n=t.at(-1);"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e,r=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i=!1,a="";for(;e;){let r;if(i||(a=""),i=!1,this.options.extensions?.inline?.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);const n=t.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,a)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(o)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),i=!0;const n=t.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}}class ha{options;parser;constructor(e){this.options=e||si}space(e){return""}code(e){let{text:t,lang:n,escaped:r}=e;const i=(n||"").match(hi.notSpaceStart)?.[0],a=t.replace(hi.endingNewline,"")+"\n";return i?'
'+(r?a:ia(a,!0))+"
\n":"
"+(r?a:ia(a,!0))+"
\n"}blockquote(e){let{tokens:t}=e;return`
\n${this.parser.parse(t)}
\n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return`${this.parser.parseInline(t)}\n`}hr(e){return"
\n"}list(e){const t=e.ordered,n=e.start;let r="";for(let a=0;a\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+ia(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return`

    ${this.parser.parseInline(t)}

    \n`}table(e){let t="",n="";for(let i=0;i${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return`\n${t}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}em(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}codespan(e){let{text:t}=e;return`${ia(t,!0)}`}br(e){return"
    "}del(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}link(e){let{href:t,title:n,tokens:r}=e;const i=this.parser.parseInline(r),a=aa(t);if(null===a)return i;t=a;let o='
    ",o}image(e){let{href:t,title:n,text:r}=e;const i=aa(t);if(null===i)return ia(r);t=i;let a=`${r}1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:this.renderer,n="";for(let r=0;rnew Set(["preprocess","postprocess","processAllTokens"]))();preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ua.lex:ua.lexInline}provideParser(){return this.block?pa.parse:pa.parseInline}}const ma=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=(()=>pa)();Renderer=(()=>ha)();TextRenderer=(()=>da)();Lexer=(()=>ua)();Tokenizer=(()=>ca)();Hooks=(()=>fa)();constructor(){this.use(...arguments)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),i=0;i{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then((t=>a.call(e,t)));const n=i.call(e,t);return a.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);const o=i.hooks?i.hooks.provideLexer():e?ua.lex:ua.lexInline,s=i.hooks?i.hooks.provideParser():e?pa.parse:pa.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then((e=>o(e,i))).then((e=>i.hooks?i.hooks.processAllTokens(e):e)).then((e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then((()=>e)):e)).then((e=>s(e,i))).then((e=>i.hooks?i.hooks.postprocess(e):e)).catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let e=o(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=s(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(l){return a(l)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+ia(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function ga(e,t){return ma.parse(e,t)}ga.options=ga.setOptions=function(e){return ma.setOptions(e),ga.defaults=ma.defaults,li(ga.defaults),ga},ga.getDefaults=oi,ga.defaults=si,ga.use=function(){return ma.use(...arguments),ga.defaults=ma.defaults,li(ga.defaults),ga},ga.walkTokens=function(e,t){return ma.walkTokens(e,t)},ga.parseInline=ma.parseInline,ga.Parser=pa,ga.parser=pa.parse,ga.Renderer=ha,ga.TextRenderer=da,ga.Lexer=ua,ga.lexer=ua.lex,ga.Tokenizer=ca,ga.Hooks=fa,ga.parse=ga;ga.options,ga.setOptions,ga.use,ga.walkTokens,ga.parseInline,pa.parse,ua.lex;var ba,ya,va=function(){return(va=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1&&void 0!==arguments[1]?arguments[1]:[];(0,r.useEffect)((()=>{if(e.current){if(!(window.MathJax&&window.MathJax.startup&&window.MathJax.startup.promise)){const e=setTimeout(t,0);return()=>clearTimeout(e)}window.MathJax.startup.promise.then(t).catch((e=>console.error("MathJax startup failed:",e)))}function t(){window.MathJax&&"function"===typeof window.MathJax.typesetPromise?window.MathJax.typesetPromise([e.current]).catch((e=>console.error("MathJax v3 typeset failed:",e))):window.MathJax&&window.MathJax.Hub&&"function"===typeof window.MathJax.Hub.Queue&&window.MathJax.Hub.Queue(["Typeset",window.MathJax,e.current])}}),t)}function xo(e){let t=e.replace(/\\\\\(/g,"$").replace(/\\\\\)/g,"$").replace(/\\\\\[/g,"$$").replace(/\\\\\]/g,"$$").replace(/\\\(/g,"$").replace(/\\\)/g,"$").replace(/\\\[/g,"$$").replace(/\\\]/g,"$$");return t=t.replace(/\\\\/g,"\\\\\\\\"),t.replace(/([^\n])(\s*)(\$\$)/g,"$1\n$2$3")}function wo(e){return ga((t=e,t.replace(/^\s*(#{1,6}\s*)?(objective|problem|got\s*it\??|take\s*note|essential\s*understanding)\s*[:\-\u2013\u2014]?\s*/i,"$1")),{gfm:!0,breaks:!1}).replace(/

    \s*<\/p>/g,"");var t}const _o={objective:"Objective",problem:"Problem",gotit:"Got It?",essential_understanding:"Essential Understanding",take_note:"Take Note"};function ko(e){return _o[e]||e||""}function So(e){return"gotit"!==e.sectionTitle}const Co={loader:{load:["[tex]/ams"]},tex:{packages:{"[+]":["ams"]},inlineMath:[["\\(","\\)"],["$","$"]],displayMath:[["\\[","\\]"],["$$","$$"]],linebreaks:{automatic:!0}},svg:{linebreaks:{automatic:!0}}},Mo=r.createContext(null),To=r.memo((function(e){let{paraId:t,html:n,isMathBlock:i,contextContent:a,backendUrl:o,chapterTitle:s,sectionTitle:l}=e;const c=(0,r.useContext)(Mo),[u,h]=(0,r.useState)(!1),[d,p]=(0,r.useState)(""),[f,m]=(0,r.useState)([]),g=(0,r.useRef)(null);return vo(g,[u,f.length,d.length,f]),(0,xn.jsxs)("div",{ref:g,id:t,className:io,children:[(0,xn.jsxs)("div",{className:ao,children:[(0,xn.jsx)("div",{className:oo,dangerouslySetInnerHTML:{__html:n}}),(0,xn.jsx)("button",{className:so,onClick:function(){if(i)return;const e=c.current.scrollTop;c.current.classList.add("instantScroll"),requestAnimationFrame((()=>{c.current.scrollTop=e,requestAnimationFrame((()=>c.current.classList.remove("instantScroll")))})),h((e=>!e))},title:"Ask a question about this paragraph",children:(0,xn.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,xn.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,xn.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3"}),(0,xn.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17"})]})})]}),u&&(0,xn.jsxs)("div",{className:lo,children:[(0,xn.jsxs)("div",{className:co,children:[(0,xn.jsx)("textarea",{className:uo,placeholder:"Type your question\u2026",value:d,onChange:e=>p(e.target.value)}),(0,xn.jsx)("button",{className:ho,onClick:async function(){if(d){m((e=>[...e,{question:d,answer:"",loading:!0}])),p("");try{const e=await fetch(`${o}/course_question`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({chapter_title:s,section_title:l,section_content:a,question:d})}),t=(await e.json()).answer||"No answer available.";m((e=>e.map(((n,r)=>r===e.length-1?{...n,loading:!1,answer:t}:n))))}catch{m((e=>e.map(((t,n)=>n===e.length-1?{...t,loading:!1,answer:"Error fetching answer."}:t))))}}},children:"Submit"})]}),f.map(((e,t)=>(0,xn.jsxs)("div",{className:po,children:[(0,xn.jsxs)("div",{className:fo,children:[(0,xn.jsx)("strong",{children:"You asked:"})," ",e.question]}),e.loading?(0,xn.jsx)("div",{className:mo,children:"Loading answer\u2026"}):(0,xn.jsx)("div",{className:go,children:(0,xn.jsx)(Ta,{dynamic:!0,children:(0,xn.jsx)("p",{className:oo,dangerouslySetInnerHTML:{__html:wo(xo(e.answer))}})})})]},t)))]})]})})),Eo=r.memo(r.forwardRef((function(e,t){let{section:n}=e;const[i,a]=(0,r.useState)(n.solution.correct.length>1?[]:null),[o,s]=(0,r.useState)(null),l=(0,r.useContext)(Mo);return(0,xn.jsxs)("section",{ref:t,id:n.id,className:La,children:[ko(n.sectionTitle)&&(0,xn.jsx)("h4",{className:Ia,children:ko(n.sectionTitle)}),(0,xn.jsxs)("div",{className:Fa,children:[(0,xn.jsx)("div",{className:Ba,dangerouslySetInnerHTML:{__html:n.content_html}}),(0,xn.jsx)("ul",{className:Ha,children:n.mcOptions.map((e=>{let t=$a;return o?n.solution.correct.includes(e.id)?t+=` ${qa}`:(Array.isArray(i)&&i.includes(e.id)||i===e.id)&&(t+=` ${Wa}`):(Array.isArray(i)&&i.includes(e.id)||i===e.id)&&(t+=` ${Ua}`),(0,xn.jsx)("li",{className:t,onClick:()=>function(e){const t=l.current.scrollTop,r=n.solution.correct;if(1===r.length){const t=e===r[0];a(e),s({status:t?"correct":"incorrect",explanation:n.solution.explanation})}else a((t=>{const i=Array.isArray(t)?t:[],a=i.includes(e)?i.filter((t=>t!==e)):[...i,e],o=a.some((e=>!r.includes(e))),l=r.every((e=>a.includes(e)));return s(o||l?{status:!o&&l?"correct":"incorrect",explanation:n.solution.explanation}:null),a}));l.current.classList.add("instantScroll"),l.current.scrollTop=t,requestAnimationFrame((()=>l.current.classList.remove("instantScroll")))}(e.id),children:e.text},e.id)}))}),o&&(0,xn.jsxs)("div",{className:Va,children:[(0,xn.jsx)("span",{className:"correct"===o.status?Ya:Ga,children:"correct"===o.status?"\u2714 Correct!":"\u2716 Not quite."}),(0,xn.jsx)("div",{children:(0,xn.jsx)(Ta,{dynamic:!0,children:o.explanation.split("\n").map(((e,t)=>(0,xn.jsx)("p",{children:e},t)))})})]})]})]})}))),Ao=r.memo(r.forwardRef((function(e,t){let{section:n,chapterTitle:r,backendUrl:i}=e;const a=document.createElement("div");a.innerHTML=n.content_html;const o=Array.from(a.childNodes),s=o.map(((e,t)=>{const r=`${n.id}-para-${t}`;let i="",a=!1;if(e.nodeType===Node.ELEMENT_NODE){i=e.outerHTML;const t=e.textContent.trim();t.startsWith("$$")&&t.endsWith("$$")&&(a=!0)}else{const t=e.textContent.trim();i=t,t.startsWith("$$")&&t.endsWith("$$")&&(a=!0)}return{pid:r,html:i,isMath:a,contextHtml:o.slice(0,t+1).map((e=>e.nodeType===Node.ELEMENT_NODE?e.outerHTML:e.textContent)).join("\n\n")}}));return(0,xn.jsxs)("section",{ref:t,id:n.id,className:La,children:[ko(n.sectionTitle)&&(0,xn.jsx)("h4",{className:Ia,children:ko(n.sectionTitle)}),s.map((e=>(0,xn.jsx)(To,{paraId:e.pid,html:e.html,isMathBlock:e.isMath,contextContent:e.contextHtml,backendUrl:i,chapterTitle:r,sectionTitle:ko(n.sectionTitle)||n.sectionTitle},e.pid)))]})})));function No(){const[e,t]=(0,r.useState)({courseTitle:"Loading\u2026",bigSections:[]}),[n,i]=(0,r.useState)(0),[a,o]=(0,r.useState)(null),[s,l]=(0,r.useState)(!0),[c,u]=(0,r.useState)(!1),[h,d]=(0,r.useState)({}),p=(0,r.useRef)(null),[f,m]=(0,r.useState)(null),g=(0,r.useRef)(null),b=(0,r.useRef)({}),y=(0,r.useRef)(null),v=(0,r.useRef)(0),x=(0,r.useRef)(!1),[w]=ee(),_=w.get("grade"),k=w.get("course_name"),S=w.get("chapter"),C="https://api.racine-ai.com",[M,T]=(0,r.useState)(new Set),E=(0,r.useRef)(null),A=(0,r.useMemo)((()=>e.bigSections.flatMap((e=>e.sections.filter(So)))),[e.bigSections]),N=A.length,{user:P}=kn(),z=(0,r.useMemo)((()=>null===P||void 0===P?void 0:P.subscriptions.find((e=>e.grade===_&&e.course===k&&e.chapter===S))),[P,_,k,S]);(0,r.useEffect)((()=>{fetch(`${C}/course`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({grade:_,course_name:k,chapter:S})}).then((e=>e.json())).then((e=>{if(t(e),e.bigSections.length){const t=e.bigSections[0].sections.find(So);o((null===t||void 0===t?void 0:t.id)||null),d({0:Math.min(e.bigSections[0].sections.length,100)})}})).catch((()=>t({courseTitle:"Error loading course",bigSections:[]})))}),[C,_,k,S]),(0,r.useEffect)((()=>{if(!e.bigSections.length||null===z||void 0===z||!z.id||!A.length)return;const t=Math.floor(z.progress/1e4*A.length);T(new Set(A.slice(0,t).map((e=>e.id))));var n=Math.min(t+1,A.length-1);0===t&&(n=0);const r=A[n].id,a=e.bigSections.findIndex((e=>e.sections.some((e=>e.id===r))));i(a>=0?a:0),d((t=>({...t,[a]:Math.max(t[a]||0,e.bigSections[a].sections.findIndex((e=>e.id===r))+1)}))),o(r),setTimeout((()=>m(r)),0)}),[e.bigSections,z,A,N]),(0,r.useEffect)((()=>{const t=e.bigSections;if(!t.length)return;const r=n;h[r]||d((e=>({...e,[r]:Math.min(t[r].sections.length,100)})));const i=t[r].sections.find(So);o((null===i||void 0===i?void 0:i.id)||null),g.current&&(g.current.scrollTop=0)}),[n,e.bigSections]),(0,r.useEffect)((()=>{const t=g.current;if(!t)return;const r=()=>{x.current||(x.current=!0,requestAnimationFrame((()=>{var r;const i=t.scrollTop;u(i<200&&n>0);let s=a;const l=(null===(r=e.bigSections[n])||void 0===r?void 0:r.sections)||[];for(const e of l){const t=b.current[e.id];if(!(t&&t.offsetTop<=i+40))break;s=e.id}if(s!==a&&o(s),t.scrollHeight-(i+t.clientHeight)<100){const e=l.length,t=h[n]||0;t({...r,[n]:Math.min(e,t+100)}))))}v.current=i,x.current=!1})))};return t.addEventListener("scroll",r),()=>t.removeEventListener("scroll",r)}),[e.bigSections,n,a,h]),(0,r.useLayoutEffect)((()=>{var e;f?(null===(e=b.current[f])||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),m(null),p.current=null):null!=p.current&&(g.current.scrollTop=p.current,p.current=null)}),[h,f]),(0,r.useEffect)((()=>{var e;const t=null===(e=y.current)||void 0===e?void 0:e.querySelector(`[data-bigsection-idx="${n}"]`);null===t||void 0===t||t.scrollIntoView({block:"start",behavior:"smooth"})}),[n]),vo(g,[n,h[n]]);const O=e.bigSections||[],R=O[n]||{sections:[],bigSectionTitle:""},j=h[n]||0;return(0,r.useEffect)((()=>{if(!E.current||null===z||void 0===z||!z.id)return void(E.current=a);const e=E.current,t=A.findIndex((t=>t.id===e));if(-1===t)return void(E.current=a);const n=new Set(A.slice(0,t+1).map((e=>e.id)));T(n);const r=Math.round((t+1)/N*1e4);vn.patch(`${C}/auth/subscriptions/${z.id}`,{progress:r},{withCredentials:!0}).catch((e=>console.error("Failed to update progress:",e))),E.current=a}),[a,A,N,z,C]),(0,xn.jsx)(ka,{config:Co,children:(0,xn.jsx)(Mo.Provider,{value:g,children:(0,xn.jsxs)("div",{className:Ea,children:[(0,xn.jsxs)("header",{className:Aa,children:[(0,xn.jsx)("h2",{className:Na,children:e.courseTitle}),(0,xn.jsx)("button",{className:Pa,onClick:()=>l((e=>!e)),children:s?"\u25b2 Hide Summary":"\u25bc Show Summary"})]}),(0,xn.jsxs)("div",{className:za,children:[(0,xn.jsxs)("div",{className:Oa,children:[c&&(0,xn.jsx)("button",{className:Ra,onClick:()=>i((e=>Math.max(e-1,0))),children:"\u2191 Previous Section"}),(0,xn.jsxs)("div",{className:ja,ref:g,children:[(0,xn.jsx)("section",{id:`titleBlock-${n}`,ref:e=>e&&(b.current[`titleBlock-${n}`]=e),className:La,children:(0,xn.jsx)("h3",{className:Da,children:R.bigSectionTitle})}),R.sections.slice(0,j).map((t=>"text"===t.type?(0,xn.jsx)(Ao,{section:t,chapterTitle:e.courseTitle,backendUrl:C,ref:e=>b.current[t.id]=e},t.id):(0,xn.jsx)(Eo,{section:t,ref:e=>b.current[t.id]=e},t.id))),(0,xn.jsx)("div",{className:Xa,children:n=R.sections.length&&(0,xn.jsx)("button",{className:Qa,onClick:()=>i((e=>e+1)),children:"Next Section \u2193"}):j>=R.sections.length&&(0,xn.jsx)("button",{className:Qa,onClick:()=>window.location.href="/course/cheatsheet",children:"Finish Course"})})]})]}),s&&(0,xn.jsx)(Ta,{dynamic:!0,children:(0,xn.jsxs)("aside",{className:Ka,ref:y,children:[(0,xn.jsx)("h4",{children:"Sections"}),O.map(((e,t)=>{const r=t===n;return(0,xn.jsxs)("div",{className:Ja,"data-bigsection-idx":t,children:[(0,xn.jsx)("div",{className:`${Za} ${r?eo:""}`,onClick:()=>i(t),children:e.bigSectionTitle}),r&&e.sections.filter(So).map((n=>{const r=n.id===a,i=M.has(n.id);let o=to;return o+=r?` ${no}`:i?` ${bo}`:` ${ro}`,(0,xn.jsxs)("div",{className:o,onClick:()=>{const r=e.sections.findIndex((e=>e.id===n.id)),i=h[t]||0;var a;r+1>i?(p.current=g.current.scrollTop,d((e=>({...e,[t]:r+1}))),m(n.id)):null===(a=b.current[n.id])||void 0===a||a.scrollIntoView({behavior:"smooth",block:"start"})},children:[i&&(0,xn.jsx)("span",{className:yo,children:"\u2714\ufe0e"}),ko(n.sectionTitle)]},n.id)}))]},e.bigSectionTitle)}))]})})]})]})})})}class Po{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new Po(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class zo{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new zo(t,Po.range(this,e))}}class Oo{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n,r,i="KaTeX parse error: "+e,a=t&&t.loc;if(a&&a.start<=a.end){var o=a.lexer.input;n=a.start,r=a.end,n===o.length?i+=" at end of input: ":i+=" at position "+(n+1)+": ";var s=o.slice(n,r).replace(/[^]/g,"$&\u0332");i+=(n>15?"\u2026"+o.slice(n-15,n):o.slice(0,n))+s+(r+15":">","<":"<",'"':""","'":"'"},Lo=/[&><"']/g;var Do=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},Io={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(Lo,(e=>jo[e]))},hyphenate:function(e){return e.replace(Ro,"-$1").toLowerCase()},getBaseElem:Do,isCharacterBox:function(e){var t=Do(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},Bo={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Fo(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!==typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Ho{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Bo)if(Bo.hasOwnProperty(t)){var n=Bo[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:Fo(n)}}reportNonstrict(e,t,n){var r=this.strict;if("function"===typeof r&&(r=r(e,t,n)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new Oo("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===r?"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){var r=this.strict;if("function"===typeof r)try{r=r(e,t,n)}catch(i){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=Io.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var n="function"===typeof this.trust?this.trust(e):this.trust;return Boolean(n)}}class $o{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Uo[qo[this.id]]}sub(){return Uo[Wo[this.id]]}fracNum(){return Uo[Vo[this.id]]}fracDen(){return Uo[Yo[this.id]]}cramp(){return Uo[Go[this.id]]}text(){return Uo[Xo[this.id]]}isTight(){return this.size>=2}}var Uo=[new $o(0,0,!1),new $o(1,0,!0),new $o(2,1,!1),new $o(3,1,!0),new $o(4,2,!1),new $o(5,2,!0),new $o(6,3,!1),new $o(7,3,!0)],qo=[4,5,4,5,6,7,6,7],Wo=[5,5,5,5,7,7,7,7],Vo=[2,3,4,5,6,7,6,7],Yo=[3,3,5,5,7,7,7,7],Go=[1,1,3,3,5,5,7,7],Xo=[0,1,2,3,2,3,2,3],Qo={DISPLAY:Uo[0],TEXT:Uo[2],SCRIPT:Uo[4],SCRIPTSCRIPT:Uo[6]},Ko=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var Jo=[];function Zo(e){for(var t=0;t=Jo[t]&&e<=Jo[t+1])return!0;return!1}Ko.forEach((e=>e.blocks.forEach((e=>Jo.push(...e)))));var es=80,ts={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class ns{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Io.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText())).join("")}}var rs={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},is={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},as={"\xc5":"A","\xd0":"D","\xde":"o","\xe5":"a","\xf0":"d","\xfe":"o","\u0410":"A","\u0411":"B","\u0412":"B","\u0413":"F","\u0414":"A","\u0415":"E","\u0416":"K","\u0417":"3","\u0418":"N","\u0419":"N","\u041a":"K","\u041b":"N","\u041c":"M","\u041d":"H","\u041e":"O","\u041f":"N","\u0420":"P","\u0421":"C","\u0422":"T","\u0423":"y","\u0424":"O","\u0425":"X","\u0426":"U","\u0427":"h","\u0428":"W","\u0429":"W","\u042a":"B","\u042b":"X","\u042c":"B","\u042d":"3","\u042e":"X","\u042f":"R","\u0430":"a","\u0431":"b","\u0432":"a","\u0433":"r","\u0434":"y","\u0435":"e","\u0436":"m","\u0437":"e","\u0438":"n","\u0439":"n","\u043a":"n","\u043b":"n","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"n","\u0440":"p","\u0441":"c","\u0442":"o","\u0443":"y","\u0444":"b","\u0445":"x","\u0446":"n","\u0447":"n","\u0448":"w","\u0449":"w","\u044a":"a","\u044b":"m","\u044c":"a","\u044d":"e","\u044e":"m","\u044f":"r"};function os(e,t,n){if(!rs[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=rs[t][r];if(!i&&e[0]in as&&(r=as[e[0]].charCodeAt(0),i=rs[t][r]),i||"text"!==n||Zo(r)&&(i=rs[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var ss={};var ls=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],cs=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],us=function(e,t){return t.size<2?e:ls[e-1][t.size-1]};class hs{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||hs.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=cs[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new hs(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:us(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:cs[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=us(hs.BASESIZE,e);return this.size===t&&this.textSize===hs.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==hs.BASESIZE?["sizing","reset-size"+this.size,"size"+hs.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!ss[t=e>=5?0:e>=3?1:2]){var n=ss[t]={cssEmPerMu:is.quad[t]/18};for(var r in is)is.hasOwnProperty(r)&&(n[r]=is[r][t])}return ss[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}hs.BASESIZE=6;var ds={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},ps={ex:!0,em:!0,mu:!0},fs=function(e){return"string"!==typeof e&&(e=e.unit),e in ds||e in ps||"ex"===e},ms=function(e,t){var n;if(e.unit in ds)n=ds[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Oo("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},gs=function(e){return+e.toFixed(4)+"em"},bs=function(e){return e.filter((e=>e)).join(" ")},ys=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},vs=function(e){var t=document.createElement(e);for(var n in t.className=bs(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var i=0;i/=\x00-\x1f]/,ws=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Io.escape(bs(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Io.hyphenate(r)+":"+this.style[r]+";");for(var i in n&&(t+=' style="'+Io.escape(n)+'"'),this.attributes)if(this.attributes.hasOwnProperty(i)){if(xs.test(i))throw new Oo("Invalid attribute name '"+i+"'");t+=" "+i+'="'+Io.escape(this.attributes[i])+'"'}t+=">";for(var a=0;a"};class _s{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,ys.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Io.contains(this.classes,e)}toNode(){return vs.call(this,"span")}toMarkup(){return ws.call(this,"span")}}class ks{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,ys.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Io.contains(this.classes,e)}toNode(){return vs.call(this,"a")}toMarkup(){return ws.call(this,"a")}}class Ss{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return Io.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=''+Io.escape(this.alt)+'=i[0]&&e<=i[1])return n.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=Cs[this.text])}hasClass(e){return Io.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=gs(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=bs(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=Io.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+Io.escape(n)+'"');var i=Io.escape(this.text);return e?(t+=">",t+=i,t+=""):i}}class Ts{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n':''}}class As{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="","\\gt",!0),Rs(js,Ds,Ys,"\u2208","\\in",!0),Rs(js,Ds,Ys,"\ue020","\\@not"),Rs(js,Ds,Ys,"\u2282","\\subset",!0),Rs(js,Ds,Ys,"\u2283","\\supset",!0),Rs(js,Ds,Ys,"\u2286","\\subseteq",!0),Rs(js,Ds,Ys,"\u2287","\\supseteq",!0),Rs(js,Is,Ys,"\u2288","\\nsubseteq",!0),Rs(js,Is,Ys,"\u2289","\\nsupseteq",!0),Rs(js,Ds,Ys,"\u22a8","\\models"),Rs(js,Ds,Ys,"\u2190","\\leftarrow",!0),Rs(js,Ds,Ys,"\u2264","\\le"),Rs(js,Ds,Ys,"\u2264","\\leq",!0),Rs(js,Ds,Ys,"<","\\lt",!0),Rs(js,Ds,Ys,"\u2192","\\rightarrow",!0),Rs(js,Ds,Ys,"\u2192","\\to"),Rs(js,Is,Ys,"\u2271","\\ngeq",!0),Rs(js,Is,Ys,"\u2270","\\nleq",!0),Rs(js,Ds,Gs,"\xa0","\\ "),Rs(js,Ds,Gs,"\xa0","\\space"),Rs(js,Ds,Gs,"\xa0","\\nobreakspace"),Rs(Ls,Ds,Gs,"\xa0","\\ "),Rs(Ls,Ds,Gs,"\xa0"," "),Rs(Ls,Ds,Gs,"\xa0","\\space"),Rs(Ls,Ds,Gs,"\xa0","\\nobreakspace"),Rs(js,Ds,Gs,null,"\\nobreak"),Rs(js,Ds,Gs,null,"\\allowbreak"),Rs(js,Ds,Vs,",",","),Rs(js,Ds,Vs,";",";"),Rs(js,Is,Fs,"\u22bc","\\barwedge",!0),Rs(js,Is,Fs,"\u22bb","\\veebar",!0),Rs(js,Ds,Fs,"\u2299","\\odot",!0),Rs(js,Ds,Fs,"\u2295","\\oplus",!0),Rs(js,Ds,Fs,"\u2297","\\otimes",!0),Rs(js,Ds,Xs,"\u2202","\\partial",!0),Rs(js,Ds,Fs,"\u2298","\\oslash",!0),Rs(js,Is,Fs,"\u229a","\\circledcirc",!0),Rs(js,Is,Fs,"\u22a1","\\boxdot",!0),Rs(js,Ds,Fs,"\u25b3","\\bigtriangleup"),Rs(js,Ds,Fs,"\u25bd","\\bigtriangledown"),Rs(js,Ds,Fs,"\u2020","\\dagger"),Rs(js,Ds,Fs,"\u22c4","\\diamond"),Rs(js,Ds,Fs,"\u22c6","\\star"),Rs(js,Ds,Fs,"\u25c3","\\triangleleft"),Rs(js,Ds,Fs,"\u25b9","\\triangleright"),Rs(js,Ds,Ws,"{","\\{"),Rs(Ls,Ds,Xs,"{","\\{"),Rs(Ls,Ds,Xs,"{","\\textbraceleft"),Rs(js,Ds,Hs,"}","\\}"),Rs(Ls,Ds,Xs,"}","\\}"),Rs(Ls,Ds,Xs,"}","\\textbraceright"),Rs(js,Ds,Ws,"{","\\lbrace"),Rs(js,Ds,Hs,"}","\\rbrace"),Rs(js,Ds,Ws,"[","\\lbrack",!0),Rs(Ls,Ds,Xs,"[","\\lbrack",!0),Rs(js,Ds,Hs,"]","\\rbrack",!0),Rs(Ls,Ds,Xs,"]","\\rbrack",!0),Rs(js,Ds,Ws,"(","\\lparen",!0),Rs(js,Ds,Hs,")","\\rparen",!0),Rs(Ls,Ds,Xs,"<","\\textless",!0),Rs(Ls,Ds,Xs,">","\\textgreater",!0),Rs(js,Ds,Ws,"\u230a","\\lfloor",!0),Rs(js,Ds,Hs,"\u230b","\\rfloor",!0),Rs(js,Ds,Ws,"\u2308","\\lceil",!0),Rs(js,Ds,Hs,"\u2309","\\rceil",!0),Rs(js,Ds,Xs,"\\","\\backslash"),Rs(js,Ds,Xs,"\u2223","|"),Rs(js,Ds,Xs,"\u2223","\\vert"),Rs(Ls,Ds,Xs,"|","\\textbar",!0),Rs(js,Ds,Xs,"\u2225","\\|"),Rs(js,Ds,Xs,"\u2225","\\Vert"),Rs(Ls,Ds,Xs,"\u2225","\\textbardbl"),Rs(Ls,Ds,Xs,"~","\\textasciitilde"),Rs(Ls,Ds,Xs,"\\","\\textbackslash"),Rs(Ls,Ds,Xs,"^","\\textasciicircum"),Rs(js,Ds,Ys,"\u2191","\\uparrow",!0),Rs(js,Ds,Ys,"\u21d1","\\Uparrow",!0),Rs(js,Ds,Ys,"\u2193","\\downarrow",!0),Rs(js,Ds,Ys,"\u21d3","\\Downarrow",!0),Rs(js,Ds,Ys,"\u2195","\\updownarrow",!0),Rs(js,Ds,Ys,"\u21d5","\\Updownarrow",!0),Rs(js,Ds,qs,"\u2210","\\coprod"),Rs(js,Ds,qs,"\u22c1","\\bigvee"),Rs(js,Ds,qs,"\u22c0","\\bigwedge"),Rs(js,Ds,qs,"\u2a04","\\biguplus"),Rs(js,Ds,qs,"\u22c2","\\bigcap"),Rs(js,Ds,qs,"\u22c3","\\bigcup"),Rs(js,Ds,qs,"\u222b","\\int"),Rs(js,Ds,qs,"\u222b","\\intop"),Rs(js,Ds,qs,"\u222c","\\iint"),Rs(js,Ds,qs,"\u222d","\\iiint"),Rs(js,Ds,qs,"\u220f","\\prod"),Rs(js,Ds,qs,"\u2211","\\sum"),Rs(js,Ds,qs,"\u2a02","\\bigotimes"),Rs(js,Ds,qs,"\u2a01","\\bigoplus"),Rs(js,Ds,qs,"\u2a00","\\bigodot"),Rs(js,Ds,qs,"\u222e","\\oint"),Rs(js,Ds,qs,"\u222f","\\oiint"),Rs(js,Ds,qs,"\u2230","\\oiiint"),Rs(js,Ds,qs,"\u2a06","\\bigsqcup"),Rs(js,Ds,qs,"\u222b","\\smallint"),Rs(Ls,Ds,$s,"\u2026","\\textellipsis"),Rs(js,Ds,$s,"\u2026","\\mathellipsis"),Rs(Ls,Ds,$s,"\u2026","\\ldots",!0),Rs(js,Ds,$s,"\u2026","\\ldots",!0),Rs(js,Ds,$s,"\u22ef","\\@cdots",!0),Rs(js,Ds,$s,"\u22f1","\\ddots",!0),Rs(js,Ds,Xs,"\u22ee","\\varvdots"),Rs(Ls,Ds,Xs,"\u22ee","\\varvdots"),Rs(js,Ds,Bs,"\u02ca","\\acute"),Rs(js,Ds,Bs,"\u02cb","\\grave"),Rs(js,Ds,Bs,"\xa8","\\ddot"),Rs(js,Ds,Bs,"~","\\tilde"),Rs(js,Ds,Bs,"\u02c9","\\bar"),Rs(js,Ds,Bs,"\u02d8","\\breve"),Rs(js,Ds,Bs,"\u02c7","\\check"),Rs(js,Ds,Bs,"^","\\hat"),Rs(js,Ds,Bs,"\u20d7","\\vec"),Rs(js,Ds,Bs,"\u02d9","\\dot"),Rs(js,Ds,Bs,"\u02da","\\mathring"),Rs(js,Ds,Us,"\ue131","\\@imath"),Rs(js,Ds,Us,"\ue237","\\@jmath"),Rs(js,Ds,Xs,"\u0131","\u0131"),Rs(js,Ds,Xs,"\u0237","\u0237"),Rs(Ls,Ds,Xs,"\u0131","\\i",!0),Rs(Ls,Ds,Xs,"\u0237","\\j",!0),Rs(Ls,Ds,Xs,"\xdf","\\ss",!0),Rs(Ls,Ds,Xs,"\xe6","\\ae",!0),Rs(Ls,Ds,Xs,"\u0153","\\oe",!0),Rs(Ls,Ds,Xs,"\xf8","\\o",!0),Rs(Ls,Ds,Xs,"\xc6","\\AE",!0),Rs(Ls,Ds,Xs,"\u0152","\\OE",!0),Rs(Ls,Ds,Xs,"\xd8","\\O",!0),Rs(Ls,Ds,Bs,"\u02ca","\\'"),Rs(Ls,Ds,Bs,"\u02cb","\\`"),Rs(Ls,Ds,Bs,"\u02c6","\\^"),Rs(Ls,Ds,Bs,"\u02dc","\\~"),Rs(Ls,Ds,Bs,"\u02c9","\\="),Rs(Ls,Ds,Bs,"\u02d8","\\u"),Rs(Ls,Ds,Bs,"\u02d9","\\."),Rs(Ls,Ds,Bs,"\xb8","\\c"),Rs(Ls,Ds,Bs,"\u02da","\\r"),Rs(Ls,Ds,Bs,"\u02c7","\\v"),Rs(Ls,Ds,Bs,"\xa8",'\\"'),Rs(Ls,Ds,Bs,"\u02dd","\\H"),Rs(Ls,Ds,Bs,"\u25ef","\\textcircled");var Qs={"--":!0,"---":!0,"``":!0,"''":!0};Rs(Ls,Ds,Xs,"\u2013","--",!0),Rs(Ls,Ds,Xs,"\u2013","\\textendash"),Rs(Ls,Ds,Xs,"\u2014","---",!0),Rs(Ls,Ds,Xs,"\u2014","\\textemdash"),Rs(Ls,Ds,Xs,"\u2018","`",!0),Rs(Ls,Ds,Xs,"\u2018","\\textquoteleft"),Rs(Ls,Ds,Xs,"\u2019","'",!0),Rs(Ls,Ds,Xs,"\u2019","\\textquoteright"),Rs(Ls,Ds,Xs,"\u201c","``",!0),Rs(Ls,Ds,Xs,"\u201c","\\textquotedblleft"),Rs(Ls,Ds,Xs,"\u201d","''",!0),Rs(Ls,Ds,Xs,"\u201d","\\textquotedblright"),Rs(js,Ds,Xs,"\xb0","\\degree",!0),Rs(Ls,Ds,Xs,"\xb0","\\degree"),Rs(Ls,Ds,Xs,"\xb0","\\textdegree",!0),Rs(js,Ds,Xs,"\xa3","\\pounds"),Rs(js,Ds,Xs,"\xa3","\\mathsterling",!0),Rs(Ls,Ds,Xs,"\xa3","\\pounds"),Rs(Ls,Ds,Xs,"\xa3","\\textsterling",!0),Rs(js,Is,Xs,"\u2720","\\maltese"),Rs(Ls,Is,Xs,"\u2720","\\maltese");for(var Ks='0123456789/@."',Js=0;Js<14;Js++){var Zs=Ks.charAt(Js);Rs(js,Ds,Xs,Zs,Zs)}for(var el='0123456789!@*()-=+";:?/.,',tl=0;tl<25;tl++){var nl=el.charAt(tl);Rs(Ls,Ds,Xs,nl,nl)}for(var rl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",il=0;il<52;il++){var al=rl.charAt(il);Rs(js,Ds,Us,al,al),Rs(Ls,Ds,Xs,al,al)}Rs(js,Is,Xs,"C","\u2102"),Rs(Ls,Is,Xs,"C","\u2102"),Rs(js,Is,Xs,"H","\u210d"),Rs(Ls,Is,Xs,"H","\u210d"),Rs(js,Is,Xs,"N","\u2115"),Rs(Ls,Is,Xs,"N","\u2115"),Rs(js,Is,Xs,"P","\u2119"),Rs(Ls,Is,Xs,"P","\u2119"),Rs(js,Is,Xs,"Q","\u211a"),Rs(Ls,Is,Xs,"Q","\u211a"),Rs(js,Is,Xs,"R","\u211d"),Rs(Ls,Is,Xs,"R","\u211d"),Rs(js,Is,Xs,"Z","\u2124"),Rs(Ls,Is,Xs,"Z","\u2124"),Rs(js,Ds,Us,"h","\u210e"),Rs(Ls,Ds,Us,"h","\u210e");for(var ol="",sl=0;sl<52;sl++){var ll=rl.charAt(sl);Rs(js,Ds,Us,ll,ol=String.fromCharCode(55349,56320+sl)),Rs(Ls,Ds,Xs,ll,ol),Rs(js,Ds,Us,ll,ol=String.fromCharCode(55349,56372+sl)),Rs(Ls,Ds,Xs,ll,ol),Rs(js,Ds,Us,ll,ol=String.fromCharCode(55349,56424+sl)),Rs(Ls,Ds,Xs,ll,ol),Rs(js,Ds,Us,ll,ol=String.fromCharCode(55349,56580+sl)),Rs(Ls,Ds,Xs,ll,ol),Rs(js,Ds,Us,ll,ol=String.fromCharCode(55349,56684+sl)),Rs(Ls,Ds,Xs,ll,ol),Rs(js,Ds,Us,ll,ol=String.fromCharCode(55349,56736+sl)),Rs(Ls,Ds,Xs,ll,ol),Rs(js,Ds,Us,ll,ol=String.fromCharCode(55349,56788+sl)),Rs(Ls,Ds,Xs,ll,ol),Rs(js,Ds,Us,ll,ol=String.fromCharCode(55349,56840+sl)),Rs(Ls,Ds,Xs,ll,ol),Rs(js,Ds,Us,ll,ol=String.fromCharCode(55349,56944+sl)),Rs(Ls,Ds,Xs,ll,ol),sl<26&&(Rs(js,Ds,Us,ll,ol=String.fromCharCode(55349,56632+sl)),Rs(Ls,Ds,Xs,ll,ol),Rs(js,Ds,Us,ll,ol=String.fromCharCode(55349,56476+sl)),Rs(Ls,Ds,Xs,ll,ol))}Rs(js,Ds,Us,"k",ol=String.fromCharCode(55349,56668)),Rs(Ls,Ds,Xs,"k",ol);for(var cl=0;cl<10;cl++){var ul=cl.toString();Rs(js,Ds,Us,ul,ol=String.fromCharCode(55349,57294+cl)),Rs(Ls,Ds,Xs,ul,ol),Rs(js,Ds,Us,ul,ol=String.fromCharCode(55349,57314+cl)),Rs(Ls,Ds,Xs,ul,ol),Rs(js,Ds,Us,ul,ol=String.fromCharCode(55349,57324+cl)),Rs(Ls,Ds,Xs,ul,ol),Rs(js,Ds,Us,ul,ol=String.fromCharCode(55349,57334+cl)),Rs(Ls,Ds,Xs,ul,ol)}for(var hl="\xd0\xde\xfe",dl=0;dl<3;dl++){var pl=hl.charAt(dl);Rs(js,Ds,Us,pl,pl),Rs(Ls,Ds,Xs,pl,pl)}var fl=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],ml=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],gl=function(e,t,n){return Os[n][e]&&Os[n][e].replace&&(e=Os[n][e].replace),{value:e,metrics:os(e,t,n)}},bl=function(e,t,n,r,i){var a,o=gl(e,t,n),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),a=new Ms(e,s.height,s.depth,l,s.skew,s.width,i)}else"undefined"!==typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),a=new Ms(e,0,0,0,0,0,i);if(r){a.maxFontSize=r.sizeMultiplier,r.style.isTight()&&a.classes.push("mtight");var c=r.getColor();c&&(a.style.color=c)}return a},yl=(e,t)=>{if(bs(e.classes)!==bs(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},vl=function(e){for(var t=0,n=0,r=0,i=0;it&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},xl=function(e,t,n,r){var i=new _s(e,t,n,r);return vl(i),i},wl=(e,t,n,r)=>new _s(e,t,n,r),_l=function(e){var t=new ns(e);return vl(t),t},kl=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Sl={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Cl={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Ml={fontMap:Sl,makeSymbol:bl,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&gl(e,"Main-Bold",t).metrics?bl(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===Os[t][e].font?bl(e,"Main-Regular",t,n,r):bl(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:xl,makeSvgSpan:wl,makeLineSpan:function(e,t,n){var r=xl([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=gs(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var i=new ks(e,t,n,r);return vl(i),i},makeFragment:_l,wrapFragment:function(e,t){return e instanceof ns?xl([],[e],t):e},makeVList:function(e,t){for(var{children:n,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a0)return bl(i,l,r,t,a.concat(c));if(s){var u,h;if("boldsymbol"===s){var d=function(e,t,n,r,i){return"textord"!==i&&gl(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(i,r,0,0,n);u=d.fontName,h=[d.fontClass]}else o?(u=Sl[s].fontName,h=[s]):(u=kl(s,t.fontWeight,t.fontShape),h=[s,t.fontWeight,t.fontShape]);if(gl(i,u,r).metrics)return bl(i,u,r,t,a.concat(h));if(Qs.hasOwnProperty(i)&&"Typewriter"===u.slice(0,10)){for(var p=[],f=0;f{var n=xl(["mspace"],[],t),r=ms(e,t);return n.style.marginRight=gs(r),n},staticSvg:function(e,t){var[n,r,i]=Cl[e],a=new Es(n),o=new Ts([a],{width:gs(r),height:gs(i),style:"width:"+gs(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),s=wl(["overlay"],[o],t);return s.height=i,s.style.height=gs(i),s.style.width=gs(r),s},svgData:Cl,tryCombineChars:e=>{for(var t=0;t{var n=t.classes[0],r=e.classes[0];"mbin"===n&&Io.contains(Hl,r)?t.classes[0]="mord":"mbin"===r&&Io.contains(Fl,n)&&(e.classes[0]="mord")}),{node:u},h,d),Wl(i,((e,t)=>{var n=Gl(t),r=Gl(e),i=n&&r?e.hasClass("mtight")?Pl[n][r]:Nl[n][r]:null;if(i)return Ml.makeGlue(i,l)}),{node:u},h,d),i},Wl=function e(t,n,r,i,a){i&&t.push(i);for(var o=0;on=>{t.splice(e+1,0,n),o++})(o)}}i&&t.pop()},Vl=function(e){return e instanceof ns||e instanceof ks||e instanceof _s&&e.hasClass("enclosing")?e:null},Yl=function e(t,n){var r=Vl(t);if(r){var i=r.children;if(i.length){if("right"===n)return e(i[i.length-1],"right");if("left"===n)return e(i[0],"left")}}return t},Gl=function(e,t){return e?(t&&(e=Yl(e,t)),Ul[e.classes[0]]||null):null},Xl=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Bl(t.concat(n))},Ql=function(e,t,n){if(!e)return Bl();if(Ol[e.type]){var r=Ol[e.type](e,t);if(n&&t.size!==n.size){r=Bl(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new Oo("Got group of unknown type: '"+e.type+"'")};function Kl(e,t){var n=Bl(["base"],e,t),r=Bl(["strut"]);return r.style.height=gs(n.height+n.depth),n.depth&&(r.style.verticalAlign=gs(-n.depth)),n.children.unshift(r),n}function Jl(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,i=ql(e,t,"root");2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var a,o=[],s=[],l=0;l0&&(o.push(Kl(s,t)),s=[]),o.push(i[l]));s.length>0&&o.push(Kl(s,t)),n?((a=Kl(ql(n,t,!0))).classes=["tag"],o.push(a)):r&&o.push(r);var u=Bl(["katex-html"],o);if(u.setAttribute("aria-hidden","true"),a){var h=a.children[0];h.style.height=gs(u.height+u.depth),u.depth&&(h.style.verticalAlign=gs(-u.depth))}return u}function Zl(e){return new ns(e)}class ec{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=bs(this.classes));for(var n=0;n0&&(e+=' class ="'+Io.escape(bs(this.classes))+'"'),e+=">";for(var n=0;n"}toText(){return this.children.map((e=>e.toText())).join("")}}class tc{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Io.escape(this.toText())}toText(){return this.text}}var nc={MathNode:ec,TextNode:tc,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",gs(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},newDocumentFragment:Zl},rc=function(e,t,n){return!Os[t][e]||!Os[t][e].replace||55349===e.charCodeAt(0)||Qs.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=Os[t][e].replace),new nc.TextNode(e)},ic=function(e){return 1===e.length?e[0]:new nc.MathNode("mrow",e)},ac=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathsfit"===n)return"sans-serif-italic";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var i=e.text;return Io.contains(["\\imath","\\jmath"],i)?null:(Os[r][i]&&Os[r][i].replace&&(i=Os[r][i].replace),os(i,Ml.fontMap[n].fontName,r)?Ml.fontMap[n].variant:null)};function oc(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof tc&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var n=e.children[0];return n instanceof tc&&","===n.text}return!1}var sc=function(e,t,n){if(1===e.length){var r=cc(e[0],t);return n&&r instanceof ec&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var i,a=[],o=0;o=1&&("mn"===i.type||oc(i))){var l=s.children[0];l instanceof ec&&"mn"===l.type&&(l.children=[...i.children,...l.children],a.pop())}else if("mi"===i.type&&1===i.children.length){var c=i.children[0];if(c instanceof tc&&"\u0338"===c.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var u=s.children[0];u instanceof tc&&u.text.length>0&&(u.text=u.text.slice(0,1)+"\u0338"+u.text.slice(1),a.pop())}}}a.push(s),i=s}return a},lc=function(e,t,n){return ic(sc(e,t,n))},cc=function(e,t){if(!e)return new nc.MathNode("mrow");if(Rl[e.type])return Rl[e.type](e,t);throw new Oo("Got group of unknown type: '"+e.type+"'")};function uc(e,t,n,r,i){var a,o=sc(e,n);a=1===o.length&&o[0]instanceof ec&&Io.contains(["mrow","mtable"],o[0].type)?o[0]:new nc.MathNode("mrow",o);var s=new nc.MathNode("annotation",[new nc.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var l=new nc.MathNode("semantics",[a,s]),c=new nc.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return Ml.makeSpan([u],[c])}var hc=function(e){return new hs({style:e.displayMode?Qo.DISPLAY:Qo.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},dc=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=Ml.makeSpan(n,[e])}return e},pc={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},fc={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},mc=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=Ml.makeSpan(["stretchy",t],[],i),"fbox"===t){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new As({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new As({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Ts(l,{width:"100%",height:gs(o)});a=Ml.makeSvgSpan([],[c],i)}return a.height=o,a.style.height=gs(o),a},gc=function(e){var t=new nc.MathNode("mo",[new nc.TextNode(pc[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},bc=function(e,t){var{span:n,minWidth:r,height:i}=function(){var n=4e5,r=e.label.slice(1);if(Io.contains(["widehat","widecheck","widetilde","utilde"],r)){var i,a,o,s="ordgroup"===(p=e.base).type?p.body.length:1;if(s>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,o=.42,a=r+"4"):(i=312,n=2340,o=.34,a="tilde4");else{var l=[1,1,2,2,3,3][s];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][l],i=[0,239,300,360,420][l],o=[0,.24,.3,.3,.36,.42][l],a=r+l):(n=[0,600,1033,2339,2340][l],i=[0,260,286,306,312][l],o=[0,.26,.286,.3,.306,.34][l],a="tilde"+l)}var c=new Es(a),u=new Ts([c],{width:"100%",height:gs(o),viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"});return{span:Ml.makeSvgSpan([],[u],t),minWidth:0,height:o}}var h,d,p,f=[],m=fc[r],[g,b,y]=m,v=y/1e3,x=g.length;if(1===x)h=["hide-tail"],d=[m[3]];else if(2===x)h=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");h=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w0&&(n.style.minWidth=gs(r)),n};function yc(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function vc(e){var t=xc(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function xc(e){return e&&("atom"===e.type||zs.hasOwnProperty(e.type))?e:null}var wc=(e,t)=>{var n,r,i;e&&"supsub"===e.type?(n=(r=yc(e.base,"accent")).base,e.base=n,i=function(e){if(e instanceof _s)return e;throw new Error("Expected span but got "+String(e)+".")}(Ql(e,t)),e.base=r):n=(r=yc(e,"accent")).base;var a=Ql(n,t.havingCrampedStyle()),o=0;if(r.isShifty&&Io.isCharacterBox(n)){var s=Io.getBaseElem(n);o=Ns(Ql(s,t.havingCrampedStyle())).skew}var l,c="\\c"===r.label,u=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight);if(r.isStretchy)l=bc(r,t),l=Ml.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+gs(2*o)+")",marginLeft:gs(2*o)}:void 0}]},t);else{var h,d;"\\vec"===r.label?(h=Ml.staticSvg("vec",t),d=Ml.svgData.vec[1]):((h=Ns(h=Ml.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,d=h.width,c&&(u+=h.depth)),l=Ml.makeSpan(["accent-body"],[h]);var p="\\textcircled"===r.label;p&&(l.classes.push("accent-full"),u=a.height);var f=o;p||(f-=d/2),l.style.left=gs(f),"\\textcircled"===r.label&&(l.style.top=".2em"),l=Ml.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-u},{type:"elem",elem:l}]},t)}var m=Ml.makeSpan(["mord","accent"],[l],t);return i?(i.children[0]=m,i.height=Math.max(m.height,i.height),i.classes[0]="mord",i):m},_c=(e,t)=>{var n=e.isStretchy?gc(e.label):new nc.MathNode("mo",[rc(e.label,e.mode)]),r=new nc.MathNode("mover",[cc(e.base,t),n]);return r.setAttribute("accent","true"),r},kc=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));jl({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=Dl(t[0]),r=!kc.test(e.funcName),i=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:wc,mathmlBuilder:_c}),jl({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:wc,mathmlBuilder:_c}),jl({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=Ql(e.base,t),r=bc(e,t),i="\\utilde"===e.label?.12:0,a=Ml.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return Ml.makeSpan(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var n=gc(e.label),r=new nc.MathNode("munder",[cc(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Sc=e=>{var t=new nc.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};jl({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n,r=t.style,i=t.havingStyle(r.sup()),a=Ml.wrapFragment(Ql(e.body,i,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";a.classes.push(o+"-arrow-pad"),e.below&&(i=t.havingStyle(r.sub()),(n=Ml.wrapFragment(Ql(e.below,i,t),t)).classes.push(o+"-arrow-pad"));var s,l=bc(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111;if((a.depth>.25||"\\xleftequilibrium"===e.label)&&(u-=a.depth),n){var h=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;s=Ml.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:h}]},t)}else s=Ml.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:l,shift:c}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),Ml.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var n,r=gc(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var i=Sc(cc(e.body,t));if(e.below){var a=Sc(cc(e.below,t));n=new nc.MathNode("munderover",[r,a,i])}else n=new nc.MathNode("mover",[r,i])}else if(e.below){var o=Sc(cc(e.below,t));n=new nc.MathNode("munder",[r,o])}else n=Sc(),n=new nc.MathNode("mover",[r,n]);return n}});var Cc=Ml.makeSpan;function Mc(e,t){var n=ql(e.body,t,!0);return Cc([e.mclass],n,t)}function Tc(e,t){var n,r=sc(e.body,t);return"minner"===e.mclass?n=new nc.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new nc.MathNode("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new nc.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}jl({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Il(i),isCharacterBox:Io.isCharacterBox(i)}},htmlBuilder:Mc,mathmlBuilder:Tc});var Ec=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};jl({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Ec(t[0]),body:Il(t[1]),isCharacterBox:Io.isCharacterBox(t[1])}}}),jl({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var n,{parser:r,funcName:i}=e,a=t[1],o=t[0];n="\\stackrel"!==i?Ec(a):"mrel";var s={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:Il(a)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===i?null:o,sub:"\\underset"===i?o:null};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:Io.isCharacterBox(l)}},htmlBuilder:Mc,mathmlBuilder:Tc}),jl({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Ec(t[0]),body:Il(t[0])}},htmlBuilder(e,t){var n=ql(e.body,t,!0),r=Ml.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=sc(e.body,t),r=new nc.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Ac={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Nc=e=>"textord"===e.type&&"@"===e.text;function Pc(e,t,n){var r=Ac[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var i={type:"atom",text:r,mode:"math",family:"rel"},a={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[i],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[a],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}jl({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Ml.wrapFragment(Ql(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=gs(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new nc.MathNode("mrow",[cc(e.label,t)]);return(n=new nc.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new nc.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),jl({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Ml.wrapFragment(Ql(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new nc.MathNode("mrow",[cc(e.fragment,t)])}),jl({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=yc(t[0],"ordgroup").body,i="",a=0;a=1114111)throw new Oo("\\@char with invalid code point "+i);return s<=65535?o=String.fromCharCode(s):(s-=65536,o=String.fromCharCode(55296+(s>>10),56320+(1023&s))),{type:"textord",mode:n.mode,text:o}}});var zc=(e,t)=>{var n=ql(e.body,t.withColor(e.color),!1);return Ml.makeFragment(n)},Oc=(e,t)=>{var n=sc(e.body,t.withColor(e.color)),r=new nc.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};jl({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=yc(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:Il(i)}},htmlBuilder:zc,mathmlBuilder:Oc}),jl({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=yc(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var a=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:a}},htmlBuilder:zc,mathmlBuilder:Oc}),jl({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i="["===r.gullet.future().text?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:i&&yc(i,"size").value}},htmlBuilder(e,t){var n=Ml.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=gs(ms(e.size,t)))),n},mathmlBuilder(e,t){var n=new nc.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",gs(ms(e.size,t)))),n}});var Rc={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},jc=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Oo("Expected a control sequence",e);return t},Lc=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);null==i&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};jl({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Rc[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=Rc[r.text]),yc(t.parseFunction(),"internal");throw new Oo("Invalid token after macro prefix",r)}}),jl({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Oo("Expected a control sequence",r);for(var a,o=0,s=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){a=t.gullet.future(),s[o].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Oo('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==o+1)throw new Oo('Argument number "'+r.text+'" out of order');o++,s.push([])}else{if("EOF"===r.text)throw new Oo("Expected a macro definition");s[o].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return a&&l.unshift(a),"\\edef"!==n&&"\\xdef"!==n||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(i,{tokens:l,numArgs:o,delimiters:s},n===Rc[n]),{type:"internal",mode:t.mode}}}),jl({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=jc(t.gullet.popToken());t.gullet.consumeSpaces();var i=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return Lc(t,r,i,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),jl({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=jc(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Lc(t,r,a,"\\\\globalfuture"===n),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var Dc=function(e,t,n){var r=os(Os.math[e]&&Os.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},Ic=function(e,t,n,r){var i=n.havingBaseStyle(t),a=Ml.makeSpan(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},Bc=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=gs(i),e.height-=i,e.depth+=i},Fc=function(e,t,n,r,i,a){var o=function(e,t,n,r){return Ml.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,i,r),s=Ic(Ml.makeSpan(["delimsizing","size"+t],[o],r),Qo.TEXT,r,a);return n&&Bc(s,r,Qo.TEXT),s},Hc=function(e,t,n){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Ml.makeSpan(["delimsizinginner",r],[Ml.makeSpan([],[Ml.makeSymbol(e,t,n)])])}},$c=function(e,t,n){var r=rs["Size4-Regular"][e.charCodeAt(0)]?rs["Size4-Regular"][e.charCodeAt(0)][4]:rs["Size1-Regular"][e.charCodeAt(0)][4],i=new Es("inner",function(e,t){switch(e){case"\u239c":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"\u239f":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23a2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23a5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23aa":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23d0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),a=new Ts([i],{width:gs(r),height:gs(t),style:"width:"+gs(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Ml.makeSvgSpan([],[a],n);return o.height=t,o.style.height=gs(t),o.style.width=gs(r),{type:"elem",elem:o}},Uc={type:"kern",size:-.008},qc=["|","\\lvert","\\rvert","\\vert"],Wc=["\\|","\\lVert","\\rVert","\\Vert"],Vc=function(e,t,n,r,i,a){var o,s,l,c,u="",h=0;o=l=c=e,s=null;var d="Size1-Regular";"\\uparrow"===e?l=c="\u23d0":"\\Uparrow"===e?l=c="\u2016":"\\downarrow"===e?o=l="\u23d0":"\\Downarrow"===e?o=l="\u2016":"\\updownarrow"===e?(o="\\uparrow",l="\u23d0",c="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="\u2016",c="\\Downarrow"):Io.contains(qc,e)?(l="\u2223",u="vert",h=333):Io.contains(Wc,e)?(l="\u2225",u="doublevert",h=556):"["===e||"\\lbrack"===e?(o="\u23a1",l="\u23a2",c="\u23a3",d="Size4-Regular",u="lbrack",h=667):"]"===e||"\\rbrack"===e?(o="\u23a4",l="\u23a5",c="\u23a6",d="Size4-Regular",u="rbrack",h=667):"\\lfloor"===e||"\u230a"===e?(l=o="\u23a2",c="\u23a3",d="Size4-Regular",u="lfloor",h=667):"\\lceil"===e||"\u2308"===e?(o="\u23a1",l=c="\u23a2",d="Size4-Regular",u="lceil",h=667):"\\rfloor"===e||"\u230b"===e?(l=o="\u23a5",c="\u23a6",d="Size4-Regular",u="rfloor",h=667):"\\rceil"===e||"\u2309"===e?(o="\u23a4",l=c="\u23a5",d="Size4-Regular",u="rceil",h=667):"("===e||"\\lparen"===e?(o="\u239b",l="\u239c",c="\u239d",d="Size4-Regular",u="lparen",h=875):")"===e||"\\rparen"===e?(o="\u239e",l="\u239f",c="\u23a0",d="Size4-Regular",u="rparen",h=875):"\\{"===e||"\\lbrace"===e?(o="\u23a7",s="\u23a8",c="\u23a9",l="\u23aa",d="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="\u23ab",s="\u23ac",c="\u23ad",l="\u23aa",d="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(o="\u23a7",c="\u23a9",l="\u23aa",d="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(o="\u23ab",c="\u23ad",l="\u23aa",d="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(o="\u23a7",c="\u23ad",l="\u23aa",d="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(o="\u23ab",c="\u23a9",l="\u23aa",d="Size4-Regular");var p=Dc(o,d,i),f=p.height+p.depth,m=Dc(l,d,i),g=m.height+m.depth,b=Dc(c,d,i),y=b.height+b.depth,v=0,x=1;if(null!==s){var w=Dc(s,d,i);v=w.height+w.depth,x=2}var _=f+y+v,k=_+Math.max(0,Math.ceil((t-_)/(x*g)))*x*g,S=r.fontMetrics().axisHeight;n&&(S*=r.sizeMultiplier);var C=k/2-S,M=[];if(u.length>0){var T=k-f-y,E=Math.round(1e3*k),A=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(u,Math.round(1e3*T)),N=new Es(u,A),P=(h/1e3).toFixed(3)+"em",z=(E/1e3).toFixed(3)+"em",O=new Ts([N],{width:P,height:z,viewBox:"0 0 "+h+" "+E}),R=Ml.makeSvgSpan([],[O],r);R.height=E/1e3,R.style.width=P,R.style.height=z,M.push({type:"elem",elem:R})}else{if(M.push(Hc(c,d,i)),M.push(Uc),null===s){var j=k-f-y+.016;M.push($c(l,j,r))}else{var L=(k-f-y-v)/2+.016;M.push($c(l,L,r)),M.push(Uc),M.push(Hc(s,d,i)),M.push(Uc),M.push($c(l,L,r))}M.push(Uc),M.push(Hc(o,d,i))}var D=r.havingBaseStyle(Qo.TEXT),I=Ml.makeVList({positionType:"bottom",positionData:C,children:M},D);return Ic(Ml.makeSpan(["delimsizing","mult"],[I],D),Qo.TEXT,r,a)},Yc=.08,Gc=function(e,t,n,r,i){var a=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,es);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,es);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,es);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,es);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,es);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,es,n)}return r}(e,r,n),o=new Es(e,a),s=new Ts([o],{width:"400em",height:gs(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Ml.makeSvgSpan(["hide-tail"],[s],i)},Xc=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Qc=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"],Kc=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Jc=[0,1.2,1.8,2.4,3],Zc=[{type:"small",style:Qo.SCRIPTSCRIPT},{type:"small",style:Qo.SCRIPT},{type:"small",style:Qo.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],eu=[{type:"small",style:Qo.SCRIPTSCRIPT},{type:"small",style:Qo.SCRIPT},{type:"small",style:Qo.TEXT},{type:"stack"}],tu=[{type:"small",style:Qo.SCRIPTSCRIPT},{type:"small",style:Qo.SCRIPT},{type:"small",style:Qo.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],nu=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},ru=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);it)return n[i]}return n[n.length-1]},iu=function(e,t,n,r,i,a){var o;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),o=Io.contains(Kc,e)?Zc:Io.contains(Xc,e)?tu:eu;var s=ru(e,t,o,r);return"small"===s.type?function(e,t,n,r,i,a){var o=Ml.makeSymbol(e,"Main-Regular",i,r),s=Ic(o,t,r,a);return n&&Bc(s,r,t),s}(e,s.style,n,r,i,a):"large"===s.type?Fc(e,s.size,n,r,i,a):Vc(e,t,n,r,i,a)},au={sqrtImage:function(e,t){var n,r,i=t.havingBaseSizing(),a=ru("\\surd",e*i.sizeMultiplier,tu,i),o=i.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,c=0,u=0;return"small"===a.type?(e<1?o=1:e<1.4&&(o=.7),c=(1+s)/o,(n=Gc("sqrtMain",l=(1+s+Yc)/o,u=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",r=.833/o):"large"===a.type?(u=1080*Jc[a.size],c=(Jc[a.size]+s)/o,l=(Jc[a.size]+s+Yc)/o,(n=Gc("sqrtSize"+a.size,l,u,s,t)).style.minWidth="1.02em",r=1/o):(l=e+s+Yc,c=e+s,u=Math.floor(1e3*e+s)+80,(n=Gc("sqrtTall",l,u,s,t)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=gs(l),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,n,r,i){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),Io.contains(Xc,e)||Io.contains(Kc,e))return Fc(e,t,!1,n,r,i);if(Io.contains(Qc,e))return Vc(e,Jc[t],!1,n,r,i);throw new Oo("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:Jc,customSizedDelim:iu,leftRightDelim:function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o),c=Math.max(l/500*901,2*l-s);return iu(e,c,!0,r,i,a)}},ou={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},su=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function lu(e,t){var n=xc(e);if(n&&Io.contains(su,n.text))return n;throw new Oo(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function cu(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}jl({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=lu(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:ou[e.funcName].size,mclass:ou[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?Ml.makeSpan([e.mclass]):au.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(rc(e.delim,e.mode));var n=new nc.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=gs(au.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),jl({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!==typeof n)throw new Oo("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:lu(t[0],e).text,color:n}}}),jl({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=lu(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=yc(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{cu(e);for(var n,r,i=ql(e.body,t,!0,["mopen","mclose"]),a=0,o=0,s=!1,l=0;l{cu(e);var n=sc(e.body,t);if("."!==e.left){var r=new nc.MathNode("mo",[rc(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var i=new nc.MathNode("mo",[rc(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return ic(n)}}),jl({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=lu(t[0],e);if(!e.parser.leftrightDepth)throw new Oo("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if("."===e.delim)n=Xl(t,[]);else{n=au.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n="\\vert"===e.delim||"|"===e.delim?rc("|","text"):rc(e.delim,e.mode),r=new nc.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var uu=(e,t)=>{var n,r,i,a=Ml.wrapFragment(Ql(e.body,t),t),o=e.label.slice(1),s=t.sizeMultiplier,l=0,c=Io.isCharacterBox(e.body);if("sout"===o)(n=Ml.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,l=-.5*t.fontMetrics().xHeight;else if("phase"===o){var u=ms({number:.6,unit:"pt"},t),h=ms({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var d=a.height+a.depth+u+h;a.style.paddingLeft=gs(d/2+u);var p=Math.floor(1e3*d*s),f="M400000 "+(r=p)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",m=new Ts([new Es("phase",f)],{width:"400em",height:gs(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});(n=Ml.makeSvgSpan(["hide-tail"],[m],t)).style.height=gs(d),l=a.depth+u+h}else{/cancel/.test(o)?c||a.classes.push("cancel-pad"):"angl"===o?a.classes.push("anglpad"):a.classes.push("boxpad");var g=0,b=0,y=0;/box/.test(o)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=g=t.fontMetrics().fboxsep+("colorbox"===o?0:y)):"angl"===o?(g=4*(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-a.depth)):b=g=c?.2:0,n=mc(a,o,g,b,t),/fbox|boxed|fcolorbox/.test(o)?(n.style.borderStyle="solid",n.style.borderWidth=gs(y)):"angl"===o&&.049!==y&&(n.style.borderTopWidth=gs(y),n.style.borderRightWidth=gs(y)),l=a.depth+b,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)i=Ml.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:l},{type:"elem",elem:a,shift:0}]},t);else{var v=/cancel|phase/.test(o)?["svg-align"]:[];i=Ml.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:n,shift:l,wrapperClasses:v}]},t)}return/cancel/.test(o)&&(i.height=a.height,i.depth=a.depth),/cancel/.test(o)&&!c?Ml.makeSpan(["mord","cancel-lap"],[i],t):Ml.makeSpan(["mord"],[i],t)},hu=(e,t)=>{var n=0,r=new nc.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[cc(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};jl({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,a=yc(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:uu,mathmlBuilder:hu}),jl({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,a=yc(t[0],"color-token").color,o=yc(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:uu,mathmlBuilder:hu}),jl({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),jl({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:uu,mathmlBuilder:hu}),jl({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var du={};function pu(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{if(!e.parser.settings.displayMode)throw new Oo("{"+e.envName+"} can be used only in display mode.")};function yu(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function vu(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:h,leqno:d}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)o=1;else if(!(o=parseFloat(p))||o<0)throw new Oo("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var f=[],m=[f],g=[],b=[],y=null!=l?[]:void 0;function v(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function x(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new zo("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(v(),b.push(gu(e));;){var w=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),w={type:"ordgroup",mode:e.mode,body:w},n&&(w={type:"styling",mode:e.mode,style:n,body:[w]}),f.push(w);var _=e.fetch().text;if("&"===_){if(h&&f.length===h){if(c||s)throw new Oo("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===_){x(),1===f.length&&"styling"===w.type&&0===w.body[0].body.length&&(m.length>1||!u)&&m.pop(),b.length0&&(b+=.25),l.push({pos:b,isDashed:e[t]})}for(y(a[0]),n=0;n0&&(w<(C+=g)&&(w=C),C=0),e.addJot&&(w+=p),_.height=x,_.depth=w,b+=x,_.pos=b,b+=w+C,s[n]=_,y(a[n+1])}var M,T,E=b/2+t.fontMetrics().axisHeight,A=e.cols||[],N=[],P=[];if(e.tags&&e.tags.some((e=>e)))for(n=0;n=o)){var H=void 0;(r>0||e.hskipBeforeAndAfter)&&0!==(H=Io.deflt(L.pregap,h))&&((M=Ml.makeSpan(["arraycolsep"],[])).style.width=gs(H),N.push(M));var $=[];for(n=0;n0){for(var V=Ml.makeLineSpan("hline",t,c),Y=Ml.makeLineSpan("hdashline",t,c),G=[{type:"elem",elem:s,shift:0}];l.length>0;){var X=l.pop(),Q=X.pos-E;X.isDashed?G.push({type:"elem",elem:Y,shift:Q}):G.push({type:"elem",elem:V,shift:Q})}s=Ml.makeVList({positionType:"individualShift",children:G},t)}if(0===P.length)return Ml.makeSpan(["mord"],[s],t);var K=Ml.makeVList({positionType:"individualShift",children:P},t);return K=Ml.makeSpan(["tag"],[K],t),Ml.makeFragment([s,K])},_u={c:"center ",l:"left ",r:"right "},ku=function(e,t){for(var n=[],r=new nc.MathNode("mtd",[],["mtr-glue"]),i=new nc.MathNode("mtd",[],["mml-eqn-num"]),a=0;a0){var p=e.cols,f="",m=!1,g=0,b=p.length;"separator"===p[0].type&&(h+="top ",g=1),"separator"===p[p.length-1].type&&(h+="bottom ",b-=1);for(var y=g;y0?"left ":"",h+=k[k.length-1].length>0?"right ":"";for(var S=1;S-1?"alignat":"align",a="split"===e.envName,o=vu(e.parser,{cols:r,addJot:!0,autoTag:a?void 0:yu(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",u=0;u0&&h&&(f=1),r[d]={type:"align",align:p,pregap:f,postgap:0}}return o.colSeparationType=h?"align":"alignat",o};pu({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=(xc(t[0])?[t[0]]:yc(t[0],"ordgroup").body).map((function(e){var t=vc(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new Oo("Unknown column alignment: "+t,e)})),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return vu(e.parser,r,xu(e.envName))},htmlBuilder:wu,mathmlBuilder:ku}),pu({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,-1==="lcr".indexOf(n))throw new Oo("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var a=vu(e.parser,r,xu(e.envName)),o=Math.max(0,...a.body.map((e=>e.length)));return a.cols=new Array(o).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:wu,mathmlBuilder:ku}),pu({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=vu(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:wu,mathmlBuilder:ku}),pu({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=(xc(t[0])?[t[0]]:yc(t[0],"ordgroup").body).map((function(e){var t=vc(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new Oo("Unknown column alignment: "+t,e)}));if(n.length>1)throw new Oo("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=vu(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new Oo("{subarray} can contain only one column");return r},htmlBuilder:wu,mathmlBuilder:ku}),pu({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=vu(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},xu(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:wu,mathmlBuilder:ku}),pu({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Su,htmlBuilder:wu,mathmlBuilder:ku}),pu({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Io.contains(["gather","gather*"],e.envName)&&bu(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:yu(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return vu(e.parser,t,"display")},htmlBuilder:wu,mathmlBuilder:ku}),pu({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Su,htmlBuilder:wu,mathmlBuilder:ku}),pu({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){bu(e);var t={autoTag:yu(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return vu(e.parser,t,"display")},htmlBuilder:wu,mathmlBuilder:ku}),pu({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(bu(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new Oo("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r,i,a=[],o=[a],s=0;s-1);else{if(!("<>AV".indexOf(h)>-1))throw new Oo('Expected one of "<>AV=|." after @',l[u]);for(var p=0;p<2;p++){for(var f=!0,m=u+1;m{var n=e.font,r=t.withFont(n);return Ql(e.body,r)},Tu=(e,t)=>{var n=e.font,r=t.withFont(n);return cc(e.body,r)},Eu={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};jl({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=Dl(t[0]),a=r;return a in Eu&&(a=Eu[a]),{type:"font",mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:Mu,mathmlBuilder:Tu}),jl({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=Io.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Ec(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}}),jl({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:o}}},htmlBuilder:Mu,mathmlBuilder:Tu});var Au=(e,t)=>{var n=t;return"display"===e?n=n.id>=Qo.SCRIPT.id?n.text():Qo.DISPLAY:"text"===e&&n.size===Qo.DISPLAY.size?n=Qo.TEXT:"script"===e?n=Qo.SCRIPT:"scriptscript"===e&&(n=Qo.SCRIPTSCRIPT),n},Nu=(e,t)=>{var n,r=Au(e.size,t.style),i=r.fracNum(),a=r.fracDen();n=t.havingStyle(i);var o=Ql(e.numer,n,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*h:7*h,f=t.fontMetrics().denom1):(u>0?(d=t.fontMetrics().num2,p=h):(d=t.fontMetrics().num3,p=3*h),f=t.fontMetrics().denom2),c){var x=t.fontMetrics().axisHeight;d-o.depth-(x+.5*u){var n=new nc.MathNode("mfrac",[cc(e.numer,t),cc(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=ms(e.barSize,t);n.setAttribute("linethickness",gs(r))}}else n.setAttribute("linethickness","0px");var i=Au(e.size,t.style);if(i.size!==t.style.size){n=new nc.MathNode("mstyle",[n]);var a=i.size===Qo.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",a),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var s=new nc.MathNode("mo",[new nc.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(n),null!=e.rightDelim){var l=new nc.MathNode("mo",[new nc.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return ic(o)}return n};jl({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var n,{parser:r,funcName:i}=e,a=t[0],o=t[1],s=null,l=null,c="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,s="(",l=")";break;case"\\\\bracefrac":n=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:a,denom:o,hasBarLine:n,leftDelim:s,rightDelim:l,size:c,barSize:null}},htmlBuilder:Nu,mathmlBuilder:Pu}),jl({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),jl({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:n,funcName:r,token:i}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:i}}});var zu=["display","text","script","scriptscript"],Ou=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};jl({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var n,{parser:r}=e,i=t[4],a=t[5],o=Dl(t[0]),s="atom"===o.type&&"open"===o.family?Ou(o.text):null,l=Dl(t[1]),c="atom"===l.type&&"close"===l.family?Ou(l.text):null,u=yc(t[2],"size"),h=null;n=!!u.isBlank||(h=u.value).number>0;var d="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var f=yc(p.body[0],"textord");d=zu[Number(f.text)]}}else p=yc(p,"textord"),d=zu[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:i,denom:a,continued:!1,hasBarLine:n,barSize:h,leftDelim:s,rightDelim:c,size:d}},htmlBuilder:Nu,mathmlBuilder:Pu}),jl({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:yc(t[0],"size").value,token:i}}}),jl({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(yc(t[1],"infix").size),o=t[2],s=a.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Nu,mathmlBuilder:Pu});var Ru=(e,t)=>{var n,r,i=t.style;"supsub"===e.type?(n=e.sup?Ql(e.sup,t.havingStyle(i.sup()),t):Ql(e.sub,t.havingStyle(i.sub()),t),r=yc(e.base,"horizBrace")):r=yc(e,"horizBrace");var a,o=Ql(r.base,t.havingBaseStyle(Qo.DISPLAY)),s=bc(r,t);if(r.isOver?(a=Ml.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(a=Ml.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var l=Ml.makeSpan(["mord",r.isOver?"mover":"munder"],[a],t);a=r.isOver?Ml.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Ml.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ml.makeSpan(["mord",r.isOver?"mover":"munder"],[a],t)};jl({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Ru,mathmlBuilder:(e,t)=>{var n=gc(e.label);return new nc.MathNode(e.isOver?"mover":"munder",[cc(e.base,t),n])}}),jl({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=yc(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:Il(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=ql(e.body,t,!1);return Ml.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=lc(e.body,t);return n instanceof ec||(n=new ec("mrow",[n])),n.setAttribute("href",e.href),n}}),jl({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=yc(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],a=0;anew nc.MathNode("mrow",sc(e.body,t))}),jl({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var n,{parser:r,funcName:i,token:a}=e,o=yc(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(i){case"\\htmlClass":l.class=o,n={command:"\\htmlClass",class:o};break;case"\\htmlId":l.id=o,n={command:"\\htmlId",id:o};break;case"\\htmlStyle":l.style=o,n={command:"\\htmlStyle",style:o};break;case"\\htmlData":for(var c=o.split(","),u=0;u{var n=ql(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=Ml.makeSpan(r,n,t);for(var a in e.attributes)"class"!==a&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>lc(e.body,t)}),jl({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Il(t[0]),mathml:Il(t[1])}},htmlBuilder:(e,t)=>{var n=ql(e.html,t,!1);return Ml.makeFragment(n)},mathmlBuilder:(e,t)=>lc(e.mathml,t)});var ju=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Oo("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!fs(n))throw new Oo("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};jl({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:"em"},a={number:.9,unit:"em"},o={number:0,unit:"em"},s="";if(n[0])for(var l=yc(n[0],"raw").string.split(","),c=0;c{var n=ms(e.height,t),r=0;e.totalheight.number>0&&(r=ms(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=ms(e.width,t));var a={height:gs(n+r)};i>0&&(a.width=gs(i)),r>0&&(a.verticalAlign=gs(-r));var o=new Ss(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new nc.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=ms(e.height,t),i=0;if(e.totalheight.number>0&&(i=ms(e.totalheight,t)-r,n.setAttribute("valign",gs(-i))),n.setAttribute("height",gs(r+i)),e.width.number>0){var a=ms(e.width,t);n.setAttribute("width",gs(a))}return n.setAttribute("src",e.src),n}}),jl({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=yc(t[0],"size");if(n.settings.strict){var a="m"===r[1],o="mu"===i.value.unit;a?(o||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+i.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):o&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder:(e,t)=>Ml.makeGlue(e.dimension,t),mathmlBuilder(e,t){var n=ms(e.dimension,t);return new nc.SpaceNode(n)}}),jl({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;"clap"===e.alignment?(n=Ml.makeSpan([],[Ql(e.body,t)]),n=Ml.makeSpan(["inner"],[n],t)):n=Ml.makeSpan(["inner"],[Ql(e.body,t)]);var r=Ml.makeSpan(["fix"],[]),i=Ml.makeSpan([e.alignment],[n,r],t),a=Ml.makeSpan(["strut"]);return a.style.height=gs(i.height+i.depth),i.depth&&(a.style.verticalAlign=gs(-i.depth)),i.children.unshift(a),i=Ml.makeSpan(["thinbox"],[i],t),Ml.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new nc.MathNode("mpadded",[cc(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),jl({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var a="\\("===n?"\\)":"$",o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:o}}}),jl({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Oo("Mismatched "+e.funcName)}});var Lu=(e,t)=>{switch(t.style.size){case Qo.DISPLAY.size:return e.display;case Qo.TEXT.size:return e.text;case Qo.SCRIPT.size:return e.script;case Qo.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};jl({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Il(t[0]),text:Il(t[1]),script:Il(t[2]),scriptscript:Il(t[3])}},htmlBuilder:(e,t)=>{var n=Lu(e,t),r=ql(n,t,!1);return Ml.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=Lu(e,t);return lc(n,t)}});var Du=(e,t,n,r,i,a,o)=>{e=Ml.makeSpan([],[e]);var s,l,c,u=n&&Io.isCharacterBox(n);if(t){var h=Ql(t,r.havingStyle(i.sup()),r);l={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(n){var d=Ql(n,r.havingStyle(i.sub()),r);s={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}if(l&&s){var p=r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;c=Ml.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:gs(-a)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:gs(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(s){var f=e.height-o;c=Ml.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:gs(-a)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var m=e.depth+o;c=Ml.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:gs(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var g=[c];if(s&&0!==a&&!u){var b=Ml.makeSpan(["mspace"],[],r);b.style.marginRight=gs(a),g.unshift(b)}return Ml.makeSpan(["mop","op-limits"],g,r)},Iu=["\\smallint"],Bu=(e,t)=>{var n,r,i,a=!1;"supsub"===e.type?(n=e.sup,r=e.sub,i=yc(e.base,"op"),a=!0):i=yc(e,"op");var o,s=t.style,l=!1;if(s.size===Qo.DISPLAY.size&&i.symbol&&!Io.contains(Iu,i.name)&&(l=!0),i.symbol){var c=l?"Size2-Regular":"Size1-Regular",u="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(u=i.name.slice(1),i.name="oiint"===u?"\\iint":"\\iiint"),o=Ml.makeSymbol(i.name,c,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),u.length>0){var h=o.italic,d=Ml.staticSvg(u+"Size"+(l?"2":"1"),t);o=Ml.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:d,shift:l?.08:0}]},t),i.name="\\"+u,o.classes.unshift("mop"),o.italic=h}}else if(i.body){var p=ql(i.body,t,!0);1===p.length&&p[0]instanceof Ms?(o=p[0]).classes[0]="mop":o=Ml.makeSpan(["mop"],p,t)}else{for(var f=[],m=1;m{var n;if(e.symbol)n=new ec("mo",[rc(e.name,e.mode)]),Io.contains(Iu,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new ec("mo",sc(e.body,t));else{n=new ec("mi",[new tc(e.name.slice(1))]);var r=new ec("mo",[rc("\u2061","text")]);n=e.parentIsSupSub?new ec("mrow",[n,r]):Zl([n,r])}return n},Hu={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};jl({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return 1===i.length&&(i=Hu[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Bu,mathmlBuilder:Fu}),jl({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Il(r)}},htmlBuilder:Bu,mathmlBuilder:Fu});var $u={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};jl({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Bu,mathmlBuilder:Fu}),jl({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Bu,mathmlBuilder:Fu}),jl({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=$u[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Bu,mathmlBuilder:Fu});var Uu=(e,t)=>{var n,r,i,a,o=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,i=yc(e.base,"operatorname"),o=!0):i=yc(e,"operatorname"),i.body.length>0){for(var s=i.body.map((e=>{var t=e.text;return"string"===typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=ql(s,t.withFont("mathrm"),!0),c=0;c{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:Il(i),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:Uu,mathmlBuilder:(e,t)=>{for(var n=sc(e.body,t.withFont("mathrm")),r=!0,i=0;ie.toText())).join("");n=[new nc.TextNode(s)]}var l=new nc.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new nc.MathNode("mo",[rc("\u2061","text")]);return e.parentIsSupSub?new nc.MathNode("mrow",[l,c]):nc.newDocumentFragment([l,c])}}),mu("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ll({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Ml.makeFragment(ql(e.body,t,!1)):Ml.makeSpan(["mord"],ql(e.body,t,!0),t),mathmlBuilder:(e,t)=>lc(e.body,t,!0)}),jl({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=Ql(e.body,t.havingCrampedStyle()),r=Ml.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,a=Ml.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return Ml.makeSpan(["mord","overline"],[a],t)},mathmlBuilder(e,t){var n=new nc.MathNode("mo",[new nc.TextNode("\u203e")]);n.setAttribute("stretchy","true");var r=new nc.MathNode("mover",[cc(e.body,t),n]);return r.setAttribute("accent","true"),r}}),jl({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Il(r)}},htmlBuilder:(e,t)=>{var n=ql(e.body,t.withPhantom(),!1);return Ml.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=sc(e.body,t);return new nc.MathNode("mphantom",n)}}),jl({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Ml.makeSpan([],[Ql(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=sc(Il(e.body),t),r=new nc.MathNode("mphantom",n),i=new nc.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}}),jl({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Ml.makeSpan(["inner"],[Ql(e.body,t.withPhantom())]),r=Ml.makeSpan(["fix"],[]);return Ml.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=sc(Il(e.body),t),r=new nc.MathNode("mphantom",n),i=new nc.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}}),jl({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=yc(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=Ql(e.body,t),r=ms(e.dy,t);return Ml.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new nc.MathNode("mpadded",[cc(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),jl({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),jl({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],a=yc(t[0],"size"),o=yc(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&yc(i,"size").value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=Ml.makeSpan(["mord","rule"],[],t),r=ms(e.width,t),i=ms(e.height,t),a=e.shift?ms(e.shift,t):0;return n.style.borderRightWidth=gs(r),n.style.borderTopWidth=gs(i),n.style.bottom=gs(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=1.125*i*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=ms(e.width,t),r=ms(e.height,t),i=e.shift?ms(e.shift,t):0,a=t.color&&t.getColor()||"black",o=new nc.MathNode("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",gs(n)),o.setAttribute("height",gs(r));var s=new nc.MathNode("mpadded",[o]);return i>=0?s.setAttribute("height",gs(i)):(s.setAttribute("height",gs(i)),s.setAttribute("depth",gs(-i))),s.setAttribute("voffset",gs(i)),s}});var Wu=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];jl({type:"sizing",names:Wu,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:Wu.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return qu(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=sc(e.body,n),i=new nc.MathNode("mstyle",r);return i.setAttribute("mathsize",gs(n.sizeMultiplier)),i}}),jl({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&yc(n[0],"ordgroup");if(o)for(var s="",l=0;l{var n=Ml.makeSpan([],[Ql(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r{var n=new nc.MathNode("mpadded",[cc(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),jl({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:"sqrt",mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=Ql(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=Ml.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.idn.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var h=s.height-n.height-a-l;n.style.paddingLeft=gs(c);var d=Ml.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+h)},{type:"elem",elem:s},{type:"kern",size:l}]},t);if(e.index){var p=t.havingStyle(Qo.SCRIPTSCRIPT),f=Ql(e.index,p,t),m=.6*(d.height-d.depth),g=Ml.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:f}]},t),b=Ml.makeSpan(["root"],[g]);return Ml.makeSpan(["mord","sqrt"],[b,d],t)}return Ml.makeSpan(["mord","sqrt"],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new nc.MathNode("mroot",[cc(n,t),cc(r,t)]):new nc.MathNode("msqrt",[cc(n,t)])}});var Vu={display:Qo.DISPLAY,text:Qo.TEXT,script:Qo.SCRIPT,scriptscript:Qo.SCRIPTSCRIPT};jl({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=Vu[e.style],r=t.havingStyle(n).withFont("");return qu(e.body,r,t)},mathmlBuilder(e,t){var n=Vu[e.style],r=t.havingStyle(n),i=sc(e.body,r),a=new nc.MathNode("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});Ll({type:"supsub",htmlBuilder(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===Qo.DISPLAY.size||n.alwaysHandleSupSub)?Bu:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===Qo.DISPLAY.size||n.limits)?Uu:null:"accent"===n.type?Io.isCharacterBox(n.base)?wc:null:"horizBrace"===n.type&&!e.sub===n.isOver?Ru:null:null}(e,t);if(n)return n(e,t);var r,i,a,{base:o,sup:s,sub:l}=e,c=Ql(o,t),u=t.fontMetrics(),h=0,d=0,p=o&&Io.isCharacterBox(o);if(s){var f=t.havingStyle(t.style.sup());r=Ql(s,f,t),p||(h=c.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(l){var m=t.havingStyle(t.style.sub());i=Ql(l,m,t),p||(d=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}a=t.style===Qo.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2;var g,b=t.sizeMultiplier,y=gs(.5/u.ptPerEm/b),v=null;if(i){var x=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof Ms||x)&&(v=gs(-c.italic))}if(r&&i){h=Math.max(h,a,r.depth+.25*u.xHeight),d=Math.max(d,u.sub2);var w=4*u.defaultRuleThickness;if(h-r.depth-(i.height-d)0&&(h+=_,d-=_)}var k=[{type:"elem",elem:i,shift:d,marginRight:y,marginLeft:v},{type:"elem",elem:r,shift:-h,marginRight:y}];g=Ml.makeVList({positionType:"individualShift",children:k},t)}else if(i){d=Math.max(d,u.sub1,i.height-.8*u.xHeight);var S=[{type:"elem",elem:i,marginLeft:v,marginRight:y}];g=Ml.makeVList({positionType:"shift",positionData:d,children:S},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,a,r.depth+.25*u.xHeight),g=Ml.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:y}]},t)}var C=Gl(c,"right")||"mord";return Ml.makeSpan([C],[c,Ml.makeSpan(["msupsub"],[g])],t)},mathmlBuilder(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var i,a=[cc(e.base,t)];if(e.sub&&a.push(cc(e.sub,t)),e.sup&&a.push(cc(e.sup,t)),r)i=n?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;i=o&&"op"===o.type&&o.limits&&t.style===Qo.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===Qo.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;i=s&&"op"===s.type&&s.limits&&(t.style===Qo.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===Qo.DISPLAY)?"munder":"msub"}else{var l=e.base;i=l&&"op"===l.type&&l.limits&&(t.style===Qo.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===Qo.DISPLAY)?"mover":"msup"}return new nc.MathNode(i,a)}}),Ll({type:"atom",htmlBuilder:(e,t)=>Ml.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var n=new nc.MathNode("mo",[rc(e.text,e.mode)]);if("bin"===e.family){var r=ac(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var Yu={mi:"italic",mn:"normal",mtext:"normal"};Ll({type:"mathord",htmlBuilder:(e,t)=>Ml.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var n=new nc.MathNode("mi",[rc(e.text,e.mode,t)]),r=ac(e,t)||"italic";return r!==Yu[n.type]&&n.setAttribute("mathvariant",r),n}}),Ll({type:"textord",htmlBuilder:(e,t)=>Ml.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var n,r=rc(e.text,e.mode,t),i=ac(e,t)||"normal";return n="text"===e.mode?new nc.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new nc.MathNode("mn",[r]):"\\prime"===e.text?new nc.MathNode("mo",[r]):new nc.MathNode("mi",[r]),i!==Yu[n.type]&&n.setAttribute("mathvariant",i),n}});var Gu={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Xu={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ll({type:"spacing",htmlBuilder(e,t){if(Xu.hasOwnProperty(e.text)){var n=Xu[e.text].className||"";if("text"===e.mode){var r=Ml.makeOrd(e,t,"textord");return r.classes.push(n),r}return Ml.makeSpan(["mspace",n],[Ml.mathsym(e.text,e.mode,t)],t)}if(Gu.hasOwnProperty(e.text))return Ml.makeSpan(["mspace",Gu[e.text]],[],t);throw new Oo('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!Xu.hasOwnProperty(e.text)){if(Gu.hasOwnProperty(e.text))return new nc.MathNode("mspace");throw new Oo('Unknown type of space "'+e.text+'"')}return new nc.MathNode("mtext",[new nc.TextNode("\xa0")])}});var Qu=()=>{var e=new nc.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Ll({type:"tag",mathmlBuilder(e,t){var n=new nc.MathNode("mtable",[new nc.MathNode("mtr",[Qu(),new nc.MathNode("mtd",[lc(e.body,t)]),Qu(),new nc.MathNode("mtd",[lc(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var Ku={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ju={"\\textbf":"textbf","\\textmd":"textmd"},Zu={"\\textit":"textit","\\textup":"textup"},eh=(e,t)=>{var n=e.font;return n?Ku[n]?t.withTextFontFamily(Ku[n]):Ju[n]?t.withTextFontWeight(Ju[n]):"\\emph"===n?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Zu[n]):t};jl({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"text",mode:n.mode,body:Il(i),font:r}},htmlBuilder(e,t){var n=eh(e,t),r=ql(e.body,n,!0);return Ml.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=eh(e,t);return lc(e.body,n)}}),jl({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Ql(e.body,t),r=Ml.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=Ml.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t);return Ml.makeSpan(["mord","underline"],[a],t)},mathmlBuilder(e,t){var n=new nc.MathNode("mo",[new nc.TextNode("\u203e")]);n.setAttribute("stretchy","true");var r=new nc.MathNode("munder",[cc(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),jl({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Ql(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return Ml.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:(e,t)=>new nc.MathNode("mpadded",[cc(e.body,t)],["vcenter"])}),jl({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Oo("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=th(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"\u2423":"\xa0"),nh=zl,rh="[ \r\n\t]",ih="(\\\\[a-zA-Z@]+)"+rh+"*",ah="[\u0300-\u036f]",oh=new RegExp(ah+"+$"),sh="("+rh+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]"+ah+"*|[\ud800-\udbff][\udc00-\udfff]"+ah+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+ih+"|\\\\[^\ud800-\udfff])";class lh{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(sh,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new zo("EOF",new Po(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new Oo("Unexpected character: '"+e[t]+"'",new zo(e[t],new Po(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var i=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new zo(r,new Po(this,t,this.tokenRegex.lastIndex))}}class ch{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new Oo("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var uh=fu;mu("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),mu("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),mu("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),mu("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),mu("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),mu("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),mu("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var hh={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};mu("\\char",(function(e){var t,n=e.popToken(),r="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new Oo("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(null==(r=hh[n.text])||r>=t)throw new Oo("Invalid base-"+t+" digit "+n.text);for(var i;null!=(i=hh[e.future().text])&&i{var i=e.consumeArg().tokens;if(1!==i.length)throw new Oo("\\newcommand's first argument must be a macro name");var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new Oo("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!o&&!n)throw new Oo("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var s=0;if(1===(i=e.consumeArg().tokens).length&&"["===i[0].text){for(var l="",c=e.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Oo("Invalid number of arguments: "+l);s=parseInt(l),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),""};mu("\\newcommand",(e=>dh(e,!1,!0,!1))),mu("\\renewcommand",(e=>dh(e,!0,!1,!1))),mu("\\providecommand",(e=>dh(e,!0,!0,!0))),mu("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),mu("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),mu("\\show",(e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),nh[n],Os.math[n],Os.text[n]),""})),mu("\\bgroup","{"),mu("\\egroup","}"),mu("~","\\nobreakspace"),mu("\\lq","`"),mu("\\rq","'"),mu("\\aa","\\r a"),mu("\\AA","\\r A"),mu("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),mu("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),mu("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),mu("\u212c","\\mathscr{B}"),mu("\u2130","\\mathscr{E}"),mu("\u2131","\\mathscr{F}"),mu("\u210b","\\mathscr{H}"),mu("\u2110","\\mathscr{I}"),mu("\u2112","\\mathscr{L}"),mu("\u2133","\\mathscr{M}"),mu("\u211b","\\mathscr{R}"),mu("\u212d","\\mathfrak{C}"),mu("\u210c","\\mathfrak{H}"),mu("\u2128","\\mathfrak{Z}"),mu("\\Bbbk","\\Bbb{k}"),mu("\xb7","\\cdotp"),mu("\\llap","\\mathllap{\\textrm{#1}}"),mu("\\rlap","\\mathrlap{\\textrm{#1}}"),mu("\\clap","\\mathclap{\\textrm{#1}}"),mu("\\mathstrut","\\vphantom{(}"),mu("\\underbar","\\underline{\\text{#1}}"),mu("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),mu("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),mu("\\ne","\\neq"),mu("\u2260","\\neq"),mu("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),mu("\u2209","\\notin"),mu("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),mu("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),mu("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),mu("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),mu("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),mu("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),mu("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),mu("\u27c2","\\perp"),mu("\u203c","\\mathclose{!\\mkern-0.8mu!}"),mu("\u220c","\\notni"),mu("\u231c","\\ulcorner"),mu("\u231d","\\urcorner"),mu("\u231e","\\llcorner"),mu("\u231f","\\lrcorner"),mu("\xa9","\\copyright"),mu("\xae","\\textregistered"),mu("\ufe0f","\\textregistered"),mu("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),mu("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),mu("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),mu("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),mu("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),mu("\u22ee","\\vdots"),mu("\\varGamma","\\mathit{\\Gamma}"),mu("\\varDelta","\\mathit{\\Delta}"),mu("\\varTheta","\\mathit{\\Theta}"),mu("\\varLambda","\\mathit{\\Lambda}"),mu("\\varXi","\\mathit{\\Xi}"),mu("\\varPi","\\mathit{\\Pi}"),mu("\\varSigma","\\mathit{\\Sigma}"),mu("\\varUpsilon","\\mathit{\\Upsilon}"),mu("\\varPhi","\\mathit{\\Phi}"),mu("\\varPsi","\\mathit{\\Psi}"),mu("\\varOmega","\\mathit{\\Omega}"),mu("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),mu("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),mu("\\boxed","\\fbox{$\\displaystyle{#1}$}"),mu("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),mu("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),mu("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),mu("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),mu("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var ph={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};mu("\\dots",(function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in ph?t=ph[n]:("\\not"===n.slice(0,4)||n in Os.math&&Io.contains(["bin","rel"],Os.math[n].group))&&(t="\\dotsb"),t}));var fh={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};mu("\\dotso",(function(e){return e.future().text in fh?"\\ldots\\,":"\\ldots"})),mu("\\dotsc",(function(e){var t=e.future().text;return t in fh&&","!==t?"\\ldots\\,":"\\ldots"})),mu("\\cdots",(function(e){return e.future().text in fh?"\\@cdots\\,":"\\@cdots"})),mu("\\dotsb","\\cdots"),mu("\\dotsm","\\cdots"),mu("\\dotsi","\\!\\cdots"),mu("\\dotsx","\\ldots\\,"),mu("\\DOTSI","\\relax"),mu("\\DOTSB","\\relax"),mu("\\DOTSX","\\relax"),mu("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),mu("\\,","\\tmspace+{3mu}{.1667em}"),mu("\\thinspace","\\,"),mu("\\>","\\mskip{4mu}"),mu("\\:","\\tmspace+{4mu}{.2222em}"),mu("\\medspace","\\:"),mu("\\;","\\tmspace+{5mu}{.2777em}"),mu("\\thickspace","\\;"),mu("\\!","\\tmspace-{3mu}{.1667em}"),mu("\\negthinspace","\\!"),mu("\\negmedspace","\\tmspace-{4mu}{.2222em}"),mu("\\negthickspace","\\tmspace-{5mu}{.277em}"),mu("\\enspace","\\kern.5em "),mu("\\enskip","\\hskip.5em\\relax"),mu("\\quad","\\hskip1em\\relax"),mu("\\qquad","\\hskip2em\\relax"),mu("\\tag","\\@ifstar\\tag@literal\\tag@paren"),mu("\\tag@paren","\\tag@literal{({#1})}"),mu("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new Oo("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),mu("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),mu("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),mu("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),mu("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),mu("\\newline","\\\\\\relax"),mu("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var mh=gs(rs["Main-Regular"]["T".charCodeAt(0)][1]-.7*rs["Main-Regular"]["A".charCodeAt(0)][1]);mu("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+mh+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),mu("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+mh+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),mu("\\hspace","\\@ifstar\\@hspacer\\@hspace"),mu("\\@hspace","\\hskip #1\\relax"),mu("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),mu("\\ordinarycolon",":"),mu("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),mu("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),mu("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),mu("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),mu("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),mu("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),mu("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),mu("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),mu("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),mu("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),mu("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),mu("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),mu("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),mu("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),mu("\u2237","\\dblcolon"),mu("\u2239","\\eqcolon"),mu("\u2254","\\coloneqq"),mu("\u2255","\\eqqcolon"),mu("\u2a74","\\Coloneqq"),mu("\\ratio","\\vcentcolon"),mu("\\coloncolon","\\dblcolon"),mu("\\colonequals","\\coloneqq"),mu("\\coloncolonequals","\\Coloneqq"),mu("\\equalscolon","\\eqqcolon"),mu("\\equalscoloncolon","\\Eqqcolon"),mu("\\colonminus","\\coloneq"),mu("\\coloncolonminus","\\Coloneq"),mu("\\minuscolon","\\eqcolon"),mu("\\minuscoloncolon","\\Eqcolon"),mu("\\coloncolonapprox","\\Colonapprox"),mu("\\coloncolonsim","\\Colonsim"),mu("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),mu("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),mu("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),mu("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),mu("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),mu("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),mu("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),mu("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),mu("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),mu("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),mu("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),mu("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),mu("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),mu("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),mu("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),mu("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),mu("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),mu("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),mu("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),mu("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),mu("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),mu("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),mu("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),mu("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),mu("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),mu("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),mu("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),mu("\\imath","\\html@mathml{\\@imath}{\u0131}"),mu("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),mu("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),mu("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),mu("\u27e6","\\llbracket"),mu("\u27e7","\\rrbracket"),mu("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),mu("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),mu("\u2983","\\lBrace"),mu("\u2984","\\rBrace"),mu("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),mu("\u29b5","\\minuso"),mu("\\darr","\\downarrow"),mu("\\dArr","\\Downarrow"),mu("\\Darr","\\Downarrow"),mu("\\lang","\\langle"),mu("\\rang","\\rangle"),mu("\\uarr","\\uparrow"),mu("\\uArr","\\Uparrow"),mu("\\Uarr","\\Uparrow"),mu("\\N","\\mathbb{N}"),mu("\\R","\\mathbb{R}"),mu("\\Z","\\mathbb{Z}"),mu("\\alef","\\aleph"),mu("\\alefsym","\\aleph"),mu("\\Alpha","\\mathrm{A}"),mu("\\Beta","\\mathrm{B}"),mu("\\bull","\\bullet"),mu("\\Chi","\\mathrm{X}"),mu("\\clubs","\\clubsuit"),mu("\\cnums","\\mathbb{C}"),mu("\\Complex","\\mathbb{C}"),mu("\\Dagger","\\ddagger"),mu("\\diamonds","\\diamondsuit"),mu("\\empty","\\emptyset"),mu("\\Epsilon","\\mathrm{E}"),mu("\\Eta","\\mathrm{H}"),mu("\\exist","\\exists"),mu("\\harr","\\leftrightarrow"),mu("\\hArr","\\Leftrightarrow"),mu("\\Harr","\\Leftrightarrow"),mu("\\hearts","\\heartsuit"),mu("\\image","\\Im"),mu("\\infin","\\infty"),mu("\\Iota","\\mathrm{I}"),mu("\\isin","\\in"),mu("\\Kappa","\\mathrm{K}"),mu("\\larr","\\leftarrow"),mu("\\lArr","\\Leftarrow"),mu("\\Larr","\\Leftarrow"),mu("\\lrarr","\\leftrightarrow"),mu("\\lrArr","\\Leftrightarrow"),mu("\\Lrarr","\\Leftrightarrow"),mu("\\Mu","\\mathrm{M}"),mu("\\natnums","\\mathbb{N}"),mu("\\Nu","\\mathrm{N}"),mu("\\Omicron","\\mathrm{O}"),mu("\\plusmn","\\pm"),mu("\\rarr","\\rightarrow"),mu("\\rArr","\\Rightarrow"),mu("\\Rarr","\\Rightarrow"),mu("\\real","\\Re"),mu("\\reals","\\mathbb{R}"),mu("\\Reals","\\mathbb{R}"),mu("\\Rho","\\mathrm{P}"),mu("\\sdot","\\cdot"),mu("\\sect","\\S"),mu("\\spades","\\spadesuit"),mu("\\sub","\\subset"),mu("\\sube","\\subseteq"),mu("\\supe","\\supseteq"),mu("\\Tau","\\mathrm{T}"),mu("\\thetasym","\\vartheta"),mu("\\weierp","\\wp"),mu("\\Zeta","\\mathrm{Z}"),mu("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),mu("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),mu("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),mu("\\bra","\\mathinner{\\langle{#1}|}"),mu("\\ket","\\mathinner{|{#1}\\rangle}"),mu("\\braket","\\mathinner{\\langle{#1}\\rangle}"),mu("\\Bra","\\left\\langle#1\\right|"),mu("\\Ket","\\left|#1\\right\\rangle");var gh=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set("|",o),i.length&&n.macros.set("\\|",s));var a=t;!t&&i.length&&("|"===n.future().text&&(n.popToken(),a=!0));return{tokens:a?i:r,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([...a,...c,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};mu("\\bra@ket",gh(!1)),mu("\\bra@set",gh(!0)),mu("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),mu("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),mu("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),mu("\\angln","{\\angl n}"),mu("\\blue","\\textcolor{##6495ed}{#1}"),mu("\\orange","\\textcolor{##ffa500}{#1}"),mu("\\pink","\\textcolor{##ff00af}{#1}"),mu("\\red","\\textcolor{##df0030}{#1}"),mu("\\green","\\textcolor{##28ae7b}{#1}"),mu("\\gray","\\textcolor{gray}{#1}"),mu("\\purple","\\textcolor{##9d38bd}{#1}"),mu("\\blueA","\\textcolor{##ccfaff}{#1}"),mu("\\blueB","\\textcolor{##80f6ff}{#1}"),mu("\\blueC","\\textcolor{##63d9ea}{#1}"),mu("\\blueD","\\textcolor{##11accd}{#1}"),mu("\\blueE","\\textcolor{##0c7f99}{#1}"),mu("\\tealA","\\textcolor{##94fff5}{#1}"),mu("\\tealB","\\textcolor{##26edd5}{#1}"),mu("\\tealC","\\textcolor{##01d1c1}{#1}"),mu("\\tealD","\\textcolor{##01a995}{#1}"),mu("\\tealE","\\textcolor{##208170}{#1}"),mu("\\greenA","\\textcolor{##b6ffb0}{#1}"),mu("\\greenB","\\textcolor{##8af281}{#1}"),mu("\\greenC","\\textcolor{##74cf70}{#1}"),mu("\\greenD","\\textcolor{##1fab54}{#1}"),mu("\\greenE","\\textcolor{##0d923f}{#1}"),mu("\\goldA","\\textcolor{##ffd0a9}{#1}"),mu("\\goldB","\\textcolor{##ffbb71}{#1}"),mu("\\goldC","\\textcolor{##ff9c39}{#1}"),mu("\\goldD","\\textcolor{##e07d10}{#1}"),mu("\\goldE","\\textcolor{##a75a05}{#1}"),mu("\\redA","\\textcolor{##fca9a9}{#1}"),mu("\\redB","\\textcolor{##ff8482}{#1}"),mu("\\redC","\\textcolor{##f9685d}{#1}"),mu("\\redD","\\textcolor{##e84d39}{#1}"),mu("\\redE","\\textcolor{##bc2612}{#1}"),mu("\\maroonA","\\textcolor{##ffbde0}{#1}"),mu("\\maroonB","\\textcolor{##ff92c6}{#1}"),mu("\\maroonC","\\textcolor{##ed5fa6}{#1}"),mu("\\maroonD","\\textcolor{##ca337c}{#1}"),mu("\\maroonE","\\textcolor{##9e034e}{#1}"),mu("\\purpleA","\\textcolor{##ddd7ff}{#1}"),mu("\\purpleB","\\textcolor{##c6b9fc}{#1}"),mu("\\purpleC","\\textcolor{##aa87ff}{#1}"),mu("\\purpleD","\\textcolor{##7854ab}{#1}"),mu("\\purpleE","\\textcolor{##543b78}{#1}"),mu("\\mintA","\\textcolor{##f5f9e8}{#1}"),mu("\\mintB","\\textcolor{##edf2df}{#1}"),mu("\\mintC","\\textcolor{##e0e5cc}{#1}"),mu("\\grayA","\\textcolor{##f6f7f7}{#1}"),mu("\\grayB","\\textcolor{##f0f1f2}{#1}"),mu("\\grayC","\\textcolor{##e3e5e6}{#1}"),mu("\\grayD","\\textcolor{##d6d8da}{#1}"),mu("\\grayE","\\textcolor{##babec2}{#1}"),mu("\\grayF","\\textcolor{##888d93}{#1}"),mu("\\grayG","\\textcolor{##626569}{#1}"),mu("\\grayH","\\textcolor{##3b3e40}{#1}"),mu("\\grayI","\\textcolor{##21242c}{#1}"),mu("\\kaBlue","\\textcolor{##314453}{#1}"),mu("\\kaGreen","\\textcolor{##71B307}{#1}");var bh={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class yh{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new ch(uh,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new lh(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:n}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new zo("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r,i=this.future(),a=0,o=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++a;else if("}"===r.text){if(-1===--a)throw new Oo("Extra }",r)}else if("EOF"===r.text)throw new Oo("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",r);if(e&&n)if((0===a||1===a&&"{"===e[o])&&r.text===e[o]){if(++o===e.length){t.splice(-o,o);break}}else o=0}while(0!==a||n);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Oo("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;rthis.settings.maxExpand)throw new Oo("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new Oo("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var o=(i=i.slice()).length-1;o>=0;--o){var s=i[o];if("#"===s.text){if(0===o)throw new Oo("Incomplete placeholder at end of macro body",s);if("#"===(s=i[--o]).text)i.splice(o+1,1);else{if(!/^[1-9]$/.test(s.text))throw new Oo("Not a valid argument number",s);i.splice(o,2,...a[+s.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new zo(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"===typeof t?t(this):t;if("string"===typeof r){var i=0;if(-1!==r.indexOf("#"))for(var a=r.replace(/##/g,"");-1!==a.indexOf("#"+(i+1));)++i;for(var o=new lh(r,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||nh.hasOwnProperty(e)||Os.math.hasOwnProperty(e)||Os.text.hasOwnProperty(e)||bh.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"===typeof t||"function"===typeof t||!t.unexpandable:nh.hasOwnProperty(e)&&!nh[e].primitive}}var vh=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,xh=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),wh={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},_h={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"};class kh{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new yh(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new Oo("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new zo("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==kh.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&nh[r.text]&&nh[r.text].infix)break;var i=this.parseAtom(t);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t,n=-1,r=0;r=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var o,s=Os[this.mode][t].group,l=Po.range(e);if(Ps.hasOwnProperty(s)){var c=s;o={type:"atom",mode:this.mode,family:c,loc:l,text:t}}else o={type:s,mode:this.mode,loc:l,text:t};i=o}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(Zo(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:Po.range(e),text:t}}if(this.consume(),a)for(var u=0;u{if("math"===t||"katex"===t)try{return Th(e,{displayMode:!0,throwOnError:!1})}catch(n){console.error(n)}return`

    ${e}
    `},ga.use({renderer:Eh,breaks:!0});const Ah="HomeworkHistory_historyWrapper__3tBQT",Nh="HomeworkHistory_headerRow__lpdFe",Ph="HomeworkHistory_heading__WRxrC",zh="HomeworkHistory_newBtn__Lkrz+",Oh="HomeworkHistory_cards__YUK-j",Rh="HomeworkHistory_card__bC+JV",jh="HomeworkHistory_cardHeader__9B5Qw",Lh="HomeworkHistory_title__ESkLE",Dh="HomeworkHistory_date__m6lgX",Ih="HomeworkHistory_status__Wh8rM",Bh="HomeworkHistory_emptyMsg__O0Is6";function Fh(){const[e,t]=(0,r.useState)([]),n="https://api.racine-ai.com",i=B(),a=()=>fetch(`${n}/search/homework/history`,{credentials:"include"}).then((e=>e.json())).then(t).catch((e=>console.error("Fetch homework history:",e)));(0,r.useEffect)((()=>{a();const e=setInterval(a,3e4);return()=>clearInterval(e)}),[n]);const o=e=>"ready"===e?"#4caf50":"processing"===e?"#ffb300":"#e53935";return(0,xn.jsxs)("div",{className:Ah,children:[(0,xn.jsxs)("div",{className:Nh,children:[(0,xn.jsx)("h2",{className:Ph,children:"Past Homework"}),(0,xn.jsx)("button",{className:zh,onClick:()=>i("/upload-image?type=homework"),children:"+\xa0New Homework"})]}),(0,xn.jsxs)("div",{className:Oh,children:[e.map((e=>{return(0,xn.jsxs)("div",{className:Rh,style:{borderLeft:`4px solid ${o(e.status)}`},onClick:()=>{"ready"===e.status&&i("/homework/practice?"+new URLSearchParams({homework_id:e.homework_id}))},role:"button",tabIndex:0,children:[(0,xn.jsxs)("div",{className:jh,children:[(0,xn.jsx)("div",{className:Lh,children:e.title}),(0,xn.jsx)("div",{className:Dh,children:(t=e.created_at,new Date(1e3*t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}))})]}),(0,xn.jsx)("div",{className:Ih,style:{backgroundColor:o(e.status)},children:"ready"===e.status?"Ready":"processing"===e.status?"Processing\u2026":"Error"})]},e.homework_id);var t})),0===e.length&&(0,xn.jsx)("p",{className:Bh,children:"No past homework found."})]})]})}const{entries:Hh,setPrototypeOf:$h,isFrozen:Uh,getPrototypeOf:qh,getOwnPropertyDescriptor:Wh}=Object;let{freeze:Vh,seal:Yh,create:Gh}=Object,{apply:Xh,construct:Qh}="undefined"!==typeof Reflect&&Reflect;Vh||(Vh=function(e){return e}),Yh||(Yh=function(e){return e}),Xh||(Xh=function(e,t,n){return e.apply(t,n)}),Qh||(Qh=function(e,t){return new e(...t)});const Kh=dd(Array.prototype.forEach),Jh=dd(Array.prototype.lastIndexOf),Zh=dd(Array.prototype.pop),ed=dd(Array.prototype.push),td=dd(Array.prototype.splice),nd=dd(String.prototype.toLowerCase),rd=dd(String.prototype.toString),id=dd(String.prototype.match),ad=dd(String.prototype.replace),od=dd(String.prototype.indexOf),sd=dd(String.prototype.trim),ld=dd(Object.prototype.hasOwnProperty),cd=dd(RegExp.prototype.test),ud=(hd=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:nd;$h&&$h(e,null);let r=t.length;for(;r--;){let i=t[r];if("string"===typeof i){const e=n(i);e!==i&&(Uh(t)||(t[r]=e),i=e)}e[i]=!0}return e}function fd(e){for(let t=0;t/gm),Nd=Yh(/\$\{[\w\W]*/gm),Pd=Yh(/^data-[\-\w.\u00B7-\uFFFF]+$/),zd=Yh(/^aria-[\-\w]+$/),Od=Yh(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Rd=Yh(/^(?:\w+script|data):/i),jd=Yh(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ld=Yh(/^html$/i),Dd=Yh(/^[a-z][.\w]*(-[.\w]+)+$/i);var Id=Object.freeze({__proto__:null,ARIA_ATTR:zd,ATTR_WHITESPACE:jd,CUSTOM_ELEMENT:Dd,DATA_ATTR:Pd,DOCTYPE_NAME:Ld,ERB_EXPR:Ad,IS_ALLOWED_URI:Od,IS_SCRIPT_OR_DATA:Rd,MUSTACHE_EXPR:Ed,TMPLIT_EXPR:Nd});const Bd=1,Fd=3,Hd=7,$d=8,Ud=9,qd=function(){return"undefined"===typeof window?null:window};var Wd,Vd=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qd();const n=t=>e(t);if(n.version="3.2.4",n.removed=[],!t||!t.document||t.document.nodeType!==Ud||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const i=r,a=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:f}=t,m=c.prototype,g=gd(m,"cloneNode"),b=gd(m,"remove"),y=gd(m,"nextSibling"),v=gd(m,"childNodes"),x=gd(m,"parentNode");if("function"===typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let w,_="";const{implementation:k,createNodeIterator:S,createDocumentFragment:C,getElementsByTagName:M}=r,{importNode:T}=i;let E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"===typeof Hh&&"function"===typeof x&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:N,TMPLIT_EXPR:P,DATA_ATTR:z,ARIA_ATTR:O,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:j,CUSTOM_ELEMENT:L}=Id;let{IS_ALLOWED_URI:D}=Id,I=null;const B=pd({},[...bd,...yd,...vd,...wd,...kd]);let F=null;const H=pd({},[...Sd,...Cd,...Md,...Td]);let $=Object.seal(Gh(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),U=null,q=null,W=!0,V=!0,Y=!1,G=!0,X=!1,Q=!0,K=!1,J=!1,Z=!1,ee=!1,te=!1,ne=!1,re=!0,ie=!1,ae=!0,oe=!1,se={},le=null;const ce=pd({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const he=pd({},["audio","video","img","source","image","track"]);let de=null;const pe=pd({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let be=ge,ye=!1,ve=null;const xe=pd({},[fe,me,ge],rd);let we=pd({},["mi","mo","mn","ms","mtext"]),_e=pd({},["annotation-xml"]);const ke=pd({},["title","style","font","a","script"]);let Se=null;const Ce=["application/xhtml+xml","text/html"];let Me=null,Te=null;const Ee=r.createElement("form"),Ae=function(e){return e instanceof RegExp||e instanceof Function},Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Te||Te!==e){if(e&&"object"===typeof e||(e={}),e=md(e),Se=-1===Ce.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Me="application/xhtml+xml"===Se?rd:nd,I=ld(e,"ALLOWED_TAGS")?pd({},e.ALLOWED_TAGS,Me):B,F=ld(e,"ALLOWED_ATTR")?pd({},e.ALLOWED_ATTR,Me):H,ve=ld(e,"ALLOWED_NAMESPACES")?pd({},e.ALLOWED_NAMESPACES,rd):xe,de=ld(e,"ADD_URI_SAFE_ATTR")?pd(md(pe),e.ADD_URI_SAFE_ATTR,Me):pe,ue=ld(e,"ADD_DATA_URI_TAGS")?pd(md(he),e.ADD_DATA_URI_TAGS,Me):he,le=ld(e,"FORBID_CONTENTS")?pd({},e.FORBID_CONTENTS,Me):ce,U=ld(e,"FORBID_TAGS")?pd({},e.FORBID_TAGS,Me):{},q=ld(e,"FORBID_ATTR")?pd({},e.FORBID_ATTR,Me):{},se=!!ld(e,"USE_PROFILES")&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,V=!1!==e.ALLOW_DATA_ATTR,Y=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,X=e.SAFE_FOR_TEMPLATES||!1,Q=!1!==e.SAFE_FOR_XML,K=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,ae=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,D=e.ALLOWED_URI_REGEXP||Od,be=e.NAMESPACE||ge,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,_e=e.HTML_INTEGRATION_POINTS||_e,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(V=!1),te&&(ee=!0),se&&(I=pd({},kd),F=[],!0===se.html&&(pd(I,bd),pd(F,Sd)),!0===se.svg&&(pd(I,yd),pd(F,Cd),pd(F,Td)),!0===se.svgFilters&&(pd(I,vd),pd(F,Cd),pd(F,Td)),!0===se.mathMl&&(pd(I,wd),pd(F,Md),pd(F,Td))),e.ADD_TAGS&&(I===B&&(I=md(I)),pd(I,e.ADD_TAGS,Me)),e.ADD_ATTR&&(F===H&&(F=md(F)),pd(F,e.ADD_ATTR,Me)),e.ADD_URI_SAFE_ATTR&&pd(de,e.ADD_URI_SAFE_ATTR,Me),e.FORBID_CONTENTS&&(le===ce&&(le=md(le)),pd(le,e.FORBID_CONTENTS,Me)),ae&&(I["#text"]=!0),K&&pd(I,["html","head","body"]),I.table&&(pd(I,["tbody"]),delete U.tbody),e.TRUSTED_TYPES_POLICY){if("function"!==typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ud('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!==typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ud('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,_=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!==typeof e||"function"!==typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(f,a)),null!==w&&"string"===typeof _&&(_=w.createHTML(""));Vh&&Vh(e),Te=e}},Pe=pd({},[...yd,...vd,...xd]),ze=pd({},[...wd,..._d]),Oe=function(e){ed(n.removed,{element:e});try{x(e).removeChild(e)}catch(t){b(e)}},Re=function(e,t){try{ed(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(r){ed(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Oe(t)}catch(r){}else try{t.setAttribute(e,"")}catch(r){}},je=function(e){let t=null,n=null;if(Z)e=""+e;else{const t=id(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Se&&be===ge&&(e=''+e+"");const i=w?w.createHTML(e):e;if(be===ge)try{t=(new p).parseFromString(i,Se)}catch(o){}if(!t||!t.documentElement){t=k.createDocument(be,"template",null);try{t.documentElement.innerHTML=ye?_:i}catch(o){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),be===ge?M.call(t,K?"html":"body")[0]:K?t.documentElement:a},Le=function(e){return S.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},De=function(e){return e instanceof d&&("string"!==typeof e.nodeName||"string"!==typeof e.textContent||"function"!==typeof e.removeChild||!(e.attributes instanceof h)||"function"!==typeof e.removeAttribute||"function"!==typeof e.setAttribute||"string"!==typeof e.namespaceURI||"function"!==typeof e.insertBefore||"function"!==typeof e.hasChildNodes)},Ie=function(e){return"function"===typeof l&&e instanceof l};function Be(e,t,r){Kh(e,(e=>{e.call(n,t,r,Te)}))}const Fe=function(e){let t=null;if(Be(E.beforeSanitizeElements,e,null),De(e))return Oe(e),!0;const r=Me(e.nodeName);if(Be(E.uponSanitizeElement,e,{tagName:r,allowedTags:I}),e.hasChildNodes()&&!Ie(e.firstElementChild)&&cd(/<[/\w]/g,e.innerHTML)&&cd(/<[/\w]/g,e.textContent))return Oe(e),!0;if(e.nodeType===Hd)return Oe(e),!0;if(Q&&e.nodeType===$d&&cd(/<[/\w]/g,e.data))return Oe(e),!0;if(!I[r]||U[r]){if(!U[r]&&$e(r)){if($.tagNameCheck instanceof RegExp&&cd($.tagNameCheck,r))return!1;if($.tagNameCheck instanceof Function&&$.tagNameCheck(r))return!1}if(ae&&!le[r]){const t=x(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const i=g(n[r],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,y(e))}}}return Oe(e),!0}return e instanceof c&&!function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const n=nd(e.tagName),r=nd(t.tagName);return!!ve[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ge?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===r||we[r]):Boolean(Pe[n]):e.namespaceURI===fe?t.namespaceURI===ge?"math"===n:t.namespaceURI===me?"math"===n&&_e[r]:Boolean(ze[n]):e.namespaceURI===ge?!(t.namespaceURI===me&&!_e[r])&&!(t.namespaceURI===fe&&!we[r])&&!ze[n]&&(ke[n]||!Pe[n]):!("application/xhtml+xml"!==Se||!ve[e.namespaceURI]))}(e)?(Oe(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!cd(/<\/no(script|embed|frames)/i,e.innerHTML)?(X&&e.nodeType===Fd&&(t=e.textContent,Kh([A,N,P],(e=>{t=ad(t,e," ")})),e.textContent!==t&&(ed(n.removed,{element:e.cloneNode()}),e.textContent=t)),Be(E.afterSanitizeElements,e,null),!1):(Oe(e),!0)},He=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in Ee))return!1;if(V&&!q[t]&&cd(z,t));else if(W&&cd(O,t));else if(!F[t]||q[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&cd($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&cd($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||"is"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&cd($.tagNameCheck,n)||$.tagNameCheck instanceof Function&&$.tagNameCheck(n))))return!1}else if(de[t]);else if(cd(D,ad(n,j,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==od(n,"data:")||!ue[e]){if(Y&&!cd(R,ad(n,j,"")));else if(n)return!1}else;return!0},$e=function(e){return"annotation-xml"!==e&&id(e,L)},Ue=function(e){Be(E.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||De(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let i=t.length;for(;i--;){const o=t[i],{name:s,namespaceURI:l,value:c}=o,u=Me(s);let h="value"===s?c:sd(c);if(r.attrName=u,r.attrValue=h,r.keepAttr=!0,r.forceKeepAttr=void 0,Be(E.uponSanitizeAttribute,e,r),h=r.attrValue,!ie||"id"!==u&&"name"!==u||(Re(s,e),h="user-content-"+h),Q&&cd(/((--!?|])>)|<\/(style|title)/i,h)){Re(s,e);continue}if(r.forceKeepAttr)continue;if(Re(s,e),!r.keepAttr)continue;if(!G&&cd(/\/>/i,h)){Re(s,e);continue}X&&Kh([A,N,P],(e=>{h=ad(h,e," ")}));const d=Me(e.nodeName);if(He(d,u,h)){if(w&&"object"===typeof f&&"function"===typeof f.getAttributeType)if(l);else switch(f.getAttributeType(d,u)){case"TrustedHTML":h=w.createHTML(h);break;case"TrustedScriptURL":h=w.createScriptURL(h)}try{l?e.setAttributeNS(l,s,h):e.setAttribute(s,h),De(e)?Oe(e):Zh(n.removed)}catch(a){}}}Be(E.afterSanitizeAttributes,e,null)},qe=function e(t){let n=null;const r=Le(t);for(Be(E.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Be(E.uponSanitizeShadowNode,n,null),Fe(n),Ue(n),n.content instanceof o&&e(n.content);Be(E.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,s=null,c=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!==typeof e&&!Ie(e)){if("function"!==typeof e.toString)throw ud("toString is not a function");if("string"!==typeof(e=e.toString()))throw ud("dirty is not a string, aborting")}if(!n.isSupported)return e;if(J||Ne(t),n.removed=[],"string"===typeof e&&(oe=!1),oe){if(e.nodeName){const t=Me(e.nodeName);if(!I[t]||U[t])throw ud("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=je("\x3c!----\x3e"),a=r.ownerDocument.importNode(e,!0),a.nodeType===Bd&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!ee&&!X&&!K&&-1===e.indexOf("<"))return w&&ne?w.createHTML(e):e;if(r=je(e),!r)return ee?null:ne?_:""}r&&Z&&Oe(r.firstChild);const u=Le(oe?e:r);for(;s=u.nextNode();)Fe(s),Ue(s),s.content instanceof o&&qe(s.content);if(oe)return e;if(ee){if(te)for(c=C.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(F.shadowroot||F.shadowrootmode)&&(c=T.call(i,c,!0)),c}let h=K?r.outerHTML:r.innerHTML;return K&&I["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&cd(Ld,r.ownerDocument.doctype.name)&&(h="\n"+h),X&&Kh([A,N,P],(e=>{h=ad(h,e," ")})),w&&ne?w.createHTML(h):h},n.setConfig=function(){Ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},n.clearConfig=function(){Te=null,J=!1},n.isValidAttribute=function(e,t,n){Te||Ne({});const r=Me(e),i=Me(t);return He(r,i,n)},n.addHook=function(e,t){"function"===typeof t&&ed(E[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Jh(E[e],t);return-1===n?void 0:td(E[e],n,1)[0]}return Zh(E[e])},n.removeHooks=function(e){E[e]=[]},n.removeAllHooks=function(){E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),Yd=Object.defineProperty,Gd=Object.getOwnPropertySymbols,Xd=Object.prototype.hasOwnProperty,Qd=Object.prototype.propertyIsEnumerable,Kd=(e,t,n)=>t in e?Yd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jd=(e,t)=>{for(var n in t||(t={}))Xd.call(t,n)&&Kd(e,n,t[n]);if(Gd)for(var n of Gd(t))Qd.call(t,n)&&Kd(e,n,t[n]);return e},Zd=(e,t)=>{var n={};for(var r in e)Xd.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Gd)for(var r of Gd(e))t.indexOf(r)<0&&Qd.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],et.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let o=[];for(let t=0;t2&&void 0!==arguments[2]?arguments[2]:1,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:40,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,h=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(!(t.MIN_VERSION<=l&&l<=c&&c<=t.MAX_VERSION)||u<-1||u>7)throw new RangeError("Invalid value");for(a=l;;a++){const n=8*t.getNumDataCodewords(a,r),i=o.getTotalBits(e,a);if(i<=n){s=i;break}if(a>=c)throw new RangeError("Data too long")}for(const n of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])h&&s<=8*t.getNumDataCodewords(a,n)&&(r=n);let d=[];for(const t of e){n(t.mode.modeBits,4,d),n(t.numChars,t.mode.numCharCountBits(a),d);for(const e of t.getData())d.push(e)}i(d.length==s);const p=8*t.getNumDataCodewords(a,r);i(d.length<=p),n(0,Math.min(4,p-d.length),d),n(0,(8-d.length%8)%8,d),i(d.length%8==0);for(let t=236;d.lengthf[t>>>3]|=e<<7-(7&t))),new t(a,r,f,u)}getModule(e,t){return 0<=e&&e>>9);const a=21522^(t<<10|n);i(a>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,r(a,i));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,r(a,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,r(a,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,r(a,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let n=0;n<12;n++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;i(t>>>18==0);for(let n=0;n<18;n++){const e=r(t,n),i=this.size-11+n%3,a=Math.floor(n/3);this.setFunctionModule(i,a,e),this.setFunctionModule(a,i,e)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a{(t!=c-o||n>=l)&&d.push(e[t])}));return i(d.length==s),d}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let i=0;i>>3],7-(7&n)),n++)}}i(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t5&&e++):(this.finderPenaltyAddHistory(r,a),n||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),n=this.modules[i][o],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,a)*t.PENALTY_N3}for(let i=0;i5&&e++):(this.finderPenaltyAddHistory(r,a),n||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),n=this.modules[o][i],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,a)*t.PENALTY_N3}for(let i=0;ie+(t?1:0)),n);const r=this.size*this.size,a=Math.ceil(Math.abs(20*n-10*r)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.lengtht.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t0));for(const i of e){const e=i^r.shift();r.push(0),n.forEach(((n,i)=>r[i]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];i(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];function n(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return 0!=(e>>>t&1)}function i(e){if(!e)throw new Error("Assertion error")}e.QrCode=t;const a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(t){let r=[];for(const e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw new RangeError("String contains non-numeric characters");let r=[];for(let e=0;e=1<{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2);e.Ecc=t})(t=e.QrCode||(e.QrCode={}))})(Wd||(Wd={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]);e.Mode=t})(t=e.QrSegment||(e.QrSegment={}))})(Wd||(Wd={}));var ep=Wd,tp={L:ep.QrCode.Ecc.LOW,M:ep.QrCode.Ecc.MEDIUM,Q:ep.QrCode.Ecc.QUARTILE,H:ep.QrCode.Ecc.HIGH},np=128,rp="L",ip="#FFFFFF",ap="#000000",op=!1,sp=1;function lp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[];return e.forEach((function(e,r){let i=null;e.forEach((function(a,o){if(!a&&null!==i)return n.push(`M${i+t} ${r+t}h${o-i}v1H${i+t}z`),void(i=null);if(o!==e.length-1)a&&null===i&&(i=o);else{if(!a)return;null===i?n.push(`M${o+t},${r+t} h1v1H${o+t}z`):n.push(`M${i+t},${r+t} h${o+1-i}v1H${i+t}z`)}}))})),n.join("")}function cp(e,t){return e.slice().map(((e,n)=>n=t.y+t.h?e:e.map(((e,n)=>(n=t.x+t.w)&&e))))}function up(e){let{value:t,level:n,minVersion:i,includeMargin:a,marginSize:o,imageSettings:s,size:l,boostLevel:c}=e,u=r.useMemo((()=>{const e=(Array.isArray(t)?t:[t]).reduce(((e,t)=>(e.push(...ep.QrSegment.makeSegments(t)),e)),[]);return ep.QrCode.encodeSegments(e,tp[n],i,void 0,void 0,c)}),[t,n,i,c]);const{cells:h,margin:d,numCells:p,calculatedImageSettings:f}=r.useMemo((()=>{let e=u.getModules();const t=function(e,t){return null!=t?Math.max(Math.floor(t),0):e?4:0}(a,o),n=e.length+2*t,r=function(e,t,n,r){if(null==r)return null;const i=e.length+2*n,a=Math.floor(.1*t),o=i/t,s=(r.width||a)*o,l=(r.height||a)*o,c=null==r.x?e.length/2-s/2:r.x*o,u=null==r.y?e.length/2-l/2:r.y*o,h=null==r.opacity?1:r.opacity;let d=null;if(r.excavate){let e=Math.floor(c),t=Math.floor(u);d={x:e,y:t,w:Math.ceil(s+c-e),h:Math.ceil(l+u-t)}}return{x:c,y:u,h:l,w:s,excavation:d,opacity:h,crossOrigin:r.crossOrigin}}(e,l,t,s);return{cells:e,margin:t,numCells:n,calculatedImageSettings:r}}),[u,l,s,a,o]);return{qrcode:u,margin:d,cells:h,numCells:p,calculatedImageSettings:f}}var hp=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),dp=r.forwardRef((function(e,t){const n=e,{value:i,size:a=np,level:o=rp,bgColor:s=ip,fgColor:l=ap,includeMargin:c=op,minVersion:u=sp,boostLevel:h,marginSize:d,imageSettings:p}=n,f=Zd(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:m}=f,g=Zd(f,["style"]),b=null==p?void 0:p.src,y=r.useRef(null),v=r.useRef(null),x=r.useCallback((e=>{y.current=e,"function"===typeof t?t(e):t&&(t.current=e)}),[t]),[w,_]=r.useState(!1),{margin:k,cells:S,numCells:C,calculatedImageSettings:M}=up({value:i,level:o,minVersion:u,boostLevel:h,includeMargin:c,marginSize:d,imageSettings:p,size:a});r.useEffect((()=>{if(null!=y.current){const e=y.current,t=e.getContext("2d");if(!t)return;let n=S;const r=v.current,i=null!=M&&null!==r&&r.complete&&0!==r.naturalHeight&&0!==r.naturalWidth;i&&null!=M.excavation&&(n=cp(S,M.excavation));const o=window.devicePixelRatio||1;e.height=e.width=a*o;const c=a/C*o;t.scale(c,c),t.fillStyle=s,t.fillRect(0,0,C,C),t.fillStyle=l,hp?t.fill(new Path2D(lp(n,k))):S.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+k,n+k,1,1)}))})),M&&(t.globalAlpha=M.opacity),i&&t.drawImage(r,M.x+k,M.y+k,M.w,M.h)}})),r.useEffect((()=>{_(!1)}),[b]);const T=Jd({height:a,width:a},m);let E=null;return null!=b&&(E=r.createElement("img",{src:b,key:b,style:{display:"none"},onLoad:()=>{_(!0)},ref:v,crossOrigin:null==M?void 0:M.crossOrigin})),r.createElement(r.Fragment,null,r.createElement("canvas",Jd({style:T,height:a,width:a,ref:x,role:"img"},g)),E)}));dp.displayName="QRCodeCanvas",r.forwardRef((function(e,t){const n=e,{value:i,size:a=np,level:o=rp,bgColor:s=ip,fgColor:l=ap,includeMargin:c=op,minVersion:u=sp,boostLevel:h,title:d,marginSize:p,imageSettings:f}=n,m=Zd(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:g,cells:b,numCells:y,calculatedImageSettings:v}=up({value:i,level:o,minVersion:u,boostLevel:h,includeMargin:c,marginSize:p,imageSettings:f,size:a});let x=b,w=null;null!=f&&null!=v&&(null!=v.excavation&&(x=cp(b,v.excavation)),w=r.createElement("image",{href:f.src,height:v.h,width:v.w,x:v.x+g,y:v.y+g,preserveAspectRatio:"none",opacity:v.opacity,crossOrigin:v.crossOrigin}));const _=lp(x,g);return r.createElement("svg",Jd({height:a,width:a,viewBox:`0 0 ${y} ${y}`,ref:t,role:"img"},m),!!d&&r.createElement("title",null,d),r.createElement("path",{fill:s,d:`M0,0 h${y}v${y}H0z`,shapeRendering:"crispEdges"}),r.createElement("path",{fill:l,d:_,shapeRendering:"crispEdges"}),w)})).displayName="QRCodeSVG";const pp="HomeworkPractice_page__X0Gqn",fp="HomeworkPractice_header__ZzDEp",mp="HomeworkPractice_back__LcE7Y",gp="HomeworkPractice_title__35puV",bp="HomeworkPractice_toggle__XHrSW",yp="HomeworkPractice_body__7qJ70",vp="HomeworkPractice_card__9Tv8q",xp="HomeworkPractice_sidebar__MOAJM",wp="HomeworkPractice_cardHead__vFjfF",_p="HomeworkPractice_question__YfIpA",kp="HomeworkPractice_note__lMuDc",Sp="HomeworkPractice_hintBox__PWAe4",Cp="HomeworkPractice_feedbackBox__0CBA9",Mp="HomeworkPractice_uploadedSliderContainer__g9fHt",Tp="HomeworkPractice_slider__rgHkw",Ep="HomeworkPractice_sliderBtn__RIkmo",Ap="HomeworkPractice_uploadedImage__A8i0j",Np="HomeworkPractice_deleteBtn__6uEAX",Pp="HomeworkPractice_iconRow__njw4Q",zp="HomeworkPractice_btnRow__eWD87",Op="HomeworkPractice_imageIcon__pvpdb",Rp="HomeworkPractice_ipadIcon__A904Q",jp="HomeworkPractice_keyboardIcon__kaWPl",Lp="HomeworkPractice_textEditorWrapper__DfUAY",Dp="HomeworkPractice_textEditor__jekU9",Ip="HomeworkPractice_primary__Gx4ZW",Bp="HomeworkPractice_hintBtn__j2KGf",Fp="HomeworkPractice_loadingBtn__-jlQw",Hp="HomeworkPractice_grp__XkUyz",$p="HomeworkPractice_grpLabel__Rt+3U",Up="HomeworkPractice_item__lu4nG",qp="HomeworkPractice_active__dcZfg",Wp="HomeworkPractice_done__H3MJL",Vp="HomeworkPractice_check__has4-",Yp="HomeworkPractice_modalOverlay__-l92w",Gp="HomeworkPractice_modalContent__NRt6c",Xp="HomeworkPractice_modalCloseBtn__IXWo9",Qp=r.memo((function(e){let{files:t,currentIndex:n,onPrev:r,onNext:i,onDelete:a,timestamp:o}=e;if(!t.length)return null;const s=t[n],l=s+(s.includes("?")?"&":"?")+`t=${o}`;return(0,xn.jsxs)("div",{className:Mp,children:[(0,xn.jsx)("h4",{children:"Uploaded Work"}),(0,xn.jsxs)("div",{className:Tp,children:[(0,xn.jsx)("button",{onClick:r,disabled:0===n,className:Ep,children:"\u25c0"}),(0,xn.jsx)("img",{src:l,alt:"Uploaded",className:Ap},l),(0,xn.jsx)("button",{onClick:i,disabled:n===t.length-1,className:Ep,children:"\u25b6"})]}),(0,xn.jsx)("button",{onClick:a,className:Np,children:"Delete This Image"})]})})),Kp={tex:{inlineMath:[["\\(","\\)"],["$","$"]],displayMath:[["\\[","\\]"],["$$","$$"]]},svg:{linebreaks:{automatic:!0}}},Jp=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\\{1,2}\(([\s\S]*?)\\{1,2}\)/g,"$$ $1 $$").replace(/\\{1,2}\[([\s\S]*?)\\{1,2}\]/g,"$$$$ $1 $$$$").replace(/\\\\/g,"\\")},Zp=e=>ga(e,{gfm:!0}).replace(/

    \s*<\/p>/g,""),ef=e=>Vd.sanitize(e,{ALLOWED_TAGS:["p","em","strong","span","br","sub","sup","img","h1","h2","h3","h4","h5","h6","mjx-container","mjx-math","mjx-mi","mjx-mo","mjx-mn","mjx-row","mjx-frac","mjx-den","mjx-num","mjx-script","mjx-stretchy","mjx-box","mjx-line","mjx-char"],ALLOWED_ATTR:{"*":["style","class"],img:["src","alt","width","height"]}}),tf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{const t=new URL(e);return t.searchParams.delete("t"),t.toString()}catch{return e}};function nf(){var e,t;const[n]=ee(),i=n.get("homework_id"),a="https://api.racine-ai.com".replace(/\/+$/,""),o="https://racine-ai.com",s=B(),l=(0,r.useRef)(null),c=(0,r.useRef)(null),[u,h]=(0,r.useState)([]),[d,p]=(0,r.useState)(0),[f,m]=(0,r.useState)({}),[g,b]=(0,r.useState)(""),[y,v]=(0,r.useState)(""),[x,w]=(0,r.useState)(!1),[_,k]=(0,r.useState)(!1),[S,C]=(0,r.useState)(!0),[M,T]=(0,r.useState)(!1),[E,A]=(0,r.useState)(!1),[N,P]=(0,r.useState)(!1),[z,O]=(0,r.useState)([]),[R,j]=(0,r.useState)(0),L=(0,r.useRef)([]),D=(0,r.useRef)({}),[I,F]=(0,r.useState)(Date.now());(0,r.useEffect)((()=>{i&&(async()=>{const e=await fetch(`${a}/search/homework`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({homework_id:i})}).then((e=>e.json())).then((e=>Array.isArray(e)?e:e.exercises||[])),t=await fetch(`${a}/grade/homework/completed?homework_id=${i}`,{credentials:"include"}).then((e=>e.json())).catch((()=>({}))),n={};for(const[i,a]of Object.entries(t))n[i.includes("_")?i:`${i}_1`]=a;h(e),m(n);const r=e.findIndex(((t,r)=>!n[rf(t,r,e)]));p(-1===r?0:r)})()}),[a,i]),(0,r.useEffect)((()=>{if(!u.length)return;const e=rf(u[d],d,u),t=f[e]||{};l.current&&(l.current.value=t.student_answer||""),b(t.hint||""),v(t.feedback||"")}),[d,u,f]);const H=u[d]||{},$=u.filter((e=>e.exerciseNumber===H.exerciseNumber)),U=$.indexOf(H)+1,q=`${H.exerciseNumber}_${U}`,{clean:W,notes:V}=(0,r.useMemo)((()=>(e=>{const t=[];return{clean:e.replace(/(.*?)<\/note>/gis,((e,n)=>(t.push(n.trim()),""))),notes:t}})(Zp(Jp(H.exerciseQuestion||"")))),[H.exerciseQuestion]),Y=(0,r.useMemo)((()=>ef(W)),[W]),G=()=>{var e;return(null===(e=c.current)||void 0===e?void 0:e.scrollTop)||0},X=e=>requestAnimationFrame((()=>requestAnimationFrame((()=>{var t;return null===(t=c.current)||void 0===t?void 0:t.scrollTo(0,e)})))),Q=()=>{var e,t;return{homework_id:i,exercise_id:q,question:W,proposed_solution:H.exerciseSolutionVerified||H.exerciseSolution||"",student_answer:null!==(e=null===(t=l.current)||void 0===t?void 0:t.value)&&void 0!==e?e:"",images:z.map(tf)}};(0,r.useEffect)((()=>{const e=setInterval((async()=>{try{const e=await fetch(`${a}/upload/homework/status/${i}/${q}`,{credentials:"include"});if(!e.ok)return;const{files:t=[]}=await e.json(),n=L.current.map((e=>e.split("?")[0])),r=t.map((e=>e.split("?")[0])),o=n.length!==r.length||n.some(((e,t)=>e!==r[t]));if(o)return L.current=t,O(t),j(0),void F(Date.now());if(t.length){const e=t[R],n=e.split("?")[0],r=(await fetch(e,{method:"GET",cache:"no-cache",credentials:"include"})).headers.get("Last-Modified");r&&r!==D.current[n]&&(D.current[n]=r,F(Date.now()))}}catch(e){}}),1e3);return()=>clearInterval(e)}),[a,i,q,R]),(0,r.useEffect)((()=>{z.length&&F(Date.now())}),[z,R]);const K=`${o}/upload-image?homework_id=${i}&exercise_id=${q}`,J=`${o}/upload-webhandwriting?homework_id=${i}&exercise_id=${q}`;return(0,xn.jsx)(ka,{config:Kp,children:(0,xn.jsxs)("div",{className:pp,children:[(0,xn.jsxs)("header",{className:fp,children:[(0,xn.jsx)("button",{className:mp,onClick:()=>s(-1),children:"\u2190"}),(0,xn.jsx)("h2",{className:gp,children:"Homework\xa0Practice"}),(0,xn.jsx)("button",{className:bp,onClick:()=>C((e=>!e)),children:S?"Hide \u25c2":"Show \u25b8"})]}),(0,xn.jsxs)("div",{className:yp,children:[(0,xn.jsxs)("main",{className:vp,ref:c,children:[(0,xn.jsxs)("h3",{className:wp,children:["Exercise ",H.exerciseNumber,$.length>1?` \u2013 ${U}`:""]}),(0,xn.jsx)(Ta,{dynamic:!0,children:(0,xn.jsx)("div",{className:_p,dangerouslySetInnerHTML:{__html:Y}})}),V.map(((e,t)=>(0,xn.jsx)("div",{className:kp,children:(0,xn.jsx)(Ta,{dynamic:!0,children:(0,xn.jsx)("div",{dangerouslySetInnerHTML:{__html:ef(e)}})})},t))),z.length>0&&(0,xn.jsx)(xn.Fragment,{children:(0,xn.jsx)(Qp,{files:z,currentIndex:R,onPrev:()=>j((e=>0===e?z.length-1:e-1)),onNext:()=>j((e=>e===z.length-1?0:e+1)),onDelete:()=>{if(!z.length)return;const e=z[R].split("?")[0].split("/").pop();fetch(`${a}/upload/homework/delete/image/${i}/${q}/${e}`,{method:"DELETE",credentials:"include"}).then((()=>{L.current=[]}))},timestamp:I})}),(0,xn.jsxs)("div",{className:Pp,children:[(0,xn.jsx)(Gn,{size:28,className:Op,onClick:()=>T(!0)}),(0,xn.jsx)(ir,{size:28,className:Rp,onClick:()=>A(!0)}),(0,xn.jsx)(Jn,{size:28,className:jp,onClick:()=>P((e=>!e))})]}),(N||""!==((null===(e=f[q])||void 0===e?void 0:e.student_answer)||""))&&(0,xn.jsx)("div",{className:Lp,children:(0,xn.jsx)("textarea",{ref:l,className:Dp,placeholder:"Type your answer\u2026",defaultValue:(null===(t=f[q])||void 0===t?void 0:t.student_answer)||""})}),g&&!y&&(0,xn.jsx)("div",{className:Sp,children:(0,xn.jsx)(Ta,{dynamic:!0,children:(0,xn.jsx)("div",{dangerouslySetInnerHTML:{__html:ef(Zp(Jp(g)))}})})}),y&&(0,xn.jsx)("div",{className:Cp,children:(0,xn.jsx)(Ta,{dynamic:!0,children:(0,xn.jsx)("div",{dangerouslySetInnerHTML:{__html:ef(Zp(Jp(y)))}})})}),(0,xn.jsx)("div",{className:zp,children:y?(0,xn.jsx)("button",{className:Ip,onClick:()=>{p((e=>Math.min(e+1,u.length-1))),X(0)},children:d{if(x)return;const e=G();w(!0),X(e);try{const e=await fetch(`${a}/hint/homework`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q())}).then((e=>e.json()));b(e.hint||""),m((t=>({...t,[q]:{...t[q]||{},hint:e.hint}})))}catch(t){console.error("hint error",t)}finally{w(!1),X(e)}},children:"Hint"}),_?(0,xn.jsx)("button",{className:Fp,disabled:!0,children:"Loading\u2026"}):(0,xn.jsx)("button",{className:Ip,onClick:async()=>{if(_)return;const e=G();k(!0),X(e);try{const e=await fetch(`${a}/grade/homework`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q())}).then((e=>e.json()));v(e.grade_feedback||""),m((t=>{var n,r;return{...t,[q]:{student_answer:null!==(n=null===(r=l.current)||void 0===r?void 0:r.value)&&void 0!==n?n:"",feedback:e.grade_feedback}}}))}catch(t){console.error("grade error",t)}finally{k(!1),X(e)}},children:"Submit"})]})})]}),S&&(0,xn.jsx)("aside",{className:xp,children:Object.entries(u.reduce(((e,t,n)=>((e[t.exerciseNumber]||=[]).push({...t,idx:n}),e)),{})).map((e=>{let[t,n]=e;return(0,xn.jsxs)("div",{className:Hp,children:[(0,xn.jsxs)("div",{className:$p,children:["Exercise ",t]}),n.map(((e,t)=>{var r;const i=rf(e,e.idx,u),a=Boolean(null===(r=f[i])||void 0===r?void 0:r.feedback);return(0,xn.jsxs)("div",{className:`${Up}\n ${e.idx===d?qp:""}\n ${a?Wp:""}`,onClick:()=>{p(e.idx),X(0)},children:[n.length>1?`Sub-${t+1}`:"Question",a&&(0,xn.jsx)("span",{className:Vp,children:"\u2713"})]},e.idx)}))]},t)}))})]}),M&&(0,xn.jsx)("div",{className:Yp,onClick:()=>T(!1),children:(0,xn.jsxs)("div",{className:Gp,onClick:e=>e.stopPropagation(),children:[(0,xn.jsx)("h3",{children:"Scan QR Code to Upload Image"}),(0,xn.jsx)(dp,{value:K,size:200}),(0,xn.jsx)("p",{children:"Scan with your phone to capture an image"}),(0,xn.jsx)("button",{className:Xp,onClick:()=>T(!1),children:"Close"})]})}),E&&(0,xn.jsx)("div",{className:Yp,onClick:()=>A(!1),children:(0,xn.jsxs)("div",{className:Gp,onClick:e=>e.stopPropagation(),children:[(0,xn.jsx)("h3",{children:"Scan QR Code to Open on iPad"}),(0,xn.jsx)(dp,{value:J,size:200}),(0,xn.jsx)("p",{children:"Scan with your iPad to open the handwriting page"}),(0,xn.jsx)("button",{className:Xp,onClick:()=>A(!1),children:"Close"})]})})]})})}function rf(e,t,n){if(!e.exerciseNumber)return"";const r=n.slice(0,t+1).filter((t=>t.exerciseNumber===e.exerciseNumber)).length;return`${e.exerciseNumber}_${r}`}const af="OnboardingForm_page__xhvd-",of="OnboardingForm_wrapper__CsLno",sf="OnboardingForm_form__suQmx",lf="OnboardingForm_primary__jBwg5",cf="OnboardingForm_err__bQu0T",uf="OnboardingForm_welcome__7GXN-",hf="OnboardingForm_email__8KHiY",df="OnboardingForm_logo__8ZKwA";function pf(){const{user:e,refresh:t}=kn(),n=B(),[i,a]=(0,r.useState)(""),[o,s]=(0,r.useState)(""),[l,c]=(0,r.useState)("");return(0,xn.jsx)("div",{className:af,children:(0,xn.jsxs)("div",{className:of,children:[(0,xn.jsx)("img",{src:"/assets/logo-Racine.png",alt:"Racine logo",className:df}),(0,xn.jsxs)("h2",{className:uf,children:["Welcome",(0,xn.jsx)("br",{}),(0,xn.jsx)("span",{className:hf,children:null===e||void 0===e?void 0:e.email})]}),(0,xn.jsx)("p",{children:"Please complete your profile to continue"}),(0,xn.jsxs)("form",{className:sf,onSubmit:async e=>{if(e.preventDefault(),i&&o)try{await fetch("https://api.racine-ai.com/auth/me",{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({first_name:i.trim(),last_name:o.trim()})}),await t(),n("/",{replace:!0})}catch{c("Couldn\u2019t save \u2013 try again")}},children:[(0,xn.jsx)("input",{placeholder:"First name",value:i,onChange:e=>a(e.target.value),required:!0}),(0,xn.jsx)("input",{placeholder:"Last name",value:o,onChange:e=>s(e.target.value),required:!0}),l&&(0,xn.jsx)("div",{className:cf,children:l}),(0,xn.jsx)("button",{className:lf,children:"Continue"})]})]})})}const ff={practiceWrapper:"PracticePage_practiceWrapper__-FD9Y",headerBar:"PracticePage_headerBar__FAwmq",backArrow:"PracticePage_backArrow__9nNTC",pageTitle:"PracticePage_pageTitle__uuyz7",timer:"PracticePage_timer__gD-yH",contentArea:"PracticePage_contentArea__Tga3E",fireCount:"PracticePage_fireCount__papwe",emojiIcon:"PracticePage_emojiIcon__fD8vv",fireNumber:"PracticePage_fireNumber__rTU6M",practiceBox:"PracticePage_practiceBox__Nl92O",mainHeading:"PracticePage_mainHeading__DE339",subHeading:"PracticePage_subHeading__MLUqL",paragraph:"PracticePage_paragraph__XFUob",iconRow:"PracticePage_iconRow__oLV5v",imageIcon:"PracticePage_imageIcon__horun",footerBar:"PracticePage_footerBar__SYYcU",continueBtn:"PracticePage_continueBtn__hHi4F",textEditorWrapper:"PracticePage_textEditorWrapper__NpwGK",textEditor:"PracticePage_textEditor__ypiLG",keyboardIcon:"PracticePage_keyboardIcon__LuTKs",modalOverlay:"PracticePage_modalOverlay__WFD9u",modalContent:"PracticePage_modalContent__Bz4Q0",modalCloseBtn:"PracticePage_modalCloseBtn__wKFDg",uploadedImageContainer:"PracticePage_uploadedImageContainer__MbQWs",uploadedImage:"PracticePage_uploadedImage__xkjt5",uploadedSliderContainer:"PracticePage_uploadedSliderContainer__mDdCw",slider:"PracticePage_slider__uAO-2",sliderBtn:"PracticePage_sliderBtn__QM4Zj",deleteBtn:"PracticePage_deleteBtn__9+LKA",ipadIcon:"PracticePage_ipadIcon__xKaCM",loadingBtn:"PracticePage_loadingBtn__I5iRR",hintBtn:"PracticePage_hintBtn__EOomz",hintBox:"PracticePage_hintBox__jm2q0",feedbackBox:"PracticePage_feedbackBox__VMLYC"};function mf(e){let t=e;return t=t.replace(/\\{2,}\[/g,"\\[").replace(/\\{2,}\]/g,"\\]"),t=t.replace(/\\{2,}\(/g,"\\(").replace(/\\{2,}\)/g,"\\)"),t=t.replace(/\\\[/g,"$$$$").replace(/\\\]/g,"$$$$"),t=t.replace(/\\/g,"\\\\"),t.trim()}function gf(e){return ga(e,{breaks:!1,gfm:!0}).replace(/

    \s*<\/p>/g,"")}const bf={loader:{load:["[tex]/ams"]},tex:{packages:{"[+]":["ams"]},inlineMath:[["\\(","\\)"],["$","$"]],displayMath:[["\\[","\\]"],["$$","$$"]],linebreaks:{automatic:!0,width:"100%"}},svg:{linebreaks:{automatic:!0}},options:{output:"chtml"}};function yf(){const e=B(),t=I(),{grade:n,course_name:i,chapter:a,sessionLength:o=15}=t.state||{},[s,l]=(0,r.useState)(60*o),[c,u]=(0,r.useState)(0),[h,d]=(0,r.useState)(0),[p,f]=(0,r.useState)(!1),[m,g]=(0,r.useState)(!1),b=(0,r.useRef)([]),y=(0,r.useRef)({}),[v,x]=(0,r.useState)(Date.now()),[w,_]=(0,r.useState)({exerciseNumber:c,exerciseQuestion:"Loading exercise...",exerciseSolutionVerified:""}),[k,S]=(0,r.useState)(!1),[C,M]=(0,r.useState)(!1),[T,E]=(0,r.useState)(""),[A,N]=(0,r.useState)(!1),[P,z]=(0,r.useState)(!1),[O,R]=(0,r.useState)([]),[j,L]=(0,r.useState)(0),[D,F]=(0,r.useState)(!1),[H,$]=(0,r.useState)(""),[U,q]=(0,r.useState)(!1),[W,V]=(0,r.useState)(""),Y="https://api.racine-ai.com",G="https://racine-ai.com";(0,r.useEffect)((()=>{fetch(`${Y}/session/start`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({grade:n,course:i,chapter:a})}).catch((e=>console.error("Session start error:",e)))}),[Y,n,i,a]),(0,r.useEffect)((()=>{const e=setInterval((()=>{l((e=>e>1?e-1:(1===e&&f(!0),0)))}),1e3);return()=>clearInterval(e)}),[]);const X=()=>{window.history.length>2?e(-1):e("/")},Q=async()=>{const{session_id:t}=await(async()=>{try{return await fetch(`${Y}/session/end`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({grade:n,course:i,chapter:a})})}catch(e){console.error("Session end error:",e)}})()||{};e("/practice/recap",{state:{grade:n,course_name:i,chapter:a,session_id:t}})};(0,r.useEffect)((()=>{S(!1),M(!1),E(""),$(""),R([]),fetch(`${Y}/search`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grade:n,course_name:i,chapter:a}),credentials:"include"}).then((e=>e.json())).then((e=>{_(e),u(e.exerciseNumber)})).catch((e=>{console.error("Error fetching exercise:",e),_({exerciseNumber:0,exerciseQuestion:"Error loading exercise",exerciseSolutionVerified:""})}))}),[Y,n,i,a,c]);const K=`${G}/upload-image?grade=${n}&course_name=${i}&chapter=${a}&problem=${c}`,J=`${G}/upload-webhandwriting?grade=${n}&course_name=${i}&chapter=${a}&problem=${c}`;(0,r.useEffect)((()=>{const e=setInterval((async()=>{try{const e=await fetch(`${Y}/upload_status_all/${n}/${i}/${a}/${c}`,{credentials:"include"}),t=await e.json();if(t.uploaded&&t.files.length>0){const e=t.files;if(function(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n0&&(b.current=[],R([]))}catch(e){console.error("Polling error:",e)}}),100);return()=>clearInterval(e)}),[Y,n,i,a,c,j]);const Z=gf(mf(w.exerciseQuestion||""));gf(mf(w.exerciseSolutionVerified||""));return(0,xn.jsxs)(ka,{config:bf,children:[p&&(0,xn.jsx)("div",{className:ff.modalOverlay,children:(0,xn.jsxs)("div",{className:ff.modalContent,children:[(0,xn.jsx)("h3",{children:"Practice session complete!"}),(0,xn.jsxs)("p",{children:["Congrats\u2014you\u2019ve finished your\xa0",o,"\xa0minute session."]}),(0,xn.jsx)("button",{className:ff.hintBtn,onClick:()=>{f(!1),g(!0)},children:"Finish this exercise"}),(0,xn.jsx)("button",{className:ff.continueBtn,onClick:()=>{f(!1),Q()},style:{marginLeft:"0.5em"},children:"Go to Recap"})]})}),(0,xn.jsxs)("div",{className:ff.practiceWrapper,children:[(0,xn.jsxs)("section",{className:ff.headerBar,children:[(0,xn.jsx)("div",{className:ff.backArrow,onClick:X,role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||X()},children:(0,xn.jsx)("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,xn.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,xn.jsx)("h2",{className:ff.pageTitle,children:"Practice"}),(0,xn.jsx)("div",{className:ff.timer,children:(0,xn.jsx)("span",{children:(e=>{const t=Math.floor(e/60),n=e%60;return`${t<10?`0${t}`:t}:${n<10?`0${n}`:n}`})(s)})})]}),(0,xn.jsxs)("div",{className:ff.contentArea,children:[(0,xn.jsxs)("div",{className:ff.fireCount,children:[(0,xn.jsx)("div",{role:"img","aria-label":"fire",className:ff.emojiIcon,children:(0,xn.jsx)(gr,{className:ff.emojiIcon})}),(0,xn.jsx)("span",{className:ff.fireNumber,children:h})]}),(0,xn.jsxs)("div",{className:ff.practiceBox,children:[(0,xn.jsxs)("h3",{className:ff.mainHeading,children:["Exercise ",w.exerciseNumber]}),(0,xn.jsx)(Ta,{dynamic:!0,children:(0,xn.jsx)("div",{className:ff.questionContent,style:{fontSize:"18px"},dangerouslySetInnerHTML:{__html:Z}})}),O.length>0&&(0,xn.jsxs)("div",{className:ff.uploadedSliderContainer,children:[(0,xn.jsx)("h4",{children:"Uploaded Work"}),(0,xn.jsxs)("div",{className:ff.slider,children:[(0,xn.jsx)("button",{className:ff.sliderBtn,onClick:()=>L((e=>0===e?O.length-1:e-1)),disabled:0===j,children:"\u25c0"}),(0,xn.jsx)("img",{src:`${O[j]}`,alt:"Uploaded",className:ff.uploadedImage}),(0,xn.jsx)("button",{className:ff.sliderBtn,onClick:()=>L((e=>e===O.length-1?0:e+1)),disabled:j===O.length-1,children:"\u25b6"})]}),(0,xn.jsx)("button",{className:ff.deleteBtn,onClick:()=>{if(0===O.length)return;const e=O[j].split("/").pop();fetch(`${Y}/upload_delete/image/${n}/${i}/${a}/${c}/${e}`,{method:"DELETE",credentials:"include"}).then((e=>e.json())).then((()=>fetch(`${Y}/upload_status_all/${n}/${i}/${a}/${c}`,{credentials:"include"}))).then((e=>e.json())).then((e=>{e.uploaded&&e.files.length>0?(R(e.files),L((t=>Math.min(t,e.files.length-1)))):R([])})).catch((e=>console.error("Delete error:",e)))},children:"Delete This Image"})]}),(0,xn.jsxs)("div",{className:ff.iconRow,children:[(0,xn.jsx)("span",{className:ff.imageIcon,role:"img","aria-label":"camera",onClick:()=>N(!0),children:(0,xn.jsx)(Gn,{size:32})}),(0,xn.jsx)("span",{className:ff.ipadIcon,role:"button","aria-label":"iPad",onClick:()=>z(!0),children:(0,xn.jsx)(ir,{size:32})}),(0,xn.jsx)("span",{className:ff.keyboardIcon,onClick:()=>{M((e=>!e))},children:(0,xn.jsx)(Jn,{size:32})})]}),A&&(0,xn.jsx)("div",{className:ff.modalOverlay,onClick:()=>N(!1),children:(0,xn.jsxs)("div",{className:ff.modalContent,onClick:e=>e.stopPropagation(),children:[(0,xn.jsx)("h3",{children:"Scan QR Code to Upload Image"}),(0,xn.jsx)(dp,{value:K,size:200}),(0,xn.jsx)("p",{children:"Scan with your smartphone to capture an image"}),(0,xn.jsx)("button",{className:ff.modalCloseBtn,onClick:()=>N(!1),children:"Close"})]})}),P&&(0,xn.jsx)("div",{className:ff.modalOverlay,onClick:()=>z(!1),children:(0,xn.jsxs)("div",{className:ff.modalContent,onClick:e=>e.stopPropagation(),children:[(0,xn.jsx)("h3",{children:"Scan QR Code to Open on iPad"}),(0,xn.jsx)(dp,{value:J,size:200}),(0,xn.jsx)("p",{children:"Scan with your iPad to open the handwriting upload page"}),(0,xn.jsx)("button",{className:ff.modalCloseBtn,onClick:()=>z(!1),children:"Close"})]})}),C&&(0,xn.jsx)("div",{className:ff.textEditorWrapper,children:(0,xn.jsx)("textarea",{className:ff.textEditor,placeholder:"Type your answer here...",value:T,onChange:e=>E(e.target.value)})}),H&&!k&&(0,xn.jsx)("div",{className:ff.hintBox,children:(0,xn.jsx)(Ta,{dynamic:!0,children:(0,xn.jsx)("div",{dangerouslySetInnerHTML:{__html:gf(mf(H))}})})}),k&&W&&(0,xn.jsxs)("div",{className:ff.feedbackBox,children:[(0,xn.jsx)("h4",{className:ff.subHeading,children:"Feedback"}),(0,xn.jsx)(Ta,{dynamic:!0,children:(0,xn.jsx)("div",{className:ff.solutionContent,style:{fontSize:"18px"},dangerouslySetInnerHTML:{__html:gf(mf(W))}})})]})]})]}),(0,xn.jsx)("div",{className:ff.footerBar,children:k?(0,xn.jsx)("button",{className:ff.continueBtn,onClick:()=>{m?Q():(u((e=>e+1)),d((e=>e+1)))},children:m?"Go to Recap":"Continue"}):(0,xn.jsxs)(xn.Fragment,{children:[U?(0,xn.jsx)("button",{className:ff.loadingBtn,disabled:!0,style:{marginLeft:8},children:"Hint\u2026"}):(0,xn.jsx)("button",{className:ff.hintBtn,onClick:()=>{q(!0);const e=gf(mf(w.exerciseQuestion)),t=gf(mf(w.exerciseSolutionVerified)),r={exercise_id:w.exerciseNumber,grade:n,course_name:i,chapter:a,question:e,student_answer:T,proposed_solution:t,images:O};fetch(`${Y}/hint`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r),credentials:"include"}).then((e=>e.json())).then((e=>$(e.hint))).catch((e=>console.error("Hint error:",e))).finally((()=>q(!1)))},style:{marginLeft:8},children:"Hint"}),D?(0,xn.jsx)("button",{className:ff.loadingBtn,disabled:!0,children:"Loading\u2026"}):(0,xn.jsx)("button",{className:ff.continueBtn,onClick:()=>{F(!0),$("");const e=gf(mf(w.exerciseQuestion)),t=gf(mf(w.exerciseSolutionVerified)),r={exercise_id:w.exerciseNumber,grade:n,course_name:i,chapter:a,question:e,student_answer:T,proposed_solution:t,images:O};fetch(`${Y}/grade`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r),credentials:"include"}).then((e=>e.json())).then((e=>{V(e.grade_feedback),S(!0)})).catch((e=>console.error("Error grading answer:",e))).finally((()=>F(!1)))},children:"Submit"})]})})]})]})}const vf="PracticeSettings_container__zBotj",xf="PracticeSettings_header__GKhR-",wf="PracticeSettings_settingsCard__dyVKc",_f="PracticeSettings_settingRow__E9ZUS",kf="PracticeSettings_slider__fjfgd",Sf="PracticeSettings_coursesGrid__OFHRB",Cf="PracticeSettings_courseCard__5Xvs3",Mf="PracticeSettings_addCard__8+yxw",Tf="PracticeSettings_activeCard__nsNuC",Ef="PracticeSettings_iconHolder__9BFMA",Af="PracticeSettings_progressBar__7bv-9",Nf="PracticeSettings_progressFill__mSeq0",Pf="PracticeSettings_progressText__IzzK5",zf="PracticeSettings_startBtn__Qn24k",Of=(e,t)=>{const n=(e||"").toLowerCase(),r=(t||"").toLowerCase();return n.includes("math")||n.includes("calc")||r.includes("math")||r.includes("calc")?(0,xn.jsx)(yr,{}):n.includes("history")||r.includes("history")?(0,xn.jsx)(vr,{}):(0,xn.jsx)(xr,{})},Rf=()=>{var e;const[t,n]=(0,r.useState)(15),[i,a]=(0,r.useState)(null),{user:o}=kn(),s=B(),l=[...null!==(e=null===o||void 0===o?void 0:o.subscriptions)&&void 0!==e?e:[]].sort(((e,t)=>new Date(t.last_used)-new Date(e.last_used))).slice(0,4).map((e=>({icon:Of(e.course,e.grade),title:e.chapter||e.course,grade:e.grade,course_name:e.course,chapter:e.chapter,progress:Math.floor(e.progress/100),link:"/practice"})));return(0,xn.jsxs)("div",{className:vf,children:[(0,xn.jsx)("header",{className:xf,children:(0,xn.jsx)("h2",{children:"Practice"})}),(0,xn.jsx)("section",{className:wf,children:(0,xn.jsxs)("div",{className:_f,children:[(0,xn.jsx)("label",{children:"Length of session"}),(0,xn.jsx)("input",{type:"range",min:"5",max:"60",step:"5",value:t,onChange:e=>n(e.target.value),className:kf}),(0,xn.jsxs)("span",{children:[t,"\xa0min"]})]})}),(0,xn.jsxs)("section",{className:Sf,children:[l.map(((e,t)=>(0,xn.jsxs)("button",{className:`${Cf} ${i===t?Tf:""}`,onClick:()=>a(t),children:[(0,xn.jsx)("span",{className:Ef,children:e.icon}),(0,xn.jsx)("h4",{children:e.title}),(0,xn.jsx)("div",{className:Af,children:(0,xn.jsx)("div",{className:Nf,style:{width:`${e.progress}%`}})}),(0,xn.jsxs)("div",{className:Pf,children:[(0,xn.jsx)(kr,{})," ",e.progress,"% covered"]})]},`${e.title}-${t}`))),(0,xn.jsx)("button",{className:Mf,onClick:()=>s("/subscribe"),"aria-label":"Add a course",children:"+"})]}),(0,xn.jsx)("button",{className:zf,disabled:null==i,onClick:()=>{if(null==i)return;const e=l[i];s("/practice",{state:{grade:e.grade,course_name:e.course_name,chapter:e.chapter,sessionLength:t}})},children:"Start Practice"})]})},jf="RecapPage_recapWrapper__RUdrm",Lf="RecapPage_average__2vHkm",Df="RecapPage_list__oGOUM",If="RecapPage_item__szssK",Bf="RecapPage_header__ZNc83",Ff="RecapPage_details__U0zlF",Hf="RecapPage_exercise__jzmdm",$f="RecapPage_submission__qnOKx",Uf="RecapPage_feedback__r5ckF";function qf(e){let t=e||"";return t=t.replace(/\\{2,}\\\[/g,"\\[").replace(/\\{2,}\\\]/g,"\\]"),t=t.replace(/\\{2,}\\\(/g,"\\(").replace(/\\{2,}\\\)/g,"\\)"),t=t.replace(/\\\[/g,"$$$$").replace(/\\\]/g,"$$$$"),t=t.replace(/\\/g,"\\\\"),t=t.replace(/\\\(/g,"$"),t=t.replace(/\\\)/g,"$"),t=t.replace(/\\\]/g,"$$"),t=t.replace(/\\\[/g,"$$"),t.trim()}function Wf(e){return ga(e,{breaks:!1,gfm:!0}).replace(/

    \s*<\/p>/g,"")}const Vf={loader:{load:["[tex]/ams"]},tex:{packages:{"[+]":["ams"]},inlineMath:[["\\(","\\)"],["$","$"]],displayMath:[["\\[","\\]"],["$$","$$"]],linebreaks:{automatic:!0,width:"100%"}},svg:{linebreaks:{automatic:!0}},options:{output:"chtml"}};function Yf(){var e;const t=I(),{grade:n,course_name:i,chapter:a}=t.state||{},o=null===(e=t.state)||void 0===e?void 0:e.session_id,[s,l]=(0,r.useState)(o||null),c="https://api.racine-ai.com",[u,h]=(0,r.useState)([]),[d,p]=(0,r.useState)({}),[f,m]=(0,r.useState)(0);(0,r.useEffect)((()=>{!s&&n&&i&&a&&fetch(`${c}/session/latest`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({grade:n,course:i,chapter:a})}).then((e=>e.json())).then((e=>l(e.session_id))).catch((e=>console.error("Fetch latest session error:",e)))}),[c,n,i,a,s]),(0,r.useEffect)((()=>{n&&i&&a&&s&&fetch(`${c}/session/recap/${n}/${i}/${a}/${s}`,{credentials:"include"}).then((e=>e.json())).then((e=>{const t=e.sort(((e,t)=>e.timestamp-t.timestamp));h(t);const n=t.reduce(((e,t)=>e+t.grade),0);m((n/(t.length||1)).toFixed(1))})).catch((e=>console.error("Fetch recap error:",e)))}),[c,n,i,a,s]);return(0,xn.jsx)(ka,{config:Vf,children:(0,xn.jsxs)("div",{className:jf,children:[(0,xn.jsx)("h2",{children:"Session Recap"}),(0,xn.jsxs)("p",{className:Lf,children:["Average Score: ",f," / 5"]}),(0,xn.jsx)("div",{className:Df,children:u.map((e=>{const t=(e=>{const t=Math.max(0,Math.min(e/5,1));return`hsl(${Math.round(120*t)}, 70%, 60%)`})(e.grade);return(0,xn.jsxs)("div",{className:If,children:[(0,xn.jsxs)("div",{className:Bf,style:{backgroundColor:t},onClick:()=>{return t=e.exercise_id,p((e=>({...e,[t]:!e[t]})));var t},children:[(0,xn.jsxs)("span",{children:["Exercise ",e.exercise_id]}),(0,xn.jsx)("span",{children:e.error_type}),(0,xn.jsx)("span",{children:d[e.exercise_id]?(0,xn.jsx)(Qn,{}):(0,xn.jsx)(Xn,{})})]}),d[e.exercise_id]&&(0,xn.jsxs)("div",{className:Ff,children:[(0,xn.jsx)("h3",{children:"Exercise"}),(0,xn.jsx)(Ta,{dynamic:!0,children:(0,xn.jsx)("div",{className:Hf,dangerouslySetInnerHTML:{__html:Wf(e.question)}})}),(0,xn.jsx)("h3",{children:"Your answer"}),(0,xn.jsx)("div",{className:$f,style:{whiteSpace:"pre-wrap"},children:e.student_answer_parsed}),(0,xn.jsx)(Ta,{dynamic:!0,children:(0,xn.jsx)("div",{className:Uf,dangerouslySetInnerHTML:{__html:Wf(qf(e.feedback))}})})]})]},e.exercise_id)}))})]})})}const Gf="UploadImagePage_uploadWrapper__p1cSm",Xf="UploadImagePage_placeholder__PTmga",Qf="UploadImagePage_previewImage__dFFro",Kf="UploadImagePage_buttonGroup__YOdNF",Jf="UploadImagePage_takePhotoBtn__I7Y37",Zf="UploadImagePage_uploadButton__FtlUo",em="UploadImagePage_statusMessage__l--ea";function tm(){const e="https://api.racine-ai.com",[t]=ee(),n=B(),i=t.get("type"),a=t.get("homework_id")||"",o=t.get("exercise_id")||"",s=t.get("grade")||"",l=t.get("course_name")||"",c=t.get("chapter")||"",u=t.get("problem")||"",h=a&&o?"homework_exercise":"homework"===i?"homework":"exercise",d={exercise:"your work",homework:"Homework",homework_exercise:"your work"}[h],[p,f]=(0,r.useState)(null),[m,g]=(0,r.useState)(""),[b,y]=(0,r.useState)(""),[v,x]=(0,r.useState)(""),w=(0,r.useRef)(null),_=()=>{var e;return null===(e=w.current)||void 0===e?void 0:e.click()};return(0,r.useEffect)((()=>{let t;if("exercise"===h)t=`/upload_status_all/${encodeURIComponent(s)}/${encodeURIComponent(l)}/${encodeURIComponent(c)}/${encodeURIComponent(u)}`;else{if("homework_exercise"!==h)return;t=`/upload/homework/status/exercise/${encodeURIComponent(a)}/${encodeURIComponent(o)}`}const n=setInterval((async()=>{try{const n=await fetch(e+t,{credentials:"include"});if(!n.ok)return;await n.json()}catch(n){console.error("Polling error:",n)}}),3e3);return()=>clearInterval(n)}),[e,h,a,o,s,l,c,u]),(0,xn.jsxs)("div",{className:Gf,children:[(0,xn.jsxs)("h2",{children:["Upload ",d]}),b?(0,xn.jsx)("img",{src:b,alt:"Preview",className:Qf,onError:()=>x("Preview failed")}):m?(0,xn.jsx)("div",{className:Xf,children:(0,xn.jsxs)("p",{children:["Selected: ",m]})}):(0,xn.jsx)("div",{className:Xf,children:(0,xn.jsxs)("p",{children:["No ",d.toLowerCase()," selected"]})}),(0,xn.jsx)("input",{type:"file",accept:"exercise"===h?"image/*":"image/*,application/pdf",ref:w,style:{display:"none"},onChange:e=>{const t=e.target.files[0];t&&(f(t),g(t.name),y(t.type.startsWith("image/")?URL.createObjectURL(t):""))}}),(0,xn.jsxs)("div",{className:Kf,children:[(0,xn.jsx)("button",{className:Jf,onClick:_,children:"Select a Picture"}),"exercise"!==h&&(0,xn.jsx)("button",{className:Jf,onClick:_,children:"Select File"}),(0,xn.jsxs)("button",{className:Zf,onClick:async()=>{if(!p)return void x(`No ${d.toLowerCase()} selected`);const t=e.replace(/\/+$/,"");let r,i=p;if(i.type.startsWith("image/")&&i.size>1e6)try{i=await(f=i,new Promise(((e,t)=>{const n=new Image;n.onload=()=>{const r=1600/Math.max(n.width,n.height),i=Math.round(n.width*Math.min(1,r)),a=Math.round(n.height*Math.min(1,r)),o=document.createElement("canvas");o.width=i,o.height=a,o.getContext("2d").drawImage(n,0,0,i,a),o.toBlob((n=>n?e(new File([n],"photo.jpg",{type:"image/jpeg"})):t(new Error("toBlob failed"))),"image/jpeg",.8)},n.onerror=()=>t(new Error("load error")),n.src=URL.createObjectURL(f)})))}catch(v){console.warn("resize failed, sending original:",v)}var f;r="exercise"===h?`/upload/image/${encodeURIComponent(s)}/${encodeURIComponent(l)}/${encodeURIComponent(c)}/${encodeURIComponent(u)}`:"homework_exercise"===h?`/upload/homework/image/${encodeURIComponent(a)}/${encodeURIComponent(o)}`:"/upload/homework";const m=t+r,b=new FormData;b.append("file",i,"");try{const e=await fetch(m,{method:"POST",body:b,credentials:"include"});if(!e.ok){const t=await e.text();throw new Error(t||"Upload failed")}await e.json();x("Upload successful"),y(""),g(""),"homework"===h&&n("/homework/history")}catch(w){console.error("Upload error:",w),x(`Upload failed: ${w.message}`)}},children:["Upload ",d]})]}),v&&(0,xn.jsx)("p",{className:em,children:v})]})}function nm(e){return nm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nm(e)}function rm(e){var t=function(e,t){if("object"!=nm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=nm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==nm(t)?t:t+""}function im(e,t){for(var n=0;nt?(o&&(clearTimeout(o),o=null),s=c,a=e.apply(r,i),o||(r=i=null)):o||!1===n.trailing||(o=setTimeout(l,u)),a}}(dm.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=dm.prototype._strokeUpdate,this.dotSize=r.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=r.penColor||"black",this.backgroundColor=r.backgroundColor||"rgba(0,0,0,0)",this.onBegin=r.onBegin,this.onEnd=r.onEnd,this._canvas=e,this._ctx=e.getContext("2d"),this.clear(),this._handleMouseDown=function(e){1===e.which&&(n._mouseButtonDown=!0,n._strokeBegin(e))},this._handleMouseMove=function(e){n._mouseButtonDown&&n._strokeMoveUpdate(e)},this._handleMouseUp=function(e){1===e.which&&n._mouseButtonDown&&(n._mouseButtonDown=!1,n._strokeEnd(e))},this._handleTouchStart=function(e){if(1===e.targetTouches.length){var t=e.changedTouches[0];n._strokeBegin(t)}},this._handleTouchMove=function(e){e.preventDefault();var t=e.targetTouches[0];n._strokeMoveUpdate(t)},this._handleTouchEnd=function(e){e.target===n._canvas&&(e.preventDefault(),n._strokeEnd(e))},this.on()}um.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1},um.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},um.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time},hm.prototype.length=function(){for(var e=0,t=void 0,n=void 0,r=0;r<=10;r+=1){var i=r/10,a=this._point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),o=this._point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(r>0){var s=a-t,l=o-n;e+=Math.sqrt(s*s+l*l)}t=a,n=o}return e},hm.prototype._point=function(e,t,n,r,i){return t*(1-e)*(1-e)*(1-e)+3*n*(1-e)*(1-e)*e+3*r*(1-e)*e*e+i*e*e*e},dm.prototype.clear=function(){var e=this._ctx,t=this._canvas;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(),this._isEmpty=!0},dm.prototype.fromDataURL=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new Image,i=n.ratio||window.devicePixelRatio||1,a=n.width||this._canvas.width/i,o=n.height||this._canvas.height/i;this._reset(),r.src=e,r.onload=function(){t._ctx.drawImage(r,0,0,a,o)},this._isEmpty=!1},dm.prototype.toDataURL=function(e){var t;if("image/svg+xml"===e)return this._toSVG();for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i2,n=this.points[0];if(!t&&n&&this._drawDot(n),n){var r=this._data[this._data.length-1],i=r[r.length-1];n.equals(i)||r.push({x:n.x,y:n.y,time:n.time,color:this.penColor})}"function"===typeof this.onEnd&&this.onEnd(e)},dm.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},dm.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},dm.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},dm.prototype._createPoint=function(e,t,n){var r=this._canvas.getBoundingClientRect();return new um(e-r.left,t-r.top,n||(new Date).getTime())},dm.prototype._addPoint=function(e){var t=this.points;if(t.push(e),t.length>2){3===t.length&&t.unshift(t[0]);var n=this._calculateCurveControlPoints(t[0],t[1],t[2]).c2,r=this._calculateCurveControlPoints(t[1],t[2],t[3]).c1,i=new hm(t[1],n,r,t[2]),a=this._calculateCurveWidths(i);return t.shift(),{curve:i,widths:a}}return{}},dm.prototype._calculateCurveControlPoints=function(e,t,n){var r=e.x-t.x,i=e.y-t.y,a=t.x-n.x,o=t.y-n.y,s=(e.x+t.x)/2,l=(e.y+t.y)/2,c=(t.x+n.x)/2,u=(t.y+n.y)/2,h=Math.sqrt(r*r+i*i),d=Math.sqrt(a*a+o*o),p=d/(h+d),f=c+(s-c)*p,m=u+(l-u)*p,g=t.x-f,b=t.y-m;return{c1:new um(s+g,l+b),c2:new um(c+g,u+b)}},dm.prototype._calculateCurveWidths=function(e){var t=e.startPoint,n=e.endPoint,r={start:null,end:null},i=this.velocityFilterWeight*n.velocityFrom(t)+(1-this.velocityFilterWeight)*this._lastVelocity,a=this._strokeWidth(i);return r.start=this._lastWidth,r.end=a,this._lastVelocity=i,this._lastWidth=a,r},dm.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)},dm.prototype._drawPoint=function(e,t,n){var r=this._ctx;r.moveTo(e,t),r.arc(e,t,n,0,2*Math.PI,!1),this._isEmpty=!1},dm.prototype._drawCurve=function(e,t,n){var r=this._ctx,i=n-t,a=Math.floor(e.length());r.beginPath();for(var o=0;o1)for(var a=0;a',l=o.innerHTML;if(void 0===l){var c=document.createElement("dummy"),u=o.childNodes;c.innerHTML="";for(var h=0;h")},dm.prototype.fromData=function(e){var t=this;this.clear(),this._fromData(e,(function(e,n){return t._drawCurve(e,n.start,n.end)}),(function(e){return t._drawDot(e)})),this._data=e},dm.prototype.toData=function(){return this._data};const pm=dm;var fm=n(2576),mm=["canvasProps","clearOnResize"],gm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&am(e,t)}(n,e);var t=function(e){var t=sm();return function(){var n,r=om(e);if(t){var i=om(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lm(this,n)}}(n);function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var i=arguments.length,o=new Array(i),s=0;s{var t;const n=null===(t=e.current)||void 0===t?void 0:t.getCanvas();n&&C([n.toDataURL()])}),[]);const E=()=>{clearTimeout(t.current),t.current=setTimeout((async()=>{const t=(()=>{const t=e.current.getCanvas(),n=document.createElement("canvas");n.width=t.width,n.height=t.height;const r=n.getContext("2d");r.fillStyle="#fff",r.fillRect(0,0,n.width,n.height),r.drawImage(t,0,0);const i=n.toDataURL("image/jpeg",.8),[,a]=i.split(","),o=atob(a),s=Uint8Array.from(o,(e=>e.charCodeAt(0)));return new Blob([s],{type:"image/jpeg"})})(),r=new FormData;r.append("file",t,"handwriting.jpg");const i=h?`/upload/homework/image/${encodeURIComponent(a)}/${encodeURIComponent(o)}`:`/upload/image/${encodeURIComponent(s)}/${encodeURIComponent(l)}/${encodeURIComponent(c)}/${encodeURIComponent(u)}`;try{await fetch(n+i,{method:"POST",body:r,credentials:"include"})}catch(d){console.error("Upload error:",d)}}),1e3)};(0,r.useEffect)((()=>{var t,n;const r=null===(t=e.current)||void 0===t||null===(n=t.getCanvas())||void 0===n?void 0:n.getContext("2d");r&&(r.globalCompositeOperation="eraser"===d?"destination-out":"source-over",r.strokeStyle="pen"===d?f:"#000",r.lineWidth=g)}),[d,f,g]);return(0,xn.jsxs)("div",{className:bm,children:[(0,xn.jsxs)("div",{className:ym,children:[(0,xn.jsx)("button",{onClick:()=>{if(S.length<2)return;const t=[...S],n=t.pop(),r=t[t.length-1];C(t),T((e=>[...e,n])),e.current.clear(),e.current.fromDataURL(r),E()},disabled:S.length<2,className:vm,children:(0,xn.jsx)(or,{})}),(0,xn.jsx)("button",{onClick:()=>{if(0===M.length)return;const t=[...M],n=t.pop();T(t),C((e=>[...e,n])),e.current.clear(),e.current.fromDataURL(n),E()},disabled:0===M.length,className:vm,children:(0,xn.jsx)(tr,{})}),(0,xn.jsxs)("div",{className:wm,children:[(0,xn.jsx)("button",{className:`${vm} ${"pen"===d?xm:""}`,onClick:()=>{p("pen"),w((e=>!e)),k(!1),v(!1)},children:(0,xn.jsx)(er,{})}),x&&(0,xn.jsx)("div",{className:_m,children:[2,5,8].map((e=>(0,xn.jsx)("div",{className:km,style:{width:2*e,height:2*e,background:f},onClick:()=>{b(e),w(!1)}},e)))})]}),(0,xn.jsxs)("div",{className:wm,children:[(0,xn.jsx)("button",{className:`${vm} ${"eraser"===d?xm:""}`,onClick:()=>{p("eraser"),k((e=>!e)),w(!1),v(!1)},children:(0,xn.jsx)(Kn,{})}),_&&(0,xn.jsx)("div",{className:_m,children:[10,20,30].map((e=>(0,xn.jsx)("div",{className:km,style:{width:e,height:e,background:"#ddd"},onClick:()=>{b(e),k(!1)}},e)))})]}),(0,xn.jsxs)("div",{className:wm,children:[(0,xn.jsx)("button",{className:vm,onClick:()=>{v((e=>!e)),w(!1),k(!1)},children:(0,xn.jsx)(Zn,{})}),y&&(0,xn.jsx)("div",{className:Sm,children:["#000","#FF3B30","#FF9500","#FFCC00","#4CD964","#5AC8FA","#0579FF","#5856D6"].map((e=>(0,xn.jsx)("span",{className:Cm,style:{background:e},onClick:()=>{m(e),v(!1)}},e)))})]}),(0,xn.jsx)("button",{className:Mm,onClick:()=>{e.current.clear();const t=e.current.getCanvas().toDataURL();C([t]),T([]),E()},children:"Clear"})]}),(0,xn.jsx)("div",{className:Tm,children:(0,xn.jsx)(gm,{ref:e,penColor:"pen"===d?f:"#000",minWidth:g,maxWidth:g,onEnd:()=>{var t;const n=null===(t=e.current)||void 0===t?void 0:t.getCanvas();n&&(C((e=>[...e,n.toDataURL()])),T([]),E())},canvasProps:{className:Em,style:{touchAction:"none",background:"#f9f9fc",backgroundImage:"linear-gradient(90deg,rgba(0,0,0,0.02) 1px,transparent 1px),linear-gradient(rgba(0,0,0,0.02) 1px,transparent 1px)",backgroundSize:"25px 25px"}}})})]})}const Nm="TeacherDashboard_wrapper__YN8lW",Pm="TeacherDashboard_headerStats__7iOob",zm="TeacherDashboard_statCard__rYfMN",Om="TeacherDashboard_emoji__WMHKO",Rm="TeacherDashboard_value__m79DS",jm="TeacherDashboard_label__1u1gG",Lm="TeacherDashboard_classList__J6gI2",Dm="TeacherDashboard_classBlock__xLKez",Im="TeacherDashboard_classBtn__jx8FZ",Bm="TeacherDashboard_arrow__rQF3f",Fm="TeacherDashboard_contentArea__foUHC",Hm="TeacherDashboard_chartBox__kxJSb",$m="TeacherDashboard_tableSection__nF326",Um="TeacherDashboard_tableWrapper__XB65j",qm="TeacherDashboard_dataTable__0JVkZ",Wm="TeacherDashboard_goodCell__Anfrk",Vm="TeacherDashboard_badProgCell__ss-AC",Ym="TeacherDashboard_badErrCell__EbFvW",Gm="TeacherDashboard_toggleBtn__Kh3sr",Xm="TeacherDashboard_practiceCard__TQnBo",Qm="TeacherDashboard_practiceHeader__mg1Rw",Km="TeacherDashboard_practiceBody__BkAk+",Jm="TeacherDashboard_field__OBo6D",Zm="TeacherDashboard_createBtn__eXgLL";function eg(e){return e+.5|0}const tg=(e,t,n)=>Math.max(Math.min(e,n),t);function ng(e){return tg(eg(2.55*e),0,255)}function rg(e){return tg(eg(255*e),0,255)}function ig(e){return tg(eg(e/2.55)/100,0,1)}function ag(e){return tg(eg(100*e),0,100)}const og={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},sg=[..."0123456789ABCDEF"],lg=e=>sg[15&e],cg=e=>sg[(240&e)>>4]+sg[15&e],ug=e=>(240&e)>>4===(15&e);function hg(e){var t=(e=>ug(e.r)&&ug(e.g)&&ug(e.b)&&ug(e.a))(e)?lg:cg;return e?"#"+t(e.r)+t(e.g)+t(e.b)+((e,t)=>e<255?t(e):"")(e.a,t):void 0}const dg=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function pg(e,t,n){const r=t*Math.min(n,1-n),i=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+e/30)%12;return n-r*Math.max(Math.min(i-3,9-i,1),-1)};return[i(0),i(8),i(4)]}function fg(e,t,n){const r=function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(r+e/60)%6;return n-n*t*Math.max(Math.min(i,4-i,1),0)};return[r(5),r(3),r(1)]}function mg(e,t,n){const r=pg(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function gg(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;let s,l,c;return i!==a&&(c=i-a,l=o>.5?c/(2-i-a):c/(i+a),s=function(e,t,n,r,i){return e===i?(t-n)/r+(t>16&255,a>>8&255,255&a]}return e}(),kg.transparent=[0,0,0,0]);const t=kg[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}const Cg=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Mg=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,Tg=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Eg(e,t,n){if(e){let r=gg(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,0===t?360:1)),r=yg(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Ag(e,t){return e?Object.assign(t||{},e):e}function Ng(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=rg(e[3]))):(t=Ag(e,{r:0,g:0,b:0,a:1})).a=rg(t.a),t}function Pg(e){return"r"===e.charAt(0)?function(e){const t=Cg.exec(e);let n,r,i,a=255;if(t){if(t[7]!==n){const e=+t[7];a=t[8]?ng(e):tg(255*e,0,255)}return n=+t[1],r=+t[3],i=+t[5],n=255&(t[2]?ng(n):tg(n,0,255)),r=255&(t[4]?ng(r):tg(r,0,255)),i=255&(t[6]?ng(i):tg(i,0,255)),{r:n,g:r,b:i,a:a}}}(e):xg(e)}class zg{constructor(e){if(e instanceof zg)return e;const t=typeof e;let n;"object"===t?n=Ng(e):"string"===t&&(n=function(e){var t,n=e.length;return"#"===e[0]&&(4===n||5===n?t={r:255&17*og[e[1]],g:255&17*og[e[2]],b:255&17*og[e[3]],a:5===n?17*og[e[4]]:255}:7!==n&&9!==n||(t={r:og[e[1]]<<4|og[e[2]],g:og[e[3]]<<4|og[e[4]],b:og[e[5]]<<4|og[e[6]],a:9===n?og[e[7]]<<4|og[e[8]]:255})),t}(e)||Sg(e)||Pg(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=Ag(this._rgb);return e&&(e.a=ig(e.a)),e}set rgb(e){this._rgb=Ng(e)}rgbString(){return this._valid?(e=this._rgb)&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${ig(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`):void 0;var e}hexString(){return this._valid?hg(this._rgb):void 0}hslString(){return this._valid?function(e){if(!e)return;const t=gg(e),n=t[0],r=ag(t[1]),i=ag(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${ig(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}(this._rgb):void 0}mix(e,t){if(e){const n=this.rgb,r=e.rgb;let i;const a=t===i?.5:t,o=2*a-1,s=n.a-r.a,l=((o*s===-1?o:(o+s)/(1+o*s))+1)/2;i=1-l,n.r=255&l*n.r+i*r.r+.5,n.g=255&l*n.g+i*r.g+.5,n.b=255&l*n.b+i*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=function(e,t,n){const r=Tg(ig(e.r)),i=Tg(ig(e.g)),a=Tg(ig(e.b));return{r:rg(Mg(r+n*(Tg(ig(t.r))-r))),g:rg(Mg(i+n*(Tg(ig(t.g))-i))),b:rg(Mg(a+n*(Tg(ig(t.b))-a))),a:e.a+n*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}clone(){return new zg(this.rgb)}alpha(e){return this._rgb.a=rg(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=eg(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Eg(this._rgb,2,e),this}darken(e){return Eg(this._rgb,2,-e),this}saturate(e){return Eg(this._rgb,1,e),this}desaturate(e){return Eg(this._rgb,1,-e),this}rotate(e){return function(e,t){var n=gg(e);n[0]=vg(n[0]+t),n=yg(n),e.r=n[0],e.g=n[1],e.b=n[2]}(this._rgb,e),this}}function Og(){}const Rg=(()=>{let e=0;return()=>e++})();function jg(e){return null===e||void 0===e}function Lg(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function Dg(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function Ig(e){return("number"===typeof e||e instanceof Number)&&isFinite(+e)}function Bg(e,t){return Ig(e)?e:t}function Fg(e,t){return"undefined"===typeof e?t:e}const Hg=(e,t)=>"string"===typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function $g(e,t,n){if(e&&"function"===typeof e.call)return e.apply(n,t)}function Ug(e,t,n,r){let i,a,o;if(Lg(e))if(a=e.length,r)for(i=a-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function Jg(e,t){const n=Kg[t]||(Kg[t]=function(e){const t=function(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}(e);return e=>{for(const n of t){if(""===n)break;e=e&&e[n]}return e}}(t));return n(e)}function Zg(e){return e.charAt(0).toUpperCase()+e.slice(1)}const eb=e=>"undefined"!==typeof e,tb=e=>"function"===typeof e,nb=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};const rb=Math.PI,ib=2*rb,ab=ib+rb,ob=Number.POSITIVE_INFINITY,sb=rb/180,lb=rb/2,cb=rb/4,ub=2*rb/3,hb=Math.log10,db=Math.sign;function pb(e,t,n){return Math.abs(e-t)l&&c3&&void 0!==arguments[3]?arguments[3]:1e-6;return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Tb(e,t,n){n=n||(n=>e[n]1;)r=a+i>>1,n(r)?a=r:i=r;return{lo:a,hi:i}}const Eb=(e,t,n,r)=>Tb(e,n,r?r=>{const i=e[r][t];return ie[r][t]Tb(e,n,(r=>e[r][t]>=n));const Nb=["push","pop","shift","splice","unshift"];function Pb(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);-1!==i&&r.splice(i,1),r.length>0||(Nb.forEach((t=>{delete e[t]})),delete e._chartjs)}function zb(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const Ob="undefined"===typeof window?function(e){return e()}:window.requestAnimationFrame;function Rb(e,t){let n=[],r=!1;return function(){for(var i=arguments.length,a=new Array(i),o=0;o{r=!1,e.apply(t,n)})))}}const jb=e=>"start"===e?"left":"end"===e?"right":"center",Lb=(e,t,n)=>"start"===e?t:"end"===e?n:(t+n)/2;function Db(e,t,n){const r=t.length;let i=0,a=r;if(e._sorted){const{iScale:o,vScale:s,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:h,max:d,minDefined:p,maxDefined:f}=o.getUserBounds();if(p){if(i=Math.min(Eb(l,u,h).lo,n?r:Eb(t,u,o.getPixelForValue(h)).lo),c){const e=l.slice(0,i+1).reverse().findIndex((e=>!jg(e[s.axis])));i-=Math.max(0,e)}i=Cb(i,0,r-1)}if(f){let e=Math.max(Eb(l,o.axis,d,!0).hi+1,n?0:Eb(t,u,o.getPixelForValue(d),!0).hi+1);if(c){const t=l.slice(e-1).findIndex((e=>!jg(e[s.axis])));e+=Math.max(0,t)}a=Cb(e,i,r)-i}else a=r-i}return{start:i,count:a}}function Ib(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}const Bb=e=>0===e||1===e,Fb=(e,t,n)=>-Math.pow(2,10*(e-=1))*Math.sin((e-t)*ib/n),Hb=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*ib/n)+1,$b={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*lb),easeOutSine:e=>Math.sin(e*lb),easeInOutSine:e=>-.5*(Math.cos(rb*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>Bb(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Bb(e)?e:Fb(e,.075,.3),easeOutElastic:e=>Bb(e)?e:Hb(e,.075,.3),easeInOutElastic(e){const t=.1125;return Bb(e)?e:e<.5?.5*Fb(2*e,t,.45):.5+.5*Hb(2*e-1,t,.45)},easeInBack(e){const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:e=>1-$b.easeOutBounce(1-e),easeOutBounce(e){const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?.5*$b.easeInBounce(2*e):.5*$b.easeOutBounce(2*e-1)+.5};function Ub(e){if(e&&"object"===typeof e){const t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function qb(e){return Ub(e)?e:new zg(e)}function Wb(e){return Ub(e)?e:new zg(e).saturate(.5).darken(.1).hexString()}const Vb=["x","y","borderWidth","radius","tension"],Yb=["color","borderColor","backgroundColor"];const Gb=new Map;function Xb(e,t,n){return function(e,t){t=t||{};const n=e+JSON.stringify(t);let r=Gb.get(n);return r||(r=new Intl.NumberFormat(e,t),Gb.set(n,r)),r}(t,n).format(e)}const Qb={values:e=>Lg(e)?e:""+e,numeric(e,t,n){if(0===e)return"0";const r=this.chart.options.locale;let i,a=e;if(n.length>1){const t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>1e15)&&(i="scientific"),a=function(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e));return n}(e,n)}const o=hb(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Xb(e,r,l)},logarithmic(e,t,n){if(0===e)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(hb(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?Qb.numeric.call(this,e,t,n):""}};var Kb={formatters:Qb};const Jb=Object.create(null),Zb=Object.create(null);function ey(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;re.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>Wb(t.backgroundColor),this.hoverBorderColor=(e,t)=>Wb(t.borderColor),this.hoverColor=(e,t)=>Wb(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return ty(this,e,t)}get(e){return ey(this,e)}describe(e,t){return ty(Zb,e,t)}override(e,t){return ty(Jb,e,t)}route(e,t,n,r){const i=ey(this,e),a=ey(this,n),o="_"+t;Object.defineProperties(i,{[o]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){const e=this[o],t=a[r];return Dg(e)?Object.assign({},t,e):Fg(e,t)},set(e){this[o]=e}}})}apply(e){e.forEach((e=>e(this)))}}var ry=new ny({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),e.set("animations",{colors:{type:"color",properties:Yb},numbers:{type:"number",properties:Vb}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>0|e}}}})},function(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Kb.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e&&"dash"!==e}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:e=>"backdropPadding"!==e&&"callback"!==e,_indexable:e=>"backdropPadding"!==e})}]);function iy(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function ay(e,t,n){const r=e.currentDevicePixelRatio,i=0!==n?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function oy(e,t){(t||e)&&((t=t||e.getContext("2d")).save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function sy(e,t,n,r){ly(e,t,n,r,null)}function ly(e,t,n,r,i){let a,o,s,l,c,u,h,d;const p=t.pointStyle,f=t.rotation,m=t.radius;let g=(f||0)*sb;if(p&&"object"===typeof p&&(a=p.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),void e.restore();if(!(isNaN(m)||m<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,r,i/2,m,0,0,ib):e.arc(n,r,m,0,ib),e.closePath();break;case"triangle":u=i?i/2:m,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*m),g+=ub,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*m),g+=ub,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*m),e.closePath();break;case"rectRounded":c=.516*m,l=m-c,o=Math.cos(g+cb)*l,h=Math.cos(g+cb)*(i?i/2-c:l),s=Math.sin(g+cb)*l,d=Math.sin(g+cb)*(i?i/2-c:l),e.arc(n-h,r-s,c,g-rb,g-lb),e.arc(n+d,r-o,c,g-lb,g),e.arc(n+h,r+s,c,g,g+lb),e.arc(n-d,r+o,c,g+lb,g+rb),e.closePath();break;case"rect":if(!f){l=Math.SQRT1_2*m,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}g+=cb;case"rectRot":h=Math.cos(g)*(i?i/2:m),o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*(i?i/2:m),e.moveTo(n-h,r-s),e.lineTo(n+d,r-o),e.lineTo(n+h,r+s),e.lineTo(n-d,r+o),e.closePath();break;case"crossRot":g+=cb;case"cross":h=Math.cos(g)*(i?i/2:m),o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*(i?i/2:m),e.moveTo(n-h,r-s),e.lineTo(n+h,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o);break;case"star":h=Math.cos(g)*(i?i/2:m),o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*(i?i/2:m),e.moveTo(n-h,r-s),e.lineTo(n+h,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o),g+=cb,h=Math.cos(g)*(i?i/2:m),o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*(i?i/2:m),e.moveTo(n-h,r-s),e.lineTo(n+h,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o);break;case"line":o=i?i/2:Math.cos(g)*m,s=Math.sin(g)*m,e.moveTo(n-o,r-s),e.lineTo(n+o,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(i?i/2:m),r+Math.sin(g)*m);break;case!1:e.closePath()}e.fill(),t.borderWidth>0&&e.stroke()}}function cy(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y5&&void 0!==arguments[5]?arguments[5]:{};const o=Lg(t)?t:[t],s=a.strokeWidth>0&&""!==a.strokeColor;let l,c;for(e.save(),e.font=i.string,function(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),jg(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}(e,a),l=0;lFg(e[n],e[t[n]]):t=>e[t]:()=>e;for(const o of i)n[o]=+a(o)||0;return n}function _y(e){return wy(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ky(e){return wy(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Sy(e){const t=_y(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Cy(e,t){e=e||{},t=t||ry.font;let n=Fg(e.size,t.size);"string"===typeof n&&(n=parseInt(n,10));let r=Fg(e.style,t.style);r&&!(""+r).match(vy)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Fg(e.family,t.family),lineHeight:xy(Fg(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Fg(e.weight,t.weight),string:""};return i.string=function(e){return!e||jg(e.size)||jg(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(i),i}function My(e,t,n,r){let i,a,o,s=!0;for(i=0,a=e.length;i1&&void 0!==arguments[1]?arguments[1]:[""],n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>e[0];const i=(arguments.length>2?arguments[2]:void 0)||e;"undefined"===typeof n&&(n=By("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Ey([r,...e],t,i,n)};return new Proxy(a,{deleteProperty:(t,n)=>(delete t[n],delete t._keys,delete e[0][n],!0),get:(n,r)=>Oy(n,r,(()=>function(e,t,n,r){let i;for(const a of t)if(i=By(Py(a,e),n),"undefined"!==typeof i)return zy(e,i)?Dy(n,r,e,i):i}(r,t,e,n))),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e._scopes[0],t),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(e,t)=>Fy(e).includes(t),ownKeys:e=>Fy(e),set(e,t,n){const i=e._storage||(e._storage=r());return e[t]=i[t]=n,delete e._keys,!0}})}function Ay(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Ny(e,r),setContext:t=>Ay(e,t,n,r),override:i=>Ay(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty:(t,n)=>(delete t[n],delete e[n],!0),get:(e,t,n)=>Oy(e,t,(()=>function(e,t,n){const{_proxy:r,_context:i,_subProxy:a,_descriptors:o}=e;let s=r[t];tb(s)&&o.isScriptable(t)&&(s=function(e,t,n,r){const{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(a,o||r);s.delete(e),zy(e,l)&&(l=Dy(i._scopes,i,e,l));return l}(t,s,e,n));Lg(s)&&s.length&&(s=function(e,t,n,r){const{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=n;if("undefined"!==typeof a.index&&r(e))return t[a.index%t.length];if(Dg(t[0])){const n=t,r=i._scopes.filter((e=>e!==n));t=[];for(const l of n){const n=Dy(r,i,e,l);t.push(Ay(n,a,o&&o[e],s))}}return t}(t,s,e,o.isIndexable));zy(t,s)&&(s=Ay(s,i,a&&a[t],o));return s}(e,t,n))),getOwnPropertyDescriptor:(t,n)=>t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,n)=>Reflect.has(e,n),ownKeys:()=>Reflect.ownKeys(e),set:(t,n,r)=>(e[n]=r,delete t[n],!0)})}function Ny(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0};const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:tb(n)?n:()=>n,isIndexable:tb(r)?r:()=>r}}const Py=(e,t)=>e?e+Zg(t):t,zy=(e,t)=>Dg(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function Oy(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||"constructor"===t)return e[t];const r=n();return e[t]=r,r}function Ry(e,t,n){return tb(e)?e(t,n):e}const jy=(e,t)=>!0===e?t:"string"===typeof e?Jg(t,e):void 0;function Ly(e,t,n,r,i){for(const a of t){const t=jy(n,a);if(t){e.add(t);const a=Ry(t._fallback,n,i);if("undefined"!==typeof a&&a!==n&&a!==r)return a}else if(!1===t&&"undefined"!==typeof r&&n!==r)return null}return!1}function Dy(e,t,n,r){const i=t._rootScopes,a=Ry(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let l=Iy(s,o,n,a||n,r);return null!==l&&(("undefined"===typeof a||a===n||(l=Iy(s,o,a,l,r),null!==l))&&Ey(Array.from(s),[""],i,a,(()=>function(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];if(Lg(i)&&Dg(n))return n;return i||{}}(t,n,r))))}function Iy(e,t,n,r,i){for(;n;)n=Ly(e,t,n,r,i);return n}function By(e,t){for(const n of t){if(!n)continue;const t=n[e];if("undefined"!==typeof t)return t}}function Fy(e){let t=e._keys;return t||(t=e._keys=function(e){const t=new Set;for(const n of e)for(const e of Object.keys(n).filter((e=>!e.startsWith("_"))))t.add(e);return Array.from(t)}(e._scopes)),t}const Hy=Number.EPSILON||1e-14,$y=(e,t)=>t"x"===e?"y":"x";function qy(e,t,n,r){const i=e.skip?t:e,a=t,o=n.skip?t:n,s=wb(a,i),l=wb(o,a);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const h=r*c,d=r*u;return{previous:{x:a.x-h*(o.x-i.x),y:a.y-h*(o.y-i.y)},next:{x:a.x+d*(o.x-i.x),y:a.y+d*(o.y-i.y)}}}function Wy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x";const n=Uy(t),r=e.length,i=Array(r).fill(0),a=Array(r);let o,s,l,c=$y(e,0);for(o=0;o2&&void 0!==arguments[2]?arguments[2]:"x";const r=Uy(n),i=e.length;let a,o,s,l=$y(e,0);for(let c=0;c!e.skip))),"monotone"===t.cubicInterpolationMode)Wy(e,i);else{let n=r?e[e.length-1]:e[0];for(a=0,o=e.length;ae.ownerDocument.defaultView.getComputedStyle(e,null);const Jy=["top","right","bottom","left"];function Zy(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const a=Jy[i];r[a]=parseFloat(e[t+"-"+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function ev(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Ky(n),a="border-box"===i.boxSizing,o=Zy(i,"padding"),s=Zy(i,"border","width"),{x:l,y:c,box:u}=function(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r;let o,s,l=!1;if(((e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot))(i,a,e.target))o=i,s=a;else{const e=t.getBoundingClientRect();o=r.clientX-e.left,s=r.clientY-e.top,l=!0}return{x:o,y:s,box:l}}(e,n),h=o.left+(u&&s.left),d=o.top+(u&&s.top);let{width:p,height:f}=t;return a&&(p-=o.width+s.width,f-=o.height+s.height),{x:Math.round((l-h)/p*n.width/r),y:Math.round((c-d)/f*n.height/r)}}const tv=e=>Math.round(10*e)/10;function nv(e,t,n,r){const i=Ky(e),a=Zy(i,"margin"),o=Qy(i.maxWidth,e,"clientWidth")||ob,s=Qy(i.maxHeight,e,"clientHeight")||ob,l=function(e,t,n){let r,i;if(void 0===t||void 0===n){const a=e&&Xy(e);if(a){const e=a.getBoundingClientRect(),o=Ky(a),s=Zy(o,"border","width"),l=Zy(o,"padding");t=e.width-l.width-s.width,n=e.height-l.height-s.height,r=Qy(o.maxWidth,a,"clientWidth"),i=Qy(o.maxHeight,a,"clientHeight")}else t=e.clientWidth,n=e.clientHeight}return{width:t,height:n,maxWidth:r||ob,maxHeight:i||ob}}(e,t,n);let{width:c,height:u}=l;if("content-box"===i.boxSizing){const e=Zy(i,"border","width"),t=Zy(i,"padding");c-=t.width+e.width,u-=t.height+e.height}c=Math.max(0,c-a.width),u=Math.max(0,r?c/r:u-a.height),c=tv(Math.min(c,o,l.maxWidth)),u=tv(Math.min(u,s,l.maxHeight)),c&&!u&&(u=tv(c/2));return(void 0!==t||void 0!==n)&&r&&l.height&&u>l.height&&(u=l.height,c=tv(Math.floor(u*r))),{width:c,height:u}}function rv(e,t,n){const r=t||1,i=Math.floor(e.height*r),a=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a)&&(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0)}const iv=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Gy()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return e}();function av(e,t){const n=function(e,t){return Ky(e).getPropertyValue(t)}(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function ov(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function sv(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:"middle"===r?n<.5?e.y:t.y:"after"===r?n<1?e.y:t.y:n>0?t.y:e.y}}function lv(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=ov(e,i,n),s=ov(i,a,n),l=ov(a,t,n),c=ov(o,s,n),u=ov(s,l,n);return ov(c,u,n)}function cv(e,t,n){return e?function(e,t){return{x:n=>e+e+t-n,setWidth(e){t=e},textAlign:e=>"center"===e?e:"right"===e?"left":"right",xPlus:(e,t)=>e-t,leftForLtr:(e,t)=>e-t}}(t,n):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,t)=>e+t,leftForLtr:(e,t)=>e}}function uv(e,t){let n,r;"ltr"!==t&&"rtl"!==t||(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function hv(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function dv(e){return"angle"===e?{between:Sb,compare:_b,normalize:kb}:{between:Mb,compare:(e,t)=>e-t,normalize:e=>e}}function pv(e){let{start:t,end:n,count:r,loop:i,style:a}=e;return{start:t%r,end:n%r,loop:i&&(n-t+1)%r===0,style:a}}function fv(e,t,n){if(!n)return[e];const{property:r,start:i,end:a}=n,o=t.length,{compare:s,between:l,normalize:c}=dv(r),{start:u,end:h,loop:d,style:p}=function(e,t,n){const{property:r,start:i,end:a}=n,{between:o,normalize:s}=dv(r),l=t.length;let c,u,{start:h,end:d,loop:p}=e;if(p){for(h+=l,d+=l,c=0,u=l;cy||l(i,b,m)&&0!==s(i,b),w=()=>!y||0===s(a,m)||l(a,b,m);for(let _=u,k=u;_<=h;++_)g=t[_%o],g.skip||(m=c(g[r]),m!==b&&(y=l(m,i,a),null===v&&x()&&(v=0===s(m,i)?_:k),null!==v&&w()&&(f.push(pv({start:v,end:_,loop:d,count:o,style:p})),v=null),k=_,b=m));return null!==v&&f.push(pv({start:v,end:h,loop:d,count:o,style:p})),f}function mv(e,t){const n=[],r=e.segments;for(let i=0;ir({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)})))}_refresh(){this._request||(this._running=!0,this._request=Ob.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),t=0;this._charts.forEach(((n,r)=>{if(!n.running||!n.items.length)return;const i=n.items;let a,o=i.length-1,s=!1;for(;o>=0;--o)a=i[o],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(e),s=!0):(i[o]=i[i.length-1],i.pop());s&&(r.draw(),this._notify(r,n,e,"progress")),i.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),t+=i.length})),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce(((e,t)=>Math.max(e,t._duration)),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var _v=new wv;const kv="transparent",Sv={boolean:(e,t,n)=>n>.5?t:e,color(e,t,n){const r=qb(e||kv),i=r.valid&&qb(t||kv);return i&&i.valid?i.mix(r,n).hexString():t},number:(e,t,n)=>e+(t-e)*n};class Cv{constructor(e,t,n,r){const i=t[n];r=My([e.to,r,i,e.from]);const a=My([e.from,i,r]);this._active=!0,this._fn=e.fn||Sv[e.type||typeof a],this._easing=$b[e.easing]||$b.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);const r=this._target[this._prop],i=n-this._start,a=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=My([e.to,t,r,e.from]),this._from=My([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,n=this._duration,r=this._prop,i=this._from,a=this._loop,o=this._to;let s;if(this._active=i!==o&&(a||t1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(i,o,s))}wait(){const e=this._promises||(this._promises=[]);return new Promise(((t,n)=>{e.push({res:t,rej:n})}))}_notify(e){const t=e?"res":"rej",n=this._promises||[];for(let r=0;r{const i=e[r];if(!Dg(i))return;const a={};for(const e of t)a[e]=i[e];(Lg(i.properties)&&i.properties||[r]).forEach((e=>{e!==r&&n.has(e)||n.set(e,a)}))}))}_animateOptions(e,t){const n=t.options,r=function(e,t){if(!t)return;let n=e.options;if(!n)return void(e.options=t);n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(e,n);if(!r)return[];const i=this._createAnimations(r,n);return n.$shared&&function(e,t){const n=[],r=Object.keys(t);for(let i=0;i{e.options=n}),(()=>{})),i}_createAnimations(e,t){const n=this._properties,r=[],i=e.$animations||(e.$animations={}),a=Object.keys(t),o=Date.now();let s;for(s=a.length-1;s>=0;--s){const l=a[s];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(e,t));continue}const c=t[l];let u=i[l];const h=n.get(l);if(u){if(h&&u.active()){u.update(h,c,o);continue}u.cancel()}h&&h.duration?(i[l]=u=new Cv(h,e,l,c),r.push(u)):e[l]=c}return r}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const n=this._createAnimations(e,t);return n.length?(_v.add(this._chart,n),!0):void 0}}function Tv(e,t){const n=e&&e.options||{},r=n.reverse,i=void 0===n.min?t:0,a=void 0===n.max?t:0;return{start:r?a:i,end:r?i:a}}function Ev(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=r.length;i3&&void 0!==arguments[3]?arguments[3]:{};const i=e.keys,a="single"===r.mode;let o,s,l,c;if(null===t)return;let u=!1;for(o=0,s=i.length;o0||!n&&t<0)return i.index}return null}function Ov(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:o,index:s}=r,l=a.axis,c=o.axis,u=function(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}(a,o,r),h=t.length;let d;for(let p=0;pn[e].axis===t)).shift()}function jv(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[r]||void 0===t[r][n])return;delete t[r][n],void 0!==t[r]._visualValues&&void 0!==t[r]._visualValues[n]&&delete t[r]._visualValues[n]}}}const Lv=e=>"reset"===e||"none"===e,Dv=(e,t)=>t?e:Object.assign({},e);class Iv{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Nv(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&jv(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>"x"===e?t:"r"===e?r:n,i=t.xAxisID=Fg(n.xAxisID,Rv(e,"x")),a=t.yAxisID=Fg(n.yAxisID,Rv(e,"y")),o=t.rAxisID=Fg(n.rAxisID,Rv(e,"r")),s=t.indexAxis,l=t.iAxisID=r(s,i,a,o),c=t.vAxisID=r(s,a,i,o);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(o),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Pb(this._data,this),e._stacked&&jv(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),n=this._data;if(Dg(t)){const e=this._cachedMeta;this._data=function(e,t){const{iScale:n,vScale:r}=t,i="x"===n.axis?"x":"y",a="x"===r.axis?"x":"y",o=Object.keys(e),s=new Array(o.length);let l,c,u;for(l=0,c=o.length;l{const t="_onData"+Zg(e),n=r[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value(){for(var e=arguments.length,i=new Array(e),a=0;a{"function"===typeof e[t]&&e[t](...i)})),o}})})))),this._syncList=[],this._data=t}var r,i}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const i=t._stacked;t._stacked=Nv(t.vScale,t),t.stack!==n.stack&&(r=!0,jv(t),t.stack=n.stack),this._resyncElements(e),(r||i!==t._stacked)&&(Ov(this,t._parsed),t._stacked=Nv(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:a}=n,o=i.axis;let s,l,c,u=0===e&&t===r.length||n._sorted,h=e>0&&n._parsed[e-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,c=r;else{c=Lg(r[e])?this.parseArrayData(n,r,e,t):Dg(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);const i=()=>null===l[o]||h&&l[o]e&&!t.hidden&&t._stacked&&{keys:Ev(n,!0),values:null})(t,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:u}=function(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}(o);let h,d;function p(){d=r[h];const t=d[o.axis];return!Ig(d[e.axis])||c>t||u=0;--h)if(!p()){this.updateRangeFromParsed(l,e,d,s);break}return l}getAllParsedValues(e){const t=this._cachedMeta._parsed,n=[];let r,i,a;for(r=0,i=t.length;r=0&&e1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0;const r="active"===t,i=this._cachedDataOpts,a=e+"-"+t,o=i[a],s=this.enableOptionSharing&&eb(n);if(o)return Dv(o,s);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),u=r?[`${e}Hover`,"hover",e,""]:[e,""],h=l.getOptionScopes(this.getDataset(),c),d=Object.keys(ry.elements[e]),p=l.resolveNamedOptions(h,d,(()=>this.getContext(n,r,t)),u);return p.$shared&&(p.$shared=s,i[a]=Object.freeze(Dv(p,s))),p}_resolveAnimations(e,t,n){const r=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,o=i[a];if(o)return o;let s;if(!1!==r.options.animation){const r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),i);s=r.createResolver(a,this.getContext(e,n,t))}const l=new Mv(r,s&&s.animations);return s&&s._cacheable&&(i[a]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||Lv(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),a=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:a}}updateElement(e,t,n,r){Lv(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!Lv(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;const i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,t,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,n=this._cachedMeta.data;for(const[o,s,l]of this._syncList)this[o](s,l);this._syncList=[];const r=n.length,i=t.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i2&&void 0!==arguments[2])||arguments[2];const r=this._cachedMeta,i=r.data,a=e+t;let o;const s=e=>{for(e.length+=t,o=e.length-1;o>=a;o--)e[o]=e[o-t]};for(s(i),o=e;o"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map(((t,i)=>{const a=e.getDatasetMeta(0).controller.getStyle(i);return{text:t,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}}))}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let i,a,o=e=>+n[e];if(Dg(n[e])){const{key:e="value"}=this._parsing;o=t=>+Jg(n[t],e)}for(i=e,a=e+t;iSb(e,s,l,!0)?1:Math.max(t,t*n,r,r*n),f=(e,t,r)=>Sb(e,s,l,!0)?-1:Math.min(t,t*n,r,r*n),m=p(0,c,h),g=p(lb,u,d),b=f(rb,c,h),y=f(rb+lb,u,d);r=(m-b)/2,i=(g-y)/2,a=-(m+b)/2,o=-(g+y)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:o}}(d,h,s),b=(n.width-a)/p,y=(n.height-a)/f,v=Math.max(Math.min(b,y)/2,0),x=Hg(this.options.radius,v),w=(x-Math.max(x*s,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*x,this.offsetY=g*x,r.total=this.calculateTotal(),this.outerRadius=x-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*u,0),this.updateElements(i,0,i.length,e)}_circumference(e,t){const n=this.options,r=this._cachedMeta,i=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||null===r._parsed[e]||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*i/ib)}updateElements(e,t,n,r){const i="reset"===r,a=this.chart,o=a.chartArea,s=a.options.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,u=i&&s.animateScale,h=u?0:this.innerRadius,d=u?0:this.outerRadius,{sharedOptions:p,includeOptions:f}=this._getSharedOptions(t,r);let m,g=this._getRotation();for(m=0;m0&&!isNaN(e)?ib*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Xb(t._parsed[e],n.options.locale);return{label:r[e]||"",value:i}}getMaxBorderWidth(e){let t=0;const n=this.chart;let r,i,a,o,s;if(!e)for(r=0,i=n.data.datasets.length;r0&&this.getParsed(t-1);for(let x=0;x=b){p.skip=!0;continue}const y=this.getParsed(x),w=jg(y[d]),_=p[h]=a.getPixelForValue(y[h],x),k=p[d]=i||w?o.getBasePixel():o.getPixelForValue(s?this.applyStack(o,y,s):y[d],x);p.skip=isNaN(_)||isNaN(k)||w,p.stop=x>0&&Math.abs(y[h]-v[h])>m,f&&(p.parsed=y,p.raw=l.data[x]),u&&(p.options=c||this.resolveDataElementOptions(x,n.active?"active":r)),g||this.updateElement(n,x,p,r),v=y}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;const i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class Hv extends Bv{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function $v(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Uv{static override(e){Object.assign(Uv.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return $v()}parse(){return $v()}format(){return $v()}add(){return $v()}diff(){return $v()}startOf(){return $v()}endOf(){return $v()}}var qv=Uv;function Wv(e,t,n,r){const{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&"r"!==t&&o&&a.length){const o=s._reversePixels?Ab:Eb;if(!r){const r=o(a,t,n);if(l){const{vScale:t}=i._cachedMeta,{_parsed:n}=e,a=n.slice(0,r.lo+1).reverse().findIndex((e=>!jg(e[t.axis])));r.lo-=Math.max(0,a);const o=n.slice(r.hi).findIndex((e=>!jg(e[t.axis])));r.hi+=Math.max(0,o)}return r}if(i._sharedOptions){const e=a[0],r="function"===typeof e.getRange&&e.getRange(t);if(r){const e=o(a,t,n-r),i=o(a,t,n+r);return{lo:e.lo,hi:i.hi}}}}return{lo:0,hi:a.length-1}}function Vv(e,t,n,r,i){const a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let s=0,l=a.length;s{e[o]&&e[o](t[n],i)&&(a.push({element:e,datasetIndex:r,index:l}),s=s||e.inRange(t.x,t.y,i))})),r&&!s?[]:a}var Kv={evaluateInteractionItems:Vv,modes:{index(e,t,n,r){const i=ev(t,e),a=n.axis||"x",o=n.includeInvisible||!1,s=n.intersect?Yv(e,i,a,r,o):Xv(e,i,a,!1,r,o),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach((e=>{const t=s[0].index,n=e.data[t];n&&!n.skip&&l.push({element:n,datasetIndex:e.index,index:t})})),l):[]},dataset(e,t,n,r){const i=ev(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;let s=n.intersect?Yv(e,i,a,r,o):Xv(e,i,a,!1,r,o);if(s.length>0){const t=s[0].datasetIndex,n=e.getDatasetMeta(t).data;s=[];for(let e=0;eYv(e,ev(t,e),n.axis||"xy",r,n.includeInvisible||!1),nearest(e,t,n,r){const i=ev(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;return Xv(e,i,a,n.intersect,r,o)},x:(e,t,n,r)=>Qv(e,ev(t,e),"x",n.intersect,r),y:(e,t,n,r)=>Qv(e,ev(t,e),"y",n.intersect,r)}};const Jv=["left","top","right","bottom"];function Zv(e,t){return e.filter((e=>e.pos===t))}function ex(e,t){return e.filter((e=>-1===Jv.indexOf(e.pos)&&e.box.axis===t))}function tx(e,t){return e.sort(((e,n)=>{const r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight}))}function nx(e,t){const n=function(e){const t={};for(const n of e){const{stack:e,pos:r,stackWeight:i}=n;if(!e||!Jv.includes(r))continue;const a=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=i}return t}(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let a,o,s;for(a=0,o=e.length;a{r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function sx(e,t,n,r){const i=[];let a,o,s,l,c,u;for(a=0,o=e.length,c=0;ae.box.fullSize)),!0),r=tx(Zv(t,"left"),!0),i=tx(Zv(t,"right")),a=tx(Zv(t,"top"),!0),o=tx(Zv(t,"bottom")),s=ex(t,"x"),l=ex(t,"y");return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(l).concat(o).concat(s),chartArea:Zv(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:a.concat(o).concat(s)}}(e.boxes),l=s.vertical,c=s.horizontal;Ug(e.boxes,(e=>{"function"===typeof e.beforeLayout&&e.beforeLayout()}));const u=l.reduce(((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1),0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/u,hBoxMaxHeight:o/2}),d=Object.assign({},i);ix(d,Sy(r));const p=Object.assign({maxPadding:d,w:a,h:o,x:i.left,y:i.top},i),f=nx(l.concat(c),h);sx(s.fullSize,p,h,f),sx(l,p,h,f),sx(c,p,h,f)&&sx(l,p,h,f),function(e){const t=e.maxPadding;function n(n){const r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(p),cx(s.leftAndTop,p,h,f),p.x+=p.w,p.y+=p.h,cx(s.rightAndBottom,p,h,f),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ug(s.chartArea,(t=>{const n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class hx{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}}class dx extends hx{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const px="$chartjs",fx={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},mx=e=>null===e||""===e;const gx=!!iv&&{passive:!0};function bx(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,gx)}function yx(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function vx(e,t,n){const r=e.canvas,i=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||yx(n.addedNodes,r),t=t&&!yx(n.removedNodes,r);t&&n()}));return i.observe(document,{childList:!0,subtree:!0}),i}function xx(e,t,n){const r=e.canvas,i=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||yx(n.removedNodes,r),t=t&&!yx(n.addedNodes,r);t&&n()}));return i.observe(document,{childList:!0,subtree:!0}),i}const wx=new Map;let _x=0;function kx(){const e=window.devicePixelRatio;e!==_x&&(_x=e,wx.forEach(((t,n)=>{n.currentDevicePixelRatio!==e&&t()})))}function Sx(e,t,n){const r=e.canvas,i=r&&Xy(r);if(!i)return;const a=Rb(((e,t)=>{const r=i.clientWidth;n(e,t),r{const t=e[0],n=t.contentRect.width,r=t.contentRect.height;0===n&&0===r||a(n,r)}));return o.observe(i),function(e,t){wx.size||window.addEventListener("resize",kx),wx.set(e,t)}(e,a),o}function Cx(e,t,n){n&&n.disconnect(),"resize"===t&&function(e){wx.delete(e),wx.size||window.removeEventListener("resize",kx)}(e)}function Mx(e,t,n){const r=e.canvas,i=Rb((t=>{null!==e.ctx&&n(function(e,t){const n=fx[e.type]||e.type,{x:r,y:i}=ev(e,t);return{type:n,chart:t,native:e,x:void 0!==r?r:null,y:void 0!==i?i:null}}(t,e))}),e);return function(e,t,n){e&&e.addEventListener(t,n,gx)}(r,t,i),i}class Tx extends hx{acquireContext(e,t){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(function(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[px]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",mx(i)){const t=av(e,"width");void 0!==t&&(e.width=t)}if(mx(r))if(""===e.style.height)e.height=e.width/(t||2);else{const t=av(e,"height");void 0!==t&&(e.height=t)}}(e,t),n):null}releaseContext(e){const t=e.canvas;if(!t[px])return!1;const n=t[px].initial;["height","width"].forEach((e=>{const r=n[e];jg(r)?t.removeAttribute(e):t.setAttribute(e,r)}));const r=n.style||{};return Object.keys(r).forEach((e=>{t.style[e]=r[e]})),t.width=t.width,delete t[px],!0}addEventListener(e,t,n){this.removeEventListener(e,t);const r=e.$proxies||(e.$proxies={}),i={attach:vx,detach:xx,resize:Sx}[t]||Mx;r[t]=i(e,t,n)}removeEventListener(e,t){const n=e.$proxies||(e.$proxies={}),r=n[t];if(!r)return;({attach:Cx,detach:Cx,resize:Cx}[t]||bx)(e,t,r),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return nv(e,t,n,r)}isAttached(e){const t=e&&Xy(e);return!(!t||!t.isConnected)}}class Ex{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return mb(this.x)&&mb(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const r={};return e.forEach((e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]})),r}}function Ax(e,t){const n=e.options.ticks,r=function(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?function(e){const t=[];let n,r;for(n=0,r=e.length;ni)return function(e,t,n,r){let i,a=0,o=n[0];for(r=Math.ceil(r),i=0;ie-t)).pop(),t}(r);for(let o=0,s=a.length-1;oi)return e}return Math.max(i,1)}(a,t,i);if(o>0){let e,n;const r=o>1?Math.round((l-s)/(o-1)):null;for(Nx(t,c,u,jg(r)?0:s-r,s),e=0,n=o-1;e"top"===t||"left"===t?e[t]+n:e[t]-n,zx=(e,t)=>Math.min(t||e,e);function Ox(e,t){const n=[],r=e.length/t,i=e.length;let a=0;for(;ao+s)))return c}function jx(e){return e.drawTicks?e.tickLength:0}function Lx(e,t){if(!e.display)return 0;const n=Cy(e.font,t),r=Sy(e.padding);return(Lg(e.text)?e.text.length:1)*n.lineHeight+r.height}function Dx(e,t,n){let r=jb(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=(e=>"left"===e?"right":"right"===e?"left":e)(r)),r}class Ix extends Ex{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=Bg(e,Number.POSITIVE_INFINITY),t=Bg(t,Number.NEGATIVE_INFINITY),n=Bg(n,Number.POSITIVE_INFINITY),r=Bg(r,Number.NEGATIVE_INFINITY),{min:Bg(e,n),max:Bg(t,r),minDefined:Ig(e),maxDefined:Ig(t)}}getMinMax(e){let t,{min:n,max:r,minDefined:i,maxDefined:a}=this.getUserBounds();if(i&&a)return{min:n,max:r};const o=this.getMatchingVisibleMetas();for(let s=0,l=o.length;sr?r:n,r=i&&n>r?n:r,{min:Bg(n,Bg(r,n)),max:Bg(r,Bg(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$g(this.options.beforeUpdate,[this])}update(e,t,n){const{beginAtZero:r,grace:i,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,n){const{min:r,max:i}=e,a=Hg(t,(i-r)/2),o=(e,t)=>n&&0===e?0:e+t;return{min:o(r,-Math.abs(a)),max:o(i,a)}}(this,i,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const s=o=i||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const c=this._getLabelSizes(),u=c.widest.width,h=c.highest.height,d=Cb(this.chart.width-u,0,this.maxWidth);a=e.offset?this.maxWidth/n:d/(n-1),u+6>a&&(a=d/(n-(e.offset?.5:1)),o=this.maxHeight-jx(e.grid)-t.padding-Lx(e.title,this.chart.options.font),s=Math.sqrt(u*u+h*h),l=yb(Math.min(Math.asin(Cb((c.highest.height+6)/a,-1,1)),Math.asin(Cb(o/s,-1,1))-Math.asin(Cb(h/s,-1,1)))),l=Math.max(r,Math.min(i,l))),this.labelRotation=l}afterCalculateLabelRotation(){$g(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$g(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:i}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){const a=Lx(r,t.options.font);if(o?(e.width=this.maxWidth,e.height=jx(i)+a):(e.height=this.maxHeight,e.width=jx(i)+a),n.display&&this.ticks.length){const{first:t,last:r,widest:i,highest:a}=this._getLabelSizes(),s=2*n.padding,l=bb(this.labelRotation),c=Math.cos(l),u=Math.sin(l);if(o){const t=n.mirror?0:u*i.width+c*a.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{const t=n.mirror?0:c*i.width+u*a.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,r,u,c)}}this._handleMargins(),o?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){const{ticks:{align:i,padding:a},position:o}=this.options,s=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,h=0;s?l?(u=r*e.width,h=n*t.height):(u=n*e.height,h=r*t.width):"start"===i?h=t.width:"end"===i?u=e.width:"inner"!==i&&(u=e.width/2,h=t.width/2),this.paddingLeft=Math.max((u-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((h-c+a)*this.width/(this.width-c),0)}else{let n=t.height/2,r=e.height/2;"start"===i?(n=0,r=e.height):"end"===i&&(n=t.height,r=0),this.paddingTop=n+a,this.paddingBottom=r+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){$g(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,n=e.length;t{const n=e.gc,r=n.length/2;let i;if(r>t){for(i=0;i({width:a[e]||0,height:o[e]||0});return{first:k(0),last:k(t-1),widest:k(w),highest:k(_),widths:a,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return Cb(this._alignToPixels?ay(this.chart,t,0):t,-32768,32767)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&eo*r?o/n:s/r:s*r0}_computeGridLineItems(e){const t=this.axis,n=this.chart,r=this.options,{grid:i,position:a,border:o}=r,s=i.offset,l=this.isHorizontal(),c=this.ticks.length+(s?1:0),u=jx(i),h=[],d=o.setContext(this.getContext()),p=d.display?d.width:0,f=p/2,m=function(e){return ay(n,e,p)};let g,b,y,v,x,w,_,k,S,C,M,T;if("top"===a)g=m(this.bottom),w=this.bottom-u,k=g-f,C=m(e.top)+f,T=e.bottom;else if("bottom"===a)g=m(this.top),C=e.top,T=m(e.bottom)-f,w=g+f,k=this.top+u;else if("left"===a)g=m(this.right),x=this.right-u,_=g-f,S=m(e.left)+f,M=e.right;else if("right"===a)g=m(this.left),S=e.left,M=m(e.right)-f,x=g+f,_=this.left+u;else if("x"===t){if("center"===a)g=m((e.top+e.bottom)/2+.5);else if(Dg(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}C=e.top,T=e.bottom,w=g+f,k=w+u}else if("y"===t){if("center"===a)g=m((e.left+e.right)/2);else if(Dg(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}x=g-f,_=x-u,S=e.left,M=e.right}const E=Fg(r.ticks.maxTicksLimit,c),A=Math.max(1,Math.ceil(c/E));for(b=0;b0&&(a-=r/2)}h={left:a,top:i,width:r+t.width,height:n+t.height,color:e.backdropColor}}m.push({label:v,font:S,textOffset:T,options:{rotation:f,color:n,strokeColor:s,strokeWidth:c,textAlign:d,textBaseline:E,translation:[x,w],backdrop:h}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-bb(this.labelRotation))return"top"===e?"left":"right";let n="center";return"start"===t.align?n="left":"end"===t.align?n="right":"inner"===t.align&&(n="inner"),n}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,a=e+i,o=this._getLabelSizes().widest.width;let s,l;return"left"===t?r?(l=this.right+i,"near"===n?s="left":"center"===n?(s="center",l+=o/2):(s="right",l+=o)):(l=this.right-a,"near"===n?s="right":"center"===n?(s="center",l-=o/2):(s="left",l=this.left)):"right"===t?r?(l=this.left+i,"near"===n?s="right":"center"===n?(s="center",l-=o/2):(s="left",l-=o)):(l=this.left+a,"near"===n?s="left":"center"===n?(s="center",l+=o/2):(s="right",l=this.right)):s="right",{textAlign:s,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:n,top:r,width:i,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,i,a),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const n=this.ticks.findIndex((t=>t.value===e));if(n>=0){return t.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,a;const o=(e,t,r)=>{r.width&&r.color&&(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(i=0,a=r.length;i{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let i,a;for(i=0,a=t.length;i{const r=n.split("."),i=r.pop(),a=[e].concat(r).join("."),o=t[n].split("."),s=o.pop(),l=o.join(".");ry.route(a,i,l,s)}))}(t,e.defaultRoutes);e.descriptors&&ry.describe(t,e.descriptors)}(e,a,n),this.override&&ry.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in ry[r]&&(delete ry[r][n],this.override&&delete Jb[n])}}class Fx{constructor(){this.controllers=new Bx(Iv,"datasets",!0),this.elements=new Bx(Ex,"elements"),this.plugins=new Bx(Object,"plugins"),this.scales=new Bx(Ix,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(){for(var e=arguments.length,t=new Array(e),n=0;n{const r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):Ug(t,(t=>{const r=n||this._getRegistryForType(t);this._exec(e,r,t)}))}))}_exec(e,t,n){const r=Zg(e);$g(n["before"+r],[],n),t[e](n),$g(n["after"+r],[],n)}_getRegistryForType(e){for(let t=0;te.filter((e=>!t.some((t=>e.plugin.id===t.plugin.id))));this._notify(r(t,n),e,"stop"),this._notify(r(n,t),e,"start")}}function Ux(e,t){return t||!1!==e?!0===e?{}:e:null}function qx(e,t,n,r){let{plugin:i,local:a}=t;const o=e.pluginScopeKeys(i),s=e.getOptionScopes(n,o);return a&&i.defaults&&s.push(i.defaults),e.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Wx(e,t){const n=ry.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Vx(e){if("x"===e||"y"===e||"r"===e)return e}function Yx(e){if(Vx(e))return e;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1&&Vx(e[0].toLowerCase());if(t)return t}var i;throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Gx(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Xx(e,t){const n=Jb[e.type]||{scales:{}},r=t.scales||{},i=Wx(e.type,t),a=Object.create(null);return Object.keys(r).forEach((t=>{const o=r[t];if(!Dg(o))return console.error(`Invalid scale configuration for scale: ${t}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const s=Yx(t,o,function(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter((t=>t.xAxisID===e||t.yAxisID===e));if(n.length)return Gx(e,"x",n[0])||Gx(e,"y",n[0])}return{}}(t,e),ry.scales[o.type]),l=function(e,t){return e===t?"_index_":"_value_"}(s,i),c=n.scales||{};a[t]=Xg(Object.create(null),[{axis:s},o,c[s],c[l]])})),e.data.datasets.forEach((n=>{const i=n.type||e.type,o=n.indexAxis||Wx(i,t),s=(Jb[i]||{}).scales||{};Object.keys(s).forEach((e=>{const t=function(e,t){let n=e;return"_index_"===e?n=t:"_value_"===e&&(n="x"===t?"y":"x"),n}(e,o),i=n[t+"AxisID"]||t;a[i]=a[i]||Object.create(null),Xg(a[i],[{axis:t},r[i],s[e]])}))})),Object.keys(a).forEach((e=>{const t=a[e];Xg(t,[ry.scales[t.type],ry.scale])})),a}function Qx(e){const t=e.options||(e.options={});t.plugins=Fg(t.plugins,{}),t.scales=Xx(e,t)}function Kx(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const Jx=new Map,Zx=new Set;function ew(e,t){let n=Jx.get(e);return n||(n=t(),Jx.set(e,n),Zx.add(n)),n}const tw=(e,t,n)=>{const r=Jg(t,n);void 0!==r&&e.add(r)};class nw{constructor(e){this._config=function(e){return(e=e||{}).data=Kx(e.data),Qx(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Kx(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Qx(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return ew(e,(()=>[[`datasets.${e}`,""]]))}datasetAnimationScopeKeys(e,t){return ew(`${e}.transition.${t}`,(()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]]))}datasetElementScopeKeys(e,t){return ew(`${e}-${t}`,(()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]]))}pluginScopeKeys(e){const t=e.id;return ew(`${this.type}-plugin-${t}`,(()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]]))}_cachedScopes(e,t){const n=this._scopeCache;let r=n.get(e);return r&&!t||(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){const{options:r,type:i}=this,a=this._cachedScopes(e,n),o=a.get(t);if(o)return o;const s=new Set;t.forEach((t=>{e&&(s.add(e),t.forEach((t=>tw(s,e,t)))),t.forEach((e=>tw(s,r,e))),t.forEach((e=>tw(s,Jb[i]||{},e))),t.forEach((e=>tw(s,ry,e))),t.forEach((e=>tw(s,Zb,e)))}));const l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),Zx.has(t)&&a.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,Jb[t]||{},ry.datasets[t]||{},{type:t},ry,Zb]}resolveNamedOptions(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""];const i={$shared:!0},{resolver:a,subPrefixes:o}=rw(this._resolverCache,e,r);let s=a;if(function(e,t){const{isScriptable:n,isIndexable:r}=Ny(e);for(const i of t){const t=n(i),a=r(i),o=(a||t)&&e[i];if(t&&(tb(o)||iw(o))||a&&Lg(o))return!0}return!1}(a,t)){i.$shared=!1;s=Ay(a,n=tb(n)?n():n,this.createResolver(e,n,o))}for(const l of t)i[l]=s[l];return i}createResolver(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],r=arguments.length>3?arguments[3]:void 0;const{resolver:i}=rw(this._resolverCache,e,n);return Dg(t)?Ay(i,t,void 0,r):i}}function rw(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let a=r.get(i);if(!a){a={resolver:Ey(t,n),subPrefixes:n.filter((e=>!e.toLowerCase().includes("hover")))},r.set(i,a)}return a}const iw=e=>Dg(e)&&Object.getOwnPropertyNames(e).some((t=>tb(e[t])));const aw=["top","bottom","left","right","chartArea"];function ow(e,t){return"top"===e||"bottom"===e||-1===aw.indexOf(e)&&"x"===t}function sw(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function lw(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),$g(n&&n.onComplete,[e],t)}function cw(e){const t=e.chart,n=t.options.animation;$g(n&&n.onProgress,[e],t)}function uw(e){return Gy()&&"string"===typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const hw={},dw=e=>{const t=uw(e);return Object.values(hw).filter((e=>e.canvas===t)).pop()};function pw(e,t,n){const r=Object.keys(e);for(const i of r){const r=+i;if(r>=t){const a=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=a)}}}class fw{static defaults=(()=>ry)();static instances=(()=>hw)();static overrides=(()=>Jb)();static registry=(()=>Hx)();static version="4.5.0";static getChart=(()=>dw)();static register(){Hx.add(...arguments),mw()}static unregister(){Hx.remove(...arguments),mw()}constructor(e,t){const n=this.config=new nw(t),r=uw(e),i=dw(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(e){return!Gy()||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?dx:Tx}(r)),this.platform.updateConfig(n);const o=this.platform.acquireContext(r,a.aspectRatio),s=o&&o.canvas,l=s&&s.height,c=s&&s.width;this.id=Rg(),this.ctx=o,this.canvas=s,this.width=c,this.height=l,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new $x,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){let n;return function(){for(var r=arguments.length,i=new Array(r),a=0;athis.update(e)),a.resizeDelay||0),this._dataChanges=[],hw[this.id]=this,o&&s?(_v.listen(this,"complete",lw),_v.listen(this,"progress",cw),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return jg(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Hx}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():rv(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return oy(this.canvas,this.ctx),this}stop(){return _v.stop(this),this}resize(e,t){_v.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,t,i),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,rv(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),$g(n.onResize,[this,a],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){Ug(this.options.scales||{},((e,t)=>{e.id=t}))}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce(((e,t)=>(e[t]=!1,e)),{});let i=[];t&&(i=i.concat(Object.keys(t).map((e=>{const n=t[e],r=Yx(e,n),i="r"===r,a="x"===r;return{options:n,dposition:i?"chartArea":a?"bottom":"left",dtype:i?"radialLinear":a?"category":"linear"}})))),Ug(i,(t=>{const i=t.options,a=i.id,o=Yx(a,i),s=Fg(i.type,t.dtype);void 0!==i.position&&ow(i.position,o)===ow(t.dposition)||(i.position=t.dposition),r[a]=!0;let l=null;if(a in n&&n[a].type===s)l=n[a];else{l=new(Hx.getScale(s))({id:a,type:s,ctx:this.ctx,chart:this}),n[l.id]=l}l.init(i,e)})),Ug(r,((e,t)=>{e||delete n[t]})),Ug(n,(e=>{ux.configure(this,e,e.options),ux.addBox(this,e)}))}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort(((e,t)=>e.index-t.index)),n>t){for(let e=t;et.length&&delete this._stacks,e.forEach(((e,n)=>{0===t.filter((t=>t===e._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n{this.getDatasetMeta(t).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let l=0,c=this.data.datasets.length;l{e.reset()})),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(sw("z","_idx"));const{_active:o,_lastEvent:s}=this;s?this._eventHandler(s,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){Ug(this.scales,(e=>{ux.removeBox(this,e)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);nb(t,n)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:i}of t){pw(e,r,"_removeElements"===n?-i:i)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=t=>new Set(e.filter((e=>e[0]===t)).map(((e,t)=>t+","+e.splice(1).join(",")))),r=n(0);for(let i=1;ie.split(","))).map((e=>({method:e[1],start:+e[2],count:+e[3]})))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ux.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],Ug(this.boxes,(e=>{n&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))}),this),this._layers.forEach(((e,t)=>{e._idx=t})),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n={meta:e,index:e.index,cancelable:!0},r=xv(this,e);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(r&&uy(t,r),e.controller.draw(),r&&hy(t),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(e){return cy(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){const i=Kv.modes[t];return"function"===typeof i?i(this,e,n,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let r=n.filter((e=>e&&e._dataset===t)).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=Ty(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return"boolean"===typeof n.hidden?!n.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){const r=n?"show":"hide",i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);eb(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),a.update(i,{visible:n}),this.update((t=>t.datasetIndex===e?r:void 0)))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),_v.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};Ug(this.options.events,(e=>n(e,r)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},i=(e,t)=>{this.canvas&&this.resize(e,t)};let a;const o=()=>{r("attach",o),this.attached=!0,this.resize(),n("resize",i),n("detach",a)};a=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),n("attach",o)},t.isAttached(this.canvas)?o():a()}unbindEvents(){Ug(this._listeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._listeners={},Ug(this._responsiveListeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const r=n?"set":"remove";let i,a,o,s;for("dataset"===t&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),o=0,s=e.length;o{let{datasetIndex:t,index:n}=e;const r=this.getDatasetMeta(t);if(!r)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:r.data[n],index:n}}));!qg(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return 1===this._plugins._cache.filter((t=>t.plugin.id===e)).length}_updateHoverStyles(e,t,n){const r=this.options.hover,i=(e,t)=>e.filter((e=>!t.some((t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)))),a=i(t,e),o=n?e:i(e,t);a.length&&this.updateHoverStyle(a,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",n,r))return;const i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:r=[],options:i}=this,a=t,o=this._getActiveElements(e,r,n,a),s=function(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(e),l=function(e,t,n,r){return n&&"mouseout"!==e.type?r?t:e:null}(e,this._lastEvent,n,s);n&&(this._lastEvent=null,$g(i.onHover,[e,o,this],this),s&&$g(i.onClick,[e,o,this],this));const c=!qg(o,r);return(c||t)&&(this._active=o,this._updateHoverStyles(o,r,t)),this._lastEvent=l,c}_getActiveElements(e,t,n,r){if("mouseout"===e.type)return[];if(!n)return t;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}}function mw(){return Ug(fw.instances,(e=>e._plugins.invalidate()))}function gw(e,t,n,r){const i=wy(e.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const a=(n-t)/2,o=Math.min(a,r*t/2),s=e=>{const t=(n-Math.min(a,e))*r/2;return Cb(e,0,Math.min(a,t))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Cb(i.innerStart,0,o),innerEnd:Cb(i.innerEnd,0,o)}}function bw(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function yw(e,t,n,r,i,a){const{x:o,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,h=Math.max(t.outerRadius+r+n-c,0),d=u>0?u+r+n+c:0;let p=0;const f=i-l;if(r){const e=((u>0?u-r:0)+(h>0?h-r:0))/2;p=(f-(0!==e?f*e/(e+r):f))/2}const m=(f-Math.max(.001,f*h-n/rb)/h)/2,g=l+m+p,b=i-m-p,{outerStart:y,outerEnd:v,innerStart:x,innerEnd:w}=gw(t,d,h,b-g),_=h-y,k=h-v,S=g+y/_,C=b-v/k,M=d+x,T=d+w,E=g+x/M,A=b-w/T;if(e.beginPath(),a){const t=(S+C)/2;if(e.arc(o,s,h,S,t),e.arc(o,s,h,t,C),v>0){const t=bw(k,C,o,s);e.arc(t.x,t.y,v,C,b+lb)}const n=bw(T,b,o,s);if(e.lineTo(n.x,n.y),w>0){const t=bw(T,A,o,s);e.arc(t.x,t.y,w,b+lb,A+Math.PI)}const r=(b-w/d+(g+x/d))/2;if(e.arc(o,s,d,b-w/d,r,!0),e.arc(o,s,d,r,g+x/d,!0),x>0){const t=bw(M,E,o,s);e.arc(t.x,t.y,x,E+Math.PI,g-lb)}const i=bw(_,g,o,s);if(e.lineTo(i.x,i.y),y>0){const t=bw(_,S,o,s);e.arc(t.x,t.y,y,g-lb,S)}}else{e.moveTo(o,s);const t=Math.cos(S)*h+o,n=Math.sin(S)*h+s;e.lineTo(t,n);const r=Math.cos(C)*h+o,i=Math.sin(C)*h+s;e.lineTo(r,i)}e.closePath()}function vw(e,t,n,r,i){const{fullCircles:a,startAngle:o,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:h,borderDashOffset:d,borderRadius:p}=l,f="inner"===l.borderAlign;if(!c)return;e.setLineDash(h||[]),e.lineDashOffset=d,f?(e.lineWidth=2*c,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let m=t.endAngle;if(a){yw(e,t,n,r,m,i);for(let t=0;ti?(c=i/l,e.arc(a,o,l,n+c,r-c,!0)):e.arc(a,o,i,n+lb,r-lb),e.closePath(),e.clip()}(e,t,m),l.selfJoin&&m-o>=rb&&0===p&&"miter"!==u&&function(e,t,n){const{startAngle:r,x:i,y:a,outerRadius:o,innerRadius:s,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,h=Math.min(c/o,kb(r-n));if(e.beginPath(),e.arc(i,a,o-c/2,r+h/2,n-h/2),s>0){const t=Math.min(c/s,kb(r-n));e.arc(i,a,s+c/2,n-t/2,r+t/2,!0)}else{const t=Math.min(c/2,o*kb(r-n));if("round"===u)e.arc(i,a,t,n-rb/2,r+rb/2,!0);else if("bevel"===u){const o=2*t*t,s=-o*Math.cos(n+rb/2)+i,l=-o*Math.sin(n+rb/2)+a,c=o*Math.cos(r+rb/2)+i,u=o*Math.sin(r+rb/2)+a;e.lineTo(s,l),e.lineTo(c,u)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}(e,t,m),a||(yw(e,t,n,r,m,i),e.stroke())}class xw extends Ex{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.getProps(["x","y"],n),{angle:i,distance:a}=xb(r,{x:e,y:t}),{startAngle:o,endAngle:s,innerRadius:l,outerRadius:c,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),h=(this.options.spacing+this.options.borderWidth)/2,d=Fg(u,s-o),p=Sb(i,o,s)&&o!==s,f=d>=ib||p,m=Mb(a,l+h,c+h);return f&&m}getCenterPoint(e){const{x:t,y:n,startAngle:r,endAngle:i,innerRadius:a,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:s,spacing:l}=this.options,c=(r+i)/2,u=(a+o+l+s)/2;return{x:t+Math.cos(c)*u,y:n+Math.sin(c)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:n}=this,r=(t.offset||0)/4,i=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>ib?Math.floor(n/ib):0,0===n||this.innerRadius<0||this.outerRadius<0)return;e.save();const o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*r,Math.sin(o)*r);const s=r*(1-Math.sin(Math.min(rb,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,function(e,t,n,r,i){const{fullCircles:a,startAngle:o,circumference:s}=t;let l=t.endAngle;if(a){yw(e,t,n,r,l,i);for(let t=0;t2&&void 0!==arguments[2]?arguments[2]:t;e.lineCap=Fg(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Fg(n.borderDash,t.borderDash)),e.lineDashOffset=Fg(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Fg(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Fg(n.borderWidth,t.borderWidth),e.strokeStyle=Fg(n.borderColor,t.borderColor)}function _w(e,t,n){e.lineTo(n.x,n.y)}function kw(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:s}=t,l=Math.max(i,o),c=Math.min(a,s),u=is&&a>s;return{count:r,start:l,loop:t.loop,ilen:c(o+(c?s-e:e))%a,v=()=>{p!==f&&(e.lineTo(g,f),e.lineTo(g,p),e.lineTo(g,m))};for(l&&(h=i[y(0)],e.moveTo(h.x,h.y)),u=0;u<=s;++u){if(h=i[y(u)],h.skip)continue;const t=h.x,n=h.y,r=0|t;r===d?(nf&&(f=n),g=(b*g+t)/++b):(v(),e.lineTo(t,n),d=r,b=0,p=f=n),m=n}v()}function Mw(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&"monotone"!==t.cubicInterpolationMode&&!t.stepped&&!n?Cw:Sw}const Tw="function"===typeof Path2D;function Ew(e,t,n,r){Tw&&!t.options.segment?function(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),ww(e,t.options),e.stroke(i)}(e,t,n,r):function(e,t,n,r){const{segments:i,options:a}=t,o=Mw(t);for(const s of i)ww(e,a,s.style),e.beginPath(),o(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}(e,t,n,r)}class Aw extends Ex{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;Yy(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const a=!!e._loop,{start:o,end:s}=function(e,t,n,r){let i=0,a=t-1;if(n&&!r)for(;ii&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}(n,i,a,r);return gv(e,!0===r?[{start:o,end:s,loop:a}]:function(e,t,n,r){const i=e.length,a=[];let o,s=t,l=e[t];for(o=t+1;o<=n;++o){const n=e[o%i];n.skip||n.stop?l.skip||(r=!1,a.push({start:t%i,end:(o-1)%i,loop:r}),t=s=n.stop?o:null):(s=o,l.skip&&(t=o)),l=n}return null!==s&&a.push({start:t%i,end:s%i,loop:r}),a}(n,o,s{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}};class Ow extends Ex{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=$g(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter((t=>e.filter(t,this.chart.data)))),e.sort&&(t=t.sort(((t,n)=>e.sort(t,n,this.chart.data)))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const n=e.labels,r=Cy(n.font),i=r.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:s}=zw(n,i);let l,c;t.font=r.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,i,o,s)+10):(c=this.maxHeight,l=this._fitCols(a,r,o,s)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){const{ctx:i,maxWidth:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],l=this.lineWidths=[0],c=r+o;let u=e;i.textAlign="left",i.textBaseline="middle";let h=-1,d=-c;return this.legendItems.forEach(((e,p)=>{const f=n+t/2+i.measureText(e.text).width;(0===p||l[l.length-1]+f+2*o>a)&&(u+=c,l[l.length-(p>0?0:1)]=0,d+=c,h++),s[p]={left:0,top:d,row:h,width:f,height:r},l[l.length-1]+=f+o})),u}_fitCols(e,t,n,r){const{ctx:i,maxHeight:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-e;let u=o,h=0,d=0,p=0,f=0;return this.legendItems.forEach(((e,a)=>{const{itemWidth:m,itemHeight:g}=function(e,t,n,r,i){const a=function(e,t,n,r){let i=e.text;i&&"string"!==typeof i&&(i=i.reduce(((e,t)=>e.length>t.length?e:t)));return t+n.size/2+r.measureText(i).width}(r,e,t,n),o=function(e,t,n){let r=e;"string"!==typeof t.text&&(r=Rw(t,n));return r}(i,r,t.lineHeight);return{itemWidth:a,itemHeight:o}}(n,t,i,e,r);a>0&&d+g+2*o>c&&(u+=h+o,l.push({width:h,height:d}),p+=h+o,f++,h=d=0),s[a]={left:p,top:d,col:f,width:m,height:g},h=Math.max(h,m),d+=g+o})),u+=h,l.push({width:h,height:d}),u}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:i}}=this,a=cv(i,this.left,this.width);if(this.isHorizontal()){let i=0,o=Lb(n,this.left+r,this.right-this.lineWidths[i]);for(const s of t)i!==s.row&&(i=s.row,o=Lb(n,this.left+r,this.right-this.lineWidths[i])),s.top+=this.top+e+r,s.left=a.leftForLtr(a.x(o),s.width),o+=s.width+r}else{let i=0,o=Lb(n,this.top+e+r,this.bottom-this.columnSizes[i].height);for(const s of t)s.col!==i&&(i=s.col,o=Lb(n,this.top+e+r,this.bottom-this.columnSizes[i].height)),s.top=o,s.left+=this.left+r,s.left=a.leftForLtr(a.x(s.left),s.width),o+=s.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;uy(e,this),this._draw(),hy(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:i,labels:a}=e,o=ry.color,s=cv(e.rtl,this.left,this.width),l=Cy(a.font),{padding:c}=a,u=l.size,h=u/2;let d;this.drawTitle(),r.textAlign=s.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:p,boxHeight:f,itemHeight:m}=zw(a,u),g=this.isHorizontal(),b=this._computeTitleHeight();d=g?{x:Lb(i,this.left+c,this.right-n[0]),y:this.top+c+b,line:0}:{x:this.left+c,y:Lb(i,this.top+b+c,this.bottom-t[0].height),line:0},uv(this.ctx,e.textDirection);const y=m+c;this.legendItems.forEach(((v,x)=>{r.strokeStyle=v.fontColor,r.fillStyle=v.fontColor;const w=r.measureText(v.text).width,_=s.textAlign(v.textAlign||(v.textAlign=a.textAlign)),k=p+h+w;let S=d.x,C=d.y;s.setWidth(this.width),g?x>0&&S+k+c>this.right&&(C=d.y+=y,d.line++,S=d.x=Lb(i,this.left+c,this.right-n[d.line])):x>0&&C+y>this.bottom&&(S=d.x=S+t[d.line].width+c,d.line++,C=d.y=Lb(i,this.top+b+c,this.bottom-t[d.line].height));if(function(e,t,n){if(isNaN(p)||p<=0||isNaN(f)||f<0)return;r.save();const i=Fg(n.lineWidth,1);if(r.fillStyle=Fg(n.fillStyle,o),r.lineCap=Fg(n.lineCap,"butt"),r.lineDashOffset=Fg(n.lineDashOffset,0),r.lineJoin=Fg(n.lineJoin,"miter"),r.lineWidth=i,r.strokeStyle=Fg(n.strokeStyle,o),r.setLineDash(Fg(n.lineDash,[])),a.usePointStyle){const o={radius:f*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:i},l=s.xPlus(e,p/2);ly(r,o,l,t+h,a.pointStyleWidth&&p)}else{const a=t+Math.max((u-f)/2,0),o=s.leftForLtr(e,p),l=ky(n.borderRadius);r.beginPath(),Object.values(l).some((e=>0!==e))?by(r,{x:o,y:a,w:p,h:f,radius:l}):r.rect(o,a,p,f),r.fill(),0!==i&&r.stroke()}r.restore()}(s.x(S),C,v),S=((e,t,n,r)=>e===(r?"left":"right")?n:"center"===e?(t+n)/2:t)(_,S+p+h,g?S+k:this.right,e.rtl),function(e,t,n){gy(r,n.text,e,t+m/2,l,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})}(s.x(S),C,v),g)d.x+=k+c;else if("string"!==typeof v.text){const e=l.lineHeight;d.y+=Rw(v,e)+c}else d.y+=y})),hv(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,n=Cy(t.font),r=Sy(t.padding);if(!t.display)return;const i=cv(e.rtl,this.left,this.width),a=this.ctx,o=t.position,s=n.size/2,l=r.top+s;let c,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+l,u=Lb(e.align,u,this.right-h);else{const t=this.columnSizes.reduce(((e,t)=>Math.max(e,t.height)),0);c=l+Lb(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const d=Lb(o,u,u+h);a.textAlign=i.textAlign(jb(o)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,gy(a,t.text,d,c,n)}_computeTitleHeight(){const e=this.options.title,t=Cy(e.font),n=Sy(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,i;if(Mb(e,this.left,this.right)&&Mb(t,this.top,this.bottom))for(i=this.legendHitBoxes,n=0;ne.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map((e=>{const l=e.controller.getStyle(n?0:void 0),c=Sy(l.borderWidth);return{text:t[e.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:r||l.pointStyle,rotation:l.rotation,textAlign:i||l.textAlign,borderRadius:o&&(s||l.borderRadius),datasetIndex:e.index}}),this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};new WeakMap;const Lw={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;te+t))/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n,r,i,a=t.x,o=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n-1?e.split("\n"):e}function Bw(e,t){const{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:e,label:o,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Fw(e,t){const n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,l=Cy(t.bodyFont),c=Cy(t.titleFont),u=Cy(t.footerFont),h=a.length,d=i.length,p=r.length,f=Sy(t.padding);let m=f.height,g=0,b=r.reduce(((e,t)=>e+t.before.length+t.lines.length+t.after.length),0);if(b+=e.beforeBody.length+e.afterBody.length,h&&(m+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),b){m+=p*(t.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(b-p)*l.lineHeight+(b-1)*t.bodySpacing}d&&(m+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let y=0;const v=function(e){g=Math.max(g,n.measureText(e).width+y)};return n.save(),n.font=c.string,Ug(e.title,v),n.font=l.string,Ug(e.beforeBody.concat(e.afterBody),v),y=t.displayColors?o+2+t.boxPadding:0,Ug(r,(e=>{Ug(e.before,v),Ug(e.lines,v),Ug(e.after,v)})),y=0,n.font=u.string,Ug(e.footer,v),n.restore(),g+=f.width,{width:g,height:m}}function Hw(e,t,n,r){const{x:i,width:a}=n,{width:o,chartArea:{left:s,right:l}}=e;let c="center";return"center"===r?c=i<=(s+l)/2?"left":"right":i<=a/2?c="left":i>=o-a/2&&(c="right"),function(e,t,n,r){const{x:i,width:a}=r,o=n.caretSize+n.caretPadding;return"left"===e&&i+a+o>t.width||"right"===e&&i-a-o<0||void 0}(c,e,t,n)&&(c="center"),c}function $w(e,t,n){const r=n.yAlign||t.yAlign||function(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}(e,n);return{xAlign:n.xAlign||t.xAlign||Hw(e,t,n,r),yAlign:r}}function Uw(e,t,n,r){const{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:s,yAlign:l}=n,c=i+a,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:p}=ky(o);let f=function(e,t){let{x:n,width:r}=e;return"right"===t?n-=r:"center"===t&&(n-=r/2),n}(t,s);const m=function(e,t,n){let{y:r,height:i}=e;return"top"===t?r+=n:r-="bottom"===t?i+n:i/2,r}(t,l,c);return"center"===l?"left"===s?f+=c:"right"===s&&(f-=c):"left"===s?f-=Math.max(u,d)+i:"right"===s&&(f+=Math.max(h,p)+i),{x:Cb(f,0,r.width-t.width),y:Cb(m,0,r.height-t.height)}}function qw(e,t,n){const r=Sy(n.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function Ww(e){return Dw([],Iw(e))}function Vw(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Yw={beforeTitle:Og,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndexLw)();constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&t.options.animation&&n.animations,i=new Mv(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=(e=this.chart.getContext(),t=this,n=this._tooltipItems,Ty(e,{tooltip:t,tooltipItems:n,type:"tooltip"})));var e,t,n}getTitle(e,t){const{callbacks:n}=t,r=Gw(n,"beforeTitle",this,e),i=Gw(n,"title",this,e),a=Gw(n,"afterTitle",this,e);let o=[];return o=Dw(o,Iw(r)),o=Dw(o,Iw(i)),o=Dw(o,Iw(a)),o}getBeforeBody(e,t){return Ww(Gw(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:n}=t,r=[];return Ug(e,(e=>{const t={before:[],lines:[],after:[]},i=Vw(n,e);Dw(t.before,Iw(Gw(i,"beforeLabel",this,e))),Dw(t.lines,Gw(i,"label",this,e)),Dw(t.after,Iw(Gw(i,"afterLabel",this,e))),r.push(t)})),r}getAfterBody(e,t){return Ww(Gw(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:n}=t,r=Gw(n,"beforeFooter",this,e),i=Gw(n,"footer",this,e),a=Gw(n,"afterFooter",this,e);let o=[];return o=Dw(o,Iw(r)),o=Dw(o,Iw(i)),o=Dw(o,Iw(a)),o}_createItems(e){const t=this._active,n=this.chart.data,r=[],i=[],a=[];let o,s,l=[];for(o=0,s=t.length;oe.filter(t,r,i,n)))),e.itemSort&&(l=l.sort(((t,r)=>e.itemSort(t,r,n)))),Ug(l,(t=>{const n=Vw(e.callbacks,t);r.push(Gw(n,"labelColor",this,t)),i.push(Gw(n,"labelPointStyle",this,t)),a.push(Gw(n,"labelTextColor",this,t))})),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=l,l}update(e,t){const n=this.options.setContext(this.getContext()),r=this._active;let i,a=[];if(r.length){const e=Lw[n.position].call(this,r,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const t=this._size=Fw(this,n),o=Object.assign({},e,t),s=$w(this.chart,n,o),l=Uw(n,o,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,i={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(i={opacity:0});this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){const i=this.getCaretPosition(e,n,r);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(e,t,n){const{xAlign:r,yAlign:i}=this,{caretSize:a,cornerRadius:o}=n,{topLeft:s,topRight:l,bottomLeft:c,bottomRight:u}=ky(o),{x:h,y:d}=e,{width:p,height:f}=t;let m,g,b,y,v,x;return"center"===i?(v=d+f/2,"left"===r?(m=h,g=m-a,y=v+a,x=v-a):(m=h+p,g=m+a,y=v-a,x=v+a),b=m):(g="left"===r?h+Math.max(s,c)+a:"right"===r?h+p-Math.max(l,u)-a:this.caretX,"top"===i?(y=d,v=y-a,m=g-a,b=g+a):(y=d+f,v=y+a,m=g+a,b=g-a),x=y),{x1:m,x2:g,x3:b,y1:y,y2:v,y3:x}}drawTitle(e,t,n){const r=this.title,i=r.length;let a,o,s;if(i){const l=cv(n.rtl,this.x,this.width);for(e.x=qw(this,n.titleAlign,n),t.textAlign=l.textAlign(n.titleAlign),t.textBaseline="middle",a=Cy(n.titleFont),o=n.titleSpacing,t.fillStyle=n.titleColor,t.font=a.string,s=0;s0!==e))?(e.beginPath(),e.fillStyle=i.multiKeyBackground,by(e,{x:t,y:p,w:l,h:s,radius:o}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),by(e,{x:n,y:p+1,w:l-2,h:s-2,radius:o}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(t,p,l,s),e.strokeRect(t,p,l,s),e.fillStyle=a.backgroundColor,e.fillRect(n,p+1,l-2,s-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){const{body:r}=this,{bodySpacing:i,bodyAlign:a,displayColors:o,boxHeight:s,boxWidth:l,boxPadding:c}=n,u=Cy(n.bodyFont);let h=u.lineHeight,d=0;const p=cv(n.rtl,this.x,this.width),f=function(n){t.fillText(n,p.x(e.x+d),e.y+h/2),e.y+=h+i},m=p.textAlign(a);let g,b,y,v,x,w,_;for(t.textAlign=a,t.textBaseline="middle",t.font=u.string,e.x=qw(this,m,n),t.fillStyle=n.bodyColor,Ug(this.beforeBody,f),d=o&&"right"!==m?"center"===a?l/2+c:l+2+c:0,v=0,w=r.length;v0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,n=this.$animations,r=n&&n.x,i=n&&n.y;if(r||i){const n=Lw[e.position].call(this,this._active,this._eventPosition);if(!n)return;const a=this._size=Fw(this,e),o=Object.assign({},n,this._size),s=$w(t,e,o),l=Uw(e,o,s,t);r._to===l.x&&i._to===l.y||(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(t);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=Sy(t.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&o&&(e.save(),e.globalAlpha=n,this.drawBackground(i,e,r,t),uv(e,t.textDirection),i.y+=a.top,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),hv(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const n=this._active,r=e.map((e=>{let{datasetIndex:t,index:n}=e;const r=this.chart.getDatasetMeta(t);if(!r)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:r.data[n],index:n}})),i=!qg(n,r),a=this._positionChanged(r,t);(i||a)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],a=this._getActiveElements(e,i,t,n),o=this._positionChanged(a,e),s=t||!qg(a,i)||o;return s&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),s}_getActiveElements(e,t,n,r){const i=this.options;if("mouseout"===e.type)return[];if(!r)return t.filter((e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)));const a=this.chart.getElementsAtEventForMode(e,i.mode,i,n);return i.reverse&&a.reverse(),a}_positionChanged(e,t){const{caretX:n,caretY:r,options:i}=this,a=Lw[i.position].call(this,e,t);return!1!==a&&(n!==a.x||r!==a.y)}}var Qw={id:"tooltip",_element:Xw,positioners:Lw,afterInit(e,t,n){n&&(e.tooltip=new Xw({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Yw},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function Kw(e,t,n,r){const i=e.indexOf(t);if(-1===i)return((e,t,n,r)=>("string"===typeof t?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n))(e,t,n,r);return i!==e.lastIndexOf(t)?n:i}function Jw(e){const t=this.getLabels();return e>=0&&e({ticks:{callback:Jw}}))();constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:n,label:r}of t)e[n]===r&&e.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(jg(e))return null;const n=this.getLabels();return((e,t)=>null===e?null:Cb(Math.round(e),0,t))(t=isFinite(t)&&n[t]===e?t:Kw(n,e,Fg(t,e),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:n,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(n=0),t||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){const e=this.min,t=this.max,n=this.options.offset,r=[];let i=this.getLabels();i=0===e&&t===i.length-1?i:i.slice(e,t+1),this._valueRange=Math.max(i.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let a=e;a<=t;a++)r.push({value:a});return r}getLabelForValue(e){return Jw.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!==typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function e_(e,t){const n=[],{bounds:r,step:i,min:a,max:o,precision:s,count:l,maxTicks:c,maxDigits:u,includeBounds:h}=e,d=i||1,p=c-1,{min:f,max:m}=t,g=!jg(a),b=!jg(o),y=!jg(l),v=(m-f)/(u+1);let x,w,_,k,S=fb((m-f)/p/d)*d;if(S<1e-14&&!g&&!b)return[{value:f},{value:m}];k=Math.ceil(m/S)-Math.floor(f/S),k>p&&(S=fb(k*S/p/d)*d),jg(s)||(x=Math.pow(10,s),S=Math.ceil(S*x)/x),"ticks"===r?(w=Math.floor(f/S)*S,_=Math.ceil(m/S)*S):(w=f,_=m),g&&b&&i&&function(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}((o-a)/i,S/1e3)?(k=Math.round(Math.min((o-a)/S,c)),S=(o-a)/k,w=a,_=o):y?(w=g?a:w,_=b?o:_,k=l-1,S=(_-w)/k):(k=(_-w)/S,k=pb(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const C=Math.max(vb(S),vb(w));x=Math.pow(10,jg(s)?C:s),w=Math.round(w*x)/x,_=Math.round(_*x)/x;let M=0;for(g&&(h&&w!==a?(n.push({value:a}),wo)break;n.push({value:e})}return b&&h&&_!==o?n.length&&pb(n[n.length-1].value,o,t_(o,v,e))?n[n.length-1].value=o:n.push({value:o}):b&&_!==o||n.push({value:_}),n}function t_(e,t,n){let{horizontal:r,minRotation:i}=n;const a=bb(i),o=(r?Math.sin(a):Math.cos(a))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class n_ extends Ix{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return jg(e)||("number"===typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this;const a=e=>r=t?r:e,o=e=>i=n?i:e;if(e){const e=db(r),t=db(i);e<0&&t<0?o(0):e>0&&t>0&&a(0)}if(r===i){let t=0===i?1:Math.abs(.05*i);o(i+t),e||a(r-t)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:n,stepSize:r}=e;return r?(t=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=e_({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&gb(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return Xb(e,this.chart.options.locale,this.options.ticks.format)}}class r_ extends n_{static id="linear";static defaults=(()=>({ticks:{callback:Kb.formatters.numeric}}))();determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ig(e)?e:0,this.max=Ig(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,n=bb(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Kb.formatters.logarithmic;Kb.formatters.numeric;const i_={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},a_=Object.keys(i_);function o_(e,t){return e-t}function s_(e,t){if(jg(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts;let o=t;return"function"===typeof r&&r(o),Ig(o)||("string"===typeof r?n.parse(o,r):n.parse(o)),null===o?null:(i&&("week"!==i||!mb(a)&&!0!==a?n.startOf(o,i):n.startOf(o,"isoWeek",a)),+o)}function l_(e,t,n,r){const i=a_.length;for(let a=a_.indexOf(e);a=t?n[r]:n[i]]=!0}}else e[t]=!0}function u_(e,t,n){const r=[],i={},a=t.length;let o,s;for(0;o=0&&(t[l].major=!0);return t}(e,r,i,n):r}class h_ extends Ix{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.time||(e.time={}),r=this._adapter=new qv(e.adapters.date);r.init(t),Xg(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:s_(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,n=e.time.unit||"day";let{min:r,max:i,minDefined:a,maxDefined:o}=this.getUserBounds();function s(e){a||isNaN(e.min)||Math.min(r,e.min),o||isNaN(e.max)||Math.max(i,e.max)}a&&o||(s(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||s(this.getMinMax(!1))),Ig(r)&&!isNaN(r)?r:+t.startOf(Date.now(),n),Ig(i)&&!isNaN(i)?i:+t.endOf(Date.now(),n)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(e[0],e[e.length-1]),{min:t,max:n}}buildTicks(){const e=this.options,t=e.time,n=e.ticks,r="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,a=function(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)0;return r>0||i=a_.indexOf(n);a--){const n=a_[a];if(i_[n].common&&e._adapter.diff(i,r,n)>=t-1)return n}return a_[n?a_.indexOf(n):0]}(this,a.length,t.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(e){for(let t=a_.indexOf(e)+1,n=a_.length;t+e.value)))}initOffsets(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=0,i=0;this.options.offset&&n.length&&(this.getDecimalForValue(n[0]),1===n.length?1-e:(this.getDecimalForValue(n[1])-e)/2,this.getDecimalForValue(n[n.length-1]),1===n.length?t:(t-this.getDecimalForValue(n[n.length-2]))/2);const a=n.length<3?.5:.25;Cb(r,0,a),Cb(i,0,a),this._offsets={start:r,end:i,factor:1/(r+1+i)}}_generate(){const e=this._adapter,t=this.min,n=this.max,r=this.options,i=r.time,a=i.unit||l_(i.minUnit,t,n,this._getLabelCapacity(t)),o=Fg(r.ticks.stepSize,1),s="week"===a&&i.isoWeekday,l=mb(s)||!0===s,c={};let u,h,d=t;if(l&&+e.startOf(d,"isoWeek",s),+e.startOf(d,l?"day":a),e.diff(n,t,a)>1e5*o)throw new Error(t+" and "+n+" are too far apart with stepSize of "+o+" "+a);const p="data"===r.ticks.source&&this.getDataTimestamps();for(0;u+e))}getLabelForValue(e){const t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){const n=this.options.time.displayFormats,r=this._unit,i=t||n[r];return this._adapter.format(e,i)}_tickFormatFunction(e,t,n,r){const i=this.options,a=i.ticks.callback;if(a)return $g(a,[e,t,n],this);const o=i.time.displayFormats,s=this._unit,l=this._majorUnit,c=s&&o[s],u=l&&o[l],h=n[t],d=l&&u&&h&&h.major;return this._adapter.format(e,r||(d?u:c))}generateTickLabels(e){let t,n,r;for(e.length;t0?o:1}getDataTimestamps(){let e,t,n=this._cache.data||[];if(n.length)return n;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(r.length;e2&&void 0!==arguments[2]?arguments[2]:d_;const r=[];e.datasets=t.map((t=>{const i=e.datasets.find((e=>e[n]===t[n]));return i&&t.data&&!r.includes(i)?(r.push(i),Object.assign(i,t),i):{...t}}))}function g_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d_;const n={labels:[],datasets:[]};return f_(n,e.labels),m_(n,e.datasets,t),n}function b_(e,t){const{height:n=150,width:i=300,redraw:a=!1,datasetIdKey:o,type:s,data:l,options:c,plugins:u=[],fallbackContent:h,updateMode:d,...p}=e,f=(0,r.useRef)(null),m=(0,r.useRef)(null),g=()=>{f.current&&(m.current=new fw(f.current,{type:s,data:g_(l,o),options:c&&{...c},plugins:u}),p_(t,m.current))},b=()=>{p_(t,null),m.current&&(m.current.destroy(),m.current=null)};return(0,r.useEffect)((()=>{!a&&m.current&&c&&function(e,t){const n=e.options;n&&t&&Object.assign(n,t)}(m.current,c)}),[a,c]),(0,r.useEffect)((()=>{!a&&m.current&&f_(m.current.config.data,l.labels)}),[a,l.labels]),(0,r.useEffect)((()=>{!a&&m.current&&l.datasets&&m_(m.current.config.data,l.datasets,o)}),[a,l.datasets]),(0,r.useEffect)((()=>{m.current&&(a?(b(),setTimeout(g)):m.current.update(d))}),[a,c,l.labels,l.datasets,d]),(0,r.useEffect)((()=>{m.current&&(b(),setTimeout(g))}),[s]),(0,r.useEffect)((()=>(g(),()=>b())),[]),r.createElement("canvas",{ref:f,role:"img",height:n,width:i,...p},h)}const y_=(0,r.forwardRef)(b_);function v_(e,t){return fw.register(t),(0,r.forwardRef)(((t,n)=>r.createElement(y_,{...t,ref:n,type:e})))}const x_=v_("line",Fv),w_=v_("pie",Hv);fw.register(xw,Qw,jw,Zw,r_,Pw,Aw);const __=["Conceptual Error","Calculation Error","Inattention","Algebra Slip","Sign Error","Other"],k_={Precalculus:["Functions","Limits","Trigonometry"],Calculus:["Derivatives","Integrals","Series"],Geometry:["Triangles","Circles","3-D Shapes"]};function S_(e,t){return+(Math.random()*(t-e)+e).toFixed(1)}function C_(e){const t={labels:__,datasets:[{data:__.map((()=>S_(8,22))),backgroundColor:["#FF6384","#36A2EB","#FFCE56","#4BC0C0","#9966FF","#FF9F40"]}]},n={labels:["Jan","Feb","Mar"],datasets:__.map(((e,n)=>({label:__[n],data:Array(3).fill(0).map((()=>S_(5,18))),fill:!1,borderColor:t.datasets[0].backgroundColor[n],tension:.3})))},r=Array.from({length:15},((e,t)=>{const n=S_(50,100),r=S_(5,25),i=__.map((()=>S_(0,15)));return{student:`Student ${t+1}`,progression:n,globalError:r,conceptual:i[0],calculation:i[1],inattention:i[2],algebraSlip:i[3],signError:i[4],other:i[5]}}));return{title:e,pie:t,line:n,table:r}}const M_={Precalculus:C_("Precalculus"),Calculus:C_("Calculus"),Geometry:C_("Geometry")};function T_(){const e=Object.entries(M_),[t,n]=(0,r.useState)(null),[i,a]=(0,r.useState)({}),[o,s]=(0,r.useState)({}),[l,c]=(0,r.useState)({}),u=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e>=75?Wm:Vm:e>=15?Ym:Wm},h=(e,t,n)=>{c((r=>({...r,[e]:{...r[e],[t]:n}})))};return(0,xn.jsxs)("div",{className:Nm,children:[(0,xn.jsxs)("header",{className:Pm,children:[(0,xn.jsxs)("div",{className:zm,children:[(0,xn.jsx)("span",{className:Om,children:"\ud83d\udcc6"}),(0,xn.jsx)("span",{className:Rm,children:"3"}),(0,xn.jsx)("span",{className:jm,children:"Lesson Plans"})]}),(0,xn.jsxs)("div",{className:zm,children:[(0,xn.jsx)("span",{className:Om,children:"\ud83c\udf93"}),(0,xn.jsx)("span",{className:Rm,children:e.length}),(0,xn.jsx)("span",{className:jm,children:"Nb of classes"})]}),(0,xn.jsxs)("div",{className:zm,children:[(0,xn.jsx)("span",{className:Om,children:"\ud83d\udcc8"}),(0,xn.jsx)("span",{className:Rm,children:"+12%"}),(0,xn.jsx)("span",{className:jm,children:"Progress last week"})]}),(0,xn.jsxs)("div",{className:zm,children:[(0,xn.jsx)("span",{className:Om,children:"\u2705"}),(0,xn.jsx)("span",{className:Rm,children:"8%"}),(0,xn.jsx)("span",{className:jm,children:"Mistakes reduced"})]}),(0,xn.jsxs)("div",{className:zm,children:[(0,xn.jsx)("span",{className:Om,children:"\ud83d\udcdd"}),(0,xn.jsx)("span",{className:Rm,children:"42"}),(0,xn.jsx)("span",{className:jm,children:"Practice sessions"})]})]}),(0,xn.jsx)("div",{className:Lm,children:e.map((e=>{let[r,c]=e;const d=t===r,p=i[r],f=o[r],m=l[r]||{};return(0,xn.jsxs)("div",{className:Dm,children:[(0,xn.jsxs)("button",{className:Im,onClick:()=>n(d?null:r),children:[c.title,(0,xn.jsx)("span",{className:Bm,children:d?"\u25b2":"\u25bc"})]}),d&&(0,xn.jsxs)("div",{className:Fm,children:[(0,xn.jsxs)("div",{className:Hm,children:[(0,xn.jsx)("h4",{children:"Error Distribution"}),(0,xn.jsx)(w_,{data:c.pie})]}),(0,xn.jsxs)("div",{className:Hm,children:[(0,xn.jsx)("h4",{children:"Error Trends"}),(0,xn.jsx)(x_,{data:c.line})]}),(0,xn.jsxs)("div",{className:$m,children:[(0,xn.jsx)("h4",{children:"Class Details"}),(0,xn.jsx)("div",{className:Um,children:(0,xn.jsxs)("table",{className:qm,children:[(0,xn.jsx)("thead",{children:(0,xn.jsxs)("tr",{children:[(0,xn.jsx)("th",{children:"Student"}),(0,xn.jsx)("th",{children:"Progress"}),(0,xn.jsx)("th",{children:"Global Err"}),__.map((e=>(0,xn.jsx)("th",{children:e},e)))]})}),(0,xn.jsx)("tbody",{children:c.table.slice(0,p?c.table.length:5).map(((e,t)=>(0,xn.jsxs)("tr",{children:[(0,xn.jsx)("td",{children:e.student}),(0,xn.jsxs)("td",{className:u(e.progression,!0),children:[e.progression,"%"]}),(0,xn.jsxs)("td",{className:u(e.globalError),children:[e.globalError,"%"]}),__.map(((t,n)=>{const r=Object.values(e)[n+3];return(0,xn.jsxs)("td",{className:u(r),children:[r,"%"]},n)}))]},t)))})]})}),(0,xn.jsx)("button",{className:Gm,onClick:()=>a((e=>({...e,[r]:!e[r]}))),children:p?"Show less \u25b2":"Show more \u25bc"}),(0,xn.jsxs)("div",{className:Xm,children:[(0,xn.jsxs)("div",{className:Qm,onClick:()=>s((e=>({...e,[r]:!e[r]}))),children:[(0,xn.jsx)("span",{children:"Generate Exam"}),(0,xn.jsx)("span",{className:Bm,children:f?"\u25b2":"\u25bc"})]}),f&&(0,xn.jsxs)("div",{className:Km,children:[(0,xn.jsxs)("div",{className:Jm,children:[(0,xn.jsx)("label",{htmlFor:`topic-${r}`,children:"Topic"}),(0,xn.jsxs)("select",{id:`topic-${r}`,value:m.topic||"",onChange:e=>h(r,"topic",e.target.value),children:[(0,xn.jsx)("option",{value:"",disabled:!0,children:"Select a topic"}),k_[r].map((e=>(0,xn.jsx)("option",{value:e,children:e},e)))]})]}),(0,xn.jsxs)("div",{className:Jm,children:[(0,xn.jsx)("label",{htmlFor:`obj-${r}`,children:"Objective"}),(0,xn.jsxs)("select",{id:`obj-${r}`,value:m.obj||"",onChange:e=>h(r,"obj",e.target.value),children:[(0,xn.jsx)("option",{value:"",disabled:!0,children:"Select objective"}),(0,xn.jsx)("option",{children:"Homework"}),(0,xn.jsx)("option",{children:"Test Prep"}),(0,xn.jsx)("option",{children:"Exam"})]})]}),(0,xn.jsxs)("div",{className:Jm,children:[(0,xn.jsx)("label",{htmlFor:`count-${r}`,children:"# Questions"}),(0,xn.jsx)("input",{id:`count-${r}`,type:"number",min:1,value:m.count||10,onChange:e=>h(r,"count",e.target.value)})]}),(0,xn.jsxs)("div",{className:Jm,children:[(0,xn.jsx)("label",{htmlFor:`count-${r}`,children:"# Mean duration"}),(0,xn.jsx)("input",{id:`count-${r}`,type:"number",min:1,value:m.count||60,onChange:e=>h(r,"count",e.target.value)})]}),(0,xn.jsx)("button",{className:Zm,children:"Generate"})]})]})]})]})]},r)}))})]})}const E_="SessionHistory_historyWrapper__LyH+Y",A_="SessionHistory_cards__TeD44",N_="SessionHistory_card__Se616",P_="SessionHistory_cardHeader__kPie4",z_="SessionHistory_title__5PQIw",O_="SessionHistory_date__DbJM5",R_="SessionHistory_score__Zaimp";function j_(){const[e,t]=(0,r.useState)([]),n="https://api.racine-ai.com",i=B();(0,r.useEffect)((()=>{fetch(`${n}/session/history`,{credentials:"include"}).then((e=>e.json())).then((e=>{const n=e.sort(((e,t)=>t.ended_at-e.ended_at));t(n)})).catch((e=>console.error("Fetch session history error:",e)))}),[n]);const a=e=>{const t=Math.max(0,Math.min(e/5,1));return`hsl(${Math.round(120*t)}, 70%, 60%)`};return(0,xn.jsxs)("div",{className:E_,children:[(0,xn.jsx)("h2",{children:"Session History"}),(0,xn.jsxs)("div",{className:A_,children:[e.map((e=>{return(0,xn.jsxs)("div",{className:N_,style:{borderLeft:`4px solid ${a(e.average)}`},onClick:()=>i("/practice/recap",{state:{grade:e.grade,course_name:e.course,chapter:e.chapter,session_id:e.session_id}}),children:[(0,xn.jsxs)("div",{className:P_,children:[(0,xn.jsxs)("div",{className:z_,children:[e.course," \u2014 ",e.chapter]}),(0,xn.jsx)("div",{className:O_,children:(t=e.ended_at,new Date(1e3*t).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}))})]}),(0,xn.jsxs)("div",{className:R_,style:{backgroundColor:a(e.average)},children:["Avg: ",e.average.toFixed(1)," / 5"]})]},e.session_id);var t})),0===e.length&&(0,xn.jsx)("p",{children:"No past sessions found."})]})]})}function L_(e){return jn({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"},child:[]}]})(e)}function D_(e){return jn({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"},child:[]}]})(e)}function I_(e){return jn({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"},child:[]}]})(e)}function B_(e){return jn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M16 9C16 11.2091 14.2091 13 12 13C9.79086 13 8 11.2091 8 9C8 6.79086 9.79086 5 12 5C14.2091 5 16 6.79086 16 9ZM14 9C14 10.1046 13.1046 11 12 11C10.8954 11 10 10.1046 10 9C10 7.89543 10.8954 7 12 7C13.1046 7 14 7.89543 14 9Z",fill:"currentColor"},child:[]},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1ZM3 12C3 14.0902 3.71255 16.014 4.90798 17.5417C6.55245 15.3889 9.14627 14 12.0645 14C14.9448 14 17.5092 15.3531 19.1565 17.4583C20.313 15.9443 21 14.0524 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12ZM12 21C9.84977 21 7.87565 20.2459 6.32767 18.9878C7.59352 17.1812 9.69106 16 12.0645 16C14.4084 16 16.4833 17.1521 17.7538 18.9209C16.1939 20.2191 14.1881 21 12 21Z",fill:"currentColor"},child:[]}]})(e)}function F_(e){return jn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16.7574 2.99678L14.7574 4.99678H5V18.9968H19V9.23943L21 7.23943V19.9968C21 20.5491 20.5523 20.9968 20 20.9968H4C3.44772 20.9968 3 20.5491 3 19.9968V3.99678C3 3.4445 3.44772 2.99678 4 2.99678H16.7574ZM20.4853 2.09729L21.8995 3.5115L12.7071 12.7039L11.2954 12.7064L11.2929 11.2897L20.4853 2.09729Z"},child:[]}]})(e)}function H_(e){return jn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3.99826 21C3.44694 21 3 20.5551 3 20.0066V3.9934C3 3.44476 3.44495 3 3.9934 3H20.0066C20.5552 3 21 3.44749 21 3.9985V16L15.9968 21H3.99826ZM5 19H15.1688L19 15.1712V5H5V19Z"},child:[]}]})(e)}const $_="Sidebar_sidebar__Pr5sH",U_="Sidebar_logoWrap__8nRwc",q_="Sidebar_logo__Mp0EX",W_="Sidebar_nav__-0TQY",V_="Sidebar_navItem__MWYat",Y_="Sidebar_active__f+7-Q",G_="Sidebar_logoutBtn__8sClR",X_="Sidebar_logoutText__ENx8l",Q_=[{to:"/",icon:(0,xn.jsx)(ar,{}),label:"Dashboard"},{to:"/courses",icon:(0,xn.jsx)(L_,{}),label:"Courses"},{to:"/practice/settings",icon:(0,xn.jsx)(F_,{}),label:"Practice"},{to:"/profile",icon:(0,xn.jsx)(B_,{}),label:"Past Sessions"},{to:"/homework/history",icon:(0,xn.jsx)(H_,{}),label:"Homework Helper"}];function K_(){const{logout:e}=kn();return(0,xn.jsxs)("aside",{className:$_,children:[(0,xn.jsx)("div",{className:U_,children:(0,xn.jsx)("img",{src:"/assets/logo-Racine.png",alt:"Racine",className:q_})}),(0,xn.jsx)("nav",{className:W_,children:Q_.map((e=>{let{to:t,icon:n,label:r}=e;return(0,xn.jsxs)(Z,{to:t,className:e=>{let{isActive:t}=e;return t?`${V_} ${Y_}`:V_},children:[n,(0,xn.jsx)("span",{children:r})]},r)}))}),(0,xn.jsxs)("button",{className:G_,onClick:e,children:[(0,xn.jsx)(rr,{}),(0,xn.jsx)("span",{className:X_,children:"Logout"})]})]})}const J_="SubscribePage_page__ZKqn0",Z_="SubscribePage_header__o4cRi",ek="SubscribePage_grid__iqgzS",tk="SubscribePage_card__lvDVL",nk="SubscribePage_cardPro__HfKdJ",rk="SubscribePage_badge__XAS5d",ik="SubscribePage_tier__+JVOD",ak="SubscribePage_price__DJG33",ok="SubscribePage_features__zfmJd",sk="SubscribePage_cta__F6Y9a";function lk(){const e=B(),[t,n]=(0,r.useState)(!1),i=[{tier:"Free",price:"0",period:"forever",cta:"Start for Free",highlight:!1,onClick:()=>e("/"),features:["Up to 2 course\u2011help questions / day","2 homework assist / mo","Step\u2011by\u2011step customized exercise solutions (1 / day)","Basic progress dashboard","Standard AI model (smaller, less personalised)"]},{tier:"PRO",price:"17.99",period:"month",cta:t?"Redirecting\u2026":"Upgrade to PRO",highlight:!0,onClick:e("https://buy.stripe.com/test_aFa14p4XU4omaftfpAaIM00"),features:["Unlimited course\u2011help questions","Unlimited step\u2011by\u2011step solutions","Unlimited homework assists","Adaptive progress analytics & insights","Premium AI model (PhD Tier)","Support us and let's get personal tutoring accessible!"]}];return(0,xn.jsxs)("div",{className:J_,children:[(0,xn.jsxs)("header",{className:Z_,children:[(0,xn.jsx)("h1",{children:"Choose your plan"}),(0,xn.jsx)("p",{children:"Switch or cancel anytime. No hidden fees."})]}),(0,xn.jsx)("section",{className:ek,children:i.map((e=>{let{tier:n,price:r,period:i,cta:a,features:o,highlight:s,onClick:l}=e;return(0,xn.jsxs)("article",{className:`${tk} ${s?nk:""}`,children:[s&&(0,xn.jsx)("span",{className:rk,children:"Best value"}),(0,xn.jsx)("h2",{className:ik,children:n}),(0,xn.jsxs)("p",{className:ak,children:[`$${r}`," ",(0,xn.jsxs)("span",{children:["/",i]})]}),(0,xn.jsx)("ul",{className:ok,children:o.map((e=>(0,xn.jsx)("li",{children:e},e)))}),(0,xn.jsx)("button",{className:sk,onClick:l,disabled:"PRO"===n&&t,children:a})]},n)}))})]})}function ck(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;tfetch(`${wk}${e}`,{credentials:"include"}).then((e=>e.ok?e.json():Promise.reject(e.text())));function kk(){const e=B(),{refresh:t}=kn(),[n,i]=(0,r.useState)(0),[a,o]=(0,r.useState)([]),[s,l]=(0,r.useState)([]),[c,u]=(0,r.useState)([]),[h,d]=(0,r.useState)(""),[p,f]=(0,r.useState)(""),[m,g]=(0,r.useState)(""),[b,y]=(0,r.useState)(!1),[v,x]=(0,r.useState)("");(0,r.useEffect)((()=>{_k("/catalog/grades").then((e=>o(e.grades)))}),[]),(0,r.useEffect)((()=>{h&&(y(!0),x(""),_k(`/catalog/grades/${h}/courses`).then((e=>{l(e.courses),i(1)})).catch(x).finally((()=>y(!1))))}),[h]),(0,r.useEffect)((()=>{p&&(y(!0),x(""),_k(`/catalog/grades/${h}/courses/${p}/chapters`).then((e=>{u(e.chapters),i(2)})).catch(x).finally((()=>y(!1))))}),[p,h]);const w=0===n?0:1===n?50:100;return(0,xn.jsx)("div",{className:hk,children:(0,xn.jsxs)("div",{className:dk,children:[(0,xn.jsx)("div",{className:mk,children:(0,xn.jsx)("div",{className:gk,style:{width:`${w}%`}})}),(0,xn.jsxs)("header",{children:[n>0&&(0,xn.jsx)("button",{onClick:()=>{1===n&&(d(""),i(0)),2===n&&(f(""),i(1))},className:fk,children:(0,xn.jsx)(I_,{size:22})}),(0,xn.jsxs)("h2",{className:pk,children:[0===n&&"Choose the Topic",1===n&&`Topic ${h}, Choose the Course`,2===n&&`${p} \u2022 ${h}, Choose your Chapter`]})]}),(0,xn.jsxs)("ul",{className:bk,children:[0===n&&a.map((e=>(0,xn.jsx)("li",{onClick:()=>d(e),className:uk({[yk]:h===e}),children:e},e))),1===n&&s.map((e=>(0,xn.jsx)("li",{onClick:()=>f(e),className:uk({[yk]:p===e}),children:e},e))),2===n&&c.map((e=>(0,xn.jsxs)("li",{onClick:()=>g(e),className:uk({[yk]:m===e}),children:[m===e&&(0,xn.jsx)(D_,{size:18})," ",e]},e)))]}),2===n&&(0,xn.jsx)("button",{className:vk,disabled:!m||b,onClick:async()=>{try{y(!0),x(""),await fetch(`${wk}/auth/subscriptions`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({grade:h,course:p,chapter:m})}).then((e=>e.ok?e:Promise.reject(e.text()))),await t(),e("/",{replace:!0})}catch(n){x(String(n))}finally{y(!1)}},children:b?"Saving\u2026":"Start learning"}),v&&(0,xn.jsx)("p",{className:xk,children:v})]})})}const Sk="App_appWrapper__rwrNw",Ck="App_sidebarContainer__g3Ute",Mk="App_mainRouter__21yZl";const Tk=function(){const{pathname:e}=I(),t="/signin"===e||"/signup"===e,[n,i]=(0,r.useState)((()=>"dark"===localStorage.getItem("theme")));return(0,r.useEffect)((()=>{document.body.classList.toggle("dark-theme",n),localStorage.setItem("theme",n?"dark":"light")}),[n]),(0,xn.jsx)("div",{className:Sk,style:{marginLeft:t?0:"18%"},children:(0,xn.jsxs)(W,{children:[(0,xn.jsx)(U,{path:"/signin",element:(0,xn.jsx)(Vn,{})}),(0,xn.jsx)(U,{path:"/signup",element:(0,xn.jsx)(Yn,{})}),(0,xn.jsx)(U,{path:"/onboarding",element:(0,xn.jsx)(Cn,{children:(0,xn.jsx)(pf,{})})}),(0,xn.jsx)(U,{path:"*",element:(0,xn.jsxs)(Cn,{children:[(0,xn.jsx)("div",{className:Ck,children:(0,xn.jsx)(K_,{navItems:[{label:"Home",route:"/"},{label:"My Courses",route:"/courses"},{label:"Homework",route:"/homework/history"},{label:"Practice",route:"/practice/settings"},{label:"Session History",route:"/profile"}],isDark:n,setIsDark:i})}),(0,xn.jsx)("div",{className:Mk,children:(0,xn.jsxs)(W,{children:[(0,xn.jsx)(U,{index:!0,element:(0,xn.jsx)(Mr,{})}),(0,xn.jsx)(U,{path:"courses",element:(0,xn.jsx)(qr,{})}),(0,xn.jsx)(U,{path:"courses/session",element:(0,xn.jsx)(ai,{})}),(0,xn.jsx)(U,{path:"course/learn",element:(0,xn.jsx)(No,{})}),(0,xn.jsx)(U,{path:"course/cheatsheet",element:(0,xn.jsx)(jr,{})}),(0,xn.jsx)(U,{path:"practice",element:(0,xn.jsx)(yf,{})}),(0,xn.jsx)(U,{path:"practice/settings",element:(0,xn.jsx)(Rf,{})}),(0,xn.jsx)(U,{path:"profile",element:(0,xn.jsx)(j_,{})}),(0,xn.jsx)(U,{path:"practice/recap",element:(0,xn.jsx)(Yf,{})}),(0,xn.jsx)(U,{path:"subscribe",element:(0,xn.jsx)(kk,{})}),(0,xn.jsx)(U,{path:"subscribe/plans",element:(0,xn.jsx)(lk,{})}),(0,xn.jsx)(U,{path:"teacher/dashboard",element:(0,xn.jsx)(T_,{})}),(0,xn.jsx)(U,{path:"upload-image",element:(0,xn.jsx)(tm,{})}),(0,xn.jsx)(U,{path:"homework/history",element:(0,xn.jsx)(Fh,{})}),(0,xn.jsx)(U,{path:"homework/practice",element:(0,xn.jsx)(nf,{})}),(0,xn.jsx)(U,{path:"upload-webhandwriting",element:(0,xn.jsx)(Am,{})})]})})]})})]})})};i.createRoot(document.getElementById("root")).render((0,xn.jsx)(r.StrictMode,{children:(0,xn.jsx)(K,{children:(0,xn.jsx)(Sn,{children:(0,xn.jsx)(Tk,{})})})}))})()})(); //# sourceMappingURL=main.ab77a5d8.js.map