@frangoteam/fuxa-min 1.2.11 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/auth/index.js +141 -3
- package/api/command/index.js +1 -1
- package/api/index.js +21 -2
- package/api/jwt-helper.js +3 -1
- package/api/resources/index.js +19 -2
- package/api/scripts/index.js +7 -3
- package/dist/3rdpartylicenses.txt +139 -7
- package/dist/assets/i18n/de.json +10 -0
- package/dist/assets/i18n/en.json +21 -3
- package/dist/assets/i18n/es.json +12 -0
- package/dist/assets/i18n/fr.json +11 -0
- package/dist/assets/i18n/ja.json +16 -6
- package/dist/assets/i18n/ko.json +12 -0
- package/dist/assets/i18n/pt.json +9 -2
- package/dist/assets/i18n/ru.json +11 -0
- package/dist/assets/i18n/sv.json +11 -1
- package/dist/assets/i18n/tr.json +8 -1
- package/dist/assets/i18n/ua.json +9 -2
- package/dist/assets/i18n/zh-cn.json +11 -0
- package/dist/assets/i18n/zh-tw.json +12 -1
- package/dist/assets/lib/svgeditor/fuxa-editor.min.js +17 -23
- package/dist/index.html +2 -2
- package/dist/main.72bdfed42c527918.js +329 -0
- package/dist/polyfills.d7de05f9af2fb559.js +1 -0
- package/dist/{runtime.8ef63094e52a66ba.js → runtime.9136a61a9b98f987.js} +1 -1
- package/dist/{scripts.40b60f02658462e4.js → scripts.d9e6ee984bf6f3b7.js} +1 -1
- package/dist/styles.545e37beb3e671ba.css +1 -0
- package/docs/openapi.yaml +3 -0
- package/integrations/node-red/index.js +4 -5
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-get-daq.html +56 -5
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-get-daq.js +8 -2
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-get-tag-change.html +56 -5
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-get-tag-change.js +12 -12
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-get-tag-daq-settings.html +56 -5
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-get-tag-daq-settings.js +14 -10
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-get-tag.html +69 -14
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-get-tag.js +44 -12
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-set-tag-daq-settings.html +56 -5
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-set-tag-daq-settings.js +24 -20
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-set-tag.html +72 -13
- package/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-set-tag.js +33 -7
- package/main.js +38 -17
- package/package.json +10 -5
- package/runtime/alarms/alarmstorage.js +45 -30
- package/runtime/apikeys/apiKeysStorage.js +34 -22
- package/runtime/devices/adsclient/index.js +1 -1
- package/runtime/devices/ethernetip/index.js +1 -1
- package/runtime/devices/gpio/index.js +1 -1
- package/runtime/devices/odbc/index.js +14 -9
- package/runtime/devices/s7/index.js +2 -2
- package/runtime/devices/template/index.js +14 -14
- package/runtime/notificator/notifystorage.js +34 -23
- package/runtime/project/index.js +16 -0
- package/runtime/project/prjstorage.js +78 -40
- package/runtime/scripts/index.js +6 -2
- package/runtime/storage/calculator.js +17 -13
- package/runtime/storage/daqstorage.js +28 -2
- package/runtime/storage/influxdb/index.js +8 -3
- package/runtime/storage/questdb/index.js +224 -0
- package/runtime/storage/sqlite/index.js +11 -8
- package/runtime/storage/tdengine/index.js +24 -9
- package/runtime/users/usrstorage.js +65 -61
- package/runtime/utils.js +5 -0
- package/settings.default.js +8 -2
- package/dist/main.92522279642ef880.js +0 -329
- package/dist/polyfills.c8e7db9850a3ad8b.js +0 -1
- package/dist/styles.03cc550382689976.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkFUXA=self.webpackChunkFUXA||[]).push([[461],{4050:(te,Q,ve)=>{ve(6935),window.process={env:{DEBUG:void 0}}},6935:()=>{const te=globalThis;function Q(e){return(te.__Zone_symbol_prefix||"__zone_symbol__")+e}const Te=Object.getOwnPropertyDescriptor,Le=Object.defineProperty,Ie=Object.getPrototypeOf,_t=Object.create,Et=Array.prototype.slice,Me="addEventListener",Ze="removeEventListener",Ae=Q(Me),je=Q(Ze),ae="true",le="false",Pe=Q("");function He(e,r){return Zone.current.wrap(e,r)}function xe(e,r,c,t,i){return Zone.current.scheduleMacroTask(e,r,c,t,i)}const j=Q,Ce=typeof window<"u",ge=Ce?window:void 0,$=Ce&&ge||globalThis,Tt="removeAttribute";function Ge(e,r){for(let c=e.length-1;c>=0;c--)"function"==typeof e[c]&&(e[c]=He(e[c],r+"_"+c));return e}function We(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const Xe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,De=!("nw"in $)&&typeof $.process<"u"&&"[object process]"===$.process.toString(),Ve=!De&&!Xe&&!(!Ce||!ge.HTMLElement),qe=typeof $.process<"u"&&"[object process]"===$.process.toString()&&!Xe&&!(!Ce||!ge.HTMLElement),Se={},yt=j("enable_beforeunload"),Ye=function(e){if(!(e=e||$.event))return;let r=Se[e.type];r||(r=Se[e.type]=j("ON_PROPERTY"+e.type));const c=this||e.target||$,t=c[r];let i;return Ve&&c===ge&&"error"===e.type?(i=t&&t.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===i&&e.preventDefault()):(i=t&&t.apply(this,arguments),"beforeunload"===e.type&&$[yt]&&"string"==typeof i?e.returnValue=i:null!=i&&!i&&e.preventDefault()),i};function $e(e,r,c){let t=Te(e,r);if(!t&&c&&Te(c,r)&&(t={enumerable:!0,configurable:!0}),!t||!t.configurable)return;const i=j("on"+r+"patched");if(e.hasOwnProperty(i)&&e[i])return;delete t.writable,delete t.value;const u=t.get,E=t.set,T=r.slice(2);let m=Se[T];m||(m=Se[T]=j("ON_PROPERTY"+T)),t.set=function(D){let d=this;!d&&e===$&&(d=$),d&&("function"==typeof d[m]&&d.removeEventListener(T,Ye),E&&E.call(d,null),d[m]=D,"function"==typeof D&&d.addEventListener(T,Ye,!1))},t.get=function(){let D=this;if(!D&&e===$&&(D=$),!D)return null;const d=D[m];if(d)return d;if(u){let w=u.call(this);if(w)return t.set.call(this,w),"function"==typeof D[Tt]&&D.removeAttribute(r),w}return null},Le(e,r,t),e[i]=!0}function Ke(e,r,c){if(r)for(let t=0;t<r.length;t++)$e(e,"on"+r[t],c);else{const t=[];for(const i in e)"on"==i.slice(0,2)&&t.push(i);for(let i=0;i<t.length;i++)$e(e,t[i],c)}}const re=j("originalInstance");function we(e){const r=$[e];if(!r)return;$[j(e)]=r,$[e]=function(){const i=Ge(arguments,e);switch(i.length){case 0:this[re]=new r;break;case 1:this[re]=new r(i[0]);break;case 2:this[re]=new r(i[0],i[1]);break;case 3:this[re]=new r(i[0],i[1],i[2]);break;case 4:this[re]=new r(i[0],i[1],i[2],i[3]);break;default:throw new Error("Arg list too long.")}},fe($[e],r);const c=new r(function(){});let t;for(t in c)"XMLHttpRequest"===e&&"responseBlob"===t||function(i){"function"==typeof c[i]?$[e].prototype[i]=function(){return this[re][i].apply(this[re],arguments)}:Le($[e].prototype,i,{set:function(u){"function"==typeof u?(this[re][i]=He(u,e+"."+i),fe(this[re][i],u)):this[re][i]=u},get:function(){return this[re][i]}})}(t);for(t in r)"prototype"!==t&&r.hasOwnProperty(t)&&($[e][t]=r[t])}function ue(e,r,c){let t=e;for(;t&&!t.hasOwnProperty(r);)t=Ie(t);!t&&e[r]&&(t=e);const i=j(r);let u=null;if(t&&(!(u=t[i])||!t.hasOwnProperty(i))&&(u=t[i]=t[r],We(t&&Te(t,r)))){const T=c(u,i,r);t[r]=function(){return T(this,arguments)},fe(t[r],u)}return u}function mt(e,r,c){let t=null;function i(u){const E=u.data;return E.args[E.cbIdx]=function(){u.invoke.apply(this,arguments)},t.apply(E.target,E.args),u}t=ue(e,r,u=>function(E,T){const m=c(E,T);return m.cbIdx>=0&&"function"==typeof T[m.cbIdx]?xe(m.name,T[m.cbIdx],m,i):u.apply(E,T)})}function fe(e,r){e[j("OriginalDelegate")]=r}let Je=!1,Fe=!1;function kt(){if(Je)return Fe;Je=!0;try{const e=ge.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(Fe=!0)}catch{}return Fe}function Qe(e){return"function"==typeof e}function et(e){return"number"==typeof e}let ye=!1;if(typeof window<"u")try{const e=Object.defineProperty({},"passive",{get:function(){ye=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{ye=!1}const vt={useG:!0},ne={},tt={},nt=new RegExp("^"+Pe+"(\\w+)(true|false)$"),rt=j("propagationStopped");function ot(e,r){const c=(r?r(e):e)+le,t=(r?r(e):e)+ae,i=Pe+c,u=Pe+t;ne[e]={},ne[e][le]=i,ne[e][ae]=u}function bt(e,r,c,t){const i=t&&t.add||Me,u=t&&t.rm||Ze,E=t&&t.listeners||"eventListeners",T=t&&t.rmAll||"removeAllListeners",m=j(i),D="."+i+":",d="prependListener",w="."+d+":",Z=function(k,h,H){if(k.isRemoved)return;const G=k.callback;let Y;"object"==typeof G&&G.handleEvent&&(k.callback=g=>G.handleEvent(g),k.originalDelegate=G);try{k.invoke(k,h,[H])}catch(g){Y=g}const V=k.options;return V&&"object"==typeof V&&V.once&&h[u].call(h,H.type,k.originalDelegate?k.originalDelegate:k.callback,V),Y};function x(k,h,H){if(!(h=h||e.event))return;const G=k||h.target||e,Y=G[ne[h.type][H?ae:le]];if(Y){const V=[];if(1===Y.length){const g=Z(Y[0],G,h);g&&V.push(g)}else{const g=Y.slice();for(let z=0;z<g.length&&(!h||!0!==h[rt]);z++){const O=Z(g[z],G,h);O&&V.push(O)}}if(1===V.length)throw V[0];for(let g=0;g<V.length;g++){const z=V[g];r.nativeScheduleMicroTask(()=>{throw z})}}}const U=function(k){return x(this,k,!1)},K=function(k){return x(this,k,!0)};function J(k,h){if(!k)return!1;let H=!0;h&&void 0!==h.useG&&(H=h.useG);const G=h&&h.vh;let Y=!0;h&&void 0!==h.chkDup&&(Y=h.chkDup);let V=!1;h&&void 0!==h.rt&&(V=h.rt);let g=k;for(;g&&!g.hasOwnProperty(i);)g=Ie(g);if(!g&&k[i]&&(g=k),!g||g[m])return!1;const z=h&&h.eventNameToString,O={},R=g[m]=g[i],b=g[j(u)]=g[u],S=g[j(E)]=g[E],ee=g[j(T)]=g[T];let W;h&&h.prepend&&(W=g[j(h.prepend)]=g[h.prepend]);const X=H?function(s){if(!O.isExisting)return R.call(O.target,O.eventName,O.capture?K:U,O.options)}:function(s){return R.call(O.target,O.eventName,s.invoke,O.options)},A=H?function(s){if(!s.isRemoved){const l=ne[s.eventName];let v;l&&(v=l[s.capture?ae:le]);const C=v&&s.target[v];if(C)for(let y=0;y<C.length;y++)if(C[y]===s){C.splice(y,1),s.isRemoved=!0,s.removeAbortListener&&(s.removeAbortListener(),s.removeAbortListener=null),0===C.length&&(s.allRemoved=!0,s.target[v]=null);break}}if(s.allRemoved)return b.call(s.target,s.eventName,s.capture?K:U,s.options)}:function(s){return b.call(s.target,s.eventName,s.invoke,s.options)},he=h&&h.diff?h.diff:function(s,l){const v=typeof l;return"function"===v&&s.callback===l||"object"===v&&s.originalDelegate===l},de=Zone[j("UNPATCHED_EVENTS")],oe=e[j("PASSIVE_EVENTS")],a=function(s,l,v,C,y=!1,L=!1){return function(){const I=this||e;let M=arguments[0];h&&h.transferEventName&&(M=h.transferEventName(M));let F=arguments[1];if(!F)return s.apply(this,arguments);if(De&&"uncaughtException"===M)return s.apply(this,arguments);let B=!1;if("function"!=typeof F){if(!F.handleEvent)return s.apply(this,arguments);B=!0}if(G&&!G(s,F,I,arguments))return;const Ee=ye&&!!oe&&-1!==oe.indexOf(M),ie=function f(s){if("object"==typeof s&&null!==s){const l={...s};return s.signal&&(l.signal=s.signal),l}return s}(function N(s,l){return!ye&&"object"==typeof s&&s?!!s.capture:ye&&l?"boolean"==typeof s?{capture:s,passive:!0}:s?"object"==typeof s&&!1!==s.passive?{...s,passive:!0}:s:{passive:!0}:s}(arguments[2],Ee)),pe=ie?.signal;if(pe?.aborted)return;if(de)for(let ce=0;ce<de.length;ce++)if(M===de[ce])return Ee?s.call(I,M,F,ie):s.apply(this,arguments);const Ue=!!ie&&("boolean"==typeof ie||ie.capture),lt=!(!ie||"object"!=typeof ie)&&ie.once,At=Zone.current;let ze=ne[M];ze||(ot(M,z),ze=ne[M]);const ut=ze[Ue?ae:le];let Ne,ke=I[ut],ft=!1;if(ke){if(ft=!0,Y)for(let ce=0;ce<ke.length;ce++)if(he(ke[ce],F))return}else ke=I[ut]=[];const ht=I.constructor.name,dt=tt[ht];dt&&(Ne=dt[M]),Ne||(Ne=ht+l+(z?z(M):M)),O.options=ie,lt&&(O.options.once=!1),O.target=I,O.capture=Ue,O.eventName=M,O.isExisting=ft;const Re=H?vt:void 0;Re&&(Re.taskData=O),pe&&(O.options.signal=void 0);const se=At.scheduleEventTask(Ne,F,Re,v,C);if(pe){O.options.signal=pe;const ce=()=>se.zone.cancelTask(se);s.call(pe,"abort",ce,{once:!0}),se.removeAbortListener=()=>pe.removeEventListener("abort",ce)}return O.target=null,Re&&(Re.taskData=null),lt&&(O.options.once=!0),!ye&&"boolean"==typeof se.options||(se.options=ie),se.target=I,se.capture=Ue,se.eventName=M,B&&(se.originalDelegate=F),L?ke.unshift(se):ke.push(se),y?I:void 0}};return g[i]=a(R,D,X,A,V),W&&(g[d]=a(W,w,function(s){return W.call(O.target,O.eventName,s.invoke,O.options)},A,V,!0)),g[u]=function(){const s=this||e;let l=arguments[0];h&&h.transferEventName&&(l=h.transferEventName(l));const v=arguments[2],C=!!v&&("boolean"==typeof v||v.capture),y=arguments[1];if(!y)return b.apply(this,arguments);if(G&&!G(b,y,s,arguments))return;const L=ne[l];let I;L&&(I=L[C?ae:le]);const M=I&&s[I];if(M)for(let F=0;F<M.length;F++){const B=M[F];if(he(B,y))return M.splice(F,1),B.isRemoved=!0,0!==M.length||(B.allRemoved=!0,s[I]=null,C||"string"!=typeof l)||(s[Pe+"ON_PROPERTY"+l]=null),B.zone.cancelTask(B),V?s:void 0}return b.apply(this,arguments)},g[E]=function(){const s=this||e;let l=arguments[0];h&&h.transferEventName&&(l=h.transferEventName(l));const v=[],C=st(s,z?z(l):l);for(let y=0;y<C.length;y++){const L=C[y];v.push(L.originalDelegate?L.originalDelegate:L.callback)}return v},g[T]=function(){const s=this||e;let l=arguments[0];if(l){h&&h.transferEventName&&(l=h.transferEventName(l));const v=ne[l];if(v){const L=s[v[le]],I=s[v[ae]];if(L){const M=L.slice();for(let F=0;F<M.length;F++){const B=M[F];this[u].call(this,l,B.originalDelegate?B.originalDelegate:B.callback,B.options)}}if(I){const M=I.slice();for(let F=0;F<M.length;F++){const B=M[F];this[u].call(this,l,B.originalDelegate?B.originalDelegate:B.callback,B.options)}}}}else{const v=Object.keys(s);for(let C=0;C<v.length;C++){const L=nt.exec(v[C]);let I=L&&L[1];I&&"removeListener"!==I&&this[T].call(this,I)}this[T].call(this,"removeListener")}if(V)return this},fe(g[i],R),fe(g[u],b),ee&&fe(g[T],ee),S&&fe(g[E],S),!0}let q=[];for(let k=0;k<c.length;k++)q[k]=J(c[k],t);return q}function st(e,r){if(!r){const u=[];for(let E in e){const T=nt.exec(E);let m=T&&T[1];if(m&&(!r||m===r)){const D=e[E];if(D)for(let d=0;d<D.length;d++)u.push(D[d])}}return u}let c=ne[r];c||(ot(r),c=ne[r]);const t=e[c[le]],i=e[c[ae]];return t?i?t.concat(i):t.slice():i?i.slice():[]}function Pt(e,r){const c=e.Event;c&&c.prototype&&r.patchMethod(c.prototype,"stopImmediatePropagation",t=>function(i,u){i[rt]=!0,t&&t.apply(i,u)})}const Oe=j("zoneTask");function me(e,r,c,t){let i=null,u=null;c+=t;const E={};function T(D){const d=D.data;d.args[0]=function(){return D.invoke.apply(this,arguments)};const w=i.apply(e,d.args);return et(w)?d.handleId=w:(d.handle=w,d.isRefreshable=Qe(w.refresh)),D}function m(D){const{handle:d,handleId:w}=D.data;return u.call(e,d??w)}i=ue(e,r+=t,D=>function(d,w){if(Qe(w[0])){const Z={isRefreshable:!1,isPeriodic:"Interval"===t,delay:"Timeout"===t||"Interval"===t?w[1]||0:void 0,args:w},x=w[0];w[0]=function(){try{return x.apply(this,arguments)}finally{const{handle:H,handleId:G,isPeriodic:Y,isRefreshable:V}=Z;!Y&&!V&&(G?delete E[G]:H&&(H[Oe]=null))}};const U=xe(r,w[0],Z,T,m);if(!U)return U;const{handleId:K,handle:J,isRefreshable:q,isPeriodic:k}=U.data;if(K)E[K]=U;else if(J&&(J[Oe]=U,q&&!k)){const h=J.refresh;J.refresh=function(){const{zone:H,state:G}=U;return"notScheduled"===G?(U._state="scheduled",H._updateTaskCount(U,1)):"running"===G&&(U._state="scheduling"),h.call(this)}}return J??K??U}return D.apply(e,w)}),u=ue(e,c,D=>function(d,w){const Z=w[0];let x;et(Z)?(x=E[Z],delete E[Z]):(x=Z?.[Oe],x?Z[Oe]=null:x=Z),x?.type?x.cancelFn&&x.zone.cancelTask(x):D.apply(e,w)})}function it(e,r,c){if(!c||0===c.length)return r;const t=c.filter(u=>u.target===e);if(!t||0===t.length)return r;const i=t[0].ignoreProperties;return r.filter(u=>-1===i.indexOf(u))}function ct(e,r,c,t){e&&Ke(e,it(e,r,c),t)}function Be(e){return Object.getOwnPropertyNames(e).filter(r=>r.startsWith("on")&&r.length>2).map(r=>r.substring(2))}function It(e,r,c,t,i){const u=Zone.__symbol__(t);if(r[u])return;const E=r[u]=r[t];r[t]=function(T,m,D){return m&&m.prototype&&i.forEach(function(d){const w=`${c}.${t}::`+d,Z=m.prototype;try{if(Z.hasOwnProperty(d)){const x=e.ObjectGetOwnPropertyDescriptor(Z,d);x&&x.value?(x.value=e.wrapWithCurrentZone(x.value,w),e._redefineProperty(m.prototype,d,x)):Z[d]&&(Z[d]=e.wrapWithCurrentZone(Z[d],w))}else Z[d]&&(Z[d]=e.wrapWithCurrentZone(Z[d],w))}catch{}}),E.call(r,T,m,D)},e.attachOriginToPatched(r[t],E)}const at=function be(){const e=globalThis,r=!0===e[Q("forceDuplicateZoneCheck")];if(e.Zone&&(r||"function"!=typeof e.Zone.__symbol__))throw new Error("Zone already loaded.");return e.Zone??=function ve(){const e=te.performance;function r(N){e&&e.mark&&e.mark(N)}function c(N,_){e&&e.measure&&e.measure(N,_)}r("Zone");let t=(()=>{class N{static{this.__symbol__=Q}static assertZonePatched(){if(te.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=N.current;for(;n.parent;)n=n.parent;return n}static get current(){return b.zone}static get currentTask(){return S}static __load_patch(n,o,p=!1){if(O.hasOwnProperty(n)){const P=!0===te[Q("forceDuplicateZoneCheck")];if(!p&&P)throw Error("Already loaded patch: "+n)}else if(!te["__Zone_disable_"+n]){const P="Zone:"+n;r(P),O[n]=o(te,N,R),c(P,P)}}get parent(){return this._parent}get name(){return this._name}constructor(n,o){this._parent=n,this._name=o?o.name||"unnamed":"<root>",this._properties=o&&o.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,o)}get(n){const o=this.getZoneWith(n);if(o)return o._properties[n]}getZoneWith(n){let o=this;for(;o;){if(o._properties.hasOwnProperty(n))return o;o=o._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,o){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const p=this._zoneDelegate.intercept(this,n,o),P=this;return function(){return P.runGuarded(p,this,arguments,o)}}run(n,o,p,P){b={parent:b,zone:this};try{return this._zoneDelegate.invoke(this,n,o,p,P)}finally{b=b.parent}}runGuarded(n,o=null,p,P){b={parent:b,zone:this};try{try{return this._zoneDelegate.invoke(this,n,o,p,P)}catch(X){if(this._zoneDelegate.handleError(this,X))throw X}}finally{b=b.parent}}runTask(n,o,p){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||J).name+"; Execution: "+this.name+")");const P=n,{type:X,data:{isPeriodic:A=!1,isRefreshable:_e=!1}={}}=n;if(n.state===q&&(X===z||X===g))return;const he=n.state!=H;he&&P._transitionTo(H,h);const de=S;S=P,b={parent:b,zone:this};try{X==g&&n.data&&!A&&!_e&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,P,o,p)}catch(oe){if(this._zoneDelegate.handleError(this,oe))throw oe}}finally{const oe=n.state;if(oe!==q&&oe!==Y)if(X==z||A||_e&&oe===k)he&&P._transitionTo(h,H,k);else{const f=P._zoneDelegates;this._updateTaskCount(P,-1),he&&P._transitionTo(q,H,q),_e&&(P._zoneDelegates=f)}b=b.parent,S=de}}scheduleTask(n){if(n.zone&&n.zone!==this){let p=this;for(;p;){if(p===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);p=p.parent}}n._transitionTo(k,q);const o=[];n._zoneDelegates=o,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(p){throw n._transitionTo(Y,k,q),this._zoneDelegate.handleError(this,p),p}return n._zoneDelegates===o&&this._updateTaskCount(n,1),n.state==k&&n._transitionTo(h,k),n}scheduleMicroTask(n,o,p,P){return this.scheduleTask(new E(V,n,o,p,P,void 0))}scheduleMacroTask(n,o,p,P,X){return this.scheduleTask(new E(g,n,o,p,P,X))}scheduleEventTask(n,o,p,P,X){return this.scheduleTask(new E(z,n,o,p,P,X))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||J).name+"; Execution: "+this.name+")");if(n.state===h||n.state===H){n._transitionTo(G,h,H);try{this._zoneDelegate.cancelTask(this,n)}catch(o){throw n._transitionTo(Y,G),this._zoneDelegate.handleError(this,o),o}return this._updateTaskCount(n,-1),n._transitionTo(q,G),n.runCount=-1,n}}_updateTaskCount(n,o){const p=n._zoneDelegates;-1==o&&(n._zoneDelegates=null);for(let P=0;P<p.length;P++)p[P]._updateTaskCount(n.type,o)}}return N})();const i={name:"",onHasTask:(N,_,n,o)=>N.hasTask(n,o),onScheduleTask:(N,_,n,o)=>N.scheduleTask(n,o),onInvokeTask:(N,_,n,o,p,P)=>N.invokeTask(n,o,p,P),onCancelTask:(N,_,n,o)=>N.cancelTask(n,o)};class u{get zone(){return this._zone}constructor(_,n,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=_,this._parentDelegate=n,this._forkZS=o&&(o&&o.onFork?o:n._forkZS),this._forkDlgt=o&&(o.onFork?n:n._forkDlgt),this._forkCurrZone=o&&(o.onFork?this._zone:n._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:n._interceptZS),this._interceptDlgt=o&&(o.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this._zone:n._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:n._invokeZS),this._invokeDlgt=o&&(o.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this._zone:n._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:n._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this._zone:n._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:n._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this._zone:n._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:n._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this._zone:n._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:n._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this._zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const p=o&&o.onHasTask;(p||n&&n._hasTaskZS)&&(this._hasTaskZS=p?o:i,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,o.onScheduleTask||(this._scheduleTaskZS=i,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this._zone),o.onInvokeTask||(this._invokeTaskZS=i,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this._zone),o.onCancelTask||(this._cancelTaskZS=i,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this._zone))}fork(_,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,_,n):new t(_,n)}intercept(_,n,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,_,n,o):n}invoke(_,n,o,p,P){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,_,n,o,p,P):n.apply(o,p)}handleError(_,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,_,n)}scheduleTask(_,n){let o=n;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,_,n),o||(o=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=V)throw new Error("Task is missing scheduleFn.");U(n)}return o}invokeTask(_,n,o,p){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,_,n,o,p):n.callback.apply(o,p)}cancelTask(_,n){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,_,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");o=n.cancelFn(n)}return o}hasTask(_,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,_,n)}catch(o){this.handleError(_,o)}}_updateTaskCount(_,n){const o=this._taskCounts,p=o[_],P=o[_]=p+n;if(P<0)throw new Error("More tasks executed then were scheduled.");0!=p&&0!=P||this.hasTask(this._zone,{microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:_})}}class E{constructor(_,n,o,p,P,X){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=_,this.source=n,this.data=p,this.scheduleFn=P,this.cancelFn=X,!o)throw new Error("callback is not defined");this.callback=o;const A=this;this.invoke=_===z&&p&&p.useG?E.invokeTask:function(){return E.invokeTask.call(te,A,this,arguments)}}static invokeTask(_,n,o){_||(_=this),ee++;try{return _.runCount++,_.zone.runTask(_,n,o)}finally{1==ee&&K(),ee--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(q,k)}_transitionTo(_,n,o){if(this._state!==n&&this._state!==o)throw new Error(`${this.type} '${this.source}': can not transition to '${_}', expecting state '${n}'${o?" or '"+o+"'":""}, was '${this._state}'.`);this._state=_,_==q&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const T=Q("setTimeout"),m=Q("Promise"),D=Q("then");let Z,d=[],w=!1;function x(N){if(Z||te[m]&&(Z=te[m].resolve(0)),Z){let _=Z[D];_||(_=Z.then),_.call(Z,N)}else te[T](N,0)}function U(N){0===ee&&0===d.length&&x(K),N&&d.push(N)}function K(){if(!w){for(w=!0;d.length;){const N=d;d=[];for(let _=0;_<N.length;_++){const n=N[_];try{n.zone.runTask(n,null,null)}catch(o){R.onUnhandledError(o)}}}R.microtaskDrainDone(),w=!1}}const J={name:"NO ZONE"},q="notScheduled",k="scheduling",h="scheduled",H="running",G="canceling",Y="unknown",V="microTask",g="macroTask",z="eventTask",O={},R={symbol:Q,currentZoneFrame:()=>b,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:U,showUncaughtError:()=>!t[Q("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W,nativeScheduleMicroTask:x};let b={parent:null,zone:new t(null,null)},S=null,ee=0;function W(){}return c("Zone","Zone"),t}(),e.Zone}();(function Zt(e){(function Nt(e){e.__load_patch("ZoneAwarePromise",(r,c,t)=>{const i=Object.getOwnPropertyDescriptor,u=Object.defineProperty,T=t.symbol,m=[],D=!1!==r[T("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],d=T("Promise"),w=T("then"),Z="__creationTrace__";t.onUnhandledError=f=>{if(t.showUncaughtError()){const a=f&&f.rejection;a?console.error("Unhandled Promise rejection:",a instanceof Error?a.message:a,"; Zone:",f.zone.name,"; Task:",f.task&&f.task.source,"; Value:",a,a instanceof Error?a.stack:void 0):console.error(f)}},t.microtaskDrainDone=()=>{for(;m.length;){const f=m.shift();try{f.zone.runGuarded(()=>{throw f.throwOriginal?f.rejection:f})}catch(a){U(a)}}};const x=T("unhandledPromiseRejectionHandler");function U(f){t.onUnhandledError(f);try{const a=c[x];"function"==typeof a&&a.call(this,f)}catch{}}function K(f){return f&&f.then}function J(f){return f}function q(f){return A.reject(f)}const k=T("state"),h=T("value"),H=T("finally"),G=T("parentPromiseValue"),Y=T("parentPromiseState"),V="Promise.then",g=null,z=!0,O=!1,R=0;function b(f,a){return s=>{try{N(f,a,s)}catch(l){N(f,!1,l)}}}const S=function(){let f=!1;return function(s){return function(){f||(f=!0,s.apply(null,arguments))}}},ee="Promise resolved with itself",W=T("currentTaskTrace");function N(f,a,s){const l=S();if(f===s)throw new TypeError(ee);if(f[k]===g){let v=null;try{("object"==typeof s||"function"==typeof s)&&(v=s&&s.then)}catch(C){return l(()=>{N(f,!1,C)})(),f}if(a!==O&&s instanceof A&&s.hasOwnProperty(k)&&s.hasOwnProperty(h)&&s[k]!==g)n(s),N(f,s[k],s[h]);else if(a!==O&&"function"==typeof v)try{v.call(s,l(b(f,a)),l(b(f,!1)))}catch(C){l(()=>{N(f,!1,C)})()}else{f[k]=a;const C=f[h];if(f[h]=s,f[H]===H&&a===z&&(f[k]=f[Y],f[h]=f[G]),a===O&&s instanceof Error){const y=c.currentTask&&c.currentTask.data&&c.currentTask.data[Z];y&&u(s,W,{configurable:!0,enumerable:!1,writable:!0,value:y})}for(let y=0;y<C.length;)o(f,C[y++],C[y++],C[y++],C[y++]);if(0==C.length&&a==O){f[k]=R;let y=s;try{throw new Error("Uncaught (in promise): "+function E(f){return f&&f.toString===Object.prototype.toString?(f.constructor&&f.constructor.name||"")+": "+JSON.stringify(f):f?f.toString():Object.prototype.toString.call(f)}(s)+(s&&s.stack?"\n"+s.stack:""))}catch(L){y=L}D&&(y.throwOriginal=!0),y.rejection=s,y.promise=f,y.zone=c.current,y.task=c.currentTask,m.push(y),t.scheduleMicroTask()}}}return f}const _=T("rejectionHandledHandler");function n(f){if(f[k]===R){try{const a=c[_];a&&"function"==typeof a&&a.call(this,{rejection:f[h],promise:f})}catch{}f[k]=O;for(let a=0;a<m.length;a++)f===m[a].promise&&m.splice(a,1)}}function o(f,a,s,l,v){n(f);const C=f[k],y=C?"function"==typeof l?l:J:"function"==typeof v?v:q;a.scheduleMicroTask(V,()=>{try{const L=f[h],I=!!s&&H===s[H];I&&(s[G]=L,s[Y]=C);const M=a.run(y,void 0,I&&y!==q&&y!==J?[]:[L]);N(s,!0,M)}catch(L){N(s,!1,L)}},s)}const P=function(){},X=r.AggregateError;class A{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(a){return a instanceof A?a:N(new this(null),z,a)}static reject(a){return N(new this(null),O,a)}static withResolvers(){const a={};return a.promise=new A((s,l)=>{a.resolve=s,a.reject=l}),a}static any(a){if(!a||"function"!=typeof a[Symbol.iterator])return Promise.reject(new X([],"All promises were rejected"));const s=[];let l=0;try{for(let y of a)l++,s.push(A.resolve(y))}catch{return Promise.reject(new X([],"All promises were rejected"))}if(0===l)return Promise.reject(new X([],"All promises were rejected"));let v=!1;const C=[];return new A((y,L)=>{for(let I=0;I<s.length;I++)s[I].then(M=>{v||(v=!0,y(M))},M=>{C.push(M),l--,0===l&&(v=!0,L(new X(C,"All promises were rejected")))})})}static race(a){let s,l,v=new this((L,I)=>{s=L,l=I});function C(L){s(L)}function y(L){l(L)}for(let L of a)K(L)||(L=this.resolve(L)),L.then(C,y);return v}static all(a){return A.allWithCallback(a)}static allSettled(a){return(this&&this.prototype instanceof A?this:A).allWithCallback(a,{thenCallback:l=>({status:"fulfilled",value:l}),errorCallback:l=>({status:"rejected",reason:l})})}static allWithCallback(a,s){let l,v,C=new this((M,F)=>{l=M,v=F}),y=2,L=0;const I=[];for(let M of a){K(M)||(M=this.resolve(M));const F=L;try{M.then(B=>{I[F]=s?s.thenCallback(B):B,y--,0===y&&l(I)},B=>{s?(I[F]=s.errorCallback(B),y--,0===y&&l(I)):v(B)})}catch(B){v(B)}y++,L++}return y-=2,0===y&&l(I),C}constructor(a){const s=this;if(!(s instanceof A))throw new Error("Must be an instanceof Promise.");s[k]=g,s[h]=[];try{const l=S();a&&a(l(b(s,z)),l(b(s,O)))}catch(l){N(s,!1,l)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return A}then(a,s){let l=this.constructor?.[Symbol.species];(!l||"function"!=typeof l)&&(l=this.constructor||A);const v=new l(P),C=c.current;return this[k]==g?this[h].push(C,v,a,s):o(this,C,v,a,s),v}catch(a){return this.then(null,a)}finally(a){let s=this.constructor?.[Symbol.species];(!s||"function"!=typeof s)&&(s=A);const l=new s(P);l[H]=H;const v=c.current;return this[k]==g?this[h].push(v,l,a,a):o(this,v,l,a,a),l}}A.resolve=A.resolve,A.reject=A.reject,A.race=A.race,A.all=A.all;const _e=r[d]=r.Promise;r.Promise=A;const he=T("thenPatched");function de(f){const a=f.prototype,s=i(a,"then");if(s&&(!1===s.writable||!s.configurable))return;const l=a.then;a[w]=l,f.prototype.then=function(v,C){return new A((L,I)=>{l.call(this,L,I)}).then(v,C)},f[he]=!0}return t.patchThen=de,_e&&(de(_e),ue(r,"fetch",f=>function oe(f){return function(a,s){let l=f.apply(a,s);if(l instanceof A)return l;let v=l.constructor;return v[he]||de(v),l}}(f))),Promise[c.__symbol__("uncaughtPromiseErrors")]=m,A})})(e),function Lt(e){e.__load_patch("toString",r=>{const c=Function.prototype.toString,t=j("OriginalDelegate"),i=j("Promise"),u=j("Error"),E=function(){if("function"==typeof this){const d=this[t];if(d)return"function"==typeof d?c.call(d):Object.prototype.toString.call(d);if(this===Promise){const w=r[i];if(w)return c.call(w)}if(this===Error){const w=r[u];if(w)return c.call(w)}}return c.call(this)};E[t]=c,Function.prototype.toString=E;const T=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":T.call(this)}})}(e),function Mt(e){e.__load_patch("util",(r,c,t)=>{const i=Be(r);t.patchOnProperties=Ke,t.patchMethod=ue,t.bindArguments=Ge,t.patchMacroTask=mt;const u=c.__symbol__("BLACK_LISTED_EVENTS"),E=c.__symbol__("UNPATCHED_EVENTS");r[E]&&(r[u]=r[E]),r[u]&&(c[u]=c[E]=r[u]),t.patchEventPrototype=Pt,t.patchEventTarget=bt,t.isIEOrEdge=kt,t.ObjectDefineProperty=Le,t.ObjectGetOwnPropertyDescriptor=Te,t.ObjectCreate=_t,t.ArraySlice=Et,t.patchClass=we,t.wrapWithCurrentZone=He,t.filterProperties=it,t.attachOriginToPatched=fe,t._redefineProperty=Object.defineProperty,t.patchCallbacks=It,t.getGlobalObjects=()=>({globalSources:tt,zoneSymbolEventNames:ne,eventNames:i,isBrowser:Ve,isMix:qe,isNode:De,TRUE_STR:ae,FALSE_STR:le,ZONE_SYMBOL_PREFIX:Pe,ADD_EVENT_LISTENER_STR:Me,REMOVE_EVENT_LISTENER_STR:Ze})})}(e)})(at),function Ot(e){e.__load_patch("legacy",r=>{const c=r[e.__symbol__("legacyPatch")];c&&c()}),e.__load_patch("timers",r=>{const c="set",t="clear";me(r,c,t,"Timeout"),me(r,c,t,"Interval"),me(r,c,t,"Immediate")}),e.__load_patch("requestAnimationFrame",r=>{me(r,"request","cancel","AnimationFrame"),me(r,"mozRequest","mozCancel","AnimationFrame"),me(r,"webkitRequest","webkitCancel","AnimationFrame")}),e.__load_patch("blocking",(r,c)=>{const t=["alert","prompt","confirm"];for(let i=0;i<t.length;i++)ue(r,t[i],(E,T,m)=>function(D,d){return c.current.run(E,r,d,m)})}),e.__load_patch("EventTarget",(r,c,t)=>{(function Dt(e,r){r.patchEventPrototype(e,r)})(r,t),function Ct(e,r){if(Zone[r.symbol("patchEventTarget")])return;const{eventNames:c,zoneSymbolEventNames:t,TRUE_STR:i,FALSE_STR:u,ZONE_SYMBOL_PREFIX:E}=r.getGlobalObjects();for(let m=0;m<c.length;m++){const D=c[m],Z=E+(D+u),x=E+(D+i);t[D]={},t[D][u]=Z,t[D][i]=x}const T=e.EventTarget;T&&T.prototype&&r.patchEventTarget(e,r,[T&&T.prototype])}(r,t);const i=r.XMLHttpRequestEventTarget;i&&i.prototype&&t.patchEventTarget(r,t,[i.prototype])}),e.__load_patch("MutationObserver",(r,c,t)=>{we("MutationObserver"),we("WebKitMutationObserver")}),e.__load_patch("IntersectionObserver",(r,c,t)=>{we("IntersectionObserver")}),e.__load_patch("FileReader",(r,c,t)=>{we("FileReader")}),e.__load_patch("on_property",(r,c,t)=>{!function St(e,r){if(De&&!qe||Zone[e.symbol("patchEvents")])return;const c=r.__Zone_ignore_on_properties;let t=[];if(Ve){const i=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const u=function pt(){try{const e=ge.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:i,ignoreProperties:["error"]}]:[];ct(i,Be(i),c&&c.concat(u),Ie(i))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let i=0;i<t.length;i++){const u=r[t[i]];u&&u.prototype&&ct(u.prototype,Be(u.prototype),c)}}(t,r)}),e.__load_patch("customElements",(r,c,t)=>{!function Rt(e,r){const{isBrowser:c,isMix:t}=r.getGlobalObjects();(c||t)&&e.customElements&&"customElements"in e&&r.patchCallbacks(r,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(r,t)}),e.__load_patch("XHR",(r,c)=>{!function D(d){const w=d.XMLHttpRequest;if(!w)return;const Z=w.prototype;let U=Z[Ae],K=Z[je];if(!U){const R=d.XMLHttpRequestEventTarget;if(R){const b=R.prototype;U=b[Ae],K=b[je]}}const J="readystatechange",q="scheduled";function k(R){const b=R.data,S=b.target;S[E]=!1,S[m]=!1;const ee=S[u];U||(U=S[Ae],K=S[je]),ee&&K.call(S,J,ee);const W=S[u]=()=>{if(S.readyState===S.DONE)if(!b.aborted&&S[E]&&R.state===q){const _=S[c.__symbol__("loadfalse")];if(0!==S.status&&_&&_.length>0){const n=R.invoke;R.invoke=function(){const o=S[c.__symbol__("loadfalse")];for(let p=0;p<o.length;p++)o[p]===R&&o.splice(p,1);!b.aborted&&R.state===q&&n.call(R)},_.push(R)}else R.invoke()}else!b.aborted&&!1===S[E]&&(S[m]=!0)};return U.call(S,J,W),S[t]||(S[t]=R),z.apply(S,b.args),S[E]=!0,R}function h(){}function H(R){const b=R.data;return b.aborted=!0,O.apply(b.target,b.args)}const G=ue(Z,"open",()=>function(R,b){return R[i]=0==b[2],R[T]=b[1],G.apply(R,b)}),V=j("fetchTaskAborting"),g=j("fetchTaskScheduling"),z=ue(Z,"send",()=>function(R,b){if(!0===c.current[g]||R[i])return z.apply(R,b);{const S={target:R,url:R[T],isPeriodic:!1,args:b,aborted:!1},ee=xe("XMLHttpRequest.send",h,S,k,H);R&&!0===R[m]&&!S.aborted&&ee.state===q&&ee.invoke()}}),O=ue(Z,"abort",()=>function(R,b){const S=function x(R){return R[t]}(R);if(S&&"string"==typeof S.type){if(null==S.cancelFn||S.data&&S.data.aborted)return;S.zone.cancelTask(S)}else if(!0===c.current[V])return O.apply(R,b)})}(r);const t=j("xhrTask"),i=j("xhrSync"),u=j("xhrListener"),E=j("xhrScheduled"),T=j("xhrURL"),m=j("xhrErrorBeforeScheduled")}),e.__load_patch("geolocation",r=>{r.navigator&&r.navigator.geolocation&&function gt(e,r){const c=e.constructor.name;for(let t=0;t<r.length;t++){const i=r[t],u=e[i];if(u){if(!We(Te(e,i)))continue;e[i]=(T=>{const m=function(){return T.apply(this,Ge(arguments,c+"."+i))};return fe(m,T),m})(u)}}}(r.navigator.geolocation,["getCurrentPosition","watchPosition"])}),e.__load_patch("PromiseRejectionEvent",(r,c)=>{function t(i){return function(u){st(r,i).forEach(T=>{const m=r.PromiseRejectionEvent;if(m){const D=new m(i,{promise:u.promise,reason:u.rejection});T.invoke(D)}})}}r.PromiseRejectionEvent&&(c[j("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),c[j("rejectionHandledHandler")]=t("rejectionhandled"))}),e.__load_patch("queueMicrotask",(r,c,t)=>{!function wt(e,r){r.patchMethod(e,"queueMicrotask",c=>function(t,i){Zone.current.scheduleMicroTask("queueMicrotask",i[0])})}(r,t)})}(at)}},te=>{te(te.s=4050)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,b={},_={};function t(e){var f=_[e];if(void 0!==f)return f.exports;var r=_[e]={id:e,loaded:!1,exports:{}};return b[e].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}t.m=b,e=[],t.O=(f,r,a,o)=>{if(!r){var i=1/0;for(n=0;n<e.length;n++){for(var[r,a,o]=e[n],l=!0,c=0;c<r.length;c++)(!1&o||i>=o)&&Object.keys(t.O).every(h=>t.O[h](r[c]))?r.splice(c--,1):(l=!1,o<i&&(i=o));if(l){e.splice(n--,1);var s=a();void 0!==s&&(f=s)}}return f}o=o||0;for(var n=e.length;n>0&&e[n-1][2]>o;n--)e[n]=e[n-1];e[n]=[r,a,o]},t.n=e=>{var f=e&&e.__esModule?()=>e.default:()=>e;return t.d(f,{a:f}),f},(()=>{var f,e=Object.getPrototypeOf?r=>Object.getPrototypeOf(r):r=>r.__proto__;t.t=function(r,a){if(1&a&&(r=this(r)),8&a||"object"==typeof r&&r&&(4&a&&r.__esModule||16&a&&"function"==typeof r.then))return r;var o=Object.create(null);t.r(o);var n={};f=f||[null,e({}),e([]),e(e)];for(var i=2&a&&r;"object"==typeof i&&!~f.indexOf(i);i=e(i))Object.getOwnPropertyNames(i).forEach(l=>n[l]=()=>r[l]);return n.default=()=>r,t.d(o,n),o}})(),t.d=(e,f)=>{for(var r in f)t.o(f,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:f[r]})},t.o=(e,f)=>Object.prototype.hasOwnProperty.call(e,f),t.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={
|
|
1
|
+
(()=>{"use strict";var e,b={},_={};function t(e){var f=_[e];if(void 0!==f)return f.exports;var r=_[e]={id:e,loaded:!1,exports:{}};return b[e].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}t.m=b,e=[],t.O=(f,r,a,o)=>{if(!r){var i=1/0;for(n=0;n<e.length;n++){for(var[r,a,o]=e[n],l=!0,c=0;c<r.length;c++)(!1&o||i>=o)&&Object.keys(t.O).every(h=>t.O[h](r[c]))?r.splice(c--,1):(l=!1,o<i&&(i=o));if(l){e.splice(n--,1);var s=a();void 0!==s&&(f=s)}}return f}o=o||0;for(var n=e.length;n>0&&e[n-1][2]>o;n--)e[n]=e[n-1];e[n]=[r,a,o]},t.n=e=>{var f=e&&e.__esModule?()=>e.default:()=>e;return t.d(f,{a:f}),f},(()=>{var f,e=Object.getPrototypeOf?r=>Object.getPrototypeOf(r):r=>r.__proto__;t.t=function(r,a){if(1&a&&(r=this(r)),8&a||"object"==typeof r&&r&&(4&a&&r.__esModule||16&a&&"function"==typeof r.then))return r;var o=Object.create(null);t.r(o);var n={};f=f||[null,e({}),e([]),e(e)];for(var i=2&a&&r;"object"==typeof i&&!~f.indexOf(i);i=e(i))Object.getOwnPropertyNames(i).forEach(l=>n[l]=()=>r[l]);return n.default=()=>r,t.d(o,n),o}})(),t.d=(e,f)=>{for(var r in f)t.o(f,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:f[r]})},t.o=(e,f)=>Object.prototype.hasOwnProperty.call(e,f),t.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={121:0};t.O.j=a=>0===e[a];var f=(a,o)=>{var c,s,[n,i,l]=o,p=0;if(n.some(u=>0!==e[u])){for(c in i)t.o(i,c)&&(t.m[c]=i[c]);if(l)var d=l(t)}for(a&&a(o);p<n.length;p++)t.o(e,s=n[p])&&e[s]&&e[s][0](),e[s]=0;return t.O(d)},r=self.webpackChunkFUXA=self.webpackChunkFUXA||[];r.forEach(f.bind(null,0)),r.push=f.bind(null,r.push.bind(r))})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var uPlot=function(){"use strict";const xl="u-off",ye="u-label",J="width",Vt="height",Dt="top",Xt="left",il="right",ol="#000",Ml=ol+"0",at="mousemove",ht="mousedown",Tl="mouseup",te="mouseenter",_e="mouseleave",ke="dblclick",Il="dppxchange",Pl="--",yl=typeof window<"u",Bl=yl?document:null,zl=yl?window:null,je=yl?navigator:null;let K,Ll;function Ot(t,e){if(null!=e){let o=t.classList;!o.contains(e)&&o.add(e)}}function Nl(t,e){let o=t.classList;o.contains(e)&&o.remove(e)}function gt(t,e,o){t.style[e]=o+"px"}function sl(t,e,o,n){let r=Bl.createElement(t);return null!=e&&Ot(r,e),o?.insertBefore(r,n),r}function hl(t,e){return sl("div",t,e)}const ti=new WeakMap;function le(t,e,o,n,r){let c="translate("+e+"px,"+o+"px)";c!=ti.get(t)&&(t.style.transform=c,ti.set(t,c),0>e||0>o||e>n||o>r?Ot(t,xl):Nl(t,xl))}const li=new WeakMap;function Ao(t,e,o){let n=e+o;n!=li.get(t)&&(li.set(t,n),t.style.background=e,t.style.borderColor=o)}const ei=new WeakMap;function Wo(t,e,o,n){let r=e+""+o;r!=ei.get(t)&&(ei.set(t,r),t.style.height=o+"px",t.style.width=e+"px",t.style.marginLeft=n?-e/2+"px":0,t.style.marginTop=n?-o/2+"px":0)}const gn={passive:!0},ni={...gn,capture:!0};function Al(t,e,o,n){e.addEventListener(t,o,n?ni:gn)}function xn(t,e,o,n){e.removeEventListener(t,o,n?ni:gn)}function Wl(t,e,o,n){let r;o=o||0;let c=2147483647>=(n=n||e.length-1);for(;n-o>1;)r=c?o+n>>1:dl((o+n)/2),t>e[r]?o=r:n=r;return t-e[o]>e[n]-t?n:o}function ee(t,e,o,n){for(let r=1==n?e:o;r>=e&&o>=r;r+=n)if(null!=t[r])return r;return-1}function Ge(t,e,o,n){let r=si(t),c=si(e),f=10==o?El:ri;t==e&&(-1==r?(t*=o,e/=o):(t/=o,e*=o));let d=1==c?Xe:dl,p=(1==r?dl:Xe)(f(Nt(t))),m=d(f(Nt(e))),b=ne(o,p),x=ne(o,m);return 10==o&&(0>p&&(b=ct(b,-p)),0>m&&(x=ct(x,-m))),n||2==o?(t=b*r,e=x*c):(t=di(t,b),e=oe(e,x)),[t,e]}function wn(t,e,o,n){let r=Ge(t,e,o,n);return 0==t&&(r[0]=0),0==e&&(r[1]=0),r}yl&&function t(){let e=devicePixelRatio;K!=e&&(K=e,Ll&&xn("change",Ll,t),Ll=matchMedia(`(min-resolution: ${K-.001}dppx) and (max-resolution: ${K+.001}dppx)`),Al("change",Ll,t),zl.dispatchEvent(new CustomEvent(Il)))}();const ii={mode:3,pad:.1},Me={pad:0,soft:null,mode:0},Co={min:Me,max:Me};function Ue(t,e,o,n){return Ke(o)?oi(t,e,o):(Me.pad=o,Me.soft=n?0:null,Me.mode=n?3:0,oi(t,e,Co))}function ut(t,e){return t??e}function oi(t,e,o){let n=o.min,r=o.max,c=ut(n.pad,0),f=ut(r.pad,0),d=ut(n.hard,-Z),p=ut(r.hard,Z),m=ut(n.soft,Z),b=ut(r.soft,-Z),x=ut(n.mode,0),w=ut(r.mode,0),W=e-t,A=El(W),z=zt(Nt(t),Nt(e)),I=El(z),O=Nt(I-A);(1e-9>W||O>10)&&(W=0,0!=t&&0!=e||(W=1e-9,2==x&&m!=Z&&(c=0),2==w&&b!=-Z&&(f=0)));let G=W||z||1e3,k=El(G),B=ne(10,dl(k)),M=ct(di(t-G*(0==W?0==t?.1:1:c),B/10),9),E=m>t||1!=x&&(3!=x||M>m)&&(2!=x||m>M)?Z:m,D=zt(d,E>M&&t>=E?E:Jt(E,M)),j=ct(oe(e+G*(0==W?0==e?.1:1:f),B/10),9),U=e>b||1!=w&&(3!=w||b>j)&&(2!=w||j>b)?-Z:b,R=Jt(p,j>U&&U>=e?U:zt(U,j));return D==R&&0==D&&(R=100),[D,R]}const Yo=new Intl.NumberFormat(yl?je.language:"en-US"),bn=t=>Yo.format(t),rl=Math,Ve=rl.PI,Nt=rl.abs,dl=rl.floor,Rt=rl.round,Xe=rl.ceil,Jt=rl.min,zt=rl.max,ne=rl.pow,si=rl.sign,El=rl.log10,ri=rl.log2,vn=(t,e=1)=>rl.asinh(t/e),Z=1/0;function ai(t){return 1+(0|El((t^t>>31)-(t>>31)))}function ui(t,e,o){return Jt(zt(t,e),o)}function $(t){return"function"==typeof t?t:()=>t}const Ho=t=>t,fi=(t,e)=>e,Oo=()=>null,ci=()=>!0,hi=(t,e)=>t==e,ie=t=>ct(t,14);function jl(t,e){return ie(ct(ie(t/e))*e)}function oe(t,e){return ie(Xe(ie(t/e))*e)}function di(t,e){return ie(dl(ie(t/e))*e)}function ct(t,e=0){if(Fo(t))return t;let o=10**e;return Rt(t*o*(1+Number.EPSILON))/o}const Je=new Map;function Ro(t){return((""+t).split(".")[1]||"").length}function ze(t,e,o,n){let r=[],c=n.map(Ro);for(let f=e;o>f;f++){let d=Nt(f),p=ct(ne(t,f),d);for(let m=0;n.length>m;m++){let b=n[m]*p,x=(0>b||0>f?d:0)+(c[m]>f?c[m]:0),w=ct(b,x);r.push(w),Je.set(w,x)}}return r}const Ee={},pi=[],se=[null,null],Gl=Array.isArray,Fo=Number.isInteger;function mi(t){return"string"==typeof t}function Ke(t){let e=!1;if(null!=t){let o=t.constructor;e=null==o||o==Object}return e}function gi(t){return null!=t&&"object"==typeof t}const Io=Object.getPrototypeOf(Uint8Array);function Ul(t,e=Ke){let o;if(Gl(t)){let n=t.find(r=>null!=r);if(Gl(n)||e(n)){o=Array(t.length);for(let r=0;t.length>r;r++)o[r]=Ul(t[r],e)}else o=t.slice()}else if(t instanceof Io)o=t.slice();else if(e(t)){o={};for(let n in t)o[n]=Ul(t[n],e)}else o=t;return o}function St(t){let e=arguments;for(let o=1;e.length>o;o++){let n=e[o];for(let r in n)Ke(t[r])?St(t[r],Ul(n[r])):t[r]=Ul(n[r])}return t}function Bo(t,e,o){for(let n,r=0,c=-1;e.length>r;r++){let f=e[r];if(f>c){for(n=f-1;n>=0&&null==t[n];)t[n--]=null;for(n=f+1;o>n&&null==t[n];)t[c=n++]=null}}}const Lo=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask,xi=["January","February","March","April","May","June","July","August","September","October","November","December"],wi=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function bi(t){return t.slice(0,3)}const No=wi.map(bi),jo=xi.map(bi),Go={MMMM:xi,MMM:jo,WWWW:wi,WWW:No};function De(t){return(10>t?"0":"")+t}const Uo={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>De(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>De(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>De(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return 0==e?12:e>12?e-12:e},AA:t=>12>t.getHours()?"AM":"PM",aa:t=>12>t.getHours()?"am":"pm",a:t=>12>t.getHours()?"a":"p",mm:t=>De(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>De(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>{return(10>(e=t.getMilliseconds())?"00":100>e?"0":"")+e;var e}};function yn(t,e){e=e||Go;let o,n=[],r=/\{([a-z]+)\}|[^{]+/gi;for(;o=r.exec(t);)n.push("{"==o[0][0]?Uo[o[1]]:o[0]);return c=>{let f="";for(let d=0;n.length>d;d++)f+="string"==typeof n[d]?n[d]:n[d](c,e);return f}}const Vo=(new Intl.DateTimeFormat).resolvedOptions().timeZone,vi=t=>t%1==0,Ze=[1,2,2.5,5],Xo=ze(10,-16,0,Ze),yi=ze(10,0,16,Ze),Jo=yi.filter(vi),Ko=Xo.concat(yi),ki="\n{YYYY}",Si="{M}/{D}",Te="\n"+Si,$e=Te+"/{YY}",re="{h}:{mm}{aa}",zi="\n"+re,ft=null;function Di(t){let e=1e3*t,o=60*e,n=60*o,r=24*n,c=30*r,f=365*r;return[(1==t?ze(10,0,3,Ze).filter(vi):ze(10,-3,0,Ze)).concat([e,5*e,10*e,15*e,30*e,o,5*o,10*o,15*o,30*o,n,2*n,3*n,4*n,6*n,8*n,12*n,r,2*r,3*r,4*r,5*r,6*r,7*r,8*r,9*r,10*r,15*r,c,2*c,3*c,4*c,6*c,f,2*f,5*f,10*f,25*f,50*f,100*f]),[[f,"{YYYY}",ft,ft,ft,ft,ft,ft,1],[28*r,"{MMM}",ki,ft,ft,ft,ft,ft,1],[r,Si,ki,ft,ft,ft,ft,ft,1],[n,"{h}{aa}",$e,ft,Te,ft,ft,ft,1],[o,re,$e,ft,Te,ft,ft,ft,1],[e,":{ss}",$e+" "+re,ft,Te+" "+re,ft,zi,ft,1],[t,":{ss}.{fff}",$e+" "+re,ft,Te+" "+re,ft,zi,ft,1]],function(d){return(p,m,b,x,w,W)=>{let A=[],z=w>=f,I=w>=c&&f>w,O=d(b),G=ct(O*t,3),k=_n(O.getFullYear(),z?0:O.getMonth(),I||z?1:O.getDate()),B=ct(k*t,3);if(I||z){let M=I?w/c:0,E=z?w/f:0,D=G==B?G:ct(_n(k.getFullYear()+E,k.getMonth()+M,1)*t,3),j=new Date(Rt(D/t)),U=j.getFullYear(),R=j.getMonth();for(let T=0;x>=D;T++){let F=_n(U+E*T,R+M*T,1),nt=F-d(ct(F*t,3));D=ct((+F+nt)*t,3),D>x||A.push(D)}}else{let M=r>w?w:r,E=B+(dl(b)-dl(G))+oe(G-B,M);A.push(E);let D=d(E),j=D.getHours()+D.getMinutes()/o+D.getSeconds()/n,U=w/n,R=W/p.axes[m]._space;for(;E=ct(E+w,1==t?0:3),x>=E;)if(U>1){let T=dl(ct(j+U,6))%24,F=d(E).getHours()-T;F>1&&(F=-1),E-=F*n,j=(j+U)%24,.7>ct((E-A[A.length-1])/w,3)*R||A.push(E)}else A.push(E)}return A}}]}const[Zo,$o,qo]=Di(1),[Qo,ts,ls]=Di(.001);function Ti(t,e){return t.map(o=>o.map((n,r)=>0==r||8==r||null==n?n:e(1==r||0==o[8]?n:o[1]+n)))}function Pi(t,e){return(o,n,r,c,f)=>{let d,p,m,b,x,w,W=e.find(A=>f>=A[0])||e[e.length-1];return n.map(A=>{let z=t(A),I=z.getFullYear(),O=z.getMonth(),G=z.getDate(),k=z.getHours(),B=z.getMinutes(),M=z.getSeconds(),E=I!=d&&W[2]||O!=p&&W[3]||G!=m&&W[4]||k!=b&&W[5]||B!=x&&W[6]||M!=w&&W[7]||W[1];return d=I,p=O,m=G,b=k,x=B,w=M,E(z)})}}function _n(t,e,o){return new Date(t,e,o)}function Ai(t,e){return e(t)}function Wi(t,e){return(o,n,r,c)=>null==c?Pl:e(t(n))}ze(2,-53,53,[1]);const es={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(t,e){let o=t.series[e];return o.width?o.stroke(t,e):o.points.width?o.points.stroke(t,e):null},fill:function(t,e){return t.series[e].fill(t,e)},dash:"solid"},idx:null,idxs:null,values:[]},kn=[0,0];function qe(t,e,o){return n=>{0==n.button&&o(n)}}function Sn(t,e,o){return o}const ns={show:!0,x:!0,y:!0,lock:!1,move:function(t,e,o){return kn[0]=e,kn[1]=o,kn},points:{show:function(t,e){let o=t.cursor.points,n=hl(),r=o.size(t,e);gt(n,J,r),gt(n,Vt,r);let c=r/-2;gt(n,"marginLeft",c),gt(n,"marginTop",c);let f=o.width(t,e,r);return f&>(n,"borderWidth",f),n},size:function(t,e){return t.series[e].points.size},width:0,stroke:function(t,e){let o=t.series[e].points;return o._stroke||o._fill},fill:function(t,e){let o=t.series[e].points;return o._fill||o._stroke}},bind:{mousedown:qe,mouseup:qe,click:qe,dblclick:qe,mousemove:Sn,mouseleave:Sn,mouseenter:Sn},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{prox:-1,bias:0},left:-10,top:-10,idx:null,dataIdx:function(t,e,o){return o},idxs:null},Ci={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Mn=St({},Ci,{filter:fi}),Yi=St({},Mn,{size:10}),Hi=St({},Ci,{show:!1}),zn='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Oi="bold "+zn,Ri={show:!0,scale:"x",stroke:ol,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Oi,side:2,grid:Mn,ticks:Yi,border:Hi,font:zn,rotate:0},Fi={show:!0,scale:"x",auto:!1,sorted:1,min:Z,max:-Z,idxs:[]};function is(t,e){return e.map(o=>null==o?"":bn(o))}function os(t,e,o,n,r,c,f){let d=[],p=Je.get(r)||0;for(let m=o=f?o:ct(oe(o,r),p);n>=m;m=ct(m+r,p))d.push(Object.is(m,-0)?0:m);return d}function En(t,e,o,n,r){const c=[],f=t.scales[t.axes[e].scale].log,d=dl((10==f?El:ri)(o));r=ne(f,d),10==f&&0>d&&(r=ct(r,-d));let p=o;do{c.push(p),p+=r,10==f&&(p=ct(p,Je.get(r))),r*f>p||(r=p)}while(n>=p);return c}function ss(t,e,o,n,r){let c=t.scales[t.axes[e].scale].asinh,f=n>c?En(t,e,zt(c,o),n,r):[c],d=0>n||o>0?[]:[0];return(-c>o?En(t,e,zt(c,-n),-o,r):[c]).reverse().map(p=>-p).concat(d,f)}const rs=/./,as=/[12357]/,us=/[125]/,fs=/1/;function cs(t,e,o){let n=t.axes[o],r=n.scale,c=t.scales[r];if(3==c.distr&&2==c.log)return e;let f=t.valToPos,d=n._space,p=f(10,r),m=f(9,r)-p<d?f(7,r)-p<d?f(5,r)-p<d?fs:us:as:rs;return e.map(b=>4==c.distr&&0==b||m.test(b)?b:null)}function hs(t,e,o,n){return null==n?Pl:null==e?"":bn(e)}const Ii={show:!0,scale:"y",stroke:ol,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Oi,side:3,grid:Mn,ticks:Yi,border:Hi,font:zn,rotate:0},Bi={scale:null,auto:!0,sorted:0,min:Z,max:-Z},Li=(t,e,o,n,r)=>r,Ni={show:!0,auto:!0,sorted:0,gaps:Li,alpha:1,facets:[St({},Bi,{scale:"x"}),St({},Bi,{scale:"y"})]},ji={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Li,alpha:1,points:{show:function(t,e){let{scale:o,idxs:n}=t.series[0],r=t._data[0],c=t.valToPos(r[n[0]],o,!0),f=t.valToPos(r[n[1]],o,!0);return Nt(f-c)/(t.series[e].points.space*K)>=n[1]-n[0]},filter:null},values:null,min:Z,max:-Z,idxs:[],path:null,clip:null};function ds(t,e,o){return o/10}const Gi={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},ps=St({},Gi,{time:!1,ori:1}),Ui={};function Vi(t){let e=Ui[t];return e||(e={key:t,plots:[],sub(o){e.plots.push(o)},unsub(o){e.plots=e.plots.filter(n=>n!=o)},pub(o,n,r,c,f,d,p){for(let m=0;e.plots.length>m;m++)e.plots[m]!=n&&e.plots[m].pub(o,n,r,c,f,d,p)}},null!=t&&(Ui[t]=e)),e}function Vl(t,e,o){const n=t.mode,r=t.series[e],c=2==n?t._data[e]:t._data,f=t.scales,d=t.bbox;let p=c[0],m=2==n?c[1]:c[e],b=2==n?f[r.facets[0].scale]:f[t.series[0].scale],x=2==n?f[r.facets[1].scale]:f[r.scale],w=d.left,W=d.top,A=d.width,z=d.height,I=t.valToPosH,O=t.valToPosV;return 0==b.ori?o(r,p,m,b,x,I,O,w,W,A,z,ln,ae,nn,Ki,$i):o(r,p,m,b,x,O,I,W,w,z,A,en,ue,Tn,Zi,qi)}function Qe(t,e){let o=0,n=0,r=ut(t.bands,pi);for(let c=0;r.length>c;c++){let f=r[c];f.series[0]==e?o=f.dir:f.series[1]==e&&(n|=1==f.dir?1:2)}return[o,1==n?-1:2==n?1:3==n?2:0]}function ms(t,e,o,n,r){let c=t.series[e],f=t.scales[2==t.mode?c.facets[1].scale:c.scale];return-1==r?f.min:1==r?f.max:3==f.distr?1==f.dir?f.min:f.max:0}function Dl(t,e,o,n,r,c){return Vl(t,e,(f,d,p,m,b,x,w,W,A,z,I)=>{let O=f.pxRound;const G=0==m.ori?ae:ue;let k,B;m.dir*(0==m.ori?1:-1)==1?(k=o,B=n):(k=n,B=o);let M=O(x(d[k],m,z,W)),E=O(w(p[k],b,I,A)),D=O(x(d[B],m,z,W)),j=O(w(1==c?b.max:b.min,b,I,A)),U=new Path2D(r);return G(U,D,j),G(U,M,j),G(U,M,E),U})}function tn(t,e,o,n,r,c){let f=null;if(t.length>0){f=new Path2D;const d=0==e?nn:Tn;let p=o;for(let b=0;t.length>b;b++){let x=t[b];if(x[1]>x[0]){let w=x[0]-p;w>0&&d(f,p,n,w,n+c),p=x[1]}}let m=o+r-p;m>0&&d(f,p,n,m,n+c)}return f}function Dn(t,e,o,n,r,c,f){let d=[],p=t.length;for(let m=1==r?o:n;m>=o&&n>=m;m+=r)if(null===e[m]){let b=m,x=m;if(1==r)for(;++m<=n&&null===e[m];)x=m;else for(;--m>=o&&null===e[m];)x=m;let w=c(t[b]),W=x==b?w:c(t[x]),A=b-r;w=f>0||0>A||A>=p?w:c(t[A]);let z=x+r;W=0>f||0>z||z>=p?W:c(t[z]),w>W||d.push([w,W])}return d}function Xi(t){return 0==t?Ho:1==t?Rt:e=>jl(e,t)}function Ji(t){let e=0==t?ln:en,o=0==t?(r,c,f,d,p,m)=>{r.arcTo(c,f,d,p,m)}:(r,c,f,d,p,m)=>{r.arcTo(f,c,p,d,m)},n=0==t?(r,c,f,d,p)=>{r.rect(c,f,d,p)}:(r,c,f,d,p)=>{r.rect(f,c,p,d)};return(r,c,f,d,p,m=0,b=0)=>{0==m&&0==b?n(r,c,f,d,p):(m=Jt(m,d/2,p/2),b=Jt(b,d/2,p/2),e(r,c+m,f),o(r,c+d,f,c+d,f+p,m),o(r,c+d,f+p,c,f+p,b),o(r,c,f+p,c,f,b),o(r,c,f,c+d,f,m),r.closePath())}}const ln=(t,e,o)=>{t.moveTo(e,o)},en=(t,e,o)=>{t.moveTo(o,e)},ae=(t,e,o)=>{t.lineTo(e,o)},ue=(t,e,o)=>{t.lineTo(o,e)},nn=Ji(0),Tn=Ji(1),Ki=(t,e,o,n,r,c)=>{t.arc(e,o,n,r,c)},Zi=(t,e,o,n,r,c)=>{t.arc(o,e,n,r,c)},$i=(t,e,o,n,r,c,f)=>{t.bezierCurveTo(e,o,n,r,c,f)},qi=(t,e,o,n,r,c,f)=>{t.bezierCurveTo(o,e,r,n,f,c)};function Qi(){return(t,e,o,n,r)=>Vl(t,e,(c,f,d,p,m,b,x,w,W,A,z)=>{let I,O,{pxRound:G,points:k}=c;0==p.ori?(I=ln,O=Ki):(I=en,O=Zi);const B=ct(k.width*K,3);let M=(k.size-k.width)/2*K,E=ct(2*M,3),D=new Path2D,j=new Path2D,{left:U,top:R,width:T,height:F}=t.bbox;nn(j,U-E,R-E,T+2*E,F+2*E);const nt=tt=>{if(null!=d[tt]){let q=G(b(f[tt],p,A,w)),dt=G(x(d[tt],m,z,W));I(D,q+M,dt),O(D,q,dt,M,0,2*Ve)}};if(r)r.forEach(nt);else for(let tt=o;n>=tt;tt++)nt(tt);return{stroke:B>0?D:null,fill:D,clip:j,flags:3}})}function to(t){return(e,o,n,r,c,f)=>{n!=r&&(c!=n&&f!=n&&t(e,o,n),c!=r&&f!=r&&t(e,o,r),t(e,o,f))}}const gs=to(ae),xs=to(ue);function lo(t){const e=ut(t?.alignGaps,0);return(o,n,r,c)=>Vl(o,n,(f,d,p,m,b,x,w,W,A,z,I)=>{let O,G,k=f.pxRound,B=Y=>k(x(Y,m,z,W)),M=Y=>k(w(Y,b,I,A));0==m.ori?(O=ae,G=gs):(O=ue,G=xs);const E=m.dir*(0==m.ori?1:-1),D={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},j=D.stroke;let U,R,T,F=Z,nt=-Z,tt=B(d[1==E?r:c]),q=ee(p,r,c,1*E),dt=ee(p,r,c,-1*E),Kt=B(d[q]),Zt=B(d[dt]),N=!1;for(let Y=1==E?r:c;Y>=r&&c>=Y;Y+=E){let pt=B(d[Y]),it=p[Y];pt==tt?null!=it?(R=M(it),F==Z&&(O(j,pt,R),U=R),F=Jt(R,F),nt=zt(R,nt)):null===it&&(N=!0):(F!=Z&&(G(j,tt,F,nt,U,R),T=tt),null!=it?(R=M(it),O(j,pt,R),F=nt=U=R):(F=Z,nt=-Z,null===it&&(N=!0)),tt=pt)}F!=Z&&F!=nt&&T!=tt&&G(j,tt,F,nt,U,R);let[Tt,X]=Qe(o,n);if(null!=f.fill||0!=Tt){let Y=D.fill=new Path2D(j),pt=M(f.fillTo(o,n,f.min,f.max,Tt));O(Y,Zt,pt),O(Y,Kt,pt)}if(!f.spanGaps){let Y=[];N&&Y.push(...Dn(d,p,r,c,E,B,e)),D.gaps=Y=f.gaps(o,n,r,c,Y),D.clip=tn(Y,m.ori,W,A,z,I)}return 0!=X&&(D.band=2==X?[Dl(o,n,r,c,j,-1),Dl(o,n,r,c,j,1)]:Dl(o,n,r,c,j,X)),D})}function ws(t,e,o,n,r){const c=t.length;if(2>c)return null;const f=new Path2D;if(o(f,t[0],e[0]),2==c)n(f,t[1],e[1]);else{let d=Array(c),p=Array(c-1),m=Array(c-1),b=Array(c-1);for(let x=0;c-1>x;x++)m[x]=e[x+1]-e[x],b[x]=t[x+1]-t[x],p[x]=m[x]/b[x];d[0]=p[0];for(let x=1;c-1>x;x++)0===p[x]||0===p[x-1]||p[x-1]>0!=p[x]>0?d[x]=0:(d[x]=3*(b[x-1]+b[x])/((2*b[x]+b[x-1])/p[x-1]+(b[x]+2*b[x-1])/p[x]),isFinite(d[x])||(d[x]=0));d[c-1]=p[c-2];for(let x=0;c-1>x;x++)r(f,t[x]+b[x]/3,e[x]+d[x]*b[x]/3,t[x+1]-b[x]/3,e[x+1]-d[x+1]*b[x]/3,t[x+1],e[x+1])}return f}const Pn=new Set;function eo(){for(let t of Pn)t.syncRect(!0)}yl&&(Al("resize",zl,eo),Al("scroll",zl,eo,!0),Al(Il,zl,()=>{jt.pxRatio=K}));const bs=lo(),vs=Qi();function no(t,e,o,n){return(n?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((r,c)=>An(r,c,e,o))}function An(t,e,o,n){return St({},0==e?o:n,t)}function io(t,e,o){return null==e?se:[e,o]}const ys=io;function _s(t,e,o){return null==e?se:Ue(e,o,.1,!0)}function oo(t,e,o,n){return null==e?se:Ge(e,o,t.scales[n].log,!1)}const ks=oo;function so(t,e,o,n){return null==e?se:wn(e,o,t.scales[n].log,!1)}const Ss=so;function ro(t){let e,o;return[t=t.replace(/(\d+)px/,(n,r)=>(e=Rt((o=+r)*K))+"px"),e,o]}function zs(t){t.show&&[t.font,t.labelFont].forEach(e=>{let o=ct(e[2]*K,1);e[0]=e[0].replace(/[0-9.]+px/,o+"px"),e[1]=o})}function jt(t,e,o){const n={mode:ut(t.mode,1)},r=n.mode;function c(l,i){return((3==i.distr?El(l>0?l:i.clamp(n,l,i.min,i.max,i.key)):4==i.distr?vn(l,i.asinh):l)-i._min)/(i._max-i._min)}function f(l,i,s,a){let u=c(l,i);return a+s*(-1==i.dir?1-u:u)}function d(l,i,s,a){let u=c(l,i);return a+s*(-1==i.dir?u:1-u)}function p(l,i,s,a){return 0==i.ori?f(l,i,s,a):d(l,i,s,a)}n.valToPosH=f,n.valToPosV=d;let m=!1;n.status=0;const b=n.root=hl("uplot");null!=t.id&&(b.id=t.id),Ot(b,t.class),t.title&&(hl("u-title",b).textContent=t.title);const x=sl("canvas"),w=n.ctx=x.getContext("2d"),W=hl("u-wrap",b);Al("click",W,l=>{(wt!=me||bt!=ge)&&Ft.click(n,l)},!0);const A=n.under=hl("u-under",W);W.appendChild(x);const z=n.over=hl("u-over",W),I=+ut((t=Ul(t)).pxAlign,1),O=Xi(I);(t.plugins||[]).forEach(l=>{l.opts&&(t=l.opts(n,t)||t)});const G=t.ms||.001,k=n.series=1==r?no(t.series||[],Fi,ji,!1):(i=Ni,(t.series||[null]).map((s,a)=>0==a?null:St({},i,s))),B=n.axes=no(t.axes||[],Ri,Ii,!0),M=n.scales={},E=n.bands=t.bands||[];var i;E.forEach(l=>{l.fill=$(l.fill||null),l.dir=ut(l.dir,-1)});const D=2==r?k[1].facets[0].scale:k[0].scale,j={axes:function(){for(let l=0;B.length>l;l++){let i=B[l];if(!i.show||!i._show)continue;let s,a,u=i.side,h=u%2,g=i.stroke(n,l),_=0==u||3==u?-1:1;if(i.label){let Qt=Rt((i._lpos+i.labelGap*_)*K);po(i.labelFont[0],g,"center",2==u?Dt:"bottom"),w.save(),1==h?(s=a=0,w.translate(Qt,Rt(kt+$t/2)),w.rotate((3==u?-Ve:Ve)/2)):(s=Rt(Q+Pt/2),a=Qt),w.fillText(i.label,s,a),w.restore()}let[y,v]=i._found;if(0==v)continue;let S=M[i.scale],P=0==h?Pt:$t,et=0==h?Q:kt,H=Rt(i.gap*K),C=i._splits,st=2==S.distr?C.map(Qt=>vl[Qt]):C,V=2==S.distr?vl[C[1]]-vl[C[0]]:y,rt=i.ticks,vt=i.border,yt=rt.show?Rt(rt.size*K):0,xt=i._rotate*-Ve/180,mt=O(i._pos*K),Mt=mt+(yt+H)*_;a=0==h?Mt:0,s=1==h?Mt:0,po(i.font[0],g,1==i.align?Xt:2==i.align?il:xt>0?Xt:0>xt?il:0==h?"center":3==u?il:Xt,xt||1==h?"middle":2==u?Dt:"bottom");let qt=1.5*i.font[1],nl=C.map(Qt=>O(p(Qt,S,P,et))),Lt=i._values;for(let Qt=0;Lt.length>Qt;Qt++){let Sl=Lt[Qt];if(null!=Sl){0==h?s=nl[Qt]:a=nl[Qt],Sl=""+Sl;let mn=-1==Sl.indexOf("\n")?[Sl]:Sl.split(/\n/gm);for(let cl=0;mn.length>cl;cl++){let Le=mn[cl];xt?(w.save(),w.translate(s,a+cl*qt),w.rotate(xt),w.fillText(Le,0,0),w.restore()):w.fillText(Le,s,a+cl*qt)}}}rt.show&&jn(nl,rt.filter(n,st,l,v,V),h,u,mt,yt,ct(rt.width*K,3),rt.stroke(n,l),rt.dash,rt.cap);let Rl=i.grid;Rl.show&&jn(nl,Rl.filter(n,st,l,v,V),h,0==h?2:1,0==h?kt:Q,0==h?$t:Pt,ct(Rl.width*K,3),Rl.stroke(n,l),Rl.dash,Rl.cap),vt.show&&jn([mt],[1],0==h?1:0,0==h?1:2,1==h?kt:Q,1==h?$t:Pt,ct(vt.width*K,3),vt.stroke(n,l),vt.dash,vt.cap)}It("drawAxes")},series:function(){At>0&&(k.forEach((l,i)=>{if(i>0&&l.show&&null==l._paths){let s=2==r?[0,e[i][0].length-1]:function(a){let u=ui(Wt-1,0,At-1),h=ui(Ct+1,0,At-1);for(;null==a[u]&&u>0;)u--;for(;null==a[h]&&At-1>h;)h++;return[u,h]}(e[i]);l._paths=l.paths(n,i,s[0],s[1])}}),k.forEach((l,i)=>{if(i>0&&l.show){Ce!=l.alpha&&(w.globalAlpha=Ce=l.alpha),mo(i,!1),l._paths&&go(i,!1);{mo(i,!0);let s=l._paths?l._paths.gaps:null,a=l.points.show(n,i,Wt,Ct,s),u=l.points.filter(n,i,a,s);(a||u)&&(l.points._paths=l.points.paths(n,i,Wt,Ct,u),go(i,!0))}1!=Ce&&(w.globalAlpha=Ce=1),It("drawSeries",i)}}))}},U=(t.drawOrder||["axes","series"]).map(l=>j[l]);function R(l){let i=M[l];if(null==i){let s=(t.scales||Ee)[l]||Ee;if(null!=s.from)R(s.from),M[l]=St({},M[s.from],s,{key:l});else{i=M[l]=St({},l==D?Gi:ps,s),i.key=l;let a=i.time,u=i.range,h=Gl(u);if((l!=D||2==r&&!a)&&(!h||null!=u[0]&&null!=u[1]||(u={min:null==u[0]?ii:{mode:1,hard:u[0],soft:u[0]},max:null==u[1]?ii:{mode:1,hard:u[1],soft:u[1]}},h=!1),!h&&Ke(u))){let g=u;u=(_,y,v)=>null==y?se:Ue(y,v,g)}i.range=$(u||(a?ys:l==D?3==i.distr?ks:4==i.distr?Ss:io:3==i.distr?oo:4==i.distr?so:_s)),i.auto=$(!h&&i.auto),i.clamp=$(i.clamp||ds),i._min=i._max=null}}}R("x"),R("y"),1==r&&k.forEach(l=>{R(l.scale)}),B.forEach(l=>{R(l.scale)});for(let l in t.scales)R(l);const T=M[D],F=T.distr;let nt,tt;0==T.ori?(Ot(b,"u-hz"),nt=f,tt=d):(Ot(b,"u-vt"),nt=d,tt=f);const q={};for(let l in M){let i=M[l];null==i.min&&null==i.max||(q[l]={min:i.min,max:i.max},i.min=i.max=null)}const dt=t.tzDate||(l=>new Date(Rt(l/G))),Kt=t.fmtDate||yn,Zt=1==G?qo(dt):ls(dt),N=Pi(dt,Ti(1==G?$o:ts,Kt)),Tt=Wi(dt,Ai("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",Kt)),X=[],Y=n.legend=St({},es,t.legend),pt=Y.show,it=Y.markers;let Gt;Y.idxs=X,it.width=$(it.width),it.dash=$(it.dash),it.stroke=$(it.stroke),it.fill=$(it.fill);let _t,wl=[],Cl=[],pl=!1,Yl={};if(Y.live){const l=k[1]?k[1].values:null;pl=null!=l,_t=pl?l(n,1,0):{_:0};for(let i in _t)Yl[i]=Pl}if(pt)if(Gt=sl("table","u-legend",b),Y.mount(n,Gt),pl){let l=sl("tr","u-thead",Gt);for(var fe in sl("th",null,l),_t)sl("th",ye,l).textContent=fe}else Ot(Gt,"u-inline"),Y.live&&Ot(Gt,"u-live");const ce={show:!0},Pe={show:!1},bl=new Map;function ml(l,i,s){const a=bl.get(i)||{},u=L.bind[l](n,i,s);u&&(Al(l,i,a[l]=u),bl.set(i,a))}function he(l,i){const s=bl.get(i)||{};for(let a in s)null!=l&&a!=l||(xn(a,i,s[a]),delete s[a]);null==l&&bl.delete(i)}let de=0,Xl=0,ot=0,lt=0,al=0,ul=0,Q=0,kt=0,Pt=0,$t=0;n.bbox={};let tl=!1,gl=!1,Et=!1,fl=!1,Jl=!1,Ut=!1;function Wn(l,i,s){(s||l!=n.width||i!=n.height)&&ao(l,i),Ye(!1),Et=!0,gl=!0,0>L.left||(fl=Ut=!0),$l()}function ao(l,i){n.width=de=ot=l,n.height=Xl=lt=i,al=ul=0,function(){let a=!1,u=!1,h=!1,g=!1;B.forEach(_=>{if(_.show&&_._show){let{side:y,_size:v}=_,S=v+(null!=_.label?_.labelSize:0);S>0&&(y%2?(ot-=S,3==y?(al+=S,g=!0):h=!0):(lt-=S,0==y?(ul+=S,a=!0):u=!0))}}),Zl[0]=a,Zl[1]=h,Zl[2]=u,Zl[3]=g,ot-=Hl[1]+Hl[3],al+=Hl[3],lt-=Hl[2]+Hl[0],ul+=Hl[0]}(),function(){let a=al+ot,u=ul+lt,h=al,g=ul;function _(y,v){switch(y){case 1:return a+=v,a-v;case 2:return u+=v,u-v;case 3:return h-=v,h+v;case 0:return g-=v,g+v}}B.forEach(y=>{if(y.show&&y._show){let v=y.side;y._pos=_(v,y._size),null!=y.label&&(y._lpos=_(v,y.labelSize))}})}();let s=n.bbox;Q=s.left=jl(al*K,.5),kt=s.top=jl(ul*K,.5),Pt=s.width=jl(ot*K,.5),$t=s.height=jl(lt*K,.5)}n.setSize=function({width:l,height:i}){Wn(l,i)};const L=n.cursor=St({},ns,{drag:{y:2==r}},t.cursor);{L.idxs=X,L._lock=!1;let l=L.points;l.show=$(l.show),l.size=$(l.size),l.stroke=$(l.stroke),l.width=$(l.width),l.fill=$(l.fill)}const Kl=n.focus=St({},t.focus||{alpha:.3},L.focus);0!=Kl.bias&&(Kl.prox=1e5);const Ae=Kl.prox>=0;let ll=[null];function uo(l,i){if(1==r||i>0){let s=1==r&&M[l.scale].time,a=l.value;l.value=s?mi(a)?Wi(dt,Ai(a,Kt)):a||Tt:a||hs,l.label=l.label||(s?"Time":"Value")}if(i>0){l.width=null==l.width?1:l.width,l.paths=l.paths||bs||Oo,l.fillTo=$(l.fillTo||ms),l.pxAlign=+ut(l.pxAlign,I),l.pxRound=Xi(l.pxAlign),l.stroke=$(l.stroke||null),l.fill=$(l.fill||null),l._stroke=l._fill=l._paths=l._focus=null;let s=ct(1*(3+2*(zt(1,l.width)||1)),3),a=l.points=St({},{size:s,width:zt(1,.2*s),stroke:l.stroke,space:2*s,paths:vs,_stroke:null,_fill:null},l.points);a.show=$(a.show),a.filter=$(a.filter),a.fill=$(a.fill),a.stroke=$(a.stroke),a.paths=$(a.paths),a.pxAlign=l.pxAlign}if(pt){let s=function(a,u){if(0==u&&(pl||!Y.live||2==r))return se;let h=[],g=sl("tr","u-series",Gt,Gt.childNodes[u]);Ot(g,a.class),a.show||Ot(g,xl);let _=sl("th",null,g);if(it.show){let S=hl("u-marker",_);if(u>0){let P=it.width(n,u);P&&(S.style.border=P+"px "+it.dash(n,u)+" "+it.stroke(n,u)),S.style.background=it.fill(n,u)}}let y=hl(ye,_);for(var v in y.textContent=a.label,u>0&&(it.show||(y.style.color=a.width>0?it.stroke(n,u):it.fill(n,u)),ml("click",_,S=>{if(L._lock)return;let P=k.indexOf(a);if((S.ctrlKey||S.metaKey)!=Y.isolate){let et=k.some((H,C)=>C>0&&C!=P&&H.show);k.forEach((H,C)=>{C>0&&_l(C,et?C==P?ce:Pe:ce,!0,Bt.setSeries)})}else _l(P,{show:!a.show},!0,Bt.setSeries)}),Ae&&ml(te,_,()=>{L._lock||_l(k.indexOf(a),we,!0,Bt.setSeries)})),_t){let S=sl("td","u-value",g);S.textContent="--",h.push(S)}return[g,h]}(l,i);wl.splice(i,0,s[0]),Cl.splice(i,0,s[1]),Y.values.push(null)}if(L.show){X.splice(i,0,null);let s=function(a,u){if(u>0){let h=L.points.show(n,u);if(h)return Ot(h,"u-cursor-pt"),Ot(h,a.class),le(h,-10,-10,ot,lt),z.insertBefore(h,ll[u]),h}}(l,i);s&&ll.splice(i,0,s)}It("addSeries",i)}n.addSeries=function(l,i){i=i??k.length,l=1==r?An(l,i,Fi,ji):An(l,i,null,Ni),k.splice(i,0,l),uo(k[i],i)},n.delSeries=function(l){if(k.splice(l,1),pt){Y.values.splice(l,1),Cl.splice(l,1);let i=wl.splice(l,1)[0];he(null,i.firstChild),i.remove()}L.show&&(X.splice(l,1),ll.length>1&&ll.splice(l,1)[0].remove()),It("delSeries",l)};const Zl=[!1,!1,!1,!1];function We(l,i,s){let[a,u,h,g]=s,_=i%2,y=0;return 0==_&&(g||u)&&(y=0==i&&!a||2==i&&!h?Rt(Ri.size/3):0),1==_&&(a||h)&&(y=1==i&&!u||3==i&&!g?Rt(Ii.size/2):0),y}const fo=n.padding=(t.padding||[We,We,We,We]).map(l=>$(ut(l,We))),Hl=n._padding=fo.map((l,i)=>l(n,i,Zl,0));let At,Wt=null,Ct=null;const on=1==r?k[0].idxs:null;let sn,pe,Cn,Yn,Hn,On,Rn,Fn,In,Ce,vl=null,rn=!1;function co(l,i){if(e=null==l?[]:Ul(l,gi),2==r){At=0;for(let s=1;k.length>s;s++)At+=e[s][0].length;n.data=e=l}else if(null==e[0]&&(e[0]=[]),n.data=e.slice(),vl=e[0],At=vl.length,2==F){e[0]=Array(At);for(let s=0;At>s;s++)e[0][s]=s}if(n._data=e,Ye(!0),It("setData"),2==F&&(Et=!0),!1!==i){let s=T;s.auto(n,rn)?Bn():xe(D,s.min,s.max),fl=L.left>=0,Ut=!0,$l()}}function Bn(){let l,i;rn=!0,1==r&&(At>0?(Wt=on[0]=0,Ct=on[1]=At-1,l=e[0][Wt],i=e[0][Ct],2==F?(l=Wt,i=Ct):1==At&&(3==F?[l,i]=Ge(l,l,T.log,!1):4==F?[l,i]=wn(l,l,T.log,!1):T.time?i=l+Rt(86400/G):[l,i]=Ue(l,i,.1,!0))):(Wt=on[0]=l=null,Ct=on[1]=i=null)),xe(D,l,i)}function ho(l,i,s,a,u,h){l??=Ml,s??=pi,a??="butt",u??=Ml,h??="round",l!=sn&&(w.strokeStyle=sn=l),u!=pe&&(w.fillStyle=pe=u),i!=Cn&&(w.lineWidth=Cn=i),h!=Hn&&(w.lineJoin=Hn=h),a!=On&&(w.lineCap=On=a),s!=Yn&&w.setLineDash(Yn=s)}function po(l,i,s,a){i!=pe&&(w.fillStyle=pe=i),l!=Rn&&(w.font=Rn=l),s!=Fn&&(w.textAlign=Fn=s),a!=In&&(w.textBaseline=In=a)}function Ln(l,i,s,a,u=0){if(a.length>0&&l.auto(n,rn)&&(null==i||null==i.min)){let h=ut(Wt,0),g=ut(Ct,a.length-1),_=null==s.min?3==l.distr?function(y,v,S){let P=Z,et=-Z;for(let H=v;S>=H;H++)y[H]>0&&(P=Jt(P,y[H]),et=zt(et,y[H]));return[P==Z?1:P,et==-Z?10:et]}(a,h,g):function(y,v,S,P){let et=Z,H=-Z;if(1==P)et=y[v],H=y[S];else if(-1==P)et=y[S],H=y[v];else for(let C=v;S>=C;C++)null!=y[C]&&(et=Jt(et,y[C]),H=zt(H,y[C]));return[et,H]}(a,h,g,u):[s.min,s.max];l.min=Jt(l.min,s.min=_[0]),l.max=zt(l.max,s.max=_[1])}}function mo(l,i){let s=i?k[l].points:k[l];s._stroke=s.stroke(n,l),s._fill=s.fill(n,l)}function go(l,i){let s=i?k[l].points:k[l],a=s._stroke,u=s._fill,{stroke:h,fill:g,clip:_,flags:y}=s._paths,v=null,S=ct(s.width*K,3),P=S%2/2;i&&null==u&&(u=S>0?"#fff":a);let et=1==s.pxAlign;if(et&&w.translate(P,P),!i){let H=Q,C=kt,st=Pt,V=$t,rt=S*K/2;0==s.min&&(V+=rt),0==s.max&&(C-=rt,V+=rt),v=new Path2D,v.rect(H,C,st,V)}i?Nn(a,S,s.dash,s.cap,u,h,g,y,_):function(H,C,st,V,rt,vt,yt,xt,mt,Mt,qt){let nl=!1;E.forEach((Lt,Rl)=>{if(Lt.series[0]==H){let Qt,Sl=k[Lt.series[1]],mn=e[Lt.series[1]],cl=(Sl._paths||Ee).band;Gl(cl)&&(cl=1==Lt.dir?cl[0]:cl[1]);let Le=null;Sl.show&&cl&&function(Po,Ne,Qn){for(Ne=ut(Ne,0),Qn=ut(Qn,Po.length-1);Qn>=Ne;){if(null!=Po[Ne])return!0;Ne++}return!1}(mn,Wt,Ct)?(Le=Lt.fill(n,Rl)||vt,Qt=Sl._paths.clip):cl=null,Nn(C,st,V,rt,Le,yt,xt,mt,Mt,qt,Qt,cl),nl=!0}}),nl||Nn(C,st,V,rt,vt,yt,xt,mt,Mt,qt)}(l,a,S,s.dash,s.cap,u,h,g,y,v,_),et&&w.translate(-P,-P)}function Nn(l,i,s,a,u,h,g,_,y,v,S,P){ho(l,i,s,a,u),(y||v||P)&&(w.save(),y&&w.clip(y),v&&w.clip(v)),P?3==(3&_)?(w.clip(P),S&&w.clip(S),un(u,g),an(l,h,i)):2&_?(un(u,g),w.clip(P),an(l,h,i)):1&_&&(w.save(),w.clip(P),S&&w.clip(S),un(u,g),w.restore(),an(l,h,i)):(un(u,g),an(l,h,i)),(y||v||P)&&w.restore()}function an(l,i,s){s>0&&(i instanceof Map?i.forEach((a,u)=>{w.strokeStyle=sn=u,w.stroke(a)}):null!=i&&l&&w.stroke(i))}function un(l,i){i instanceof Map?i.forEach((s,a)=>{w.fillStyle=pe=a,w.fill(s)}):null!=i&&l&&w.fill(i)}function jn(l,i,s,a,u,h,g,_,y,v){let S=g%2/2;1==I&&w.translate(S,S),ho(_,g,y,v,_),w.beginPath();let P,et,H,C,st=u+(0==a||3==a?-h:h);0==s?(et=u,C=st):(P=u,H=st);for(let V=0;l.length>V;V++)null!=i[V]&&(0==s?P=H=l[V]:et=C=l[V],w.moveTo(P,et),w.lineTo(H,C));w.stroke(),1==I&&w.translate(-S,-S)}function Es(l){let i=!0;return B.forEach((s,a)=>{if(!s.show)return;let u=M[s.scale];if(null==u.min)return void(s._show&&(i=!1,s._show=!1,Ye(!1)));s._show||(i=!1,s._show=!0,Ye(!1));let h=s.side,g=h%2,{min:_,max:y}=u,[v,S]=function(V,rt,vt,yt){let xt,mt=B[V];if(yt>0){let Mt=mt._space=mt.space(n,V,rt,vt,yt);xt=function Ms(t,e,o,n,r){let c=zt(ai(t),ai(e)),f=e-t,d=Wl(r/n*f,o);do{let p=o[d],m=n*p/f;if(m>=r&&17>=c+(5>p?Je.get(p):0))return[p,m]}while(++d<o.length);return[0,0]}(rt,vt,mt._incrs=mt.incrs(n,V,rt,vt,yt,Mt),yt,Mt)}else xt=[0,0];return mt._found=xt}(a,_,y,0==g?ot:lt);if(0==S)return;let P=s._splits=s.splits(n,a,_,y,v,S,2==u.distr),et=2==u.distr?P.map(V=>vl[V]):P,H=2==u.distr?vl[P[1]]-vl[P[0]]:v,C=s._values=s.values(n,s.filter(n,et,a,S,H),a,S,H);s._rotate=2==h?s.rotate(n,C,a,S):0;let st=s._size;s._size=Xe(s.size(n,C,a,l)),null!=st&&s._size!=st&&(i=!1)}),i}function Ds(l){let i=!0;return fo.forEach((s,a)=>{let u=s(n,a,Zl,l);u!=Hl[a]&&(i=!1),Hl[a]=u}),i}function Ye(l){k.forEach((i,s)=>{s>0&&(i._paths=null,l&&(1==r?(i.min=null,i.max=null):i.facets.forEach(a=>{a.min=null,a.max=null})))})}n.setData=co;let Gn,Un,fn,cn,xo,wo,me,ge,bo,vo,wt,bt,Vn=!1;function $l(){Vn||(Lo(Ts),Vn=!0)}function Ts(){tl&&(function(){let l=Ul(M,gi);for(let a in l){let u=l[a],h=q[a];if(null!=h&&null!=h.min)St(u,h),a==D&&Ye(!0);else if(a!=D||2==r)if(0==At&&null==u.from){let g=u.range(n,null,null,a);u.min=g[0],u.max=g[1]}else u.min=Z,u.max=-Z}if(At>0){k.forEach((a,u)=>{if(1==r){let h=a.scale,g=l[h],_=q[h];if(0==u){let y=g.range(n,g.min,g.max,h);g.min=y[0],g.max=y[1],Wt=Wl(g.min,e[0]),Ct=Wl(g.max,e[0]),Ct-Wt>1&&(g.min>e[0][Wt]&&Wt++,e[0][Ct]>g.max&&Ct--),a.min=vl[Wt],a.max=vl[Ct]}else a.show&&a.auto&&Ln(g,_,a,e[u],a.sorted);a.idxs[0]=Wt,a.idxs[1]=Ct}else if(u>0&&a.show&&a.auto){let[h,g]=a.facets,_=h.scale,y=g.scale,[v,S]=e[u];Ln(l[_],q[_],h,v,h.sorted),Ln(l[y],q[y],g,S,g.sorted),a.min=g.min,a.max=g.max}});for(let a in l){let u=l[a],h=q[a];if(null==u.from&&(null==h||null==h.min)){let g=u.range(n,u.min==Z?null:u.min,u.max==-Z?null:u.max,a);u.min=g[0],u.max=g[1]}}}for(let a in l){let u=l[a];if(null!=u.from){let h=l[u.from];if(null==h.min)u.min=u.max=null;else{let g=u.range(n,h.min,h.max,a);u.min=g[0],u.max=g[1]}}}let i={},s=!1;for(let a in l){let u=l[a],h=M[a];if(h.min!=u.min||h.max!=u.max){h.min=u.min,h.max=u.max;let g=h.distr;h._min=3==g?El(h.min):4==g?vn(h.min,h.asinh):h.min,h._max=3==g?El(h.max):4==g?vn(h.max,h.asinh):h.max,i[a]=s=!0}}if(s){k.forEach((a,u)=>{2==r?u>0&&i.y&&(a._paths=null):i[a.scale]&&(a._paths=null)});for(let a in i)Et=!0,It("setScale",a);L.show&&L.left>=0&&(fl=Ut=!0)}for(let a in q)q[a]=null}(),tl=!1),Et&&(function(){let l=!1,i=0;for(;!l;){i++;let s=Es(i),a=Ds(i);l=3==i||s&&a,l||(ao(n.width,n.height),gl=!0)}}(),Et=!1),gl&&(gt(A,Xt,al),gt(A,Dt,ul),gt(A,J,ot),gt(A,Vt,lt),gt(z,Xt,al),gt(z,Dt,ul),gt(z,J,ot),gt(z,Vt,lt),gt(W,J,de),gt(W,Vt,Xl),x.width=Rt(de*K),x.height=Rt(Xl*K),B.forEach(({_el:l,_show:i,_size:s,_pos:a,side:u})=>{if(null!=l)if(i){let h=u%2==1;gt(l,h?"left":"top",a-(3===u||0===u?s:0)),gt(l,h?"width":"height",s),gt(l,h?"top":"left",h?ul:al),gt(l,h?"height":"width",h?lt:ot),Nl(l,xl)}else Ot(l,xl)}),sn=pe=Cn=Hn=On=Rn=Fn=In=Yn=null,Ce=1,dn(!0),It("setSize"),gl=!1),de>0&&Xl>0&&(w.clearRect(0,0,x.width,x.height),It("drawClear"),U.forEach(l=>l()),It("draw")),el.show&&Jl&&(hn(el),Jl=!1),L.show&&fl&&(Ql(null,!0,!1),fl=!1),Y.show&&Y.live&&Ut&&(Jn(),Ut=!1),m||(m=!0,n.status=1,It("ready")),rn=!1,Vn=!1}function Xn(l,i){let s=M[l];if(null==s.from){if(0==At){let a=s.range(n,i.min,i.max,l);i.min=a[0],i.max=a[1]}if(i.min>i.max){let a=i.min;i.min=i.max,i.max=a}if(At>1&&null!=i.min&&null!=i.max&&1e-16>i.max-i.min)return;l==D&&2==s.distr&&At>0&&(i.min=Wl(i.min,e[0]),i.max=Wl(i.max,e[0]),i.min==i.max&&i.max++),q[l]=i,tl=!0,$l()}}n.redraw=(l,i)=>{Et=i||!1,!1!==l?xe(D,T.min,T.max):$l()},n.setScale=Xn;let Ol=!1;const Ft=L.drag;let Yt=Ft.x,Ht=Ft.y;L.show&&(L.x&&(Gn=hl("u-cursor-x",z)),L.y&&(Un=hl("u-cursor-y",z)),0==T.ori?(fn=Gn,cn=Un):(fn=Un,cn=Gn),wt=L.left,bt=L.top);const el=n.select=St({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),He=el.show?hl("u-select",el.over?z:A):null;function hn(l,i){if(el.show){for(let s in l)el[s]=l[s],s in So&>(He,s,l[s]);!1!==i&&It("setSelect")}}function xe(l,i,s){Xn(l,{min:i,max:s})}function _l(l,i,s,a){null!=i.focus&&function(u){if(u!=Re){let h=null==u,g=1!=Kl.alpha;k.forEach((_,y)=>{let v=h||0==y||y==u;var S,P;_._focus=h?null:v,g&&(k[S=y].alpha=P=v?1:Kl.alpha,L.show&&ll[S]&&(ll[S].style.opacity=P),pt&&wl[S]&&(wl[S].style.opacity=P))}),Re=u,g&&$l()}}(l),null!=i.show&&k.forEach((u,h)=>{0>=h||l!=h&&null!=l||(u.show=i.show,function(g){let _=pt?wl[g]:null;k[g].show?_&&Nl(_,xl):(_&&Ot(_,xl),ll.length>1&&le(ll[g],-10,-10,ot,lt))}(h),xe(2==r?u.facets[1].scale:u.scale,null,null),$l())}),!1!==s&&It("setSeries",l,i),a&&Be("setSeries",n,l,i)}let ql,Oe,Re;n.setSelect=hn,n.setSeries=_l,n.addBand=function(l,i){l.fill=$(l.fill||null),l.dir=ut(l.dir,-1),E.splice(i=i??E.length,0,l)},n.setBand=function(l,i){St(E[l],i)},n.delBand=function(l){null==l?E.length=0:E.splice(l,1)};const we={focus:!0};function kl(l,i,s){let a=M[i];s&&(l=l/K-(1==a.ori?ul:al));let u=ot;1==a.ori&&(u=lt,l=u-l),-1==a.dir&&(l=u-l);let h=a._min,g=h+l/u*(a._max-h),_=a.distr;return 3==_?ne(10,g):4==_?((y,v=1)=>rl.sinh(y)*v)(g,a.asinh):g}function yo(l,i){gt(He,Xt,el.left=l),gt(He,J,el.width=i)}function _o(l,i){gt(He,Dt,el.top=l),gt(He,Vt,el.height=i)}pt&&Ae&&Al(_e,Gt,()=>{L._lock||null!=Re&&_l(null,we,!0,Bt.setSeries)}),n.valToIdx=l=>Wl(l,e[0]),n.posToIdx=function(l,i){return Wl(kl(l,D,i),e[0],Wt,Ct)},n.posToVal=kl,n.valToPos=(l,i,s)=>0==M[i].ori?f(l,M[i],s?Pt:ot,s?Q:0):d(l,M[i],s?$t:lt,s?kt:0),n.batch=function(l){l(n),$l()},n.setCursor=(l,i,s)=>{wt=l.left,bt=l.top,Ql(null,i,s)};let Fe=0==T.ori?yo:_o,Ie=1==T.ori?yo:_o;function Jn(l,i){null!=l&&(l.idxs?l.idxs.forEach((s,a)=>{X[a]=s}):void 0===l.idx||X.fill(l.idx),Y.idx=X[0]);for(let s=0;k.length>s;s++)(s>0||1==r&&!pl)&&Ps(s,X[s]);pt&&Y.live&&function(){if(pt&&Y.live)for(let s=2==r?1:0;k.length>s;s++){if(0==s&&pl)continue;let a=Y.values[s],u=0;for(let h in a)Cl[s][u++].firstChild.nodeValue=a[h]}}(),Ut=!1,!1!==i&&It("setLegend")}function Ps(l,i){let s,a=k[l],u=0==l&&2==F?vl:e[l];pl?s=a.values(n,l,i)??Yl:(s=a.value(n,null==i?null:u[i],l,i),s=null==s?Yl:{_:s}),Y.values[l]=s}function Ql(l,i,s){let a;bo=wt,vo=bt,[wt,bt]=L.move(n,wt,bt),L.show&&(fn&&le(fn,Rt(wt),0,ot,lt),cn&&le(cn,0,Rt(bt),ot,lt)),ql=Z;let u=0==T.ori?ot:lt,h=1==T.ori?ot:lt;if(0>wt||0==At||Wt>Ct){a=null;for(let g=0;k.length>g;g++)g>0&&ll.length>1&&le(ll[g],-10,-10,ot,lt);Ae&&_l(null,we,!0,null==l&&Bt.setSeries),Y.live&&(X.fill(a),Ut=!0)}else{let g,_,y;1==r&&(g=0==T.ori?wt:bt,_=kl(g,D),a=Wl(_,e[0],Wt,Ct),y=nt(e[0][a],T,u,0));for(let v=2==r?1:0;k.length>v;v++){let S=k[v],P=X[v],et=1==r?e[v][P]:e[v][1][P],H=L.dataIdx(n,v,a,_),C=1==r?e[v][H]:e[v][1][H];Ut=Ut||C!=et||H!=P,X[v]=H;let st=oe(H==a?y:nt(1==r?e[0][H]:e[v][0][H],T,u,0),1);if(v>0&&S.show){let V,rt,vt=null==C?-10:oe(tt(C,1==r?M[S.scale]:M[S.facets[1].scale],h,0),1);if(Ae&&vt>=0&&1==r){let yt=Nt(vt-bt),xt=Kl.bias;if(0!=xt){let mt=kl(1==T.ori?wt:bt,S.scale),Mt=0>mt?-1:1;Mt==(0>C?-1:1)&&(yt>=ql||(1==Mt?1==xt?mt>C:C>mt:1==xt?C>mt:mt>C)||(ql=yt,Oe=v))}else ql>yt&&(ql=yt,Oe=v)}if(0==T.ori?(V=st,rt=vt):(V=vt,rt=st),Ut&&ll.length>1){Ao(ll[v],L.points.fill(n,v),L.points.stroke(n,v));let yt,xt,mt,Mt,qt=!0,nl=L.points.bbox;if(null!=nl){qt=!1;let Lt=nl(n,v);mt=Lt.left,Mt=Lt.top,yt=Lt.width,xt=Lt.height}else mt=V,Mt=rt,yt=xt=L.points.size(n,v);Wo(ll[v],yt,xt,qt),le(ll[v],mt,Mt,ot,lt)}}}}if(L.idx=a,L.left=wt,L.top=bt,Ut&&(Y.idx=a,Jn()),el.show&&Ol)if(null!=l){let[g,_]=Bt.scales,[y,v]=Bt.match,[S,P]=l.cursor.sync.scales,et=l.cursor.drag;if(Yt=et._x,Ht=et._y,Yt||Ht){let H,C,st,V,rt,{left:vt,top:yt,width:xt,height:mt}=l.select,Mt=l.scales[g].ori,qt=l.posToVal,nl=null!=g&&y(g,S),Lt=null!=_&&v(_,P);nl&&Yt?(0==Mt?(H=vt,C=xt):(H=yt,C=mt),st=M[g],V=nt(qt(H,S),st,u,0),rt=nt(qt(H+C,S),st,u,0),Fe(Jt(V,rt),Nt(rt-V))):Fe(0,u),Lt&&Ht?(1==Mt?(H=vt,C=xt):(H=yt,C=mt),st=M[_],V=tt(qt(H,P),st,h,0),rt=tt(qt(H+C,P),st,h,0),Ie(Jt(V,rt),Nt(rt-V))):Ie(0,h)}else Zn()}else{let g=Nt(bo-xo),_=Nt(vo-wo);if(1==T.ori){let P=g;g=_,_=P}Yt=Ft.x&&g>=Ft.dist,Ht=Ft.y&&_>=Ft.dist;let y,v,S=Ft.uni;null!=S?Yt&&Ht&&(Yt=g>=S,Ht=_>=S,Yt||Ht||(_>g?Ht=!0:Yt=!0)):Ft.x&&Ft.y&&(Yt||Ht)&&(Yt=Ht=!0),Yt&&(0==T.ori?(y=me,v=wt):(y=ge,v=bt),Fe(Jt(y,v),Nt(v-y)),Ht||Ie(0,h)),Ht&&(1==T.ori?(y=me,v=wt):(y=ge,v=bt),Ie(Jt(y,v),Nt(v-y)),Yt||Fe(0,u)),Yt||Ht||(Fe(0,0),Ie(0,0))}if(Ft._x=Yt,Ft._y=Ht,null==l){if(s){if(null!=To){let[g,_]=Bt.scales;Bt.values[0]=null!=g?kl(0==T.ori?wt:bt,g):null,Bt.values[1]=null!=_?kl(1==T.ori?wt:bt,_):null}Be(at,n,wt,bt,ot,lt,a)}if(Ae){let g=s&&Bt.setSeries,_=Kl.prox;null==Re?ql>_||_l(Oe,we,!0,g):ql>_?_l(null,we,!0,g):Oe!=Re&&_l(Oe,we,!0,g)}}!1!==i&&It("setCursor")}n.setLegend=Jn;let be=null;function dn(l){!0===l?be=null:(be=z.getBoundingClientRect(),It("syncRect",be))}function ko(l,i,s,a,u,h){L._lock||Ol&&null!=l&&0==l.movementX&&0==l.movementY||(Kn(l,i,s,a,u,h,0,!1,null!=l),null!=l?Ql(null,!0,!0):Ql(i,!0,!1))}function Kn(l,i,s,a,u,h,g,_,y){if(null==be&&dn(!1),null!=l)s=l.clientX-be.left,a=l.clientY-be.top;else{if(0>s||0>a)return wt=-10,void(bt=-10);let[v,S]=Bt.scales,P=i.cursor.sync,[et,H]=P.values,[C,st]=P.scales,[V,rt]=Bt.match,vt=i.axes[0].side%2==1,yt=0==T.ori?ot:lt,xt=1==T.ori?ot:lt,mt=vt?h:u,Mt=vt?u:h,qt=vt?a:s,nl=vt?s:a;if(s=null!=C?V(v,C)?p(et,M[v],yt,0):-10:yt*(qt/mt),a=null!=st?rt(S,st)?p(H,M[S],xt,0):-10:xt*(nl/Mt),1==T.ori){let Lt=s;s=a,a=Lt}}y&&(s>1&&ot-1>s||(s=jl(s,ot)),a>1&<-1>a||(a=jl(a,lt))),_?(xo=s,wo=a,[me,ge]=L.move(n,s,a)):(wt=s,bt=a)}const So={width:0,height:0,left:0,top:0};function Zn(){hn(So,!1)}function Mo(l,i,s,a,u,h){Ol=!0,Yt=Ht=Ft._x=Ft._y=!1,Kn(l,i,s,a,u,h,0,!0,!1),null!=l&&(ml(Tl,Bl,zo),Be(ht,n,me,ge,ot,lt,null))}function zo(l,i,s,a,u,h){Ol=Ft._x=Ft._y=!1,Kn(l,i,s,a,u,h,0,!1,!0);let{left:g,top:_,width:y,height:v}=el,S=y>0||v>0;if(S&&hn(el),Ft.setScale&&S){let P=g,et=y,H=_,C=v;if(1==T.ori&&(P=_,et=v,H=g,C=y),Yt&&xe(D,kl(P,D),kl(P+et,D)),Ht)for(let st in M){let V=M[st];st!=D&&null==V.from&&V.min!=Z&&xe(st,kl(H+C,st),kl(H,st))}Zn()}else L.lock&&(L._lock=!L._lock,L._lock||Ql(null,!0,!1));null!=l&&(he(Tl,Bl),Be(Tl,n,wt,bt,ot,lt,null))}function Eo(l){Bn(),Zn(),null!=l&&Be(ke,n,wt,bt,ot,lt,null)}function Do(){B.forEach(zs),Wn(n.width,n.height,!0)}Al(Il,zl,Do);const ve={};ve.mousedown=Mo,ve.mousemove=ko,ve.mouseup=zo,ve.dblclick=Eo,ve.setSeries=(l,i,s,a)=>{_l(s,a,!0,!1)},L.show&&(ml(ht,z,Mo),ml(at,z,ko),ml(te,z,dn),ml(_e,z,function(){if(!L._lock){let l=Ol;if(Ol){let i,s,a=!0,u=!0,h=10;0==T.ori?(i=Yt,s=Ht):(i=Ht,s=Yt),i&&s&&(a=h>=wt||wt>=ot-h,u=h>=bt||bt>=lt-h),i&&a&&(wt=me>wt?0:ot),s&&u&&(bt=ge>bt?0:lt),Ql(null,!0,!0),Ol=!1}wt=-10,bt=-10,Ql(null,!0,!0),l&&(Ol=l)}}),ml(ke,z,Eo),Pn.add(n),n.syncRect=dn);const pn=n.hooks=t.hooks||{};function It(l,i,s){l in pn&&pn[l].forEach(a=>{a.call(null,n,i,s)})}(t.plugins||[]).forEach(l=>{for(let i in l.hooks)pn[i]=(pn[i]||[]).concat(l.hooks[i])});const Bt=St({key:null,setSeries:!1,filters:{pub:ci,sub:ci},scales:[D,k[1]?k[1].scale:null],match:[hi,hi],values:[null,null]},L.sync);L.sync=Bt;const To=Bt.key,$n=Vi(To);function Be(l,i,s,a,u,h,g){Bt.filters.pub(l,i,s,a,u,h,g)&&$n.pub(l,i,s,a,u,h,g)}function qn(){It("init",t,e),co(e||t.data,!1),q[D]?Xn(D,q[D]):Bn(),Jl=el.show,fl=Ut=!0,Wn(t.width,t.height)}return $n.sub(n),n.pub=function(l,i,s,a,u,h,g){Bt.filters.sub(l,i,s,a,u,h,g)&&ve[l](null,i,s,a,u,h,g)},n.destroy=function(){$n.unsub(n),Pn.delete(n),bl.clear(),xn(Il,zl,Do),b.remove(),Gt?.remove(),It("destroy")},k.forEach(uo),B.forEach(function(l,i){if(l._show=l.show,l.show){let s=M[l.scale];null==s&&(l.scale=l.side%2?k[1].scale:D,s=M[l.scale]);let a=s.time;l.size=$(l.size),l.space=$(l.space),l.rotate=$(l.rotate),l.incrs=$(l.incrs||(2==s.distr?Jo:a?1==G?Zo:Qo:Ko)),l.splits=$(l.splits||(a&&1==s.distr?Zt:3==s.distr?En:4==s.distr?ss:os)),l.stroke=$(l.stroke),l.grid.stroke=$(l.grid.stroke),l.ticks.stroke=$(l.ticks.stroke),l.border.stroke=$(l.border.stroke);let u=l.values;l.values=Gl(u)&&!Gl(u[0])?$(u):a?Gl(u)?Pi(dt,Ti(u,Kt)):mi(u)?function(h,g){let _=yn(g);return(y,v)=>v.map(S=>_(h(S)))}(dt,u):u||N:u||is,l.filter=$(l.filter||(3>s.distr||10!=s.log?fi:cs)),l.font=ro(l.font),l.labelFont=ro(l.labelFont),l._size=l.size(n,null,i,0),l._space=l._rotate=l._incrs=l._found=l._splits=l._values=null,l._size>0&&(Zl[i]=!0,l._el=hl("u-axis",W))}}),o?o instanceof HTMLElement?(o.appendChild(b),qn()):o(n,qn):qn(),n}jt.assign=St,jt.fmtNum=bn,jt.rangeNum=Ue,jt.rangeLog=Ge,jt.rangeAsinh=wn,jt.orient=Vl,jt.pxRatio=K,jt.join=function(t,e){let o=new Set;for(let f=0;t.length>f;f++){let d=t[f][0],p=d.length;for(let m=0;p>m;m++)o.add(d[m])}let n=[Array.from(o).sort((f,d)=>f-d)],r=n[0].length,c=new Map;for(let f=0;r>f;f++)c.set(n[0][f],f);for(let f=0;t.length>f;f++){let d=t[f],p=d[0];for(let m=1;d.length>m;m++){let b=d[m],x=Array(r).fill(void 0),w=e?e[f][m]:1,W=[];for(let A=0;b.length>A;A++){let z=b[A],I=c.get(p[A]);null===z?0!=w&&(x[I]=z,2==w&&W.push(I)):x[I]=z}Bo(x,W,r),n.push(x)}}return n},jt.fmtDate=yn,jt.tzDate=function(t,e){let o;return"UTC"==e||"Etc/UTC"==e?o=new Date(+t+6e4*t.getTimezoneOffset()):e==Vo?o=t:(o=new Date(t.toLocaleString("en-US",{timeZone:e})),o.setMilliseconds(t.getMilliseconds())),o},jt.sync=Vi;{jt.addGap=function(e,o,n){let r=e[e.length-1];r&&r[0]==o?r[1]=n:e.push([o,n])},jt.clipGaps=tn;let t=jt.paths={points:Qi};t.linear=lo,t.stepped=function(e){const o=ut(e.align,1),n=ut(e.ascDesc,!1),r=ut(e.alignGaps,0),c=ut(e.extend,!1);return(f,d,p,m)=>Vl(f,d,(b,x,w,W,A,z,I,O,G,k,B)=>{let M=b.pxRound,{left:E,width:D}=f.bbox,j=X=>M(z(X,W,k,O)),U=X=>M(I(X,A,B,G)),R=0==W.ori?ae:ue;const T={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},F=T.stroke,nt=W.dir*(0==W.ori?1:-1);p=ee(w,p,m,1),m=ee(w,p,m,-1);let tt=U(w[1==nt?p:m]),q=j(x[1==nt?p:m]),dt=q,Kt=q;c&&-1==o&&(Kt=E,R(F,Kt,tt)),R(F,q,tt);for(let X=1==nt?p:m;X>=p&&m>=X;X+=nt){let Y=w[X];if(null==Y)continue;let pt=j(x[X]),it=U(Y);1==o?R(F,pt,tt):R(F,dt,it),R(F,pt,it),tt=it,dt=pt}let Zt=dt;c&&1==o&&(Zt=E+D,R(F,Zt,tt));let[N,Tt]=Qe(f,d);if(null!=b.fill||0!=N){let X=T.fill=new Path2D(F),Y=U(b.fillTo(f,d,b.min,b.max,N));R(X,Zt,Y),R(X,Kt,Y)}if(!b.spanGaps){let X=[];X.push(...Dn(x,w,p,m,nt,j,r));let Y=b.width*K/2,pt=n||1==o?Y:-Y,it=n||-1==o?-Y:Y;X.forEach(Gt=>{Gt[0]+=pt,Gt[1]+=it}),T.gaps=X=b.gaps(f,d,p,m,X),T.clip=tn(X,W.ori,O,G,k,B)}return 0!=Tt&&(T.band=2==Tt?[Dl(f,d,p,m,F,-1),Dl(f,d,p,m,F,1)]:Dl(f,d,p,m,F,Tt)),T})},t.bars=function(e){const o=ut((e=e||Ee).size,[.6,Z,1]),n=e.align||0,r=(e.gap||0)*K;let c=e.radius;c=null==c?[0,0]:"number"==typeof c?[c,0]:c;const f=$(c),d=1-o[0],p=ut(o[1],Z)*K,m=ut(o[2],1)*K,b=ut(e.disp,Ee),x=ut(e.each,()=>{}),{fill:w,stroke:W}=b;return(A,z,I,O)=>Vl(A,z,(G,k,B,M,E,D,j,U,R,T,F)=>{let nt,tt,q=G.pxRound;0==M.ori?[nt,tt]=f(A,z):[tt,nt]=f(A,z);const dt=M.dir*(0==M.ori?1:-1),Kt=E.dir*(1==E.ori?1:-1);let Zt,N,Tt=0==M.ori?nn:Tn,X=0==M.ori?x:(Q,kt,Pt,$t,tl,gl,Et)=>{x(Q,kt,Pt,tl,$t,Et,gl)},[Y,pt]=Qe(A,z),it=3==E.distr?1==Y?E.max:E.min:0,Gt=j(it,E,F,R),_t=q(G.width*K),wl=!1,Cl=null,pl=null,Yl=null,fe=null;null==w||0!=_t&&null==W||(wl=!0,Cl=w.values(A,z,I,O),pl=new Map,new Set(Cl).forEach(Q=>{null!=Q&&pl.set(Q,new Path2D)}),_t>0&&(Yl=W.values(A,z,I,O),fe=new Map,new Set(Yl).forEach(Q=>{null!=Q&&fe.set(Q,new Path2D)})));let{x0:ce,size:Pe}=b;if(null!=ce&&null!=Pe){k=ce.values(A,z,I,O),2==ce.unit&&(k=k.map(kt=>A.posToVal(U+kt*T,M.key,!0)));let Q=Pe.values(A,z,I,O);N=2==Pe.unit?Q[0]*T:D(Q[0],M,T,U)-D(0,M,T,U),N=q(N-_t),Zt=1==dt?-_t/2:N+_t/2}else{let Q=T;if(k.length>1){let kt=null;for(let Pt=0,$t=1/0;k.length>Pt;Pt++)if(void 0!==B[Pt]){if(null!=kt){let tl=Nt(k[Pt]-k[kt]);$t>tl&&($t=tl,Q=Nt(D(k[Pt],M,T,U)-D(k[kt],M,T,U)))}kt=Pt}}N=q(Jt(p,zt(m,Q-Q*d))-_t-r),Zt=(0==n?N/2:n==dt?0:N)-n*dt*r/2}const bl={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:3};let ml;0!=pt&&(bl.band=new Path2D,ml=q(j(1==pt?E.max:E.min,E,F,R)));const he=wl?null:new Path2D,de=bl.band;let{y0:Xl,y1:ot}=b,lt=null;null!=Xl&&null!=ot&&(B=ot.values(A,z,I,O),lt=Xl.values(A,z,I,O));let al=nt*N,ul=tt*N;for(let Q=1==dt?I:O;Q>=I&&O>=Q;Q+=dt){let kt=B[Q];if(void 0===kt)continue;let Pt=D(2!=M.distr||null!=b?k[Q]:Q,M,T,U),$t=j(ut(kt,it),E,F,R);null!=lt&&null!=kt&&(Gt=j(lt[Q],E,F,R));let tl=q(Pt-Zt),gl=q(zt($t,Gt)),Et=q(Jt($t,Gt)),fl=gl-Et;if(null!=kt){let Jl=0>kt?ul:al,Ut=0>kt?al:ul;wl?(_t>0&&null!=Yl[Q]&&Tt(fe.get(Yl[Q]),tl,Et+dl(_t/2),N,zt(0,fl-_t),Jl,Ut),null!=Cl[Q]&&Tt(pl.get(Cl[Q]),tl,Et+dl(_t/2),N,zt(0,fl-_t),Jl,Ut)):Tt(he,tl,Et+dl(_t/2),N,zt(0,fl-_t),Jl,Ut),X(A,z,Q,tl-_t/2,Et,N+_t,fl)}0!=pt&&(Kt*pt==1?(gl=Et,Et=ml):(Et=gl,gl=ml),fl=gl-Et,Tt(de,tl-_t/2,Et,N+_t,zt(0,fl),0,0))}return _t>0&&(bl.stroke=wl?fe:he),bl.fill=wl?pl:he,bl})},t.spline=function(e){return function(o,n){const r=ut(n?.alignGaps,0);return(c,f,d,p)=>Vl(c,f,(m,b,x,w,W,A,z,I,O,G,k)=>{let B,M,E,D=m.pxRound,j=N=>D(A(N,w,G,I)),U=N=>D(z(N,W,k,O));0==w.ori?(B=ln,E=ae,M=$i):(B=en,E=ue,M=qi);const R=w.dir*(0==w.ori?1:-1);d=ee(x,d,p,1),p=ee(x,d,p,-1);let T=j(b[1==R?d:p]),F=T,nt=[],tt=[];for(let N=1==R?d:p;N>=d&&p>=N;N+=R)if(null!=x[N]){let Tt=j(b[N]);nt.push(F=Tt),tt.push(U(x[N]))}const q={stroke:o(nt,tt,B,E,M,D),fill:null,clip:null,band:null,gaps:null,flags:1},dt=q.stroke;let[Kt,Zt]=Qe(c,f);if(null!=m.fill||0!=Kt){let N=q.fill=new Path2D(dt),Tt=U(m.fillTo(c,f,m.min,m.max,Kt));E(N,F,Tt),E(N,T,Tt)}if(!m.spanGaps){let N=[];N.push(...Dn(b,x,d,p,R,j,r)),q.gaps=N=m.gaps(c,f,d,p,N),q.clip=tn(N,w.ori,I,O,G,k)}return 0!=Zt&&(q.band=2==Zt?[Dl(c,f,d,p,dt,-1),Dl(c,f,d,p,dt,1)]:Dl(c,f,d,p,dt,Zt)),q})}(ws,e)}}return jt}(),placement=function(){"use strict";var xl={size:["height","width"],clientSize:["clientHeight","clientWidth"],offsetSize:["offsetHeight","offsetWidth"],maxSize:["maxHeight","maxWidth"],before:["top","left"],marginBefore:["marginTop","marginLeft"],after:["bottom","right"],marginAfter:["marginBottom","marginRight"],scrollOffset:["pageYOffset","pageXOffset"]};function ye(J){return{top:J.top,bottom:J.bottom,left:J.left,right:J.right}}return function(J,Vt,Dt,Fl,Xt){void 0===Dt&&(Dt="bottom"),void 0===Fl&&(Fl="center"),void 0===Xt&&(Xt={}),(Vt instanceof Element||Vt instanceof Range)&&(Vt=ye(Vt.getBoundingClientRect()));var il=Object.assign({top:Vt.bottom,bottom:Vt.top,left:Vt.right,right:Vt.left},Vt),ol={top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};Xt.bound&&((Xt.bound instanceof Element||Xt.bound instanceof Range)&&(Xt.bound=ye(Xt.bound.getBoundingClientRect())),Object.assign(ol,Xt.bound));var Ml=getComputedStyle(J),at={},ht={};for(var Tl in xl)at[Tl]=xl[Tl]["top"===Dt||"bottom"===Dt?0:1],ht[Tl]=xl[Tl]["top"===Dt||"bottom"===Dt?1:0];J.style.position="absolute",J.style.maxWidth="",J.style.maxHeight="";var te=parseInt(Ml[ht.marginBefore]),_e=parseInt(Ml[ht.marginAfter]),ke=te+_e,Se=ol[ht.after]-ol[ht.before]-ke,Il=parseInt(Ml[ht.maxSize]);(!Il||Se<Il)&&(J.style[ht.maxSize]=Se+"px");var Pl=parseInt(Ml[at.marginBefore])+parseInt(Ml[at.marginAfter]),yl=il[at.before]-ol[at.before]-Pl,Bl=ol[at.after]-il[at.after]-Pl;(Dt===at.before&&J[at.offsetSize]>yl||Dt===at.after&&J[at.offsetSize]>Bl)&&(Dt=yl>Bl?at.before:at.after);var zl=Dt===at.before?yl:Bl,je=parseInt(Ml[at.maxSize]);(!je||zl<je)&&(J.style[at.maxSize]=zl+"px");var K=window[at.scrollOffset],Ll=function(sl){return Math.max(ol[at.before],Math.min(sl,ol[at.after]-J[at.offsetSize]-Pl))};Dt===at.before?(J.style[at.before]=K+Ll(il[at.before]-J[at.offsetSize]-Pl)+"px",J.style[at.after]="auto"):(J.style[at.before]=K+Ll(il[at.after])+"px",J.style[at.after]="auto");var Ot=window[ht.scrollOffset],Nl=function(sl){return Math.max(ol[ht.before],Math.min(sl,ol[ht.after]-J[ht.offsetSize]-ke))};switch(Fl){case"start":J.style[ht.before]=Ot+Nl(il[ht.before]-te)+"px",J.style[ht.after]="auto";break;case"end":J.style[ht.before]="auto",J.style[ht.after]=Ot+Nl(document.documentElement[ht.clientSize]-il[ht.after]-_e)+"px";break;default:J.style[ht.before]=Ot+Nl(il[ht.before]+(il[ht.after]-il[ht.before])/2-J[ht.offsetSize]/2-te)+"px",J.style[ht.after]="auto"}J.dataset.side=Dt,J.dataset.align=Fl}}();
|
|
1
|
+
var uPlot=function(){"use strict";const xl="u-off",ye="u-label",J="width",Vt="height",Dt="top",Xt="left",il="right",ol="#000",Ml=ol+"0",at="mousemove",ht="mousedown",Tl="mouseup",te="mouseenter",_e="mouseleave",ke="dblclick",Il="dppxchange",Pl="--",yl=typeof window<"u",Bl=yl?document:null,zl=yl?window:null,je=yl?navigator:null;let K,Ll;function Ot(t,e){if(null!=e){let o=t.classList;!o.contains(e)&&o.add(e)}}function Nl(t,e){let o=t.classList;o.contains(e)&&o.remove(e)}function gt(t,e,o){t.style[e]=o+"px"}function sl(t,e,o,n){let r=Bl.createElement(t);return null!=e&&Ot(r,e),o?.insertBefore(r,n),r}function hl(t,e){return sl("div",t,e)}const ti=new WeakMap;function le(t,e,o,n,r){let c="translate("+e+"px,"+o+"px)";c!=ti.get(t)&&(t.style.transform=c,ti.set(t,c),0>e||0>o||e>n||o>r?Ot(t,xl):Nl(t,xl))}const li=new WeakMap;function Ao(t,e,o){let n=e+o;n!=li.get(t)&&(li.set(t,n),t.style.background=e,t.style.borderColor=o)}const ei=new WeakMap;function Wo(t,e,o,n){let r=e+""+o;r!=ei.get(t)&&(ei.set(t,r),t.style.height=o+"px",t.style.width=e+"px",t.style.marginLeft=n?-e/2+"px":0,t.style.marginTop=n?-o/2+"px":0)}const gn={passive:!0},ni={...gn,capture:!0};function Al(t,e,o,n){e.addEventListener(t,o,n?ni:gn)}function xn(t,e,o,n){e.removeEventListener(t,o,n?ni:gn)}function Wl(t,e,o,n){let r;o=o||0;let c=2147483647>=(n=n||e.length-1);for(;n-o>1;)r=c?o+n>>1:dl((o+n)/2),t>e[r]?o=r:n=r;return t-e[o]>e[n]-t?n:o}function ee(t,e,o,n){for(let r=1==n?e:o;r>=e&&o>=r;r+=n)if(null!=t[r])return r;return-1}function Ge(t,e,o,n){let r=si(t),c=si(e),f=10==o?El:ri;t==e&&(-1==r?(t*=o,e/=o):(t/=o,e*=o));let d=1==c?Xe:dl,p=(1==r?dl:Xe)(f(Nt(t))),m=d(f(Nt(e))),b=ne(o,p),x=ne(o,m);return 10==o&&(0>p&&(b=ct(b,-p)),0>m&&(x=ct(x,-m))),n||2==o?(t=b*r,e=x*c):(t=di(t,b),e=oe(e,x)),[t,e]}function wn(t,e,o,n){let r=Ge(t,e,o,n);return 0==t&&(r[0]=0),0==e&&(r[1]=0),r}yl&&function t(){let e=devicePixelRatio;K!=e&&(K=e,Ll&&xn("change",Ll,t),Ll=matchMedia(`(min-resolution: ${K-.001}dppx) and (max-resolution: ${K+.001}dppx)`),Al("change",Ll,t),zl.dispatchEvent(new CustomEvent(Il)))}();const ii={mode:3,pad:.1},Me={pad:0,soft:null,mode:0},Co={min:Me,max:Me};function Ue(t,e,o,n){return Ke(o)?oi(t,e,o):(Me.pad=o,Me.soft=n?0:null,Me.mode=n?3:0,oi(t,e,Co))}function ut(t,e){return t??e}function oi(t,e,o){let n=o.min,r=o.max,c=ut(n.pad,0),f=ut(r.pad,0),d=ut(n.hard,-Z),p=ut(r.hard,Z),m=ut(n.soft,Z),b=ut(r.soft,-Z),x=ut(n.mode,0),w=ut(r.mode,0),W=e-t,A=El(W),z=zt(Nt(t),Nt(e)),I=El(z),O=Nt(I-A);(1e-9>W||O>10)&&(W=0,0!=t&&0!=e||(W=1e-9,2==x&&m!=Z&&(c=0),2==w&&b!=-Z&&(f=0)));let G=W||z||1e3,k=El(G),B=ne(10,dl(k)),M=ct(di(t-G*(0==W?0==t?.1:1:c),B/10),9),E=m>t||1!=x&&(3!=x||M>m)&&(2!=x||m>M)?Z:m,D=zt(d,E>M&&t>=E?E:Jt(E,M)),j=ct(oe(e+G*(0==W?0==e?.1:1:f),B/10),9),U=e>b||1!=w&&(3!=w||b>j)&&(2!=w||j>b)?-Z:b,R=Jt(p,j>U&&U>=e?U:zt(U,j));return D==R&&0==D&&(R=100),[D,R]}const Yo=new Intl.NumberFormat(yl?je.language:"en-US"),bn=t=>Yo.format(t),rl=Math,Ve=rl.PI,Nt=rl.abs,dl=rl.floor,Rt=rl.round,Xe=rl.ceil,Jt=rl.min,zt=rl.max,ne=rl.pow,si=rl.sign,El=rl.log10,ri=rl.log2,vn=(t,e=1)=>rl.asinh(t/e),Z=1/0;function ai(t){return 1+(0|El((t^t>>31)-(t>>31)))}function ui(t,e,o){return Jt(zt(t,e),o)}function $(t){return"function"==typeof t?t:()=>t}const Ho=t=>t,fi=(t,e)=>e,Oo=()=>null,ci=()=>!0,hi=(t,e)=>t==e,ie=t=>ct(t,14);function jl(t,e){return ie(ct(ie(t/e))*e)}function oe(t,e){return ie(Xe(ie(t/e))*e)}function di(t,e){return ie(dl(ie(t/e))*e)}function ct(t,e=0){if(Fo(t))return t;let o=10**e;return Rt(t*o*(1+Number.EPSILON))/o}const Je=new Map;function Ro(t){return((""+t).split(".")[1]||"").length}function ze(t,e,o,n){let r=[],c=n.map(Ro);for(let f=e;o>f;f++){let d=Nt(f),p=ct(ne(t,f),d);for(let m=0;n.length>m;m++){let b=n[m]*p,x=(0>b||0>f?d:0)+(c[m]>f?c[m]:0),w=ct(b,x);r.push(w),Je.set(w,x)}}return r}const Ee={},pi=[],se=[null,null],Gl=Array.isArray,Fo=Number.isInteger;function mi(t){return"string"==typeof t}function Ke(t){let e=!1;if(null!=t){let o=t.constructor;e=null==o||o==Object}return e}function gi(t){return null!=t&&"object"==typeof t}const Io=Object.getPrototypeOf(Uint8Array);function Ul(t,e=Ke){let o;if(Gl(t)){let n=t.find(r=>null!=r);if(Gl(n)||e(n)){o=Array(t.length);for(let r=0;t.length>r;r++)o[r]=Ul(t[r],e)}else o=t.slice()}else if(t instanceof Io)o=t.slice();else if(e(t)){o={};for(let n in t)o[n]=Ul(t[n],e)}else o=t;return o}function St(t){let e=arguments;for(let o=1;e.length>o;o++){let n=e[o];for(let r in n)Ke(t[r])?St(t[r],Ul(n[r])):t[r]=Ul(n[r])}return t}function Bo(t,e,o){for(let n,r=0,c=-1;e.length>r;r++){let f=e[r];if(f>c){for(n=f-1;n>=0&&null==t[n];)t[n--]=null;for(n=f+1;o>n&&null==t[n];)t[c=n++]=null}}}const Lo=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask,xi=["January","February","March","April","May","June","July","August","September","October","November","December"],wi=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function bi(t){return t.slice(0,3)}const No=wi.map(bi),jo=xi.map(bi),Go={MMMM:xi,MMM:jo,WWWW:wi,WWW:No};function De(t){return(10>t?"0":"")+t}const Uo={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>De(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>De(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>De(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return 0==e?12:e>12?e-12:e},AA:t=>12>t.getHours()?"AM":"PM",aa:t=>12>t.getHours()?"am":"pm",a:t=>12>t.getHours()?"a":"p",mm:t=>De(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>De(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>{return(10>(e=t.getMilliseconds())?"00":100>e?"0":"")+e;var e}};function yn(t,e){e=e||Go;let o,n=[],r=/\{([a-z]+)\}|[^{]+/gi;for(;o=r.exec(t);)n.push("{"==o[0][0]?Uo[o[1]]:o[0]);return c=>{let f="";for(let d=0;n.length>d;d++)f+="string"==typeof n[d]?n[d]:n[d](c,e);return f}}const Vo=(new Intl.DateTimeFormat).resolvedOptions().timeZone,vi=t=>t%1==0,Ze=[1,2,2.5,5],Xo=ze(10,-16,0,Ze),yi=ze(10,0,16,Ze),Jo=yi.filter(vi),Ko=Xo.concat(yi),ki="\n{YYYY}",Si="{M}/{D}",Te="\n"+Si,$e=Te+"/{YY}",re="{h}:{mm}{aa}",zi="\n"+re,ft=null;function Di(t){let e=1e3*t,o=60*e,n=60*o,r=24*n,c=30*r,f=365*r;return[(1==t?ze(10,0,3,Ze).filter(vi):ze(10,-3,0,Ze)).concat([e,5*e,10*e,15*e,30*e,o,5*o,10*o,15*o,30*o,n,2*n,3*n,4*n,6*n,8*n,12*n,r,2*r,3*r,4*r,5*r,6*r,7*r,8*r,9*r,10*r,15*r,c,2*c,3*c,4*c,6*c,f,2*f,5*f,10*f,25*f,50*f,100*f]),[[f,"{YYYY}",ft,ft,ft,ft,ft,ft,1],[28*r,"{MMM}",ki,ft,ft,ft,ft,ft,1],[r,Si,ki,ft,ft,ft,ft,ft,1],[n,"{h}{aa}",$e,ft,Te,ft,ft,ft,1],[o,re,$e,ft,Te,ft,ft,ft,1],[e,":{ss}",$e+" "+re,ft,Te+" "+re,ft,zi,ft,1],[t,":{ss}.{fff}",$e+" "+re,ft,Te+" "+re,ft,zi,ft,1]],function(d){return(p,m,b,x,w,W)=>{let A=[],z=w>=f,I=w>=c&&f>w,O=d(b),G=ct(O*t,3),k=_n(O.getFullYear(),z?0:O.getMonth(),I||z?1:O.getDate()),B=ct(k*t,3);if(I||z){let M=I?w/c:0,E=z?w/f:0,D=G==B?G:ct(_n(k.getFullYear()+E,k.getMonth()+M,1)*t,3),j=new Date(Rt(D/t)),U=j.getFullYear(),R=j.getMonth();for(let T=0;x>=D;T++){let F=_n(U+E*T,R+M*T,1),nt=F-d(ct(F*t,3));D=ct((+F+nt)*t,3),D>x||A.push(D)}}else{let M=r>w?w:r,E=B+(dl(b)-dl(G))+oe(G-B,M);A.push(E);let D=d(E),j=D.getHours()+D.getMinutes()/o+D.getSeconds()/n,U=w/n,R=W/p.axes[m]._space;for(;E=ct(E+w,1==t?0:3),x>=E;)if(U>1){let T=dl(ct(j+U,6))%24,F=d(E).getHours()-T;F>1&&(F=-1),E-=F*n,j=(j+U)%24,.7>ct((E-A[A.length-1])/w,3)*R||A.push(E)}else A.push(E)}return A}}]}const[Zo,$o,qo]=Di(1),[Qo,ts,ls]=Di(.001);function Ti(t,e){return t.map(o=>o.map((n,r)=>0==r||8==r||null==n?n:e(1==r||0==o[8]?n:o[1]+n)))}function Pi(t,e){return(o,n,r,c,f)=>{let d,p,m,b,x,w,W=e.find(A=>f>=A[0])||e[e.length-1];return n.map(A=>{let z=t(A),I=z.getFullYear(),O=z.getMonth(),G=z.getDate(),k=z.getHours(),B=z.getMinutes(),M=z.getSeconds(),E=I!=d&&W[2]||O!=p&&W[3]||G!=m&&W[4]||k!=b&&W[5]||B!=x&&W[6]||M!=w&&W[7]||W[1];return d=I,p=O,m=G,b=k,x=B,w=M,E(z)})}}function _n(t,e,o){return new Date(t,e,o)}function Ai(t,e){return e(t)}function Wi(t,e){return(o,n,r,c)=>null==c?Pl:e(t(n))}ze(2,-53,53,[1]);const es={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(t,e){let o=t.series[e];return o.width?o.stroke(t,e):o.points.width?o.points.stroke(t,e):null},fill:function(t,e){return t.series[e].fill(t,e)},dash:"solid"},idx:null,idxs:null,values:[]},kn=[0,0];function qe(t,e,o){return n=>{0==n.button&&o(n)}}function Sn(t,e,o){return o}const ns={show:!0,x:!0,y:!0,lock:!1,move:function(t,e,o){return kn[0]=e,kn[1]=o,kn},points:{show:function(t,e){let o=t.cursor.points,n=hl(),r=o.size(t,e);gt(n,J,r),gt(n,Vt,r);let c=r/-2;gt(n,"marginLeft",c),gt(n,"marginTop",c);let f=o.width(t,e,r);return f&>(n,"borderWidth",f),n},size:function(t,e){return t.series[e].points.size},width:0,stroke:function(t,e){let o=t.series[e].points;return o._stroke||o._fill},fill:function(t,e){let o=t.series[e].points;return o._fill||o._stroke}},bind:{mousedown:qe,mouseup:qe,click:qe,dblclick:qe,mousemove:Sn,mouseleave:Sn,mouseenter:Sn},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{prox:-1,bias:0},left:-10,top:-10,idx:null,dataIdx:function(t,e,o){return o},idxs:null},Ci={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Mn=St({},Ci,{filter:fi}),Yi=St({},Mn,{size:10}),Hi=St({},Ci,{show:!1}),zn='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Oi="bold "+zn,Ri={show:!0,scale:"x",stroke:ol,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Oi,side:2,grid:Mn,ticks:Yi,border:Hi,font:zn,rotate:0},Fi={show:!0,scale:"x",auto:!1,sorted:1,min:Z,max:-Z,idxs:[]};function is(t,e){return e.map(o=>null==o?"":bn(o))}function os(t,e,o,n,r,c,f){let d=[],p=Je.get(r)||0;for(let m=o=f?o:ct(oe(o,r),p);n>=m;m=ct(m+r,p))d.push(Object.is(m,-0)?0:m);return d}function En(t,e,o,n,r){const c=[],f=t.scales[t.axes[e].scale].log,d=dl((10==f?El:ri)(o));r=ne(f,d),10==f&&0>d&&(r=ct(r,-d));let p=o;do{c.push(p),p+=r,10==f&&(p=ct(p,Je.get(r))),r*f>p||(r=p)}while(n>=p);return c}function ss(t,e,o,n,r){let c=t.scales[t.axes[e].scale].asinh,f=n>c?En(t,e,zt(c,o),n,r):[c],d=0>n||o>0?[]:[0];return(-c>o?En(t,e,zt(c,-n),-o,r):[c]).reverse().map(p=>-p).concat(d,f)}const rs=/./,as=/[12357]/,us=/[125]/,fs=/1/;function cs(t,e,o){let n=t.axes[o],r=n.scale,c=t.scales[r];if(3==c.distr&&2==c.log)return e;let f=t.valToPos,d=n._space,p=f(10,r),m=f(9,r)-p<d?f(7,r)-p<d?f(5,r)-p<d?fs:us:as:rs;return e.map(b=>4==c.distr&&0==b||m.test(b)?b:null)}function hs(t,e,o,n){return null==n?Pl:null==e?"":bn(e)}const Ii={show:!0,scale:"y",stroke:ol,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Oi,side:3,grid:Mn,ticks:Yi,border:Hi,font:zn,rotate:0},Bi={scale:null,auto:!0,sorted:0,min:Z,max:-Z},Li=(t,e,o,n,r)=>r,Ni={show:!0,auto:!0,sorted:0,gaps:Li,alpha:1,facets:[St({},Bi,{scale:"x"}),St({},Bi,{scale:"y"})]},ji={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Li,alpha:1,points:{show:function(t,e){let{scale:o,idxs:n}=t.series[0],r=t._data[0],c=t.valToPos(r[n[0]],o,!0),f=t.valToPos(r[n[1]],o,!0);return Nt(f-c)/(t.series[e].points.space*K)>=n[1]-n[0]},filter:null},values:null,min:Z,max:-Z,idxs:[],path:null,clip:null};function ds(t,e,o){return o/10}const Gi={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},ps=St({},Gi,{time:!1,ori:1}),Ui={};function Vi(t){let e=Ui[t];return e||(e={key:t,plots:[],sub(o){e.plots.push(o)},unsub(o){e.plots=e.plots.filter(n=>n!=o)},pub(o,n,r,c,f,d,p){for(let m=0;e.plots.length>m;m++)e.plots[m]!=n&&e.plots[m].pub(o,n,r,c,f,d,p)}},null!=t&&(Ui[t]=e)),e}function Vl(t,e,o){const n=t.mode,r=t.series[e],c=2==n?t._data[e]:t._data,f=t.scales,d=t.bbox;let p=c[0],m=2==n?c[1]:c[e],b=2==n?f[r.facets[0].scale]:f[t.series[0].scale],x=2==n?f[r.facets[1].scale]:f[r.scale],w=d.left,W=d.top,A=d.width,z=d.height,I=t.valToPosH,O=t.valToPosV;return 0==b.ori?o(r,p,m,b,x,I,O,w,W,A,z,ln,ae,nn,Ki,$i):o(r,p,m,b,x,O,I,W,w,z,A,en,ue,Tn,Zi,qi)}function Qe(t,e){let o=0,n=0,r=ut(t.bands,pi);for(let c=0;r.length>c;c++){let f=r[c];f.series[0]==e?o=f.dir:f.series[1]==e&&(n|=1==f.dir?1:2)}return[o,1==n?-1:2==n?1:3==n?2:0]}function ms(t,e,o,n,r){let c=t.series[e],f=t.scales[2==t.mode?c.facets[1].scale:c.scale];return-1==r?f.min:1==r?f.max:3==f.distr?1==f.dir?f.min:f.max:0}function Dl(t,e,o,n,r,c){return Vl(t,e,(f,d,p,m,b,x,w,W,A,z,I)=>{let O=f.pxRound;const G=0==m.ori?ae:ue;let k,B;m.dir*(0==m.ori?1:-1)==1?(k=o,B=n):(k=n,B=o);let M=O(x(d[k],m,z,W)),E=O(w(p[k],b,I,A)),D=O(x(d[B],m,z,W)),j=O(w(1==c?b.max:b.min,b,I,A)),U=new Path2D(r);return G(U,D,j),G(U,M,j),G(U,M,E),U})}function tn(t,e,o,n,r,c){let f=null;if(t.length>0){f=new Path2D;const d=0==e?nn:Tn;let p=o;for(let b=0;t.length>b;b++){let x=t[b];if(x[1]>x[0]){let w=x[0]-p;w>0&&d(f,p,n,w,n+c),p=x[1]}}let m=o+r-p;m>0&&d(f,p,n,m,n+c)}return f}function Dn(t,e,o,n,r,c,f){let d=[],p=t.length;for(let m=1==r?o:n;m>=o&&n>=m;m+=r)if(null===e[m]){let b=m,x=m;if(1==r)for(;++m<=n&&null===e[m];)x=m;else for(;--m>=o&&null===e[m];)x=m;let w=c(t[b]),W=x==b?w:c(t[x]),A=b-r;w=f>0||0>A||A>=p?w:c(t[A]);let z=x+r;W=0>f||0>z||z>=p?W:c(t[z]),w>W||d.push([w,W])}return d}function Xi(t){return 0==t?Ho:1==t?Rt:e=>jl(e,t)}function Ji(t){let e=0==t?ln:en,o=0==t?(r,c,f,d,p,m)=>{r.arcTo(c,f,d,p,m)}:(r,c,f,d,p,m)=>{r.arcTo(f,c,p,d,m)},n=0==t?(r,c,f,d,p)=>{r.rect(c,f,d,p)}:(r,c,f,d,p)=>{r.rect(f,c,p,d)};return(r,c,f,d,p,m=0,b=0)=>{0==m&&0==b?n(r,c,f,d,p):(m=Jt(m,d/2,p/2),b=Jt(b,d/2,p/2),e(r,c+m,f),o(r,c+d,f,c+d,f+p,m),o(r,c+d,f+p,c,f+p,b),o(r,c,f+p,c,f,b),o(r,c,f,c+d,f,m),r.closePath())}}const ln=(t,e,o)=>{t.moveTo(e,o)},en=(t,e,o)=>{t.moveTo(o,e)},ae=(t,e,o)=>{t.lineTo(e,o)},ue=(t,e,o)=>{t.lineTo(o,e)},nn=Ji(0),Tn=Ji(1),Ki=(t,e,o,n,r,c)=>{t.arc(e,o,n,r,c)},Zi=(t,e,o,n,r,c)=>{t.arc(o,e,n,r,c)},$i=(t,e,o,n,r,c,f)=>{t.bezierCurveTo(e,o,n,r,c,f)},qi=(t,e,o,n,r,c,f)=>{t.bezierCurveTo(o,e,r,n,f,c)};function Qi(){return(t,e,o,n,r)=>Vl(t,e,(c,f,d,p,m,b,x,w,W,A,z)=>{let I,O,{pxRound:G,points:k}=c;0==p.ori?(I=ln,O=Ki):(I=en,O=Zi);const B=ct(k.width*K,3);let M=(k.size-k.width)/2*K,E=ct(2*M,3),D=new Path2D,j=new Path2D,{left:U,top:R,width:T,height:F}=t.bbox;nn(j,U-E,R-E,T+2*E,F+2*E);const nt=tt=>{if(null!=d[tt]){let q=G(b(f[tt],p,A,w)),dt=G(x(d[tt],m,z,W));I(D,q+M,dt),O(D,q,dt,M,0,2*Ve)}};if(r)r.forEach(nt);else for(let tt=o;n>=tt;tt++)nt(tt);return{stroke:B>0?D:null,fill:D,clip:j,flags:3}})}function to(t){return(e,o,n,r,c,f)=>{n!=r&&(c!=n&&f!=n&&t(e,o,n),c!=r&&f!=r&&t(e,o,r),t(e,o,f))}}const gs=to(ae),xs=to(ue);function lo(t){const e=ut(t?.alignGaps,0);return(o,n,r,c)=>Vl(o,n,(f,d,p,m,b,x,w,W,A,z,I)=>{let O,G,k=f.pxRound,B=Y=>k(x(Y,m,z,W)),M=Y=>k(w(Y,b,I,A));0==m.ori?(O=ae,G=gs):(O=ue,G=xs);const E=m.dir*(0==m.ori?1:-1),D={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},j=D.stroke;let U,R,T,F=Z,nt=-Z,tt=B(d[1==E?r:c]),q=ee(p,r,c,1*E),dt=ee(p,r,c,-1*E),Kt=B(d[q]),Zt=B(d[dt]),N=!1;for(let Y=1==E?r:c;Y>=r&&c>=Y;Y+=E){let pt=B(d[Y]),it=p[Y];pt==tt?null!=it?(R=M(it),F==Z&&(O(j,pt,R),U=R),F=Jt(R,F),nt=zt(R,nt)):null===it&&(N=!0):(F!=Z&&(G(j,tt,F,nt,U,R),T=tt),null!=it?(R=M(it),O(j,pt,R),F=nt=U=R):(F=Z,nt=-Z,null===it&&(N=!0)),tt=pt)}F!=Z&&F!=nt&&T!=tt&&G(j,tt,F,nt,U,R);let[Tt,X]=Qe(o,n);if(null!=f.fill||0!=Tt){let Y=D.fill=new Path2D(j),pt=M(f.fillTo(o,n,f.min,f.max,Tt));O(Y,Zt,pt),O(Y,Kt,pt)}if(!f.spanGaps){let Y=[];N&&Y.push(...Dn(d,p,r,c,E,B,e)),D.gaps=Y=f.gaps(o,n,r,c,Y),D.clip=tn(Y,m.ori,W,A,z,I)}return 0!=X&&(D.band=2==X?[Dl(o,n,r,c,j,-1),Dl(o,n,r,c,j,1)]:Dl(o,n,r,c,j,X)),D})}function ws(t,e,o,n,r){const c=t.length;if(2>c)return null;const f=new Path2D;if(o(f,t[0],e[0]),2==c)n(f,t[1],e[1]);else{let d=Array(c),p=Array(c-1),m=Array(c-1),b=Array(c-1);for(let x=0;c-1>x;x++)m[x]=e[x+1]-e[x],b[x]=t[x+1]-t[x],p[x]=m[x]/b[x];d[0]=p[0];for(let x=1;c-1>x;x++)0===p[x]||0===p[x-1]||p[x-1]>0!=p[x]>0?d[x]=0:(d[x]=3*(b[x-1]+b[x])/((2*b[x]+b[x-1])/p[x-1]+(b[x]+2*b[x-1])/p[x]),isFinite(d[x])||(d[x]=0));d[c-1]=p[c-2];for(let x=0;c-1>x;x++)r(f,t[x]+b[x]/3,e[x]+d[x]*b[x]/3,t[x+1]-b[x]/3,e[x+1]-d[x+1]*b[x]/3,t[x+1],e[x+1])}return f}const Pn=new Set;function eo(){for(let t of Pn)t.syncRect(!0)}yl&&(Al("resize",zl,eo),Al("scroll",zl,eo,!0),Al(Il,zl,()=>{jt.pxRatio=K}));const bs=lo(),vs=Qi();function no(t,e,o,n){return(n?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((r,c)=>An(r,c,e,o))}function An(t,e,o,n){return St({},0==e?o:n,t)}function io(t,e,o){return null==e?se:[e,o]}const ys=io;function _s(t,e,o){return null==e?se:Ue(e,o,.1,!0)}function oo(t,e,o,n){return null==e?se:Ge(e,o,t.scales[n].log,!1)}const ks=oo;function so(t,e,o,n){return null==e?se:wn(e,o,t.scales[n].log,!1)}const Ss=so;function ro(t){let e,o;return[t=t.replace(/(\d+)px/,(n,r)=>(e=Rt((o=+r)*K))+"px"),e,o]}function zs(t){t.show&&[t.font,t.labelFont].forEach(e=>{let o=ct(e[2]*K,1);e[0]=e[0].replace(/[0-9.]+px/,o+"px"),e[1]=o})}function jt(t,e,o){const n={mode:ut(t.mode,1)},r=n.mode;function c(l,i){return((3==i.distr?El(l>0?l:i.clamp(n,l,i.min,i.max,i.key)):4==i.distr?vn(l,i.asinh):l)-i._min)/(i._max-i._min)}function f(l,i,s,a){let u=c(l,i);return a+s*(-1==i.dir?1-u:u)}function d(l,i,s,a){let u=c(l,i);return a+s*(-1==i.dir?u:1-u)}function p(l,i,s,a){return 0==i.ori?f(l,i,s,a):d(l,i,s,a)}n.valToPosH=f,n.valToPosV=d;let m=!1;n.status=0;const b=n.root=hl("uplot");null!=t.id&&(b.id=t.id),Ot(b,t.class),t.title&&(hl("u-title",b).textContent=t.title);const x=sl("canvas"),w=n.ctx=x.getContext("2d"),W=hl("u-wrap",b);Al("click",W,l=>{(wt!=me||bt!=ge)&&Ft.click(n,l)},!0);const A=n.under=hl("u-under",W);W.appendChild(x);const z=n.over=hl("u-over",W),I=+ut((t=Ul(t)).pxAlign,1),O=Xi(I);(t.plugins||[]).forEach(l=>{l.opts&&(t=l.opts(n,t)||t)});const G=t.ms||.001,k=n.series=1==r?no(t.series||[],Fi,ji,!1):(i=Ni,(t.series||[null]).map((s,a)=>0==a?null:St({},i,s))),B=n.axes=no(t.axes||[],Ri,Ii,!0),M=n.scales={},E=n.bands=t.bands||[];var i;E.forEach(l=>{l.fill=$(l.fill||null),l.dir=ut(l.dir,-1)});const D=2==r?k[1].facets[0].scale:k[0].scale,j={axes:function(){for(let l=0;B.length>l;l++){let i=B[l];if(!i.show||!i._show)continue;let s,a,u=i.side,h=u%2,g=i.stroke(n,l),_=0==u||3==u?-1:1;if(i.label){let Qt=Rt((i._lpos+i.labelGap*_)*K);po(i.labelFont[0],g,"center",2==u?Dt:"bottom"),w.save(),1==h?(s=a=0,w.translate(Qt,Rt(kt+$t/2)),w.rotate((3==u?-Ve:Ve)/2)):(s=Rt(Q+Pt/2),a=Qt),w.fillText(i.label,s,a),w.restore()}let[y,v]=i._found;if(0==v)continue;let S=M[i.scale],P=0==h?Pt:$t,et=0==h?Q:kt,H=Rt(i.gap*K),C=i._splits,st=2==S.distr?C.map(Qt=>vl[Qt]):C,V=2==S.distr?vl[C[1]]-vl[C[0]]:y,rt=i.ticks,vt=i.border,yt=rt.show?Rt(rt.size*K):0,xt=i._rotate*-Ve/180,mt=O(i._pos*K),Mt=mt+(yt+H)*_;a=0==h?Mt:0,s=1==h?Mt:0,po(i.font[0],g,1==i.align?Xt:2==i.align?il:xt>0?Xt:0>xt?il:0==h?"center":3==u?il:Xt,xt||1==h?"middle":2==u?Dt:"bottom");let qt=1.5*i.font[1],nl=C.map(Qt=>O(p(Qt,S,P,et))),Lt=i._values;for(let Qt=0;Lt.length>Qt;Qt++){let Sl=Lt[Qt];if(null!=Sl){0==h?s=nl[Qt]:a=nl[Qt],Sl=""+Sl;let mn=-1==Sl.indexOf("\n")?[Sl]:Sl.split(/\n/gm);for(let cl=0;mn.length>cl;cl++){let Le=mn[cl];xt?(w.save(),w.translate(s,a+cl*qt),w.rotate(xt),w.fillText(Le,0,0),w.restore()):w.fillText(Le,s,a+cl*qt)}}}rt.show&&jn(nl,rt.filter(n,st,l,v,V),h,u,mt,yt,ct(rt.width*K,3),rt.stroke(n,l),rt.dash,rt.cap);let Rl=i.grid;Rl.show&&jn(nl,Rl.filter(n,st,l,v,V),h,0==h?2:1,0==h?kt:Q,0==h?$t:Pt,ct(Rl.width*K,3),Rl.stroke(n,l),Rl.dash,Rl.cap),vt.show&&jn([mt],[1],0==h?1:0,0==h?1:2,1==h?kt:Q,1==h?$t:Pt,ct(vt.width*K,3),vt.stroke(n,l),vt.dash,vt.cap)}It("drawAxes")},series:function(){At>0&&(k.forEach((l,i)=>{if(i>0&&l.show&&null==l._paths){let s=2==r?[0,e[i][0].length-1]:function(a){let u=ui(Wt-1,0,At-1),h=ui(Ct+1,0,At-1);for(;null==a[u]&&u>0;)u--;for(;null==a[h]&&At-1>h;)h++;return[u,h]}(e[i]);l._paths=l.paths(n,i,s[0],s[1])}}),k.forEach((l,i)=>{if(i>0&&l.show){Ce!=l.alpha&&(w.globalAlpha=Ce=l.alpha),mo(i,!1),l._paths&&go(i,!1);{mo(i,!0);let s=l._paths?l._paths.gaps:null,a=l.points.show(n,i,Wt,Ct,s),u=l.points.filter(n,i,a,s);(a||u)&&(l.points._paths=l.points.paths(n,i,Wt,Ct,u),go(i,!0))}1!=Ce&&(w.globalAlpha=Ce=1),It("drawSeries",i)}}))}},U=(t.drawOrder||["axes","series"]).map(l=>j[l]);function R(l){let i=M[l];if(null==i){let s=(t.scales||Ee)[l]||Ee;if(null!=s.from)R(s.from),M[l]=St({},M[s.from],s,{key:l});else{i=M[l]=St({},l==D?Gi:ps,s),i.key=l;let a=i.time,u=i.range,h=Gl(u);if((l!=D||2==r&&!a)&&(!h||null!=u[0]&&null!=u[1]||(u={min:null==u[0]?ii:{mode:1,hard:u[0],soft:u[0]},max:null==u[1]?ii:{mode:1,hard:u[1],soft:u[1]}},h=!1),!h&&Ke(u))){let g=u;u=(_,y,v)=>null==y?se:Ue(y,v,g)}i.range=$(u||(a?ys:l==D?3==i.distr?ks:4==i.distr?Ss:io:3==i.distr?oo:4==i.distr?so:_s)),i.auto=$(!h&&i.auto),i.clamp=$(i.clamp||ds),i._min=i._max=null}}}R("x"),R("y"),1==r&&k.forEach(l=>{R(l.scale)}),B.forEach(l=>{R(l.scale)});for(let l in t.scales)R(l);const T=M[D],F=T.distr;let nt,tt;0==T.ori?(Ot(b,"u-hz"),nt=f,tt=d):(Ot(b,"u-vt"),nt=d,tt=f);const q={};for(let l in M){let i=M[l];null==i.min&&null==i.max||(q[l]={min:i.min,max:i.max},i.min=i.max=null)}const dt=t.tzDate||(l=>new Date(Rt(l/G))),Kt=t.fmtDate||yn,Zt=1==G?qo(dt):ls(dt),N=Pi(dt,Ti(1==G?$o:ts,Kt)),Tt=Wi(dt,Ai("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",Kt)),X=[],Y=n.legend=St({},es,t.legend),pt=Y.show,it=Y.markers;let Gt;Y.idxs=X,it.width=$(it.width),it.dash=$(it.dash),it.stroke=$(it.stroke),it.fill=$(it.fill);let _t,wl=[],Cl=[],pl=!1,Yl={};if(Y.live){const l=k[1]?k[1].values:null;pl=null!=l,_t=pl?l(n,1,0):{_:0};for(let i in _t)Yl[i]=Pl}if(pt)if(Gt=sl("table","u-legend",b),Y.mount(n,Gt),pl){let l=sl("tr","u-thead",Gt);for(var fe in sl("th",null,l),_t)sl("th",ye,l).textContent=fe}else Ot(Gt,"u-inline"),Y.live&&Ot(Gt,"u-live");const ce={show:!0},Pe={show:!1},bl=new Map;function ml(l,i,s){const a=bl.get(i)||{},u=L.bind[l](n,i,s);u&&(Al(l,i,a[l]=u),bl.set(i,a))}function he(l,i){const s=bl.get(i)||{};for(let a in s)null!=l&&a!=l||(xn(a,i,s[a]),delete s[a]);null==l&&bl.delete(i)}let de=0,Xl=0,ot=0,lt=0,al=0,ul=0,Q=0,kt=0,Pt=0,$t=0;n.bbox={};let tl=!1,gl=!1,Et=!1,fl=!1,Jl=!1,Ut=!1;function Wn(l,i,s){(s||l!=n.width||i!=n.height)&&ao(l,i),Ye(!1),Et=!0,gl=!0,0>L.left||(fl=Ut=!0),$l()}function ao(l,i){n.width=de=ot=l,n.height=Xl=lt=i,al=ul=0,function(){let a=!1,u=!1,h=!1,g=!1;B.forEach(_=>{if(_.show&&_._show){let{side:y,_size:v}=_,S=v+(null!=_.label?_.labelSize:0);S>0&&(y%2?(ot-=S,3==y?(al+=S,g=!0):h=!0):(lt-=S,0==y?(ul+=S,a=!0):u=!0))}}),Zl[0]=a,Zl[1]=h,Zl[2]=u,Zl[3]=g,ot-=Hl[1]+Hl[3],al+=Hl[3],lt-=Hl[2]+Hl[0],ul+=Hl[0]}(),function(){let a=al+ot,u=ul+lt,h=al,g=ul;function _(y,v){switch(y){case 1:return a+=v,a-v;case 2:return u+=v,u-v;case 3:return h-=v,h+v;case 0:return g-=v,g+v}}B.forEach(y=>{if(y.show&&y._show){let v=y.side;y._pos=_(v,y._size),null!=y.label&&(y._lpos=_(v,y.labelSize))}})}();let s=n.bbox;Q=s.left=jl(al*K,.5),kt=s.top=jl(ul*K,.5),Pt=s.width=jl(ot*K,.5),$t=s.height=jl(lt*K,.5)}n.setSize=function({width:l,height:i}){Wn(l,i)};const L=n.cursor=St({},ns,{drag:{y:2==r}},t.cursor);{L.idxs=X,L._lock=!1;let l=L.points;l.show=$(l.show),l.size=$(l.size),l.stroke=$(l.stroke),l.width=$(l.width),l.fill=$(l.fill)}const Kl=n.focus=St({},t.focus||{alpha:.3},L.focus);0!=Kl.bias&&(Kl.prox=1e5);const Ae=Kl.prox>=0;let ll=[null];function uo(l,i){if(1==r||i>0){let s=1==r&&M[l.scale].time,a=l.value;l.value=s?mi(a)?Wi(dt,Ai(a,Kt)):a||Tt:a||hs,l.label=l.label||(s?"Time":"Value")}if(i>0){l.width=null==l.width?1:l.width,l.paths=l.paths||bs||Oo,l.fillTo=$(l.fillTo||ms),l.pxAlign=+ut(l.pxAlign,I),l.pxRound=Xi(l.pxAlign),l.stroke=$(l.stroke||null),l.fill=$(l.fill||null),l._stroke=l._fill=l._paths=l._focus=null;let s=ct(1*(3+2*(zt(1,l.width)||1)),3),a=l.points=St({},{size:s,width:zt(1,.2*s),stroke:l.stroke,space:2*s,paths:vs,_stroke:null,_fill:null},l.points);a.show=$(a.show),a.filter=$(a.filter),a.fill=$(a.fill),a.stroke=$(a.stroke),a.paths=$(a.paths),a.pxAlign=l.pxAlign}if(pt){let s=function(a,u){if(0==u&&(pl||!Y.live||2==r))return se;let h=[],g=sl("tr","u-series",Gt,Gt.childNodes[u]);Ot(g,a.class),a.show||Ot(g,xl);let _=sl("th",null,g);if(it.show){let S=hl("u-marker",_);if(u>0){let P=it.width(n,u);P&&(S.style.border=P+"px "+it.dash(n,u)+" "+it.stroke(n,u)),S.style.background=it.fill(n,u)}}let y=hl(ye,_);for(var v in y.textContent=a.label,u>0&&(it.show||(y.style.color=a.width>0?it.stroke(n,u):it.fill(n,u)),ml("click",_,S=>{if(L._lock)return;let P=k.indexOf(a);if((S.ctrlKey||S.metaKey)!=Y.isolate){let et=k.some((H,C)=>C>0&&C!=P&&H.show);k.forEach((H,C)=>{C>0&&_l(C,et?C==P?ce:Pe:ce,!0,Bt.setSeries)})}else _l(P,{show:!a.show},!0,Bt.setSeries)}),Ae&&ml(te,_,()=>{L._lock||_l(k.indexOf(a),we,!0,Bt.setSeries)})),_t){let S=sl("td","u-value",g);S.textContent="--",h.push(S)}return[g,h]}(l,i);wl.splice(i,0,s[0]),Cl.splice(i,0,s[1]),Y.values.push(null)}if(L.show){X.splice(i,0,null);let s=function(a,u){if(u>0){let h=L.points.show(n,u);if(h)return Ot(h,"u-cursor-pt"),Ot(h,a.class),le(h,-10,-10,ot,lt),z.insertBefore(h,ll[u]),h}}(l,i);s&&ll.splice(i,0,s)}It("addSeries",i)}n.addSeries=function(l,i){i=i??k.length,l=1==r?An(l,i,Fi,ji):An(l,i,null,Ni),k.splice(i,0,l),uo(k[i],i)},n.delSeries=function(l){if(k.splice(l,1),pt){Y.values.splice(l,1),Cl.splice(l,1);let i=wl.splice(l,1)[0];he(null,i.firstChild),i.remove()}L.show&&(X.splice(l,1),ll.length>1&&ll.splice(l,1)[0].remove()),It("delSeries",l)};const Zl=[!1,!1,!1,!1];function We(l,i,s){let[a,u,h,g]=s,_=i%2,y=0;return 0==_&&(g||u)&&(y=0==i&&!a||2==i&&!h?Rt(Ri.size/3):0),1==_&&(a||h)&&(y=1==i&&!u||3==i&&!g?Rt(Ii.size/2):0),y}const fo=n.padding=(t.padding||[We,We,We,We]).map(l=>$(ut(l,We))),Hl=n._padding=fo.map((l,i)=>l(n,i,Zl,0));let At,Wt=null,Ct=null;const on=1==r?k[0].idxs:null;let sn,pe,Cn,Yn,Hn,On,Rn,Fn,In,Ce,vl=null,rn=!1;function co(l,i){if(e=null==l?[]:Ul(l,gi),2==r){At=0;for(let s=1;k.length>s;s++)At+=e[s][0].length;n.data=e=l}else if(null==e[0]&&(e[0]=[]),n.data=e.slice(),vl=e[0],At=vl.length,2==F){e[0]=Array(At);for(let s=0;At>s;s++)e[0][s]=s}if(n._data=e,Ye(!0),It("setData"),2==F&&(Et=!0),!1!==i){let s=T;s.auto(n,rn)?Bn():xe(D,s.min,s.max),fl=L.left>=0,Ut=!0,$l()}}function Bn(){let l,i;rn=!0,1==r&&(At>0?(Wt=on[0]=0,Ct=on[1]=At-1,l=e[0][Wt],i=e[0][Ct],2==F?(l=Wt,i=Ct):1==At&&(3==F?[l,i]=Ge(l,l,T.log,!1):4==F?[l,i]=wn(l,l,T.log,!1):T.time?i=l+Rt(86400/G):[l,i]=Ue(l,i,.1,!0))):(Wt=on[0]=l=null,Ct=on[1]=i=null)),xe(D,l,i)}function ho(l,i,s,a,u,h){l??=Ml,s??=pi,a??="butt",u??=Ml,h??="round",l!=sn&&(w.strokeStyle=sn=l),u!=pe&&(w.fillStyle=pe=u),i!=Cn&&(w.lineWidth=Cn=i),h!=Hn&&(w.lineJoin=Hn=h),a!=On&&(w.lineCap=On=a),s!=Yn&&w.setLineDash(Yn=s)}function po(l,i,s,a){i!=pe&&(w.fillStyle=pe=i),l!=Rn&&(w.font=Rn=l),s!=Fn&&(w.textAlign=Fn=s),a!=In&&(w.textBaseline=In=a)}function Ln(l,i,s,a,u=0){if(a.length>0&&l.auto(n,rn)&&(null==i||null==i.min)){let h=ut(Wt,0),g=ut(Ct,a.length-1),_=null==s.min?3==l.distr?function(y,v,S){let P=Z,et=-Z;for(let H=v;S>=H;H++)y[H]>0&&(P=Jt(P,y[H]),et=zt(et,y[H]));return[P==Z?1:P,et==-Z?10:et]}(a,h,g):function(y,v,S,P){let et=Z,H=-Z;if(1==P)et=y[v],H=y[S];else if(-1==P)et=y[S],H=y[v];else for(let C=v;S>=C;C++)null!=y[C]&&(et=Jt(et,y[C]),H=zt(H,y[C]));return[et,H]}(a,h,g,u):[s.min,s.max];l.min=Jt(l.min,s.min=_[0]),l.max=zt(l.max,s.max=_[1])}}function mo(l,i){let s=i?k[l].points:k[l];s._stroke=s.stroke(n,l),s._fill=s.fill(n,l)}function go(l,i){let s=i?k[l].points:k[l],a=s._stroke,u=s._fill,{stroke:h,fill:g,clip:_,flags:y}=s._paths,v=null,S=ct(s.width*K,3),P=S%2/2;i&&null==u&&(u=S>0?"#fff":a);let et=1==s.pxAlign;if(et&&w.translate(P,P),!i){let H=Q,C=kt,st=Pt,V=$t,rt=S*K/2;0==s.min&&(V+=rt),0==s.max&&(C-=rt,V+=rt),v=new Path2D,v.rect(H,C,st,V)}i?Nn(a,S,s.dash,s.cap,u,h,g,y,_):function(H,C,st,V,rt,vt,yt,xt,mt,Mt,qt){let nl=!1;E.forEach((Lt,Rl)=>{if(Lt.series[0]==H){let Qt,Sl=k[Lt.series[1]],mn=e[Lt.series[1]],cl=(Sl._paths||Ee).band;Gl(cl)&&(cl=1==Lt.dir?cl[0]:cl[1]);let Le=null;Sl.show&&cl&&function(Po,Ne,Qn){for(Ne=ut(Ne,0),Qn=ut(Qn,Po.length-1);Qn>=Ne;){if(null!=Po[Ne])return!0;Ne++}return!1}(mn,Wt,Ct)?(Le=Lt.fill(n,Rl)||vt,Qt=Sl._paths.clip):cl=null,Nn(C,st,V,rt,Le,yt,xt,mt,Mt,qt,Qt,cl),nl=!0}}),nl||Nn(C,st,V,rt,vt,yt,xt,mt,Mt,qt)}(l,a,S,s.dash,s.cap,u,h,g,y,v,_),et&&w.translate(-P,-P)}function Nn(l,i,s,a,u,h,g,_,y,v,S,P){ho(l,i,s,a,u),(y||v||P)&&(w.save(),y&&w.clip(y),v&&w.clip(v)),P?3&~_?2&_?(un(u,g),w.clip(P),an(l,h,i)):1&_&&(w.save(),w.clip(P),S&&w.clip(S),un(u,g),w.restore(),an(l,h,i)):(w.clip(P),S&&w.clip(S),un(u,g),an(l,h,i)):(un(u,g),an(l,h,i)),(y||v||P)&&w.restore()}function an(l,i,s){s>0&&(i instanceof Map?i.forEach((a,u)=>{w.strokeStyle=sn=u,w.stroke(a)}):null!=i&&l&&w.stroke(i))}function un(l,i){i instanceof Map?i.forEach((s,a)=>{w.fillStyle=pe=a,w.fill(s)}):null!=i&&l&&w.fill(i)}function jn(l,i,s,a,u,h,g,_,y,v){let S=g%2/2;1==I&&w.translate(S,S),ho(_,g,y,v,_),w.beginPath();let P,et,H,C,st=u+(0==a||3==a?-h:h);0==s?(et=u,C=st):(P=u,H=st);for(let V=0;l.length>V;V++)null!=i[V]&&(0==s?P=H=l[V]:et=C=l[V],w.moveTo(P,et),w.lineTo(H,C));w.stroke(),1==I&&w.translate(-S,-S)}function Es(l){let i=!0;return B.forEach((s,a)=>{if(!s.show)return;let u=M[s.scale];if(null==u.min)return void(s._show&&(i=!1,s._show=!1,Ye(!1)));s._show||(i=!1,s._show=!0,Ye(!1));let h=s.side,g=h%2,{min:_,max:y}=u,[v,S]=function(V,rt,vt,yt){let xt,mt=B[V];if(yt>0){let Mt=mt._space=mt.space(n,V,rt,vt,yt);xt=function Ms(t,e,o,n,r){let c=zt(ai(t),ai(e)),f=e-t,d=Wl(r/n*f,o);do{let p=o[d],m=n*p/f;if(m>=r&&17>=c+(5>p?Je.get(p):0))return[p,m]}while(++d<o.length);return[0,0]}(rt,vt,mt._incrs=mt.incrs(n,V,rt,vt,yt,Mt),yt,Mt)}else xt=[0,0];return mt._found=xt}(a,_,y,0==g?ot:lt);if(0==S)return;let P=s._splits=s.splits(n,a,_,y,v,S,2==u.distr),et=2==u.distr?P.map(V=>vl[V]):P,H=2==u.distr?vl[P[1]]-vl[P[0]]:v,C=s._values=s.values(n,s.filter(n,et,a,S,H),a,S,H);s._rotate=2==h?s.rotate(n,C,a,S):0;let st=s._size;s._size=Xe(s.size(n,C,a,l)),null!=st&&s._size!=st&&(i=!1)}),i}function Ds(l){let i=!0;return fo.forEach((s,a)=>{let u=s(n,a,Zl,l);u!=Hl[a]&&(i=!1),Hl[a]=u}),i}function Ye(l){k.forEach((i,s)=>{s>0&&(i._paths=null,l&&(1==r?(i.min=null,i.max=null):i.facets.forEach(a=>{a.min=null,a.max=null})))})}n.setData=co;let Gn,Un,fn,cn,xo,wo,me,ge,bo,vo,wt,bt,Vn=!1;function $l(){Vn||(Lo(Ts),Vn=!0)}function Ts(){tl&&(function(){let l=Ul(M,gi);for(let a in l){let u=l[a],h=q[a];if(null!=h&&null!=h.min)St(u,h),a==D&&Ye(!0);else if(a!=D||2==r)if(0==At&&null==u.from){let g=u.range(n,null,null,a);u.min=g[0],u.max=g[1]}else u.min=Z,u.max=-Z}if(At>0){k.forEach((a,u)=>{if(1==r){let h=a.scale,g=l[h],_=q[h];if(0==u){let y=g.range(n,g.min,g.max,h);g.min=y[0],g.max=y[1],Wt=Wl(g.min,e[0]),Ct=Wl(g.max,e[0]),Ct-Wt>1&&(g.min>e[0][Wt]&&Wt++,e[0][Ct]>g.max&&Ct--),a.min=vl[Wt],a.max=vl[Ct]}else a.show&&a.auto&&Ln(g,_,a,e[u],a.sorted);a.idxs[0]=Wt,a.idxs[1]=Ct}else if(u>0&&a.show&&a.auto){let[h,g]=a.facets,_=h.scale,y=g.scale,[v,S]=e[u];Ln(l[_],q[_],h,v,h.sorted),Ln(l[y],q[y],g,S,g.sorted),a.min=g.min,a.max=g.max}});for(let a in l){let u=l[a],h=q[a];if(null==u.from&&(null==h||null==h.min)){let g=u.range(n,u.min==Z?null:u.min,u.max==-Z?null:u.max,a);u.min=g[0],u.max=g[1]}}}for(let a in l){let u=l[a];if(null!=u.from){let h=l[u.from];if(null==h.min)u.min=u.max=null;else{let g=u.range(n,h.min,h.max,a);u.min=g[0],u.max=g[1]}}}let i={},s=!1;for(let a in l){let u=l[a],h=M[a];if(h.min!=u.min||h.max!=u.max){h.min=u.min,h.max=u.max;let g=h.distr;h._min=3==g?El(h.min):4==g?vn(h.min,h.asinh):h.min,h._max=3==g?El(h.max):4==g?vn(h.max,h.asinh):h.max,i[a]=s=!0}}if(s){k.forEach((a,u)=>{2==r?u>0&&i.y&&(a._paths=null):i[a.scale]&&(a._paths=null)});for(let a in i)Et=!0,It("setScale",a);L.show&&L.left>=0&&(fl=Ut=!0)}for(let a in q)q[a]=null}(),tl=!1),Et&&(function(){let l=!1,i=0;for(;!l;){i++;let s=Es(i),a=Ds(i);l=3==i||s&&a,l||(ao(n.width,n.height),gl=!0)}}(),Et=!1),gl&&(gt(A,Xt,al),gt(A,Dt,ul),gt(A,J,ot),gt(A,Vt,lt),gt(z,Xt,al),gt(z,Dt,ul),gt(z,J,ot),gt(z,Vt,lt),gt(W,J,de),gt(W,Vt,Xl),x.width=Rt(de*K),x.height=Rt(Xl*K),B.forEach(({_el:l,_show:i,_size:s,_pos:a,side:u})=>{if(null!=l)if(i){let h=u%2==1;gt(l,h?"left":"top",a-(3===u||0===u?s:0)),gt(l,h?"width":"height",s),gt(l,h?"top":"left",h?ul:al),gt(l,h?"height":"width",h?lt:ot),Nl(l,xl)}else Ot(l,xl)}),sn=pe=Cn=Hn=On=Rn=Fn=In=Yn=null,Ce=1,dn(!0),It("setSize"),gl=!1),de>0&&Xl>0&&(w.clearRect(0,0,x.width,x.height),It("drawClear"),U.forEach(l=>l()),It("draw")),el.show&&Jl&&(hn(el),Jl=!1),L.show&&fl&&(Ql(null,!0,!1),fl=!1),Y.show&&Y.live&&Ut&&(Jn(),Ut=!1),m||(m=!0,n.status=1,It("ready")),rn=!1,Vn=!1}function Xn(l,i){let s=M[l];if(null==s.from){if(0==At){let a=s.range(n,i.min,i.max,l);i.min=a[0],i.max=a[1]}if(i.min>i.max){let a=i.min;i.min=i.max,i.max=a}if(At>1&&null!=i.min&&null!=i.max&&1e-16>i.max-i.min)return;l==D&&2==s.distr&&At>0&&(i.min=Wl(i.min,e[0]),i.max=Wl(i.max,e[0]),i.min==i.max&&i.max++),q[l]=i,tl=!0,$l()}}n.redraw=(l,i)=>{Et=i||!1,!1!==l?xe(D,T.min,T.max):$l()},n.setScale=Xn;let Ol=!1;const Ft=L.drag;let Yt=Ft.x,Ht=Ft.y;L.show&&(L.x&&(Gn=hl("u-cursor-x",z)),L.y&&(Un=hl("u-cursor-y",z)),0==T.ori?(fn=Gn,cn=Un):(fn=Un,cn=Gn),wt=L.left,bt=L.top);const el=n.select=St({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),He=el.show?hl("u-select",el.over?z:A):null;function hn(l,i){if(el.show){for(let s in l)el[s]=l[s],s in So&>(He,s,l[s]);!1!==i&&It("setSelect")}}function xe(l,i,s){Xn(l,{min:i,max:s})}function _l(l,i,s,a){null!=i.focus&&function(u){if(u!=Re){let h=null==u,g=1!=Kl.alpha;k.forEach((_,y)=>{let v=h||0==y||y==u;var S,P;_._focus=h?null:v,g&&(k[S=y].alpha=P=v?1:Kl.alpha,L.show&&ll[S]&&(ll[S].style.opacity=P),pt&&wl[S]&&(wl[S].style.opacity=P))}),Re=u,g&&$l()}}(l),null!=i.show&&k.forEach((u,h)=>{0>=h||l!=h&&null!=l||(u.show=i.show,function(g){let _=pt?wl[g]:null;k[g].show?_&&Nl(_,xl):(_&&Ot(_,xl),ll.length>1&&le(ll[g],-10,-10,ot,lt))}(h),xe(2==r?u.facets[1].scale:u.scale,null,null),$l())}),!1!==s&&It("setSeries",l,i),a&&Be("setSeries",n,l,i)}let ql,Oe,Re;n.setSelect=hn,n.setSeries=_l,n.addBand=function(l,i){l.fill=$(l.fill||null),l.dir=ut(l.dir,-1),E.splice(i=i??E.length,0,l)},n.setBand=function(l,i){St(E[l],i)},n.delBand=function(l){null==l?E.length=0:E.splice(l,1)};const we={focus:!0};function kl(l,i,s){let a=M[i];s&&(l=l/K-(1==a.ori?ul:al));let u=ot;1==a.ori&&(u=lt,l=u-l),-1==a.dir&&(l=u-l);let h=a._min,g=h+l/u*(a._max-h),_=a.distr;return 3==_?ne(10,g):4==_?((y,v=1)=>rl.sinh(y)*v)(g,a.asinh):g}function yo(l,i){gt(He,Xt,el.left=l),gt(He,J,el.width=i)}function _o(l,i){gt(He,Dt,el.top=l),gt(He,Vt,el.height=i)}pt&&Ae&&Al(_e,Gt,()=>{L._lock||null!=Re&&_l(null,we,!0,Bt.setSeries)}),n.valToIdx=l=>Wl(l,e[0]),n.posToIdx=function(l,i){return Wl(kl(l,D,i),e[0],Wt,Ct)},n.posToVal=kl,n.valToPos=(l,i,s)=>0==M[i].ori?f(l,M[i],s?Pt:ot,s?Q:0):d(l,M[i],s?$t:lt,s?kt:0),n.batch=function(l){l(n),$l()},n.setCursor=(l,i,s)=>{wt=l.left,bt=l.top,Ql(null,i,s)};let Fe=0==T.ori?yo:_o,Ie=1==T.ori?yo:_o;function Jn(l,i){null!=l&&(l.idxs?l.idxs.forEach((s,a)=>{X[a]=s}):(s=>void 0===s)(l.idx)||X.fill(l.idx),Y.idx=X[0]);for(let s=0;k.length>s;s++)(s>0||1==r&&!pl)&&Ps(s,X[s]);pt&&Y.live&&function(){if(pt&&Y.live)for(let s=2==r?1:0;k.length>s;s++){if(0==s&&pl)continue;let a=Y.values[s],u=0;for(let h in a)Cl[s][u++].firstChild.nodeValue=a[h]}}(),Ut=!1,!1!==i&&It("setLegend")}function Ps(l,i){let s,a=k[l],u=0==l&&2==F?vl:e[l];pl?s=a.values(n,l,i)??Yl:(s=a.value(n,null==i?null:u[i],l,i),s=null==s?Yl:{_:s}),Y.values[l]=s}function Ql(l,i,s){let a;bo=wt,vo=bt,[wt,bt]=L.move(n,wt,bt),L.show&&(fn&&le(fn,Rt(wt),0,ot,lt),cn&&le(cn,0,Rt(bt),ot,lt)),ql=Z;let u=0==T.ori?ot:lt,h=1==T.ori?ot:lt;if(0>wt||0==At||Wt>Ct){a=null;for(let g=0;k.length>g;g++)g>0&&ll.length>1&&le(ll[g],-10,-10,ot,lt);Ae&&_l(null,we,!0,null==l&&Bt.setSeries),Y.live&&(X.fill(a),Ut=!0)}else{let g,_,y;1==r&&(g=0==T.ori?wt:bt,_=kl(g,D),a=Wl(_,e[0],Wt,Ct),y=nt(e[0][a],T,u,0));for(let v=2==r?1:0;k.length>v;v++){let S=k[v],P=X[v],et=1==r?e[v][P]:e[v][1][P],H=L.dataIdx(n,v,a,_),C=1==r?e[v][H]:e[v][1][H];Ut=Ut||C!=et||H!=P,X[v]=H;let st=oe(H==a?y:nt(1==r?e[0][H]:e[v][0][H],T,u,0),1);if(v>0&&S.show){let V,rt,vt=null==C?-10:oe(tt(C,1==r?M[S.scale]:M[S.facets[1].scale],h,0),1);if(Ae&&vt>=0&&1==r){let yt=Nt(vt-bt),xt=Kl.bias;if(0!=xt){let mt=kl(1==T.ori?wt:bt,S.scale),Mt=0>mt?-1:1;Mt==(0>C?-1:1)&&(yt>=ql||(1==Mt?1==xt?mt>C:C>mt:1==xt?C>mt:mt>C)||(ql=yt,Oe=v))}else ql>yt&&(ql=yt,Oe=v)}if(0==T.ori?(V=st,rt=vt):(V=vt,rt=st),Ut&&ll.length>1){Ao(ll[v],L.points.fill(n,v),L.points.stroke(n,v));let yt,xt,mt,Mt,qt=!0,nl=L.points.bbox;if(null!=nl){qt=!1;let Lt=nl(n,v);mt=Lt.left,Mt=Lt.top,yt=Lt.width,xt=Lt.height}else mt=V,Mt=rt,yt=xt=L.points.size(n,v);Wo(ll[v],yt,xt,qt),le(ll[v],mt,Mt,ot,lt)}}}}if(L.idx=a,L.left=wt,L.top=bt,Ut&&(Y.idx=a,Jn()),el.show&&Ol)if(null!=l){let[g,_]=Bt.scales,[y,v]=Bt.match,[S,P]=l.cursor.sync.scales,et=l.cursor.drag;if(Yt=et._x,Ht=et._y,Yt||Ht){let H,C,st,V,rt,{left:vt,top:yt,width:xt,height:mt}=l.select,Mt=l.scales[g].ori,qt=l.posToVal,nl=null!=g&&y(g,S),Lt=null!=_&&v(_,P);nl&&Yt?(0==Mt?(H=vt,C=xt):(H=yt,C=mt),st=M[g],V=nt(qt(H,S),st,u,0),rt=nt(qt(H+C,S),st,u,0),Fe(Jt(V,rt),Nt(rt-V))):Fe(0,u),Lt&&Ht?(1==Mt?(H=vt,C=xt):(H=yt,C=mt),st=M[_],V=tt(qt(H,P),st,h,0),rt=tt(qt(H+C,P),st,h,0),Ie(Jt(V,rt),Nt(rt-V))):Ie(0,h)}else Zn()}else{let g=Nt(bo-xo),_=Nt(vo-wo);if(1==T.ori){let P=g;g=_,_=P}Yt=Ft.x&&g>=Ft.dist,Ht=Ft.y&&_>=Ft.dist;let y,v,S=Ft.uni;null!=S?Yt&&Ht&&(Yt=g>=S,Ht=_>=S,Yt||Ht||(_>g?Ht=!0:Yt=!0)):Ft.x&&Ft.y&&(Yt||Ht)&&(Yt=Ht=!0),Yt&&(0==T.ori?(y=me,v=wt):(y=ge,v=bt),Fe(Jt(y,v),Nt(v-y)),Ht||Ie(0,h)),Ht&&(1==T.ori?(y=me,v=wt):(y=ge,v=bt),Ie(Jt(y,v),Nt(v-y)),Yt||Fe(0,u)),Yt||Ht||(Fe(0,0),Ie(0,0))}if(Ft._x=Yt,Ft._y=Ht,null==l){if(s){if(null!=To){let[g,_]=Bt.scales;Bt.values[0]=null!=g?kl(0==T.ori?wt:bt,g):null,Bt.values[1]=null!=_?kl(1==T.ori?wt:bt,_):null}Be(at,n,wt,bt,ot,lt,a)}if(Ae){let g=s&&Bt.setSeries,_=Kl.prox;null==Re?ql>_||_l(Oe,we,!0,g):ql>_?_l(null,we,!0,g):Oe!=Re&&_l(Oe,we,!0,g)}}!1!==i&&It("setCursor")}n.setLegend=Jn;let be=null;function dn(l){!0===l?be=null:(be=z.getBoundingClientRect(),It("syncRect",be))}function ko(l,i,s,a,u,h){L._lock||Ol&&null!=l&&0==l.movementX&&0==l.movementY||(Kn(l,i,s,a,u,h,0,!1,null!=l),null!=l?Ql(null,!0,!0):Ql(i,!0,!1))}function Kn(l,i,s,a,u,h,g,_,y){if(null==be&&dn(!1),null!=l)s=l.clientX-be.left,a=l.clientY-be.top;else{if(0>s||0>a)return wt=-10,void(bt=-10);let[v,S]=Bt.scales,P=i.cursor.sync,[et,H]=P.values,[C,st]=P.scales,[V,rt]=Bt.match,vt=i.axes[0].side%2==1,yt=0==T.ori?ot:lt,xt=1==T.ori?ot:lt,mt=vt?h:u,Mt=vt?u:h,qt=vt?a:s,nl=vt?s:a;if(s=null!=C?V(v,C)?p(et,M[v],yt,0):-10:yt*(qt/mt),a=null!=st?rt(S,st)?p(H,M[S],xt,0):-10:xt*(nl/Mt),1==T.ori){let Lt=s;s=a,a=Lt}}y&&(s>1&&ot-1>s||(s=jl(s,ot)),a>1&<-1>a||(a=jl(a,lt))),_?(xo=s,wo=a,[me,ge]=L.move(n,s,a)):(wt=s,bt=a)}const So={width:0,height:0,left:0,top:0};function Zn(){hn(So,!1)}function Mo(l,i,s,a,u,h){Ol=!0,Yt=Ht=Ft._x=Ft._y=!1,Kn(l,i,s,a,u,h,0,!0,!1),null!=l&&(ml(Tl,Bl,zo),Be(ht,n,me,ge,ot,lt,null))}function zo(l,i,s,a,u,h){Ol=Ft._x=Ft._y=!1,Kn(l,i,s,a,u,h,0,!1,!0);let{left:g,top:_,width:y,height:v}=el,S=y>0||v>0;if(S&&hn(el),Ft.setScale&&S){let P=g,et=y,H=_,C=v;if(1==T.ori&&(P=_,et=v,H=g,C=y),Yt&&xe(D,kl(P,D),kl(P+et,D)),Ht)for(let st in M){let V=M[st];st!=D&&null==V.from&&V.min!=Z&&xe(st,kl(H+C,st),kl(H,st))}Zn()}else L.lock&&(L._lock=!L._lock,L._lock||Ql(null,!0,!1));null!=l&&(he(Tl,Bl),Be(Tl,n,wt,bt,ot,lt,null))}function Eo(l){Bn(),Zn(),null!=l&&Be(ke,n,wt,bt,ot,lt,null)}function Do(){B.forEach(zs),Wn(n.width,n.height,!0)}Al(Il,zl,Do);const ve={};ve.mousedown=Mo,ve.mousemove=ko,ve.mouseup=zo,ve.dblclick=Eo,ve.setSeries=(l,i,s,a)=>{_l(s,a,!0,!1)},L.show&&(ml(ht,z,Mo),ml(at,z,ko),ml(te,z,dn),ml(_e,z,function(){if(!L._lock){let l=Ol;if(Ol){let i,s,a=!0,u=!0,h=10;0==T.ori?(i=Yt,s=Ht):(i=Ht,s=Yt),i&&s&&(a=h>=wt||wt>=ot-h,u=h>=bt||bt>=lt-h),i&&a&&(wt=me>wt?0:ot),s&&u&&(bt=ge>bt?0:lt),Ql(null,!0,!0),Ol=!1}wt=-10,bt=-10,Ql(null,!0,!0),l&&(Ol=l)}}),ml(ke,z,Eo),Pn.add(n),n.syncRect=dn);const pn=n.hooks=t.hooks||{};function It(l,i,s){l in pn&&pn[l].forEach(a=>{a.call(null,n,i,s)})}(t.plugins||[]).forEach(l=>{for(let i in l.hooks)pn[i]=(pn[i]||[]).concat(l.hooks[i])});const Bt=St({key:null,setSeries:!1,filters:{pub:ci,sub:ci},scales:[D,k[1]?k[1].scale:null],match:[hi,hi],values:[null,null]},L.sync);L.sync=Bt;const To=Bt.key,$n=Vi(To);function Be(l,i,s,a,u,h,g){Bt.filters.pub(l,i,s,a,u,h,g)&&$n.pub(l,i,s,a,u,h,g)}function qn(){It("init",t,e),co(e||t.data,!1),q[D]?Xn(D,q[D]):Bn(),Jl=el.show,fl=Ut=!0,Wn(t.width,t.height)}return $n.sub(n),n.pub=function(l,i,s,a,u,h,g){Bt.filters.sub(l,i,s,a,u,h,g)&&ve[l](null,i,s,a,u,h,g)},n.destroy=function(){$n.unsub(n),Pn.delete(n),bl.clear(),xn(Il,zl,Do),b.remove(),Gt?.remove(),It("destroy")},k.forEach(uo),B.forEach(function(l,i){if(l._show=l.show,l.show){let s=M[l.scale];null==s&&(l.scale=l.side%2?k[1].scale:D,s=M[l.scale]);let a=s.time;l.size=$(l.size),l.space=$(l.space),l.rotate=$(l.rotate),l.incrs=$(l.incrs||(2==s.distr?Jo:a?1==G?Zo:Qo:Ko)),l.splits=$(l.splits||(a&&1==s.distr?Zt:3==s.distr?En:4==s.distr?ss:os)),l.stroke=$(l.stroke),l.grid.stroke=$(l.grid.stroke),l.ticks.stroke=$(l.ticks.stroke),l.border.stroke=$(l.border.stroke);let u=l.values;l.values=Gl(u)&&!Gl(u[0])?$(u):a?Gl(u)?Pi(dt,Ti(u,Kt)):mi(u)?function(h,g){let _=yn(g);return(y,v)=>v.map(S=>_(h(S)))}(dt,u):u||N:u||is,l.filter=$(l.filter||(3>s.distr||10!=s.log?fi:cs)),l.font=ro(l.font),l.labelFont=ro(l.labelFont),l._size=l.size(n,null,i,0),l._space=l._rotate=l._incrs=l._found=l._splits=l._values=null,l._size>0&&(Zl[i]=!0,l._el=hl("u-axis",W))}}),o?o instanceof HTMLElement?(o.appendChild(b),qn()):o(n,qn):qn(),n}jt.assign=St,jt.fmtNum=bn,jt.rangeNum=Ue,jt.rangeLog=Ge,jt.rangeAsinh=wn,jt.orient=Vl,jt.pxRatio=K,jt.join=function(t,e){let o=new Set;for(let f=0;t.length>f;f++){let d=t[f][0],p=d.length;for(let m=0;p>m;m++)o.add(d[m])}let n=[Array.from(o).sort((f,d)=>f-d)],r=n[0].length,c=new Map;for(let f=0;r>f;f++)c.set(n[0][f],f);for(let f=0;t.length>f;f++){let d=t[f],p=d[0];for(let m=1;d.length>m;m++){let b=d[m],x=Array(r).fill(void 0),w=e?e[f][m]:1,W=[];for(let A=0;b.length>A;A++){let z=b[A],I=c.get(p[A]);null===z?0!=w&&(x[I]=z,2==w&&W.push(I)):x[I]=z}Bo(x,W,r),n.push(x)}}return n},jt.fmtDate=yn,jt.tzDate=function(t,e){let o;return"UTC"==e||"Etc/UTC"==e?o=new Date(+t+6e4*t.getTimezoneOffset()):e==Vo?o=t:(o=new Date(t.toLocaleString("en-US",{timeZone:e})),o.setMilliseconds(t.getMilliseconds())),o},jt.sync=Vi;{jt.addGap=function(e,o,n){let r=e[e.length-1];r&&r[0]==o?r[1]=n:e.push([o,n])},jt.clipGaps=tn;let t=jt.paths={points:Qi};t.linear=lo,t.stepped=function(e){const o=ut(e.align,1),n=ut(e.ascDesc,!1),r=ut(e.alignGaps,0),c=ut(e.extend,!1);return(f,d,p,m)=>Vl(f,d,(b,x,w,W,A,z,I,O,G,k,B)=>{let M=b.pxRound,{left:E,width:D}=f.bbox,j=X=>M(z(X,W,k,O)),U=X=>M(I(X,A,B,G)),R=0==W.ori?ae:ue;const T={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},F=T.stroke,nt=W.dir*(0==W.ori?1:-1);p=ee(w,p,m,1),m=ee(w,p,m,-1);let tt=U(w[1==nt?p:m]),q=j(x[1==nt?p:m]),dt=q,Kt=q;c&&-1==o&&(Kt=E,R(F,Kt,tt)),R(F,q,tt);for(let X=1==nt?p:m;X>=p&&m>=X;X+=nt){let Y=w[X];if(null==Y)continue;let pt=j(x[X]),it=U(Y);1==o?R(F,pt,tt):R(F,dt,it),R(F,pt,it),tt=it,dt=pt}let Zt=dt;c&&1==o&&(Zt=E+D,R(F,Zt,tt));let[N,Tt]=Qe(f,d);if(null!=b.fill||0!=N){let X=T.fill=new Path2D(F),Y=U(b.fillTo(f,d,b.min,b.max,N));R(X,Zt,Y),R(X,Kt,Y)}if(!b.spanGaps){let X=[];X.push(...Dn(x,w,p,m,nt,j,r));let Y=b.width*K/2,pt=n||1==o?Y:-Y,it=n||-1==o?-Y:Y;X.forEach(Gt=>{Gt[0]+=pt,Gt[1]+=it}),T.gaps=X=b.gaps(f,d,p,m,X),T.clip=tn(X,W.ori,O,G,k,B)}return 0!=Tt&&(T.band=2==Tt?[Dl(f,d,p,m,F,-1),Dl(f,d,p,m,F,1)]:Dl(f,d,p,m,F,Tt)),T})},t.bars=function(e){const o=ut((e=e||Ee).size,[.6,Z,1]),n=e.align||0,r=(e.gap||0)*K;let c=e.radius;c=null==c?[0,0]:"number"==typeof c?[c,0]:c;const f=$(c),d=1-o[0],p=ut(o[1],Z)*K,m=ut(o[2],1)*K,b=ut(e.disp,Ee),x=ut(e.each,()=>{}),{fill:w,stroke:W}=b;return(A,z,I,O)=>Vl(A,z,(G,k,B,M,E,D,j,U,R,T,F)=>{let nt,tt,q=G.pxRound;0==M.ori?[nt,tt]=f(A,z):[tt,nt]=f(A,z);const dt=M.dir*(0==M.ori?1:-1),Kt=E.dir*(1==E.ori?1:-1);let Zt,N,Tt=0==M.ori?nn:Tn,X=0==M.ori?x:(Q,kt,Pt,$t,tl,gl,Et)=>{x(Q,kt,Pt,tl,$t,Et,gl)},[Y,pt]=Qe(A,z),it=3==E.distr?1==Y?E.max:E.min:0,Gt=j(it,E,F,R),_t=q(G.width*K),wl=!1,Cl=null,pl=null,Yl=null,fe=null;null==w||0!=_t&&null==W||(wl=!0,Cl=w.values(A,z,I,O),pl=new Map,new Set(Cl).forEach(Q=>{null!=Q&&pl.set(Q,new Path2D)}),_t>0&&(Yl=W.values(A,z,I,O),fe=new Map,new Set(Yl).forEach(Q=>{null!=Q&&fe.set(Q,new Path2D)})));let{x0:ce,size:Pe}=b;if(null!=ce&&null!=Pe){k=ce.values(A,z,I,O),2==ce.unit&&(k=k.map(kt=>A.posToVal(U+kt*T,M.key,!0)));let Q=Pe.values(A,z,I,O);N=2==Pe.unit?Q[0]*T:D(Q[0],M,T,U)-D(0,M,T,U),N=q(N-_t),Zt=1==dt?-_t/2:N+_t/2}else{let Q=T;if(k.length>1){let kt=null;for(let Pt=0,$t=1/0;k.length>Pt;Pt++)if(void 0!==B[Pt]){if(null!=kt){let tl=Nt(k[Pt]-k[kt]);$t>tl&&($t=tl,Q=Nt(D(k[Pt],M,T,U)-D(k[kt],M,T,U)))}kt=Pt}}N=q(Jt(p,zt(m,Q-Q*d))-_t-r),Zt=(0==n?N/2:n==dt?0:N)-n*dt*r/2}const bl={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:3};let ml;0!=pt&&(bl.band=new Path2D,ml=q(j(1==pt?E.max:E.min,E,F,R)));const he=wl?null:new Path2D,de=bl.band;let{y0:Xl,y1:ot}=b,lt=null;null!=Xl&&null!=ot&&(B=ot.values(A,z,I,O),lt=Xl.values(A,z,I,O));let al=nt*N,ul=tt*N;for(let Q=1==dt?I:O;Q>=I&&O>=Q;Q+=dt){let kt=B[Q];if(void 0===kt)continue;let Pt=D(2!=M.distr||null!=b?k[Q]:Q,M,T,U),$t=j(ut(kt,it),E,F,R);null!=lt&&null!=kt&&(Gt=j(lt[Q],E,F,R));let tl=q(Pt-Zt),gl=q(zt($t,Gt)),Et=q(Jt($t,Gt)),fl=gl-Et;if(null!=kt){let Jl=0>kt?ul:al,Ut=0>kt?al:ul;wl?(_t>0&&null!=Yl[Q]&&Tt(fe.get(Yl[Q]),tl,Et+dl(_t/2),N,zt(0,fl-_t),Jl,Ut),null!=Cl[Q]&&Tt(pl.get(Cl[Q]),tl,Et+dl(_t/2),N,zt(0,fl-_t),Jl,Ut)):Tt(he,tl,Et+dl(_t/2),N,zt(0,fl-_t),Jl,Ut),X(A,z,Q,tl-_t/2,Et,N+_t,fl)}0!=pt&&(Kt*pt==1?(gl=Et,Et=ml):(Et=gl,gl=ml),fl=gl-Et,Tt(de,tl-_t/2,Et,N+_t,zt(0,fl),0,0))}return _t>0&&(bl.stroke=wl?fe:he),bl.fill=wl?pl:he,bl})},t.spline=function(e){return function(o,n){const r=ut(n?.alignGaps,0);return(c,f,d,p)=>Vl(c,f,(m,b,x,w,W,A,z,I,O,G,k)=>{let B,M,E,D=m.pxRound,j=N=>D(A(N,w,G,I)),U=N=>D(z(N,W,k,O));0==w.ori?(B=ln,E=ae,M=$i):(B=en,E=ue,M=qi);const R=w.dir*(0==w.ori?1:-1);d=ee(x,d,p,1),p=ee(x,d,p,-1);let T=j(b[1==R?d:p]),F=T,nt=[],tt=[];for(let N=1==R?d:p;N>=d&&p>=N;N+=R)if(null!=x[N]){let Tt=j(b[N]);nt.push(F=Tt),tt.push(U(x[N]))}const q={stroke:o(nt,tt,B,E,M,D),fill:null,clip:null,band:null,gaps:null,flags:1},dt=q.stroke;let[Kt,Zt]=Qe(c,f);if(null!=m.fill||0!=Kt){let N=q.fill=new Path2D(dt),Tt=U(m.fillTo(c,f,m.min,m.max,Kt));E(N,F,Tt),E(N,T,Tt)}if(!m.spanGaps){let N=[];N.push(...Dn(b,x,d,p,R,j,r)),q.gaps=N=m.gaps(c,f,d,p,N),q.clip=tn(N,w.ori,I,O,G,k)}return 0!=Zt&&(q.band=2==Zt?[Dl(c,f,d,p,dt,-1),Dl(c,f,d,p,dt,1)]:Dl(c,f,d,p,dt,Zt)),q})}(ws,e)}}return jt}(),placement=function(){"use strict";var xl={size:["height","width"],clientSize:["clientHeight","clientWidth"],offsetSize:["offsetHeight","offsetWidth"],maxSize:["maxHeight","maxWidth"],before:["top","left"],marginBefore:["marginTop","marginLeft"],after:["bottom","right"],marginAfter:["marginBottom","marginRight"],scrollOffset:["pageYOffset","pageXOffset"]};function ye(J){return{top:J.top,bottom:J.bottom,left:J.left,right:J.right}}return function(J,Vt,Dt,Fl,Xt){void 0===Dt&&(Dt="bottom"),void 0===Fl&&(Fl="center"),void 0===Xt&&(Xt={}),(Vt instanceof Element||Vt instanceof Range)&&(Vt=ye(Vt.getBoundingClientRect()));var il=Object.assign({top:Vt.bottom,bottom:Vt.top,left:Vt.right,right:Vt.left},Vt),ol={top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};Xt.bound&&((Xt.bound instanceof Element||Xt.bound instanceof Range)&&(Xt.bound=ye(Xt.bound.getBoundingClientRect())),Object.assign(ol,Xt.bound));var Ml=getComputedStyle(J),at={},ht={};for(var Tl in xl)at[Tl]=xl[Tl]["top"===Dt||"bottom"===Dt?0:1],ht[Tl]=xl[Tl]["top"===Dt||"bottom"===Dt?1:0];J.style.position="absolute",J.style.maxWidth="",J.style.maxHeight="";var te=parseInt(Ml[ht.marginBefore]),_e=parseInt(Ml[ht.marginAfter]),ke=te+_e,Se=ol[ht.after]-ol[ht.before]-ke,Il=parseInt(Ml[ht.maxSize]);(!Il||Se<Il)&&(J.style[ht.maxSize]=Se+"px");var Pl=parseInt(Ml[at.marginBefore])+parseInt(Ml[at.marginAfter]),yl=il[at.before]-ol[at.before]-Pl,Bl=ol[at.after]-il[at.after]-Pl;(Dt===at.before&&J[at.offsetSize]>yl||Dt===at.after&&J[at.offsetSize]>Bl)&&(Dt=yl>Bl?at.before:at.after);var zl=Dt===at.before?yl:Bl,je=parseInt(Ml[at.maxSize]);(!je||zl<je)&&(J.style[at.maxSize]=zl+"px");var K=window[at.scrollOffset],Ll=function(sl){return Math.max(ol[at.before],Math.min(sl,ol[at.after]-J[at.offsetSize]-Pl))};Dt===at.before?(J.style[at.before]=K+Ll(il[at.before]-J[at.offsetSize]-Pl)+"px",J.style[at.after]="auto"):(J.style[at.before]=K+Ll(il[at.after])+"px",J.style[at.after]="auto");var Ot=window[ht.scrollOffset],Nl=function(sl){return Math.max(ol[ht.before],Math.min(sl,ol[ht.after]-J[ht.offsetSize]-ke))};switch(Fl){case"start":J.style[ht.before]=Ot+Nl(il[ht.before]-te)+"px",J.style[ht.after]="auto";break;case"end":J.style[ht.before]="auto",J.style[ht.after]=Ot+Nl(document.documentElement[ht.clientSize]-il[ht.after]-_e)+"px";break;default:J.style[ht.before]=Ot+Nl(il[ht.before]+(il[ht.after]-il[ht.before])/2-J[ht.offsetSize]/2-te)+"px",J.style[ht.after]="auto"}J.dataset.side=Dt,J.dataset.align=Fl}}();
|