31 lines
384 KiB
JavaScript
31 lines
384 KiB
JavaScript
function Bl(n,t){return function(){return n.apply(t,arguments)}}const{toString:rf}=Object.prototype,{getPrototypeOf:Gr}=Object,{iterator:Ns,toStringTag:Hl}=Symbol,Bs=(n=>t=>{const e=rf.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ve=n=>(n=n.toLowerCase(),t=>Bs(t)===n),Hs=n=>t=>typeof t===n,{isArray:fi}=Array,ai=Hs("undefined");function Wi(n){return n!==null&&!ai(n)&&n.constructor!==null&&!ai(n.constructor)&&Pe(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const jl=Ve("ArrayBuffer");function of(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&jl(n.buffer),t}const af=Hs("string"),Pe=Hs("function"),zl=Hs("number"),Vi=n=>n!==null&&typeof n=="object",lf=n=>n===!0||n===!1,bs=n=>{if(Bs(n)!=="object")return!1;const t=Gr(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Hl in n)&&!(Ns in n)},cf=n=>{if(!Vi(n)||Wi(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},uf=Ve("Date"),ff=Ve("File"),hf=Ve("Blob"),df=Ve("FileList"),pf=n=>Vi(n)&&Pe(n.pipe),gf=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Pe(n.append)&&((t=Bs(n))==="formdata"||t==="object"&&Pe(n.toString)&&n.toString()==="[object FormData]"))},mf=Ve("URLSearchParams"),[bf,yf,xf,_f]=["ReadableStream","Request","Response","Headers"].map(Ve),vf=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $i(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let i,s;if(typeof n!="object"&&(n=[n]),fi(n))for(i=0,s=n.length;i<s;i++)t.call(null,n[i],i,n);else{if(Wi(n))return;const r=e?Object.getOwnPropertyNames(n):Object.keys(n),o=r.length;let a;for(i=0;i<o;i++)a=r[i],t.call(null,n[a],a,n)}}function Ul(n,t){if(Wi(n))return null;t=t.toLowerCase();const e=Object.keys(n);let i=e.length,s;for(;i-- >0;)if(s=e[i],t===s.toLowerCase())return s;return null}const Hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wl=n=>!ai(n)&&n!==Hn;function Fr(){const{caseless:n,skipUndefined:t}=Wl(this)&&this||{},e={},i=(s,r)=>{const o=n&&Ul(e,r)||r;bs(e[o])&&bs(s)?e[o]=Fr(e[o],s):bs(s)?e[o]=Fr({},s):fi(s)?e[o]=s.slice():(!t||!ai(s))&&(e[o]=s)};for(let s=0,r=arguments.length;s<r;s++)arguments[s]&&$i(arguments[s],i);return e}const wf=(n,t,e,{allOwnKeys:i}={})=>($i(t,(s,r)=>{e&&Pe(s)?n[r]=Bl(s,e):n[r]=s},{allOwnKeys:i}),n),Sf=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Af=(n,t,e,i)=>{n.prototype=Object.create(t.prototype,i),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},Cf=(n,t,e,i)=>{let s,r,o;const a={};if(t=t||{},n==null)return t;do{for(s=Object.getOwnPropertyNames(n),r=s.length;r-- >0;)o=s[r],(!i||i(o,n,t))&&!a[o]&&(t[o]=n[o],a[o]=!0);n=e!==!1&&Gr(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},kf=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const i=n.indexOf(t,e);return i!==-1&&i===e},Mf=n=>{if(!n)return null;if(fi(n))return n;let t=n.length;if(!zl(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},Tf=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Gr(Uint8Array)),Ef=(n,t)=>{const i=(n&&n[Ns]).call(n);let s;for(;(s=i.next())&&!s.done;){const r=s.value;t.call(n,r[0],r[1])}},Pf=(n,t)=>{let e;const i=[];for(;(e=n.exec(t))!==null;)i.push(e);return i},Of=Ve("HTMLFormElement"),Df=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,i,s){return i.toUpperCase()+s}),Ko=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),Rf=Ve("RegExp"),Vl=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),i={};$i(e,(s,r)=>{let o;(o=t(s,r,n))!==!1&&(i[r]=o||s)}),Object.defineProperties(n,i)},Lf=n=>{Vl(n,(t,e)=>{if(Pe(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const i=n[e];if(Pe(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Ff=(n,t)=>{const e={},i=s=>{s.forEach(r=>{e[r]=!0})};return fi(n)?i(n):i(String(n).split(t)),e},If=()=>{},Nf=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function Bf(n){return!!(n&&Pe(n.append)&&n[Hl]==="FormData"&&n[Ns])}const Hf=n=>{const t=new Array(10),e=(i,s)=>{if(Vi(i)){if(t.indexOf(i)>=0)return;if(Wi(i))return i;if(!("toJSON"in i)){t[s]=i;const r=fi(i)?[]:{};return $i(i,(o,a)=>{const c=e(o,s+1);!ai(c)&&(r[a]=c)}),t[s]=void 0,r}}return i};return e(n,0)},jf=Ve("AsyncFunction"),zf=n=>n&&(Vi(n)||Pe(n))&&Pe(n.then)&&Pe(n.catch),$l=((n,t)=>n?setImmediate:t?((e,i)=>(Hn.addEventListener("message",({source:s,data:r})=>{s===Hn&&r===e&&i.length&&i.shift()()},!1),s=>{i.push(s),Hn.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Pe(Hn.postMessage)),Uf=typeof queueMicrotask<"u"?queueMicrotask.bind(Hn):typeof process<"u"&&process.nextTick||$l,Wf=n=>n!=null&&Pe(n[Ns]),G={isArray:fi,isArrayBuffer:jl,isBuffer:Wi,isFormData:gf,isArrayBufferView:of,isString:af,isNumber:zl,isBoolean:lf,isObject:Vi,isPlainObject:bs,isEmptyObject:cf,isReadableStream:bf,isRequest:yf,isResponse:xf,isHeaders:_f,isUndefined:ai,isDate:uf,isFile:ff,isBlob:hf,isRegExp:Rf,isFunction:Pe,isStream:pf,isURLSearchParams:mf,isTypedArray:Tf,isFileList:df,forEach:$i,merge:Fr,extend:wf,trim:vf,stripBOM:Sf,inherits:Af,toFlatObject:Cf,kindOf:Bs,kindOfTest:Ve,endsWith:kf,toArray:Mf,forEachEntry:Ef,matchAll:Pf,isHTMLForm:Of,hasOwnProperty:Ko,hasOwnProp:Ko,reduceDescriptors:Vl,freezeMethods:Lf,toObjectSet:Ff,toCamelCase:Df,noop:If,toFiniteNumber:Nf,findKey:Ul,global:Hn,isContextDefined:Wl,isSpecCompliantForm:Bf,toJSONObject:Hf,isAsyncFn:jf,isThenable:zf,setImmediate:$l,asap:Uf,isIterable:Wf};function xt(n,t,e,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}G.inherits(xt,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:G.toJSONObject(this.config),code:this.code,status:this.status}}});const ql=xt.prototype,Xl={};["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(n=>{Xl[n]={value:n}});Object.defineProperties(xt,Xl);Object.defineProperty(ql,"isAxiosError",{value:!0});xt.from=(n,t,e,i,s,r)=>{const o=Object.create(ql);G.toFlatObject(n,o,function(u){return u!==Error.prototype},f=>f!=="isAxiosError");const a=n&&n.message?n.message:"Error",c=t==null&&n?n.code:t;return xt.call(o,a,c,e,i,s),n&&o.cause==null&&Object.defineProperty(o,"cause",{value:n,configurable:!0}),o.name=n&&n.name||"Error",r&&Object.assign(o,r),o};const Vf=null;function Ir(n){return G.isPlainObject(n)||G.isArray(n)}function Yl(n){return G.endsWith(n,"[]")?n.slice(0,-2):n}function Go(n,t,e){return n?n.concat(t).map(function(s,r){return s=Yl(s),!e&&r?"["+s+"]":s}).join(e?".":""):t}function $f(n){return G.isArray(n)&&!n.some(Ir)}const qf=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function js(n,t,e){if(!G.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=G.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,S){return!G.isUndefined(S[_])});const i=e.metaTokens,s=e.visitor||u,r=e.dots,o=e.indexes,c=(e.Blob||typeof Blob<"u"&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(s))throw new TypeError("visitor must be a function");function f(y){if(y===null)return"";if(G.isDate(y))return y.toISOString();if(G.isBoolean(y))return y.toString();if(!c&&G.isBlob(y))throw new xt("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(y)||G.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function u(y,_,S){let A=y;if(y&&!S&&typeof y=="object"){if(G.endsWith(_,"{}"))_=i?_:_.slice(0,-2),y=JSON.stringify(y);else if(G.isArray(y)&&$f(y)||(G.isFileList(y)||G.endsWith(_,"[]"))&&(A=G.toArray(y)))return _=Yl(_),A.forEach(function(I,D){!(G.isUndefined(I)||I===null)&&t.append(o===!0?Go([_],D,r):o===null?_:_+"[]",f(I))}),!1}return Ir(y)?!0:(t.append(Go(S,_,r),f(y)),!1)}const d=[],p=Object.assign(qf,{defaultVisitor:u,convertValue:f,isVisitable:Ir});function b(y,_){if(!G.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+_.join("."));d.push(y),G.forEach(y,function(A,L){(!(G.isUndefined(A)||A===null)&&s.call(t,A,G.isString(L)?L.trim():L,_,p))===!0&&b(A,_?_.concat(L):[L])}),d.pop()}}if(!G.isObject(n))throw new TypeError("data must be an object");return b(n),t}function Qo(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Qr(n,t){this._pairs=[],n&&js(n,this,t)}const Kl=Qr.prototype;Kl.append=function(t,e){this._pairs.push([t,e])};Kl.toString=function(t){const e=t?function(i){return t.call(this,i,Qo)}:Qo;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function Xf(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Gl(n,t,e){if(!t)return n;const i=e&&e.encode||Xf;G.isFunction(e)&&(e={serialize:e});const s=e&&e.serialize;let r;if(s?r=s(t,e):r=G.isURLSearchParams(t)?t.toString():new Qr(t,e).toString(i),r){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+r}return n}class Jo{constructor(){this.handlers=[]}use(t,e,i){return this.handlers.push({fulfilled:t,rejected:e,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Ql={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yf=typeof URLSearchParams<"u"?URLSearchParams:Qr,Kf=typeof FormData<"u"?FormData:null,Gf=typeof Blob<"u"?Blob:null,Qf={isBrowser:!0,classes:{URLSearchParams:Yf,FormData:Kf,Blob:Gf},protocols:["http","https","file","blob","url","data"]},Jr=typeof window<"u"&&typeof document<"u",Nr=typeof navigator=="object"&&navigator||void 0,Jf=Jr&&(!Nr||["ReactNative","NativeScript","NS"].indexOf(Nr.product)<0),Zf=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",th=Jr&&window.location.href||"http://localhost",eh=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Jr,hasStandardBrowserEnv:Jf,hasStandardBrowserWebWorkerEnv:Zf,navigator:Nr,origin:th},Symbol.toStringTag,{value:"Module"})),ye={...eh,...Qf};function nh(n,t){return js(n,new ye.classes.URLSearchParams,{visitor:function(e,i,s,r){return ye.isNode&&G.isBuffer(e)?(this.append(i,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}function ih(n){return G.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function sh(n){const t={},e=Object.keys(n);let i;const s=e.length;let r;for(i=0;i<s;i++)r=e[i],t[r]=n[r];return t}function Jl(n){function t(e,i,s,r){let o=e[r++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=r>=e.length;return o=!o&&G.isArray(s)?s.length:o,c?(G.hasOwnProp(s,o)?s[o]=[s[o],i]:s[o]=i,!a):((!s[o]||!G.isObject(s[o]))&&(s[o]=[]),t(e,i,s[o],r)&&G.isArray(s[o])&&(s[o]=sh(s[o])),!a)}if(G.isFormData(n)&&G.isFunction(n.entries)){const e={};return G.forEachEntry(n,(i,s)=>{t(ih(i),s,e,0)}),e}return null}function rh(n,t,e){if(G.isString(n))try{return(t||JSON.parse)(n),G.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(e||JSON.stringify)(n)}const qi={transitional:Ql,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const i=e.getContentType()||"",s=i.indexOf("application/json")>-1,r=G.isObject(t);if(r&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return s?JSON.stringify(Jl(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t)||G.isReadableStream(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(r){if(i.indexOf("application/x-www-form-urlencoded")>-1)return nh(t,this.formSerializer).toString();if((a=G.isFileList(t))||i.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return js(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return r||s?(e.setContentType("application/json",!1),rh(t)):t}],transformResponse:[function(t){const e=this.transitional||qi.transitional,i=e&&e.forcedJSONParsing,s=this.responseType==="json";if(G.isResponse(t)||G.isReadableStream(t))return t;if(t&&G.isString(t)&&(i&&!this.responseType||s)){const o=!(e&&e.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?xt.from(a,xt.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ye.classes.FormData,Blob:ye.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],n=>{qi.headers[n]={}});const oh=G.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"]),ah=n=>{const t={};let e,i,s;return n&&n.split(`
|
||
`).forEach(function(o){s=o.indexOf(":"),e=o.substring(0,s).trim().toLowerCase(),i=o.substring(s+1).trim(),!(!e||t[e]&&oh[e])&&(e==="set-cookie"?t[e]?t[e].push(i):t[e]=[i]:t[e]=t[e]?t[e]+", "+i:i)}),t},Zo=Symbol("internals");function wi(n){return n&&String(n).trim().toLowerCase()}function ys(n){return n===!1||n==null?n:G.isArray(n)?n.map(ys):String(n)}function lh(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=e.exec(n);)t[i[1]]=i[2];return t}const ch=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function br(n,t,e,i,s){if(G.isFunction(i))return i.call(this,t,e);if(s&&(t=e),!!G.isString(t)){if(G.isString(i))return t.indexOf(i)!==-1;if(G.isRegExp(i))return i.test(t)}}function uh(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,i)=>e.toUpperCase()+i)}function fh(n,t){const e=G.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+e,{value:function(s,r,o){return this[i].call(this,t,s,r,o)},configurable:!0})})}let Oe=class{constructor(t){t&&this.set(t)}set(t,e,i){const s=this;function r(a,c,f){const u=wi(c);if(!u)throw new Error("header name must be a non-empty string");const d=G.findKey(s,u);(!d||s[d]===void 0||f===!0||f===void 0&&s[d]!==!1)&&(s[d||c]=ys(a))}const o=(a,c)=>G.forEach(a,(f,u)=>r(f,u,c));if(G.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(G.isString(t)&&(t=t.trim())&&!ch(t))o(ah(t),e);else if(G.isObject(t)&&G.isIterable(t)){let a={},c,f;for(const u of t){if(!G.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[f=u[0]]=(c=a[f])?G.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}o(a,e)}else t!=null&&r(e,t,i);return this}get(t,e){if(t=wi(t),t){const i=G.findKey(this,t);if(i){const s=this[i];if(!e)return s;if(e===!0)return lh(s);if(G.isFunction(e))return e.call(this,s,i);if(G.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=wi(t),t){const i=G.findKey(this,t);return!!(i&&this[i]!==void 0&&(!e||br(this,this[i],i,e)))}return!1}delete(t,e){const i=this;let s=!1;function r(o){if(o=wi(o),o){const a=G.findKey(i,o);a&&(!e||br(i,i[a],a,e))&&(delete i[a],s=!0)}}return G.isArray(t)?t.forEach(r):r(t),s}clear(t){const e=Object.keys(this);let i=e.length,s=!1;for(;i--;){const r=e[i];(!t||br(this,this[r],r,t,!0))&&(delete this[r],s=!0)}return s}normalize(t){const e=this,i={};return G.forEach(this,(s,r)=>{const o=G.findKey(i,r);if(o){e[o]=ys(s),delete e[r];return}const a=t?uh(r):String(r).trim();a!==r&&delete e[r],e[a]=ys(s),i[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return G.forEach(this,(i,s)=>{i!=null&&i!==!1&&(e[s]=t&&G.isArray(i)?i.join(", "):i)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const i=new this(t);return e.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[Zo]=this[Zo]={accessors:{}}).accessors,s=this.prototype;function r(o){const a=wi(o);i[a]||(fh(s,o),i[a]=!0)}return G.isArray(t)?t.forEach(r):r(t),this}};Oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);G.reduceDescriptors(Oe.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[e]=i}}});G.freezeMethods(Oe);function yr(n,t){const e=this||qi,i=t||e,s=Oe.from(i.headers);let r=i.data;return G.forEach(n,function(a){r=a.call(e,r,s.normalize(),t?t.status:void 0)}),s.normalize(),r}function Zl(n){return!!(n&&n.__CANCEL__)}function hi(n,t,e){xt.call(this,n??"canceled",xt.ERR_CANCELED,t,e),this.name="CanceledError"}G.inherits(hi,xt,{__CANCEL__:!0});function tc(n,t,e){const i=e.config.validateStatus;!e.status||!i||i(e.status)?n(e):t(new xt("Request failed with status code "+e.status,[xt.ERR_BAD_REQUEST,xt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function hh(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function dh(n,t){n=n||10;const e=new Array(n),i=new Array(n);let s=0,r=0,o;return t=t!==void 0?t:1e3,function(c){const f=Date.now(),u=i[r];o||(o=f),e[s]=c,i[s]=f;let d=r,p=0;for(;d!==s;)p+=e[d++],d=d%n;if(s=(s+1)%n,s===r&&(r=(r+1)%n),f-o<t)return;const b=u&&f-u;return b?Math.round(p*1e3/b):void 0}}function ph(n,t){let e=0,i=1e3/t,s,r;const o=(f,u=Date.now())=>{e=u,s=null,r&&(clearTimeout(r),r=null),n(...f)};return[(...f)=>{const u=Date.now(),d=u-e;d>=i?o(f,u):(s=f,r||(r=setTimeout(()=>{r=null,o(s)},i-d)))},()=>s&&o(s)]}const As=(n,t,e=3)=>{let i=0;const s=dh(50,250);return ph(r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,c=o-i,f=s(c),u=o<=a;i=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:f||void 0,estimated:f&&a&&u?(a-o)/f:void 0,event:r,lengthComputable:a!=null,[t?"download":"upload"]:!0};n(d)},e)},ta=(n,t)=>{const e=n!=null;return[i=>t[0]({lengthComputable:e,total:n,loaded:i}),t[1]]},ea=n=>(...t)=>G.asap(()=>n(...t)),gh=ye.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,ye.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(ye.origin),ye.navigator&&/(msie|trident)/i.test(ye.navigator.userAgent)):()=>!0,mh=ye.hasStandardBrowserEnv?{write(n,t,e,i,s,r,o){if(typeof document>"u")return;const a=[`${n}=${encodeURIComponent(t)}`];G.isNumber(e)&&a.push(`expires=${new Date(e).toUTCString()}`),G.isString(i)&&a.push(`path=${i}`),G.isString(s)&&a.push(`domain=${s}`),r===!0&&a.push("secure"),G.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function bh(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function yh(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function ec(n,t,e){let i=!bh(t);return n&&(i||e==!1)?yh(n,t):t}const na=n=>n instanceof Oe?{...n}:n;function Vn(n,t){t=t||{};const e={};function i(f,u,d,p){return G.isPlainObject(f)&&G.isPlainObject(u)?G.merge.call({caseless:p},f,u):G.isPlainObject(u)?G.merge({},u):G.isArray(u)?u.slice():u}function s(f,u,d,p){if(G.isUndefined(u)){if(!G.isUndefined(f))return i(void 0,f,d,p)}else return i(f,u,d,p)}function r(f,u){if(!G.isUndefined(u))return i(void 0,u)}function o(f,u){if(G.isUndefined(u)){if(!G.isUndefined(f))return i(void 0,f)}else return i(void 0,u)}function a(f,u,d){if(d in t)return i(f,u);if(d in n)return i(void 0,f)}const c={url:r,method:r,data:r,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:a,headers:(f,u,d)=>s(na(f),na(u),d,!0)};return G.forEach(Object.keys({...n,...t}),function(u){const d=c[u]||s,p=d(n[u],t[u],u);G.isUndefined(p)&&d!==a||(e[u]=p)}),e}const nc=n=>{const t=Vn({},n);let{data:e,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:r,headers:o,auth:a}=t;if(t.headers=o=Oe.from(o),t.url=Gl(ec(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),G.isFormData(e)){if(ye.hasStandardBrowserEnv||ye.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(G.isFunction(e.getHeaders)){const c=e.getHeaders(),f=["content-type","content-length"];Object.entries(c).forEach(([u,d])=>{f.includes(u.toLowerCase())&&o.set(u,d)})}}if(ye.hasStandardBrowserEnv&&(i&&G.isFunction(i)&&(i=i(t)),i||i!==!1&&gh(t.url))){const c=s&&r&&mh.read(r);c&&o.set(s,c)}return t},xh=typeof XMLHttpRequest<"u",_h=xh&&function(n){return new Promise(function(e,i){const s=nc(n);let r=s.data;const o=Oe.from(s.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:f}=s,u,d,p,b,y;function _(){b&&b(),y&&y(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let S=new XMLHttpRequest;S.open(s.method.toUpperCase(),s.url,!0),S.timeout=s.timeout;function A(){if(!S)return;const I=Oe.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),N={data:!a||a==="text"||a==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:I,config:n,request:S};tc(function(g){e(g),_()},function(g){i(g),_()},N),S=null}"onloadend"in S?S.onloadend=A:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(A)},S.onabort=function(){S&&(i(new xt("Request aborted",xt.ECONNABORTED,n,S)),S=null)},S.onerror=function(D){const N=D&&D.message?D.message:"Network Error",P=new xt(N,xt.ERR_NETWORK,n,S);P.event=D||null,i(P),S=null},S.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||Ql;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),i(new xt(D,N.clarifyTimeoutError?xt.ETIMEDOUT:xt.ECONNABORTED,n,S)),S=null},r===void 0&&o.setContentType(null),"setRequestHeader"in S&&G.forEach(o.toJSON(),function(D,N){S.setRequestHeader(N,D)}),G.isUndefined(s.withCredentials)||(S.withCredentials=!!s.withCredentials),a&&a!=="json"&&(S.responseType=s.responseType),f&&([p,y]=As(f,!0),S.addEventListener("progress",p)),c&&S.upload&&([d,b]=As(c),S.upload.addEventListener("progress",d),S.upload.addEventListener("loadend",b)),(s.cancelToken||s.signal)&&(u=I=>{S&&(i(!I||I.type?new hi(null,n,S):I),S.abort(),S=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const L=hh(s.url);if(L&&ye.protocols.indexOf(L)===-1){i(new xt("Unsupported protocol "+L+":",xt.ERR_BAD_REQUEST,n));return}S.send(r||null)})},vh=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let i=new AbortController,s;const r=function(f){if(!s){s=!0,a();const u=f instanceof Error?f:this.reason;i.abort(u instanceof xt?u:new hi(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,r(new xt(`timeout ${t} of ms exceeded`,xt.ETIMEDOUT))},t);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(r):f.removeEventListener("abort",r)}),n=null)};n.forEach(f=>f.addEventListener("abort",r));const{signal:c}=i;return c.unsubscribe=()=>G.asap(a),c}},wh=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let i=0,s;for(;i<e;)s=i+t,yield n.slice(i,s),i=s},Sh=async function*(n,t){for await(const e of Ah(n))yield*wh(e,t)},Ah=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;yield i}}finally{await t.cancel()}},ia=(n,t,e,i)=>{const s=Sh(n,t);let r=0,o,a=c=>{o||(o=!0,i&&i(c))};return new ReadableStream({async pull(c){try{const{done:f,value:u}=await s.next();if(f){a(),c.close();return}let d=u.byteLength;if(e){let p=r+=d;e(p)}c.enqueue(new Uint8Array(u))}catch(f){throw a(f),f}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},sa=64*1024,{isFunction:is}=G,Ch=(({Request:n,Response:t})=>({Request:n,Response:t}))(G.global),{ReadableStream:ra,TextEncoder:oa}=G.global,aa=(n,...t)=>{try{return!!n(...t)}catch{return!1}},kh=n=>{n=G.merge.call({skipUndefined:!0},Ch,n);const{fetch:t,Request:e,Response:i}=n,s=t?is(t):typeof fetch=="function",r=is(e),o=is(i);if(!s)return!1;const a=s&&is(ra),c=s&&(typeof oa=="function"?(y=>_=>y.encode(_))(new oa):async y=>new Uint8Array(await new e(y).arrayBuffer())),f=r&&a&&aa(()=>{let y=!1;const _=new e(ye.origin,{body:new ra,method:"POST",get duplex(){return y=!0,"half"}}).headers.has("Content-Type");return y&&!_}),u=o&&a&&aa(()=>G.isReadableStream(new i("").body)),d={stream:u&&(y=>y.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!d[y]&&(d[y]=(_,S)=>{let A=_&&_[y];if(A)return A.call(_);throw new xt(`Response type '${y}' is not supported`,xt.ERR_NOT_SUPPORT,S)})});const p=async y=>{if(y==null)return 0;if(G.isBlob(y))return y.size;if(G.isSpecCompliantForm(y))return(await new e(ye.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(G.isArrayBufferView(y)||G.isArrayBuffer(y))return y.byteLength;if(G.isURLSearchParams(y)&&(y=y+""),G.isString(y))return(await c(y)).byteLength},b=async(y,_)=>{const S=G.toFiniteNumber(y.getContentLength());return S??p(_)};return async y=>{let{url:_,method:S,data:A,signal:L,cancelToken:I,timeout:D,onDownloadProgress:N,onUploadProgress:P,responseType:g,headers:M,withCredentials:k="same-origin",fetchOptions:B}=nc(y),H=t||fetch;g=g?(g+"").toLowerCase():"text";let j=vh([L,I&&I.toAbortSignal()],D),U=null;const z=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let $;try{if(P&&f&&S!=="get"&&S!=="head"&&($=await b(M,A))!==0){let lt=new e(_,{method:"POST",body:A,duplex:"half"}),st;if(G.isFormData(A)&&(st=lt.headers.get("content-type"))&&M.setContentType(st),lt.body){const[at,it]=ta($,As(ea(P)));A=ia(lt.body,sa,at,it)}}G.isString(k)||(k=k?"include":"omit");const E=r&&"credentials"in e.prototype,T={...B,signal:j,method:S.toUpperCase(),headers:M.normalize().toJSON(),body:A,duplex:"half",credentials:E?k:void 0};U=r&&new e(_,T);let tt=await(r?H(U,B):H(_,T));const q=u&&(g==="stream"||g==="response");if(u&&(N||q&&z)){const lt={};["status","statusText","headers"].forEach(J=>{lt[J]=tt[J]});const st=G.toFiniteNumber(tt.headers.get("content-length")),[at,it]=N&&ta(st,As(ea(N),!0))||[];tt=new i(ia(tt.body,sa,at,()=>{it&&it(),z&&z()}),lt)}g=g||"text";let Z=await d[G.findKey(d,g)||"text"](tt,y);return!q&&z&&z(),await new Promise((lt,st)=>{tc(lt,st,{data:Z,headers:Oe.from(tt.headers),status:tt.status,statusText:tt.statusText,config:y,request:U})})}catch(E){throw z&&z(),E&&E.name==="TypeError"&&/Load failed|fetch/i.test(E.message)?Object.assign(new xt("Network Error",xt.ERR_NETWORK,y,U),{cause:E.cause||E}):xt.from(E,E&&E.code,y,U)}}},Mh=new Map,ic=n=>{let t=n&&n.env||{};const{fetch:e,Request:i,Response:s}=t,r=[i,s,e];let o=r.length,a=o,c,f,u=Mh;for(;a--;)c=r[a],f=u.get(c),f===void 0&&u.set(c,f=a?new Map:kh(t)),u=f;return f};ic();const Zr={http:Vf,xhr:_h,fetch:{get:ic}};G.forEach(Zr,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const la=n=>`- ${n}`,Th=n=>G.isFunction(n)||n===null||n===!1;function Eh(n,t){n=G.isArray(n)?n:[n];const{length:e}=n;let i,s;const r={};for(let o=0;o<e;o++){i=n[o];let a;if(s=i,!Th(i)&&(s=Zr[(a=String(i)).toLowerCase()],s===void 0))throw new xt(`Unknown adapter '${a}'`);if(s&&(G.isFunction(s)||(s=s.get(t))))break;r[a||"#"+o]=s}if(!s){const o=Object.entries(r).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let a=e?o.length>1?`since :
|
||
`+o.map(la).join(`
|
||
`):" "+la(o[0]):"as no adapter specified";throw new xt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const sc={getAdapter:Eh,adapters:Zr};function xr(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new hi(null,n)}function ca(n){return xr(n),n.headers=Oe.from(n.headers),n.data=yr.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),sc.getAdapter(n.adapter||qi.adapter,n)(n).then(function(i){return xr(n),i.data=yr.call(n,n.transformResponse,i),i.headers=Oe.from(i.headers),i},function(i){return Zl(i)||(xr(n),i&&i.response&&(i.response.data=yr.call(n,n.transformResponse,i.response),i.response.headers=Oe.from(i.response.headers))),Promise.reject(i)})}const rc="1.13.2",zs={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{zs[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const ua={};zs.transitional=function(t,e,i){function s(r,o){return"[Axios v"+rc+"] Transitional option '"+r+"'"+o+(i?". "+i:"")}return(r,o,a)=>{if(t===!1)throw new xt(s(o," has been removed"+(e?" in "+e:"")),xt.ERR_DEPRECATED);return e&&!ua[o]&&(ua[o]=!0,console.warn(s(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(r,o,a):!0}};zs.spelling=function(t){return(e,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function Ph(n,t,e){if(typeof n!="object")throw new xt("options must be an object",xt.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let s=i.length;for(;s-- >0;){const r=i[s],o=t[r];if(o){const a=n[r],c=a===void 0||o(a,r,n);if(c!==!0)throw new xt("option "+r+" must be "+c,xt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new xt("Unknown option "+r,xt.ERR_BAD_OPTION)}}const xs={assertOptions:Ph,validators:zs},Ge=xs.validators;let zn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Jo,response:new Jo}}async request(t,e){try{return await this._request(t,e)}catch(i){if(i instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const r=s.stack?s.stack.replace(/^.+\n/,""):"";try{i.stack?r&&!String(i.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
||
`+r):i.stack=r}catch{}}throw i}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Vn(this.defaults,e);const{transitional:i,paramsSerializer:s,headers:r}=e;i!==void 0&&xs.assertOptions(i,{silentJSONParsing:Ge.transitional(Ge.boolean),forcedJSONParsing:Ge.transitional(Ge.boolean),clarifyTimeoutError:Ge.transitional(Ge.boolean)},!1),s!=null&&(G.isFunction(s)?e.paramsSerializer={serialize:s}:xs.assertOptions(s,{encode:Ge.function,serialize:Ge.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),xs.assertOptions(e,{baseUrl:Ge.spelling("baseURL"),withXsrfToken:Ge.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&G.merge(r.common,r[e.method]);r&&G.forEach(["delete","get","head","post","put","patch","common"],y=>{delete r[y]}),e.headers=Oe.concat(o,r);const a=[];let c=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(e)===!1||(c=c&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});const f=[];this.interceptors.response.forEach(function(_){f.push(_.fulfilled,_.rejected)});let u,d=0,p;if(!c){const y=[ca.bind(this),void 0];for(y.unshift(...a),y.push(...f),p=y.length,u=Promise.resolve(e);d<p;)u=u.then(y[d++],y[d++]);return u}p=a.length;let b=e;for(;d<p;){const y=a[d++],_=a[d++];try{b=y(b)}catch(S){_.call(this,S);break}}try{u=ca.call(this,b)}catch(y){return Promise.reject(y)}for(d=0,p=f.length;d<p;)u=u.then(f[d++],f[d++]);return u}getUri(t){t=Vn(this.defaults,t);const e=ec(t.baseURL,t.url,t.allowAbsoluteUrls);return Gl(e,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){zn.prototype[t]=function(e,i){return this.request(Vn(i||{},{method:t,url:e,data:(i||{}).data}))}});G.forEach(["post","put","patch"],function(t){function e(i){return function(r,o,a){return this.request(Vn(a||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}zn.prototype[t]=e(),zn.prototype[t+"Form"]=e(!0)});let Oh=class oc{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(r){e=r});const i=this;this.promise.then(s=>{if(!i._listeners)return;let r=i._listeners.length;for(;r-- >0;)i._listeners[r](s);i._listeners=null}),this.promise.then=s=>{let r;const o=new Promise(a=>{i.subscribe(a),r=a}).then(s);return o.cancel=function(){i.unsubscribe(r)},o},t(function(r,o,a){i.reason||(i.reason=new hi(r,o,a),e(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=i=>{t.abort(i)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new oc(function(s){t=s}),cancel:t}}};function Dh(n){return function(e){return n.apply(null,e)}}function Rh(n){return G.isObject(n)&&n.isAxiosError===!0}const Br={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Br).forEach(([n,t])=>{Br[t]=n});function ac(n){const t=new zn(n),e=Bl(zn.prototype.request,t);return G.extend(e,zn.prototype,t,{allOwnKeys:!0}),G.extend(e,t,null,{allOwnKeys:!0}),e.create=function(s){return ac(Vn(n,s))},e}const Zt=ac(qi);Zt.Axios=zn;Zt.CanceledError=hi;Zt.CancelToken=Oh;Zt.isCancel=Zl;Zt.VERSION=rc;Zt.toFormData=js;Zt.AxiosError=xt;Zt.Cancel=Zt.CanceledError;Zt.all=function(t){return Promise.all(t)};Zt.spread=Dh;Zt.isAxiosError=Rh;Zt.mergeConfig=Vn;Zt.AxiosHeaders=Oe;Zt.formToJSON=n=>Jl(G.isHTMLForm(n)?new FormData(n):n);Zt.getAdapter=sc.getAdapter;Zt.HttpStatusCode=Br;Zt.default=Zt;const{Axios:y0,AxiosError:x0,CanceledError:_0,isCancel:v0,CancelToken:w0,VERSION:S0,all:A0,Cancel:C0,isAxiosError:k0,spread:M0,toFormData:T0,AxiosHeaders:E0,HttpStatusCode:P0,formToJSON:O0,getAdapter:D0,mergeConfig:R0}=Zt;window.axios=Zt;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";function Lh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var _s={exports:{}};var Fh=_s.exports,fa;function lc(){return fa||(fa=1,(function(n){(function(t,e){n.exports=t.document?e(t,!0):function(i){if(!i.document)throw new Error("jQuery requires a window with a document");return e(i)}})(typeof window<"u"?window:Fh,function(t,e){var i=[],s=Object.getPrototypeOf,r=i.slice,o=i.flat?function(l){return i.flat.call(l)}:function(l){return i.concat.apply([],l)},a=i.push,c=i.indexOf,f={},u=f.toString,d=f.hasOwnProperty,p=d.toString,b=p.call(Object),y={},_=function(h){return typeof h=="function"&&typeof h.nodeType!="number"&&typeof h.item!="function"},S=function(h){return h!=null&&h===h.window},A=t.document,L={type:!0,src:!0,nonce:!0,noModule:!0};function I(l,h,m){m=m||A;var x,v,w=m.createElement("script");if(w.text=l,h)for(x in L)v=h[x]||h.getAttribute&&h.getAttribute(x),v&&w.setAttribute(x,v);m.head.appendChild(w).parentNode.removeChild(w)}function D(l){return l==null?l+"":typeof l=="object"||typeof l=="function"?f[u.call(l)]||"object":typeof l}var N="3.7.1",P=/HTML$/i,g=function(l,h){return new g.fn.init(l,h)};g.fn=g.prototype={jquery:N,constructor:g,length:0,toArray:function(){return r.call(this)},get:function(l){return l==null?r.call(this):l<0?this[l+this.length]:this[l]},pushStack:function(l){var h=g.merge(this.constructor(),l);return h.prevObject=this,h},each:function(l){return g.each(this,l)},map:function(l){return this.pushStack(g.map(this,function(h,m){return l.call(h,m,h)}))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(g.grep(this,function(l,h){return(h+1)%2}))},odd:function(){return this.pushStack(g.grep(this,function(l,h){return h%2}))},eq:function(l){var h=this.length,m=+l+(l<0?h:0);return this.pushStack(m>=0&&m<h?[this[m]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:i.sort,splice:i.splice},g.extend=g.fn.extend=function(){var l,h,m,x,v,w,C=arguments[0]||{},F=1,R=arguments.length,V=!1;for(typeof C=="boolean"&&(V=C,C=arguments[F]||{},F++),typeof C!="object"&&!_(C)&&(C={}),F===R&&(C=this,F--);F<R;F++)if((l=arguments[F])!=null)for(h in l)x=l[h],!(h==="__proto__"||C===x)&&(V&&x&&(g.isPlainObject(x)||(v=Array.isArray(x)))?(m=C[h],v&&!Array.isArray(m)?w=[]:!v&&!g.isPlainObject(m)?w={}:w=m,v=!1,C[h]=g.extend(V,w,x)):x!==void 0&&(C[h]=x));return C},g.extend({expando:"jQuery"+(N+Math.random()).replace(/\D/g,""),isReady:!0,error:function(l){throw new Error(l)},noop:function(){},isPlainObject:function(l){var h,m;return!l||u.call(l)!=="[object Object]"?!1:(h=s(l),h?(m=d.call(h,"constructor")&&h.constructor,typeof m=="function"&&p.call(m)===b):!0)},isEmptyObject:function(l){var h;for(h in l)return!1;return!0},globalEval:function(l,h,m){I(l,{nonce:h&&h.nonce},m)},each:function(l,h){var m,x=0;if(M(l))for(m=l.length;x<m&&h.call(l[x],x,l[x])!==!1;x++);else for(x in l)if(h.call(l[x],x,l[x])===!1)break;return l},text:function(l){var h,m="",x=0,v=l.nodeType;if(!v)for(;h=l[x++];)m+=g.text(h);return v===1||v===11?l.textContent:v===9?l.documentElement.textContent:v===3||v===4?l.nodeValue:m},makeArray:function(l,h){var m=h||[];return l!=null&&(M(Object(l))?g.merge(m,typeof l=="string"?[l]:l):a.call(m,l)),m},inArray:function(l,h,m){return h==null?-1:c.call(h,l,m)},isXMLDoc:function(l){var h=l&&l.namespaceURI,m=l&&(l.ownerDocument||l).documentElement;return!P.test(h||m&&m.nodeName||"HTML")},merge:function(l,h){for(var m=+h.length,x=0,v=l.length;x<m;x++)l[v++]=h[x];return l.length=v,l},grep:function(l,h,m){for(var x,v=[],w=0,C=l.length,F=!m;w<C;w++)x=!h(l[w],w),x!==F&&v.push(l[w]);return v},map:function(l,h,m){var x,v,w=0,C=[];if(M(l))for(x=l.length;w<x;w++)v=h(l[w],w,m),v!=null&&C.push(v);else for(w in l)v=h(l[w],w,m),v!=null&&C.push(v);return o(C)},guid:1,support:y}),typeof Symbol=="function"&&(g.fn[Symbol.iterator]=i[Symbol.iterator]),g.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(l,h){f["[object "+h+"]"]=h.toLowerCase()});function M(l){var h=!!l&&"length"in l&&l.length,m=D(l);return _(l)||S(l)?!1:m==="array"||h===0||typeof h=="number"&&h>0&&h-1 in l}function k(l,h){return l.nodeName&&l.nodeName.toLowerCase()===h.toLowerCase()}var B=i.pop,H=i.sort,j=i.splice,U="[\\x20\\t\\r\\n\\f]",z=new RegExp("^"+U+"+|((?:^|[^\\\\])(?:\\\\.)*)"+U+"+$","g");g.contains=function(l,h){var m=h&&h.parentNode;return l===m||!!(m&&m.nodeType===1&&(l.contains?l.contains(m):l.compareDocumentPosition&&l.compareDocumentPosition(m)&16))};var $=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function E(l,h){return h?l==="\0"?"<22>":l.slice(0,-1)+"\\"+l.charCodeAt(l.length-1).toString(16)+" ":"\\"+l}g.escapeSelector=function(l){return(l+"").replace($,E)};var T=A,tt=a;(function(){var l,h,m,x,v,w=tt,C,F,R,V,Q,nt=g.expando,Y=0,rt=0,mt=Zi(),Tt=Zi(),_t=Zi(),de=Zi(),ie=function(O,W){return O===W&&(v=!0),0},$e="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",qe="(?:\\\\[\\da-fA-F]{1,6}"+U+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Ct="\\["+U+"*("+qe+")(?:"+U+"*([*^$|!~]?=)"+U+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+qe+"))|)"+U+"*\\]",On=":("+qe+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Ct+")*)|.*)\\)|)",Pt=new RegExp(U+"+","g"),Gt=new RegExp("^"+U+"*,"+U+"*"),xi=new RegExp("^"+U+"*([>+~]|"+U+")"+U+"*"),ur=new RegExp(U+"|>"),Xe=new RegExp(On),_i=new RegExp("^"+qe+"$"),Ye={ID:new RegExp("^#("+qe+")"),CLASS:new RegExp("^\\.("+qe+")"),TAG:new RegExp("^("+qe+"|[*])"),ATTR:new RegExp("^"+Ct),PSEUDO:new RegExp("^"+On),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+U+"*(even|odd|(([+-]|)(\\d*)n|)"+U+"*(?:([+-]|)"+U+"*(\\d+)|))"+U+"*\\)|)","i"),bool:new RegExp("^(?:"+$e+")$","i"),needsContext:new RegExp("^"+U+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+U+"*((?:-\\d)?\\d*)"+U+"*\\)|)(?=[^-]|$)","i")},mn=/^(?:input|select|textarea|button)$/i,bn=/^h\d$/i,Fe=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,fr=/[+~]/,rn=new RegExp("\\\\[\\da-fA-F]{1,6}"+U+"?|\\\\([^\\r\\n\\f])","g"),on=function(O,W){var X="0x"+O.slice(1)-65536;return W||(X<0?String.fromCharCode(X+65536):String.fromCharCode(X>>10|55296,X&1023|56320))},Qu=function(){yn()},Ju=es(function(O){return O.disabled===!0&&k(O,"fieldset")},{dir:"parentNode",next:"legend"});function Zu(){try{return C.activeElement}catch{}}try{w.apply(i=r.call(T.childNodes),T.childNodes),i[T.childNodes.length].nodeType}catch{w={apply:function(W,X){tt.apply(W,r.call(X))},call:function(W){tt.apply(W,r.call(arguments,1))}}}function Ft(O,W,X,K){var et,ot,ut,ht,ft,vt,gt,bt=W&&W.ownerDocument,wt=W?W.nodeType:9;if(X=X||[],typeof O!="string"||!O||wt!==1&&wt!==9&&wt!==11)return X;if(!K&&(yn(W),W=W||C,R)){if(wt!==11&&(ft=Fe.exec(O)))if(et=ft[1]){if(wt===9)if(ut=W.getElementById(et)){if(ut.id===et)return w.call(X,ut),X}else return X;else if(bt&&(ut=bt.getElementById(et))&&Ft.contains(W,ut)&&ut.id===et)return w.call(X,ut),X}else{if(ft[2])return w.apply(X,W.getElementsByTagName(O)),X;if((et=ft[3])&&W.getElementsByClassName)return w.apply(X,W.getElementsByClassName(et)),X}if(!de[O+" "]&&(!V||!V.test(O))){if(gt=O,bt=W,wt===1&&(ur.test(O)||xi.test(O))){for(bt=fr.test(O)&&hr(W.parentNode)||W,(bt!=W||!y.scope)&&((ht=W.getAttribute("id"))?ht=g.escapeSelector(ht):W.setAttribute("id",ht=nt)),vt=vi(O),ot=vt.length;ot--;)vt[ot]=(ht?"#"+ht:":scope")+" "+ts(vt[ot]);gt=vt.join(",")}try{return w.apply(X,bt.querySelectorAll(gt)),X}catch{de(O,!0)}finally{ht===nt&&W.removeAttribute("id")}}}return Yo(O.replace(z,"$1"),W,X,K)}function Zi(){var O=[];function W(X,K){return O.push(X+" ")>h.cacheLength&&delete W[O.shift()],W[X+" "]=K}return W}function ze(O){return O[nt]=!0,O}function ei(O){var W=C.createElement("fieldset");try{return!!O(W)}catch{return!1}finally{W.parentNode&&W.parentNode.removeChild(W),W=null}}function tf(O){return function(W){return k(W,"input")&&W.type===O}}function ef(O){return function(W){return(k(W,"input")||k(W,"button"))&&W.type===O}}function qo(O){return function(W){return"form"in W?W.parentNode&&W.disabled===!1?"label"in W?"label"in W.parentNode?W.parentNode.disabled===O:W.disabled===O:W.isDisabled===O||W.isDisabled!==!O&&Ju(W)===O:W.disabled===O:"label"in W?W.disabled===O:!1}}function Dn(O){return ze(function(W){return W=+W,ze(function(X,K){for(var et,ot=O([],X.length,W),ut=ot.length;ut--;)X[et=ot[ut]]&&(X[et]=!(K[et]=X[et]))})})}function hr(O){return O&&typeof O.getElementsByTagName<"u"&&O}function yn(O){var W,X=O?O.ownerDocument||O:T;return X==C||X.nodeType!==9||!X.documentElement||(C=X,F=C.documentElement,R=!g.isXMLDoc(C),Q=F.matches||F.webkitMatchesSelector||F.msMatchesSelector,F.msMatchesSelector&&T!=C&&(W=C.defaultView)&&W.top!==W&&W.addEventListener("unload",Qu),y.getById=ei(function(K){return F.appendChild(K).id=g.expando,!C.getElementsByName||!C.getElementsByName(g.expando).length}),y.disconnectedMatch=ei(function(K){return Q.call(K,"*")}),y.scope=ei(function(){return C.querySelectorAll(":scope")}),y.cssHas=ei(function(){try{return C.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),y.getById?(h.filter.ID=function(K){var et=K.replace(rn,on);return function(ot){return ot.getAttribute("id")===et}},h.find.ID=function(K,et){if(typeof et.getElementById<"u"&&R){var ot=et.getElementById(K);return ot?[ot]:[]}}):(h.filter.ID=function(K){var et=K.replace(rn,on);return function(ot){var ut=typeof ot.getAttributeNode<"u"&&ot.getAttributeNode("id");return ut&&ut.value===et}},h.find.ID=function(K,et){if(typeof et.getElementById<"u"&&R){var ot,ut,ht,ft=et.getElementById(K);if(ft){if(ot=ft.getAttributeNode("id"),ot&&ot.value===K)return[ft];for(ht=et.getElementsByName(K),ut=0;ft=ht[ut++];)if(ot=ft.getAttributeNode("id"),ot&&ot.value===K)return[ft]}return[]}}),h.find.TAG=function(K,et){return typeof et.getElementsByTagName<"u"?et.getElementsByTagName(K):et.querySelectorAll(K)},h.find.CLASS=function(K,et){if(typeof et.getElementsByClassName<"u"&&R)return et.getElementsByClassName(K)},V=[],ei(function(K){var et;F.appendChild(K).innerHTML="<a id='"+nt+"' href='' disabled='disabled'></a><select id='"+nt+"-\r\\' disabled='disabled'><option selected=''></option></select>",K.querySelectorAll("[selected]").length||V.push("\\["+U+"*(?:value|"+$e+")"),K.querySelectorAll("[id~="+nt+"-]").length||V.push("~="),K.querySelectorAll("a#"+nt+"+*").length||V.push(".#.+[+~]"),K.querySelectorAll(":checked").length||V.push(":checked"),et=C.createElement("input"),et.setAttribute("type","hidden"),K.appendChild(et).setAttribute("name","D"),F.appendChild(K).disabled=!0,K.querySelectorAll(":disabled").length!==2&&V.push(":enabled",":disabled"),et=C.createElement("input"),et.setAttribute("name",""),K.appendChild(et),K.querySelectorAll("[name='']").length||V.push("\\["+U+"*name"+U+"*="+U+`*(?:''|"")`)}),y.cssHas||V.push(":has"),V=V.length&&new RegExp(V.join("|")),ie=function(K,et){if(K===et)return v=!0,0;var ot=!K.compareDocumentPosition-!et.compareDocumentPosition;return ot||(ot=(K.ownerDocument||K)==(et.ownerDocument||et)?K.compareDocumentPosition(et):1,ot&1||!y.sortDetached&&et.compareDocumentPosition(K)===ot?K===C||K.ownerDocument==T&&Ft.contains(T,K)?-1:et===C||et.ownerDocument==T&&Ft.contains(T,et)?1:x?c.call(x,K)-c.call(x,et):0:ot&4?-1:1)}),C}Ft.matches=function(O,W){return Ft(O,null,null,W)},Ft.matchesSelector=function(O,W){if(yn(O),R&&!de[W+" "]&&(!V||!V.test(W)))try{var X=Q.call(O,W);if(X||y.disconnectedMatch||O.document&&O.document.nodeType!==11)return X}catch{de(W,!0)}return Ft(W,C,null,[O]).length>0},Ft.contains=function(O,W){return(O.ownerDocument||O)!=C&&yn(O),g.contains(O,W)},Ft.attr=function(O,W){(O.ownerDocument||O)!=C&&yn(O);var X=h.attrHandle[W.toLowerCase()],K=X&&d.call(h.attrHandle,W.toLowerCase())?X(O,W,!R):void 0;return K!==void 0?K:O.getAttribute(W)},Ft.error=function(O){throw new Error("Syntax error, unrecognized expression: "+O)},g.uniqueSort=function(O){var W,X=[],K=0,et=0;if(v=!y.sortStable,x=!y.sortStable&&r.call(O,0),H.call(O,ie),v){for(;W=O[et++];)W===O[et]&&(K=X.push(et));for(;K--;)j.call(O,X[K],1)}return x=null,O},g.fn.uniqueSort=function(){return this.pushStack(g.uniqueSort(r.apply(this)))},h=g.expr={cacheLength:50,createPseudo:ze,match:Ye,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(O){return O[1]=O[1].replace(rn,on),O[3]=(O[3]||O[4]||O[5]||"").replace(rn,on),O[2]==="~="&&(O[3]=" "+O[3]+" "),O.slice(0,4)},CHILD:function(O){return O[1]=O[1].toLowerCase(),O[1].slice(0,3)==="nth"?(O[3]||Ft.error(O[0]),O[4]=+(O[4]?O[5]+(O[6]||1):2*(O[3]==="even"||O[3]==="odd")),O[5]=+(O[7]+O[8]||O[3]==="odd")):O[3]&&Ft.error(O[0]),O},PSEUDO:function(O){var W,X=!O[6]&&O[2];return Ye.CHILD.test(O[0])?null:(O[3]?O[2]=O[4]||O[5]||"":X&&Xe.test(X)&&(W=vi(X,!0))&&(W=X.indexOf(")",X.length-W)-X.length)&&(O[0]=O[0].slice(0,W),O[2]=X.slice(0,W)),O.slice(0,3))}},filter:{TAG:function(O){var W=O.replace(rn,on).toLowerCase();return O==="*"?function(){return!0}:function(X){return k(X,W)}},CLASS:function(O){var W=mt[O+" "];return W||(W=new RegExp("(^|"+U+")"+O+"("+U+"|$)"))&&mt(O,function(X){return W.test(typeof X.className=="string"&&X.className||typeof X.getAttribute<"u"&&X.getAttribute("class")||"")})},ATTR:function(O,W,X){return function(K){var et=Ft.attr(K,O);return et==null?W==="!=":W?(et+="",W==="="?et===X:W==="!="?et!==X:W==="^="?X&&et.indexOf(X)===0:W==="*="?X&&et.indexOf(X)>-1:W==="$="?X&&et.slice(-X.length)===X:W==="~="?(" "+et.replace(Pt," ")+" ").indexOf(X)>-1:W==="|="?et===X||et.slice(0,X.length+1)===X+"-":!1):!0}},CHILD:function(O,W,X,K,et){var ot=O.slice(0,3)!=="nth",ut=O.slice(-4)!=="last",ht=W==="of-type";return K===1&&et===0?function(ft){return!!ft.parentNode}:function(ft,vt,gt){var bt,wt,pt,jt,ke,pe=ot!==ut?"nextSibling":"previousSibling",Ie=ft.parentNode,Ke=ht&&ft.nodeName.toLowerCase(),ni=!gt&&!ht,ve=!1;if(Ie){if(ot){for(;pe;){for(pt=ft;pt=pt[pe];)if(ht?k(pt,Ke):pt.nodeType===1)return!1;ke=pe=O==="only"&&!ke&&"nextSibling"}return!0}if(ke=[ut?Ie.firstChild:Ie.lastChild],ut&&ni){for(wt=Ie[nt]||(Ie[nt]={}),bt=wt[O]||[],jt=bt[0]===Y&&bt[1],ve=jt&&bt[2],pt=jt&&Ie.childNodes[jt];pt=++jt&&pt&&pt[pe]||(ve=jt=0)||ke.pop();)if(pt.nodeType===1&&++ve&&pt===ft){wt[O]=[Y,jt,ve];break}}else if(ni&&(wt=ft[nt]||(ft[nt]={}),bt=wt[O]||[],jt=bt[0]===Y&&bt[1],ve=jt),ve===!1)for(;(pt=++jt&&pt&&pt[pe]||(ve=jt=0)||ke.pop())&&!((ht?k(pt,Ke):pt.nodeType===1)&&++ve&&(ni&&(wt=pt[nt]||(pt[nt]={}),wt[O]=[Y,ve]),pt===ft)););return ve-=et,ve===K||ve%K===0&&ve/K>=0}}},PSEUDO:function(O,W){var X,K=h.pseudos[O]||h.setFilters[O.toLowerCase()]||Ft.error("unsupported pseudo: "+O);return K[nt]?K(W):K.length>1?(X=[O,O,"",W],h.setFilters.hasOwnProperty(O.toLowerCase())?ze(function(et,ot){for(var ut,ht=K(et,W),ft=ht.length;ft--;)ut=c.call(et,ht[ft]),et[ut]=!(ot[ut]=ht[ft])}):function(et){return K(et,0,X)}):K}},pseudos:{not:ze(function(O){var W=[],X=[],K=mr(O.replace(z,"$1"));return K[nt]?ze(function(et,ot,ut,ht){for(var ft,vt=K(et,null,ht,[]),gt=et.length;gt--;)(ft=vt[gt])&&(et[gt]=!(ot[gt]=ft))}):function(et,ot,ut){return W[0]=et,K(W,null,ut,X),W[0]=null,!X.pop()}}),has:ze(function(O){return function(W){return Ft(O,W).length>0}}),contains:ze(function(O){return O=O.replace(rn,on),function(W){return(W.textContent||g.text(W)).indexOf(O)>-1}}),lang:ze(function(O){return _i.test(O||"")||Ft.error("unsupported lang: "+O),O=O.replace(rn,on).toLowerCase(),function(W){var X;do if(X=R?W.lang:W.getAttribute("xml:lang")||W.getAttribute("lang"))return X=X.toLowerCase(),X===O||X.indexOf(O+"-")===0;while((W=W.parentNode)&&W.nodeType===1);return!1}}),target:function(O){var W=t.location&&t.location.hash;return W&&W.slice(1)===O.id},root:function(O){return O===F},focus:function(O){return O===Zu()&&C.hasFocus()&&!!(O.type||O.href||~O.tabIndex)},enabled:qo(!1),disabled:qo(!0),checked:function(O){return k(O,"input")&&!!O.checked||k(O,"option")&&!!O.selected},selected:function(O){return O.parentNode&&O.parentNode.selectedIndex,O.selected===!0},empty:function(O){for(O=O.firstChild;O;O=O.nextSibling)if(O.nodeType<6)return!1;return!0},parent:function(O){return!h.pseudos.empty(O)},header:function(O){return bn.test(O.nodeName)},input:function(O){return mn.test(O.nodeName)},button:function(O){return k(O,"input")&&O.type==="button"||k(O,"button")},text:function(O){var W;return k(O,"input")&&O.type==="text"&&((W=O.getAttribute("type"))==null||W.toLowerCase()==="text")},first:Dn(function(){return[0]}),last:Dn(function(O,W){return[W-1]}),eq:Dn(function(O,W,X){return[X<0?X+W:X]}),even:Dn(function(O,W){for(var X=0;X<W;X+=2)O.push(X);return O}),odd:Dn(function(O,W){for(var X=1;X<W;X+=2)O.push(X);return O}),lt:Dn(function(O,W,X){var K;for(X<0?K=X+W:X>W?K=W:K=X;--K>=0;)O.push(K);return O}),gt:Dn(function(O,W,X){for(var K=X<0?X+W:X;++K<W;)O.push(K);return O})}},h.pseudos.nth=h.pseudos.eq;for(l in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})h.pseudos[l]=tf(l);for(l in{submit:!0,reset:!0})h.pseudos[l]=ef(l);function Xo(){}Xo.prototype=h.filters=h.pseudos,h.setFilters=new Xo;function vi(O,W){var X,K,et,ot,ut,ht,ft,vt=Tt[O+" "];if(vt)return W?0:vt.slice(0);for(ut=O,ht=[],ft=h.preFilter;ut;){(!X||(K=Gt.exec(ut)))&&(K&&(ut=ut.slice(K[0].length)||ut),ht.push(et=[])),X=!1,(K=xi.exec(ut))&&(X=K.shift(),et.push({value:X,type:K[0].replace(z," ")}),ut=ut.slice(X.length));for(ot in h.filter)(K=Ye[ot].exec(ut))&&(!ft[ot]||(K=ft[ot](K)))&&(X=K.shift(),et.push({value:X,type:ot,matches:K}),ut=ut.slice(X.length));if(!X)break}return W?ut.length:ut?Ft.error(O):Tt(O,ht).slice(0)}function ts(O){for(var W=0,X=O.length,K="";W<X;W++)K+=O[W].value;return K}function es(O,W,X){var K=W.dir,et=W.next,ot=et||K,ut=X&&ot==="parentNode",ht=rt++;return W.first?function(ft,vt,gt){for(;ft=ft[K];)if(ft.nodeType===1||ut)return O(ft,vt,gt);return!1}:function(ft,vt,gt){var bt,wt,pt=[Y,ht];if(gt){for(;ft=ft[K];)if((ft.nodeType===1||ut)&&O(ft,vt,gt))return!0}else for(;ft=ft[K];)if(ft.nodeType===1||ut)if(wt=ft[nt]||(ft[nt]={}),et&&k(ft,et))ft=ft[K]||ft;else{if((bt=wt[ot])&&bt[0]===Y&&bt[1]===ht)return pt[2]=bt[2];if(wt[ot]=pt,pt[2]=O(ft,vt,gt))return!0}return!1}}function dr(O){return O.length>1?function(W,X,K){for(var et=O.length;et--;)if(!O[et](W,X,K))return!1;return!0}:O[0]}function nf(O,W,X){for(var K=0,et=W.length;K<et;K++)Ft(O,W[K],X);return X}function ns(O,W,X,K,et){for(var ot,ut=[],ht=0,ft=O.length,vt=W!=null;ht<ft;ht++)(ot=O[ht])&&(!X||X(ot,K,et))&&(ut.push(ot),vt&&W.push(ht));return ut}function pr(O,W,X,K,et,ot){return K&&!K[nt]&&(K=pr(K)),et&&!et[nt]&&(et=pr(et,ot)),ze(function(ut,ht,ft,vt){var gt,bt,wt,pt,jt=[],ke=[],pe=ht.length,Ie=ut||nf(W||"*",ft.nodeType?[ft]:ft,[]),Ke=O&&(ut||!W)?ns(Ie,jt,O,ft,vt):Ie;if(X?(pt=et||(ut?O:pe||K)?[]:ht,X(Ke,pt,ft,vt)):pt=Ke,K)for(gt=ns(pt,ke),K(gt,[],ft,vt),bt=gt.length;bt--;)(wt=gt[bt])&&(pt[ke[bt]]=!(Ke[ke[bt]]=wt));if(ut){if(et||O){if(et){for(gt=[],bt=pt.length;bt--;)(wt=pt[bt])&>.push(Ke[bt]=wt);et(null,pt=[],gt,vt)}for(bt=pt.length;bt--;)(wt=pt[bt])&&(gt=et?c.call(ut,wt):jt[bt])>-1&&(ut[gt]=!(ht[gt]=wt))}}else pt=ns(pt===ht?pt.splice(pe,pt.length):pt),et?et(null,ht,pt,vt):w.apply(ht,pt)})}function gr(O){for(var W,X,K,et=O.length,ot=h.relative[O[0].type],ut=ot||h.relative[" "],ht=ot?1:0,ft=es(function(bt){return bt===W},ut,!0),vt=es(function(bt){return c.call(W,bt)>-1},ut,!0),gt=[function(bt,wt,pt){var jt=!ot&&(pt||wt!=m)||((W=wt).nodeType?ft(bt,wt,pt):vt(bt,wt,pt));return W=null,jt}];ht<et;ht++)if(X=h.relative[O[ht].type])gt=[es(dr(gt),X)];else{if(X=h.filter[O[ht].type].apply(null,O[ht].matches),X[nt]){for(K=++ht;K<et&&!h.relative[O[K].type];K++);return pr(ht>1&&dr(gt),ht>1&&ts(O.slice(0,ht-1).concat({value:O[ht-2].type===" "?"*":""})).replace(z,"$1"),X,ht<K&&gr(O.slice(ht,K)),K<et&&gr(O=O.slice(K)),K<et&&ts(O))}gt.push(X)}return dr(gt)}function sf(O,W){var X=W.length>0,K=O.length>0,et=function(ot,ut,ht,ft,vt){var gt,bt,wt,pt=0,jt="0",ke=ot&&[],pe=[],Ie=m,Ke=ot||K&&h.find.TAG("*",vt),ni=Y+=Ie==null?1:Math.random()||.1,ve=Ke.length;for(vt&&(m=ut==C||ut||vt);jt!==ve&&(gt=Ke[jt])!=null;jt++){if(K&>){for(bt=0,!ut&>.ownerDocument!=C&&(yn(gt),ht=!R);wt=O[bt++];)if(wt(gt,ut||C,ht)){w.call(ft,gt);break}vt&&(Y=ni)}X&&((gt=!wt&>)&&pt--,ot&&ke.push(gt))}if(pt+=jt,X&&jt!==pt){for(bt=0;wt=W[bt++];)wt(ke,pe,ut,ht);if(ot){if(pt>0)for(;jt--;)ke[jt]||pe[jt]||(pe[jt]=B.call(ft));pe=ns(pe)}w.apply(ft,pe),vt&&!ot&&pe.length>0&&pt+W.length>1&&g.uniqueSort(ft)}return vt&&(Y=ni,m=Ie),ke};return X?ze(et):et}function mr(O,W){var X,K=[],et=[],ot=_t[O+" "];if(!ot){for(W||(W=vi(O)),X=W.length;X--;)ot=gr(W[X]),ot[nt]?K.push(ot):et.push(ot);ot=_t(O,sf(et,K)),ot.selector=O}return ot}function Yo(O,W,X,K){var et,ot,ut,ht,ft,vt=typeof O=="function"&&O,gt=!K&&vi(O=vt.selector||O);if(X=X||[],gt.length===1){if(ot=gt[0]=gt[0].slice(0),ot.length>2&&(ut=ot[0]).type==="ID"&&W.nodeType===9&&R&&h.relative[ot[1].type]){if(W=(h.find.ID(ut.matches[0].replace(rn,on),W)||[])[0],W)vt&&(W=W.parentNode);else return X;O=O.slice(ot.shift().value.length)}for(et=Ye.needsContext.test(O)?0:ot.length;et--&&(ut=ot[et],!h.relative[ht=ut.type]);)if((ft=h.find[ht])&&(K=ft(ut.matches[0].replace(rn,on),fr.test(ot[0].type)&&hr(W.parentNode)||W))){if(ot.splice(et,1),O=K.length&&ts(ot),!O)return w.apply(X,K),X;break}}return(vt||mr(O,gt))(K,W,!R,X,!W||fr.test(O)&&hr(W.parentNode)||W),X}y.sortStable=nt.split("").sort(ie).join("")===nt,yn(),y.sortDetached=ei(function(O){return O.compareDocumentPosition(C.createElement("fieldset"))&1}),g.find=Ft,g.expr[":"]=g.expr.pseudos,g.unique=g.uniqueSort,Ft.compile=mr,Ft.select=Yo,Ft.setDocument=yn,Ft.tokenize=vi,Ft.escape=g.escapeSelector,Ft.getText=g.text,Ft.isXML=g.isXMLDoc,Ft.selectors=g.expr,Ft.support=g.support,Ft.uniqueSort=g.uniqueSort})();var q=function(l,h,m){for(var x=[],v=m!==void 0;(l=l[h])&&l.nodeType!==9;)if(l.nodeType===1){if(v&&g(l).is(m))break;x.push(l)}return x},Z=function(l,h){for(var m=[];l;l=l.nextSibling)l.nodeType===1&&l!==h&&m.push(l);return m},lt=g.expr.match.needsContext,st=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function at(l,h,m){return _(h)?g.grep(l,function(x,v){return!!h.call(x,v,x)!==m}):h.nodeType?g.grep(l,function(x){return x===h!==m}):typeof h!="string"?g.grep(l,function(x){return c.call(h,x)>-1!==m}):g.filter(h,l,m)}g.filter=function(l,h,m){var x=h[0];return m&&(l=":not("+l+")"),h.length===1&&x.nodeType===1?g.find.matchesSelector(x,l)?[x]:[]:g.find.matches(l,g.grep(h,function(v){return v.nodeType===1}))},g.fn.extend({find:function(l){var h,m,x=this.length,v=this;if(typeof l!="string")return this.pushStack(g(l).filter(function(){for(h=0;h<x;h++)if(g.contains(v[h],this))return!0}));for(m=this.pushStack([]),h=0;h<x;h++)g.find(l,v[h],m);return x>1?g.uniqueSort(m):m},filter:function(l){return this.pushStack(at(this,l||[],!1))},not:function(l){return this.pushStack(at(this,l||[],!0))},is:function(l){return!!at(this,typeof l=="string"&<.test(l)?g(l):l||[],!1).length}});var it,J=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,dt=g.fn.init=function(l,h,m){var x,v;if(!l)return this;if(m=m||it,typeof l=="string")if(l[0]==="<"&&l[l.length-1]===">"&&l.length>=3?x=[null,l,null]:x=J.exec(l),x&&(x[1]||!h))if(x[1]){if(h=h instanceof g?h[0]:h,g.merge(this,g.parseHTML(x[1],h&&h.nodeType?h.ownerDocument||h:A,!0)),st.test(x[1])&&g.isPlainObject(h))for(x in h)_(this[x])?this[x](h[x]):this.attr(x,h[x]);return this}else return v=A.getElementById(x[2]),v&&(this[0]=v,this.length=1),this;else return!h||h.jquery?(h||m).find(l):this.constructor(h).find(l);else{if(l.nodeType)return this[0]=l,this.length=1,this;if(_(l))return m.ready!==void 0?m.ready(l):l(g)}return g.makeArray(l,this)};dt.prototype=g.fn,it=g(A);var Nt=/^(?:parents|prev(?:Until|All))/,Rt={children:!0,contents:!0,next:!0,prev:!0};g.fn.extend({has:function(l){var h=g(l,this),m=h.length;return this.filter(function(){for(var x=0;x<m;x++)if(g.contains(this,h[x]))return!0})},closest:function(l,h){var m,x=0,v=this.length,w=[],C=typeof l!="string"&&g(l);if(!lt.test(l)){for(;x<v;x++)for(m=this[x];m&&m!==h;m=m.parentNode)if(m.nodeType<11&&(C?C.index(m)>-1:m.nodeType===1&&g.find.matchesSelector(m,l))){w.push(m);break}}return this.pushStack(w.length>1?g.uniqueSort(w):w)},index:function(l){return l?typeof l=="string"?c.call(g(l),this[0]):c.call(this,l.jquery?l[0]:l):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(l,h){return this.pushStack(g.uniqueSort(g.merge(this.get(),g(l,h))))},addBack:function(l){return this.add(l==null?this.prevObject:this.prevObject.filter(l))}});function Et(l,h){for(;(l=l[h])&&l.nodeType!==1;);return l}g.each({parent:function(l){var h=l.parentNode;return h&&h.nodeType!==11?h:null},parents:function(l){return q(l,"parentNode")},parentsUntil:function(l,h,m){return q(l,"parentNode",m)},next:function(l){return Et(l,"nextSibling")},prev:function(l){return Et(l,"previousSibling")},nextAll:function(l){return q(l,"nextSibling")},prevAll:function(l){return q(l,"previousSibling")},nextUntil:function(l,h,m){return q(l,"nextSibling",m)},prevUntil:function(l,h,m){return q(l,"previousSibling",m)},siblings:function(l){return Z((l.parentNode||{}).firstChild,l)},children:function(l){return Z(l.firstChild)},contents:function(l){return l.contentDocument!=null&&s(l.contentDocument)?l.contentDocument:(k(l,"template")&&(l=l.content||l),g.merge([],l.childNodes))}},function(l,h){g.fn[l]=function(m,x){var v=g.map(this,h,m);return l.slice(-5)!=="Until"&&(x=m),x&&typeof x=="string"&&(v=g.filter(x,v)),this.length>1&&(Rt[l]||g.uniqueSort(v),Nt.test(l)&&v.reverse()),this.pushStack(v)}});var At=/[^\x20\t\r\n\f]+/g;function Xt(l){var h={};return g.each(l.match(At)||[],function(m,x){h[x]=!0}),h}g.Callbacks=function(l){l=typeof l=="string"?Xt(l):g.extend({},l);var h,m,x,v,w=[],C=[],F=-1,R=function(){for(v=v||l.once,x=h=!0;C.length;F=-1)for(m=C.shift();++F<w.length;)w[F].apply(m[0],m[1])===!1&&l.stopOnFalse&&(F=w.length,m=!1);l.memory||(m=!1),h=!1,v&&(m?w=[]:w="")},V={add:function(){return w&&(m&&!h&&(F=w.length-1,C.push(m)),(function Q(nt){g.each(nt,function(Y,rt){_(rt)?(!l.unique||!V.has(rt))&&w.push(rt):rt&&rt.length&&D(rt)!=="string"&&Q(rt)})})(arguments),m&&!h&&R()),this},remove:function(){return g.each(arguments,function(Q,nt){for(var Y;(Y=g.inArray(nt,w,Y))>-1;)w.splice(Y,1),Y<=F&&F--}),this},has:function(Q){return Q?g.inArray(Q,w)>-1:w.length>0},empty:function(){return w&&(w=[]),this},disable:function(){return v=C=[],w=m="",this},disabled:function(){return!w},lock:function(){return v=C=[],!m&&!h&&(w=m=""),this},locked:function(){return!!v},fireWith:function(Q,nt){return v||(nt=nt||[],nt=[Q,nt.slice?nt.slice():nt],C.push(nt),h||R()),this},fire:function(){return V.fireWith(this,arguments),this},fired:function(){return!!x}};return V};function Bt(l){return l}function Le(l){throw l}function De(l,h,m,x){var v;try{l&&_(v=l.promise)?v.call(l).done(h).fail(m):l&&_(v=l.then)?v.call(l,h,m):h.apply(void 0,[l].slice(x))}catch(w){m.apply(void 0,[w])}}g.extend({Deferred:function(l){var h=[["notify","progress",g.Callbacks("memory"),g.Callbacks("memory"),2],["resolve","done",g.Callbacks("once memory"),g.Callbacks("once memory"),0,"resolved"],["reject","fail",g.Callbacks("once memory"),g.Callbacks("once memory"),1,"rejected"]],m="pending",x={state:function(){return m},always:function(){return v.done(arguments).fail(arguments),this},catch:function(w){return x.then(null,w)},pipe:function(){var w=arguments;return g.Deferred(function(C){g.each(h,function(F,R){var V=_(w[R[4]])&&w[R[4]];v[R[1]](function(){var Q=V&&V.apply(this,arguments);Q&&_(Q.promise)?Q.promise().progress(C.notify).done(C.resolve).fail(C.reject):C[R[0]+"With"](this,V?[Q]:arguments)})}),w=null}).promise()},then:function(w,C,F){var R=0;function V(Q,nt,Y,rt){return function(){var mt=this,Tt=arguments,_t=function(){var ie,$e;if(!(Q<R)){if(ie=Y.apply(mt,Tt),ie===nt.promise())throw new TypeError("Thenable self-resolution");$e=ie&&(typeof ie=="object"||typeof ie=="function")&&ie.then,_($e)?rt?$e.call(ie,V(R,nt,Bt,rt),V(R,nt,Le,rt)):(R++,$e.call(ie,V(R,nt,Bt,rt),V(R,nt,Le,rt),V(R,nt,Bt,nt.notifyWith))):(Y!==Bt&&(mt=void 0,Tt=[ie]),(rt||nt.resolveWith)(mt,Tt))}},de=rt?_t:function(){try{_t()}catch(ie){g.Deferred.exceptionHook&&g.Deferred.exceptionHook(ie,de.error),Q+1>=R&&(Y!==Le&&(mt=void 0,Tt=[ie]),nt.rejectWith(mt,Tt))}};Q?de():(g.Deferred.getErrorHook?de.error=g.Deferred.getErrorHook():g.Deferred.getStackHook&&(de.error=g.Deferred.getStackHook()),t.setTimeout(de))}}return g.Deferred(function(Q){h[0][3].add(V(0,Q,_(F)?F:Bt,Q.notifyWith)),h[1][3].add(V(0,Q,_(w)?w:Bt)),h[2][3].add(V(0,Q,_(C)?C:Le))}).promise()},promise:function(w){return w!=null?g.extend(w,x):x}},v={};return g.each(h,function(w,C){var F=C[2],R=C[5];x[C[1]]=F.add,R&&F.add(function(){m=R},h[3-w][2].disable,h[3-w][3].disable,h[0][2].lock,h[0][3].lock),F.add(C[3].fire),v[C[0]]=function(){return v[C[0]+"With"](this===v?void 0:this,arguments),this},v[C[0]+"With"]=F.fireWith}),x.promise(v),l&&l.call(v,v),v},when:function(l){var h=arguments.length,m=h,x=Array(m),v=r.call(arguments),w=g.Deferred(),C=function(F){return function(R){x[F]=this,v[F]=arguments.length>1?r.call(arguments):R,--h||w.resolveWith(x,v)}};if(h<=1&&(De(l,w.done(C(m)).resolve,w.reject,!h),w.state()==="pending"||_(v[m]&&v[m].then)))return w.then();for(;m--;)De(v[m],C(m),w.reject);return w.promise()}});var Wt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;g.Deferred.exceptionHook=function(l,h){t.console&&t.console.warn&&l&&Wt.test(l.name)&&t.console.warn("jQuery.Deferred exception: "+l.message,l.stack,h)},g.readyException=function(l){t.setTimeout(function(){throw l})};var te=g.Deferred();g.fn.ready=function(l){return te.then(l).catch(function(h){g.readyException(h)}),this},g.extend({isReady:!1,readyWait:1,ready:function(l){(l===!0?--g.readyWait:g.isReady)||(g.isReady=!0,!(l!==!0&&--g.readyWait>0)&&te.resolveWith(A,[g]))}}),g.ready.then=te.then;function Lt(){A.removeEventListener("DOMContentLoaded",Lt),t.removeEventListener("load",Lt),g.ready()}A.readyState==="complete"||A.readyState!=="loading"&&!A.documentElement.doScroll?t.setTimeout(g.ready):(A.addEventListener("DOMContentLoaded",Lt),t.addEventListener("load",Lt));var Mt=function(l,h,m,x,v,w,C){var F=0,R=l.length,V=m==null;if(D(m)==="object"){v=!0;for(F in m)Mt(l,h,F,m[F],!0,w,C)}else if(x!==void 0&&(v=!0,_(x)||(C=!0),V&&(C?(h.call(l,x),h=null):(V=h,h=function(Q,nt,Y){return V.call(g(Q),Y)})),h))for(;F<R;F++)h(l[F],m,C?x:x.call(l[F],F,h(l[F],m)));return v?l:V?h.call(l):R?h(l[0],m):w},ee=/^-ms-/,fe=/-([a-z])/g;function Kt(l,h){return h.toUpperCase()}function Vt(l){return l.replace(ee,"ms-").replace(fe,Kt)}var Ht=function(l){return l.nodeType===1||l.nodeType===9||!+l.nodeType};function Dt(){this.expando=g.expando+Dt.uid++}Dt.uid=1,Dt.prototype={cache:function(l){var h=l[this.expando];return h||(h={},Ht(l)&&(l.nodeType?l[this.expando]=h:Object.defineProperty(l,this.expando,{value:h,configurable:!0}))),h},set:function(l,h,m){var x,v=this.cache(l);if(typeof h=="string")v[Vt(h)]=m;else for(x in h)v[Vt(x)]=h[x];return v},get:function(l,h){return h===void 0?this.cache(l):l[this.expando]&&l[this.expando][Vt(h)]},access:function(l,h,m){return h===void 0||h&&typeof h=="string"&&m===void 0?this.get(l,h):(this.set(l,h,m),m!==void 0?m:h)},remove:function(l,h){var m,x=l[this.expando];if(x!==void 0){if(h!==void 0)for(Array.isArray(h)?h=h.map(Vt):(h=Vt(h),h=h in x?[h]:h.match(At)||[]),m=h.length;m--;)delete x[h[m]];(h===void 0||g.isEmptyObject(x))&&(l.nodeType?l[this.expando]=void 0:delete l[this.expando])}},hasData:function(l){var h=l[this.expando];return h!==void 0&&!g.isEmptyObject(h)}};var ct=new Dt,Yt=new Dt,Yn=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,re=/[A-Z]/g;function en(l){return l==="true"?!0:l==="false"?!1:l==="null"?null:l===+l+""?+l:Yn.test(l)?JSON.parse(l):l}function oe(l,h,m){var x;if(m===void 0&&l.nodeType===1)if(x="data-"+h.replace(re,"-$&").toLowerCase(),m=l.getAttribute(x),typeof m=="string"){try{m=en(m)}catch{}Yt.set(l,h,m)}else m=void 0;return m}g.extend({hasData:function(l){return Yt.hasData(l)||ct.hasData(l)},data:function(l,h,m){return Yt.access(l,h,m)},removeData:function(l,h){Yt.remove(l,h)},_data:function(l,h,m){return ct.access(l,h,m)},_removeData:function(l,h){ct.remove(l,h)}}),g.fn.extend({data:function(l,h){var m,x,v,w=this[0],C=w&&w.attributes;if(l===void 0){if(this.length&&(v=Yt.get(w),w.nodeType===1&&!ct.get(w,"hasDataAttrs"))){for(m=C.length;m--;)C[m]&&(x=C[m].name,x.indexOf("data-")===0&&(x=Vt(x.slice(5)),oe(w,x,v[x])));ct.set(w,"hasDataAttrs",!0)}return v}return typeof l=="object"?this.each(function(){Yt.set(this,l)}):Mt(this,function(F){var R;if(w&&F===void 0)return R=Yt.get(w,l),R!==void 0||(R=oe(w,l),R!==void 0)?R:void 0;this.each(function(){Yt.set(this,l,F)})},null,h,arguments.length>1,null,!0)},removeData:function(l){return this.each(function(){Yt.remove(this,l)})}}),g.extend({queue:function(l,h,m){var x;if(l)return h=(h||"fx")+"queue",x=ct.get(l,h),m&&(!x||Array.isArray(m)?x=ct.access(l,h,g.makeArray(m)):x.push(m)),x||[]},dequeue:function(l,h){h=h||"fx";var m=g.queue(l,h),x=m.length,v=m.shift(),w=g._queueHooks(l,h),C=function(){g.dequeue(l,h)};v==="inprogress"&&(v=m.shift(),x--),v&&(h==="fx"&&m.unshift("inprogress"),delete w.stop,v.call(l,C,w)),!x&&w&&w.empty.fire()},_queueHooks:function(l,h){var m=h+"queueHooks";return ct.get(l,m)||ct.access(l,m,{empty:g.Callbacks("once memory").add(function(){ct.remove(l,[h+"queue",m])})})}}),g.fn.extend({queue:function(l,h){var m=2;return typeof l!="string"&&(h=l,l="fx",m--),arguments.length<m?g.queue(this[0],l):h===void 0?this:this.each(function(){var x=g.queue(this,l,h);g._queueHooks(this,l),l==="fx"&&x[0]!=="inprogress"&&g.dequeue(this,l)})},dequeue:function(l){return this.each(function(){g.dequeue(this,l)})},clearQueue:function(l){return this.queue(l||"fx",[])},promise:function(l,h){var m,x=1,v=g.Deferred(),w=this,C=this.length,F=function(){--x||v.resolveWith(w,[w])};for(typeof l!="string"&&(h=l,l=void 0),l=l||"fx";C--;)m=ct.get(w[C],l+"queueHooks"),m&&m.empty&&(x++,m.empty.add(F));return F(),v.promise(h)}});var we=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ae=new RegExp("^(?:([+-])=|)("+we+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],le=A.documentElement,Se=function(l){return g.contains(l.ownerDocument,l)},di={composed:!0};le.getRootNode&&(Se=function(l){return g.contains(l.ownerDocument,l)||l.getRootNode(di)===l.ownerDocument});var Kn=function(l,h){return l=h||l,l.style.display==="none"||l.style.display===""&&Se(l)&&g.css(l,"display")==="none"};function Gn(l,h,m,x){var v,w,C=20,F=x?function(){return x.cur()}:function(){return g.css(l,h,"")},R=F(),V=m&&m[3]||(g.cssNumber[h]?"":"px"),Q=l.nodeType&&(g.cssNumber[h]||V!=="px"&&+R)&&ae.exec(g.css(l,h));if(Q&&Q[3]!==V){for(R=R/2,V=V||Q[3],Q=+R||1;C--;)g.style(l,h,Q+V),(1-w)*(1-(w=F()/R||.5))<=0&&(C=0),Q=Q/w;Q=Q*2,g.style(l,h,Q+V),m=m||[]}return m&&(Q=+Q||+R||0,v=m[1]?Q+(m[1]+1)*m[2]:+m[2],x&&(x.unit=V,x.start=Q,x.end=v)),v}var pi={};function Tn(l){var h,m=l.ownerDocument,x=l.nodeName,v=pi[x];return v||(h=m.body.appendChild(m.createElement(x)),v=g.css(h,"display"),h.parentNode.removeChild(h),v==="none"&&(v="block"),pi[x]=v,v)}function gn(l,h){for(var m,x,v=[],w=0,C=l.length;w<C;w++)x=l[w],x.style&&(m=x.style.display,h?(m==="none"&&(v[w]=ct.get(x,"display")||null,v[w]||(x.style.display="")),x.style.display===""&&Kn(x)&&(v[w]=Tn(x))):m!=="none"&&(v[w]="none",ct.set(x,"display",m)));for(w=0;w<C;w++)v[w]!=null&&(l[w].style.display=v[w]);return l}g.fn.extend({show:function(){return gn(this,!0)},hide:function(){return gn(this)},toggle:function(l){return typeof l=="boolean"?l?this.show():this.hide():this.each(function(){Kn(this)?g(this).show():g(this).hide()})}});var Ae=/^(?:checkbox|radio)$/i,Be=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,nn=/^$|^module$|\/(?:java|ecma)script/i;(function(){var l=A.createDocumentFragment(),h=l.appendChild(A.createElement("div")),m=A.createElement("input");m.setAttribute("type","radio"),m.setAttribute("checked","checked"),m.setAttribute("name","t"),h.appendChild(m),y.checkClone=h.cloneNode(!0).cloneNode(!0).lastChild.checked,h.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!h.cloneNode(!0).lastChild.defaultValue,h.innerHTML="<option></option>",y.option=!!h.lastChild})();var ce={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ce.tbody=ce.tfoot=ce.colgroup=ce.caption=ce.thead,ce.th=ce.td,y.option||(ce.optgroup=ce.option=[1,"<select multiple='multiple'>","</select>"]);function he(l,h){var m;return typeof l.getElementsByTagName<"u"?m=l.getElementsByTagName(h||"*"):typeof l.querySelectorAll<"u"?m=l.querySelectorAll(h||"*"):m=[],h===void 0||h&&k(l,h)?g.merge([l],m):m}function He(l,h){for(var m=0,x=l.length;m<x;m++)ct.set(l[m],"globalEval",!h||ct.get(h[m],"globalEval"))}var sn=/<|&#?\w+;/;function vo(l,h,m,x,v){for(var w,C,F,R,V,Q,nt=h.createDocumentFragment(),Y=[],rt=0,mt=l.length;rt<mt;rt++)if(w=l[rt],w||w===0)if(D(w)==="object")g.merge(Y,w.nodeType?[w]:w);else if(!sn.test(w))Y.push(h.createTextNode(w));else{for(C=C||nt.appendChild(h.createElement("div")),F=(Be.exec(w)||["",""])[1].toLowerCase(),R=ce[F]||ce._default,C.innerHTML=R[1]+g.htmlPrefilter(w)+R[2],Q=R[0];Q--;)C=C.lastChild;g.merge(Y,C.childNodes),C=nt.firstChild,C.textContent=""}for(nt.textContent="",rt=0;w=Y[rt++];){if(x&&g.inArray(w,x)>-1){v&&v.push(w);continue}if(V=Se(w),C=he(nt.appendChild(w),"script"),V&&He(C),m)for(Q=0;w=C[Q++];)nn.test(w.type||"")&&m.push(w)}return nt}var wo=/^([^.]*)(?:\.(.+)|)/;function Qn(){return!0}function Jn(){return!1}function Qs(l,h,m,x,v,w){var C,F;if(typeof h=="object"){typeof m!="string"&&(x=x||m,m=void 0);for(F in h)Qs(l,F,m,x,h[F],w);return l}if(x==null&&v==null?(v=m,x=m=void 0):v==null&&(typeof m=="string"?(v=x,x=void 0):(v=x,x=m,m=void 0)),v===!1)v=Jn;else if(!v)return l;return w===1&&(C=v,v=function(R){return g().off(R),C.apply(this,arguments)},v.guid=C.guid||(C.guid=g.guid++)),l.each(function(){g.event.add(this,h,v,x,m)})}g.event={global:{},add:function(l,h,m,x,v){var w,C,F,R,V,Q,nt,Y,rt,mt,Tt,_t=ct.get(l);if(Ht(l))for(m.handler&&(w=m,m=w.handler,v=w.selector),v&&g.find.matchesSelector(le,v),m.guid||(m.guid=g.guid++),(R=_t.events)||(R=_t.events=Object.create(null)),(C=_t.handle)||(C=_t.handle=function(de){return typeof g<"u"&&g.event.triggered!==de.type?g.event.dispatch.apply(l,arguments):void 0}),h=(h||"").match(At)||[""],V=h.length;V--;)F=wo.exec(h[V])||[],rt=Tt=F[1],mt=(F[2]||"").split(".").sort(),rt&&(nt=g.event.special[rt]||{},rt=(v?nt.delegateType:nt.bindType)||rt,nt=g.event.special[rt]||{},Q=g.extend({type:rt,origType:Tt,data:x,handler:m,guid:m.guid,selector:v,needsContext:v&&g.expr.match.needsContext.test(v),namespace:mt.join(".")},w),(Y=R[rt])||(Y=R[rt]=[],Y.delegateCount=0,(!nt.setup||nt.setup.call(l,x,mt,C)===!1)&&l.addEventListener&&l.addEventListener(rt,C)),nt.add&&(nt.add.call(l,Q),Q.handler.guid||(Q.handler.guid=m.guid)),v?Y.splice(Y.delegateCount++,0,Q):Y.push(Q),g.event.global[rt]=!0)},remove:function(l,h,m,x,v){var w,C,F,R,V,Q,nt,Y,rt,mt,Tt,_t=ct.hasData(l)&&ct.get(l);if(!(!_t||!(R=_t.events))){for(h=(h||"").match(At)||[""],V=h.length;V--;){if(F=wo.exec(h[V])||[],rt=Tt=F[1],mt=(F[2]||"").split(".").sort(),!rt){for(rt in R)g.event.remove(l,rt+h[V],m,x,!0);continue}for(nt=g.event.special[rt]||{},rt=(x?nt.delegateType:nt.bindType)||rt,Y=R[rt]||[],F=F[2]&&new RegExp("(^|\\.)"+mt.join("\\.(?:.*\\.|)")+"(\\.|$)"),C=w=Y.length;w--;)Q=Y[w],(v||Tt===Q.origType)&&(!m||m.guid===Q.guid)&&(!F||F.test(Q.namespace))&&(!x||x===Q.selector||x==="**"&&Q.selector)&&(Y.splice(w,1),Q.selector&&Y.delegateCount--,nt.remove&&nt.remove.call(l,Q));C&&!Y.length&&((!nt.teardown||nt.teardown.call(l,mt,_t.handle)===!1)&&g.removeEvent(l,rt,_t.handle),delete R[rt])}g.isEmptyObject(R)&&ct.remove(l,"handle events")}},dispatch:function(l){var h,m,x,v,w,C,F=new Array(arguments.length),R=g.event.fix(l),V=(ct.get(this,"events")||Object.create(null))[R.type]||[],Q=g.event.special[R.type]||{};for(F[0]=R,h=1;h<arguments.length;h++)F[h]=arguments[h];if(R.delegateTarget=this,!(Q.preDispatch&&Q.preDispatch.call(this,R)===!1)){for(C=g.event.handlers.call(this,R,V),h=0;(v=C[h++])&&!R.isPropagationStopped();)for(R.currentTarget=v.elem,m=0;(w=v.handlers[m++])&&!R.isImmediatePropagationStopped();)(!R.rnamespace||w.namespace===!1||R.rnamespace.test(w.namespace))&&(R.handleObj=w,R.data=w.data,x=((g.event.special[w.origType]||{}).handle||w.handler).apply(v.elem,F),x!==void 0&&(R.result=x)===!1&&(R.preventDefault(),R.stopPropagation()));return Q.postDispatch&&Q.postDispatch.call(this,R),R.result}},handlers:function(l,h){var m,x,v,w,C,F=[],R=h.delegateCount,V=l.target;if(R&&V.nodeType&&!(l.type==="click"&&l.button>=1)){for(;V!==this;V=V.parentNode||this)if(V.nodeType===1&&!(l.type==="click"&&V.disabled===!0)){for(w=[],C={},m=0;m<R;m++)x=h[m],v=x.selector+" ",C[v]===void 0&&(C[v]=x.needsContext?g(v,this).index(V)>-1:g.find(v,this,null,[V]).length),C[v]&&w.push(x);w.length&&F.push({elem:V,handlers:w})}}return V=this,R<h.length&&F.push({elem:V,handlers:h.slice(R)}),F},addProp:function(l,h){Object.defineProperty(g.Event.prototype,l,{enumerable:!0,configurable:!0,get:_(h)?function(){if(this.originalEvent)return h(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[l]},set:function(m){Object.defineProperty(this,l,{enumerable:!0,configurable:!0,writable:!0,value:m})}})},fix:function(l){return l[g.expando]?l:new g.Event(l)},special:{load:{noBubble:!0},click:{setup:function(l){var h=this||l;return Ae.test(h.type)&&h.click&&k(h,"input")&&Ki(h,"click",!0),!1},trigger:function(l){var h=this||l;return Ae.test(h.type)&&h.click&&k(h,"input")&&Ki(h,"click"),!0},_default:function(l){var h=l.target;return Ae.test(h.type)&&h.click&&k(h,"input")&&ct.get(h,"click")||k(h,"a")}},beforeunload:{postDispatch:function(l){l.result!==void 0&&l.originalEvent&&(l.originalEvent.returnValue=l.result)}}}};function Ki(l,h,m){if(!m){ct.get(l,h)===void 0&&g.event.add(l,h,Qn);return}ct.set(l,h,!1),g.event.add(l,h,{namespace:!1,handler:function(x){var v,w=ct.get(this,h);if(x.isTrigger&1&&this[h]){if(w)(g.event.special[h]||{}).delegateType&&x.stopPropagation();else if(w=r.call(arguments),ct.set(this,h,w),this[h](),v=ct.get(this,h),ct.set(this,h,!1),w!==v)return x.stopImmediatePropagation(),x.preventDefault(),v}else w&&(ct.set(this,h,g.event.trigger(w[0],w.slice(1),this)),x.stopPropagation(),x.isImmediatePropagationStopped=Qn)}})}g.removeEvent=function(l,h,m){l.removeEventListener&&l.removeEventListener(h,m)},g.Event=function(l,h){if(!(this instanceof g.Event))return new g.Event(l,h);l&&l.type?(this.originalEvent=l,this.type=l.type,this.isDefaultPrevented=l.defaultPrevented||l.defaultPrevented===void 0&&l.returnValue===!1?Qn:Jn,this.target=l.target&&l.target.nodeType===3?l.target.parentNode:l.target,this.currentTarget=l.currentTarget,this.relatedTarget=l.relatedTarget):this.type=l,h&&g.extend(this,h),this.timeStamp=l&&l.timeStamp||Date.now(),this[g.expando]=!0},g.Event.prototype={constructor:g.Event,isDefaultPrevented:Jn,isPropagationStopped:Jn,isImmediatePropagationStopped:Jn,isSimulated:!1,preventDefault:function(){var l=this.originalEvent;this.isDefaultPrevented=Qn,l&&!this.isSimulated&&l.preventDefault()},stopPropagation:function(){var l=this.originalEvent;this.isPropagationStopped=Qn,l&&!this.isSimulated&&l.stopPropagation()},stopImmediatePropagation:function(){var l=this.originalEvent;this.isImmediatePropagationStopped=Qn,l&&!this.isSimulated&&l.stopImmediatePropagation(),this.stopPropagation()}},g.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},g.event.addProp),g.each({focus:"focusin",blur:"focusout"},function(l,h){function m(x){if(A.documentMode){var v=ct.get(this,"handle"),w=g.event.fix(x);w.type=x.type==="focusin"?"focus":"blur",w.isSimulated=!0,v(x),w.target===w.currentTarget&&v(w)}else g.event.simulate(h,x.target,g.event.fix(x))}g.event.special[l]={setup:function(){var x;if(Ki(this,l,!0),A.documentMode)x=ct.get(this,h),x||this.addEventListener(h,m),ct.set(this,h,(x||0)+1);else return!1},trigger:function(){return Ki(this,l),!0},teardown:function(){var x;if(A.documentMode)x=ct.get(this,h)-1,x?ct.set(this,h,x):(this.removeEventListener(h,m),ct.remove(this,h));else return!1},_default:function(x){return ct.get(x.target,l)},delegateType:h},g.event.special[h]={setup:function(){var x=this.ownerDocument||this.document||this,v=A.documentMode?this:x,w=ct.get(v,h);w||(A.documentMode?this.addEventListener(h,m):x.addEventListener(l,m,!0)),ct.set(v,h,(w||0)+1)},teardown:function(){var x=this.ownerDocument||this.document||this,v=A.documentMode?this:x,w=ct.get(v,h)-1;w?ct.set(v,h,w):(A.documentMode?this.removeEventListener(h,m):x.removeEventListener(l,m,!0),ct.remove(v,h))}}}),g.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(l,h){g.event.special[l]={delegateType:h,bindType:h,handle:function(m){var x,v=this,w=m.relatedTarget,C=m.handleObj;return(!w||w!==v&&!g.contains(v,w))&&(m.type=C.origType,x=C.handler.apply(this,arguments),m.type=h),x}}}),g.fn.extend({on:function(l,h,m,x){return Qs(this,l,h,m,x)},one:function(l,h,m,x){return Qs(this,l,h,m,x,1)},off:function(l,h,m){var x,v;if(l&&l.preventDefault&&l.handleObj)return x=l.handleObj,g(l.delegateTarget).off(x.namespace?x.origType+"."+x.namespace:x.origType,x.selector,x.handler),this;if(typeof l=="object"){for(v in l)this.off(v,h,l[v]);return this}return(h===!1||typeof h=="function")&&(m=h,h=void 0),m===!1&&(m=Jn),this.each(function(){g.event.remove(this,l,m,h)})}});var yu=/<script|<style|<link/i,xu=/checked\s*(?:[^=]|=\s*.checked.)/i,_u=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function So(l,h){return k(l,"table")&&k(h.nodeType!==11?h:h.firstChild,"tr")&&g(l).children("tbody")[0]||l}function vu(l){return l.type=(l.getAttribute("type")!==null)+"/"+l.type,l}function wu(l){return(l.type||"").slice(0,5)==="true/"?l.type=l.type.slice(5):l.removeAttribute("type"),l}function Ao(l,h){var m,x,v,w,C,F,R;if(h.nodeType===1){if(ct.hasData(l)&&(w=ct.get(l),R=w.events,R)){ct.remove(h,"handle events");for(v in R)for(m=0,x=R[v].length;m<x;m++)g.event.add(h,v,R[v][m])}Yt.hasData(l)&&(C=Yt.access(l),F=g.extend({},C),Yt.set(h,F))}}function Su(l,h){var m=h.nodeName.toLowerCase();m==="input"&&Ae.test(l.type)?h.checked=l.checked:(m==="input"||m==="textarea")&&(h.defaultValue=l.defaultValue)}function Zn(l,h,m,x){h=o(h);var v,w,C,F,R,V,Q=0,nt=l.length,Y=nt-1,rt=h[0],mt=_(rt);if(mt||nt>1&&typeof rt=="string"&&!y.checkClone&&xu.test(rt))return l.each(function(Tt){var _t=l.eq(Tt);mt&&(h[0]=rt.call(this,Tt,_t.html())),Zn(_t,h,m,x)});if(nt&&(v=vo(h,l[0].ownerDocument,!1,l,x),w=v.firstChild,v.childNodes.length===1&&(v=w),w||x)){for(C=g.map(he(v,"script"),vu),F=C.length;Q<nt;Q++)R=v,Q!==Y&&(R=g.clone(R,!0,!0),F&&g.merge(C,he(R,"script"))),m.call(l[Q],R,Q);if(F)for(V=C[C.length-1].ownerDocument,g.map(C,wu),Q=0;Q<F;Q++)R=C[Q],nn.test(R.type||"")&&!ct.access(R,"globalEval")&&g.contains(V,R)&&(R.src&&(R.type||"").toLowerCase()!=="module"?g._evalUrl&&!R.noModule&&g._evalUrl(R.src,{nonce:R.nonce||R.getAttribute("nonce")},V):I(R.textContent.replace(_u,""),R,V))}return l}function Co(l,h,m){for(var x,v=h?g.filter(h,l):l,w=0;(x=v[w])!=null;w++)!m&&x.nodeType===1&&g.cleanData(he(x)),x.parentNode&&(m&&Se(x)&&He(he(x,"script")),x.parentNode.removeChild(x));return l}g.extend({htmlPrefilter:function(l){return l},clone:function(l,h,m){var x,v,w,C,F=l.cloneNode(!0),R=Se(l);if(!y.noCloneChecked&&(l.nodeType===1||l.nodeType===11)&&!g.isXMLDoc(l))for(C=he(F),w=he(l),x=0,v=w.length;x<v;x++)Su(w[x],C[x]);if(h)if(m)for(w=w||he(l),C=C||he(F),x=0,v=w.length;x<v;x++)Ao(w[x],C[x]);else Ao(l,F);return C=he(F,"script"),C.length>0&&He(C,!R&&he(l,"script")),F},cleanData:function(l){for(var h,m,x,v=g.event.special,w=0;(m=l[w])!==void 0;w++)if(Ht(m)){if(h=m[ct.expando]){if(h.events)for(x in h.events)v[x]?g.event.remove(m,x):g.removeEvent(m,x,h.handle);m[ct.expando]=void 0}m[Yt.expando]&&(m[Yt.expando]=void 0)}}}),g.fn.extend({detach:function(l){return Co(this,l,!0)},remove:function(l){return Co(this,l)},text:function(l){return Mt(this,function(h){return h===void 0?g.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=h)})},null,l,arguments.length)},append:function(){return Zn(this,arguments,function(l){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var h=So(this,l);h.appendChild(l)}})},prepend:function(){return Zn(this,arguments,function(l){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var h=So(this,l);h.insertBefore(l,h.firstChild)}})},before:function(){return Zn(this,arguments,function(l){this.parentNode&&this.parentNode.insertBefore(l,this)})},after:function(){return Zn(this,arguments,function(l){this.parentNode&&this.parentNode.insertBefore(l,this.nextSibling)})},empty:function(){for(var l,h=0;(l=this[h])!=null;h++)l.nodeType===1&&(g.cleanData(he(l,!1)),l.textContent="");return this},clone:function(l,h){return l=l??!1,h=h??l,this.map(function(){return g.clone(this,l,h)})},html:function(l){return Mt(this,function(h){var m=this[0]||{},x=0,v=this.length;if(h===void 0&&m.nodeType===1)return m.innerHTML;if(typeof h=="string"&&!yu.test(h)&&!ce[(Be.exec(h)||["",""])[1].toLowerCase()]){h=g.htmlPrefilter(h);try{for(;x<v;x++)m=this[x]||{},m.nodeType===1&&(g.cleanData(he(m,!1)),m.innerHTML=h);m=0}catch{}}m&&this.empty().append(h)},null,l,arguments.length)},replaceWith:function(){var l=[];return Zn(this,arguments,function(h){var m=this.parentNode;g.inArray(this,l)<0&&(g.cleanData(he(this)),m&&m.replaceChild(h,this))},l)}}),g.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(l,h){g.fn[l]=function(m){for(var x,v=[],w=g(m),C=w.length-1,F=0;F<=C;F++)x=F===C?this:this.clone(!0),g(w[F])[h](x),a.apply(v,x.get());return this.pushStack(v)}});var Js=new RegExp("^("+we+")(?!px)[a-z%]+$","i"),Zs=/^--/,Gi=function(l){var h=l.ownerDocument.defaultView;return(!h||!h.opener)&&(h=t),h.getComputedStyle(l)},ko=function(l,h,m){var x,v,w={};for(v in h)w[v]=l.style[v],l.style[v]=h[v];x=m.call(l);for(v in h)l.style[v]=w[v];return x},Au=new RegExp(ne.join("|"),"i");(function(){function l(){if(V){R.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",V.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",le.appendChild(R).appendChild(V);var Q=t.getComputedStyle(V);m=Q.top!=="1%",F=h(Q.marginLeft)===12,V.style.right="60%",w=h(Q.right)===36,x=h(Q.width)===36,V.style.position="absolute",v=h(V.offsetWidth/3)===12,le.removeChild(R),V=null}}function h(Q){return Math.round(parseFloat(Q))}var m,x,v,w,C,F,R=A.createElement("div"),V=A.createElement("div");V.style&&(V.style.backgroundClip="content-box",V.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle=V.style.backgroundClip==="content-box",g.extend(y,{boxSizingReliable:function(){return l(),x},pixelBoxStyles:function(){return l(),w},pixelPosition:function(){return l(),m},reliableMarginLeft:function(){return l(),F},scrollboxSize:function(){return l(),v},reliableTrDimensions:function(){var Q,nt,Y,rt;return C==null&&(Q=A.createElement("table"),nt=A.createElement("tr"),Y=A.createElement("div"),Q.style.cssText="position:absolute;left:-11111px;border-collapse:separate",nt.style.cssText="box-sizing:content-box;border:1px solid",nt.style.height="1px",Y.style.height="9px",Y.style.display="block",le.appendChild(Q).appendChild(nt).appendChild(Y),rt=t.getComputedStyle(nt),C=parseInt(rt.height,10)+parseInt(rt.borderTopWidth,10)+parseInt(rt.borderBottomWidth,10)===nt.offsetHeight,le.removeChild(Q)),C}}))})();function gi(l,h,m){var x,v,w,C,F=Zs.test(h),R=l.style;return m=m||Gi(l),m&&(C=m.getPropertyValue(h)||m[h],F&&C&&(C=C.replace(z,"$1")||void 0),C===""&&!Se(l)&&(C=g.style(l,h)),!y.pixelBoxStyles()&&Js.test(C)&&Au.test(h)&&(x=R.width,v=R.minWidth,w=R.maxWidth,R.minWidth=R.maxWidth=R.width=C,C=m.width,R.width=x,R.minWidth=v,R.maxWidth=w)),C!==void 0?C+"":C}function Mo(l,h){return{get:function(){if(l()){delete this.get;return}return(this.get=h).apply(this,arguments)}}}var To=["Webkit","Moz","ms"],Eo=A.createElement("div").style,Po={};function Cu(l){for(var h=l[0].toUpperCase()+l.slice(1),m=To.length;m--;)if(l=To[m]+h,l in Eo)return l}function tr(l){var h=g.cssProps[l]||Po[l];return h||(l in Eo?l:Po[l]=Cu(l)||l)}var ku=/^(none|table(?!-c[ea]).+)/,Mu={position:"absolute",visibility:"hidden",display:"block"},Oo={letterSpacing:"0",fontWeight:"400"};function Do(l,h,m){var x=ae.exec(h);return x?Math.max(0,x[2]-(m||0))+(x[3]||"px"):h}function er(l,h,m,x,v,w){var C=h==="width"?1:0,F=0,R=0,V=0;if(m===(x?"border":"content"))return 0;for(;C<4;C+=2)m==="margin"&&(V+=g.css(l,m+ne[C],!0,v)),x?(m==="content"&&(R-=g.css(l,"padding"+ne[C],!0,v)),m!=="margin"&&(R-=g.css(l,"border"+ne[C]+"Width",!0,v))):(R+=g.css(l,"padding"+ne[C],!0,v),m!=="padding"?R+=g.css(l,"border"+ne[C]+"Width",!0,v):F+=g.css(l,"border"+ne[C]+"Width",!0,v));return!x&&w>=0&&(R+=Math.max(0,Math.ceil(l["offset"+h[0].toUpperCase()+h.slice(1)]-w-R-F-.5))||0),R+V}function Ro(l,h,m){var x=Gi(l),v=!y.boxSizingReliable()||m,w=v&&g.css(l,"boxSizing",!1,x)==="border-box",C=w,F=gi(l,h,x),R="offset"+h[0].toUpperCase()+h.slice(1);if(Js.test(F)){if(!m)return F;F="auto"}return(!y.boxSizingReliable()&&w||!y.reliableTrDimensions()&&k(l,"tr")||F==="auto"||!parseFloat(F)&&g.css(l,"display",!1,x)==="inline")&&l.getClientRects().length&&(w=g.css(l,"boxSizing",!1,x)==="border-box",C=R in l,C&&(F=l[R])),F=parseFloat(F)||0,F+er(l,h,m||(w?"border":"content"),C,x,F)+"px"}g.extend({cssHooks:{opacity:{get:function(l,h){if(h){var m=gi(l,"opacity");return m===""?"1":m}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(l,h,m,x){if(!(!l||l.nodeType===3||l.nodeType===8||!l.style)){var v,w,C,F=Vt(h),R=Zs.test(h),V=l.style;if(R||(h=tr(F)),C=g.cssHooks[h]||g.cssHooks[F],m!==void 0){if(w=typeof m,w==="string"&&(v=ae.exec(m))&&v[1]&&(m=Gn(l,h,v),w="number"),m==null||m!==m)return;w==="number"&&!R&&(m+=v&&v[3]||(g.cssNumber[F]?"":"px")),!y.clearCloneStyle&&m===""&&h.indexOf("background")===0&&(V[h]="inherit"),(!C||!("set"in C)||(m=C.set(l,m,x))!==void 0)&&(R?V.setProperty(h,m):V[h]=m)}else return C&&"get"in C&&(v=C.get(l,!1,x))!==void 0?v:V[h]}},css:function(l,h,m,x){var v,w,C,F=Vt(h),R=Zs.test(h);return R||(h=tr(F)),C=g.cssHooks[h]||g.cssHooks[F],C&&"get"in C&&(v=C.get(l,!0,m)),v===void 0&&(v=gi(l,h,x)),v==="normal"&&h in Oo&&(v=Oo[h]),m===""||m?(w=parseFloat(v),m===!0||isFinite(w)?w||0:v):v}}),g.each(["height","width"],function(l,h){g.cssHooks[h]={get:function(m,x,v){if(x)return ku.test(g.css(m,"display"))&&(!m.getClientRects().length||!m.getBoundingClientRect().width)?ko(m,Mu,function(){return Ro(m,h,v)}):Ro(m,h,v)},set:function(m,x,v){var w,C=Gi(m),F=!y.scrollboxSize()&&C.position==="absolute",R=F||v,V=R&&g.css(m,"boxSizing",!1,C)==="border-box",Q=v?er(m,h,v,V,C):0;return V&&F&&(Q-=Math.ceil(m["offset"+h[0].toUpperCase()+h.slice(1)]-parseFloat(C[h])-er(m,h,"border",!1,C)-.5)),Q&&(w=ae.exec(x))&&(w[3]||"px")!=="px"&&(m.style[h]=x,x=g.css(m,h)),Do(m,x,Q)}}}),g.cssHooks.marginLeft=Mo(y.reliableMarginLeft,function(l,h){if(h)return(parseFloat(gi(l,"marginLeft"))||l.getBoundingClientRect().left-ko(l,{marginLeft:0},function(){return l.getBoundingClientRect().left}))+"px"}),g.each({margin:"",padding:"",border:"Width"},function(l,h){g.cssHooks[l+h]={expand:function(m){for(var x=0,v={},w=typeof m=="string"?m.split(" "):[m];x<4;x++)v[l+ne[x]+h]=w[x]||w[x-2]||w[0];return v}},l!=="margin"&&(g.cssHooks[l+h].set=Do)}),g.fn.extend({css:function(l,h){return Mt(this,function(m,x,v){var w,C,F={},R=0;if(Array.isArray(x)){for(w=Gi(m),C=x.length;R<C;R++)F[x[R]]=g.css(m,x[R],!1,w);return F}return v!==void 0?g.style(m,x,v):g.css(m,x)},l,h,arguments.length>1)}});function Ce(l,h,m,x,v){return new Ce.prototype.init(l,h,m,x,v)}g.Tween=Ce,Ce.prototype={constructor:Ce,init:function(l,h,m,x,v,w){this.elem=l,this.prop=m,this.easing=v||g.easing._default,this.options=h,this.start=this.now=this.cur(),this.end=x,this.unit=w||(g.cssNumber[m]?"":"px")},cur:function(){var l=Ce.propHooks[this.prop];return l&&l.get?l.get(this):Ce.propHooks._default.get(this)},run:function(l){var h,m=Ce.propHooks[this.prop];return this.options.duration?this.pos=h=g.easing[this.easing](l,this.options.duration*l,0,1,this.options.duration):this.pos=h=l,this.now=(this.end-this.start)*h+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),m&&m.set?m.set(this):Ce.propHooks._default.set(this),this}},Ce.prototype.init.prototype=Ce.prototype,Ce.propHooks={_default:{get:function(l){var h;return l.elem.nodeType!==1||l.elem[l.prop]!=null&&l.elem.style[l.prop]==null?l.elem[l.prop]:(h=g.css(l.elem,l.prop,""),!h||h==="auto"?0:h)},set:function(l){g.fx.step[l.prop]?g.fx.step[l.prop](l):l.elem.nodeType===1&&(g.cssHooks[l.prop]||l.elem.style[tr(l.prop)]!=null)?g.style(l.elem,l.prop,l.now+l.unit):l.elem[l.prop]=l.now}}},Ce.propHooks.scrollTop=Ce.propHooks.scrollLeft={set:function(l){l.elem.nodeType&&l.elem.parentNode&&(l.elem[l.prop]=l.now)}},g.easing={linear:function(l){return l},swing:function(l){return .5-Math.cos(l*Math.PI)/2},_default:"swing"},g.fx=Ce.prototype.init,g.fx.step={};var ti,Qi,Tu=/^(?:toggle|show|hide)$/,Eu=/queueHooks$/;function nr(){Qi&&(A.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(nr):t.setTimeout(nr,g.fx.interval),g.fx.tick())}function Lo(){return t.setTimeout(function(){ti=void 0}),ti=Date.now()}function Ji(l,h){var m,x=0,v={height:l};for(h=h?1:0;x<4;x+=2-h)m=ne[x],v["margin"+m]=v["padding"+m]=l;return h&&(v.opacity=v.width=l),v}function Fo(l,h,m){for(var x,v=(je.tweeners[h]||[]).concat(je.tweeners["*"]),w=0,C=v.length;w<C;w++)if(x=v[w].call(m,h,l))return x}function Pu(l,h,m){var x,v,w,C,F,R,V,Q,nt="width"in h||"height"in h,Y=this,rt={},mt=l.style,Tt=l.nodeType&&Kn(l),_t=ct.get(l,"fxshow");m.queue||(C=g._queueHooks(l,"fx"),C.unqueued==null&&(C.unqueued=0,F=C.empty.fire,C.empty.fire=function(){C.unqueued||F()}),C.unqueued++,Y.always(function(){Y.always(function(){C.unqueued--,g.queue(l,"fx").length||C.empty.fire()})}));for(x in h)if(v=h[x],Tu.test(v)){if(delete h[x],w=w||v==="toggle",v===(Tt?"hide":"show"))if(v==="show"&&_t&&_t[x]!==void 0)Tt=!0;else continue;rt[x]=_t&&_t[x]||g.style(l,x)}if(R=!g.isEmptyObject(h),!(!R&&g.isEmptyObject(rt))){nt&&l.nodeType===1&&(m.overflow=[mt.overflow,mt.overflowX,mt.overflowY],V=_t&&_t.display,V==null&&(V=ct.get(l,"display")),Q=g.css(l,"display"),Q==="none"&&(V?Q=V:(gn([l],!0),V=l.style.display||V,Q=g.css(l,"display"),gn([l]))),(Q==="inline"||Q==="inline-block"&&V!=null)&&g.css(l,"float")==="none"&&(R||(Y.done(function(){mt.display=V}),V==null&&(Q=mt.display,V=Q==="none"?"":Q)),mt.display="inline-block")),m.overflow&&(mt.overflow="hidden",Y.always(function(){mt.overflow=m.overflow[0],mt.overflowX=m.overflow[1],mt.overflowY=m.overflow[2]})),R=!1;for(x in rt)R||(_t?"hidden"in _t&&(Tt=_t.hidden):_t=ct.access(l,"fxshow",{display:V}),w&&(_t.hidden=!Tt),Tt&&gn([l],!0),Y.done(function(){Tt||gn([l]),ct.remove(l,"fxshow");for(x in rt)g.style(l,x,rt[x])})),R=Fo(Tt?_t[x]:0,x,Y),x in _t||(_t[x]=R.start,Tt&&(R.end=R.start,R.start=0))}}function Ou(l,h){var m,x,v,w,C;for(m in l)if(x=Vt(m),v=h[x],w=l[m],Array.isArray(w)&&(v=w[1],w=l[m]=w[0]),m!==x&&(l[x]=w,delete l[m]),C=g.cssHooks[x],C&&"expand"in C){w=C.expand(w),delete l[x];for(m in w)m in l||(l[m]=w[m],h[m]=v)}else h[x]=v}function je(l,h,m){var x,v,w=0,C=je.prefilters.length,F=g.Deferred().always(function(){delete R.elem}),R=function(){if(v)return!1;for(var nt=ti||Lo(),Y=Math.max(0,V.startTime+V.duration-nt),rt=Y/V.duration||0,mt=1-rt,Tt=0,_t=V.tweens.length;Tt<_t;Tt++)V.tweens[Tt].run(mt);return F.notifyWith(l,[V,mt,Y]),mt<1&&_t?Y:(_t||F.notifyWith(l,[V,1,0]),F.resolveWith(l,[V]),!1)},V=F.promise({elem:l,props:g.extend({},h),opts:g.extend(!0,{specialEasing:{},easing:g.easing._default},m),originalProperties:h,originalOptions:m,startTime:ti||Lo(),duration:m.duration,tweens:[],createTween:function(nt,Y){var rt=g.Tween(l,V.opts,nt,Y,V.opts.specialEasing[nt]||V.opts.easing);return V.tweens.push(rt),rt},stop:function(nt){var Y=0,rt=nt?V.tweens.length:0;if(v)return this;for(v=!0;Y<rt;Y++)V.tweens[Y].run(1);return nt?(F.notifyWith(l,[V,1,0]),F.resolveWith(l,[V,nt])):F.rejectWith(l,[V,nt]),this}}),Q=V.props;for(Ou(Q,V.opts.specialEasing);w<C;w++)if(x=je.prefilters[w].call(V,l,Q,V.opts),x)return _(x.stop)&&(g._queueHooks(V.elem,V.opts.queue).stop=x.stop.bind(x)),x;return g.map(Q,Fo,V),_(V.opts.start)&&V.opts.start.call(l,V),V.progress(V.opts.progress).done(V.opts.done,V.opts.complete).fail(V.opts.fail).always(V.opts.always),g.fx.timer(g.extend(R,{elem:l,anim:V,queue:V.opts.queue})),V}g.Animation=g.extend(je,{tweeners:{"*":[function(l,h){var m=this.createTween(l,h);return Gn(m.elem,l,ae.exec(h),m),m}]},tweener:function(l,h){_(l)?(h=l,l=["*"]):l=l.match(At);for(var m,x=0,v=l.length;x<v;x++)m=l[x],je.tweeners[m]=je.tweeners[m]||[],je.tweeners[m].unshift(h)},prefilters:[Pu],prefilter:function(l,h){h?je.prefilters.unshift(l):je.prefilters.push(l)}}),g.speed=function(l,h,m){var x=l&&typeof l=="object"?g.extend({},l):{complete:m||!m&&h||_(l)&&l,duration:l,easing:m&&h||h&&!_(h)&&h};return g.fx.off?x.duration=0:typeof x.duration!="number"&&(x.duration in g.fx.speeds?x.duration=g.fx.speeds[x.duration]:x.duration=g.fx.speeds._default),(x.queue==null||x.queue===!0)&&(x.queue="fx"),x.old=x.complete,x.complete=function(){_(x.old)&&x.old.call(this),x.queue&&g.dequeue(this,x.queue)},x},g.fn.extend({fadeTo:function(l,h,m,x){return this.filter(Kn).css("opacity",0).show().end().animate({opacity:h},l,m,x)},animate:function(l,h,m,x){var v=g.isEmptyObject(l),w=g.speed(h,m,x),C=function(){var F=je(this,g.extend({},l),w);(v||ct.get(this,"finish"))&&F.stop(!0)};return C.finish=C,v||w.queue===!1?this.each(C):this.queue(w.queue,C)},stop:function(l,h,m){var x=function(v){var w=v.stop;delete v.stop,w(m)};return typeof l!="string"&&(m=h,h=l,l=void 0),h&&this.queue(l||"fx",[]),this.each(function(){var v=!0,w=l!=null&&l+"queueHooks",C=g.timers,F=ct.get(this);if(w)F[w]&&F[w].stop&&x(F[w]);else for(w in F)F[w]&&F[w].stop&&Eu.test(w)&&x(F[w]);for(w=C.length;w--;)C[w].elem===this&&(l==null||C[w].queue===l)&&(C[w].anim.stop(m),v=!1,C.splice(w,1));(v||!m)&&g.dequeue(this,l)})},finish:function(l){return l!==!1&&(l=l||"fx"),this.each(function(){var h,m=ct.get(this),x=m[l+"queue"],v=m[l+"queueHooks"],w=g.timers,C=x?x.length:0;for(m.finish=!0,g.queue(this,l,[]),v&&v.stop&&v.stop.call(this,!0),h=w.length;h--;)w[h].elem===this&&w[h].queue===l&&(w[h].anim.stop(!0),w.splice(h,1));for(h=0;h<C;h++)x[h]&&x[h].finish&&x[h].finish.call(this);delete m.finish})}}),g.each(["toggle","show","hide"],function(l,h){var m=g.fn[h];g.fn[h]=function(x,v,w){return x==null||typeof x=="boolean"?m.apply(this,arguments):this.animate(Ji(h,!0),x,v,w)}}),g.each({slideDown:Ji("show"),slideUp:Ji("hide"),slideToggle:Ji("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(l,h){g.fn[l]=function(m,x,v){return this.animate(h,m,x,v)}}),g.timers=[],g.fx.tick=function(){var l,h=0,m=g.timers;for(ti=Date.now();h<m.length;h++)l=m[h],!l()&&m[h]===l&&m.splice(h--,1);m.length||g.fx.stop(),ti=void 0},g.fx.timer=function(l){g.timers.push(l),g.fx.start()},g.fx.interval=13,g.fx.start=function(){Qi||(Qi=!0,nr())},g.fx.stop=function(){Qi=null},g.fx.speeds={slow:600,fast:200,_default:400},g.fn.delay=function(l,h){return l=g.fx&&g.fx.speeds[l]||l,h=h||"fx",this.queue(h,function(m,x){var v=t.setTimeout(m,l);x.stop=function(){t.clearTimeout(v)}})},(function(){var l=A.createElement("input"),h=A.createElement("select"),m=h.appendChild(A.createElement("option"));l.type="checkbox",y.checkOn=l.value!=="",y.optSelected=m.selected,l=A.createElement("input"),l.value="t",l.type="radio",y.radioValue=l.value==="t"})();var Io,mi=g.expr.attrHandle;g.fn.extend({attr:function(l,h){return Mt(this,g.attr,l,h,arguments.length>1)},removeAttr:function(l){return this.each(function(){g.removeAttr(this,l)})}}),g.extend({attr:function(l,h,m){var x,v,w=l.nodeType;if(!(w===3||w===8||w===2)){if(typeof l.getAttribute>"u")return g.prop(l,h,m);if((w!==1||!g.isXMLDoc(l))&&(v=g.attrHooks[h.toLowerCase()]||(g.expr.match.bool.test(h)?Io:void 0)),m!==void 0){if(m===null){g.removeAttr(l,h);return}return v&&"set"in v&&(x=v.set(l,m,h))!==void 0?x:(l.setAttribute(h,m+""),m)}return v&&"get"in v&&(x=v.get(l,h))!==null?x:(x=g.find.attr(l,h),x??void 0)}},attrHooks:{type:{set:function(l,h){if(!y.radioValue&&h==="radio"&&k(l,"input")){var m=l.value;return l.setAttribute("type",h),m&&(l.value=m),h}}}},removeAttr:function(l,h){var m,x=0,v=h&&h.match(At);if(v&&l.nodeType===1)for(;m=v[x++];)l.removeAttribute(m)}}),Io={set:function(l,h,m){return h===!1?g.removeAttr(l,m):l.setAttribute(m,m),m}},g.each(g.expr.match.bool.source.match(/\w+/g),function(l,h){var m=mi[h]||g.find.attr;mi[h]=function(x,v,w){var C,F,R=v.toLowerCase();return w||(F=mi[R],mi[R]=C,C=m(x,v,w)!=null?R:null,mi[R]=F),C}});var Du=/^(?:input|select|textarea|button)$/i,Ru=/^(?:a|area)$/i;g.fn.extend({prop:function(l,h){return Mt(this,g.prop,l,h,arguments.length>1)},removeProp:function(l){return this.each(function(){delete this[g.propFix[l]||l]})}}),g.extend({prop:function(l,h,m){var x,v,w=l.nodeType;if(!(w===3||w===8||w===2))return(w!==1||!g.isXMLDoc(l))&&(h=g.propFix[h]||h,v=g.propHooks[h]),m!==void 0?v&&"set"in v&&(x=v.set(l,m,h))!==void 0?x:l[h]=m:v&&"get"in v&&(x=v.get(l,h))!==null?x:l[h]},propHooks:{tabIndex:{get:function(l){var h=g.find.attr(l,"tabindex");return h?parseInt(h,10):Du.test(l.nodeName)||Ru.test(l.nodeName)&&l.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(g.propHooks.selected={get:function(l){var h=l.parentNode;return h&&h.parentNode&&h.parentNode.selectedIndex,null},set:function(l){var h=l.parentNode;h&&(h.selectedIndex,h.parentNode&&h.parentNode.selectedIndex)}}),g.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){g.propFix[this.toLowerCase()]=this});function En(l){var h=l.match(At)||[];return h.join(" ")}function Pn(l){return l.getAttribute&&l.getAttribute("class")||""}function ir(l){return Array.isArray(l)?l:typeof l=="string"?l.match(At)||[]:[]}g.fn.extend({addClass:function(l){var h,m,x,v,w,C;return _(l)?this.each(function(F){g(this).addClass(l.call(this,F,Pn(this)))}):(h=ir(l),h.length?this.each(function(){if(x=Pn(this),m=this.nodeType===1&&" "+En(x)+" ",m){for(w=0;w<h.length;w++)v=h[w],m.indexOf(" "+v+" ")<0&&(m+=v+" ");C=En(m),x!==C&&this.setAttribute("class",C)}}):this)},removeClass:function(l){var h,m,x,v,w,C;return _(l)?this.each(function(F){g(this).removeClass(l.call(this,F,Pn(this)))}):arguments.length?(h=ir(l),h.length?this.each(function(){if(x=Pn(this),m=this.nodeType===1&&" "+En(x)+" ",m){for(w=0;w<h.length;w++)for(v=h[w];m.indexOf(" "+v+" ")>-1;)m=m.replace(" "+v+" "," ");C=En(m),x!==C&&this.setAttribute("class",C)}}):this):this.attr("class","")},toggleClass:function(l,h){var m,x,v,w,C=typeof l,F=C==="string"||Array.isArray(l);return _(l)?this.each(function(R){g(this).toggleClass(l.call(this,R,Pn(this),h),h)}):typeof h=="boolean"&&F?h?this.addClass(l):this.removeClass(l):(m=ir(l),this.each(function(){if(F)for(w=g(this),v=0;v<m.length;v++)x=m[v],w.hasClass(x)?w.removeClass(x):w.addClass(x);else(l===void 0||C==="boolean")&&(x=Pn(this),x&&ct.set(this,"__className__",x),this.setAttribute&&this.setAttribute("class",x||l===!1?"":ct.get(this,"__className__")||""))}))},hasClass:function(l){var h,m,x=0;for(h=" "+l+" ";m=this[x++];)if(m.nodeType===1&&(" "+En(Pn(m))+" ").indexOf(h)>-1)return!0;return!1}});var Lu=/\r/g;g.fn.extend({val:function(l){var h,m,x,v=this[0];return arguments.length?(x=_(l),this.each(function(w){var C;this.nodeType===1&&(x?C=l.call(this,w,g(this).val()):C=l,C==null?C="":typeof C=="number"?C+="":Array.isArray(C)&&(C=g.map(C,function(F){return F==null?"":F+""})),h=g.valHooks[this.type]||g.valHooks[this.nodeName.toLowerCase()],(!h||!("set"in h)||h.set(this,C,"value")===void 0)&&(this.value=C))})):v?(h=g.valHooks[v.type]||g.valHooks[v.nodeName.toLowerCase()],h&&"get"in h&&(m=h.get(v,"value"))!==void 0?m:(m=v.value,typeof m=="string"?m.replace(Lu,""):m??"")):void 0}}),g.extend({valHooks:{option:{get:function(l){var h=g.find.attr(l,"value");return h??En(g.text(l))}},select:{get:function(l){var h,m,x,v=l.options,w=l.selectedIndex,C=l.type==="select-one",F=C?null:[],R=C?w+1:v.length;for(w<0?x=R:x=C?w:0;x<R;x++)if(m=v[x],(m.selected||x===w)&&!m.disabled&&(!m.parentNode.disabled||!k(m.parentNode,"optgroup"))){if(h=g(m).val(),C)return h;F.push(h)}return F},set:function(l,h){for(var m,x,v=l.options,w=g.makeArray(h),C=v.length;C--;)x=v[C],(x.selected=g.inArray(g.valHooks.option.get(x),w)>-1)&&(m=!0);return m||(l.selectedIndex=-1),w}}}}),g.each(["radio","checkbox"],function(){g.valHooks[this]={set:function(l,h){if(Array.isArray(h))return l.checked=g.inArray(g(l).val(),h)>-1}},y.checkOn||(g.valHooks[this].get=function(l){return l.getAttribute("value")===null?"on":l.value})});var bi=t.location,No={guid:Date.now()},sr=/\?/;g.parseXML=function(l){var h,m;if(!l||typeof l!="string")return null;try{h=new t.DOMParser().parseFromString(l,"text/xml")}catch{}return m=h&&h.getElementsByTagName("parsererror")[0],(!h||m)&&g.error("Invalid XML: "+(m?g.map(m.childNodes,function(x){return x.textContent}).join(`
|
||
`):l)),h};var Bo=/^(?:focusinfocus|focusoutblur)$/,Ho=function(l){l.stopPropagation()};g.extend(g.event,{trigger:function(l,h,m,x){var v,w,C,F,R,V,Q,nt,Y=[m||A],rt=d.call(l,"type")?l.type:l,mt=d.call(l,"namespace")?l.namespace.split("."):[];if(w=nt=C=m=m||A,!(m.nodeType===3||m.nodeType===8)&&!Bo.test(rt+g.event.triggered)&&(rt.indexOf(".")>-1&&(mt=rt.split("."),rt=mt.shift(),mt.sort()),R=rt.indexOf(":")<0&&"on"+rt,l=l[g.expando]?l:new g.Event(rt,typeof l=="object"&&l),l.isTrigger=x?2:3,l.namespace=mt.join("."),l.rnamespace=l.namespace?new RegExp("(^|\\.)"+mt.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,l.result=void 0,l.target||(l.target=m),h=h==null?[l]:g.makeArray(h,[l]),Q=g.event.special[rt]||{},!(!x&&Q.trigger&&Q.trigger.apply(m,h)===!1))){if(!x&&!Q.noBubble&&!S(m)){for(F=Q.delegateType||rt,Bo.test(F+rt)||(w=w.parentNode);w;w=w.parentNode)Y.push(w),C=w;C===(m.ownerDocument||A)&&Y.push(C.defaultView||C.parentWindow||t)}for(v=0;(w=Y[v++])&&!l.isPropagationStopped();)nt=w,l.type=v>1?F:Q.bindType||rt,V=(ct.get(w,"events")||Object.create(null))[l.type]&&ct.get(w,"handle"),V&&V.apply(w,h),V=R&&w[R],V&&V.apply&&Ht(w)&&(l.result=V.apply(w,h),l.result===!1&&l.preventDefault());return l.type=rt,!x&&!l.isDefaultPrevented()&&(!Q._default||Q._default.apply(Y.pop(),h)===!1)&&Ht(m)&&R&&_(m[rt])&&!S(m)&&(C=m[R],C&&(m[R]=null),g.event.triggered=rt,l.isPropagationStopped()&&nt.addEventListener(rt,Ho),m[rt](),l.isPropagationStopped()&&nt.removeEventListener(rt,Ho),g.event.triggered=void 0,C&&(m[R]=C)),l.result}},simulate:function(l,h,m){var x=g.extend(new g.Event,m,{type:l,isSimulated:!0});g.event.trigger(x,null,h)}}),g.fn.extend({trigger:function(l,h){return this.each(function(){g.event.trigger(l,h,this)})},triggerHandler:function(l,h){var m=this[0];if(m)return g.event.trigger(l,h,m,!0)}});var Fu=/\[\]$/,jo=/\r?\n/g,Iu=/^(?:submit|button|image|reset|file)$/i,Nu=/^(?:input|select|textarea|keygen)/i;function rr(l,h,m,x){var v;if(Array.isArray(h))g.each(h,function(w,C){m||Fu.test(l)?x(l,C):rr(l+"["+(typeof C=="object"&&C!=null?w:"")+"]",C,m,x)});else if(!m&&D(h)==="object")for(v in h)rr(l+"["+v+"]",h[v],m,x);else x(l,h)}g.param=function(l,h){var m,x=[],v=function(w,C){var F=_(C)?C():C;x[x.length]=encodeURIComponent(w)+"="+encodeURIComponent(F??"")};if(l==null)return"";if(Array.isArray(l)||l.jquery&&!g.isPlainObject(l))g.each(l,function(){v(this.name,this.value)});else for(m in l)rr(m,l[m],h,v);return x.join("&")},g.fn.extend({serialize:function(){return g.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var l=g.prop(this,"elements");return l?g.makeArray(l):this}).filter(function(){var l=this.type;return this.name&&!g(this).is(":disabled")&&Nu.test(this.nodeName)&&!Iu.test(l)&&(this.checked||!Ae.test(l))}).map(function(l,h){var m=g(this).val();return m==null?null:Array.isArray(m)?g.map(m,function(x){return{name:h.name,value:x.replace(jo,`\r
|
||
`)}}):{name:h.name,value:m.replace(jo,`\r
|
||
`)}}).get()}});var Bu=/%20/g,Hu=/#.*$/,ju=/([?&])_=[^&]*/,zu=/^(.*?):[ \t]*([^\r\n]*)$/mg,Uu=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Wu=/^(?:GET|HEAD)$/,Vu=/^\/\//,zo={},or={},Uo="*/".concat("*"),ar=A.createElement("a");ar.href=bi.href;function Wo(l){return function(h,m){typeof h!="string"&&(m=h,h="*");var x,v=0,w=h.toLowerCase().match(At)||[];if(_(m))for(;x=w[v++];)x[0]==="+"?(x=x.slice(1)||"*",(l[x]=l[x]||[]).unshift(m)):(l[x]=l[x]||[]).push(m)}}function Vo(l,h,m,x){var v={},w=l===or;function C(F){var R;return v[F]=!0,g.each(l[F]||[],function(V,Q){var nt=Q(h,m,x);if(typeof nt=="string"&&!w&&!v[nt])return h.dataTypes.unshift(nt),C(nt),!1;if(w)return!(R=nt)}),R}return C(h.dataTypes[0])||!v["*"]&&C("*")}function lr(l,h){var m,x,v=g.ajaxSettings.flatOptions||{};for(m in h)h[m]!==void 0&&((v[m]?l:x||(x={}))[m]=h[m]);return x&&g.extend(!0,l,x),l}function $u(l,h,m){for(var x,v,w,C,F=l.contents,R=l.dataTypes;R[0]==="*";)R.shift(),x===void 0&&(x=l.mimeType||h.getResponseHeader("Content-Type"));if(x){for(v in F)if(F[v]&&F[v].test(x)){R.unshift(v);break}}if(R[0]in m)w=R[0];else{for(v in m){if(!R[0]||l.converters[v+" "+R[0]]){w=v;break}C||(C=v)}w=w||C}if(w)return w!==R[0]&&R.unshift(w),m[w]}function qu(l,h,m,x){var v,w,C,F,R,V={},Q=l.dataTypes.slice();if(Q[1])for(C in l.converters)V[C.toLowerCase()]=l.converters[C];for(w=Q.shift();w;)if(l.responseFields[w]&&(m[l.responseFields[w]]=h),!R&&x&&l.dataFilter&&(h=l.dataFilter(h,l.dataType)),R=w,w=Q.shift(),w){if(w==="*")w=R;else if(R!=="*"&&R!==w){if(C=V[R+" "+w]||V["* "+w],!C){for(v in V)if(F=v.split(" "),F[1]===w&&(C=V[R+" "+F[0]]||V["* "+F[0]],C)){C===!0?C=V[v]:V[v]!==!0&&(w=F[0],Q.unshift(F[1]));break}}if(C!==!0)if(C&&l.throws)h=C(h);else try{h=C(h)}catch(nt){return{state:"parsererror",error:C?nt:"No conversion from "+R+" to "+w}}}}return{state:"success",data:h}}g.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bi.href,type:"GET",isLocal:Uu.test(bi.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Uo,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":g.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(l,h){return h?lr(lr(l,g.ajaxSettings),h):lr(g.ajaxSettings,l)},ajaxPrefilter:Wo(zo),ajaxTransport:Wo(or),ajax:function(l,h){typeof l=="object"&&(h=l,l=void 0),h=h||{};var m,x,v,w,C,F,R,V,Q,nt,Y=g.ajaxSetup({},h),rt=Y.context||Y,mt=Y.context&&(rt.nodeType||rt.jquery)?g(rt):g.event,Tt=g.Deferred(),_t=g.Callbacks("once memory"),de=Y.statusCode||{},ie={},$e={},qe="canceled",Ct={readyState:0,getResponseHeader:function(Pt){var Gt;if(R){if(!w)for(w={};Gt=zu.exec(v);)w[Gt[1].toLowerCase()+" "]=(w[Gt[1].toLowerCase()+" "]||[]).concat(Gt[2]);Gt=w[Pt.toLowerCase()+" "]}return Gt==null?null:Gt.join(", ")},getAllResponseHeaders:function(){return R?v:null},setRequestHeader:function(Pt,Gt){return R==null&&(Pt=$e[Pt.toLowerCase()]=$e[Pt.toLowerCase()]||Pt,ie[Pt]=Gt),this},overrideMimeType:function(Pt){return R==null&&(Y.mimeType=Pt),this},statusCode:function(Pt){var Gt;if(Pt)if(R)Ct.always(Pt[Ct.status]);else for(Gt in Pt)de[Gt]=[de[Gt],Pt[Gt]];return this},abort:function(Pt){var Gt=Pt||qe;return m&&m.abort(Gt),On(0,Gt),this}};if(Tt.promise(Ct),Y.url=((l||Y.url||bi.href)+"").replace(Vu,bi.protocol+"//"),Y.type=h.method||h.type||Y.method||Y.type,Y.dataTypes=(Y.dataType||"*").toLowerCase().match(At)||[""],Y.crossDomain==null){F=A.createElement("a");try{F.href=Y.url,F.href=F.href,Y.crossDomain=ar.protocol+"//"+ar.host!=F.protocol+"//"+F.host}catch{Y.crossDomain=!0}}if(Y.data&&Y.processData&&typeof Y.data!="string"&&(Y.data=g.param(Y.data,Y.traditional)),Vo(zo,Y,h,Ct),R)return Ct;V=g.event&&Y.global,V&&g.active++===0&&g.event.trigger("ajaxStart"),Y.type=Y.type.toUpperCase(),Y.hasContent=!Wu.test(Y.type),x=Y.url.replace(Hu,""),Y.hasContent?Y.data&&Y.processData&&(Y.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(Y.data=Y.data.replace(Bu,"+")):(nt=Y.url.slice(x.length),Y.data&&(Y.processData||typeof Y.data=="string")&&(x+=(sr.test(x)?"&":"?")+Y.data,delete Y.data),Y.cache===!1&&(x=x.replace(ju,"$1"),nt=(sr.test(x)?"&":"?")+"_="+No.guid+++nt),Y.url=x+nt),Y.ifModified&&(g.lastModified[x]&&Ct.setRequestHeader("If-Modified-Since",g.lastModified[x]),g.etag[x]&&Ct.setRequestHeader("If-None-Match",g.etag[x])),(Y.data&&Y.hasContent&&Y.contentType!==!1||h.contentType)&&Ct.setRequestHeader("Content-Type",Y.contentType),Ct.setRequestHeader("Accept",Y.dataTypes[0]&&Y.accepts[Y.dataTypes[0]]?Y.accepts[Y.dataTypes[0]]+(Y.dataTypes[0]!=="*"?", "+Uo+"; q=0.01":""):Y.accepts["*"]);for(Q in Y.headers)Ct.setRequestHeader(Q,Y.headers[Q]);if(Y.beforeSend&&(Y.beforeSend.call(rt,Ct,Y)===!1||R))return Ct.abort();if(qe="abort",_t.add(Y.complete),Ct.done(Y.success),Ct.fail(Y.error),m=Vo(or,Y,h,Ct),!m)On(-1,"No Transport");else{if(Ct.readyState=1,V&&mt.trigger("ajaxSend",[Ct,Y]),R)return Ct;Y.async&&Y.timeout>0&&(C=t.setTimeout(function(){Ct.abort("timeout")},Y.timeout));try{R=!1,m.send(ie,On)}catch(Pt){if(R)throw Pt;On(-1,Pt)}}function On(Pt,Gt,xi,ur){var Xe,_i,Ye,mn,bn,Fe=Gt;R||(R=!0,C&&t.clearTimeout(C),m=void 0,v=ur||"",Ct.readyState=Pt>0?4:0,Xe=Pt>=200&&Pt<300||Pt===304,xi&&(mn=$u(Y,Ct,xi)),!Xe&&g.inArray("script",Y.dataTypes)>-1&&g.inArray("json",Y.dataTypes)<0&&(Y.converters["text script"]=function(){}),mn=qu(Y,mn,Ct,Xe),Xe?(Y.ifModified&&(bn=Ct.getResponseHeader("Last-Modified"),bn&&(g.lastModified[x]=bn),bn=Ct.getResponseHeader("etag"),bn&&(g.etag[x]=bn)),Pt===204||Y.type==="HEAD"?Fe="nocontent":Pt===304?Fe="notmodified":(Fe=mn.state,_i=mn.data,Ye=mn.error,Xe=!Ye)):(Ye=Fe,(Pt||!Fe)&&(Fe="error",Pt<0&&(Pt=0))),Ct.status=Pt,Ct.statusText=(Gt||Fe)+"",Xe?Tt.resolveWith(rt,[_i,Fe,Ct]):Tt.rejectWith(rt,[Ct,Fe,Ye]),Ct.statusCode(de),de=void 0,V&&mt.trigger(Xe?"ajaxSuccess":"ajaxError",[Ct,Y,Xe?_i:Ye]),_t.fireWith(rt,[Ct,Fe]),V&&(mt.trigger("ajaxComplete",[Ct,Y]),--g.active||g.event.trigger("ajaxStop")))}return Ct},getJSON:function(l,h,m){return g.get(l,h,m,"json")},getScript:function(l,h){return g.get(l,void 0,h,"script")}}),g.each(["get","post"],function(l,h){g[h]=function(m,x,v,w){return _(x)&&(w=w||v,v=x,x=void 0),g.ajax(g.extend({url:m,type:h,dataType:w,data:x,success:v},g.isPlainObject(m)&&m))}}),g.ajaxPrefilter(function(l){var h;for(h in l.headers)h.toLowerCase()==="content-type"&&(l.contentType=l.headers[h]||"")}),g._evalUrl=function(l,h,m){return g.ajax({url:l,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(x){g.globalEval(x,h,m)}})},g.fn.extend({wrapAll:function(l){var h;return this[0]&&(_(l)&&(l=l.call(this[0])),h=g(l,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&h.insertBefore(this[0]),h.map(function(){for(var m=this;m.firstElementChild;)m=m.firstElementChild;return m}).append(this)),this},wrapInner:function(l){return _(l)?this.each(function(h){g(this).wrapInner(l.call(this,h))}):this.each(function(){var h=g(this),m=h.contents();m.length?m.wrapAll(l):h.append(l)})},wrap:function(l){var h=_(l);return this.each(function(m){g(this).wrapAll(h?l.call(this,m):l)})},unwrap:function(l){return this.parent(l).not("body").each(function(){g(this).replaceWith(this.childNodes)}),this}}),g.expr.pseudos.hidden=function(l){return!g.expr.pseudos.visible(l)},g.expr.pseudos.visible=function(l){return!!(l.offsetWidth||l.offsetHeight||l.getClientRects().length)},g.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var Xu={0:200,1223:204},yi=g.ajaxSettings.xhr();y.cors=!!yi&&"withCredentials"in yi,y.ajax=yi=!!yi,g.ajaxTransport(function(l){var h,m;if(y.cors||yi&&!l.crossDomain)return{send:function(x,v){var w,C=l.xhr();if(C.open(l.type,l.url,l.async,l.username,l.password),l.xhrFields)for(w in l.xhrFields)C[w]=l.xhrFields[w];l.mimeType&&C.overrideMimeType&&C.overrideMimeType(l.mimeType),!l.crossDomain&&!x["X-Requested-With"]&&(x["X-Requested-With"]="XMLHttpRequest");for(w in x)C.setRequestHeader(w,x[w]);h=function(F){return function(){h&&(h=m=C.onload=C.onerror=C.onabort=C.ontimeout=C.onreadystatechange=null,F==="abort"?C.abort():F==="error"?typeof C.status!="number"?v(0,"error"):v(C.status,C.statusText):v(Xu[C.status]||C.status,C.statusText,(C.responseType||"text")!=="text"||typeof C.responseText!="string"?{binary:C.response}:{text:C.responseText},C.getAllResponseHeaders()))}},C.onload=h(),m=C.onerror=C.ontimeout=h("error"),C.onabort!==void 0?C.onabort=m:C.onreadystatechange=function(){C.readyState===4&&t.setTimeout(function(){h&&m()})},h=h("abort");try{C.send(l.hasContent&&l.data||null)}catch(F){if(h)throw F}},abort:function(){h&&h()}}}),g.ajaxPrefilter(function(l){l.crossDomain&&(l.contents.script=!1)}),g.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(l){return g.globalEval(l),l}}}),g.ajaxPrefilter("script",function(l){l.cache===void 0&&(l.cache=!1),l.crossDomain&&(l.type="GET")}),g.ajaxTransport("script",function(l){if(l.crossDomain||l.scriptAttrs){var h,m;return{send:function(x,v){h=g("<script>").attr(l.scriptAttrs||{}).prop({charset:l.scriptCharset,src:l.url}).on("load error",m=function(w){h.remove(),m=null,w&&v(w.type==="error"?404:200,w.type)}),A.head.appendChild(h[0])},abort:function(){m&&m()}}}});var $o=[],cr=/(=)\?(?=&|$)|\?\?/;g.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var l=$o.pop()||g.expando+"_"+No.guid++;return this[l]=!0,l}}),g.ajaxPrefilter("json jsonp",function(l,h,m){var x,v,w,C=l.jsonp!==!1&&(cr.test(l.url)?"url":typeof l.data=="string"&&(l.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&cr.test(l.data)&&"data");if(C||l.dataTypes[0]==="jsonp")return x=l.jsonpCallback=_(l.jsonpCallback)?l.jsonpCallback():l.jsonpCallback,C?l[C]=l[C].replace(cr,"$1"+x):l.jsonp!==!1&&(l.url+=(sr.test(l.url)?"&":"?")+l.jsonp+"="+x),l.converters["script json"]=function(){return w||g.error(x+" was not called"),w[0]},l.dataTypes[0]="json",v=t[x],t[x]=function(){w=arguments},m.always(function(){v===void 0?g(t).removeProp(x):t[x]=v,l[x]&&(l.jsonpCallback=h.jsonpCallback,$o.push(x)),w&&_(v)&&v(w[0]),w=v=void 0}),"script"}),y.createHTMLDocument=(function(){var l=A.implementation.createHTMLDocument("").body;return l.innerHTML="<form></form><form></form>",l.childNodes.length===2})(),g.parseHTML=function(l,h,m){if(typeof l!="string")return[];typeof h=="boolean"&&(m=h,h=!1);var x,v,w;return h||(y.createHTMLDocument?(h=A.implementation.createHTMLDocument(""),x=h.createElement("base"),x.href=A.location.href,h.head.appendChild(x)):h=A),v=st.exec(l),w=!m&&[],v?[h.createElement(v[1])]:(v=vo([l],h,w),w&&w.length&&g(w).remove(),g.merge([],v.childNodes))},g.fn.load=function(l,h,m){var x,v,w,C=this,F=l.indexOf(" ");return F>-1&&(x=En(l.slice(F)),l=l.slice(0,F)),_(h)?(m=h,h=void 0):h&&typeof h=="object"&&(v="POST"),C.length>0&&g.ajax({url:l,type:v||"GET",dataType:"html",data:h}).done(function(R){w=arguments,C.html(x?g("<div>").append(g.parseHTML(R)).find(x):R)}).always(m&&function(R,V){C.each(function(){m.apply(this,w||[R.responseText,V,R])})}),this},g.expr.pseudos.animated=function(l){return g.grep(g.timers,function(h){return l===h.elem}).length},g.offset={setOffset:function(l,h,m){var x,v,w,C,F,R,V,Q=g.css(l,"position"),nt=g(l),Y={};Q==="static"&&(l.style.position="relative"),F=nt.offset(),w=g.css(l,"top"),R=g.css(l,"left"),V=(Q==="absolute"||Q==="fixed")&&(w+R).indexOf("auto")>-1,V?(x=nt.position(),C=x.top,v=x.left):(C=parseFloat(w)||0,v=parseFloat(R)||0),_(h)&&(h=h.call(l,m,g.extend({},F))),h.top!=null&&(Y.top=h.top-F.top+C),h.left!=null&&(Y.left=h.left-F.left+v),"using"in h?h.using.call(l,Y):nt.css(Y)}},g.fn.extend({offset:function(l){if(arguments.length)return l===void 0?this:this.each(function(v){g.offset.setOffset(this,l,v)});var h,m,x=this[0];if(x)return x.getClientRects().length?(h=x.getBoundingClientRect(),m=x.ownerDocument.defaultView,{top:h.top+m.pageYOffset,left:h.left+m.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var l,h,m,x=this[0],v={top:0,left:0};if(g.css(x,"position")==="fixed")h=x.getBoundingClientRect();else{for(h=this.offset(),m=x.ownerDocument,l=x.offsetParent||m.documentElement;l&&(l===m.body||l===m.documentElement)&&g.css(l,"position")==="static";)l=l.parentNode;l&&l!==x&&l.nodeType===1&&(v=g(l).offset(),v.top+=g.css(l,"borderTopWidth",!0),v.left+=g.css(l,"borderLeftWidth",!0))}return{top:h.top-v.top-g.css(x,"marginTop",!0),left:h.left-v.left-g.css(x,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var l=this.offsetParent;l&&g.css(l,"position")==="static";)l=l.offsetParent;return l||le})}}),g.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(l,h){var m=h==="pageYOffset";g.fn[l]=function(x){return Mt(this,function(v,w,C){var F;if(S(v)?F=v:v.nodeType===9&&(F=v.defaultView),C===void 0)return F?F[h]:v[w];F?F.scrollTo(m?F.pageXOffset:C,m?C:F.pageYOffset):v[w]=C},l,x,arguments.length)}}),g.each(["top","left"],function(l,h){g.cssHooks[h]=Mo(y.pixelPosition,function(m,x){if(x)return x=gi(m,h),Js.test(x)?g(m).position()[h]+"px":x})}),g.each({Height:"height",Width:"width"},function(l,h){g.each({padding:"inner"+l,content:h,"":"outer"+l},function(m,x){g.fn[x]=function(v,w){var C=arguments.length&&(m||typeof v!="boolean"),F=m||(v===!0||w===!0?"margin":"border");return Mt(this,function(R,V,Q){var nt;return S(R)?x.indexOf("outer")===0?R["inner"+l]:R.document.documentElement["client"+l]:R.nodeType===9?(nt=R.documentElement,Math.max(R.body["scroll"+l],nt["scroll"+l],R.body["offset"+l],nt["offset"+l],nt["client"+l])):Q===void 0?g.css(R,V,F):g.style(R,V,Q,F)},h,C?v:void 0,C)}})}),g.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(l,h){g.fn[h]=function(m){return this.on(h,m)}}),g.fn.extend({bind:function(l,h,m){return this.on(l,null,h,m)},unbind:function(l,h){return this.off(l,null,h)},delegate:function(l,h,m,x){return this.on(h,l,m,x)},undelegate:function(l,h,m){return arguments.length===1?this.off(l,"**"):this.off(h,l||"**",m)},hover:function(l,h){return this.on("mouseenter",l).on("mouseleave",h||l)}}),g.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(l,h){g.fn[h]=function(m,x){return arguments.length>0?this.on(h,null,m,x):this.trigger(h)}});var Yu=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;g.proxy=function(l,h){var m,x,v;if(typeof h=="string"&&(m=l[h],h=l,l=m),!!_(l))return x=r.call(arguments,2),v=function(){return l.apply(h||this,x.concat(r.call(arguments)))},v.guid=l.guid=l.guid||g.guid++,v},g.holdReady=function(l){l?g.readyWait++:g.ready(!0)},g.isArray=Array.isArray,g.parseJSON=JSON.parse,g.nodeName=k,g.isFunction=_,g.isWindow=S,g.camelCase=Vt,g.type=D,g.now=Date.now,g.isNumeric=function(l){var h=g.type(l);return(h==="number"||h==="string")&&!isNaN(l-parseFloat(l))},g.trim=function(l){return l==null?"":(l+"").replace(Yu,"$1")};var Ku=t.jQuery,Gu=t.$;return g.noConflict=function(l){return t.$===g&&(t.$=Gu),l&&t.jQuery===g&&(t.jQuery=Ku),g},typeof e>"u"&&(t.jQuery=t.$=g),g})})(_s)),_s.exports}var Ih=lc();const Nh=Lh(Ih);function Bh(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ha={exports:{}},da;function Hh(){return da||(da=1,(function(n,t){(function(){var e=document.createElement("canvas");e=!!(e.getContext&&e.getContext("2d"));function i(){return"ontouchstart"in window||"onmsgesturechange"in window}function s(c,f,u){return c+f<u&&(c=u-f),c>0?0:c}function r(c){for(var f=c.split(","),u=atob(f[1]),d=f[0].split(":")[1].split(";")[0],p=new ArrayBuffer(u.length),b=new Uint8Array(p),y=0;y<u.length;y++)b[y]=u.charCodeAt(y);return new Blob([p],{type:d})}var o="cropbox";function a(c){function f(u,d,p){this.width=null,this.height=null,this.img_width=null,this.img_height=null,this.img_left=0,this.img_top=0,this.minPercent=null,this.options=d,this.$image=u,this.$image.hide().prop("draggable",!1).addClass("cropImage").wrap('<div class="cropFrame" />'),this.$frame=this.$image.parent(),this.on_load=p||function(){},this.init()}f.prototype={init:function(){var u=this,d=c("<div/>",{class:"cropControls"}).append(c("<span>"+this.options.label+"</span>")).append(c("<button/>",{class:"cropZoomIn",type:"button"}).on("click",c.proxy(this.zoomIn,this))).append(c("<button/>",{class:"cropZoomOut",type:"button"}).on("click",c.proxy(this.zoomOut,this)));if(this.$frame.append(this.options.controls||d),this.updateOptions(),typeof c.fn.hammer=="function"||typeof Hammer<"u"){var p,b;typeof c.fn.hammer=="function"?p=this.$image.hammer().data("hammer"):p=Hammer(this.$image.get(0)),p.get("pan").set({direction:Hammer.DIRECTION_ALL,threshold:0}),p.get("pinch").set({enable:!0}),p.on("panleft panright panup pandown",function(y){b||(b={startX:u.img_left,startY:u.img_top}),b.dx=y.deltaX,b.dy=y.deltaY,y.preventDefault(),u.drag.call(u,b,!0)}).on("panend pancancel",function(y){y.preventDefault(),b=null,u.update.call(u)}).on("doubletap",function(y){y.preventDefault(),u.zoomIn.call(u)}).on("pinchin",function(y){y.preventDefault(),u.zoomOut.call(u)}).on("pinchout",function(y){y.preventDefault(),u.zoomIn.call(u)})}else this.$image.on("dragstart",function(){return!1}),this.$image.on("mousedown."+o,function(y){var _={startX:u.img_left,startY:u.img_top};y.preventDefault(),c(document).on("mousemove."+o,function(S){_.dx=S.pageX-y.pageX,_.dy=S.pageY-y.pageY,u.drag.call(u,_,!0)}).on("mouseup."+o,function(){u.update.call(u),c(document).off("mouseup."+o),c(document).off("mousemove."+o)})});c.fn.mousewheel&&this.$image.on("mousewheel."+o,function(y){y.preventDefault(),y.deltaY<0?u.zoomIn.call(u):u.zoomOut.call(u)})},updateOptions:function(){var u=this;u.img_top=0,u.img_left=0,u.$image.css({width:"",left:u.img_left,top:u.img_top}),u.$frame.width(u.options.width).height(u.options.height),u.$frame.off("."+o),u.$frame.removeClass("hover"),u.options.showControls==="always"||u.options.showControls==="auto"&&i()?u.$frame.addClass("hover"):u.options.showControls!=="never"&&(u.$frame.on("mouseenter."+o,function(){u.$frame.addClass("hover")}),u.$frame.on("mouseleave."+o,function(){u.$frame.removeClass("hover")}));var d=new Image;d.onload=function(){u.width=d.width,u.height=d.height,d.src="",d.onload=null,u.percent=void 0,u.fit.call(u),u.options.result?u.setCrop.call(u,u.options.result):u.zoom.call(u,u.minPercent),u.$image.fadeIn("fast"),u.on_load.call(u)},d.src=u.$image.attr("src")},remove:function(){var u;typeof c.fn.hammer=="function"?u=this.$image.data("hammer"):typeof Hammer<"u"&&(u=Hammer(this.$image.get(0))),u&&u.off("panleft panright panup pandown panend pancancel doubletap pinchin pinchout"),this.$frame.off("."+o),this.$image.off("."+o),this.$image.css({width:"",left:"",top:""}),this.$image.removeClass("cropImage"),this.$image.removeData(o),this.$image.insertAfter(this.$frame),this.$frame.removeClass("cropFrame"),this.$frame.removeAttr("style"),this.$frame.empty(),this.$frame.remove()},fit:function(){var u=this.options.width/this.width,d=this.options.height/this.height;this.minPercent=u>=d?u:d},setCrop:function(u){this.percent=Math.max(this.options.width/u.cropW,this.options.height/u.cropH),this.img_width=Math.ceil(this.width*this.percent),this.img_height=Math.ceil(this.height*this.percent),this.img_left=-Math.floor(u.cropX*this.percent),this.img_top=-Math.floor(u.cropY*this.percent),this.$image.css({width:this.img_width,left:this.img_left,top:this.img_top}),this.update()},zoom:function(u){var d=this.percent;if(this.percent=Math.max(this.minPercent,Math.min(this.options.maxZoom,u)),this.img_width=Math.ceil(this.width*this.percent),this.img_height=Math.ceil(this.height*this.percent),d){var p=this.percent/d;this.img_left=s((1-p)*this.options.width/2+p*this.img_left,this.img_width,this.options.width),this.img_top=s((1-p)*this.options.height/2+p*this.img_top,this.img_height,this.options.height)}else this.img_left=s((this.options.width-this.img_width)/2,this.img_width,this.options.width),this.img_top=s((this.options.height-this.img_height)/2,this.img_height,this.options.height);this.$image.css({width:this.img_width,left:this.img_left,top:this.img_top}),this.update()},zoomIn:function(){this.zoom(this.percent+(1-this.minPercent)/(this.options.zoom-1||1))},zoomOut:function(){this.zoom(this.percent-(1-this.minPercent)/(this.options.zoom-1||1))},drag:function(u,d){this.img_left=s(u.startX+u.dx,this.img_width,this.options.width),this.img_top=s(u.startY+u.dy,this.img_height,this.options.height),this.$image.css({left:this.img_left,top:this.img_top}),d||this.update()},update:function(){this.result={cropX:-Math.ceil(this.img_left/this.percent),cropY:-Math.ceil(this.img_top/this.percent),cropW:Math.floor(this.options.width/this.percent),cropH:Math.floor(this.options.height/this.percent),stretch:this.minPercent>1},this.$image.trigger(o,[this.result,this])},getDataURL:function(){if(!e)return!1;var u=document.createElement("canvas"),d=u.getContext("2d");return u.width=this.options.width,u.height=this.options.height,d.drawImage(this.$image.get(0),this.result.cropX,this.result.cropY,this.result.cropW,this.result.cropH,0,0,this.options.width,this.options.height),u.toDataURL()},getBlob:function(){return r(this.getDataURL())}},c.fn[o]=function(u,d){return this.each(function(){var p=c(this),b=p.data(o);if(b)u&&(c.extend(b.options,u),b.updateOptions());else{var y=c.extend({},c.fn[o].defaultOptions,u);p.data(o,new f(p,y,d))}})},c.fn[o].defaultOptions={width:200,height:200,zoom:10,maxZoom:1,controls:null,showControls:"auto",label:"Drag to crop"}}a(typeof Bh=="function"?lc():window.jQuery||window.Zepto)})()})()),ha.exports}Hh();function jh(n,t){return t.forEach((function(e){e&&typeof e!="string"&&!Array.isArray(e)&&Object.keys(e).forEach((function(i){if(i!=="default"&&!(i in n)){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}}))})),Object.freeze(n)}function cc(n,t){return new Promise((function(e,i){let s;return zh(n).then((function(r){try{return s=r,e(new Blob([t.slice(0,2),s,t.slice(2)],{type:"image/jpeg"}))}catch(o){return i(o)}}),i)}))}const zh=n=>new Promise(((t,e)=>{const i=new FileReader;i.addEventListener("load",(({target:{result:s}})=>{const r=new DataView(s);let o=0;if(r.getUint16(o)!==65496)return e("not a valid JPEG");for(o+=2;;){const a=r.getUint16(o);if(a===65498)break;const c=r.getUint16(o+2);if(a===65505&&r.getUint32(o+4)===1165519206){const f=o+10;let u;switch(r.getUint16(f)){case 18761:u=!0;break;case 19789:u=!1;break;default:return e("TIFF header contains invalid endian")}if(r.getUint16(f+2,u)!==42)return e("TIFF header contains invalid version");const d=r.getUint32(f+4,u),p=f+d+2+12*r.getUint16(f+d,u);for(let b=f+d+2;b<p;b+=12)if(r.getUint16(b,u)==274){if(r.getUint16(b+2,u)!==3)return e("Orientation data type is invalid");if(r.getUint32(b+4,u)!==1)return e("Orientation data count is invalid");r.setUint16(b+8,1,u);break}return t(s.slice(o,o+2+c))}o+=2+c}return t(new Blob)})),i.readAsArrayBuffer(n)}));var Cs={},Uh={get exports(){return Cs},set exports(n){Cs=n}};(function(n){var t,e,i={};Uh.exports=i,i.parse=function(s,r){for(var o=i.bin.readUshort,a=i.bin.readUint,c=0,f={},u=new Uint8Array(s),d=u.length-4;a(u,d)!=101010256;)d--;c=d,c+=4;var p=o(u,c+=4);o(u,c+=2);var b=a(u,c+=2),y=a(u,c+=4);c+=4,c=y;for(var _=0;_<p;_++){a(u,c),c+=4,c+=4,c+=4,a(u,c+=4),b=a(u,c+=4);var S=a(u,c+=4),A=o(u,c+=4),L=o(u,c+2),I=o(u,c+4);c+=6;var D=a(u,c+=8);c+=4,c+=A+L+I,i._readLocal(u,D,f,b,S,r)}return f},i._readLocal=function(s,r,o,a,c,f){var u=i.bin.readUshort,d=i.bin.readUint;d(s,r),u(s,r+=4),u(s,r+=2);var p=u(s,r+=2);d(s,r+=2),d(s,r+=4),r+=4;var b=u(s,r+=8),y=u(s,r+=2);r+=2;var _=i.bin.readUTF8(s,r,b);if(r+=b,r+=y,f)o[_]={size:c,csize:a};else{var S=new Uint8Array(s.buffer,r);if(p==0)o[_]=new Uint8Array(S.buffer.slice(r,r+a));else{if(p!=8)throw"unknown compression method: "+p;var A=new Uint8Array(c);i.inflateRaw(S,A),o[_]=A}}},i.inflateRaw=function(s,r){return i.F.inflate(s,r)},i.inflate=function(s,r){return s[0],s[1],i.inflateRaw(new Uint8Array(s.buffer,s.byteOffset+2,s.length-6),r)},i.deflate=function(s,r){r==null&&(r={level:6});var o=0,a=new Uint8Array(50+Math.floor(1.1*s.length));a[o]=120,a[o+1]=156,o+=2,o=i.F.deflateRaw(s,a,o,r.level);var c=i.adler(s,0,s.length);return a[o+0]=c>>>24&255,a[o+1]=c>>>16&255,a[o+2]=c>>>8&255,a[o+3]=c>>>0&255,new Uint8Array(a.buffer,0,o+4)},i.deflateRaw=function(s,r){r==null&&(r={level:6});var o=new Uint8Array(50+Math.floor(1.1*s.length)),a=i.F.deflateRaw(s,o,a,r.level);return new Uint8Array(o.buffer,0,a)},i.encode=function(s,r){r==null&&(r=!1);var o=0,a=i.bin.writeUint,c=i.bin.writeUshort,f={};for(var u in s){var d=!i._noNeed(u)&&!r,p=s[u],b=i.crc.crc(p,0,p.length);f[u]={cpr:d,usize:p.length,crc:b,file:d?i.deflateRaw(p):p}}for(var u in f)o+=f[u].file.length+30+46+2*i.bin.sizeUTF8(u);o+=22;var y=new Uint8Array(o),_=0,S=[];for(var u in f){var A=f[u];S.push(_),_=i._writeHeader(y,_,u,A,0)}var L=0,I=_;for(var u in f)A=f[u],S.push(_),_=i._writeHeader(y,_,u,A,1,S[L++]);var D=_-I;return a(y,_,101010256),_+=4,c(y,_+=4,L),c(y,_+=2,L),a(y,_+=2,D),a(y,_+=4,I),_+=4,_+=2,y.buffer},i._noNeed=function(s){var r=s.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(r)!=-1},i._writeHeader=function(s,r,o,a,c,f){var u=i.bin.writeUint,d=i.bin.writeUshort,p=a.file;return u(s,r,c==0?67324752:33639248),r+=4,c==1&&(r+=2),d(s,r,20),d(s,r+=2,0),d(s,r+=2,a.cpr?8:0),u(s,r+=2,0),u(s,r+=4,a.crc),u(s,r+=4,p.length),u(s,r+=4,a.usize),d(s,r+=4,i.bin.sizeUTF8(o)),d(s,r+=2,0),r+=2,c==1&&(r+=2,r+=2,u(s,r+=6,f),r+=4),r+=i.bin.writeUTF8(s,r,o),c==0&&(s.set(p,r),r+=p.length),r},i.crc={table:(function(){for(var s=new Uint32Array(256),r=0;r<256;r++){for(var o=r,a=0;a<8;a++)1&o?o=3988292384^o>>>1:o>>>=1;s[r]=o}return s})(),update:function(s,r,o,a){for(var c=0;c<a;c++)s=i.crc.table[255&(s^r[o+c])]^s>>>8;return s},crc:function(s,r,o){return 4294967295^i.crc.update(4294967295,s,r,o)}},i.adler=function(s,r,o){for(var a=1,c=0,f=r,u=r+o;f<u;){for(var d=Math.min(f+5552,u);f<d;)c+=a+=s[f++];a%=65521,c%=65521}return c<<16|a},i.bin={readUshort:function(s,r){return s[r]|s[r+1]<<8},writeUshort:function(s,r,o){s[r]=255&o,s[r+1]=o>>8&255},readUint:function(s,r){return 16777216*s[r+3]+(s[r+2]<<16|s[r+1]<<8|s[r])},writeUint:function(s,r,o){s[r]=255&o,s[r+1]=o>>8&255,s[r+2]=o>>16&255,s[r+3]=o>>24&255},readASCII:function(s,r,o){for(var a="",c=0;c<o;c++)a+=String.fromCharCode(s[r+c]);return a},writeASCII:function(s,r,o){for(var a=0;a<o.length;a++)s[r+a]=o.charCodeAt(a)},pad:function(s){return s.length<2?"0"+s:s},readUTF8:function(s,r,o){for(var a,c="",f=0;f<o;f++)c+="%"+i.bin.pad(s[r+f].toString(16));try{a=decodeURIComponent(c)}catch{return i.bin.readASCII(s,r,o)}return a},writeUTF8:function(s,r,o){for(var a=o.length,c=0,f=0;f<a;f++){var u=o.charCodeAt(f);if((4294967168&u)==0)s[r+c]=u,c++;else if((4294965248&u)==0)s[r+c]=192|u>>6,s[r+c+1]=128|u>>0&63,c+=2;else if((4294901760&u)==0)s[r+c]=224|u>>12,s[r+c+1]=128|u>>6&63,s[r+c+2]=128|u>>0&63,c+=3;else{if((4292870144&u)!=0)throw"e";s[r+c]=240|u>>18,s[r+c+1]=128|u>>12&63,s[r+c+2]=128|u>>6&63,s[r+c+3]=128|u>>0&63,c+=4}}return c},sizeUTF8:function(s){for(var r=s.length,o=0,a=0;a<r;a++){var c=s.charCodeAt(a);if((4294967168&c)==0)o++;else if((4294965248&c)==0)o+=2;else if((4294901760&c)==0)o+=3;else{if((4292870144&c)!=0)throw"e";o+=4}}return o}},i.F={},i.F.deflateRaw=function(s,r,o,a){var c=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][a],f=i.F.U,u=i.F._goodIndex;i.F._hash;var d=i.F._putsE,p=0,b=o<<3,y=0,_=s.length;if(a==0){for(;p<_;)d(r,b,p+(H=Math.min(65535,_-p))==_?1:0),b=i.F._copyExact(s,p,H,r,b+8),p+=H;return b>>>3}var S=f.lits,A=f.strt,L=f.prev,I=0,D=0,N=0,P=0,g=0,M=0;for(_>2&&(A[M=i.F._hash(s,0)]=0),p=0;p<_;p++){if(g=M,p+1<_-2){M=i.F._hash(s,p+1);var k=p+1&32767;L[k]=A[M],A[M]=k}if(y<=p){(I>14e3||D>26697)&&_-p>100&&(y<p&&(S[I]=p-y,I+=2,y=p),b=i.F._writeBlock(p==_-1||y==_?1:0,S,I,P,s,N,p-N,r,b),I=D=P=0,N=p);var B=0;p<_-2&&(B=i.F._bestMatch(s,p,L,g,Math.min(c[2],_-p),c[3]));var H=B>>>16,j=65535&B;if(B!=0){j=65535&B;var U=u(H=B>>>16,f.of0);f.lhst[257+U]++;var z=u(j,f.df0);f.dhst[z]++,P+=f.exb[U]+f.dxb[z],S[I]=H<<23|p-y,S[I+1]=j<<16|U<<8|z,I+=2,y=p+H}else f.lhst[s[p]]++;D++}}for(N==p&&s.length!=0||(y<p&&(S[I]=p-y,I+=2,y=p),b=i.F._writeBlock(1,S,I,P,s,N,p-N,r,b),I=0,D=0,I=D=P=0,N=p);(7&b)!=0;)b++;return b>>>3},i.F._bestMatch=function(s,r,o,a,c,f){var u=32767&r,d=o[u],p=u-d+32768&32767;if(d==u||a!=i.F._hash(s,r-p))return 0;for(var b=0,y=0,_=Math.min(32767,r);p<=_&&--f!=0&&d!=u;){if(b==0||s[r+b]==s[r+b-p]){var S=i.F._howLong(s,r,p);if(S>b){if(y=p,(b=S)>=c)break;p+2<S&&(S=p+2);for(var A=0,L=0;L<S-2;L++){var I=r-p+L+32768&32767,D=I-o[I]+32768&32767;D>A&&(A=D,d=I)}}}p+=(u=d)-(d=o[u])+32768&32767}return b<<16|y},i.F._howLong=function(s,r,o){if(s[r]!=s[r-o]||s[r+1]!=s[r+1-o]||s[r+2]!=s[r+2-o])return 0;var a=r,c=Math.min(s.length,r+258);for(r+=3;r<c&&s[r]==s[r-o];)r++;return r-a},i.F._hash=function(s,r){return(s[r]<<8|s[r+1])+(s[r+2]<<4)&65535},i.saved=0,i.F._writeBlock=function(s,r,o,a,c,f,u,d,p){var b,y,_,S,A,L,I,D,N,P=i.F.U,g=i.F._putsF,M=i.F._putsE;P.lhst[256]++,y=(b=i.F.getTrees())[0],_=b[1],S=b[2],A=b[3],L=b[4],I=b[5],D=b[6],N=b[7];var k=32+((p+3&7)==0?0:8-(p+3&7))+(u<<3),B=a+i.F.contSize(P.fltree,P.lhst)+i.F.contSize(P.fdtree,P.dhst),H=a+i.F.contSize(P.ltree,P.lhst)+i.F.contSize(P.dtree,P.dhst);H+=14+3*I+i.F.contSize(P.itree,P.ihst)+(2*P.ihst[16]+3*P.ihst[17]+7*P.ihst[18]);for(var j=0;j<286;j++)P.lhst[j]=0;for(j=0;j<30;j++)P.dhst[j]=0;for(j=0;j<19;j++)P.ihst[j]=0;var U=k<B&&k<H?0:B<H?1:2;if(g(d,p,s),g(d,p+1,U),p+=3,U==0){for(;(7&p)!=0;)p++;p=i.F._copyExact(c,f,u,d,p)}else{var z,$;if(U==1&&(z=P.fltree,$=P.fdtree),U==2){i.F.makeCodes(P.ltree,y),i.F.revCodes(P.ltree,y),i.F.makeCodes(P.dtree,_),i.F.revCodes(P.dtree,_),i.F.makeCodes(P.itree,S),i.F.revCodes(P.itree,S),z=P.ltree,$=P.dtree,M(d,p,A-257),M(d,p+=5,L-1),M(d,p+=5,I-4),p+=4;for(var E=0;E<I;E++)M(d,p+3*E,P.itree[1+(P.ordr[E]<<1)]);p+=3*I,p=i.F._codeTiny(D,P.itree,d,p),p=i.F._codeTiny(N,P.itree,d,p)}for(var T=f,tt=0;tt<o;tt+=2){for(var q=r[tt],Z=q>>>23,lt=T+(8388607&q);T<lt;)p=i.F._writeLit(c[T++],z,d,p);if(Z!=0){var st=r[tt+1],at=st>>16,it=st>>8&255,J=255&st;M(d,p=i.F._writeLit(257+it,z,d,p),Z-P.of0[it]),p+=P.exb[it],g(d,p=i.F._writeLit(J,$,d,p),at-P.df0[J]),p+=P.dxb[J],T+=Z}}p=i.F._writeLit(256,z,d,p)}return p},i.F._copyExact=function(s,r,o,a,c){var f=c>>>3;return a[f]=o,a[f+1]=o>>>8,a[f+2]=255-a[f],a[f+3]=255-a[f+1],f+=4,a.set(new Uint8Array(s.buffer,r,o),f),c+(o+4<<3)},i.F.getTrees=function(){for(var s=i.F.U,r=i.F._hufTree(s.lhst,s.ltree,15),o=i.F._hufTree(s.dhst,s.dtree,15),a=[],c=i.F._lenCodes(s.ltree,a),f=[],u=i.F._lenCodes(s.dtree,f),d=0;d<a.length;d+=2)s.ihst[a[d]]++;for(d=0;d<f.length;d+=2)s.ihst[f[d]]++;for(var p=i.F._hufTree(s.ihst,s.itree,7),b=19;b>4&&s.itree[1+(s.ordr[b-1]<<1)]==0;)b--;return[r,o,p,c,u,b,a,f]},i.F.getSecond=function(s){for(var r=[],o=0;o<s.length;o+=2)r.push(s[o+1]);return r},i.F.nonZero=function(s){for(var r="",o=0;o<s.length;o+=2)s[o+1]!=0&&(r+=(o>>1)+",");return r},i.F.contSize=function(s,r){for(var o=0,a=0;a<r.length;a++)o+=r[a]*s[1+(a<<1)];return o},i.F._codeTiny=function(s,r,o,a){for(var c=0;c<s.length;c+=2){var f=s[c],u=s[c+1];a=i.F._writeLit(f,r,o,a);var d=f==16?2:f==17?3:7;f>15&&(i.F._putsE(o,a,u,d),a+=d)}return a},i.F._lenCodes=function(s,r){for(var o=s.length;o!=2&&s[o-1]==0;)o-=2;for(var a=0;a<o;a+=2){var c=s[a+1],f=a+3<o?s[a+3]:-1,u=a+5<o?s[a+5]:-1,d=a==0?-1:s[a-1];if(c==0&&f==c&&u==c){for(var p=a+5;p+2<o&&s[p+2]==c;)p+=2;(b=Math.min(p+1-a>>>1,138))<11?r.push(17,b-3):r.push(18,b-11),a+=2*b-2}else if(c==d&&f==c&&u==c){for(p=a+5;p+2<o&&s[p+2]==c;)p+=2;var b=Math.min(p+1-a>>>1,6);r.push(16,b-3),a+=2*b-2}else r.push(c,0)}return o>>>1},i.F._hufTree=function(s,r,o){var a=[],c=s.length,f=r.length,u=0;for(u=0;u<f;u+=2)r[u]=0,r[u+1]=0;for(u=0;u<c;u++)s[u]!=0&&a.push({lit:u,f:s[u]});var d=a.length,p=a.slice(0);if(d==0)return 0;if(d==1){var b=a[0].lit;return p=b==0?1:0,r[1+(b<<1)]=1,r[1+(p<<1)]=1,1}a.sort((function(D,N){return D.f-N.f}));var y=a[0],_=a[1],S=0,A=1,L=2;for(a[0]={lit:-1,f:y.f+_.f,l:y,r:_,d:0};A!=d-1;)y=S!=A&&(L==d||a[S].f<a[L].f)?a[S++]:a[L++],_=S!=A&&(L==d||a[S].f<a[L].f)?a[S++]:a[L++],a[A++]={lit:-1,f:y.f+_.f,l:y,r:_};var I=i.F.setDepth(a[A-1],0);for(I>o&&(i.F.restrictDepth(p,o,I),I=o),u=0;u<d;u++)r[1+(p[u].lit<<1)]=p[u].d;return I},i.F.setDepth=function(s,r){return s.lit!=-1?(s.d=r,r):Math.max(i.F.setDepth(s.l,r+1),i.F.setDepth(s.r,r+1))},i.F.restrictDepth=function(s,r,o){var a=0,c=1<<o-r,f=0;for(s.sort((function(d,p){return p.d==d.d?d.f-p.f:p.d-d.d})),a=0;a<s.length&&s[a].d>r;a++){var u=s[a].d;s[a].d=r,f+=c-(1<<o-u)}for(f>>>=o-r;f>0;)(u=s[a].d)<r?(s[a].d++,f-=1<<r-u-1):a++;for(;a>=0;a--)s[a].d==r&&f<0&&(s[a].d--,f++);f!=0&&console.log("debt left")},i.F._goodIndex=function(s,r){var o=0;return r[16|o]<=s&&(o|=16),r[8|o]<=s&&(o|=8),r[4|o]<=s&&(o|=4),r[2|o]<=s&&(o|=2),r[1|o]<=s&&(o|=1),o},i.F._writeLit=function(s,r,o,a){return i.F._putsF(o,a,r[s<<1]),a+r[1+(s<<1)]},i.F.inflate=function(s,r){var o=Uint8Array;if(s[0]==3&&s[1]==0)return r||new o(0);var a=i.F,c=a._bitsF,f=a._bitsE,u=a._decodeTiny,d=a.makeCodes,p=a.codes2map,b=a._get17,y=a.U,_=r==null;_&&(r=new o(s.length>>>2<<3));for(var S,A,L=0,I=0,D=0,N=0,P=0,g=0,M=0,k=0,B=0;L==0;)if(L=c(s,B,1),I=c(s,B+1,2),B+=3,I!=0){if(_&&(r=i.F._check(r,k+(1<<17))),I==1&&(S=y.flmap,A=y.fdmap,g=511,M=31),I==2){D=f(s,B,5)+257,N=f(s,B+5,5)+1,P=f(s,B+10,4)+4,B+=14;for(var H=0;H<38;H+=2)y.itree[H]=0,y.itree[H+1]=0;var j=1;for(H=0;H<P;H++){var U=f(s,B+3*H,3);y.itree[1+(y.ordr[H]<<1)]=U,U>j&&(j=U)}B+=3*P,d(y.itree,j),p(y.itree,j,y.imap),S=y.lmap,A=y.dmap,B=u(y.imap,(1<<j)-1,D+N,s,B,y.ttree);var z=a._copyOut(y.ttree,0,D,y.ltree);g=(1<<z)-1;var $=a._copyOut(y.ttree,D,N,y.dtree);M=(1<<$)-1,d(y.ltree,z),p(y.ltree,z,S),d(y.dtree,$),p(y.dtree,$,A)}for(;;){var E=S[b(s,B)&g];B+=15&E;var T=E>>>4;if(!(T>>>8))r[k++]=T;else{if(T==256)break;var tt=k+T-254;if(T>264){var q=y.ldef[T-257];tt=k+(q>>>3)+f(s,B,7&q),B+=7&q}var Z=A[b(s,B)&M];B+=15&Z;var lt=Z>>>4,st=y.ddef[lt],at=(st>>>4)+c(s,B,15&st);for(B+=15&st,_&&(r=i.F._check(r,k+(1<<17)));k<tt;)r[k]=r[k++-at],r[k]=r[k++-at],r[k]=r[k++-at],r[k]=r[k++-at];k=tt}}}else{(7&B)!=0&&(B+=8-(7&B));var it=4+(B>>>3),J=s[it-4]|s[it-3]<<8;_&&(r=i.F._check(r,k+J)),r.set(new o(s.buffer,s.byteOffset+it,J),k),B=it+J<<3,k+=J}return r.length==k?r:r.slice(0,k)},i.F._check=function(s,r){var o=s.length;if(r<=o)return s;var a=new Uint8Array(Math.max(o<<1,r));return a.set(s,0),a},i.F._decodeTiny=function(s,r,o,a,c,f){for(var u=i.F._bitsE,d=i.F._get17,p=0;p<o;){var b=s[d(a,c)&r];c+=15&b;var y=b>>>4;if(y<=15)f[p]=y,p++;else{var _=0,S=0;y==16?(S=3+u(a,c,2),c+=2,_=f[p-1]):y==17?(S=3+u(a,c,3),c+=3):y==18&&(S=11+u(a,c,7),c+=7);for(var A=p+S;p<A;)f[p]=_,p++}}return c},i.F._copyOut=function(s,r,o,a){for(var c=0,f=0,u=a.length>>>1;f<o;){var d=s[f+r];a[f<<1]=0,a[1+(f<<1)]=d,d>c&&(c=d),f++}for(;f<u;)a[f<<1]=0,a[1+(f<<1)]=0,f++;return c},i.F.makeCodes=function(s,r){for(var o,a,c,f,u=i.F.U,d=s.length,p=u.bl_count,b=0;b<=r;b++)p[b]=0;for(b=1;b<d;b+=2)p[s[b]]++;var y=u.next_code;for(o=0,p[0]=0,a=1;a<=r;a++)o=o+p[a-1]<<1,y[a]=o;for(c=0;c<d;c+=2)(f=s[c+1])!=0&&(s[c]=y[f],y[f]++)},i.F.codes2map=function(s,r,o){for(var a=s.length,c=i.F.U.rev15,f=0;f<a;f+=2)if(s[f+1]!=0)for(var u=f>>1,d=s[f+1],p=u<<4|d,b=r-d,y=s[f]<<b,_=y+(1<<b);y!=_;)o[c[y]>>>15-r]=p,y++},i.F.revCodes=function(s,r){for(var o=i.F.U.rev15,a=15-r,c=0;c<s.length;c+=2){var f=s[c]<<r-s[c+1];s[c]=o[f]>>>a}},i.F._putsE=function(s,r,o){o<<=7&r;var a=r>>>3;s[a]|=o,s[a+1]|=o>>>8},i.F._putsF=function(s,r,o){o<<=7&r;var a=r>>>3;s[a]|=o,s[a+1]|=o>>>8,s[a+2]|=o>>>16},i.F._bitsE=function(s,r,o){return(s[r>>>3]|s[1+(r>>>3)]<<8)>>>(7&r)&(1<<o)-1},i.F._bitsF=function(s,r,o){return(s[r>>>3]|s[1+(r>>>3)]<<8|s[2+(r>>>3)]<<16)>>>(7&r)&(1<<o)-1},i.F._get17=function(s,r){return(s[r>>>3]|s[1+(r>>>3)]<<8|s[2+(r>>>3)]<<16)>>>(7&r)},i.F._get25=function(s,r){return(s[r>>>3]|s[1+(r>>>3)]<<8|s[2+(r>>>3)]<<16|s[3+(r>>>3)]<<24)>>>(7&r)},i.F.U=(t=Uint16Array,e=Uint32Array,{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new e(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new e(286),dhst:new e(30),ihst:new e(19),lits:new e(15e3),strt:new t(65536),prev:new t(32768)}),(function(){for(var s=i.F.U,r=0;r<32768;r++){var o=r;o=(4278255360&(o=(4042322160&(o=(3435973836&(o=(2863311530&o)>>>1|(1431655765&o)<<1))>>>2|(858993459&o)<<2))>>>4|(252645135&o)<<4))>>>8|(16711935&o)<<8,s.rev15[r]=(o>>>16|o<<16)>>>17}function a(c,f,u){for(;f--!=0;)c.push(0,u)}for(r=0;r<32;r++)s.ldef[r]=s.of0[r]<<3|s.exb[r],s.ddef[r]=s.df0[r]<<4|s.dxb[r];a(s.fltree,144,8),a(s.fltree,112,9),a(s.fltree,24,7),a(s.fltree,8,8),i.F.makeCodes(s.fltree,9),i.F.codes2map(s.fltree,9,s.flmap),i.F.revCodes(s.fltree,9),a(s.fdtree,32,5),i.F.makeCodes(s.fdtree,5),i.F.codes2map(s.fdtree,5,s.fdmap),i.F.revCodes(s.fdtree,5),a(s.itree,19,0),a(s.ltree,286,0),a(s.dtree,30,0),a(s.ttree,320,0)})()})();var Wh=jh({__proto__:null,default:Cs},[Cs]);const Ue=(function(){var n={nextZero(u,d){for(;u[d]!=0;)d++;return d},readUshort:(u,d)=>u[d]<<8|u[d+1],writeUshort(u,d,p){u[d]=p>>8&255,u[d+1]=255&p},readUint:(u,d)=>16777216*u[d]+(u[d+1]<<16|u[d+2]<<8|u[d+3]),writeUint(u,d,p){u[d]=p>>24&255,u[d+1]=p>>16&255,u[d+2]=p>>8&255,u[d+3]=255&p},readASCII(u,d,p){let b="";for(let y=0;y<p;y++)b+=String.fromCharCode(u[d+y]);return b},writeASCII(u,d,p){for(let b=0;b<p.length;b++)u[d+b]=p.charCodeAt(b)},readBytes(u,d,p){const b=[];for(let y=0;y<p;y++)b.push(u[d+y]);return b},pad:u=>u.length<2?`0${u}`:u,readUTF8(u,d,p){let b,y="";for(let _=0;_<p;_++)y+=`%${n.pad(u[d+_].toString(16))}`;try{b=decodeURIComponent(y)}catch{return n.readASCII(u,d,p)}return b}};function t(u,d,p,b){const y=d*p,_=r(b),S=Math.ceil(d*_/8),A=new Uint8Array(4*y),L=new Uint32Array(A.buffer),{ctype:I}=b,{depth:D}=b,N=n.readUshort;if(I==6){const q=y<<2;if(D==8)for(var P=0;P<q;P+=4)A[P]=u[P],A[P+1]=u[P+1],A[P+2]=u[P+2],A[P+3]=u[P+3];if(D==16)for(P=0;P<q;P++)A[P]=u[P<<1]}else if(I==2){const q=b.tabs.tRNS;if(q==null){if(D==8)for(P=0;P<y;P++){var g=3*P;L[P]=255<<24|u[g+2]<<16|u[g+1]<<8|u[g]}if(D==16)for(P=0;P<y;P++)g=6*P,L[P]=255<<24|u[g+4]<<16|u[g+2]<<8|u[g]}else{var M=q[0];const Z=q[1],lt=q[2];if(D==8)for(P=0;P<y;P++){var k=P<<2;g=3*P,L[P]=255<<24|u[g+2]<<16|u[g+1]<<8|u[g],u[g]==M&&u[g+1]==Z&&u[g+2]==lt&&(A[k+3]=0)}if(D==16)for(P=0;P<y;P++)k=P<<2,g=6*P,L[P]=255<<24|u[g+4]<<16|u[g+2]<<8|u[g],N(u,g)==M&&N(u,g+2)==Z&&N(u,g+4)==lt&&(A[k+3]=0)}}else if(I==3){const q=b.tabs.PLTE,Z=b.tabs.tRNS,lt=Z?Z.length:0;if(D==1)for(var B=0;B<p;B++){var H=B*S,j=B*d;for(P=0;P<d;P++){k=j+P<<2;var U=3*(z=u[H+(P>>3)]>>7-((7&P)<<0)&1);A[k]=q[U],A[k+1]=q[U+1],A[k+2]=q[U+2],A[k+3]=z<lt?Z[z]:255}}if(D==2)for(B=0;B<p;B++)for(H=B*S,j=B*d,P=0;P<d;P++)k=j+P<<2,U=3*(z=u[H+(P>>2)]>>6-((3&P)<<1)&3),A[k]=q[U],A[k+1]=q[U+1],A[k+2]=q[U+2],A[k+3]=z<lt?Z[z]:255;if(D==4)for(B=0;B<p;B++)for(H=B*S,j=B*d,P=0;P<d;P++)k=j+P<<2,U=3*(z=u[H+(P>>1)]>>4-((1&P)<<2)&15),A[k]=q[U],A[k+1]=q[U+1],A[k+2]=q[U+2],A[k+3]=z<lt?Z[z]:255;if(D==8)for(P=0;P<y;P++){var z;k=P<<2,U=3*(z=u[P]),A[k]=q[U],A[k+1]=q[U+1],A[k+2]=q[U+2],A[k+3]=z<lt?Z[z]:255}}else if(I==4){if(D==8)for(P=0;P<y;P++){k=P<<2;var $=u[E=P<<1];A[k]=$,A[k+1]=$,A[k+2]=$,A[k+3]=u[E+1]}if(D==16)for(P=0;P<y;P++){var E;k=P<<2,$=u[E=P<<2],A[k]=$,A[k+1]=$,A[k+2]=$,A[k+3]=u[E+2]}}else if(I==0)for(M=b.tabs.tRNS?b.tabs.tRNS:-1,B=0;B<p;B++){const q=B*S,Z=B*d;if(D==1)for(var T=0;T<d;T++){var tt=($=255*(u[q+(T>>>3)]>>>7-(7&T)&1))==255*M?0:255;L[Z+T]=tt<<24|$<<16|$<<8|$}else if(D==2)for(T=0;T<d;T++)tt=($=85*(u[q+(T>>>2)]>>>6-((3&T)<<1)&3))==85*M?0:255,L[Z+T]=tt<<24|$<<16|$<<8|$;else if(D==4)for(T=0;T<d;T++)tt=($=17*(u[q+(T>>>1)]>>>4-((1&T)<<2)&15))==17*M?0:255,L[Z+T]=tt<<24|$<<16|$<<8|$;else if(D==8)for(T=0;T<d;T++)tt=($=u[q+T])==M?0:255,L[Z+T]=tt<<24|$<<16|$<<8|$;else if(D==16)for(T=0;T<d;T++)$=u[q+(T<<1)],tt=N(u,q+(T<<1))==M?0:255,L[Z+T]=tt<<24|$<<16|$<<8|$}return A}function e(u,d,p,b){const y=r(u),_=Math.ceil(p*y/8),S=new Uint8Array((_+1+u.interlace)*b);return d=u.tabs.CgBI?s(d,S):i(d,S),u.interlace==0?d=o(d,u,0,p,b):u.interlace==1&&(d=(function(L,I){const D=I.width,N=I.height,P=r(I),g=P>>3,M=Math.ceil(D*P/8),k=new Uint8Array(N*M);let B=0;const H=[0,0,4,0,2,0,1],j=[0,4,0,2,0,1,0],U=[8,8,8,4,4,2,2],z=[8,8,4,4,2,2,1];let $=0;for(;$<7;){const T=U[$],tt=z[$];let q=0,Z=0,lt=H[$];for(;lt<N;)lt+=T,Z++;let st=j[$];for(;st<D;)st+=tt,q++;const at=Math.ceil(q*P/8);o(L,I,B,q,Z);let it=0,J=H[$];for(;J<N;){let dt=j[$],Nt=B+it*at<<3;for(;dt<D;){var E;if(P==1&&(E=(E=L[Nt>>3])>>7-(7&Nt)&1,k[J*M+(dt>>3)]|=E<<7-((7&dt)<<0)),P==2&&(E=(E=L[Nt>>3])>>6-(7&Nt)&3,k[J*M+(dt>>2)]|=E<<6-((3&dt)<<1)),P==4&&(E=(E=L[Nt>>3])>>4-(7&Nt)&15,k[J*M+(dt>>1)]|=E<<4-((1&dt)<<2)),P>=8){const Rt=J*M+dt*g;for(let Et=0;Et<g;Et++)k[Rt+Et]=L[(Nt>>3)+Et]}Nt+=P,dt+=tt}it++,J+=T}q*Z!=0&&(B+=Z*(1+at)),$+=1}return k})(d,u)),d}function i(u,d){return s(new Uint8Array(u.buffer,2,u.length-6),d)}var s=(function(){const u={H:{}};return u.H.N=function(d,p){const b=Uint8Array;let y,_,S=0,A=0,L=0,I=0,D=0,N=0,P=0,g=0,M=0;if(d[0]==3&&d[1]==0)return p||new b(0);const k=u.H,B=k.b,H=k.e,j=k.R,U=k.n,z=k.A,$=k.Z,E=k.m,T=p==null;for(T&&(p=new b(d.length>>>2<<5));S==0;)if(S=B(d,M,1),A=B(d,M+1,2),M+=3,A!=0){if(T&&(p=u.H.W(p,g+(1<<17))),A==1&&(y=E.J,_=E.h,N=511,P=31),A==2){L=H(d,M,5)+257,I=H(d,M+5,5)+1,D=H(d,M+10,4)+4,M+=14;let q=1;for(var tt=0;tt<38;tt+=2)E.Q[tt]=0,E.Q[tt+1]=0;for(tt=0;tt<D;tt++){const st=H(d,M+3*tt,3);E.Q[1+(E.X[tt]<<1)]=st,st>q&&(q=st)}M+=3*D,U(E.Q,q),z(E.Q,q,E.u),y=E.w,_=E.d,M=j(E.u,(1<<q)-1,L+I,d,M,E.v);const Z=k.V(E.v,0,L,E.C);N=(1<<Z)-1;const lt=k.V(E.v,L,I,E.D);P=(1<<lt)-1,U(E.C,Z),z(E.C,Z,y),U(E.D,lt),z(E.D,lt,_)}for(;;){const q=y[$(d,M)&N];M+=15&q;const Z=q>>>4;if(!(Z>>>8))p[g++]=Z;else{if(Z==256)break;{let lt=g+Z-254;if(Z>264){const dt=E.q[Z-257];lt=g+(dt>>>3)+H(d,M,7&dt),M+=7&dt}const st=_[$(d,M)&P];M+=15&st;const at=st>>>4,it=E.c[at],J=(it>>>4)+B(d,M,15&it);for(M+=15⁢g<lt;)p[g]=p[g++-J],p[g]=p[g++-J],p[g]=p[g++-J],p[g]=p[g++-J];g=lt}}}}else{(7&M)!=0&&(M+=8-(7&M));const q=4+(M>>>3),Z=d[q-4]|d[q-3]<<8;T&&(p=u.H.W(p,g+Z)),p.set(new b(d.buffer,d.byteOffset+q,Z),g),M=q+Z<<3,g+=Z}return p.length==g?p:p.slice(0,g)},u.H.W=function(d,p){const b=d.length;if(p<=b)return d;const y=new Uint8Array(b<<1);return y.set(d,0),y},u.H.R=function(d,p,b,y,_,S){const A=u.H.e,L=u.H.Z;let I=0;for(;I<b;){const D=d[L(y,_)&p];_+=15&D;const N=D>>>4;if(N<=15)S[I]=N,I++;else{let P=0,g=0;N==16?(g=3+A(y,_,2),_+=2,P=S[I-1]):N==17?(g=3+A(y,_,3),_+=3):N==18&&(g=11+A(y,_,7),_+=7);const M=I+g;for(;I<M;)S[I]=P,I++}}return _},u.H.V=function(d,p,b,y){let _=0,S=0;const A=y.length>>>1;for(;S<b;){const L=d[S+p];y[S<<1]=0,y[1+(S<<1)]=L,L>_&&(_=L),S++}for(;S<A;)y[S<<1]=0,y[1+(S<<1)]=0,S++;return _},u.H.n=function(d,p){const b=u.H.m,y=d.length;let _,S,A,L;const I=b.j;for(var D=0;D<=p;D++)I[D]=0;for(D=1;D<y;D+=2)I[d[D]]++;const N=b.K;for(_=0,I[0]=0,S=1;S<=p;S++)_=_+I[S-1]<<1,N[S]=_;for(A=0;A<y;A+=2)L=d[A+1],L!=0&&(d[A]=N[L],N[L]++)},u.H.A=function(d,p,b){const y=d.length,_=u.H.m.r;for(let S=0;S<y;S+=2)if(d[S+1]!=0){const A=S>>1,L=d[S+1],I=A<<4|L,D=p-L;let N=d[S]<<D;const P=N+(1<<D);for(;N!=P;)b[_[N]>>>15-p]=I,N++}},u.H.l=function(d,p){const b=u.H.m.r,y=15-p;for(let _=0;_<d.length;_+=2){const S=d[_]<<p-d[_+1];d[_]=b[S]>>>y}},u.H.M=function(d,p,b){b<<=7&p;const y=p>>>3;d[y]|=b,d[y+1]|=b>>>8},u.H.I=function(d,p,b){b<<=7&p;const y=p>>>3;d[y]|=b,d[y+1]|=b>>>8,d[y+2]|=b>>>16},u.H.e=function(d,p,b){return(d[p>>>3]|d[1+(p>>>3)]<<8)>>>(7&p)&(1<<b)-1},u.H.b=function(d,p,b){return(d[p>>>3]|d[1+(p>>>3)]<<8|d[2+(p>>>3)]<<16)>>>(7&p)&(1<<b)-1},u.H.Z=function(d,p){return(d[p>>>3]|d[1+(p>>>3)]<<8|d[2+(p>>>3)]<<16)>>>(7&p)},u.H.i=function(d,p){return(d[p>>>3]|d[1+(p>>>3)]<<8|d[2+(p>>>3)]<<16|d[3+(p>>>3)]<<24)>>>(7&p)},u.H.m=(function(){const d=Uint16Array,p=Uint32Array;return{K:new d(16),j:new d(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new d(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new p(32),J:new d(512),_:[],h:new d(32),$:[],w:new d(32768),C:[],v:[],d:new d(32768),D:[],u:new d(512),Q:[],r:new d(32768),s:new p(286),Y:new p(30),a:new p(19),t:new p(15e3),k:new d(65536),g:new d(32768)}})(),(function(){const d=u.H.m;for(var p=0;p<32768;p++){let y=p;y=(2863311530&y)>>>1|(1431655765&y)<<1,y=(3435973836&y)>>>2|(858993459&y)<<2,y=(4042322160&y)>>>4|(252645135&y)<<4,y=(4278255360&y)>>>8|(16711935&y)<<8,d.r[p]=(y>>>16|y<<16)>>>17}function b(y,_,S){for(;_--!=0;)y.push(0,S)}for(p=0;p<32;p++)d.q[p]=d.S[p]<<3|d.T[p],d.c[p]=d.p[p]<<4|d.z[p];b(d._,144,8),b(d._,112,9),b(d._,24,7),b(d._,8,8),u.H.n(d._,9),u.H.A(d._,9,d.J),u.H.l(d._,9),b(d.$,32,5),u.H.n(d.$,5),u.H.A(d.$,5,d.h),u.H.l(d.$,5),b(d.Q,19,0),b(d.C,286,0),b(d.D,30,0),b(d.v,320,0)})(),u.H.N})();function r(u){return[1,null,3,1,2,null,4][u.ctype]*u.depth}function o(u,d,p,b,y){let _=r(d);const S=Math.ceil(b*_/8);let A,L;_=Math.ceil(_/8);let I=u[p],D=0;if(I>1&&(u[p]=[0,0,1][I-2]),I==3)for(D=_;D<S;D++)u[D+1]=u[D+1]+(u[D+1-_]>>>1)&255;for(let N=0;N<y;N++)if(A=p+N*S,L=A+N+1,I=u[L-1],D=0,I==0)for(;D<S;D++)u[A+D]=u[L+D];else if(I==1){for(;D<_;D++)u[A+D]=u[L+D];for(;D<S;D++)u[A+D]=u[L+D]+u[A+D-_]}else if(I==2)for(;D<S;D++)u[A+D]=u[L+D]+u[A+D-S];else if(I==3){for(;D<_;D++)u[A+D]=u[L+D]+(u[A+D-S]>>>1);for(;D<S;D++)u[A+D]=u[L+D]+(u[A+D-S]+u[A+D-_]>>>1)}else{for(;D<_;D++)u[A+D]=u[L+D]+a(0,u[A+D-S],0);for(;D<S;D++)u[A+D]=u[L+D]+a(u[A+D-_],u[A+D-S],u[A+D-_-S])}return u}function a(u,d,p){const b=u+d-p,y=b-u,_=b-d,S=b-p;return y*y<=_*_&&y*y<=S*S?u:_*_<=S*S?d:p}function c(u,d,p){p.width=n.readUint(u,d),d+=4,p.height=n.readUint(u,d),d+=4,p.depth=u[d],d++,p.ctype=u[d],d++,p.compress=u[d],d++,p.filter=u[d],d++,p.interlace=u[d],d++}function f(u,d,p,b,y,_,S,A,L){const I=Math.min(d,y),D=Math.min(p,_);let N=0,P=0;for(let $=0;$<D;$++)for(let E=0;E<I;E++)if(S>=0&&A>=0?(N=$*d+E<<2,P=(A+$)*y+S+E<<2):(N=(-A+$)*d-S+E<<2,P=$*y+E<<2),L==0)b[P]=u[N],b[P+1]=u[N+1],b[P+2]=u[N+2],b[P+3]=u[N+3];else if(L==1){var g=u[N+3]*.00392156862745098,M=u[N]*g,k=u[N+1]*g,B=u[N+2]*g,H=b[P+3]*(1/255),j=b[P]*H,U=b[P+1]*H,z=b[P+2]*H;const T=1-g,tt=g+H*T,q=tt==0?0:1/tt;b[P+3]=255*tt,b[P+0]=(M+j*T)*q,b[P+1]=(k+U*T)*q,b[P+2]=(B+z*T)*q}else if(L==2)g=u[N+3],M=u[N],k=u[N+1],B=u[N+2],H=b[P+3],j=b[P],U=b[P+1],z=b[P+2],g==H&&M==j&&k==U&&B==z?(b[P]=0,b[P+1]=0,b[P+2]=0,b[P+3]=0):(b[P]=M,b[P+1]=k,b[P+2]=B,b[P+3]=g);else if(L==3){if(g=u[N+3],M=u[N],k=u[N+1],B=u[N+2],H=b[P+3],j=b[P],U=b[P+1],z=b[P+2],g==H&&M==j&&k==U&&B==z)continue;if(g<220&&H>20)return!1}return!0}return{decode:function(d){const p=new Uint8Array(d);let b=8;const y=n,_=y.readUshort,S=y.readUint,A={tabs:{},frames:[]},L=new Uint8Array(p.length);let I,D=0,N=0;const P=[137,80,78,71,13,10,26,10];for(var g=0;g<8;g++)if(p[g]!=P[g])throw"The input is not a PNG file!";for(;b<p.length;){const $=y.readUint(p,b);b+=4;const E=y.readASCII(p,b,4);if(b+=4,E=="IHDR")c(p,b,A);else if(E=="iCCP"){for(var M=b;p[M]!=0;)M++;y.readASCII(p,b,M-b),p[M+1];const T=p.slice(M+2,b+$);let tt=null;try{tt=i(T)}catch{tt=s(T)}A.tabs[E]=tt}else if(E=="CgBI")A.tabs[E]=p.slice(b,b+4);else if(E=="IDAT"){for(g=0;g<$;g++)L[D+g]=p[b+g];D+=$}else if(E=="acTL")A.tabs[E]={num_frames:S(p,b),num_plays:S(p,b+4)},I=new Uint8Array(p.length);else if(E=="fcTL"){N!=0&&((z=A.frames[A.frames.length-1]).data=e(A,I.slice(0,N),z.rect.width,z.rect.height),N=0);const T={x:S(p,b+12),y:S(p,b+16),width:S(p,b+4),height:S(p,b+8)};let tt=_(p,b+22);tt=_(p,b+20)/(tt==0?100:tt);const q={rect:T,delay:Math.round(1e3*tt),dispose:p[b+24],blend:p[b+25]};A.frames.push(q)}else if(E=="fdAT"){for(g=0;g<$-4;g++)I[N+g]=p[b+g+4];N+=$-4}else if(E=="pHYs")A.tabs[E]=[y.readUint(p,b),y.readUint(p,b+4),p[b+8]];else if(E=="cHRM")for(A.tabs[E]=[],g=0;g<8;g++)A.tabs[E].push(y.readUint(p,b+4*g));else if(E=="tEXt"||E=="zTXt"){A.tabs[E]==null&&(A.tabs[E]={});var k=y.nextZero(p,b),B=y.readASCII(p,b,k-b),H=b+$-k-1;if(E=="tEXt")U=y.readASCII(p,k+1,H);else{var j=i(p.slice(k+2,k+2+H));U=y.readUTF8(j,0,j.length)}A.tabs[E][B]=U}else if(E=="iTXt"){A.tabs[E]==null&&(A.tabs[E]={}),k=0,M=b,k=y.nextZero(p,M),B=y.readASCII(p,M,k-M);const T=p[M=k+1];var U;p[M+1],M+=2,k=y.nextZero(p,M),y.readASCII(p,M,k-M),M=k+1,k=y.nextZero(p,M),y.readUTF8(p,M,k-M),H=$-((M=k+1)-b),T==0?U=y.readUTF8(p,M,H):(j=i(p.slice(M,M+H)),U=y.readUTF8(j,0,j.length)),A.tabs[E][B]=U}else if(E=="PLTE")A.tabs[E]=y.readBytes(p,b,$);else if(E=="hIST"){const T=A.tabs.PLTE.length/3;for(A.tabs[E]=[],g=0;g<T;g++)A.tabs[E].push(_(p,b+2*g))}else if(E=="tRNS")A.ctype==3?A.tabs[E]=y.readBytes(p,b,$):A.ctype==0?A.tabs[E]=_(p,b):A.ctype==2&&(A.tabs[E]=[_(p,b),_(p,b+2),_(p,b+4)]);else if(E=="gAMA")A.tabs[E]=y.readUint(p,b)/1e5;else if(E=="sRGB")A.tabs[E]=p[b];else if(E=="bKGD")A.ctype==0||A.ctype==4?A.tabs[E]=[_(p,b)]:A.ctype==2||A.ctype==6?A.tabs[E]=[_(p,b),_(p,b+2),_(p,b+4)]:A.ctype==3&&(A.tabs[E]=p[b]);else if(E=="IEND")break;b+=$,y.readUint(p,b),b+=4}var z;return N!=0&&((z=A.frames[A.frames.length-1]).data=e(A,I.slice(0,N),z.rect.width,z.rect.height)),A.data=e(A,L,A.width,A.height),delete A.compress,delete A.interlace,delete A.filter,A},toRGBA8:function(d){const p=d.width,b=d.height;if(d.tabs.acTL==null)return[t(d.data,p,b,d).buffer];const y=[];d.frames[0].data==null&&(d.frames[0].data=d.data);const _=p*b*4,S=new Uint8Array(_),A=new Uint8Array(_),L=new Uint8Array(_);for(let D=0;D<d.frames.length;D++){const N=d.frames[D],P=N.rect.x,g=N.rect.y,M=N.rect.width,k=N.rect.height,B=t(N.data,M,k,d);if(D!=0)for(var I=0;I<_;I++)L[I]=S[I];if(N.blend==0?f(B,M,k,S,p,b,P,g,0):N.blend==1&&f(B,M,k,S,p,b,P,g,1),y.push(S.buffer.slice(0)),N.dispose!=0){if(N.dispose==1)f(A,M,k,S,p,b,P,g,0);else if(N.dispose==2)for(I=0;I<_;I++)S[I]=L[I]}}return y},_paeth:a,_copyTile:f,_bin:n}})();(function(){const{_copyTile:n}=Ue,{_bin:t}=Ue,e=Ue._paeth;var i={table:(function(){const M=new Uint32Array(256);for(let k=0;k<256;k++){let B=k;for(let H=0;H<8;H++)1&B?B=3988292384^B>>>1:B>>>=1;M[k]=B}return M})(),update(M,k,B,H){for(let j=0;j<H;j++)M=i.table[255&(M^k[B+j])]^M>>>8;return M},crc:(M,k,B)=>4294967295^i.update(4294967295,M,k,B)};function s(M,k,B,H){k[B]+=M[0]*H>>4,k[B+1]+=M[1]*H>>4,k[B+2]+=M[2]*H>>4,k[B+3]+=M[3]*H>>4}function r(M){return Math.max(0,Math.min(255,M))}function o(M,k){const B=M[0]-k[0],H=M[1]-k[1],j=M[2]-k[2],U=M[3]-k[3];return B*B+H*H+j*j+U*U}function a(M,k,B,H,j,U,z){z==null&&(z=1);const $=H.length,E=[];for(var T=0;T<$;T++){const J=H[T];E.push([J>>>0&255,J>>>8&255,J>>>16&255,J>>>24&255])}for(T=0;T<$;T++){let J=4294967295;for(var tt=0,q=0;q<$;q++){var Z=o(E[T],E[q]);q!=T&&Z<J&&(J=Z,tt=q)}}const lt=new Uint32Array(j.buffer),st=new Int16Array(k*B*4),at=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(T=0;T<at.length;T++)at[T]=255*((at[T]+.5)/16-.5);for(let J=0;J<B;J++)for(let dt=0;dt<k;dt++){var it;T=4*(J*k+dt),z!=2?it=[r(M[T]+st[T]),r(M[T+1]+st[T+1]),r(M[T+2]+st[T+2]),r(M[T+3]+st[T+3])]:(Z=at[4*(3&J)+(3&dt)],it=[r(M[T]+Z),r(M[T+1]+Z),r(M[T+2]+Z),r(M[T+3]+Z)]),tt=0;let Nt=16777215;for(q=0;q<$;q++){const At=o(it,E[q]);At<Nt&&(Nt=At,tt=q)}const Rt=E[tt],Et=[it[0]-Rt[0],it[1]-Rt[1],it[2]-Rt[2],it[3]-Rt[3]];z==1&&(dt!=k-1&&s(Et,st,T+4,7),J!=B-1&&(dt!=0&&s(Et,st,T+4*k-4,3),s(Et,st,T+4*k,5),dt!=k-1&&s(Et,st,T+4*k+4,1))),U[T>>2]=tt,lt[T>>2]=H[tt]}}function c(M,k,B,H,j){j==null&&(j={});const{crc:U}=i,z=t.writeUint,$=t.writeUshort,E=t.writeASCII;let T=8;const tt=M.frames.length>1;let q,Z=!1,lt=33+(tt?20:0);if(j.sRGB!=null&&(lt+=13),j.pHYs!=null&&(lt+=21),j.iCCP!=null&&(q=pako.deflate(j.iCCP),lt+=21+q.length+4),M.ctype==3){for(var st=M.plte.length,at=0;at<st;at++)M.plte[at]>>>24!=255&&(Z=!0);lt+=8+3*st+4+(Z?8+1*st+4:0)}for(var it=0;it<M.frames.length;it++)tt&&(lt+=38),lt+=(Rt=M.frames[it]).cimg.length+12,it!=0&&(lt+=4);lt+=12;const J=new Uint8Array(lt),dt=[137,80,78,71,13,10,26,10];for(at=0;at<8;at++)J[at]=dt[at];if(z(J,T,13),T+=4,E(J,T,"IHDR"),T+=4,z(J,T,k),T+=4,z(J,T,B),T+=4,J[T]=M.depth,T++,J[T]=M.ctype,T++,J[T]=0,T++,J[T]=0,T++,J[T]=0,T++,z(J,T,U(J,T-17,17)),T+=4,j.sRGB!=null&&(z(J,T,1),T+=4,E(J,T,"sRGB"),T+=4,J[T]=j.sRGB,T++,z(J,T,U(J,T-5,5)),T+=4),j.iCCP!=null){const Et=13+q.length;z(J,T,Et),T+=4,E(J,T,"iCCP"),T+=4,E(J,T,"ICC profile"),T+=11,T+=2,J.set(q,T),T+=q.length,z(J,T,U(J,T-(Et+4),Et+4)),T+=4}if(j.pHYs!=null&&(z(J,T,9),T+=4,E(J,T,"pHYs"),T+=4,z(J,T,j.pHYs[0]),T+=4,z(J,T,j.pHYs[1]),T+=4,J[T]=j.pHYs[2],T++,z(J,T,U(J,T-13,13)),T+=4),tt&&(z(J,T,8),T+=4,E(J,T,"acTL"),T+=4,z(J,T,M.frames.length),T+=4,z(J,T,j.loop!=null?j.loop:0),T+=4,z(J,T,U(J,T-12,12)),T+=4),M.ctype==3){for(z(J,T,3*(st=M.plte.length)),T+=4,E(J,T,"PLTE"),T+=4,at=0;at<st;at++){const Et=3*at,At=M.plte[at],Xt=255&At,Bt=At>>>8&255,Le=At>>>16&255;J[T+Et+0]=Xt,J[T+Et+1]=Bt,J[T+Et+2]=Le}if(T+=3*st,z(J,T,U(J,T-3*st-4,3*st+4)),T+=4,Z){for(z(J,T,st),T+=4,E(J,T,"tRNS"),T+=4,at=0;at<st;at++)J[T+at]=M.plte[at]>>>24&255;T+=st,z(J,T,U(J,T-st-4,st+4)),T+=4}}let Nt=0;for(it=0;it<M.frames.length;it++){var Rt=M.frames[it];tt&&(z(J,T,26),T+=4,E(J,T,"fcTL"),T+=4,z(J,T,Nt++),T+=4,z(J,T,Rt.rect.width),T+=4,z(J,T,Rt.rect.height),T+=4,z(J,T,Rt.rect.x),T+=4,z(J,T,Rt.rect.y),T+=4,$(J,T,H[it]),T+=2,$(J,T,1e3),T+=2,J[T]=Rt.dispose,T++,J[T]=Rt.blend,T++,z(J,T,U(J,T-30,30)),T+=4);const Et=Rt.cimg;z(J,T,(st=Et.length)+(it==0?0:4)),T+=4;const At=T;E(J,T,it==0?"IDAT":"fdAT"),T+=4,it!=0&&(z(J,T,Nt++),T+=4),J.set(Et,T),T+=st,z(J,T,U(J,At,T-At)),T+=4}return z(J,T,0),T+=4,E(J,T,"IEND"),T+=4,z(J,T,U(J,T-4,4)),T+=4,J.buffer}function f(M,k,B){for(let H=0;H<M.frames.length;H++){const j=M.frames[H];j.rect.width;const U=j.rect.height,z=new Uint8Array(U*j.bpl+U);j.cimg=b(j.img,U,j.bpp,j.bpl,z,k,B)}}function u(M,k,B,H,j){const U=j[0],z=j[1],$=j[2],E=j[3],T=j[4],tt=j[5];let q=6,Z=8,lt=255;for(var st=0;st<M.length;st++){const te=new Uint8Array(M[st]);for(var at=te.length,it=0;it<at;it+=4)lt&=te[it+3]}const J=lt!=255,dt=(function(Lt,Mt,ee,fe,Kt,Vt){const Ht=[];for(var Dt=0;Dt<Lt.length;Dt++){const oe=new Uint8Array(Lt[Dt]),we=new Uint32Array(oe.buffer);var ct;let ae=0,ne=0,le=Mt,Se=ee,di=fe?1:0;if(Dt!=0){const Kn=Vt||fe||Dt==1||Ht[Dt-2].dispose!=0?1:2;let Gn=0,pi=1e9;for(let Tn=0;Tn<Kn;Tn++){var Yt=new Uint8Array(Lt[Dt-1-Tn]);const gn=new Uint32Array(Lt[Dt-1-Tn]);let Ae=Mt,Be=ee,nn=-1,ce=-1;for(let He=0;He<ee;He++)for(let sn=0;sn<Mt;sn++)we[re=He*Mt+sn]!=gn[re]&&(sn<Ae&&(Ae=sn),sn>nn&&(nn=sn),He<Be&&(Be=He),He>ce&&(ce=He));nn==-1&&(Ae=Be=nn=ce=0),Kt&&((1&Ae)==1&&Ae--,(1&Be)==1&&Be--);const he=(nn-Ae+1)*(ce-Be+1);he<pi&&(pi=he,Gn=Tn,ae=Ae,ne=Be,le=nn-Ae+1,Se=ce-Be+1)}Yt=new Uint8Array(Lt[Dt-1-Gn]),Gn==1&&(Ht[Dt-1].dispose=2),ct=new Uint8Array(le*Se*4),n(Yt,Mt,ee,ct,le,Se,-ae,-ne,0),di=n(oe,Mt,ee,ct,le,Se,-ae,-ne,3)?1:0,di==1?p(oe,Mt,ee,ct,{x:ae,y:ne,width:le,height:Se}):n(oe,Mt,ee,ct,le,Se,-ae,-ne,0)}else ct=oe.slice(0);Ht.push({rect:{x:ae,y:ne,width:le,height:Se},img:ct,blend:di,dispose:0})}if(fe)for(Dt=0;Dt<Ht.length;Dt++){if((en=Ht[Dt]).blend==1)continue;const oe=en.rect,we=Ht[Dt-1].rect,ae=Math.min(oe.x,we.x),ne=Math.min(oe.y,we.y),le={x:ae,y:ne,width:Math.max(oe.x+oe.width,we.x+we.width)-ae,height:Math.max(oe.y+oe.height,we.y+we.height)-ne};Ht[Dt-1].dispose=1,Dt-1!=0&&d(Lt,Mt,ee,Ht,Dt-1,le,Kt),d(Lt,Mt,ee,Ht,Dt,le,Kt)}let Yn=0;if(Lt.length!=1)for(var re=0;re<Ht.length;re++){var en;Yn+=(en=Ht[re]).rect.width*en.rect.height}return Ht})(M,k,B,U,z,$),Nt={},Rt=[],Et=[];if(H!=0){const te=[];for(it=0;it<dt.length;it++)te.push(dt[it].img.buffer);const Lt=(function(Kt){let Vt=0;for(var Ht=0;Ht<Kt.length;Ht++)Vt+=Kt[Ht].byteLength;const Dt=new Uint8Array(Vt);let ct=0;for(Ht=0;Ht<Kt.length;Ht++){const Yt=new Uint8Array(Kt[Ht]),Yn=Yt.length;for(let re=0;re<Yn;re+=4){let en=Yt[re],oe=Yt[re+1],we=Yt[re+2];const ae=Yt[re+3];ae==0&&(en=oe=we=0),Dt[ct+re]=en,Dt[ct+re+1]=oe,Dt[ct+re+2]=we,Dt[ct+re+3]=ae}ct+=Yn}return Dt.buffer})(te),Mt=_(Lt,H);for(it=0;it<Mt.plte.length;it++)Rt.push(Mt.plte[it].est.rgba);let ee=0;for(it=0;it<dt.length;it++){const fe=(Xt=dt[it]).img.length;var At=new Uint8Array(Mt.inds.buffer,ee>>2,fe>>2);Et.push(At);const Kt=new Uint8Array(Mt.abuf,ee,fe);tt&&a(Xt.img,Xt.rect.width,Xt.rect.height,Rt,Kt,At),Xt.img.set(Kt),ee+=fe}}else for(st=0;st<dt.length;st++){var Xt=dt[st];const te=new Uint32Array(Xt.img.buffer);var Bt=Xt.rect.width;for(at=te.length,At=new Uint8Array(at),Et.push(At),it=0;it<at;it++){const Lt=te[it];if(it!=0&&Lt==te[it-1])At[it]=At[it-1];else if(it>Bt&&Lt==te[it-Bt])At[it]=At[it-Bt];else{let Mt=Nt[Lt];if(Mt==null&&(Nt[Lt]=Mt=Rt.length,Rt.push(Lt),Rt.length>=300))break;At[it]=Mt}}}const Le=Rt.length;for(Le<=256&&T==0&&(Z=Le<=2?1:Le<=4?2:Le<=16?4:8,Z=Math.max(Z,E)),st=0;st<dt.length;st++){(Xt=dt[st]).rect.x,Xt.rect.y,Bt=Xt.rect.width;const te=Xt.rect.height;let Lt=Xt.img;new Uint32Array(Lt.buffer);let Mt=4*Bt,ee=4;if(Le<=256&&T==0){Mt=Math.ceil(Z*Bt/8);var De=new Uint8Array(Mt*te);const fe=Et[st];for(let Kt=0;Kt<te;Kt++){it=Kt*Mt;const Vt=Kt*Bt;if(Z==8)for(var Wt=0;Wt<Bt;Wt++)De[it+Wt]=fe[Vt+Wt];else if(Z==4)for(Wt=0;Wt<Bt;Wt++)De[it+(Wt>>1)]|=fe[Vt+Wt]<<4-4*(1&Wt);else if(Z==2)for(Wt=0;Wt<Bt;Wt++)De[it+(Wt>>2)]|=fe[Vt+Wt]<<6-2*(3&Wt);else if(Z==1)for(Wt=0;Wt<Bt;Wt++)De[it+(Wt>>3)]|=fe[Vt+Wt]<<7-1*(7&Wt)}Lt=De,q=3,ee=1}else if(J==0&&dt.length==1){De=new Uint8Array(Bt*te*3);const fe=Bt*te;for(it=0;it<fe;it++){const Kt=3*it,Vt=4*it;De[Kt]=Lt[Vt],De[Kt+1]=Lt[Vt+1],De[Kt+2]=Lt[Vt+2]}Lt=De,q=2,ee=3,Mt=3*Bt}Xt.img=Lt,Xt.bpl=Mt,Xt.bpp=ee}return{ctype:q,depth:Z,plte:Rt,frames:dt}}function d(M,k,B,H,j,U,z){const $=Uint8Array,E=Uint32Array,T=new $(M[j-1]),tt=new E(M[j-1]),q=j+1<M.length?new $(M[j+1]):null,Z=new $(M[j]),lt=new E(Z.buffer);let st=k,at=B,it=-1,J=-1;for(let Nt=0;Nt<U.height;Nt++)for(let Rt=0;Rt<U.width;Rt++){const Et=U.x+Rt,At=U.y+Nt,Xt=At*k+Et,Bt=lt[Xt];Bt==0||H[j-1].dispose==0&&tt[Xt]==Bt&&(q==null||q[4*Xt+3]!=0)||(Et<st&&(st=Et),Et>it&&(it=Et),At<at&&(at=At),At>J&&(J=At))}it==-1&&(st=at=it=J=0),z&&((1&st)==1&&st--,(1&at)==1&&at--),U={x:st,y:at,width:it-st+1,height:J-at+1};const dt=H[j];dt.rect=U,dt.blend=1,dt.img=new Uint8Array(U.width*U.height*4),H[j-1].dispose==0?(n(T,k,B,dt.img,U.width,U.height,-U.x,-U.y,0),p(Z,k,B,dt.img,U)):n(Z,k,B,dt.img,U.width,U.height,-U.x,-U.y,0)}function p(M,k,B,H,j){n(M,k,B,H,j.width,j.height,-j.x,-j.y,2)}function b(M,k,B,H,j,U,z){const $=[];let E,T=[0,1,2,3,4];U!=-1?T=[U]:(k*H>5e5||B==1)&&(T=[0]),z&&(E={level:0});const tt=Wh;for(var q=0;q<T.length;q++){for(let st=0;st<k;st++)y(j,M,st,H,B,T[q]);$.push(tt.deflate(j,E))}let Z,lt=1e9;for(q=0;q<$.length;q++)$[q].length<lt&&(Z=q,lt=$[q].length);return $[Z]}function y(M,k,B,H,j,U){const z=B*H;let $=z+B;if(M[$]=U,$++,U==0)if(H<500)for(var E=0;E<H;E++)M[$+E]=k[z+E];else M.set(new Uint8Array(k.buffer,z,H),$);else if(U==1){for(E=0;E<j;E++)M[$+E]=k[z+E];for(E=j;E<H;E++)M[$+E]=k[z+E]-k[z+E-j]+256&255}else if(B==0){for(E=0;E<j;E++)M[$+E]=k[z+E];if(U==2)for(E=j;E<H;E++)M[$+E]=k[z+E];if(U==3)for(E=j;E<H;E++)M[$+E]=k[z+E]-(k[z+E-j]>>1)+256&255;if(U==4)for(E=j;E<H;E++)M[$+E]=k[z+E]-e(k[z+E-j],0,0)+256&255}else{if(U==2)for(E=0;E<H;E++)M[$+E]=k[z+E]+256-k[z+E-H]&255;if(U==3){for(E=0;E<j;E++)M[$+E]=k[z+E]+256-(k[z+E-H]>>1)&255;for(E=j;E<H;E++)M[$+E]=k[z+E]+256-(k[z+E-H]+k[z+E-j]>>1)&255}if(U==4){for(E=0;E<j;E++)M[$+E]=k[z+E]+256-e(0,k[z+E-H],0)&255;for(E=j;E<H;E++)M[$+E]=k[z+E]+256-e(k[z+E-j],k[z+E-H],k[z+E-j-H])&255}}}function _(M,k){const B=new Uint8Array(M),H=B.slice(0),j=new Uint32Array(H.buffer),U=S(H,k),z=U[0],$=U[1],E=B.length,T=new Uint8Array(E>>2);let tt;if(B.length<2e7)for(var q=0;q<E;q+=4)tt=A(z,Z=B[q]*(1/255),lt=B[q+1]*(1/255),st=B[q+2]*(1/255),at=B[q+3]*(1/255)),T[q>>2]=tt.ind,j[q>>2]=tt.est.rgba;else for(q=0;q<E;q+=4){var Z=B[q]*.00392156862745098,lt=B[q+1]*(1/255),st=B[q+2]*(1/255),at=B[q+3]*(1/255);for(tt=z;tt.left;)tt=L(tt.est,Z,lt,st,at)<=0?tt.left:tt.right;T[q>>2]=tt.ind,j[q>>2]=tt.est.rgba}return{abuf:H.buffer,inds:T,plte:$}}function S(M,k,B){B==null&&(B=1e-4);const H=new Uint32Array(M.buffer),j={i0:0,i1:M.length,bst:null,est:null,tdst:0,left:null,right:null};j.bst=N(M,j.i0,j.i1),j.est=P(j.bst);const U=[j];for(;U.length<k;){let $=0,E=0;for(var z=0;z<U.length;z++)U[z].est.L>$&&($=U[z].est.L,E=z);if($<B)break;const T=U[E],tt=I(M,H,T.i0,T.i1,T.est.e,T.est.eMq255);if(T.i0>=tt||T.i1<=tt){T.est.L=0;continue}const q={i0:T.i0,i1:tt,bst:null,est:null,tdst:0,left:null,right:null};q.bst=N(M,q.i0,q.i1),q.est=P(q.bst);const Z={i0:tt,i1:T.i1,bst:null,est:null,tdst:0,left:null,right:null};for(Z.bst={R:[],m:[],N:T.bst.N-q.bst.N},z=0;z<16;z++)Z.bst.R[z]=T.bst.R[z]-q.bst.R[z];for(z=0;z<4;z++)Z.bst.m[z]=T.bst.m[z]-q.bst.m[z];Z.est=P(Z.bst),T.left=q,T.right=Z,U[E]=q,U.push(Z)}for(U.sort((($,E)=>E.bst.N-$.bst.N)),z=0;z<U.length;z++)U[z].ind=z;return[j,U]}function A(M,k,B,H,j){if(M.left==null)return M.tdst=(function(q,Z,lt,st,at){const it=Z-q[0],J=lt-q[1],dt=st-q[2],Nt=at-q[3];return it*it+J*J+dt*dt+Nt*Nt})(M.est.q,k,B,H,j),M;const U=L(M.est,k,B,H,j);let z=M.left,$=M.right;U>0&&(z=M.right,$=M.left);const E=A(z,k,B,H,j);if(E.tdst<=U*U)return E;const T=A($,k,B,H,j);return T.tdst<E.tdst?T:E}function L(M,k,B,H,j){const{e:U}=M;return U[0]*k+U[1]*B+U[2]*H+U[3]*j-M.eMq}function I(M,k,B,H,j,U){for(H-=4;B<H;){for(;D(M,B,j)<=U;)B+=4;for(;D(M,H,j)>U;)H-=4;if(B>=H)break;const z=k[B>>2];k[B>>2]=k[H>>2],k[H>>2]=z,B+=4,H-=4}for(;D(M,B,j)>U;)B-=4;return B+4}function D(M,k,B){return M[k]*B[0]+M[k+1]*B[1]+M[k+2]*B[2]+M[k+3]*B[3]}function N(M,k,B){const H=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],j=[0,0,0,0],U=B-k>>2;for(let z=k;z<B;z+=4){const $=M[z]*.00392156862745098,E=M[z+1]*(1/255),T=M[z+2]*(1/255),tt=M[z+3]*(1/255);j[0]+=$,j[1]+=E,j[2]+=T,j[3]+=tt,H[0]+=$*$,H[1]+=$*E,H[2]+=$*T,H[3]+=$*tt,H[5]+=E*E,H[6]+=E*T,H[7]+=E*tt,H[10]+=T*T,H[11]+=T*tt,H[15]+=tt*tt}return H[4]=H[1],H[8]=H[2],H[9]=H[6],H[12]=H[3],H[13]=H[7],H[14]=H[11],{R:H,m:j,N:U}}function P(M){const{R:k}=M,{m:B}=M,{N:H}=M,j=B[0],U=B[1],z=B[2],$=B[3],E=H==0?0:1/H,T=[k[0]-j*j*E,k[1]-j*U*E,k[2]-j*z*E,k[3]-j*$*E,k[4]-U*j*E,k[5]-U*U*E,k[6]-U*z*E,k[7]-U*$*E,k[8]-z*j*E,k[9]-z*U*E,k[10]-z*z*E,k[11]-z*$*E,k[12]-$*j*E,k[13]-$*U*E,k[14]-$*z*E,k[15]-$*$*E],tt=T,q=g;let Z=[Math.random(),Math.random(),Math.random(),Math.random()],lt=0,st=0;if(H!=0)for(let it=0;it<16&&(Z=q.multVec(tt,Z),st=Math.sqrt(q.dot(Z,Z)),Z=q.sml(1/st,Z),!(it!=0&&Math.abs(st-lt)<1e-9));it++)lt=st;const at=[j*E,U*E,z*E,$*E];return{Cov:T,q:at,e:Z,L:lt,eMq255:q.dot(q.sml(255,at),Z),eMq:q.dot(Z,at),rgba:(Math.round(255*at[3])<<24|Math.round(255*at[2])<<16|Math.round(255*at[1])<<8|Math.round(255*at[0])<<0)>>>0}}var g={multVec:(M,k)=>[M[0]*k[0]+M[1]*k[1]+M[2]*k[2]+M[3]*k[3],M[4]*k[0]+M[5]*k[1]+M[6]*k[2]+M[7]*k[3],M[8]*k[0]+M[9]*k[1]+M[10]*k[2]+M[11]*k[3],M[12]*k[0]+M[13]*k[1]+M[14]*k[2]+M[15]*k[3]],dot:(M,k)=>M[0]*k[0]+M[1]*k[1]+M[2]*k[2]+M[3]*k[3],sml:(M,k)=>[M*k[0],M*k[1],M*k[2],M*k[3]]};Ue.encode=function(k,B,H,j,U,z,$){j==null&&(j=0),$==null&&($=!1);const E=u(k,B,H,j,[!1,!1,!1,0,$,!1]);return f(E,-1),c(E,B,H,U,z)},Ue.encodeLL=function(k,B,H,j,U,z,$,E){const T={ctype:0+(j==1?0:2)+(U==0?0:4),depth:z,frames:[]},tt=(j+U)*z,q=tt*B;for(let Z=0;Z<k.length;Z++)T.frames.push({rect:{x:0,y:0,width:B,height:H},img:new Uint8Array(k[Z]),blend:0,dispose:1,bpp:Math.ceil(tt/8),bpl:Math.ceil(q/8)});return f(T,0,!0),c(T,B,H,$,E)},Ue.encode.compress=u,Ue.encode.dither=a,Ue.quantize=_,Ue.quantize.getKDtree=S,Ue.quantize.getNearest=A})();const uc={toArrayBuffer(n,t){const e=n.width,i=n.height,s=e<<2,r=n.getContext("2d").getImageData(0,0,e,i),o=new Uint32Array(r.data.buffer),a=(32*e+31)/32<<2,c=a*i,f=122+c,u=new ArrayBuffer(f),d=new DataView(u),p=1<<20;let b,y,_,S,A=p,L=0,I=0,D=0;function N(M){d.setUint16(I,M,!0),I+=2}function P(M){d.setUint32(I,M,!0),I+=4}function g(M){I+=M}N(19778),P(f),g(4),P(122),P(108),P(e),P(-i>>>0),N(1),N(32),P(3),P(c),P(2835),P(2835),g(8),P(16711680),P(65280),P(255),P(4278190080),P(1466527264),(function M(){for(;L<i&&A>0;){for(S=122+L*a,b=0;b<s;)A--,y=o[D++],_=y>>>24,d.setUint32(S+b,y<<8|_),b+=4;L++}D<o.length?(A=p,setTimeout(M,uc._dly)):t(u)})()},toBlob(n,t){this.toArrayBuffer(n,(e=>{t(new Blob([e],{type:"image/bmp"}))}))},_dly:9};var Te={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},Vh={[Te.CHROME]:16384,[Te.FIREFOX]:11180,[Te.DESKTOP_SAFARI]:16384,[Te.IE]:8192,[Te.IOS]:4096,[Te.ETC]:8192};const to=typeof window<"u",fc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,ks=to&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),$h=(to||fc)&&(ks&&ks.getOriginalSymbol(window,"File")||typeof File<"u"&&File),hc=(to||fc)&&(ks&&ks.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function eo(n,t,e=Date.now()){return new Promise((i=>{const s=n.split(","),r=s[0].match(/:(.*?);/)[1],o=globalThis.atob(s[1]);let a=o.length;const c=new Uint8Array(a);for(;a--;)c[a]=o.charCodeAt(a);const f=new Blob([c],{type:r});f.name=t,f.lastModified=e,i(f)}))}function dc(n){return new Promise(((t,e)=>{const i=new hc;i.onload=()=>t(i.result),i.onerror=s=>e(s),i.readAsDataURL(n)}))}function pc(n){return new Promise(((t,e)=>{const i=new Image;i.onload=()=>t(i),i.onerror=s=>e(s),i.src=n}))}function jn(){if(jn.cachedResult!==void 0)return jn.cachedResult;let n=Te.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?n=Te.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?n=Te.IOS:/Safari/i.test(t)?n=Te.DESKTOP_SAFARI:/Firefox/i.test(t)?n=Te.FIREFOX:(/MSIE/i.test(t)||document.documentMode)&&(n=Te.IE),jn.cachedResult=n,jn.cachedResult}function gc(n,t){const e=jn(),i=Vh[e];let s=n,r=t,o=s*r;const a=s>r?r/s:s/r;for(;o>i*i;){const c=(i+s)/2,f=(i+r)/2;c<f?(r=f,s=f*a):(r=c*a,s=c),o=s*r}return{width:s,height:r}}function Us(n,t){let e,i;try{if(e=new OffscreenCanvas(n,t),i=e.getContext("2d"),i===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{e=document.createElement("canvas"),i=e.getContext("2d")}return e.width=n,e.height=t,[e,i]}function mc(n,t){const{width:e,height:i}=gc(n.width,n.height),[s,r]=Us(e,i);return t&&/jpe?g/.test(t)&&(r.fillStyle="white",r.fillRect(0,0,s.width,s.height)),r.drawImage(n,0,0,s.width,s.height),s}function vs(){return vs.cachedResult!==void 0||(vs.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),vs.cachedResult}function Ms(n,t={}){return new Promise((function(e,i){let s,r;var o=function(){try{return r=mc(s,t.fileType||n.type),e([s,r])}catch(c){return i(c)}},a=function(c){try{var f=function(u){try{throw u}catch(d){return i(d)}};try{let u;return dc(n).then((function(d){try{return u=d,pc(u).then((function(p){try{return s=p,(function(){try{return o()}catch(b){return i(b)}})()}catch(b){return f(b)}}),f)}catch(p){return f(p)}}),f)}catch(u){f(u)}}catch(u){return i(u)}};try{if(vs()||[Te.DESKTOP_SAFARI,Te.MOBILE_SAFARI].includes(jn()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(n).then((function(c){try{return s=c,o()}catch{return a()}}),a)}catch{a()}}))}function Ts(n,t,e,i,s=1){return new Promise((function(r,o){let a;if(t==="image/png"){let d,p,b;return d=n.getContext("2d"),{data:p}=d.getImageData(0,0,n.width,n.height),b=Ue.encode([p.buffer],n.width,n.height,4096*s),a=new Blob([b],{type:t}),a.name=e,a.lastModified=i,c.call(this)}{let d=function(){return c.call(this)};var f=d;if(t==="image/bmp")return new Promise((p=>uc.toBlob(n,p))).then((function(p){try{return a=p,a.name=e,a.lastModified=i,d.call(this)}catch(b){return o(b)}}).bind(this),o);{let p=function(){return d.call(this)};var u=p;if(typeof OffscreenCanvas=="function"&&n instanceof OffscreenCanvas)return n.convertToBlob({type:t,quality:s}).then((function(b){try{return a=b,a.name=e,a.lastModified=i,p.call(this)}catch(y){return o(y)}}).bind(this),o);{let b;return b=n.toDataURL(t,s),eo(b,e,i).then((function(y){try{return a=y,p.call(this)}catch(_){return o(_)}}).bind(this),o)}}}function c(){return r(a)}}))}function Ze(n){n.width=0,n.height=0}function ri(){return new Promise((function(n,t){let e,i,s,r;return ri.cachedResult!==void 0?n(ri.cachedResult):eo("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(o){try{return e=o,Ms(e).then((function(a){try{return i=a[1],Ts(i,e.type,e.name,e.lastModified).then((function(c){try{return s=c,Ze(i),Ms(s).then((function(f){try{return r=f[0],ri.cachedResult=r.width===1&&r.height===2,n(ri.cachedResult)}catch(u){return t(u)}}),t)}catch(f){return t(f)}}),t)}catch(c){return t(c)}}),t)}catch(a){return t(a)}}),t)}))}function bc(n){return new Promise(((t,e)=>{const i=new hc;i.onload=s=>{const r=new DataView(s.target.result);if(r.getUint16(0,!1)!=65496)return t(-2);const o=r.byteLength;let a=2;for(;a<o;){if(r.getUint16(a+2,!1)<=8)return t(-1);const c=r.getUint16(a,!1);if(a+=2,c==65505){if(r.getUint32(a+=2,!1)!=1165519206)return t(-1);const f=r.getUint16(a+=6,!1)==18761;a+=r.getUint32(a+4,f);const u=r.getUint16(a,f);a+=2;for(let d=0;d<u;d++)if(r.getUint16(a+12*d,f)==274)return t(r.getUint16(a+12*d+8,f))}else{if((65280&c)!=65280)break;a+=r.getUint16(a,!1)}}return t(-1)},i.onerror=s=>e(s),i.readAsArrayBuffer(n)}))}function yc(n,t){const{width:e}=n,{height:i}=n,{maxWidthOrHeight:s}=t;let r,o=n;return isFinite(s)&&(e>s||i>s)&&([o,r]=Us(e,i),e>i?(o.width=s,o.height=i/e*s):(o.width=e/i*s,o.height=s),r.drawImage(n,0,0,o.width,o.height),Ze(n)),o}function xc(n,t){const{width:e}=n,{height:i}=n,[s,r]=Us(e,i);switch(t>4&&t<9?(s.width=i,s.height=e):(s.width=e,s.height=i),t){case 2:r.transform(-1,0,0,1,e,0);break;case 3:r.transform(-1,0,0,-1,e,i);break;case 4:r.transform(1,0,0,-1,0,i);break;case 5:r.transform(0,1,1,0,0,0);break;case 6:r.transform(0,1,-1,0,i,0);break;case 7:r.transform(0,-1,-1,0,i,e);break;case 8:r.transform(0,-1,1,0,0,e)}return r.drawImage(n,0,0,e,i),Ze(n),s}function pa(n,t,e=0){return new Promise((function(i,s){let r,o,a,c,f,u,d,p,b,y,_,S,A,L,I,D,N,P,g,M;function k(H=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;r+=H,t.onProgress(Math.min(r,100))}function B(H){if(t.signal&&t.signal.aborted)throw t.signal.reason;r=Math.min(Math.max(H,r),100),t.onProgress(r)}return r=e,o=t.maxIteration||10,a=1024*t.maxSizeMB*1024,k(),Ms(n,t).then((function(H){try{return[,c]=H,k(),f=yc(c,t),k(),new Promise((function(j,U){var z;if(!(z=t.exifOrientation))return bc(n).then((function(E){try{return z=E,$.call(this)}catch(T){return U(T)}}).bind(this),U);function $(){return j(z)}return $.call(this)})).then((function(j){try{return u=j,k(),ri().then((function(U){try{return d=U?f:xc(f,u),k(),p=t.initialQuality||1,b=t.fileType||n.type,Ts(d,b,n.name,n.lastModified,p).then((function(z){try{{let tt=function(){if(o--&&(I>a||I>A)){let Z,lt;return Z=M?.95*g.width:g.width,lt=M?.95*g.height:g.height,[N,P]=Us(Z,lt),P.drawImage(g,0,0,Z,lt),p*=b==="image/png"?.85:.95,Ts(N,b,n.name,n.lastModified,p).then((function(st){try{return D=st,Ze(g),g=N,I=D.size,B(Math.min(99,Math.floor((L-I)/(L-a)*100))),tt}catch(at){return s(at)}}),s)}return[1]},q=function(){return Ze(g),Ze(N),Ze(f),Ze(d),Ze(c),B(100),i(D)};var E=tt,T=q;if(y=z,k(),_=y.size>a,S=y.size>n.size,!_&&!S)return B(100),i(y);var $;return A=n.size,L=y.size,I=L,g=d,M=!t.alwaysKeepResolution&&_,($=(function(Z){for(;Z;){if(Z.then)return void Z.then($,s);try{if(Z.pop){if(Z.length)return Z.pop()?q.call(this):Z;Z=tt}else Z=Z.call(this)}catch(lt){return s(lt)}}}).bind(this))(tt)}}catch(tt){return s(tt)}}).bind(this),s)}catch(z){return s(z)}}).bind(this),s)}catch(U){return s(U)}}).bind(this),s)}catch(j){return s(j)}}).bind(this),s)}))}const qh=`
|
||
let scriptImported = false
|
||
self.addEventListener('message', async (e) => {
|
||
const { file, id, imageCompressionLibUrl, options } = e.data
|
||
options.onProgress = (progress) => self.postMessage({ progress, id })
|
||
try {
|
||
if (!scriptImported) {
|
||
// console.log('[worker] importScripts', imageCompressionLibUrl)
|
||
self.importScripts(imageCompressionLibUrl)
|
||
scriptImported = true
|
||
}
|
||
// console.log('[worker] self', self)
|
||
const compressedFile = await imageCompression(file, options)
|
||
self.postMessage({ file: compressedFile, id })
|
||
} catch (e) {
|
||
// console.error('[worker] error', e)
|
||
self.postMessage({ error: e.message + '\\n' + e.stack, id })
|
||
}
|
||
})
|
||
`;let _r;function Xh(n,t){return new Promise(((e,i)=>{_r||(_r=(function(o){const a=[];return a.push(o),URL.createObjectURL(new Blob(a))})(qh));const s=new Worker(_r);s.addEventListener("message",(function(o){if(t.signal&&t.signal.aborted)s.terminate();else if(o.data.progress===void 0){if(o.data.error)return i(new Error(o.data.error)),void s.terminate();e(o.data.file),s.terminate()}else t.onProgress(o.data.progress)})),s.addEventListener("error",i),t.signal&&t.signal.addEventListener("abort",(()=>{i(t.signal.reason),s.terminate()})),s.postMessage({file:n,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function ge(n,t){return new Promise((function(e,i){let s,r,o,a,c,f;if(s={...t},o=0,{onProgress:a}=s,s.maxSizeMB=s.maxSizeMB||Number.POSITIVE_INFINITY,c=typeof s.useWebWorker!="boolean"||s.useWebWorker,delete s.useWebWorker,s.onProgress=b=>{o=b,typeof a=="function"&&a(o)},!(n instanceof Blob||n instanceof $h))return i(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(n.type))return i(new Error("The file given is not an image"));if(f=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!c||typeof Worker!="function"||f)return pa(n,s).then((function(b){try{return r=b,p.call(this)}catch(y){return i(y)}}).bind(this),i);var u=(function(){try{return p.call(this)}catch(b){return i(b)}}).bind(this),d=function(b){try{return pa(n,s).then((function(y){try{return r=y,u()}catch(_){return i(_)}}),i)}catch(y){return i(y)}};try{return s.libURL=s.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",Xh(n,s).then((function(b){try{return r=b,u()}catch{return d()}}),d)}catch{d()}function p(){try{r.name=n.name,r.lastModified=n.lastModified}catch{}try{s.preserveExif&&n.type==="image/jpeg"&&(!s.fileType||s.fileType&&s.fileType===n.type)&&(r=cc(n,r))}catch{}return e(r)}}))}ge.getDataUrlFromFile=dc,ge.getFilefromDataUrl=eo,ge.loadImage=pc,ge.drawImageInCanvas=mc,ge.drawFileInCanvas=Ms,ge.canvasToFile=Ts,ge.getExifOrientation=bc,ge.handleMaxWidthOrHeight=yc,ge.followExifOrientation=xc,ge.cleanupCanvasMemory=Ze,ge.isAutoOrientationInBrowser=ri,ge.approximateBelowMaximumCanvasSizeOfBrowser=gc,ge.copyExifWithoutOrientation=cc,ge.getBrowserName=jn,ge.version="2.0.2";function Xi(n){return n+.5|0}const xn=(n,t,e)=>Math.max(Math.min(n,e),t);function Ti(n){return xn(Xi(n*2.55),0,255)}function Sn(n){return xn(Xi(n*255),0,255)}function un(n){return xn(Xi(n/2.55)/100,0,1)}function ga(n){return xn(Xi(n*100),0,100)}const Ne={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},Hr=[..."0123456789ABCDEF"],Yh=n=>Hr[n&15],Kh=n=>Hr[(n&240)>>4]+Hr[n&15],ss=n=>(n&240)>>4===(n&15),Gh=n=>ss(n.r)&&ss(n.g)&&ss(n.b)&&ss(n.a);function Qh(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&Ne[n[1]]*17,g:255&Ne[n[2]]*17,b:255&Ne[n[3]]*17,a:t===5?Ne[n[4]]*17:255}:(t===7||t===9)&&(e={r:Ne[n[1]]<<4|Ne[n[2]],g:Ne[n[3]]<<4|Ne[n[4]],b:Ne[n[5]]<<4|Ne[n[6]],a:t===9?Ne[n[7]]<<4|Ne[n[8]]:255})),e}const Jh=(n,t)=>n<255?t(n):"";function Zh(n){var t=Gh(n)?Yh:Kh;return n?"#"+t(n.r)+t(n.g)+t(n.b)+Jh(n.a,t):void 0}const td=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function _c(n,t,e){const i=t*Math.min(e,1-e),s=(r,o=(r+n/30)%12)=>e-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function ed(n,t,e){const i=(s,r=(s+n/60)%6)=>e-e*t*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function nd(n,t,e){const i=_c(n,1,.5);let s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)i[s]*=1-t-e,i[s]+=t;return i}function id(n,t,e,i,s){return n===s?(t-e)/i+(t<e?6:0):t===s?(e-n)/i+2:(n-t)/i+4}function no(n){const e=n.r/255,i=n.g/255,s=n.b/255,r=Math.max(e,i,s),o=Math.min(e,i,s),a=(r+o)/2;let c,f,u;return r!==o&&(u=r-o,f=a>.5?u/(2-r-o):u/(r+o),c=id(e,i,s,u,r),c=c*60+.5),[c|0,f||0,a]}function io(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(Sn)}function so(n,t,e){return io(_c,n,t,e)}function sd(n,t,e){return io(nd,n,t,e)}function rd(n,t,e){return io(ed,n,t,e)}function vc(n){return(n%360+360)%360}function od(n){const t=td.exec(n);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?Ti(+t[5]):Sn(+t[5]));const s=vc(+t[2]),r=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=sd(s,r,o):t[1]==="hsv"?i=rd(s,r,o):i=so(s,r,o),{r:i[0],g:i[1],b:i[2],a:e}}function ad(n,t){var e=no(n);e[0]=vc(e[0]+t),e=so(e),n.r=e[0],n.g=e[1],n.b=e[2]}function ld(n){if(!n)return;const t=no(n),e=t[0],i=ga(t[1]),s=ga(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${s}%, ${un(n.a)})`:`hsl(${e}, ${i}%, ${s}%)`}const ma={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},ba={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function cd(){const n={},t=Object.keys(ba),e=Object.keys(ma);let i,s,r,o,a;for(i=0;i<t.length;i++){for(o=a=t[i],s=0;s<e.length;s++)r=e[s],a=a.replace(r,ma[r]);r=parseInt(ba[o],16),n[a]=[r>>16&255,r>>8&255,r&255]}return n}let rs;function ud(n){rs||(rs=cd(),rs.transparent=[0,0,0,0]);const t=rs[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const fd=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function hd(n){const t=fd.exec(n);let e=255,i,s,r;if(t){if(t[7]!==i){const o=+t[7];e=t[8]?Ti(o):xn(o*255,0,255)}return i=+t[1],s=+t[3],r=+t[5],i=255&(t[2]?Ti(i):xn(i,0,255)),s=255&(t[4]?Ti(s):xn(s,0,255)),r=255&(t[6]?Ti(r):xn(r,0,255)),{r:i,g:s,b:r,a:e}}}function dd(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${un(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const vr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,ii=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function pd(n,t,e){const i=ii(un(n.r)),s=ii(un(n.g)),r=ii(un(n.b));return{r:Sn(vr(i+e*(ii(un(t.r))-i))),g:Sn(vr(s+e*(ii(un(t.g))-s))),b:Sn(vr(r+e*(ii(un(t.b))-r))),a:n.a+e*(t.a-n.a)}}function os(n,t,e){if(n){let i=no(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=so(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function wc(n,t){return n&&Object.assign(t||{},n)}function ya(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=Sn(n[3]))):(t=wc(n,{r:0,g:0,b:0,a:1}),t.a=Sn(t.a)),t}function gd(n){return n.charAt(0)==="r"?hd(n):od(n)}class Ii{constructor(t){if(t instanceof Ii)return t;const e=typeof t;let i;e==="object"?i=ya(t):e==="string"&&(i=Qh(t)||ud(t)||gd(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=wc(this._rgb);return t&&(t.a=un(t.a)),t}set rgb(t){this._rgb=ya(t)}rgbString(){return this._valid?dd(this._rgb):void 0}hexString(){return this._valid?Zh(this._rgb):void 0}hslString(){return this._valid?ld(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let r;const o=e===r?.5:e,a=2*o-1,c=i.a-s.a,f=((a*c===-1?a:(a+c)/(1+a*c))+1)/2;r=1-f,i.r=255&f*i.r+r*s.r+.5,i.g=255&f*i.g+r*s.g+.5,i.b=255&f*i.b+r*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=pd(this._rgb,t._rgb,e)),this}clone(){return new Ii(this.rgb)}alpha(t){return this._rgb.a=Sn(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Xi(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return os(this._rgb,2,t),this}darken(t){return os(this._rgb,2,-t),this}saturate(t){return os(this._rgb,1,t),this}desaturate(t){return os(this._rgb,1,-t),this}rotate(t){return ad(this._rgb,t),this}}function an(){}const md=(()=>{let n=0;return()=>n++})();function St(n){return n==null}function $t(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function kt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function Qt(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function Re(n,t){return Qt(n)?n:t}function yt(n,t){return typeof n>"u"?t:n}const bd=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,Sc=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function zt(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function It(n,t,e,i){let s,r,o;if($t(n))for(r=n.length,s=0;s<r;s++)t.call(e,n[s],s);else if(kt(n))for(o=Object.keys(n),r=o.length,s=0;s<r;s++)t.call(e,n[o[s]],o[s])}function Es(n,t){let e,i,s,r;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(s=n[e],r=t[e],s.datasetIndex!==r.datasetIndex||s.index!==r.index)return!1;return!0}function Ps(n){if($t(n))return n.map(Ps);if(kt(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let s=0;for(;s<i;++s)t[e[s]]=Ps(n[e[s]]);return t}return n}function Ac(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function yd(n,t,e,i){if(!Ac(n))return;const s=t[n],r=e[n];kt(s)&&kt(r)?Ni(s,r,i):t[n]=Ps(r)}function Ni(n,t,e){const i=$t(t)?t:[t],s=i.length;if(!kt(n))return n;e=e||{};const r=e.merger||yd;let o;for(let a=0;a<s;++a){if(o=i[a],!kt(o))continue;const c=Object.keys(o);for(let f=0,u=c.length;f<u;++f)r(c[f],n,o,e)}return n}function Di(n,t){return Ni(n,t,{merger:xd})}function xd(n,t,e){if(!Ac(n))return;const i=t[n],s=e[n];kt(i)&&kt(s)?Di(i,s):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=Ps(s))}const xa={"":n=>n,x:n=>n.x,y:n=>n.y};function _d(n){const t=n.split("."),e=[];let i="";for(const s of t)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function vd(n){const t=_d(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function An(n,t){return(xa[t]||(xa[t]=vd(t)))(n)}function ro(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Bi=n=>typeof n<"u",Cn=n=>typeof n=="function",_a=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function wd(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Ot=Math.PI,Ut=2*Ot,Sd=Ut+Ot,Os=Number.POSITIVE_INFINITY,Ad=Ot/180,Jt=Ot/2,Rn=Ot/4,va=Ot*2/3,_n=Math.log10,tn=Math.sign;function Ri(n,t,e){return Math.abs(n-t)<e}function wa(n){const t=Math.round(n);n=Ri(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(_n(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Cd(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((s,r)=>s-r).pop(),t}function kd(n){return typeof n=="symbol"||typeof n=="object"&&n!==null&&!(Symbol.toPrimitive in n||"toString"in n||"valueOf"in n)}function li(n){return!kd(n)&&!isNaN(parseFloat(n))&&isFinite(n)}function Md(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function Cc(n,t,e){let i,s,r;for(i=0,s=n.length;i<s;i++)r=n[i][e],isNaN(r)||(t.min=Math.min(t.min,r),t.max=Math.max(t.max,r))}function We(n){return n*(Ot/180)}function oo(n){return n*(180/Ot)}function Sa(n){if(!Qt(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function kc(n,t){const e=t.x-n.x,i=t.y-n.y,s=Math.sqrt(e*e+i*i);let r=Math.atan2(i,e);return r<-.5*Ot&&(r+=Ut),{angle:r,distance:s}}function jr(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Td(n,t){return(n-t+Sd)%Ut-Ot}function be(n){return(n%Ut+Ut)%Ut}function Hi(n,t,e,i){const s=be(n),r=be(t),o=be(e),a=be(r-s),c=be(o-s),f=be(s-r),u=be(s-o);return s===r||s===o||i&&r===o||a>c&&f<u}function ue(n,t,e){return Math.max(t,Math.min(e,n))}function Ed(n){return ue(n,-32768,32767)}function fn(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function ao(n,t,e){e=e||(o=>n[o]<t);let i=n.length-1,s=0,r;for(;i-s>1;)r=s+i>>1,e(r)?s=r:i=r;return{lo:s,hi:i}}const hn=(n,t,e,i)=>ao(n,e,i?s=>{const r=n[s][t];return r<e||r===e&&n[s+1][t]===e}:s=>n[s][t]<e),Pd=(n,t,e)=>ao(n,e,i=>n[i][t]>=e);function Od(n,t,e){let i=0,s=n.length;for(;i<s&&n[i]<t;)i++;for(;s>i&&n[s-1]>e;)s--;return i>0||s<n.length?n.slice(i,s):n}const Mc=["push","pop","shift","splice","unshift"];function Dd(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Mc.forEach(e=>{const i="_onData"+ro(e),s=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...r){const o=s.apply(this,r);return n._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...r)}),o}})})}function Aa(n,t){const e=n._chartjs;if(!e)return;const i=e.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(Mc.forEach(r=>{delete n[r]}),delete n._chartjs)}function Tc(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const Ec=(function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame})();function Pc(n,t){let e=[],i=!1;return function(...s){e=s,i||(i=!0,Ec.call(window,()=>{i=!1,n.apply(t,e)}))}}function Rd(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const lo=n=>n==="start"?"left":n==="end"?"right":"center",me=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,Ld=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function Oc(n,t,e){const i=t.length;let s=0,r=i;if(n._sorted){const{iScale:o,vScale:a,_parsed:c}=n,f=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null,u=o.axis,{min:d,max:p,minDefined:b,maxDefined:y}=o.getUserBounds();if(b){if(s=Math.min(hn(c,u,d).lo,e?i:hn(t,u,o.getPixelForValue(d)).lo),f){const _=c.slice(0,s+1).reverse().findIndex(S=>!St(S[a.axis]));s-=Math.max(0,_)}s=ue(s,0,i-1)}if(y){let _=Math.max(hn(c,o.axis,p,!0).hi+1,e?0:hn(t,u,o.getPixelForValue(p),!0).hi+1);if(f){const S=c.slice(_-1).findIndex(A=>!St(A[a.axis]));_+=Math.max(0,S)}r=ue(_,s,i)-s}else r=i-s}return{start:s,count:r}}function Dc(n){const{xScale:t,yScale:e,_scaleRanges:i}=n,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=s,!0;const r=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,s),r}const as=n=>n===0||n===1,Ca=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*Ut/e)),ka=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*Ut/e)+1,Li={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Jt)+1,easeOutSine:n=>Math.sin(n*Jt),easeInOutSine:n=>-.5*(Math.cos(Ot*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>as(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>as(n)?n:Ca(n,.075,.3),easeOutElastic:n=>as(n)?n:ka(n,.075,.3),easeInOutElastic(n){return as(n)?n:n<.5?.5*Ca(n*2,.1125,.45):.5+.5*ka(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-Li.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?Li.easeInBounce(n*2)*.5:Li.easeOutBounce(n*2-1)*.5+.5};function co(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ma(n){return co(n)?n:new Ii(n)}function wr(n){return co(n)?n:new Ii(n).saturate(.5).darken(.1).hexString()}const Fd=["x","y","borderWidth","radius","tension"],Id=["color","borderColor","backgroundColor"];function Nd(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:Id},numbers:{type:"number",properties:Fd}}),n.describe("animations",{_fallback:"animation"}),n.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:t=>t|0}}}})}function Bd(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ta=new Map;function Hd(n,t){t=t||{};const e=n+JSON.stringify(t);let i=Ta.get(e);return i||(i=new Intl.NumberFormat(n,t),Ta.set(e,i)),i}function Yi(n,t,e){return Hd(t,e).format(n)}const Rc={values(n){return $t(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let s,r=n;if(e.length>1){const f=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(f<1e-4||f>1e15)&&(s="scientific"),r=jd(n,e)}const o=_n(Math.abs(r)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(c,this.options.ticks.format),Yi(n,i,c)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(_n(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Rc.numeric.call(this,n,t,e):""}};function jd(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var Ws={formatters:Rc};function zd(n){n.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:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.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:Ws.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const $n=Object.create(null),zr=Object.create(null);function Fi(n,t){if(!t)return n;const e=t.split(".");for(let i=0,s=e.length;i<s;++i){const r=e[i];n=n[r]||(n[r]=Object.create(null))}return n}function Sr(n,t,e){return typeof t=="string"?Ni(Fi(n,t),e):Ni(Fi(n,""),t)}class Ud{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.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=(i,s)=>wr(s.backgroundColor),this.hoverBorderColor=(i,s)=>wr(s.borderColor),this.hoverColor=(i,s)=>wr(s.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(t),this.apply(e)}set(t,e){return Sr(this,t,e)}get(t){return Fi(this,t)}describe(t,e){return Sr(zr,t,e)}override(t,e){return Sr($n,t,e)}route(t,e,i,s){const r=Fi(this,t),o=Fi(this,i),a="_"+e;Object.defineProperties(r,{[a]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const c=this[a],f=o[s];return kt(c)?Object.assign({},f,c):yt(c,f)},set(c){this[a]=c}}})}apply(t){t.forEach(e=>e(this))}}var qt=new Ud({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Nd,Bd,zd]);function Wd(n){return!n||St(n.size)||St(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Ds(n,t,e,i,s){let r=t[s];return r||(r=t[s]=n.measureText(s).width,e.push(s)),r>i&&(i=r),i}function Vd(n,t,e,i){i=i||{};let s=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(s=i.data={},r=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let o=0;const a=e.length;let c,f,u,d,p;for(c=0;c<a;c++)if(d=e[c],d!=null&&!$t(d))o=Ds(n,s,r,o,d);else if($t(d))for(f=0,u=d.length;f<u;f++)p=d[f],p!=null&&!$t(p)&&(o=Ds(n,s,r,o,p));n.restore();const b=r.length/2;if(b>e.length){for(c=0;c<b;c++)delete s[r[c]];r.splice(0,b)}return o}function Ln(n,t,e){const i=n.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*i)/i+s}function Ea(n,t){!t&&!n||(t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore())}function Ur(n,t,e,i){Lc(n,t,e,i,null)}function Lc(n,t,e,i,s){let r,o,a,c,f,u,d,p;const b=t.pointStyle,y=t.rotation,_=t.radius;let S=(y||0)*Ad;if(b&&typeof b=="object"&&(r=b.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(S),n.drawImage(b,-b.width/2,-b.height/2,b.width,b.height),n.restore();return}if(!(isNaN(_)||_<=0)){switch(n.beginPath(),b){default:s?n.ellipse(e,i,s/2,_,0,0,Ut):n.arc(e,i,_,0,Ut),n.closePath();break;case"triangle":u=s?s/2:_,n.moveTo(e+Math.sin(S)*u,i-Math.cos(S)*_),S+=va,n.lineTo(e+Math.sin(S)*u,i-Math.cos(S)*_),S+=va,n.lineTo(e+Math.sin(S)*u,i-Math.cos(S)*_),n.closePath();break;case"rectRounded":f=_*.516,c=_-f,o=Math.cos(S+Rn)*c,d=Math.cos(S+Rn)*(s?s/2-f:c),a=Math.sin(S+Rn)*c,p=Math.sin(S+Rn)*(s?s/2-f:c),n.arc(e-d,i-a,f,S-Ot,S-Jt),n.arc(e+p,i-o,f,S-Jt,S),n.arc(e+d,i+a,f,S,S+Jt),n.arc(e-p,i+o,f,S+Jt,S+Ot),n.closePath();break;case"rect":if(!y){c=Math.SQRT1_2*_,u=s?s/2:c,n.rect(e-u,i-c,2*u,2*c);break}S+=Rn;case"rectRot":d=Math.cos(S)*(s?s/2:_),o=Math.cos(S)*_,a=Math.sin(S)*_,p=Math.sin(S)*(s?s/2:_),n.moveTo(e-d,i-a),n.lineTo(e+p,i-o),n.lineTo(e+d,i+a),n.lineTo(e-p,i+o),n.closePath();break;case"crossRot":S+=Rn;case"cross":d=Math.cos(S)*(s?s/2:_),o=Math.cos(S)*_,a=Math.sin(S)*_,p=Math.sin(S)*(s?s/2:_),n.moveTo(e-d,i-a),n.lineTo(e+d,i+a),n.moveTo(e+p,i-o),n.lineTo(e-p,i+o);break;case"star":d=Math.cos(S)*(s?s/2:_),o=Math.cos(S)*_,a=Math.sin(S)*_,p=Math.sin(S)*(s?s/2:_),n.moveTo(e-d,i-a),n.lineTo(e+d,i+a),n.moveTo(e+p,i-o),n.lineTo(e-p,i+o),S+=Rn,d=Math.cos(S)*(s?s/2:_),o=Math.cos(S)*_,a=Math.sin(S)*_,p=Math.sin(S)*(s?s/2:_),n.moveTo(e-d,i-a),n.lineTo(e+d,i+a),n.moveTo(e+p,i-o),n.lineTo(e-p,i+o);break;case"line":o=s?s/2:Math.cos(S)*_,a=Math.sin(S)*_,n.moveTo(e-o,i-a),n.lineTo(e+o,i+a);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(S)*(s?s/2:_),i+Math.sin(S)*_);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function dn(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function Vs(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function $s(n){n.restore()}function $d(n,t,e,i,s){if(!t)return n.lineTo(e.x,e.y);if(s==="middle"){const r=(t.x+e.x)/2;n.lineTo(r,t.y),n.lineTo(r,e.y)}else s==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function qd(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function Xd(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),St(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function Yd(n,t,e,i,s){if(s.strikethrough||s.underline){const r=n.measureText(i),o=t-r.actualBoundingBoxLeft,a=t+r.actualBoundingBoxRight,c=e-r.actualBoundingBoxAscent,f=e+r.actualBoundingBoxDescent,u=s.strikethrough?(c+f)/2:f;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(o,u),n.lineTo(a,u),n.stroke()}}function Kd(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function qn(n,t,e,i,s,r={}){const o=$t(t)?t:[t],a=r.strokeWidth>0&&r.strokeColor!=="";let c,f;for(n.save(),n.font=s.string,Xd(n,r),c=0;c<o.length;++c)f=o[c],r.backdrop&&Kd(n,r.backdrop),a&&(r.strokeColor&&(n.strokeStyle=r.strokeColor),St(r.strokeWidth)||(n.lineWidth=r.strokeWidth),n.strokeText(f,e,i,r.maxWidth)),n.fillText(f,e,i,r.maxWidth),Yd(n,e,i,f,r),i+=Number(s.lineHeight);n.restore()}function ji(n,t){const{x:e,y:i,w:s,h:r,radius:o}=t;n.arc(e+o.topLeft,i+o.topLeft,o.topLeft,1.5*Ot,Ot,!0),n.lineTo(e,i+r-o.bottomLeft),n.arc(e+o.bottomLeft,i+r-o.bottomLeft,o.bottomLeft,Ot,Jt,!0),n.lineTo(e+s-o.bottomRight,i+r),n.arc(e+s-o.bottomRight,i+r-o.bottomRight,o.bottomRight,Jt,0,!0),n.lineTo(e+s,i+o.topRight),n.arc(e+s-o.topRight,i+o.topRight,o.topRight,0,-Jt,!0),n.lineTo(e+o.topLeft,i)}const Gd=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Qd=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Jd(n,t){const e=(""+n).match(Gd);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const Zd=n=>+n||0;function uo(n,t){const e={},i=kt(t),s=i?Object.keys(t):t,r=kt(n)?i?o=>yt(n[o],n[t[o]]):o=>n[o]:()=>n;for(const o of s)e[o]=Zd(r(o));return e}function Fc(n){return uo(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Un(n){return uo(n,["topLeft","topRight","bottomLeft","bottomRight"])}function _e(n){const t=Fc(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function se(n,t){n=n||{},t=t||qt.font;let e=yt(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=yt(n.style,t.style);i&&!(""+i).match(Qd)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:yt(n.family,t.family),lineHeight:Jd(yt(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:yt(n.weight,t.weight),string:""};return s.string=Wd(s),s}function Ei(n,t,e,i){let s,r,o;for(s=0,r=n.length;s<r;++s)if(o=n[s],o!==void 0&&o!==void 0)return o}function tp(n,t,e){const{min:i,max:s}=n,r=Sc(t,(s-i)/2),o=(a,c)=>e&&a===0?0:a+c;return{min:o(i,-Math.abs(r)),max:o(s,r)}}function kn(n,t){return Object.assign(Object.create(n),t)}function fo(n,t=[""],e,i,s=()=>n[0]){const r=e||n;typeof i>"u"&&(i=Hc("_fallback",n));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:r,_fallback:i,_getTarget:s,override:a=>fo([a,...n],t,r,i)};return new Proxy(o,{deleteProperty(a,c){return delete a[c],delete a._keys,delete n[0][c],!0},get(a,c){return Nc(a,c,()=>lp(c,t,n,a))},getOwnPropertyDescriptor(a,c){return Reflect.getOwnPropertyDescriptor(a._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(a,c){return Oa(a).includes(c)},ownKeys(a){return Oa(a)},set(a,c,f){const u=a._storage||(a._storage=s());return a[c]=u[c]=f,delete a._keys,!0}})}function ci(n,t,e,i){const s={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Ic(n,i),setContext:r=>ci(n,r,e,i),override:r=>ci(n.override(r),t,e,i)};return new Proxy(s,{deleteProperty(r,o){return delete r[o],delete n[o],!0},get(r,o,a){return Nc(r,o,()=>np(r,o,a))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(r,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(r,o,a){return n[o]=a,delete r[o],!0}})}function Ic(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=n;return{allKeys:s,scriptable:e,indexable:i,isScriptable:Cn(e)?e:()=>e,isIndexable:Cn(i)?i:()=>i}}const ep=(n,t)=>n?n+ro(t):t,ho=(n,t)=>kt(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Nc(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t)||t==="constructor")return n[t];const i=e();return n[t]=i,i}function np(n,t,e){const{_proxy:i,_context:s,_subProxy:r,_descriptors:o}=n;let a=i[t];return Cn(a)&&o.isScriptable(t)&&(a=ip(t,a,n,e)),$t(a)&&a.length&&(a=sp(t,a,n,o.isIndexable)),ho(t,a)&&(a=ci(a,s,r&&r[t],o)),a}function ip(n,t,e,i){const{_proxy:s,_context:r,_subProxy:o,_stack:a}=e;if(a.has(n))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+n);a.add(n);let c=t(r,o||i);return a.delete(n),ho(n,c)&&(c=po(s._scopes,s,n,c)),c}function sp(n,t,e,i){const{_proxy:s,_context:r,_subProxy:o,_descriptors:a}=e;if(typeof r.index<"u"&&i(n))return t[r.index%t.length];if(kt(t[0])){const c=t,f=s._scopes.filter(u=>u!==c);t=[];for(const u of c){const d=po(f,s,n,u);t.push(ci(d,r,o&&o[n],a))}}return t}function Bc(n,t,e){return Cn(n)?n(t,e):n}const rp=(n,t)=>n===!0?t:typeof n=="string"?An(t,n):void 0;function op(n,t,e,i,s){for(const r of t){const o=rp(e,r);if(o){n.add(o);const a=Bc(o._fallback,e,s);if(typeof a<"u"&&a!==e&&a!==i)return a}else if(o===!1&&typeof i<"u"&&e!==i)return null}return!1}function po(n,t,e,i){const s=t._rootScopes,r=Bc(t._fallback,e,i),o=[...n,...s],a=new Set;a.add(i);let c=Pa(a,o,e,r||e,i);return c===null||typeof r<"u"&&r!==e&&(c=Pa(a,o,r,c,i),c===null)?!1:fo(Array.from(a),[""],s,r,()=>ap(t,e,i))}function Pa(n,t,e,i,s){for(;e;)e=op(n,t,e,i,s);return e}function ap(n,t,e){const i=n._getTarget();t in i||(i[t]={});const s=i[t];return $t(s)&&kt(e)?e:s||{}}function lp(n,t,e,i){let s;for(const r of t)if(s=Hc(ep(r,n),e),typeof s<"u")return ho(n,s)?po(e,i,n,s):s}function Hc(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function Oa(n){let t=n._keys;return t||(t=n._keys=cp(n._scopes)),t}function cp(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}function jc(n,t,e,i){const{iScale:s}=n,{key:r="r"}=this._parsing,o=new Array(i);let a,c,f,u;for(a=0,c=i;a<c;++a)f=a+e,u=t[f],o[a]={r:s.parse(An(u,r),f)};return o}const up=Number.EPSILON||1e-14,ui=(n,t)=>t<n.length&&!n[t].skip&&n[t],zc=n=>n==="x"?"y":"x";function fp(n,t,e,i){const s=n.skip?t:n,r=t,o=e.skip?t:e,a=jr(r,s),c=jr(o,r);let f=a/(a+c),u=c/(a+c);f=isNaN(f)?0:f,u=isNaN(u)?0:u;const d=i*f,p=i*u;return{previous:{x:r.x-d*(o.x-s.x),y:r.y-d*(o.y-s.y)},next:{x:r.x+p*(o.x-s.x),y:r.y+p*(o.y-s.y)}}}function hp(n,t,e){const i=n.length;let s,r,o,a,c,f=ui(n,0);for(let u=0;u<i-1;++u)if(c=f,f=ui(n,u+1),!(!c||!f)){if(Ri(t[u],0,up)){e[u]=e[u+1]=0;continue}s=e[u]/t[u],r=e[u+1]/t[u],a=Math.pow(s,2)+Math.pow(r,2),!(a<=9)&&(o=3/Math.sqrt(a),e[u]=s*o*t[u],e[u+1]=r*o*t[u])}}function dp(n,t,e="x"){const i=zc(e),s=n.length;let r,o,a,c=ui(n,0);for(let f=0;f<s;++f){if(o=a,a=c,c=ui(n,f+1),!a)continue;const u=a[e],d=a[i];o&&(r=(u-o[e])/3,a[`cp1${e}`]=u-r,a[`cp1${i}`]=d-r*t[f]),c&&(r=(c[e]-u)/3,a[`cp2${e}`]=u+r,a[`cp2${i}`]=d+r*t[f])}}function pp(n,t="x"){const e=zc(t),i=n.length,s=Array(i).fill(0),r=Array(i);let o,a,c,f=ui(n,0);for(o=0;o<i;++o)if(a=c,c=f,f=ui(n,o+1),!!c){if(f){const u=f[t]-c[t];s[o]=u!==0?(f[e]-c[e])/u:0}r[o]=a?f?tn(s[o-1])!==tn(s[o])?0:(s[o-1]+s[o])/2:s[o-1]:s[o]}hp(n,s,r),dp(n,r,t)}function ls(n,t,e){return Math.max(Math.min(n,e),t)}function gp(n,t){let e,i,s,r,o,a=dn(n[0],t);for(e=0,i=n.length;e<i;++e)o=r,r=a,a=e<i-1&&dn(n[e+1],t),r&&(s=n[e],o&&(s.cp1x=ls(s.cp1x,t.left,t.right),s.cp1y=ls(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=ls(s.cp2x,t.left,t.right),s.cp2y=ls(s.cp2y,t.top,t.bottom)))}function mp(n,t,e,i,s){let r,o,a,c;if(t.spanGaps&&(n=n.filter(f=>!f.skip)),t.cubicInterpolationMode==="monotone")pp(n,s);else{let f=i?n[n.length-1]:n[0];for(r=0,o=n.length;r<o;++r)a=n[r],c=fp(f,a,n[Math.min(r+1,o-(i?0:1))%o],t.tension),a.cp1x=c.previous.x,a.cp1y=c.previous.y,a.cp2x=c.next.x,a.cp2y=c.next.y,f=a}t.capBezierPoints&&gp(n,e)}function go(){return typeof window<"u"&&typeof document<"u"}function mo(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Rs(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const qs=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function bp(n,t){return qs(n).getPropertyValue(t)}const yp=["top","right","bottom","left"];function Wn(n,t,e){const i={};e=e?"-"+e:"";for(let s=0;s<4;s++){const r=yp[s];i[r]=parseFloat(n[t+"-"+r+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const xp=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function _p(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:s,offsetY:r}=i;let o=!1,a,c;if(xp(s,r,n.target))a=s,c=r;else{const f=t.getBoundingClientRect();a=i.clientX-f.left,c=i.clientY-f.top,o=!0}return{x:a,y:c,box:o}}function Nn(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,s=qs(e),r=s.boxSizing==="border-box",o=Wn(s,"padding"),a=Wn(s,"border","width"),{x:c,y:f,box:u}=_p(n,e),d=o.left+(u&&a.left),p=o.top+(u&&a.top);let{width:b,height:y}=t;return r&&(b-=o.width+a.width,y-=o.height+a.height),{x:Math.round((c-d)/b*e.width/i),y:Math.round((f-p)/y*e.height/i)}}function vp(n,t,e){let i,s;if(t===void 0||e===void 0){const r=n&&mo(n);if(!r)t=n.clientWidth,e=n.clientHeight;else{const o=r.getBoundingClientRect(),a=qs(r),c=Wn(a,"border","width"),f=Wn(a,"padding");t=o.width-f.width-c.width,e=o.height-f.height-c.height,i=Rs(a.maxWidth,r,"clientWidth"),s=Rs(a.maxHeight,r,"clientHeight")}}return{width:t,height:e,maxWidth:i||Os,maxHeight:s||Os}}const vn=n=>Math.round(n*10)/10;function wp(n,t,e,i){const s=qs(n),r=Wn(s,"margin"),o=Rs(s.maxWidth,n,"clientWidth")||Os,a=Rs(s.maxHeight,n,"clientHeight")||Os,c=vp(n,t,e);let{width:f,height:u}=c;if(s.boxSizing==="content-box"){const p=Wn(s,"border","width"),b=Wn(s,"padding");f-=b.width+p.width,u-=b.height+p.height}return f=Math.max(0,f-r.width),u=Math.max(0,i?f/i:u-r.height),f=vn(Math.min(f,o,c.maxWidth)),u=vn(Math.min(u,a,c.maxHeight)),f&&!u&&(u=vn(f/2)),(t!==void 0||e!==void 0)&&i&&c.height&&u>c.height&&(u=c.height,f=vn(Math.floor(u*i))),{width:f,height:u}}function Da(n,t,e){const i=t||1,s=vn(n.height*i),r=vn(n.width*i);n.height=vn(n.height),n.width=vn(n.width);const o=n.canvas;return o.style&&(e||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==s||o.width!==r?(n.currentDevicePixelRatio=i,o.height=s,o.width=r,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Sp=(function(){let n=!1;try{const t={get passive(){return n=!0,!1}};go()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return n})();function Ra(n,t){const e=bp(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Bn(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Ap(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Cp(n,t,e,i){const s={x:n.cp2x,y:n.cp2y},r={x:t.cp1x,y:t.cp1y},o=Bn(n,s,e),a=Bn(s,r,e),c=Bn(r,t,e),f=Bn(o,a,e),u=Bn(a,c,e);return Bn(f,u,e)}const kp=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},Mp=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function oi(n,t,e){return n?kp(t,e):Mp()}function Uc(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function Wc(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Vc(n){return n==="angle"?{between:Hi,compare:Td,normalize:be}:{between:fn,compare:(t,e)=>t-e,normalize:t=>t}}function La({start:n,end:t,count:e,loop:i,style:s}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:s}}function Tp(n,t,e){const{property:i,start:s,end:r}=e,{between:o,normalize:a}=Vc(i),c=t.length;let{start:f,end:u,loop:d}=n,p,b;if(d){for(f+=c,u+=c,p=0,b=c;p<b&&o(a(t[f%c][i]),s,r);++p)f--,u--;f%=c,u%=c}return u<f&&(u+=c),{start:f,end:u,loop:d,style:n.style}}function $c(n,t,e){if(!e)return[n];const{property:i,start:s,end:r}=e,o=t.length,{compare:a,between:c,normalize:f}=Vc(i),{start:u,end:d,loop:p,style:b}=Tp(n,t,e),y=[];let _=!1,S=null,A,L,I;const D=()=>c(s,I,A)&&a(s,I)!==0,N=()=>a(r,A)===0||c(r,I,A),P=()=>_||D(),g=()=>!_||N();for(let M=u,k=u;M<=d;++M)L=t[M%o],!L.skip&&(A=f(L[i]),A!==I&&(_=c(A,s,r),S===null&&P()&&(S=a(A,s)===0?M:k),S!==null&&g()&&(y.push(La({start:S,end:M,loop:p,count:o,style:b})),S=null),k=M,I=A));return S!==null&&y.push(La({start:S,end:d,loop:p,count:o,style:b})),y}function qc(n,t){const e=[],i=n.segments;for(let s=0;s<i.length;s++){const r=$c(i[s],n.points,t);r.length&&e.push(...r)}return e}function Ep(n,t,e,i){let s=0,r=t-1;if(e&&!i)for(;s<t&&!n[s].skip;)s++;for(;s<t&&n[s].skip;)s++;for(s%=t,e&&(r+=s);r>s&&n[r%t].skip;)r--;return r%=t,{start:s,end:r}}function Pp(n,t,e,i){const s=n.length,r=[];let o=t,a=n[t],c;for(c=t+1;c<=e;++c){const f=n[c%s];f.skip||f.stop?a.skip||(i=!1,r.push({start:t%s,end:(c-1)%s,loop:i}),t=o=f.stop?c:null):(o=c,a.skip&&(t=c)),a=f}return o!==null&&r.push({start:t%s,end:o%s,loop:i}),r}function Op(n,t){const e=n.points,i=n.options.spanGaps,s=e.length;if(!s)return[];const r=!!n._loop,{start:o,end:a}=Ep(e,s,r,i);if(i===!0)return Fa(n,[{start:o,end:a,loop:r}],e,t);const c=a<o?a+s:a,f=!!n._fullLoop&&o===0&&a===s-1;return Fa(n,Pp(e,o,c,f),e,t)}function Fa(n,t,e,i){return!i||!i.setContext||!e?t:Dp(n,t,e,i)}function Dp(n,t,e,i){const s=n._chart.getContext(),r=Ia(n.options),{_datasetIndex:o,options:{spanGaps:a}}=n,c=e.length,f=[];let u=r,d=t[0].start,p=d;function b(y,_,S,A){const L=a?-1:1;if(y!==_){for(y+=c;e[y%c].skip;)y-=L;for(;e[_%c].skip;)_+=L;y%c!==_%c&&(f.push({start:y%c,end:_%c,loop:S,style:A}),u=A,d=_%c)}}for(const y of t){d=a?d:y.start;let _=e[d%c],S;for(p=d+1;p<=y.end;p++){const A=e[p%c];S=Ia(i.setContext(kn(s,{type:"segment",p0:_,p1:A,p0DataIndex:(p-1)%c,p1DataIndex:p%c,datasetIndex:o}))),Rp(S,u)&&b(d,p-1,y.loop,u),_=A,u=S}d<p-1&&b(d,p-1,y.loop,u)}return f}function Ia(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function Rp(n,t){if(!t)return!1;const e=[],i=function(s,r){return co(r)?(e.includes(r)||e.push(r),e.indexOf(r)):r};return JSON.stringify(n,i)!==JSON.stringify(t,i)}function cs(n,t,e){return n.options.clip?n[e]:t[e]}function Lp(n,t){const{xScale:e,yScale:i}=n;return e&&i?{left:cs(e,t,"left"),right:cs(e,t,"right"),top:cs(i,t,"top"),bottom:cs(i,t,"bottom")}:t}function Xc(n,t){const e=t._clip;if(e.disabled)return!1;const i=Lp(t,n.chartArea);return{left:e.left===!1?0:i.left-(e.left===!0?0:e.left),right:e.right===!1?n.width:i.right+(e.right===!0?0:e.right),top:e.top===!1?0:i.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?n.height:i.bottom+(e.bottom===!0?0:e.bottom)}}class Fp{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const r=e.listeners[s],o=e.duration;r.forEach(a=>a({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Ec.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const r=i.items;let o=r.length-1,a=!1,c;for(;o>=0;--o)c=r[o],c._active?(c._total>i.duration&&(i.duration=c._total),c.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(s.draw(),this._notify(s,i,t,"progress")),r.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=r.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ln=new Fp;const Na="transparent",Ip={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=Ma(n||Na),s=i.valid&&Ma(t||Na);return s&&s.valid?s.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class Np{constructor(t,e,i,s){const r=e[i];s=Ei([t.to,s,r,t.from]);const o=Ei([t.from,r,s]);this._active=!0,this._fn=t.fn||Ip[t.type||typeof o],this._easing=Li[t.easing]||Li.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=Ei([t.to,e,s,t.from]),this._from=Ei([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,r=this._from,o=this._loop,a=this._to;let c;if(this._active=r!==a&&(o||e<i),!this._active){this._target[s]=a,this._notify(!0);return}if(e<0){this._target[s]=r;return}c=e/i%2,c=o&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[s]=this._fn(r,a,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][e]()}}class Yc{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!kt(t))return;const e=Object.keys(qt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const r=t[s];if(!kt(r))return;const o={};for(const a of e)o[a]=r[a];($t(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,o)})})}_animateOptions(t,e){const i=e.options,s=Hp(t,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&Bp(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,e){const i=this._properties,s=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let c;for(c=o.length-1;c>=0;--c){const f=o[c];if(f.charAt(0)==="$")continue;if(f==="options"){s.push(...this._animateOptions(t,e));continue}const u=e[f];let d=r[f];const p=i.get(f);if(d)if(p&&d.active()){d.update(p,u,a);continue}else d.cancel();if(!p||!p.duration){t[f]=u;continue}r[f]=d=new Np(p,t,f,u),s.push(d)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return ln.add(this._chart,i),!0}}function Bp(n,t){const e=[],i=Object.keys(t);for(let s=0;s<i.length;s++){const r=n[i[s]];r&&r.active()&&e.push(r.wait())}return Promise.all(e)}function Hp(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Ba(n,t){const e=n&&n.options||{},i=e.reverse,s=e.min===void 0?t:0,r=e.max===void 0?t:0;return{start:i?r:s,end:i?s:r}}function jp(n,t,e){if(e===!1)return!1;const i=Ba(n,e),s=Ba(t,e);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function zp(n){let t,e,i,s;return kt(n)?(t=n.top,e=n.right,i=n.bottom,s=n.left):t=e=i=s=n,{top:t,right:e,bottom:i,left:s,disabled:n===!1}}function Kc(n,t){const e=[],i=n._getSortedDatasetMetas(t);let s,r;for(s=0,r=i.length;s<r;++s)e.push(i[s].index);return e}function Ha(n,t,e,i={}){const s=n.keys,r=i.mode==="single";let o,a,c,f;if(t===null)return;let u=!1;for(o=0,a=s.length;o<a;++o){if(c=+s[o],c===e){if(u=!0,i.all)continue;break}f=n.values[c],Qt(f)&&(r||t===0||tn(t)===tn(f))&&(t+=f)}return!u&&!i.all?0:t}function Up(n,t){const{iScale:e,vScale:i}=t,s=e.axis==="x"?"x":"y",r=i.axis==="x"?"x":"y",o=Object.keys(n),a=new Array(o.length);let c,f,u;for(c=0,f=o.length;c<f;++c)u=o[c],a[c]={[s]:u,[r]:n[u]};return a}function Ar(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function Wp(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function Vp(n){const{min:t,max:e,minDefined:i,maxDefined:s}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function $p(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function ja(n,t,e,i){for(const s of t.getMatchingVisibleMetas(i).reverse()){const r=n[s.index];if(e&&r>0||!e&&r<0)return s.index}return null}function za(n,t){const{chart:e,_cachedMeta:i}=n,s=e._stacks||(e._stacks={}),{iScale:r,vScale:o,index:a}=i,c=r.axis,f=o.axis,u=Wp(r,o,i),d=t.length;let p;for(let b=0;b<d;++b){const y=t[b],{[c]:_,[f]:S}=y,A=y._stacks||(y._stacks={});p=A[f]=$p(s,u,_),p[a]=S,p._top=ja(p,o,!0,i.type),p._bottom=ja(p,o,!1,i.type);const L=p._visualValues||(p._visualValues={});L[a]=S}}function Cr(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function qp(n,t){return kn(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Xp(n,t,e){return kn(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Si(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const s of t){const r=s._stacks;if(!r||r[i]===void 0||r[i][e]===void 0)return;delete r[i][e],r[i]._visualValues!==void 0&&r[i]._visualValues[e]!==void 0&&delete r[i]._visualValues[e]}}}const kr=n=>n==="reset"||n==="none",Ua=(n,t)=>t?n:Object.assign({},n),Yp=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:Kc(e,!0),values:null};class Mn{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,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 t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ar(t.vScale,t),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(t){this.index!==t&&Si(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(d,p,b,y)=>d==="x"?p:d==="r"?y:b,r=e.xAxisID=yt(i.xAxisID,Cr(t,"x")),o=e.yAxisID=yt(i.yAxisID,Cr(t,"y")),a=e.rAxisID=yt(i.rAxisID,Cr(t,"r")),c=e.indexAxis,f=e.iAxisID=s(c,r,o,a),u=e.vAxisID=s(c,o,r,a);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(f),e.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Aa(this._data,this),t._stacked&&Si(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(kt(e)){const s=this._cachedMeta;this._data=Up(e,s)}else if(i!==e){if(i){Aa(i,this);const s=this._cachedMeta;Si(s),s._parsed=[]}e&&Object.isExtensible(e)&&Dd(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const r=e._stacked;e._stacked=Ar(e.vScale,e),e.stack!==i.stack&&(s=!0,Si(e),e.stack=i.stack),this._resyncElements(t),(s||r!==e._stacked)&&(za(this,e._parsed),e._stacked=Ar(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:o}=i,a=r.axis;let c=t===0&&e===s.length?!0:i._sorted,f=t>0&&i._parsed[t-1],u,d,p;if(this._parsing===!1)i._parsed=s,i._sorted=!0,p=s;else{$t(s[t])?p=this.parseArrayData(i,s,t,e):kt(s[t])?p=this.parseObjectData(i,s,t,e):p=this.parsePrimitiveData(i,s,t,e);const b=()=>d[a]===null||f&&d[a]<f[a];for(u=0;u<e;++u)i._parsed[u+t]=d=p[u],c&&(b()&&(c=!1),f=d);i._sorted=c}o&&za(this,p)}parsePrimitiveData(t,e,i,s){const{iScale:r,vScale:o}=t,a=r.axis,c=o.axis,f=r.getLabels(),u=r===o,d=new Array(s);let p,b,y;for(p=0,b=s;p<b;++p)y=p+i,d[p]={[a]:u||r.parse(f[y],y),[c]:o.parse(e[y],y)};return d}parseArrayData(t,e,i,s){const{xScale:r,yScale:o}=t,a=new Array(s);let c,f,u,d;for(c=0,f=s;c<f;++c)u=c+i,d=e[u],a[c]={x:r.parse(d[0],u),y:o.parse(d[1],u)};return a}parseObjectData(t,e,i,s){const{xScale:r,yScale:o}=t,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,f=new Array(s);let u,d,p,b;for(u=0,d=s;u<d;++u)p=u+i,b=e[p],f[u]={x:r.parse(An(b,a),p),y:o.parse(An(b,c),p)};return f}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const s=this.chart,r=this._cachedMeta,o=e[t.axis],a={keys:Kc(s,!0),values:e._stacks[t.axis]._visualValues};return Ha(a,o,r.index,{mode:i})}updateRangeFromParsed(t,e,i,s){const r=i[e.axis];let o=r===null?NaN:r;const a=s&&i._stacks[e.axis];s&&a&&(s.values=a,o=Ha(s,r,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,r=i._sorted&&t===i.iScale,o=s.length,a=this._getOtherScale(t),c=Yp(e,i,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Vp(a);let p,b;function y(){b=s[p];const _=b[a.axis];return!Qt(b[t.axis])||u>_||d<_}for(p=0;p<o&&!(!y()&&(this.updateRangeFromParsed(f,t,b,c),r));++p);if(r){for(p=o-1;p>=0;--p)if(!y()){this.updateRangeFromParsed(f,t,b,c);break}}return f}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,r,o;for(s=0,r=e.length;s<r;++s)o=e[s][t.axis],Qt(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,r=this.getParsed(t);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:s?""+s.getLabelForValue(r[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=zp(yt(this.options.clip,jp(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],r=e.chartArea,o=[],a=this._drawStart||0,c=this._drawCount||s.length-a,f=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,r,a,c),u=a;u<a+c;++u){const d=s[u];d.hidden||(d.active&&f?o.push(d):d.draw(t,r))}for(u=0;u<o.length;++u)o[u].draw(t,r)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];r=o.$context||(o.$context=Xp(this.getContext(),t,o)),r.parsed=this.getParsed(t),r.raw=s.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=qp(this.chart.getContext(),this.index)),r.dataset=s,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const s=e==="active",r=this._cachedDataOpts,o=t+"-"+e,a=r[o],c=this.enableOptionSharing&&Bi(i);if(a)return Ua(a,c);const f=this.chart.config,u=f.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],p=f.getOptionScopes(this.getDataset(),u),b=Object.keys(qt.elements[t]),y=()=>this.getContext(i,s,e),_=f.resolveNamedOptions(p,b,y,d);return _.$shared&&(_.$shared=c,r[o]=Object.freeze(Ua(_,c))),_}_resolveAnimations(t,e,i){const s=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,a=r[o];if(a)return a;let c;if(s.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,e),p=u.getOptionScopes(this.getDataset(),d);c=u.createResolver(p,this.getContext(t,i,e))}const f=new Yc(s,c&&c.animations);return c&&c._cacheable&&(r[o]=Object.freeze(f)),f}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||kr(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(e,r)||r!==s;return this.updateSharedOptions(r,e,i),{sharedOptions:r,includeOptions:o}}updateElement(t,e,i,s){kr(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!kr(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const r=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[a,c,f]of this._syncList)this[a](c,f);this._syncList=[];const s=i.length,r=e.length,o=Math.min(r,s);o&&this.parse(0,o),r>s?this._insertElements(s,r-s,t):r<s&&this._removeElements(r,s-r)}_insertElements(t,e,i=!0){const s=this._cachedMeta,r=s.data,o=t+e;let a;const c=f=>{for(f.length+=e,a=f.length-1;a>=o;a--)f[a]=f[a-e]};for(c(r),a=t;a<o;++a)r[a]=new this.dataElementType;this._parsing&&c(s._parsed),this.parse(t,e),i&&this.updateElements(r,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,e);i._stacked&&Si(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Kp(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let s=0,r=e.length;s<r;s++)i=i.concat(e[s].controller.getAllParsedValues(n));n._cache.$bar=Tc(i.sort((s,r)=>s-r))}return n._cache.$bar}function Gp(n){const t=n.iScale,e=Kp(t,n.type);let i=t._length,s,r,o,a;const c=()=>{o===32767||o===-32768||(Bi(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(s=0,r=e.length;s<r;++s)o=t.getPixelForValue(e[s]),c();for(a=void 0,s=0,r=t.ticks.length;s<r;++s)o=t.getPixelForTick(s),c();return i}function Qp(n,t,e,i){const s=e.barThickness;let r,o;return St(s)?(r=t.min*e.categoryPercentage,o=e.barPercentage):(r=s*i,o=1),{chunk:r/i,ratio:o,start:t.pixels[n]-r/2}}function Jp(n,t,e,i){const s=t.pixels,r=s[n];let o=n>0?s[n-1]:null,a=n<s.length-1?s[n+1]:null;const c=e.categoryPercentage;o===null&&(o=r-(a===null?t.end-t.start:a-r)),a===null&&(a=r+r-o);const f=r-(r-Math.min(o,a))/2*c;return{chunk:Math.abs(a-o)/2*c/i,ratio:e.barPercentage,start:f}}function Zp(n,t,e,i){const s=e.parse(n[0],i),r=e.parse(n[1],i),o=Math.min(s,r),a=Math.max(s,r);let c=o,f=a;Math.abs(o)>Math.abs(a)&&(c=a,f=o),t[e.axis]=f,t._custom={barStart:c,barEnd:f,start:s,end:r,min:o,max:a}}function Gc(n,t,e,i){return $t(n)?Zp(n,t,e,i):t[e.axis]=e.parse(n,i),t}function Wa(n,t,e,i){const s=n.iScale,r=n.vScale,o=s.getLabels(),a=s===r,c=[];let f,u,d,p;for(f=e,u=e+i;f<u;++f)p=t[f],d={},d[s.axis]=a||s.parse(o[f],f),c.push(Gc(p,d,r,f));return c}function Mr(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function tg(n,t,e){return n!==0?tn(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function eg(n){let t,e,i,s,r;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(s="end",r="start"):(s="start",r="end"),{start:e,end:i,reverse:t,top:s,bottom:r}}function ng(n,t,e,i){let s=t.borderSkipped;const r={};if(!s){n.borderSkipped=r;return}if(s===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:c,top:f,bottom:u}=eg(n);s==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?s=f:(e._bottom||0)===i?s=u:(r[Va(u,o,a,c)]=!0,s=f)),r[Va(s,o,a,c)]=!0,n.borderSkipped=r}function Va(n,t,e,i){return i?(n=ig(n,t,e),n=$a(n,e,t)):n=$a(n,t,e),n}function ig(n,t,e){return n===t?e:n===e?t:n}function $a(n,t,e){return n==="start"?t:n==="end"?e:n}function sg(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class rg extends Mn{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,s){return Wa(t,e,i,s)}parseArrayData(t,e,i,s){return Wa(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:r,vScale:o}=t,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,f=r.axis==="x"?a:c,u=o.axis==="x"?a:c,d=[];let p,b,y,_;for(p=i,b=i+s;p<b;++p)_=e[p],y={},y[r.axis]=r.parse(An(_,f),p),d.push(Gc(An(_,u),y,o,p));return d}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);const r=i._custom;r&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:s}=e,r=this.getParsed(t),o=r._custom,a=Mr(o)?"["+o.start+", "+o.end+"]":""+s.getLabelForValue(r[s.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){const r=s==="reset",{index:o,_cachedMeta:{vScale:a}}=this,c=a.getBasePixel(),f=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:p}=this._getSharedOptions(e,s);for(let b=e;b<e+i;b++){const y=this.getParsed(b),_=r||St(y[a.axis])?{base:c,head:c}:this._calculateBarValuePixels(b),S=this._calculateBarIndexPixels(b,u),A=(y._stacks||{})[a.axis],L={horizontal:f,base:_.base,enableBorderRadius:!A||Mr(y._custom)||o===A._top||o===A._bottom,x:f?_.head:S.center,y:f?S.center:_.head,height:f?S.size:Math.abs(_.size),width:f?Math.abs(_.size):S.size};p&&(L.options=d||this.resolveDataElementOptions(b,t[b].active?"active":s));const I=L.options||t[b].options;ng(L,I,A,o),sg(L,I,u.ratio),this.updateElement(t[b],b,L,s)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),r=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(e),c=a&&a[i.axis],f=u=>{const d=u._parsed.find(b=>b[i.axis]===c),p=d&&d[u.vScale.axis];if(St(p)||isNaN(p))return!0};for(const u of s)if(!(e!==void 0&&f(u))&&((r===!1||o.indexOf(u.stack)===-1||r===void 0&&u.stack===void 0)&&o.push(u.stack),u.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[yt(this.chart.options.indexAxis==="x"?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const s=this._getStacks(t,i),r=e!==void 0?s.indexOf(e):-1;return r===-1?s.length-1:r}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let r,o;for(r=0,o=e.data.length;r<o;++r)s.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const a=t.barThickness;return{min:a||Gp(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:r,minBarLength:o}}=this,a=r||0,c=this.getParsed(t),f=c._custom,u=Mr(f);let d=c[e.axis],p=0,b=i?this.applyStack(e,c,i):d,y,_;b!==d&&(p=b-d,b=d),u&&(d=f.barStart,b=f.barEnd-f.barStart,d!==0&&tn(d)!==tn(f.barEnd)&&(p=0),p+=d);const S=!St(r)&&!u?r:p;let A=e.getPixelForValue(S);if(this.chart.getDataVisibility(t)?y=e.getPixelForValue(p+b):y=A,_=y-A,Math.abs(_)<o){_=tg(_,e,a)*o,d===a&&(A-=_/2);const L=e.getPixelForDecimal(0),I=e.getPixelForDecimal(1),D=Math.min(L,I),N=Math.max(L,I);A=Math.max(Math.min(A,N),D),y=A+_,i&&!u&&(c._stacks[e.axis]._visualValues[s]=e.getValueForPixel(y)-e.getValueForPixel(A))}if(A===e.getPixelForValue(a)){const L=tn(_)*e.getLineWidthForValue(a)/2;A+=L,_-=L}return{size:_,base:A,head:y,center:y+_/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,r=s.skipNull,o=yt(s.maxBarThickness,1/0);let a,c;const f=this._getAxisCount();if(e.grouped){const u=r?this._getStackCount(t):e.stackCount,d=s.barThickness==="flex"?Jp(t,e,s,u*f):Qp(t,e,s,u*f),p=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,b=this._getAxis().indexOf(yt(p,this.getFirstScaleIdForIndexAxis())),y=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0)+b;a=d.start+d.chunk*y+d.chunk/2,c=Math.min(o,d.chunk*d.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),c=Math.min(o,e.min*e.ratio);return{base:a-c/2,head:a+c/2,center:a,size:c}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let r=0;for(;r<s;++r)this.getParsed(r)[e.axis]!==null&&!i[r].hidden&&i[r].draw(this._ctx)}}class og extends Mn{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){const r=super.parsePrimitiveData(t,e,i,s);for(let o=0;o<r.length;o++)r[o]._custom=this.resolveDataElementOptions(o+i).radius;return r}parseArrayData(t,e,i,s){const r=super.parseArrayData(t,e,i,s);for(let o=0;o<r.length;o++){const a=e[i+o];r[o]._custom=yt(a[2],this.resolveDataElementOptions(o+i).radius)}return r}parseObjectData(t,e,i,s){const r=super.parseObjectData(t,e,i,s);for(let o=0;o<r.length;o++){const a=e[i+o];r[o]._custom=yt(a&&a.r&&+a.r,this.resolveDataElementOptions(o+i).radius)}return r}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),c=r.getLabelForValue(o.y),f=o._custom;return{label:i[t]||"",value:"("+a+", "+c+(f?", "+f:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const r=s==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:c,includeOptions:f}=this._getSharedOptions(e,s),u=o.axis,d=a.axis;for(let p=e;p<e+i;p++){const b=t[p],y=!r&&this.getParsed(p),_={},S=_[u]=r?o.getPixelForDecimal(.5):o.getPixelForValue(y[u]),A=_[d]=r?a.getBasePixel():a.getPixelForValue(y[d]);_.skip=isNaN(S)||isNaN(A),f&&(_.options=c||this.resolveDataElementOptions(p,b.active?"active":s),r&&(_.options.radius=0)),this.updateElement(b,p,_,s)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const r=s.radius;return e!=="active"&&(s.radius=0),s.radius+=yt(i&&i._custom,r),s}}function ag(n,t,e){let i=1,s=1,r=0,o=0;if(t<Ut){const a=n,c=a+t,f=Math.cos(a),u=Math.sin(a),d=Math.cos(c),p=Math.sin(c),b=(I,D,N)=>Hi(I,a,c,!0)?1:Math.max(D,D*e,N,N*e),y=(I,D,N)=>Hi(I,a,c,!0)?-1:Math.min(D,D*e,N,N*e),_=b(0,f,d),S=b(Jt,u,p),A=y(Ot,f,d),L=y(Ot+Jt,u,p);i=(_-A)/2,s=(S-L)/2,r=-(_+A)/2,o=-(S+L)/2}return{ratioX:i,ratioY:s,offsetX:r,offsetY:o}}class bo extends Mn{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:s,color:r,useBorderRadius:o,borderRadius:a}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((c,f)=>{const d=t.getDatasetMeta(0).controller.getStyle(f);return{text:c,fillStyle:d.backgroundColor,fontColor:r,hidden:!t.getDataVisibility(f),lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:d.borderWidth,strokeStyle:d.borderColor,textAlign:s,pointStyle:i,borderRadius:o&&(a||d.borderRadius),index:f}}):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let r=c=>+i[c];if(kt(i[t])){const{key:c="value"}=this._parsing;r=f=>+An(i[f],c)}let o,a;for(o=t,a=t+e;o<a;++o)s._parsed[o]=r(o)}}_getRotation(){return We(this.options.rotation-90)}_getCircumference(){return We(this.options.circumference)}_getRotationExtents(){let t=Ut,e=-Ut;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,r=s._getRotation(),o=s._getCircumference();t=Math.min(t,r),e=Math.max(e,r+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,r=s.data,o=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-o)/2,0),c=Math.min(bd(this.options.cutout,a),1),f=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:p,ratioY:b,offsetX:y,offsetY:_}=ag(d,u,c),S=(i.width-o)/p,A=(i.height-o)/b,L=Math.max(Math.min(S,A)/2,0),I=Sc(this.options.radius,L),D=Math.max(I*c,0),N=(I-D)/this._getVisibleDatasetWeightTotal();this.offsetX=y*I,this.offsetY=_*I,s.total=this.calculateTotal(),this.outerRadius=I-N*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-N*f,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*r/Ut)}updateElements(t,e,i,s){const r=s==="reset",o=this.chart,a=o.chartArea,f=o.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,p=r&&f.animateScale,b=p?0:this.innerRadius,y=p?0:this.outerRadius,{sharedOptions:_,includeOptions:S}=this._getSharedOptions(e,s);let A=this._getRotation(),L;for(L=0;L<e;++L)A+=this._circumference(L,r);for(L=e;L<e+i;++L){const I=this._circumference(L,r),D=t[L],N={x:u+this.offsetX,y:d+this.offsetY,startAngle:A,endAngle:A+I,circumference:I,outerRadius:y,innerRadius:b};S&&(N.options=_||this.resolveDataElementOptions(L,D.active?"active":s)),A+=I,this.updateElement(D,L,N,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,s;for(s=0;s<e.length;s++){const r=t._parsed[s];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(i+=Math.abs(r))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?Ut*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Yi(e._parsed[t],i.options.locale);return{label:s[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,r,o,a,c;if(!t){for(s=0,r=i.data.datasets.length;s<r;++s)if(i.isDatasetVisible(s)){o=i.getDatasetMeta(s),t=o.data,a=o.controller;break}}if(!t)return 0;for(s=0,r=t.length;s<r;++s)c=a.resolveDataElementOptions(s),c.borderAlign!=="inner"&&(e=Math.max(e,c.borderWidth||0,c.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){const r=this.resolveDataElementOptions(i);e=Math.max(e,r.offset||0,r.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(yt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class lg extends Mn{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:a,count:c}=Oc(e,s,o);this._drawStart=a,this._drawCount=c,Dc(e)&&(a=0,c=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=s;const f=this.resolveDatasetElementOptions(t);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:f},t),this.updateElements(s,a,c,t)}updateElements(t,e,i,s){const r=s==="reset",{iScale:o,vScale:a,_stacked:c,_dataset:f}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(e,s),p=o.axis,b=a.axis,{spanGaps:y,segment:_}=this.options,S=li(y)?y:Number.POSITIVE_INFINITY,A=this.chart._animationsDisabled||r||s==="none",L=e+i,I=t.length;let D=e>0&&this.getParsed(e-1);for(let N=0;N<I;++N){const P=t[N],g=A?P:{};if(N<e||N>=L){g.skip=!0;continue}const M=this.getParsed(N),k=St(M[b]),B=g[p]=o.getPixelForValue(M[p],N),H=g[b]=r||k?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,M,c):M[b],N);g.skip=isNaN(B)||isNaN(H)||k,g.stop=N>0&&Math.abs(M[p]-D[p])>S,_&&(g.parsed=M,g.raw=f.data[N]),d&&(g.options=u||this.resolveDataElementOptions(N,P.active?"active":s)),A||this.updateElement(P,N,g,s),D=M}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const r=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class Qc extends Mn{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((r,o)=>{const c=t.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Yi(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:r}}parseObjectData(t,e,i,s){return jc.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,s)=>{const r=this.getParsed(s).r;!isNaN(r)&&this.chart.getDataVisibility(s)&&(r<e.min&&(e.min=r),r>e.max&&(e.max=r))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),a=(r-o)/t.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,i,s){const r=s==="reset",o=this.chart,c=o.options.animation,f=this._cachedMeta.rScale,u=f.xCenter,d=f.yCenter,p=f.getIndexAngle(0)-.5*Ot;let b=p,y;const _=360/this.countVisibleElements();for(y=0;y<e;++y)b+=this._computeAngle(y,s,_);for(y=e;y<e+i;y++){const S=t[y];let A=b,L=b+this._computeAngle(y,s,_),I=o.getDataVisibility(y)?f.getDistanceFromCenterForValue(this.getParsed(y).r):0;b=L,r&&(c.animateScale&&(I=0),c.animateRotate&&(A=L=p));const D={x:u,y:d,innerRadius:0,outerRadius:I,startAngle:A,endAngle:L,options:this.resolveDataElementOptions(y,S.active?"active":s)};this.updateElement(S,y,D,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?We(this.resolveDataElementOptions(t,e).angle||i):0}}class cg extends bo{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class ug extends Mn{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return jc.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],r=e.iScale.getLabels();if(i.points=s,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:r.length===s.length,options:o};this.updateElement(i,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const r=this._cachedMeta.rScale,o=s==="reset";for(let a=e;a<e+i;a++){const c=t[a],f=this.resolveDataElementOptions(a,c.active?"active":s),u=r.getPointPositionForValue(a,this.getParsed(a).r),d=o?r.xCenter:u.x,p=o?r.yCenter:u.y,b={x:d,y:p,angle:u.angle,skip:isNaN(d)||isNaN(p),options:f};this.updateElement(c,a,b,s)}}}class fg extends Mn{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),c=r.getLabelForValue(o.y);return{label:i[t]||"",value:"("+a+", "+c+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled;let{start:r,count:o}=Oc(e,i,s);if(this._drawStart=r,this._drawCount=o,Dc(e)&&(r=0,o=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:c}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!c._decimated,a.points=i;const f=this.resolveDatasetElementOptions(t);f.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:f},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,r,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,s){const r=s==="reset",{iScale:o,vScale:a,_stacked:c,_dataset:f}=this._cachedMeta,u=this.resolveDataElementOptions(e,s),d=this.getSharedOptions(u),p=this.includeOptions(s,d),b=o.axis,y=a.axis,{spanGaps:_,segment:S}=this.options,A=li(_)?_:Number.POSITIVE_INFINITY,L=this.chart._animationsDisabled||r||s==="none";let I=e>0&&this.getParsed(e-1);for(let D=e;D<e+i;++D){const N=t[D],P=this.getParsed(D),g=L?N:{},M=St(P[y]),k=g[b]=o.getPixelForValue(P[b],D),B=g[y]=r||M?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,P,c):P[y],D);g.skip=isNaN(k)||isNaN(B)||M,g.stop=D>0&&Math.abs(P[b]-I[b])>A,S&&(g.parsed=P,g.raw=f.data[D]),p&&(g.options=d||this.resolveDataElementOptions(D,N.active?"active":s)),L||this.updateElement(N,D,g,s),I=P}this.updateSharedOptions(d,s,u)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let c=e.length-1;c>=0;--c)a=Math.max(a,e[c].size(this.resolveDataElementOptions(c))/2);return a>0&&a}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const r=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,r,o)/2}}var hg=Object.freeze({__proto__:null,BarController:rg,BubbleController:og,DoughnutController:bo,LineController:lg,PieController:cg,PolarAreaController:Qc,RadarController:ug,ScatterController:fg});function Fn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class yo{static override(t){Object.assign(yo.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Fn()}parse(){return Fn()}format(){return Fn()}add(){return Fn()}diff(){return Fn()}startOf(){return Fn()}endOf(){return Fn()}}var dg={_date:yo};function pg(n,t,e,i){const{controller:s,data:r,_sorted:o}=n,a=s._cachedMeta.iScale,c=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&r.length){const f=a._reversePixels?Pd:hn;if(i){if(s._sharedOptions){const u=r[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const p=f(r,t,e-d),b=f(r,t,e+d);return{lo:p.lo,hi:b.hi}}}}else{const u=f(r,t,e);if(c){const{vScale:d}=s._cachedMeta,{_parsed:p}=n,b=p.slice(0,u.lo+1).reverse().findIndex(_=>!St(_[d.axis]));u.lo-=Math.max(0,b);const y=p.slice(u.hi).findIndex(_=>!St(_[d.axis]));u.hi+=Math.max(0,y)}return u}}return{lo:0,hi:r.length-1}}function Xs(n,t,e,i,s){const r=n.getSortedVisibleDatasetMetas(),o=e[t];for(let a=0,c=r.length;a<c;++a){const{index:f,data:u}=r[a],{lo:d,hi:p}=pg(r[a],t,o,s);for(let b=d;b<=p;++b){const y=u[b];y.skip||i(y,f,b)}}}function gg(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,s){const r=t?Math.abs(i.x-s.x):0,o=e?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}function Tr(n,t,e,i,s){const r=[];return!s&&!n.isPointInArea(t)||Xs(n,e,t,function(a,c,f){!s&&!dn(a,n.chartArea,0)||a.inRange(t.x,t.y,i)&&r.push({element:a,datasetIndex:c,index:f})},!0),r}function mg(n,t,e,i){let s=[];function r(o,a,c){const{startAngle:f,endAngle:u}=o.getProps(["startAngle","endAngle"],i),{angle:d}=kc(o,{x:t.x,y:t.y});Hi(d,f,u)&&s.push({element:o,datasetIndex:a,index:c})}return Xs(n,e,t,r),s}function bg(n,t,e,i,s,r){let o=[];const a=gg(e);let c=Number.POSITIVE_INFINITY;function f(u,d,p){const b=u.inRange(t.x,t.y,s);if(i&&!b)return;const y=u.getCenterPoint(s);if(!(!!r||n.isPointInArea(y))&&!b)return;const S=a(t,y);S<c?(o=[{element:u,datasetIndex:d,index:p}],c=S):S===c&&o.push({element:u,datasetIndex:d,index:p})}return Xs(n,e,t,f),o}function Er(n,t,e,i,s,r){return!r&&!n.isPointInArea(t)?[]:e==="r"&&!i?mg(n,t,e,s):bg(n,t,e,i,s,r)}function qa(n,t,e,i,s){const r=[],o=e==="x"?"inXRange":"inYRange";let a=!1;return Xs(n,e,t,(c,f,u)=>{c[o]&&c[o](t[e],s)&&(r.push({element:c,datasetIndex:f,index:u}),a=a||c.inRange(t.x,t.y,s))}),i&&!a?[]:r}var yg={modes:{index(n,t,e,i){const s=Nn(t,n),r=e.axis||"x",o=e.includeInvisible||!1,a=e.intersect?Tr(n,s,r,i,o):Er(n,s,r,!1,i,o),c=[];return a.length?(n.getSortedVisibleDatasetMetas().forEach(f=>{const u=a[0].index,d=f.data[u];d&&!d.skip&&c.push({element:d,datasetIndex:f.index,index:u})}),c):[]},dataset(n,t,e,i){const s=Nn(t,n),r=e.axis||"xy",o=e.includeInvisible||!1;let a=e.intersect?Tr(n,s,r,i,o):Er(n,s,r,!1,i,o);if(a.length>0){const c=a[0].datasetIndex,f=n.getDatasetMeta(c).data;a=[];for(let u=0;u<f.length;++u)a.push({element:f[u],datasetIndex:c,index:u})}return a},point(n,t,e,i){const s=Nn(t,n),r=e.axis||"xy",o=e.includeInvisible||!1;return Tr(n,s,r,i,o)},nearest(n,t,e,i){const s=Nn(t,n),r=e.axis||"xy",o=e.includeInvisible||!1;return Er(n,s,r,e.intersect,i,o)},x(n,t,e,i){const s=Nn(t,n);return qa(n,s,"x",e.intersect,i)},y(n,t,e,i){const s=Nn(t,n);return qa(n,s,"y",e.intersect,i)}}};const Jc=["left","top","right","bottom"];function Ai(n,t){return n.filter(e=>e.pos===t)}function Xa(n,t){return n.filter(e=>Jc.indexOf(e.pos)===-1&&e.box.axis===t)}function Ci(n,t){return n.sort((e,i)=>{const s=t?i:e,r=t?e:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function xg(n){const t=[];let e,i,s,r,o,a;for(e=0,i=(n||[]).length;e<i;++e)s=n[e],{position:r,options:{stack:o,stackWeight:a=1}}=s,t.push({index:e,box:s,pos:r,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&r+o,stackWeight:a});return t}function _g(n){const t={};for(const e of n){const{stack:i,pos:s,stackWeight:r}=e;if(!i||!Jc.includes(s))continue;const o=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return t}function vg(n,t){const e=_g(n),{vBoxMaxWidth:i,hBoxMaxHeight:s}=t;let r,o,a;for(r=0,o=n.length;r<o;++r){a=n[r];const{fullSize:c}=a.box,f=e[a.stack],u=f&&a.stackWeight/f.weight;a.horizontal?(a.width=u?u*i:c&&t.availableWidth,a.height=s):(a.width=i,a.height=u?u*s:c&&t.availableHeight)}return e}function wg(n){const t=xg(n),e=Ci(t.filter(f=>f.box.fullSize),!0),i=Ci(Ai(t,"left"),!0),s=Ci(Ai(t,"right")),r=Ci(Ai(t,"top"),!0),o=Ci(Ai(t,"bottom")),a=Xa(t,"x"),c=Xa(t,"y");return{fullSize:e,leftAndTop:i.concat(r),rightAndBottom:s.concat(c).concat(o).concat(a),chartArea:Ai(t,"chartArea"),vertical:i.concat(s).concat(c),horizontal:r.concat(o).concat(a)}}function Ya(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function Zc(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function Sg(n,t,e,i){const{pos:s,box:r}=e,o=n.maxPadding;if(!kt(s)){e.size&&(n[s]-=e.size);const d=i[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?r.height:r.width),e.size=d.size/d.count,n[s]+=e.size}r.getPadding&&Zc(o,r.getPadding());const a=Math.max(0,t.outerWidth-Ya(o,n,"left","right")),c=Math.max(0,t.outerHeight-Ya(o,n,"top","bottom")),f=a!==n.w,u=c!==n.h;return n.w=a,n.h=c,e.horizontal?{same:f,other:u}:{same:u,other:f}}function Ag(n){const t=n.maxPadding;function e(i){const s=Math.max(t[i]-n[i],0);return n[i]+=s,s}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function Cg(n,t){const e=t.maxPadding;function i(s){const r={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{r[o]=Math.max(t[o],e[o])}),r}return i(n?["left","right"]:["top","bottom"])}function Pi(n,t,e,i){const s=[];let r,o,a,c,f,u;for(r=0,o=n.length,f=0;r<o;++r){a=n[r],c=a.box,c.update(a.width||t.w,a.height||t.h,Cg(a.horizontal,t));const{same:d,other:p}=Sg(t,e,a,i);f|=d&&s.length,u=u||p,c.fullSize||s.push(a)}return f&&Pi(s,t,e,i)||u}function us(n,t,e,i,s){n.top=e,n.left=t,n.right=t+i,n.bottom=e+s,n.width=i,n.height=s}function Ka(n,t,e,i){const s=e.padding;let{x:r,y:o}=t;for(const a of n){const c=a.box,f=i[a.stack]||{placed:0,weight:1},u=a.stackWeight/f.weight||1;if(a.horizontal){const d=t.w*u,p=f.size||c.height;Bi(f.start)&&(o=f.start),c.fullSize?us(c,s.left,o,e.outerWidth-s.right-s.left,p):us(c,t.left+f.placed,o,d,p),f.start=o,f.placed+=d,o=c.bottom}else{const d=t.h*u,p=f.size||c.width;Bi(f.start)&&(r=f.start),c.fullSize?us(c,r,s.top,p,e.outerHeight-s.bottom-s.top):us(c,r,t.top+f.placed,p,d),f.start=r,f.placed+=d,r=c.right}}t.x=r,t.y=o}var xe={addBox(n,t){n.boxes||(n.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const s=_e(n.options.layout.padding),r=Math.max(t-s.width,0),o=Math.max(e-s.height,0),a=wg(n.boxes),c=a.vertical,f=a.horizontal;It(n.boxes,_=>{typeof _.beforeLayout=="function"&&_.beforeLayout()});const u=c.reduce((_,S)=>S.box.options&&S.box.options.display===!1?_:_+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/u,hBoxMaxHeight:o/2}),p=Object.assign({},s);Zc(p,_e(i));const b=Object.assign({maxPadding:p,w:r,h:o,x:s.left,y:s.top},s),y=vg(c.concat(f),d);Pi(a.fullSize,b,d,y),Pi(c,b,d,y),Pi(f,b,d,y)&&Pi(c,b,d,y),Ag(b),Ka(a.leftAndTop,b,d,y),b.x+=b.w,b.y+=b.h,Ka(a.rightAndBottom,b,d,y),n.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},It(a.chartArea,_=>{const S=_.box;Object.assign(S,n.chartArea),S.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}};class tu{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class kg extends tu{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ws="$chartjs",Mg={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ga=n=>n===null||n==="";function Tg(n,t){const e=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[ws]={initial:{height:i,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Ga(s)){const r=Ra(n,"width");r!==void 0&&(n.width=r)}if(Ga(i))if(n.style.height==="")n.height=n.width/(t||2);else{const r=Ra(n,"height");r!==void 0&&(n.height=r)}return n}const eu=Sp?{passive:!0}:!1;function Eg(n,t,e){n&&n.addEventListener(t,e,eu)}function Pg(n,t,e){n&&n.canvas&&n.canvas.removeEventListener(t,e,eu)}function Og(n,t){const e=Mg[n.type]||n.type,{x:i,y:s}=Nn(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Ls(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Dg(n,t,e){const i=n.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Ls(a.addedNodes,i),o=o&&!Ls(a.removedNodes,i);o&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function Rg(n,t,e){const i=n.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Ls(a.removedNodes,i),o=o&&!Ls(a.addedNodes,i);o&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const zi=new Map;let Qa=0;function nu(){const n=window.devicePixelRatio;n!==Qa&&(Qa=n,zi.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function Lg(n,t){zi.size||window.addEventListener("resize",nu),zi.set(n,t)}function Fg(n){zi.delete(n),zi.size||window.removeEventListener("resize",nu)}function Ig(n,t,e){const i=n.canvas,s=i&&mo(i);if(!s)return;const r=Pc((a,c)=>{const f=s.clientWidth;e(a,c),f<s.clientWidth&&e()},window),o=new ResizeObserver(a=>{const c=a[0],f=c.contentRect.width,u=c.contentRect.height;f===0&&u===0||r(f,u)});return o.observe(s),Lg(n,r),o}function Pr(n,t,e){e&&e.disconnect(),t==="resize"&&Fg(n)}function Ng(n,t,e){const i=n.canvas,s=Pc(r=>{n.ctx!==null&&e(Og(r,n))},n);return Eg(i,t,s),s}class Bg extends tu{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Tg(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[ws])return!1;const i=e[ws].initial;["height","width"].forEach(r=>{const o=i[r];St(o)?e.removeAttribute(r):e.setAttribute(r,o)});const s=i.style||{};return Object.keys(s).forEach(r=>{e.style[r]=s[r]}),e.width=e.width,delete e[ws],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),o={attach:Dg,detach:Rg,resize:Ig}[e]||Ng;s[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Pr,detach:Pr,resize:Pr}[e]||Pg)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return wp(t,e,i,s)}isAttached(t){const e=t&&mo(t);return!!(e&&e.isConnected)}}function Hg(n){return!go()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?kg:Bg}class pn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return li(this.x)&&li(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}}function jg(n,t){const e=n.options.ticks,i=zg(n),s=Math.min(e.maxTicksLimit||i,i),r=e.major.enabled?Wg(t):[],o=r.length,a=r[0],c=r[o-1],f=[];if(o>s)return Vg(t,f,r,o/s),f;const u=Ug(r,t,s);if(o>0){let d,p;const b=o>1?Math.round((c-a)/(o-1)):null;for(fs(t,f,u,St(b)?0:a-b,a),d=0,p=o-1;d<p;d++)fs(t,f,u,r[d],r[d+1]);return fs(t,f,u,c,St(b)?t.length:c+b),f}return fs(t,f,u),f}function zg(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),s=n._maxLength/e;return Math.floor(Math.min(i,s))}function Ug(n,t,e){const i=$g(n),s=t.length/e;if(!i)return Math.max(s,1);const r=Cd(i);for(let o=0,a=r.length-1;o<a;o++){const c=r[o];if(c>s)return c}return Math.max(s,1)}function Wg(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function Vg(n,t,e,i){let s=0,r=e[0],o;for(i=Math.ceil(i),o=0;o<n.length;o++)o===r&&(t.push(n[o]),s++,r=e[s*i])}function fs(n,t,e,i,s){const r=yt(i,0),o=Math.min(yt(s,n.length),n.length);let a=0,c,f,u;for(e=Math.ceil(e),s&&(c=s-i,e=c/Math.floor(c/e)),u=r;u<0;)a++,u=Math.round(r+a*e);for(f=Math.max(r,0);f<o;f++)f===u&&(t.push(n[f]),a++,u=Math.round(r+a*e))}function $g(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const qg=n=>n==="left"?"right":n==="right"?"left":n,Ja=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,Za=(n,t)=>Math.min(t||n,n);function tl(n,t){const e=[],i=n.length/t,s=n.length;let r=0;for(;r<s;r+=i)e.push(n[Math.floor(r)]);return e}function Xg(n,t,e){const i=n.ticks.length,s=Math.min(t,i-1),r=n._startPixel,o=n._endPixel,a=1e-6;let c=n.getPixelForTick(s),f;if(!(e&&(i===1?f=Math.max(c-r,o-c):t===0?f=(n.getPixelForTick(1)-c)/2:f=(c-n.getPixelForTick(s-1))/2,c+=s<t?f:-f,c<r-a||c>o+a)))return c}function Yg(n,t){It(n,e=>{const i=e.gc,s=i.length/2;let r;if(s>t){for(r=0;r<s;++r)delete e.data[i[r]];i.splice(0,s)}})}function ki(n){return n.drawTicks?n.tickLength:0}function el(n,t){if(!n.display)return 0;const e=se(n.font,t),i=_e(n.padding);return($t(n.text)?n.text.length:1)*e.lineHeight+i.height}function Kg(n,t){return kn(n,{scale:t,type:"scale"})}function Gg(n,t,e){return kn(n,{tick:e,index:t,type:"tick"})}function Qg(n,t,e){let i=lo(n);return(e&&t!=="right"||!e&&t==="right")&&(i=qg(i)),i}function Jg(n,t,e,i){const{top:s,left:r,bottom:o,right:a,chart:c}=n,{chartArea:f,scales:u}=c;let d=0,p,b,y;const _=o-s,S=a-r;if(n.isHorizontal()){if(b=me(i,r,a),kt(e)){const A=Object.keys(e)[0],L=e[A];y=u[A].getPixelForValue(L)+_-t}else e==="center"?y=(f.bottom+f.top)/2+_-t:y=Ja(n,e,t);p=a-r}else{if(kt(e)){const A=Object.keys(e)[0],L=e[A];b=u[A].getPixelForValue(L)-S+t}else e==="center"?b=(f.left+f.right)/2-S+t:b=Ja(n,e,t);y=me(i,o,s),d=e==="left"?-Jt:Jt}return{titleX:b,titleY:y,maxWidth:p,rotation:d}}class Xn extends pn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.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(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=Re(t,Number.POSITIVE_INFINITY),e=Re(e,Number.NEGATIVE_INFINITY),i=Re(i,Number.POSITIVE_INFINITY),s=Re(s,Number.NEGATIVE_INFINITY),{min:Re(t,i),max:Re(e,s),minDefined:Qt(t),maxDefined:Qt(e)}}getMinMax(t){let{min:e,max:i,minDefined:s,maxDefined:r}=this.getUserBounds(),o;if(s&&r)return{min:e,max:i};const a=this.getMatchingVisibleMetas();for(let c=0,f=a.length;c<f;++c)o=a[c].controller.getMinMax(this,t),s||(e=Math.min(e,o.min)),r||(i=Math.max(i,o.max));return e=r&&e>i?i:e,i=s&&e>i?e:i,{min:Re(e,Re(i,e)),max:Re(i,Re(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){zt(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=tp(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=a<this.ticks.length;this._convertTicksToLabels(c?tl(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=jg(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){zt(this.options.afterUpdate,[this])}beforeSetDimensions(){zt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){zt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),zt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){zt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,r;for(i=0,s=t.length;i<s;i++)r=t[i],r.label=zt(e.callback,[r.value,i,t],this)}afterTickToLabelConversion(){zt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){zt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Za(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,r=e.maxRotation;let o=s,a,c,f;if(!this._isVisible()||!e.display||s>=r||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),d=u.widest.width,p=u.highest.height,b=ue(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:b/(i-1),d+6>a&&(a=b/(i-(t.offset?.5:1)),c=this.maxHeight-ki(t.grid)-e.padding-el(t.title,this.chart.options.font),f=Math.sqrt(d*d+p*p),o=oo(Math.min(Math.asin(ue((u.highest.height+6)/a,-1,1)),Math.asin(ue(c/f,-1,1))-Math.asin(ue(p/f,-1,1)))),o=Math.max(s,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){zt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){zt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const c=el(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=ki(r)+c):(t.height=this.maxHeight,t.width=ki(r)+c),i.display&&this.ticks.length){const{first:f,last:u,widest:d,highest:p}=this._getLabelSizes(),b=i.padding*2,y=We(this.labelRotation),_=Math.cos(y),S=Math.sin(y);if(a){const A=i.mirror?0:S*d.width+_*p.height;t.height=Math.min(this.maxHeight,t.height+A+b)}else{const A=i.mirror?0:_*d.width+S*p.height;t.width=Math.min(this.maxWidth,t.width+A+b)}this._calculatePadding(f,u,S,_)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:r,padding:o},position:a}=this.options,c=this.labelRotation!==0,f=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,b=0;c?f?(p=s*t.width,b=i*e.height):(p=i*t.height,b=s*e.width):r==="start"?b=e.width:r==="end"?p=t.width:r!=="inner"&&(p=t.width/2,b=e.width/2),this.paddingLeft=Math.max((p-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((b-d+o)*this.width/(this.width-d),0)}else{let u=e.height/2,d=t.height/2;r==="start"?(u=0,d=t.height):r==="end"&&(u=e.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_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(){zt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)St(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=tl(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:s,_longestTextCache:r}=this,o=[],a=[],c=Math.floor(e/Za(e,i));let f=0,u=0,d,p,b,y,_,S,A,L,I,D,N;for(d=0;d<e;d+=c){if(y=t[d].label,_=this._resolveTickFontOptions(d),s.font=S=_.string,A=r[S]=r[S]||{data:{},gc:[]},L=_.lineHeight,I=D=0,!St(y)&&!$t(y))I=Ds(s,A.data,A.gc,I,y),D=L;else if($t(y))for(p=0,b=y.length;p<b;++p)N=y[p],!St(N)&&!$t(N)&&(I=Ds(s,A.data,A.gc,I,N),D+=L);o.push(I),a.push(D),f=Math.max(I,f),u=Math.max(D,u)}Yg(r,e);const P=o.indexOf(f),g=a.indexOf(u),M=k=>({width:o[k]||0,height:a[k]||0});return{first:M(0),last:M(e-1),widest:M(P),highest:M(g),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Ed(this._alignToPixels?Ln(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=Gg(this.getContext(),t,i))}return this.$context||(this.$context=Kg(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=We(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),r=this._getLabelSizes(),o=t.autoSkipPadding||0,a=r?r.widest.width+o:0,c=r?r.highest.height+o:0;return this.isHorizontal()?c*i>a*s?a/i:c/s:c*s<a*i?c/i:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:r,position:o,border:a}=s,c=r.offset,f=this.isHorizontal(),d=this.ticks.length+(c?1:0),p=ki(r),b=[],y=a.setContext(this.getContext()),_=y.display?y.width:0,S=_/2,A=function(E){return Ln(i,E,_)};let L,I,D,N,P,g,M,k,B,H,j,U;if(o==="top")L=A(this.bottom),g=this.bottom-p,k=L-S,H=A(t.top)+S,U=t.bottom;else if(o==="bottom")L=A(this.top),H=t.top,U=A(t.bottom)-S,g=L+S,k=this.top+p;else if(o==="left")L=A(this.right),P=this.right-p,M=L-S,B=A(t.left)+S,j=t.right;else if(o==="right")L=A(this.left),B=t.left,j=A(t.right)-S,P=L+S,M=this.left+p;else if(e==="x"){if(o==="center")L=A((t.top+t.bottom)/2+.5);else if(kt(o)){const E=Object.keys(o)[0],T=o[E];L=A(this.chart.scales[E].getPixelForValue(T))}H=t.top,U=t.bottom,g=L+S,k=g+p}else if(e==="y"){if(o==="center")L=A((t.left+t.right)/2);else if(kt(o)){const E=Object.keys(o)[0],T=o[E];L=A(this.chart.scales[E].getPixelForValue(T))}P=L-S,M=P-p,B=t.left,j=t.right}const z=yt(s.ticks.maxTicksLimit,d),$=Math.max(1,Math.ceil(d/z));for(I=0;I<d;I+=$){const E=this.getContext(I),T=r.setContext(E),tt=a.setContext(E),q=T.lineWidth,Z=T.color,lt=tt.dash||[],st=tt.dashOffset,at=T.tickWidth,it=T.tickColor,J=T.tickBorderDash||[],dt=T.tickBorderDashOffset;D=Xg(this,I,c),D!==void 0&&(N=Ln(i,D,q),f?P=M=B=j=N:g=k=H=U=N,b.push({tx1:P,ty1:g,tx2:M,ty2:k,x1:B,y1:H,x2:j,y2:U,width:q,color:Z,borderDash:lt,borderDashOffset:st,tickWidth:at,tickColor:it,tickBorderDash:J,tickBorderDashOffset:dt}))}return this._ticksLength=d,this._borderValue=L,b}_computeLabelItems(t){const e=this.axis,i=this.options,{position:s,ticks:r}=i,o=this.isHorizontal(),a=this.ticks,{align:c,crossAlign:f,padding:u,mirror:d}=r,p=ki(i.grid),b=p+u,y=d?-u:b,_=-We(this.labelRotation),S=[];let A,L,I,D,N,P,g,M,k,B,H,j,U="middle";if(s==="top")P=this.bottom-y,g=this._getXAxisLabelAlignment();else if(s==="bottom")P=this.top+y,g=this._getXAxisLabelAlignment();else if(s==="left"){const $=this._getYAxisLabelAlignment(p);g=$.textAlign,N=$.x}else if(s==="right"){const $=this._getYAxisLabelAlignment(p);g=$.textAlign,N=$.x}else if(e==="x"){if(s==="center")P=(t.top+t.bottom)/2+b;else if(kt(s)){const $=Object.keys(s)[0],E=s[$];P=this.chart.scales[$].getPixelForValue(E)+b}g=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")N=(t.left+t.right)/2-b;else if(kt(s)){const $=Object.keys(s)[0],E=s[$];N=this.chart.scales[$].getPixelForValue(E)}g=this._getYAxisLabelAlignment(p).textAlign}e==="y"&&(c==="start"?U="top":c==="end"&&(U="bottom"));const z=this._getLabelSizes();for(A=0,L=a.length;A<L;++A){I=a[A],D=I.label;const $=r.setContext(this.getContext(A));M=this.getPixelForTick(A)+r.labelOffset,k=this._resolveTickFontOptions(A),B=k.lineHeight,H=$t(D)?D.length:1;const E=H/2,T=$.color,tt=$.textStrokeColor,q=$.textStrokeWidth;let Z=g;o?(N=M,g==="inner"&&(A===L-1?Z=this.options.reverse?"left":"right":A===0?Z=this.options.reverse?"right":"left":Z="center"),s==="top"?f==="near"||_!==0?j=-H*B+B/2:f==="center"?j=-z.highest.height/2-E*B+B:j=-z.highest.height+B/2:f==="near"||_!==0?j=B/2:f==="center"?j=z.highest.height/2-E*B:j=z.highest.height-H*B,d&&(j*=-1),_!==0&&!$.showLabelBackdrop&&(N+=B/2*Math.sin(_))):(P=M,j=(1-H)*B/2);let lt;if($.showLabelBackdrop){const st=_e($.backdropPadding),at=z.heights[A],it=z.widths[A];let J=j-st.top,dt=0-st.left;switch(U){case"middle":J-=at/2;break;case"bottom":J-=at;break}switch(g){case"center":dt-=it/2;break;case"right":dt-=it;break;case"inner":A===L-1?dt-=it:A>0&&(dt-=it/2);break}lt={left:dt,top:J,width:it+st.width,height:at+st.height,color:$.backdropColor}}S.push({label:D,font:k,textOffset:j,options:{rotation:_,color:T,strokeColor:tt,strokeWidth:q,textAlign:Z,textBaseline:U,translation:[N,P],backdrop:lt}})}return S}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-We(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,o=this._getLabelSizes(),a=t+r,c=o.widest.width;let f,u;return e==="left"?s?(u=this.right+r,i==="near"?f="left":i==="center"?(f="center",u+=c/2):(f="right",u+=c)):(u=this.right-a,i==="near"?f="right":i==="center"?(f="center",u-=c/2):(f="left",u=this.left)):e==="right"?s?(u=this.left+r,i==="near"?f="right":i==="center"?(f="center",u-=c/2):(f="left",u-=c)):(u=this.left+a,i==="near"?f="left":i==="center"?(f="center",u+=c/2):(f="right",u=this.right)):f="right",{textAlign:f,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:r,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,r,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex(r=>r.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const a=(c,f,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(c.x,c.y),i.lineTo(f.x,f.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=s.length;r<o;++r){const c=s[r];e.drawOnChartArea&&a({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),e.drawTicks&&a({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:s}}=this,r=i.setContext(this.getContext()),o=i.display?r.width:0;if(!o)return;const a=s.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let f,u,d,p;this.isHorizontal()?(f=Ln(t,this.left,o)-o/2,u=Ln(t,this.right,a)+a/2,d=p=c):(d=Ln(t,this.top,o)-o/2,p=Ln(t,this.bottom,a)+a/2,f=u=c),e.save(),e.lineWidth=r.width,e.strokeStyle=r.color,e.beginPath(),e.moveTo(f,d),e.lineTo(u,p),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&Vs(i,s);const r=this.getLabelItems(t);for(const o of r){const a=o.options,c=o.font,f=o.label,u=o.textOffset;qn(i,f,0,u,c,a)}s&&$s(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;const r=se(i.font),o=_e(i.padding),a=i.align;let c=r.lineHeight/2;e==="bottom"||e==="center"||kt(e)?(c+=o.bottom,$t(i.text)&&(c+=r.lineHeight*(i.text.length-1))):c+=o.top;const{titleX:f,titleY:u,maxWidth:d,rotation:p}=Jg(this,c,e,a);qn(t,i.text,0,0,r,{color:i.color,maxWidth:d,rotation:p,textAlign:Qg(a,e,s),textBaseline:"middle",translation:[f,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=yt(t.grid&&t.grid.z,-1),s=yt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Xn.prototype.draw?[{z:e,draw:r=>{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let r,o;for(r=0,o=e.length;r<o;++r){const a=e[r];a[i]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return se(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class hs{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;em(e)&&(i=this.register(e));const s=this.items,r=t.id,o=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in s||(s[r]=t,Zg(t,o,i),this.override&&qt.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in qt[s]&&(delete qt[s][i],this.override&&delete $n[i])}}function Zg(n,t,e){const i=Ni(Object.create(null),[e?qt.get(e):{},qt.get(t),n.defaults]);qt.set(t,i),n.defaultRoutes&&tm(t,n.defaultRoutes),n.descriptors&&qt.describe(t,n.descriptors)}function tm(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),s=i.pop(),r=[n].concat(i).join("."),o=t[e].split("."),a=o.pop(),c=o.join(".");qt.route(r,s,c,a)})}function em(n){return"id"in n&&"defaults"in n}class nm{constructor(){this.controllers=new hs(Mn,"datasets",!0),this.elements=new hs(pn,"elements"),this.plugins=new hs(Object,"plugins"),this.scales=new hs(Xn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(s=>{const r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(t,r,s):It(s,o=>{const a=i||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,e,i){const s=ro(t);zt(i["before"+s],[],i),e[t](i),zt(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var Je=new nm;class im{constructor(){this._init=void 0}notify(t,e,i,s){if(e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const r=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(r,t,e,i);return e==="afterDestroy"&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,e,i,s){s=s||{};for(const r of t){const o=r.plugin,a=o[i],c=[e,s,r.options];if(zt(a,c,o)===!1&&s.cancelable)return!1}return!0}invalidate(){St(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=yt(i.options&&i.options.plugins,{}),r=sm(i);return s===!1&&!e?[]:om(t,r,s,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,s=(r,o)=>r.filter(a=>!o.some(c=>a.plugin.id===c.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function sm(n){const t={},e=[],i=Object.keys(Je.plugins.items);for(let r=0;r<i.length;r++)e.push(Je.getPlugin(i[r]));const s=n.plugins||[];for(let r=0;r<s.length;r++){const o=s[r];e.indexOf(o)===-1&&(e.push(o),t[o.id]=!0)}return{plugins:e,localIds:t}}function rm(n,t){return!t&&n===!1?null:n===!0?{}:n}function om(n,{plugins:t,localIds:e},i,s){const r=[],o=n.getContext();for(const a of t){const c=a.id,f=rm(i[c],s);f!==null&&r.push({plugin:a,options:am(n.config,{plugin:a,local:e[c]},f,o)})}return r}function am(n,{plugin:t,local:e},i,s){const r=n.pluginScopeKeys(t),o=n.getOptionScopes(i,r);return e&&t.defaults&&o.push(t.defaults),n.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Wr(n,t){const e=qt.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function lm(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function cm(n,t){return n===t?"_index_":"_value_"}function nl(n){if(n==="x"||n==="y"||n==="r")return n}function um(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function Vr(n,...t){if(nl(n))return n;for(const e of t){const i=e.axis||um(e.position)||n.length>1&&nl(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function il(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function fm(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(e.length)return il(n,"x",e[0])||il(n,"y",e[0])}return{}}function hm(n,t){const e=$n[n.type]||{scales:{}},i=t.scales||{},s=Wr(n.type,t),r=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!kt(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const c=Vr(o,a,fm(o,n),qt.scales[a.type]),f=cm(c,s),u=e.scales||{};r[o]=Di(Object.create(null),[{axis:c},a,u[c],u[f]])}),n.data.datasets.forEach(o=>{const a=o.type||n.type,c=o.indexAxis||Wr(a,t),u=($n[a]||{}).scales||{};Object.keys(u).forEach(d=>{const p=lm(d,c),b=o[p+"AxisID"]||p;r[b]=r[b]||Object.create(null),Di(r[b],[{axis:p},i[b],u[d]])})}),Object.keys(r).forEach(o=>{const a=r[o];Di(a,[qt.scales[a.type],qt.scale])}),r}function iu(n){const t=n.options||(n.options={});t.plugins=yt(t.plugins,{}),t.scales=hm(n,t)}function su(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function dm(n){return n=n||{},n.data=su(n.data),iu(n),n}const sl=new Map,ru=new Set;function ds(n,t){let e=sl.get(n);return e||(e=t(),sl.set(n,e),ru.add(e)),e}const Mi=(n,t,e)=>{const i=An(t,e);i!==void 0&&n.add(i)};class pm{constructor(t){this._config=dm(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=su(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),iu(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ds(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return ds(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return ds(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return ds(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:r}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const c=new Set;e.forEach(u=>{t&&(c.add(t),u.forEach(d=>Mi(c,t,d))),u.forEach(d=>Mi(c,s,d)),u.forEach(d=>Mi(c,$n[r]||{},d)),u.forEach(d=>Mi(c,qt,d)),u.forEach(d=>Mi(c,zr,d))});const f=Array.from(c);return f.length===0&&f.push(Object.create(null)),ru.has(e)&&o.set(e,f),f}chartOptionScopes(){const{options:t,type:e}=this;return[t,$n[e]||{},qt.datasets[e]||{},{type:e},qt,zr]}resolveNamedOptions(t,e,i,s=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=rl(this._resolverCache,t,s);let c=o;if(mm(o,e)){r.$shared=!1,i=Cn(i)?i():i;const f=this.createResolver(t,i,a);c=ci(o,i,f)}for(const f of e)r[f]=c[f];return r}createResolver(t,e,i=[""],s){const{resolver:r}=rl(this._resolverCache,t,i);return kt(e)?ci(r,e,void 0,s):r}}function rl(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const s=e.join();let r=i.get(s);return r||(r={resolver:fo(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,r)),r}const gm=n=>kt(n)&&Object.getOwnPropertyNames(n).some(t=>Cn(n[t]));function mm(n,t){const{isScriptable:e,isIndexable:i}=Ic(n);for(const s of t){const r=e(s),o=i(s),a=(o||r)&&n[s];if(r&&(Cn(a)||gm(a))||o&&$t(a))return!0}return!1}var bm="4.5.1";const ym=["top","bottom","left","right","chartArea"];function ol(n,t){return n==="top"||n==="bottom"||ym.indexOf(n)===-1&&t==="x"}function al(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function ll(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),zt(e&&e.onComplete,[n],t)}function xm(n){const t=n.chart,e=t.options.animation;zt(e&&e.onProgress,[n],t)}function ou(n){return go()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Ss={},cl=n=>{const t=ou(n);return Object.values(Ss).filter(e=>e.canvas===t).pop()};function _m(n,t,e){const i=Object.keys(n);for(const s of i){const r=+s;if(r>=t){const o=n[s];delete n[s],(e>0||r>t)&&(n[r+e]=o)}}}function vm(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}class xo{static defaults=qt;static instances=Ss;static overrides=$n;static registry=Je;static version=bm;static getChart=cl;static register(...t){Je.add(...t),ul()}static unregister(...t){Je.remove(...t),ul()}constructor(t,e){const i=this.config=new pm(e),s=ou(t),r=cl(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Hg(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),c=a&&a.canvas,f=c&&c.height,u=c&&c.width;if(this.id=md(),this.ctx=a,this.canvas=c,this.width=u,this.height=f,this._options=o,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 im,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Rd(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Ss[this.id]=this,!a||!c){console.error("Failed to create chart: can't acquire context from the given item");return}ln.listen(this,"complete",ll),ln.listen(this,"progress",xm),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:r}=this;return St(t)?e&&r?r:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Je}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Da(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ea(this.canvas,this.ctx),this}stop(){return ln.stop(this),this}resize(t,e){ln.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,r),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Da(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),zt(i.onResize,[this,o],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};It(e,(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{});let r=[];e&&(r=r.concat(Object.keys(e).map(o=>{const a=e[o],c=Vr(o,a),f=c==="r",u=c==="x";return{options:a,dposition:f?"chartArea":u?"bottom":"left",dtype:f?"radialLinear":u?"category":"linear"}}))),It(r,o=>{const a=o.options,c=a.id,f=Vr(c,a),u=yt(a.type,o.dtype);(a.position===void 0||ol(a.position,f)!==ol(o.dposition))&&(a.position=o.dposition),s[c]=!0;let d=null;if(c in i&&i[c].type===u)d=i[c];else{const p=Je.getScale(u);d=new p({id:c,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,t)}),It(s,(o,a)=>{o||delete i[a]}),It(i,o=>{xe.configure(this,o,o.options),xe.addBox(this,o)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((s,r)=>s.index-r.index),i>e){for(let s=e;s<i;++s)this._destroyDatasetMeta(s);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(al("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,s)=>{e.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const r=e[i];let o=this.getDatasetMeta(i);const a=r.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=a,o.indexAxis=r.indexAxis||Wr(a,this.options),o.order=r.order||0,o.index=i,o.label=""+r.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const c=Je.getController(a),{datasetElementType:f,dataElementType:u}=qt.datasets[a];Object.assign(c,{dataElementType:Je.getElement(u),datasetElementType:f&&Je.getElement(f)}),o.controller=new c(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){It(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let f=0,u=this.data.datasets.length;f<u;f++){const{controller:d}=this.getDatasetMeta(f),p=!s&&r.indexOf(d)===-1;d.buildOrUpdateElements(p),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),s||It(r,f=>{f.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(al("z","_idx"));const{_active:a,_lastEvent:c}=this;c?this._eventHandler(c,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){It(this.scales,t=>{xe.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!_a(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:r}of e){const o=i==="_removeElements"?-r:r;_m(t,s,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=r=>new Set(t.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),s=i(0);for(let r=1;r<e;r++)if(!_a(s,i(r)))return;return Array.from(s).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;xe.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],It(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Cn(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ln.has(this)?this.attached&&!ln.running(this)&&ln.start(this):(this.draw(),ll({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let s,r;for(s=0,r=e.length;s<r;++s){const o=e[s];(!t||o.visible)&&i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},s=Xc(this,t);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(s&&Vs(e,s),t.controller.draw(),s&&$s(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return dn(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const r=yg.modes[e];return typeof r=="function"?r(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter(r=>r&&r._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=kn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,s);Bi(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ln.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ea(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Ss[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(r,o)=>{e.addEventListener(this,r,o),t[r]=o},s=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};It(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(c,f)=>{e.addEventListener(this,c,f),t[c]=f},s=(c,f)=>{t[c]&&(e.removeEventListener(this,c,f),delete t[c])},r=(c,f)=>{this.canvas&&this.resize(c,f)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){It(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},It(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let r,o,a,c;for(e==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),a=0,c=t.length;a<c;++a){o=t[a];const f=o&&this.getDatasetMeta(o.datasetIndex).controller;f&&f[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:r,index:o})=>{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!Es(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const s=this.options.hover,r=(c,f)=>c.filter(u=>!f.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=r(e,t),a=i?t:r(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const r=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:r}=this,o=e,a=this._getActiveElements(t,s,i,o),c=wd(t),f=vm(t,this._lastEvent,i,c);i&&(this._lastEvent=null,zt(r.onHover,[t,a,this],this),c&&zt(r.onClick,[t,a,this],this));const u=!Es(a,s);return(u||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=f,u}_getActiveElements(t,e,i,s){if(t.type==="mouseout")return[];if(!i)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,s)}}function ul(){return It(xo.instances,n=>n._plugins.invalidate())}function wm(n,t,e){const{startAngle:i,x:s,y:r,outerRadius:o,innerRadius:a,options:c}=t,{borderWidth:f,borderJoinStyle:u}=c,d=Math.min(f/o,be(i-e));if(n.beginPath(),n.arc(s,r,o-f/2,i+d/2,e-d/2),a>0){const p=Math.min(f/a,be(i-e));n.arc(s,r,a+f/2,e-p/2,i+p/2,!0)}else{const p=Math.min(f/2,o*be(i-e));if(u==="round")n.arc(s,r,p,e-Ot/2,i+Ot/2,!0);else if(u==="bevel"){const b=2*p*p,y=-b*Math.cos(e+Ot/2)+s,_=-b*Math.sin(e+Ot/2)+r,S=b*Math.cos(i+Ot/2)+s,A=b*Math.sin(i+Ot/2)+r;n.lineTo(y,_),n.lineTo(S,A)}}n.closePath(),n.moveTo(0,0),n.rect(0,0,n.canvas.width,n.canvas.height),n.clip("evenodd")}function Sm(n,t,e){const{startAngle:i,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:c}=t;let f=s/a;n.beginPath(),n.arc(r,o,a,i-f,e+f),c>s?(f=s/c,n.arc(r,o,c,e+f,i-f,!0)):n.arc(r,o,s,e+Jt,i-Jt),n.closePath(),n.clip()}function Am(n){return uo(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Cm(n,t,e,i){const s=Am(n.options.borderRadius),r=(e-t)/2,o=Math.min(r,i*t/2),a=c=>{const f=(e-Math.min(r,c))*i/2;return ue(c,0,Math.min(r,f))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:ue(s.innerStart,0,o),innerEnd:ue(s.innerEnd,0,o)}}function si(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function Fs(n,t,e,i,s,r){const{x:o,y:a,startAngle:c,pixelMargin:f,innerRadius:u}=t,d=Math.max(t.outerRadius+i+e-f,0),p=u>0?u+i+e+f:0;let b=0;const y=s-c;if(i){const $=u>0?u-i:0,E=d>0?d-i:0,T=($+E)/2,tt=T!==0?y*T/(T+i):y;b=(y-tt)/2}const _=Math.max(.001,y*d-e/Ot)/d,S=(y-_)/2,A=c+S+b,L=s-S-b,{outerStart:I,outerEnd:D,innerStart:N,innerEnd:P}=Cm(t,p,d,L-A),g=d-I,M=d-D,k=A+I/g,B=L-D/M,H=p+N,j=p+P,U=A+N/H,z=L-P/j;if(n.beginPath(),r){const $=(k+B)/2;if(n.arc(o,a,d,k,$),n.arc(o,a,d,$,B),D>0){const q=si(M,B,o,a);n.arc(q.x,q.y,D,B,L+Jt)}const E=si(j,L,o,a);if(n.lineTo(E.x,E.y),P>0){const q=si(j,z,o,a);n.arc(q.x,q.y,P,L+Jt,z+Math.PI)}const T=(L-P/p+(A+N/p))/2;if(n.arc(o,a,p,L-P/p,T,!0),n.arc(o,a,p,T,A+N/p,!0),N>0){const q=si(H,U,o,a);n.arc(q.x,q.y,N,U+Math.PI,A-Jt)}const tt=si(g,A,o,a);if(n.lineTo(tt.x,tt.y),I>0){const q=si(g,k,o,a);n.arc(q.x,q.y,I,A-Jt,k)}}else{n.moveTo(o,a);const $=Math.cos(k)*d+o,E=Math.sin(k)*d+a;n.lineTo($,E);const T=Math.cos(B)*d+o,tt=Math.sin(B)*d+a;n.lineTo(T,tt)}n.closePath()}function km(n,t,e,i,s){const{fullCircles:r,startAngle:o,circumference:a}=t;let c=t.endAngle;if(r){Fs(n,t,e,i,c,s);for(let f=0;f<r;++f)n.fill();isNaN(a)||(c=o+(a%Ut||Ut))}return Fs(n,t,e,i,c,s),n.fill(),c}function Mm(n,t,e,i,s){const{fullCircles:r,startAngle:o,circumference:a,options:c}=t,{borderWidth:f,borderJoinStyle:u,borderDash:d,borderDashOffset:p,borderRadius:b}=c,y=c.borderAlign==="inner";if(!f)return;n.setLineDash(d||[]),n.lineDashOffset=p,y?(n.lineWidth=f*2,n.lineJoin=u||"round"):(n.lineWidth=f,n.lineJoin=u||"bevel");let _=t.endAngle;if(r){Fs(n,t,e,i,_,s);for(let S=0;S<r;++S)n.stroke();isNaN(a)||(_=o+(a%Ut||Ut))}y&&Sm(n,t,_),c.selfJoin&&_-o>=Ot&&b===0&&u!=="miter"&&wm(n,t,_),r||(Fs(n,t,e,i,_,s),n.stroke())}class Tm extends pn{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:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){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,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:r,distance:o}=kc(s,{x:t,y:e}),{startAngle:a,endAngle:c,innerRadius:f,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,b=yt(d,c-a),y=Hi(r,a,c)&&a!==c,_=b>=Ut||y,S=fn(o,f+p,u+p);return _&&S}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:r,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:c,spacing:f}=this.options,u=(s+r)/2,d=(o+a+f+c)/2;return{x:e+Math.cos(u)*d,y:i+Math.sin(u)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/4,r=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=i>Ut?Math.floor(i/Ut):0,i===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*s,Math.sin(a)*s);const c=1-Math.sin(Math.min(Ot,i||0)),f=s*c;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,km(t,this,f,r,o),Mm(t,this,f,r,o),t.restore()}}function au(n,t,e=t){n.lineCap=yt(e.borderCapStyle,t.borderCapStyle),n.setLineDash(yt(e.borderDash,t.borderDash)),n.lineDashOffset=yt(e.borderDashOffset,t.borderDashOffset),n.lineJoin=yt(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=yt(e.borderWidth,t.borderWidth),n.strokeStyle=yt(e.borderColor,t.borderColor)}function Em(n,t,e){n.lineTo(e.x,e.y)}function Pm(n){return n.stepped?$d:n.tension||n.cubicInterpolationMode==="monotone"?qd:Em}function lu(n,t,e={}){const i=n.length,{start:s=0,end:r=i-1}=e,{start:o,end:a}=t,c=Math.max(s,o),f=Math.min(r,a),u=s<o&&r<o||s>a&&r>a;return{count:i,start:c,loop:t.loop,ilen:f<c&&!u?i+f-c:f-c}}function Om(n,t,e,i){const{points:s,options:r}=t,{count:o,start:a,loop:c,ilen:f}=lu(s,e,i),u=Pm(r);let{move:d=!0,reverse:p}=i||{},b,y,_;for(b=0;b<=f;++b)y=s[(a+(p?f-b:b))%o],!y.skip&&(d?(n.moveTo(y.x,y.y),d=!1):u(n,_,y,p,r.stepped),_=y);return c&&(y=s[(a+(p?f:0))%o],u(n,_,y,p,r.stepped)),!!c}function Dm(n,t,e,i){const s=t.points,{count:r,start:o,ilen:a}=lu(s,e,i),{move:c=!0,reverse:f}=i||{};let u=0,d=0,p,b,y,_,S,A;const L=D=>(o+(f?a-D:D))%r,I=()=>{_!==S&&(n.lineTo(u,S),n.lineTo(u,_),n.lineTo(u,A))};for(c&&(b=s[L(0)],n.moveTo(b.x,b.y)),p=0;p<=a;++p){if(b=s[L(p)],b.skip)continue;const D=b.x,N=b.y,P=D|0;P===y?(N<_?_=N:N>S&&(S=N),u=(d*u+D)/++d):(I(),n.lineTo(D,N),y=P,d=0,_=S=N),A=N}I()}function $r(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Dm:Om}function Rm(n){return n.stepped?Ap:n.tension||n.cubicInterpolationMode==="monotone"?Cp:Bn}function Lm(n,t,e,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,i)&&s.closePath()),au(n,t.options),n.stroke(s)}function Fm(n,t,e,i){const{segments:s,options:r}=t,o=$r(t);for(const a of s)au(n,r,a.style),n.beginPath(),o(n,t,a,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const Im=typeof Path2D=="function";function Nm(n,t,e,i){Im&&!t.options.segment?Lm(n,t,e,i):Fm(n,t,e,i)}class Ys extends pn{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:t=>t!=="borderDash"&&t!=="fill"};constructor(t){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,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;mp(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Op(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],r=this.points,o=qc(this,{property:e,start:s,end:s});if(!o.length)return;const a=[],c=Rm(i);let f,u;for(f=0,u=o.length;f<u;++f){const{start:d,end:p}=o[f],b=r[d],y=r[p];if(b===y){a.push(b);continue}const _=Math.abs((s-b[e])/(y[e]-b[e])),S=c(b,y,_,i.stepped);S[e]=t[e],a.push(S)}return a.length===1?a[0]:a}pathSegment(t,e,i){return $r(this)(t,this,e,i)}path(t,e,i){const s=this.segments,r=$r(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const a of s)o&=r(t,this,a,{start:e,end:e+i-1});return!!o}draw(t,e,i,s){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),Nm(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function fl(n,t,e,i){const s=n.options,{[e]:r}=n.getProps([e],i);return Math.abs(t-r)<s.radius+s.hitRadius}class Bm extends pn{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return fl(this,t,"x",e)}inYRange(t,e){return fl(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const i=e&&t.borderWidth||0;return(e+i)*2}draw(t,e){const i=this.options;this.skip||i.radius<.1||!dn(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Ur(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function cu(n,t){const{x:e,y:i,base:s,width:r,height:o}=n.getProps(["x","y","base","width","height"],t);let a,c,f,u,d;return n.horizontal?(d=o/2,a=Math.min(e,s),c=Math.max(e,s),f=i-d,u=i+d):(d=r/2,a=e-d,c=e+d,f=Math.min(i,s),u=Math.max(i,s)),{left:a,top:f,right:c,bottom:u}}function wn(n,t,e,i){return n?0:ue(t,e,i)}function Hm(n,t,e){const i=n.options.borderWidth,s=n.borderSkipped,r=Fc(i);return{t:wn(s.top,r.top,0,e),r:wn(s.right,r.right,0,t),b:wn(s.bottom,r.bottom,0,e),l:wn(s.left,r.left,0,t)}}function jm(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,r=Un(s),o=Math.min(t,e),a=n.borderSkipped,c=i||kt(s);return{topLeft:wn(!c||a.top||a.left,r.topLeft,0,o),topRight:wn(!c||a.top||a.right,r.topRight,0,o),bottomLeft:wn(!c||a.bottom||a.left,r.bottomLeft,0,o),bottomRight:wn(!c||a.bottom||a.right,r.bottomRight,0,o)}}function zm(n){const t=cu(n),e=t.right-t.left,i=t.bottom-t.top,s=Hm(n,e/2,i/2),r=jm(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:r},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,r.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(s.b,s.r))}}}}function Or(n,t,e,i){const s=t===null,r=e===null,a=n&&!(s&&r)&&cu(n,i);return a&&(s||fn(t,a.left,a.right))&&(r||fn(e,a.top,a.bottom))}function Um(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function Wm(n,t){n.rect(t.x,t.y,t.w,t.h)}function Dr(n,t,e={}){const i=n.x!==e.x?-t:0,s=n.y!==e.y?-t:0,r=(n.x+n.w!==e.x+e.w?t:0)-i,o=(n.y+n.h!==e.y+e.h?t:0)-s;return{x:n.x+i,y:n.y+s,w:n.w+r,h:n.h+o,radius:n.radius}}class Vm extends pn{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:r,outer:o}=zm(this),a=Um(o.radius)?ji:Wm;t.save(),(o.w!==r.w||o.h!==r.h)&&(t.beginPath(),a(t,Dr(o,e,r)),t.clip(),a(t,Dr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,Dr(r,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return Or(this,t,e,i)}inXRange(t,e){return Or(this,t,null,e)}inYRange(t,e){return Or(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:s,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+s)/2:e,y:r?i:(i+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}var $m=Object.freeze({__proto__:null,ArcElement:Tm,BarElement:Vm,LineElement:Ys,PointElement:Bm});const qr=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],hl=qr.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function uu(n){return qr[n%qr.length]}function fu(n){return hl[n%hl.length]}function qm(n,t){return n.borderColor=uu(t),n.backgroundColor=fu(t),++t}function Xm(n,t){return n.backgroundColor=n.data.map(()=>uu(t++)),t}function Ym(n,t){return n.backgroundColor=n.data.map(()=>fu(t++)),t}function Km(n){let t=0;return(e,i)=>{const s=n.getDatasetMeta(i).controller;s instanceof bo?t=Xm(e,t):s instanceof Qc?t=Ym(e,t):s&&(t=qm(e,t))}}function dl(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function Gm(n){return n&&(n.borderColor||n.backgroundColor)}function Qm(){return qt.borderColor!=="rgba(0,0,0,0.1)"||qt.backgroundColor!=="rgba(0,0,0,0.1)"}var Jm={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:i},options:s}=n.config,{elements:r}=s,o=dl(i)||Gm(s)||r&&dl(r)||Qm();if(!e.forceOverride&&o)return;const a=Km(n);i.forEach(a)}};function Zm(n,t,e,i,s){const r=s.samples||i;if(r>=e)return n.slice(t,t+e);const o=[],a=(e-2)/(r-2);let c=0;const f=t+e-1;let u=t,d,p,b,y,_;for(o[c++]=n[u],d=0;d<r-2;d++){let S=0,A=0,L;const I=Math.floor((d+1)*a)+1+t,D=Math.min(Math.floor((d+2)*a)+1,e)+t,N=D-I;for(L=I;L<D;L++)S+=n[L].x,A+=n[L].y;S/=N,A/=N;const P=Math.floor(d*a)+1+t,g=Math.min(Math.floor((d+1)*a)+1,e)+t,{x:M,y:k}=n[u];for(b=y=-1,L=P;L<g;L++)y=.5*Math.abs((M-S)*(n[L].y-k)-(M-n[L].x)*(A-k)),y>b&&(b=y,p=n[L],_=L);o[c++]=p,u=_}return o[c++]=n[f],o}function tb(n,t,e,i){let s=0,r=0,o,a,c,f,u,d,p,b,y,_;const S=[],A=t+e-1,L=n[t].x,D=n[A].x-L;for(o=t;o<t+e;++o){a=n[o],c=(a.x-L)/D*i,f=a.y;const N=c|0;if(N===u)f<y?(y=f,d=o):f>_&&(_=f,p=o),s=(r*s+a.x)/++r;else{const P=o-1;if(!St(d)&&!St(p)){const g=Math.min(d,p),M=Math.max(d,p);g!==b&&g!==P&&S.push({...n[g],x:s}),M!==b&&M!==P&&S.push({...n[M],x:s})}o>0&&P!==b&&S.push(n[P]),S.push(a),u=N,r=0,y=_=f,d=p=b=o}}return S}function hu(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function pl(n){n.data.datasets.forEach(t=>{hu(t)})}function eb(n,t){const e=t.length;let i=0,s;const{iScale:r}=n,{min:o,max:a,minDefined:c,maxDefined:f}=r.getUserBounds();return c&&(i=ue(hn(t,r.axis,o).lo,0,e-1)),f?s=ue(hn(t,r.axis,a).hi+1,i,e)-i:s=e-i,{start:i,count:s}}var nb={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){pl(n);return}const i=n.width;n.data.datasets.forEach((s,r)=>{const{_data:o,indexAxis:a}=s,c=n.getDatasetMeta(r),f=o||s.data;if(Ei([a,n.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const u=n.scales[c.xAxisID];if(u.type!=="linear"&&u.type!=="time"||n.options.parsing)return;let{start:d,count:p}=eb(c,f);const b=e.threshold||4*i;if(p<=b){hu(s);return}St(o)&&(s._data=f,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(_){this._data=_}}));let y;switch(e.algorithm){case"lttb":y=Zm(f,d,p,i,e);break;case"min-max":y=tb(f,d,p,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=y})},destroy(n){pl(n)}};function ib(n,t,e){const i=n.segments,s=n.points,r=t.points,o=[];for(const a of i){let{start:c,end:f}=a;f=Ks(c,f,s);const u=Xr(e,s[c],s[f],a.loop);if(!t.segments){o.push({source:a,target:u,start:s[c],end:s[f]});continue}const d=qc(t,u);for(const p of d){const b=Xr(e,r[p.start],r[p.end],p.loop),y=$c(a,s,b);for(const _ of y)o.push({source:_,target:p,start:{[e]:gl(u,b,"start",Math.max)},end:{[e]:gl(u,b,"end",Math.min)}})}}return o}function Xr(n,t,e,i){if(i)return;let s=t[n],r=e[n];return n==="angle"&&(s=be(s),r=be(r)),{property:n,start:s,end:r}}function sb(n,t){const{x:e=null,y:i=null}=n||{},s=t.points,r=[];return t.segments.forEach(({start:o,end:a})=>{a=Ks(o,a,s);const c=s[o],f=s[a];i!==null?(r.push({x:c.x,y:i}),r.push({x:f.x,y:i})):e!==null&&(r.push({x:e,y:c.y}),r.push({x:e,y:f.y}))}),r}function Ks(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function gl(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function du(n,t){let e=[],i=!1;return $t(n)?(i=!0,e=n):e=sb(n,t),e.length?new Ys({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function ml(n){return n&&n.fill!==!1}function rb(n,t,e){let s=n[t].fill;const r=[t];let o;if(!e)return s;for(;s!==!1&&r.indexOf(s)===-1;){if(!Qt(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;r.push(s),s=o.fill}return!1}function ob(n,t,e){const i=ub(n);if(kt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Qt(s)&&Math.floor(s)===s?ab(i[0],t,s,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function ab(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function lb(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:kt(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function cb(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:kt(n)?i=n.value:i=t.getBaseValue(),i}function ub(n){const t=n.options,e=t.fill;let i=yt(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function fb(n){const{scale:t,index:e,line:i}=n,s=[],r=i.segments,o=i.points,a=hb(t,e);a.push(du({x:null,y:t.bottom},i));for(let c=0;c<r.length;c++){const f=r[c];for(let u=f.start;u<=f.end;u++)db(s,o[u],a)}return new Ys({points:s,options:{}})}function hb(n,t){const e=[],i=n.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const r=i[s];if(r.index===t)break;r.hidden||e.unshift(r.dataset)}return e}function db(n,t,e){const i=[];for(let s=0;s<e.length;s++){const r=e[s],{first:o,last:a,point:c}=pb(r,t,"x");if(!(!c||o&&a)){if(o)i.unshift(c);else if(n.push(c),!a)break}}n.push(...i)}function pb(n,t,e){const i=n.interpolate(t,e);if(!i)return{};const s=i[e],r=n.segments,o=n.points;let a=!1,c=!1;for(let f=0;f<r.length;f++){const u=r[f],d=o[u.start][e],p=o[u.end][e];if(fn(s,d,p)){a=s===d,c=s===p;break}}return{first:a,last:c,point:i}}class pu{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:s,y:r,radius:o}=this;return e=e||{start:0,end:Ut},t.arc(s,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:s}=this,r=t.angle;return{x:e+Math.cos(r)*s,y:i+Math.sin(r)*s,angle:r}}}function gb(n){const{chart:t,fill:e,line:i}=n;if(Qt(e))return mb(t,e);if(e==="stack")return fb(n);if(e==="shape")return!0;const s=bb(n);return s instanceof pu?s:du(s,i)}function mb(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function bb(n){return(n.scale||{}).getPointPositionForValue?xb(n):yb(n)}function yb(n){const{scale:t={},fill:e}=n,i=lb(e,t);if(Qt(i)){const s=t.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function xb(n){const{scale:t,fill:e}=n,i=t.options,s=t.getLabels().length,r=i.reverse?t.max:t.min,o=cb(e,t,r),a=[];if(i.grid.circular){const c=t.getPointPositionForValue(0,r);return new pu({x:c.x,y:c.y,radius:t.getDistanceFromCenterForValue(o)})}for(let c=0;c<s;++c)a.push(t.getPointPositionForValue(c,o));return a}function Rr(n,t,e){const i=gb(t),{chart:s,index:r,line:o,scale:a,axis:c}=t,f=o.options,u=f.fill,d=f.backgroundColor,{above:p=d,below:b=d}=u||{},y=s.getDatasetMeta(r),_=Xc(s,y);i&&o.points.length&&(Vs(n,e),_b(n,{line:o,target:i,above:p,below:b,area:e,scale:a,axis:c,clip:_}),$s(n))}function _b(n,t){const{line:e,target:i,above:s,below:r,area:o,scale:a,clip:c}=t,f=e._loop?"angle":t.axis;n.save();let u=r;r!==s&&(f==="x"?(bl(n,i,o.top),Lr(n,{line:e,target:i,color:s,scale:a,property:f,clip:c}),n.restore(),n.save(),bl(n,i,o.bottom)):f==="y"&&(yl(n,i,o.left),Lr(n,{line:e,target:i,color:r,scale:a,property:f,clip:c}),n.restore(),n.save(),yl(n,i,o.right),u=s)),Lr(n,{line:e,target:i,color:u,scale:a,property:f,clip:c}),n.restore()}function bl(n,t,e){const{segments:i,points:s}=t;let r=!0,o=!1;n.beginPath();for(const a of i){const{start:c,end:f}=a,u=s[c],d=s[Ks(c,f,s)];r?(n.moveTo(u.x,u.y),r=!1):(n.lineTo(u.x,e),n.lineTo(u.x,u.y)),o=!!t.pathSegment(n,a,{move:o}),o?n.closePath():n.lineTo(d.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function yl(n,t,e){const{segments:i,points:s}=t;let r=!0,o=!1;n.beginPath();for(const a of i){const{start:c,end:f}=a,u=s[c],d=s[Ks(c,f,s)];r?(n.moveTo(u.x,u.y),r=!1):(n.lineTo(e,u.y),n.lineTo(u.x,u.y)),o=!!t.pathSegment(n,a,{move:o}),o?n.closePath():n.lineTo(e,d.y)}n.lineTo(e,t.first().y),n.closePath(),n.clip()}function Lr(n,t){const{line:e,target:i,property:s,color:r,scale:o,clip:a}=t,c=ib(e,i,s);for(const{source:f,target:u,start:d,end:p}of c){const{style:{backgroundColor:b=r}={}}=f,y=i!==!0;n.save(),n.fillStyle=b,vb(n,o,a,y&&Xr(s,d,p)),n.beginPath();const _=!!e.pathSegment(n,f);let S;if(y){_?n.closePath():xl(n,i,p,s);const A=!!i.pathSegment(n,u,{move:_,reverse:!0});S=_&&A,S||xl(n,i,d,s)}n.closePath(),n.fill(S?"evenodd":"nonzero"),n.restore()}}function vb(n,t,e,i){const s=t.chart.chartArea,{property:r,start:o,end:a}=i||{};if(r==="x"||r==="y"){let c,f,u,d;r==="x"?(c=o,f=s.top,u=a,d=s.bottom):(c=s.left,f=o,u=s.right,d=a),n.beginPath(),e&&(c=Math.max(c,e.left),u=Math.min(u,e.right),f=Math.max(f,e.top),d=Math.min(d,e.bottom)),n.rect(c,f,u-c,d-f),n.clip()}}function xl(n,t,e,i){const s=t.interpolate(e,i);s&&n.lineTo(s.x,s.y)}var wb={id:"filler",afterDatasetsUpdate(n,t,e){const i=(n.data.datasets||[]).length,s=[];let r,o,a,c;for(o=0;o<i;++o)r=n.getDatasetMeta(o),a=r.dataset,c=null,a&&a.options&&a instanceof Ys&&(c={visible:n.isDatasetVisible(o),index:o,fill:ob(a,o,i),chart:n,axis:r.controller.options.indexAxis,scale:r.vScale,line:a}),r.$filler=c,s.push(c);for(o=0;o<i;++o)c=s[o],!(!c||c.fill===!1)&&(c.fill=rb(s,o,e.propagate))},beforeDraw(n,t,e){const i=e.drawTime==="beforeDraw",s=n.getSortedVisibleDatasetMetas(),r=n.chartArea;for(let o=s.length-1;o>=0;--o){const a=s[o].$filler;a&&(a.line.updateControlPoints(r,a.axis),i&&a.fill&&Rr(n.ctx,a,r))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const r=i[s].$filler;ml(r)&&Rr(n.ctx,r,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!ml(i)||e.drawTime!=="beforeDatasetDraw"||Rr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const _l=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},Sb=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class vl extends pn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.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(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,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 t=this.options.labels||{};let e=zt(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,s=se(i.font),r=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:c}=_l(i,r);let f,u;e.font=s.string,this.isHorizontal()?(f=this.maxWidth,u=this._fitRows(o,r,a,c)+10):(u=this.maxHeight,f=this._fitCols(o,s,a,c)+10),this.width=Math.min(f,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],f=this.lineWidths=[0],u=s+a;let d=t;r.textAlign="left",r.textBaseline="middle";let p=-1,b=-u;return this.legendItems.forEach((y,_)=>{const S=i+e/2+r.measureText(y.text).width;(_===0||f[f.length-1]+S+2*a>o)&&(d+=u,f[f.length-(_>0?0:1)]=0,b+=u,p++),c[_]={left:0,top:b,row:p,width:S,height:s},f[f.length-1]+=S+a}),d}_fitCols(t,e,i,s){const{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],f=this.columnSizes=[],u=o-t;let d=a,p=0,b=0,y=0,_=0;return this.legendItems.forEach((S,A)=>{const{itemWidth:L,itemHeight:I}=Ab(i,e,r,S,s);A>0&&b+I+2*a>u&&(d+=p+a,f.push({width:p,height:b}),y+=p+a,_++,p=b=0),c[A]={left:y,top:b,col:_,width:L,height:I},p=Math.max(p,L),b+=I+a}),d+=p,f.push({width:p,height:b}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:r}}=this,o=oi(r,this.left,this.width);if(this.isHorizontal()){let a=0,c=me(i,this.left+s,this.right-this.lineWidths[a]);for(const f of e)a!==f.row&&(a=f.row,c=me(i,this.left+s,this.right-this.lineWidths[a])),f.top+=this.top+t+s,f.left=o.leftForLtr(o.x(c),f.width),c+=f.width+s}else{let a=0,c=me(i,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const f of e)f.col!==a&&(a=f.col,c=me(i,this.top+t+s,this.bottom-this.columnSizes[a].height)),f.top=c,f.left+=this.left+s,f.left=o.leftForLtr(o.x(f.left),f.width),c+=f.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Vs(t,this),this._draw(),$s(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:r,labels:o}=t,a=qt.color,c=oi(t.rtl,this.left,this.width),f=se(o.font),{padding:u}=o,d=f.size,p=d/2;let b;this.drawTitle(),s.textAlign=c.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=f.string;const{boxWidth:y,boxHeight:_,itemHeight:S}=_l(o,d),A=function(P,g,M){if(isNaN(y)||y<=0||isNaN(_)||_<0)return;s.save();const k=yt(M.lineWidth,1);if(s.fillStyle=yt(M.fillStyle,a),s.lineCap=yt(M.lineCap,"butt"),s.lineDashOffset=yt(M.lineDashOffset,0),s.lineJoin=yt(M.lineJoin,"miter"),s.lineWidth=k,s.strokeStyle=yt(M.strokeStyle,a),s.setLineDash(yt(M.lineDash,[])),o.usePointStyle){const B={radius:_*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:k},H=c.xPlus(P,y/2),j=g+p;Lc(s,B,H,j,o.pointStyleWidth&&y)}else{const B=g+Math.max((d-_)/2,0),H=c.leftForLtr(P,y),j=Un(M.borderRadius);s.beginPath(),Object.values(j).some(U=>U!==0)?ji(s,{x:H,y:B,w:y,h:_,radius:j}):s.rect(H,B,y,_),s.fill(),k!==0&&s.stroke()}s.restore()},L=function(P,g,M){qn(s,M.text,P,g+S/2,f,{strikethrough:M.hidden,textAlign:c.textAlign(M.textAlign)})},I=this.isHorizontal(),D=this._computeTitleHeight();I?b={x:me(r,this.left+u,this.right-i[0]),y:this.top+u+D,line:0}:b={x:this.left+u,y:me(r,this.top+D+u,this.bottom-e[0].height),line:0},Uc(this.ctx,t.textDirection);const N=S+u;this.legendItems.forEach((P,g)=>{s.strokeStyle=P.fontColor,s.fillStyle=P.fontColor;const M=s.measureText(P.text).width,k=c.textAlign(P.textAlign||(P.textAlign=o.textAlign)),B=y+p+M;let H=b.x,j=b.y;c.setWidth(this.width),I?g>0&&H+B+u>this.right&&(j=b.y+=N,b.line++,H=b.x=me(r,this.left+u,this.right-i[b.line])):g>0&&j+N>this.bottom&&(H=b.x=H+e[b.line].width+u,b.line++,j=b.y=me(r,this.top+D+u,this.bottom-e[b.line].height));const U=c.x(H);if(A(U,j,P),H=Ld(k,H+y+p,I?H+B:this.right,t.rtl),L(c.x(H),j,P),I)b.x+=B+u;else if(typeof P.text!="string"){const z=f.lineHeight;b.y+=gu(P,z)+u}else b.y+=N}),Wc(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=se(e.font),s=_e(e.padding);if(!e.display)return;const r=oi(t.rtl,this.left,this.width),o=this.ctx,a=e.position,c=i.size/2,f=s.top+c;let u,d=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),u=this.top+f,d=me(t.align,d,this.right-p);else{const y=this.columnSizes.reduce((_,S)=>Math.max(_,S.height),0);u=f+me(t.align,this.top,this.bottom-y-t.labels.padding-this._computeTitleHeight())}const b=me(a,d,d+p);o.textAlign=r.textAlign(lo(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,qn(o,e.text,b,u,i)}_computeTitleHeight(){const t=this.options.title,e=se(t.font),i=_e(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,r;if(fn(t,this.left,this.right)&&fn(e,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(s=r[i],fn(t,s.left,s.left+s.width)&&fn(e,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!Mb(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,r=Sb(s,i);s&&!r&&zt(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!r&&zt(e.onHover,[t,i,this],this)}else i&&zt(e.onClick,[t,i,this],this)}}function Ab(n,t,e,i,s){const r=Cb(i,n,t,e),o=kb(s,i,t.lineHeight);return{itemWidth:r,itemHeight:o}}function Cb(n,t,e,i){let s=n.text;return s&&typeof s!="string"&&(s=s.reduce((r,o)=>r.length>o.length?r:o)),t+e.size/2+i.measureText(s).width}function kb(n,t,e){let i=n;return typeof t.text!="string"&&(i=gu(t,e)),i}function gu(n,t){const e=n.text?n.text.length:0;return t*e}function Mb(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var Tb={id:"legend",_element:vl,start(n,t,e){const i=n.legend=new vl({ctx:n.ctx,options:e,chart:n});xe.configure(n,i,e),xe.addBox(n,i)},stop(n){xe.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;xe.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,s=e.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:s,color:r,useBorderRadius:o,borderRadius:a}}=n.legend.options;return n._getSortedDatasetMetas().map(c=>{const f=c.controller.getStyle(e?0:void 0),u=_e(f.borderWidth);return{text:t[c.index].label,fillStyle:f.backgroundColor,fontColor:r,hidden:!c.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:f.borderColor,pointStyle:i||f.pointStyle,rotation:f.rotation,textAlign:s||f.textAlign,borderRadius:o&&(a||f.borderRadius),datasetIndex:c.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class _o extends pn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,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.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const s=$t(i.text)?i.text.length:1;this._padding=_e(i.padding);const r=s*se(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:s,right:r,options:o}=this,a=o.align;let c=0,f,u,d;return this.isHorizontal()?(u=me(a,i,r),d=e+t,f=r-i):(o.position==="left"?(u=i+t,d=me(a,s,e),c=Ot*-.5):(u=r-t,d=me(a,e,s),c=Ot*.5),f=s-e),{titleX:u,titleY:d,maxWidth:f,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=se(e.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:c,rotation:f}=this._drawArgs(r);qn(t,e.text,0,0,i,{color:e.color,maxWidth:c,rotation:f,textAlign:lo(e.align),textBaseline:"middle",translation:[o,a]})}}function Eb(n,t){const e=new _o({ctx:n.ctx,options:t,chart:n});xe.configure(n,e,t),xe.addBox(n,e),n.titleBlock=e}var Pb={id:"title",_element:_o,start(n,t,e){Eb(n,e)},stop(n){const t=n.titleBlock;xe.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;xe.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ps=new WeakMap;var Ob={id:"subtitle",start(n,t,e){const i=new _o({ctx:n.ctx,options:e,chart:n});xe.configure(n,i,e),xe.addBox(n,i),ps.set(n,i)},stop(n){xe.removeBox(n,ps.get(n)),ps.delete(n)},beforeUpdate(n,t,e){const i=ps.get(n);xe.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Oi={average(n){if(!n.length)return!1;let t,e,i=new Set,s=0,r=0;for(t=0,e=n.length;t<e;++t){const a=n[t].element;if(a&&a.hasValue()){const c=a.tooltipPosition();i.add(c.x),s+=c.y,++r}}return r===0||i.size===0?!1:{x:[...i].reduce((a,c)=>a+c)/i.size,y:s/r}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,s=Number.POSITIVE_INFINITY,r,o,a;for(r=0,o=n.length;r<o;++r){const c=n[r].element;if(c&&c.hasValue()){const f=c.getCenterPoint(),u=jr(t,f);u<s&&(s=u,a=c)}}if(a){const c=a.tooltipPosition();e=c.x,i=c.y}return{x:e,y:i}}};function Qe(n,t){return t&&($t(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function cn(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
||
`)>-1?n.split(`
|
||
`):n}function Db(n,t){const{element:e,datasetIndex:i,index:s}=t,r=n.getDatasetMeta(i).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:n,label:o,parsed:r.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:e}}function wl(n,t){const e=n.chart.ctx,{body:i,footer:s,title:r}=n,{boxWidth:o,boxHeight:a}=t,c=se(t.bodyFont),f=se(t.titleFont),u=se(t.footerFont),d=r.length,p=s.length,b=i.length,y=_e(t.padding);let _=y.height,S=0,A=i.reduce((D,N)=>D+N.before.length+N.lines.length+N.after.length,0);if(A+=n.beforeBody.length+n.afterBody.length,d&&(_+=d*f.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),A){const D=t.displayColors?Math.max(a,c.lineHeight):c.lineHeight;_+=b*D+(A-b)*c.lineHeight+(A-1)*t.bodySpacing}p&&(_+=t.footerMarginTop+p*u.lineHeight+(p-1)*t.footerSpacing);let L=0;const I=function(D){S=Math.max(S,e.measureText(D).width+L)};return e.save(),e.font=f.string,It(n.title,I),e.font=c.string,It(n.beforeBody.concat(n.afterBody),I),L=t.displayColors?o+2+t.boxPadding:0,It(i,D=>{It(D.before,I),It(D.lines,I),It(D.after,I)}),L=0,e.font=u.string,It(n.footer,I),e.restore(),S+=y.width,{width:S,height:_}}function Rb(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function Lb(n,t,e,i){const{x:s,width:r}=i,o=e.caretSize+e.caretPadding;if(n==="left"&&s+r+o>t.width||n==="right"&&s-r-o<0)return!0}function Fb(n,t,e,i){const{x:s,width:r}=e,{width:o,chartArea:{left:a,right:c}}=n;let f="center";return i==="center"?f=s<=(a+c)/2?"left":"right":s<=r/2?f="left":s>=o-r/2&&(f="right"),Lb(f,n,t,e)&&(f="center"),f}function Sl(n,t,e){const i=e.yAlign||t.yAlign||Rb(n,e);return{xAlign:e.xAlign||t.xAlign||Fb(n,t,e,i),yAlign:i}}function Ib(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Nb(n,t,e){let{y:i,height:s}=n;return t==="top"?i+=e:t==="bottom"?i-=s+e:i-=s/2,i}function Al(n,t,e,i){const{caretSize:s,caretPadding:r,cornerRadius:o}=n,{xAlign:a,yAlign:c}=e,f=s+r,{topLeft:u,topRight:d,bottomLeft:p,bottomRight:b}=Un(o);let y=Ib(t,a);const _=Nb(t,c,f);return c==="center"?a==="left"?y+=f:a==="right"&&(y-=f):a==="left"?y-=Math.max(u,p)+s:a==="right"&&(y+=Math.max(d,b)+s),{x:ue(y,0,i.width-t.width),y:ue(_,0,i.height-t.height)}}function gs(n,t,e){const i=_e(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function Cl(n){return Qe([],cn(n))}function Bb(n,t,e){return kn(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function kl(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const mu={beforeTitle:an,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:an,beforeBody:an,beforeLabel:an,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return St(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:an,afterBody:an,beforeFooter:an,footer:an,afterFooter:an};function Me(n,t,e,i){const s=n[t].call(e,i);return typeof s>"u"?mu[t].call(e,i):s}class Ml extends pn{static positioners=Oi;constructor(t){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=t.chart,this.options=t.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(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,r=new Yc(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=Bb(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,s=Me(i,"beforeTitle",this,t),r=Me(i,"title",this,t),o=Me(i,"afterTitle",this,t);let a=[];return a=Qe(a,cn(s)),a=Qe(a,cn(r)),a=Qe(a,cn(o)),a}getBeforeBody(t,e){return Cl(Me(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,s=[];return It(t,r=>{const o={before:[],lines:[],after:[]},a=kl(i,r);Qe(o.before,cn(Me(a,"beforeLabel",this,r))),Qe(o.lines,Me(a,"label",this,r)),Qe(o.after,cn(Me(a,"afterLabel",this,r))),s.push(o)}),s}getAfterBody(t,e){return Cl(Me(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=Me(i,"beforeFooter",this,t),r=Me(i,"footer",this,t),o=Me(i,"afterFooter",this,t);let a=[];return a=Qe(a,cn(s)),a=Qe(a,cn(r)),a=Qe(a,cn(o)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],r=[],o=[];let a=[],c,f;for(c=0,f=e.length;c<f;++c)a.push(Db(this.chart,e[c]));return t.filter&&(a=a.filter((u,d,p)=>t.filter(u,d,p,i))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,i))),It(a,u=>{const d=kl(t.callbacks,u);s.push(Me(d,"labelColor",this,u)),r.push(Me(d,"labelPointStyle",this,u)),o.push(Me(d,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let r,o=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{const a=Oi[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const c=this._size=wl(this,i),f=Object.assign({},a,c),u=Sl(this.chart,i,f),d=Al(i,f,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:d.x,y:d.y,width:c.width,height:c.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const r=this.getCaretPosition(t,i,s);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:r}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:c,topRight:f,bottomLeft:u,bottomRight:d}=Un(a),{x:p,y:b}=t,{width:y,height:_}=e;let S,A,L,I,D,N;return r==="center"?(D=b+_/2,s==="left"?(S=p,A=S-o,I=D+o,N=D-o):(S=p+y,A=S+o,I=D-o,N=D+o),L=S):(s==="left"?A=p+Math.max(c,u)+o:s==="right"?A=p+y-Math.max(f,d)-o:A=this.caretX,r==="top"?(I=b,D=I-o,S=A-o,L=A+o):(I=b+_,D=I+o,S=A+o,L=A-o),N=I),{x1:S,x2:A,x3:L,y1:I,y2:D,y3:N}}drawTitle(t,e,i){const s=this.title,r=s.length;let o,a,c;if(r){const f=oi(i.rtl,this.x,this.width);for(t.x=gs(this,i.titleAlign,i),e.textAlign=f.textAlign(i.titleAlign),e.textBaseline="middle",o=se(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,c=0;c<r;++c)e.fillText(s[c],f.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,c+1===r&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,s,r){const o=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:c,boxWidth:f}=r,u=se(r.bodyFont),d=gs(this,"left",r),p=s.x(d),b=c<u.lineHeight?(u.lineHeight-c)/2:0,y=e.y+b;if(r.usePointStyle){const _={radius:Math.min(f,c)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},S=s.leftForLtr(p,f)+f/2,A=y+c/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,Ur(t,_,S,A),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Ur(t,_,S,A)}else{t.lineWidth=kt(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const _=s.leftForLtr(p,f),S=s.leftForLtr(s.xPlus(p,1),f-2),A=Un(o.borderRadius);Object.values(A).some(L=>L!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,ji(t,{x:_,y,w:f,h:c,radius:A}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),ji(t,{x:S,y:y+1,w:f-2,h:c-2,radius:A}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(_,y,f,c),t.strokeRect(_,y,f,c),t.fillStyle=o.backgroundColor,t.fillRect(S,y+1,f-2,c-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:c,boxWidth:f,boxPadding:u}=i,d=se(i.bodyFont);let p=d.lineHeight,b=0;const y=oi(i.rtl,this.x,this.width),_=function(M){e.fillText(M,y.x(t.x+b),t.y+p/2),t.y+=p+r},S=y.textAlign(o);let A,L,I,D,N,P,g;for(e.textAlign=o,e.textBaseline="middle",e.font=d.string,t.x=gs(this,S,i),e.fillStyle=i.bodyColor,It(this.beforeBody,_),b=a&&S!=="right"?o==="center"?f/2+u:f+2+u:0,D=0,P=s.length;D<P;++D){for(A=s[D],L=this.labelTextColors[D],e.fillStyle=L,It(A.before,_),I=A.lines,a&&I.length&&(this._drawColorBox(e,t,D,y,i),p=Math.max(d.lineHeight,c)),N=0,g=I.length;N<g;++N)_(I[N]),p=d.lineHeight;It(A.after,_)}b=0,p=d.lineHeight,It(this.afterBody,_),t.y-=r}drawFooter(t,e,i){const s=this.footer,r=s.length;let o,a;if(r){const c=oi(i.rtl,this.x,this.width);for(t.x=gs(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=c.textAlign(i.footerAlign),e.textBaseline="middle",o=se(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,a=0;a<r;++a)e.fillText(s[a],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:r,yAlign:o}=this,{x:a,y:c}=t,{width:f,height:u}=i,{topLeft:d,topRight:p,bottomLeft:b,bottomRight:y}=Un(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(a+d,c),o==="top"&&this.drawCaret(t,e,i,s),e.lineTo(a+f-p,c),e.quadraticCurveTo(a+f,c,a+f,c+p),o==="center"&&r==="right"&&this.drawCaret(t,e,i,s),e.lineTo(a+f,c+u-y),e.quadraticCurveTo(a+f,c+u,a+f-y,c+u),o==="bottom"&&this.drawCaret(t,e,i,s),e.lineTo(a+b,c+u),e.quadraticCurveTo(a,c+u,a,c+u-b),o==="center"&&r==="left"&&this.drawCaret(t,e,i,s),e.lineTo(a,c+d),e.quadraticCurveTo(a,c,a+d,c),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){const o=Oi[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=wl(this,t),c=Object.assign({},o,this._size),f=Sl(e,t,c),u=Al(t,c,f,e);(s._to!==u.x||r._to!==u.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=_e(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,s,e),Uc(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),Wc(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map(({datasetIndex:a,index:c})=>{const f=this.chart.getDatasetMeta(a);if(!f)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:f.data[c],index:c}}),r=!Es(i,s),o=this._positionChanged(s,e);(r||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,r=this._active||[],o=this._getActiveElements(t,r,e,i),a=this._positionChanged(o,t),c=e||!Es(o,r)||a;return c&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),c}_getActiveElements(t,e,i,s){const r=this.options;if(t.type==="mouseout")return[];if(!s)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:s,options:r}=this,o=Oi[r.position].call(this,t,e);return o!==!1&&(i!==o.x||s!==o.y)}}var Hb={id:"tooltip",_element:Ml,positioners:Oi,afterInit(n,t,e){e&&(n.tooltip=new Ml({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,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:(n,t)=>t.bodyFont.size,boxWidth:(n,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:mu},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},jb=Object.freeze({__proto__:null,Colors:Jm,Decimation:nb,Filler:wb,Legend:Tb,SubTitle:Ob,Title:Pb,Tooltip:Hb});const zb=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Ub(n,t,e,i){const s=n.indexOf(t);if(s===-1)return zb(n,t,e,i);const r=n.lastIndexOf(t);return s!==r?e:s}const Wb=(n,t)=>n===null?null:ue(Math.round(n),0,t);function Tl(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class Vb extends Xn{static id="category";static defaults={ticks:{callback:Tl}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:s,label:r}of e)i[s]===r&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(St(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:Ub(i,t,yt(e,t),this._addedLabels),Wb(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let r=this.getLabels();r=t===0&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=e;o++)s.push({value:o});return s}getLabelForValue(t){return Tl.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function $b(n,t){const e=[],{bounds:s,step:r,min:o,max:a,precision:c,count:f,maxTicks:u,maxDigits:d,includeBounds:p}=n,b=r||1,y=u-1,{min:_,max:S}=t,A=!St(o),L=!St(a),I=!St(f),D=(S-_)/(d+1);let N=wa((S-_)/y/b)*b,P,g,M,k;if(N<1e-14&&!A&&!L)return[{value:_},{value:S}];k=Math.ceil(S/N)-Math.floor(_/N),k>y&&(N=wa(k*N/y/b)*b),St(c)||(P=Math.pow(10,c),N=Math.ceil(N*P)/P),s==="ticks"?(g=Math.floor(_/N)*N,M=Math.ceil(S/N)*N):(g=_,M=S),A&&L&&r&&Md((a-o)/r,N/1e3)?(k=Math.round(Math.min((a-o)/N,u)),N=(a-o)/k,g=o,M=a):I?(g=A?o:g,M=L?a:M,k=f-1,N=(M-g)/k):(k=(M-g)/N,Ri(k,Math.round(k),N/1e3)?k=Math.round(k):k=Math.ceil(k));const B=Math.max(Sa(N),Sa(g));P=Math.pow(10,St(c)?B:c),g=Math.round(g*P)/P,M=Math.round(M*P)/P;let H=0;for(A&&(p&&g!==o?(e.push({value:o}),g<o&&H++,Ri(Math.round((g+H*N)*P)/P,o,El(o,D,n))&&H++):g<o&&H++);H<k;++H){const j=Math.round((g+H*N)*P)/P;if(L&&j>a)break;e.push({value:j})}return L&&p&&M!==a?e.length&&Ri(e[e.length-1].value,a,El(a,D,n))?e[e.length-1].value=a:e.push({value:a}):(!L||M===a)&&e.push({value:M}),e}function El(n,t,{horizontal:e,minRotation:i}){const s=We(i),r=(e?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+n).length;return Math.min(t/r,o)}class Is extends Xn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return St(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:r}=this;const o=c=>s=e?s:c,a=c=>r=i?r:c;if(t){const c=tn(s),f=tn(r);c<0&&f<0?a(0):c>0&&f>0&&o(0)}if(s===r){let c=r===0?1:Math.abs(r*.05);a(r+c),t||o(s-c)}this.min=s,this.max=r}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},r=this._range||this,o=$b(s,r);return t.bounds==="ticks"&&Cc(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Yi(t,this.chart.options.locale,this.options.ticks.format)}}class qb extends Is{static id="linear";static defaults={ticks:{callback:Ws.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Qt(t)?t:0,this.max=Qt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=We(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Ui=n=>Math.floor(_n(n)),In=(n,t)=>Math.pow(10,Ui(n)+t);function Pl(n){return n/Math.pow(10,Ui(n))===1}function Ol(n,t,e){const i=Math.pow(10,e),s=Math.floor(n/i);return Math.ceil(t/i)-s}function Xb(n,t){const e=t-n;let i=Ui(e);for(;Ol(n,t,i)>10;)i++;for(;Ol(n,t,i)<10;)i--;return Math.min(i,Ui(n))}function Yb(n,{min:t,max:e}){t=Re(n.min,t);const i=[],s=Ui(t);let r=Xb(t,e),o=r<0?Math.pow(10,Math.abs(r)):1;const a=Math.pow(10,r),c=s>r?Math.pow(10,s):0,f=Math.round((t-c)*o)/o,u=Math.floor((t-c)/a/10)*a*10;let d=Math.floor((f-u)/Math.pow(10,r)),p=Re(n.min,Math.round((c+u+d*Math.pow(10,r))*o)/o);for(;p<e;)i.push({value:p,major:Pl(p),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(r++,d=2,o=r>=0?1:o),p=Math.round((c+u+d*Math.pow(10,r))*o)/o;const b=Re(n.max,p);return i.push({value:b,major:Pl(b),significand:d}),i}class Kb extends Xn{static id="logarithmic";static defaults={ticks:{callback:Ws.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Is.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return Qt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Qt(t)?Math.max(0,t):null,this.max=Qt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Qt(this._userMin)&&(this.min=t===In(this.min,0)?In(this.min,-1):In(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const r=a=>i=t?i:a,o=a=>s=e?s:a;i===s&&(i<=0?(r(1),o(10)):(r(In(i,-1)),o(In(s,1)))),i<=0&&r(In(s,-1)),s<=0&&o(In(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=Yb(e,this);return t.bounds==="ticks"&&Cc(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Yi(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=_n(t),this._valueRange=_n(this.max)-_n(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(_n(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Yr(n){const t=n.ticks;if(t.display&&n.display){const e=_e(t.backdropPadding);return yt(t.font&&t.font.size,qt.font.size)+e.height}return 0}function Gb(n,t,e){return e=$t(e)?e:[e],{w:Vd(n,t.string,e),h:e.length*t.lineHeight}}function Dl(n,t,e,i,s){return n===i||n===s?{start:t-e/2,end:t+e/2}:n<i||n>s?{start:t-e,end:t}:{start:t,end:t+e}}function Qb(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],s=[],r=n._pointLabels.length,o=n.options.pointLabels,a=o.centerPointLabels?Ot/r:0;for(let c=0;c<r;c++){const f=o.setContext(n.getPointLabelContext(c));s[c]=f.padding;const u=n.getPointPosition(c,n.drawingArea+s[c],a),d=se(f.font),p=Gb(n.ctx,d,n._pointLabels[c]);i[c]=p;const b=be(n.getIndexAngle(c)+a),y=Math.round(oo(b)),_=Dl(y,u.x,p.w,0,180),S=Dl(y,u.y,p.h,90,270);Jb(e,t,b,_,S)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=e0(n,i,s)}function Jb(n,t,e,i,s){const r=Math.abs(Math.sin(e)),o=Math.abs(Math.cos(e));let a=0,c=0;i.start<t.l?(a=(t.l-i.start)/r,n.l=Math.min(n.l,t.l-a)):i.end>t.r&&(a=(i.end-t.r)/r,n.r=Math.max(n.r,t.r+a)),s.start<t.t?(c=(t.t-s.start)/o,n.t=Math.min(n.t,t.t-c)):s.end>t.b&&(c=(s.end-t.b)/o,n.b=Math.max(n.b,t.b+c))}function Zb(n,t,e){const i=n.drawingArea,{extra:s,additionalAngle:r,padding:o,size:a}=e,c=n.getPointPosition(t,i+s+o,r),f=Math.round(oo(be(c.angle+Jt))),u=s0(c.y,a.h,f),d=n0(f),p=i0(c.x,a.w,d);return{visible:!0,x:c.x,y:u,textAlign:d,left:p,top:u,right:p+a.w,bottom:u+a.h}}function t0(n,t){if(!t)return!0;const{left:e,top:i,right:s,bottom:r}=n;return!(dn({x:e,y:i},t)||dn({x:e,y:r},t)||dn({x:s,y:i},t)||dn({x:s,y:r},t))}function e0(n,t,e){const i=[],s=n._pointLabels.length,r=n.options,{centerPointLabels:o,display:a}=r.pointLabels,c={extra:Yr(r)/2,additionalAngle:o?Ot/s:0};let f;for(let u=0;u<s;u++){c.padding=e[u],c.size=t[u];const d=Zb(n,u,c);i.push(d),a==="auto"&&(d.visible=t0(d,f),d.visible&&(f=d))}return i}function n0(n){return n===0||n===180?"center":n<180?"left":"right"}function i0(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function s0(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function r0(n,t,e){const{left:i,top:s,right:r,bottom:o}=e,{backdropColor:a}=t;if(!St(a)){const c=Un(t.borderRadius),f=_e(t.backdropPadding);n.fillStyle=a;const u=i-f.left,d=s-f.top,p=r-i+f.width,b=o-s+f.height;Object.values(c).some(y=>y!==0)?(n.beginPath(),ji(n,{x:u,y:d,w:p,h:b,radius:c}),n.fill()):n.fillRect(u,d,p,b)}}function o0(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let s=t-1;s>=0;s--){const r=n._pointLabelItems[s];if(!r.visible)continue;const o=i.setContext(n.getPointLabelContext(s));r0(e,o,r);const a=se(o.font),{x:c,y:f,textAlign:u}=r;qn(e,n._pointLabels[s],c,f+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function bu(n,t,e,i){const{ctx:s}=n;if(e)s.arc(n.xCenter,n.yCenter,t,0,Ut);else{let r=n.getPointPosition(0,t);s.moveTo(r.x,r.y);for(let o=1;o<i;o++)r=n.getPointPosition(o,t),s.lineTo(r.x,r.y)}}function a0(n,t,e,i,s){const r=n.ctx,o=t.circular,{color:a,lineWidth:c}=t;!o&&!i||!a||!c||e<0||(r.save(),r.strokeStyle=a,r.lineWidth=c,r.setLineDash(s.dash||[]),r.lineDashOffset=s.dashOffset,r.beginPath(),bu(n,e,o,i),r.closePath(),r.stroke(),r.restore())}function l0(n,t,e){return kn(n,{label:e,index:t,type:"pointLabel"})}class c0 extends Is{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ws.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=_e(Yr(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=Qt(t)&&!isNaN(t)?t:0,this.max=Qt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Yr(this.options))}generateTickLabels(t){Is.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const s=zt(this.options.pointLabels.callback,[e,i],this);return s||s===0?s:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Qb(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){const e=Ut/(this._pointLabels.length||1),i=this.options.startAngle||0;return be(t*e+We(i))}getDistanceFromCenterForValue(t){if(St(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(St(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return l0(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const s=this.getIndexAngle(t)-Jt+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:s,bottom:r}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:r}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),bu(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:s,border:r}=e,o=this._pointLabels.length;let a,c,f;if(e.pointLabels.display&&o0(this,o),s.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){c=this.getDistanceFromCenterForValue(u.value);const p=this.getContext(d),b=s.setContext(p),y=r.setContext(p);a0(this,b,c,o,y)}}),i.display){for(t.save(),a=o-1;a>=0;a--){const u=i.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:p}=u;!p||!d||(t.lineWidth=p,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,c=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),f=this.getPointPosition(a,c),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,c)=>{if(c===0&&this.min>=0&&!e.reverse)return;const f=i.setContext(this.getContext(c)),u=se(f.font);if(r=this.getDistanceFromCenterForValue(this.ticks[c].value),f.showLabelBackdrop){t.font=u.string,o=t.measureText(a.label).width,t.fillStyle=f.backdropColor;const d=_e(f.backdropPadding);t.fillRect(-o/2-d.left,-r-u.size/2-d.top,o+d.width,u.size+d.height)}qn(t,a.label,0,-r,u,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}const Gs={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}},Ee=Object.keys(Gs);function Rl(n,t){return n-t}function Ll(n,t){if(St(t))return null;const e=n._adapter,{parser:i,round:s,isoWeekday:r}=n._parseOpts;let o=t;return typeof i=="function"&&(o=i(o)),Qt(o)||(o=typeof i=="string"?e.parse(o,i):e.parse(o)),o===null?null:(s&&(o=s==="week"&&(li(r)||r===!0)?e.startOf(o,"isoWeek",r):e.startOf(o,s)),+o)}function Fl(n,t,e,i){const s=Ee.length;for(let r=Ee.indexOf(n);r<s-1;++r){const o=Gs[Ee[r]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((e-t)/(a*o.size))<=i)return Ee[r]}return Ee[s-1]}function u0(n,t,e,i,s){for(let r=Ee.length-1;r>=Ee.indexOf(e);r--){const o=Ee[r];if(Gs[o].common&&n._adapter.diff(s,i,o)>=t-1)return o}return Ee[e?Ee.indexOf(e):0]}function f0(n){for(let t=Ee.indexOf(n)+1,e=Ee.length;t<e;++t)if(Gs[Ee[t]].common)return Ee[t]}function Il(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:s}=ao(e,t),r=e[i]>=t?e[i]:e[s];n[r]=!0}}function h0(n,t,e,i){const s=n._adapter,r=+s.startOf(t[0].value,i),o=t[t.length-1].value;let a,c;for(a=r;a<=o;a=+s.add(a,1,i))c=e[a],c>=0&&(t[c].major=!0);return t}function Nl(n,t,e){const i=[],s={},r=t.length;let o,a;for(o=0;o<r;++o)a=t[o],s[a]=o,i.push({value:a,major:!1});return r===0||!e?i:h0(n,i,s,e)}class Kr extends Xn{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(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),s=this._adapter=new dg._date(t.adapters.date);s.init(e),Di(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:Ll(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:r,minDefined:o,maxDefined:a}=this.getUserBounds();function c(f){!o&&!isNaN(f.min)&&(s=Math.min(s,f.min)),!a&&!isNaN(f.max)&&(r=Math.max(r,f.max))}(!o||!a)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),s=Qt(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),r=Qt(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,r-1),this.max=Math.max(s+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const r=this.min,o=this.max,a=Od(s,r,o);return this._unit=e.unit||(i.autoSkip?Fl(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):u0(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:f0(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),Nl(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,s,r;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?i=r:i=(r-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;e=ue(e,0,o),i=ue(i,0,o),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,r=s.time,o=r.unit||Fl(r.minUnit,e,i,this._getLabelCapacity(e)),a=yt(s.ticks.stepSize,1),c=o==="week"?r.isoWeekday:!1,f=li(c)||c===!0,u={};let d=e,p,b;if(f&&(d=+t.startOf(d,"isoWeek",c)),d=+t.startOf(d,f?"day":o),t.diff(i,e,o)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+o);const y=s.ticks.source==="data"&&this.getDataTimestamps();for(p=d,b=0;p<i;p=+t.add(p,a,o),b++)Il(u,p,y);return(p===i||s.bounds==="ticks"||b===1)&&Il(u,p,y),Object.keys(u).sort(Rl).map(_=>+_)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const s=this.options.time.displayFormats,r=this._unit,o=e||s[r];return this._adapter.format(t,o)}_tickFormatFunction(t,e,i,s){const r=this.options,o=r.ticks.callback;if(o)return zt(o,[t,e,i],this);const a=r.time.displayFormats,c=this._unit,f=this._majorUnit,u=c&&a[c],d=f&&a[f],p=i[e],b=f&&d&&p&&p.major;return this._adapter.format(t,s||(b?d:u))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,s=We(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(s),o=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:i*r+a*o,h:i*o+a*r}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,r=this._tickFormatFunction(t,0,Nl(this,[t],this._majorUnit),s),o=this._getLabelSize(r),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,i=s.length;e<i;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(Ll(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Tc(t.sort(Rl))}}function ms(n,t,e){let i=0,s=n.length-1,r,o,a,c;e?(t>=n[i].pos&&t<=n[s].pos&&({lo:i,hi:s}=hn(n,"pos",t)),{pos:r,time:a}=n[i],{pos:o,time:c}=n[s]):(t>=n[i].time&&t<=n[s].time&&({lo:i,hi:s}=hn(n,"time",t)),{time:r,pos:a}=n[i],{time:o,pos:c}=n[s]);const f=o-r;return f?a+(c-a)*(t-r)/f:a}class d0 extends Kr{static id="timeseries";static defaults=Kr.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ms(e,this.min),this._tableRange=ms(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],r=[];let o,a,c,f,u;for(o=0,a=t.length;o<a;++o)f=t[o],f>=e&&f<=i&&s.push(f);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=s.length;o<a;++o)u=s[o+1],c=s[o-1],f=s[o],Math.round((u+c)/2)!==f&&r.push({time:f,pos:o/(a-1)});return r}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((s,r)=>s-r)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(ms(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return ms(this._table,i*this._tableRange+this._minPos,!0)}}var p0=Object.freeze({__proto__:null,CategoryScale:Vb,LinearScale:qb,LogarithmicScale:Kb,RadialLinearScale:c0,TimeScale:Kr,TimeSeriesScale:d0});const g0=[hg,$m,jb,p0];xo.register(...g0);window.$=window.jQuery=Nh;window.imageCompression=ge;window.Chart=xo;
|