mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-04-19 17:16:08 +08:00
19 lines
413 KiB
JavaScript
19 lines
413 KiB
JavaScript
var Ne=Object.defineProperty;var Fe=(t,e,i)=>e in t?Ne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var Q=(t,e,i)=>(Fe(t,typeof e!="symbol"?e+"":e,i),i);import{l as lodash}from"./common.311ffe86.js";import{m as message,r as ref,d as defineComponent,o as onMounted,a as onUpdated,b as createElementBlock,u as unref,e as onUnmounted,f as openBlock,g as createBaseVNode,t as toDisplayString,h as createVNode,F as Fragment,i as renderList,n as normalizeStyle,j as createTextVNode,_ as __unplugin_components_0,k as renderSlot,w as withCtx,l as createBlock,p as resolveDynamicComponent,q as pushScopeId,s as popScopeId,v as computed,x as watch,y as __unplugin_components_0$1,z as reactive,A as withModifiers,T as Transition,B as createCommentVNode,L as LeftOutlined,R as RightOutlined,C as __unplugin_components_1,S as SortAscendingOutlined,D as SortDescendingOutlined,E as SelectOption,G as __unplugin_components_0$2,H as DoubleLeftOutlined,I as DoubleRightOutlined,J as shallowReactive,K as markRaw,M as DragOutlined,N as createApp}from"./antdv.d3c1a017.js";function __vite_legacy_guard(){import("data:text/javascript,")}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const a of n)if(a.type==="childList")for(const r of a.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function i(n){const a={};return n.integrity&&(a.integrity=n.integrity),n.referrerpolicy&&(a.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?a.credentials="include":n.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(n){if(n.ep)return;n.ep=!0;const a=i(n);fetch(n.href,a)}})();let pop=[],time=0;function init$b(){return main.replayChecking||core.registerAnimationFrame("pop",!0,popValue),{addPop,pop}}function popValue(t){if(t-time<15)return;let e=core.getContextByName("pop");e||(e=core.createCanvas("pop",0,0,core._PX_,core._PY_,90)),core.clearMap(e);let i=0;pop.forEach(function(s){const n=6-s.frame*.2,a=1;s.py-=n,s.px+=a,s.frame++,s.frame>=60?core.setAlpha(e,3-s.frame/30):core.setAlpha(e,1),core.fillBoldText(e,s.value,s.px,s.py,"#f22","#000","24px normal"),s.frame>=90&&i++}),i>0&&pop.splice(0,i),time=t}function addPop(t,e,i){var s={px:t,py:e,value:i,frame:0};pop.push(s)}var M=Object.defineProperty,E=(t,e,i)=>e in t?M(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,o=(t,e,i)=>(E(t,typeof e!="symbol"?e+"":e,i),i);let b=[];const k=t=>{for(const e of b)if(e.status==="running")try{for(const i of e.funcs)i(t-e.startTime)}catch(i){e.destroy(),console.error(i)}requestAnimationFrame(k)};requestAnimationFrame(k);class I{constructor(){o(this,"funcs",[]),o(this,"status","stop"),o(this,"startTime",0),this.status="running",b.push(this),requestAnimationFrame(e=>this.startTime=e)}add(e,i=!1){return i?this.funcs.unshift(e):this.funcs.push(e),this}remove(e){const i=this.funcs.findIndex(s=>s===e);if(i===-1)throw new ReferenceError("You are going to remove nonexistent ticker function.");return this.funcs.splice(i,1),this}clear(){this.funcs=[]}destroy(){this.clear(),this.stop()}stop(){this.status="stop",b=b.filter(e=>e!==this)}}class F{constructor(){o(this,"timing"),o(this,"relation","absolute"),o(this,"easeTime",0),o(this,"applying",{}),o(this,"ticker",new I),o(this,"value",{}),o(this,"listener",{}),this.timing=e=>e}async all(){if(Object.values(this.applying).every(e=>e===!0))throw new ReferenceError("There is no animates to be waited.");await new Promise(e=>{const i=()=>{Object.values(this.applying).every(s=>s===!1)&&(this.unlisten("end",i),e("all animated."))};this.listen("end",i)})}async n(e){const i=Object.values(this.applying).filter(n=>n===!0).length;if(i<e)throw new ReferenceError(`You are trying to wait ${e} animate, but there are only ${i} animate animating.`);let s=0;await new Promise(n=>{const a=()=>{s++,s===e&&(this.unlisten("end",a),n(`${e} animated.`))};this.listen("end",a)})}async w(e){if(this.applying[e]===!1)throw new ReferenceError(`The ${e} animate is not animating.`);await new Promise(i=>{const s=()=>{this.applying[e]===!1&&(this.unlisten("end",s),i(`${e} animated.`))};this.listen("end",s)})}listen(e,i){var s;(s=this.listener)[e]!=null||(s[e]=[]),this.listener[e].push(i)}unlisten(e,i){const s=this.listener[e].findIndex(n=>n===i);if(s===-1)throw new ReferenceError("You are trying to remove a nonexistent listener.");this.listener[e].splice(s,1)}hook(...e){const i=Object.entries(this.listener).filter(s=>e.includes(s[0]));for(const[s,n]of i)for(const a of n)a(this,s)}}function x(t){return t!=null}async function S(t){return new Promise(e=>setTimeout(e,t))}class R extends F{constructor(){super(),o(this,"shakeTiming"),o(this,"path"),o(this,"multiTiming"),o(this,"value",{}),o(this,"size",1),o(this,"angle",0),o(this,"targetValue",{system:{move:[0,0],moveAs:[0,0],resize:0,rotate:0,shake:0,"@@bind":[]},custom:{}}),o(this,"animateFn",{system:{move:[()=>0,()=>0],moveAs:()=>0,resize:()=>0,rotate:()=>0,shake:()=>0,"@@bind":()=>0},custom:{}}),o(this,"ox",0),o(this,"oy",0),o(this,"sx",0),o(this,"sy",0),o(this,"bindInfo",[]),this.timing=e=>e,this.shakeTiming=e=>e,this.multiTiming=e=>[e,e],this.path=e=>[e,e],this.applying={move:!1,scale:!1,rotate:!1,shake:!1},this.ticker.add(()=>{const{running:e}=this.listener;if(x(e))for(const i of e)i(this,"running")})}get x(){return this.ox+this.sx}get y(){return this.oy+this.sy}mode(e,i=!1){return typeof e(0)=="number"?i?this.shakeTiming=e:this.timing=e:this.multiTiming=e,this}time(e){return this.easeTime=e,this}relative(){return this.relation="relative",this}absolute(){return this.relation="absolute",this}bind(...e){return this.applying["@@bind"]===!0&&this.end(!1,"@@bind"),this.bindInfo=e,this}unbind(){return this.applying["@@bind"]===!0&&this.end(!1,"@@bind"),this.bindInfo=[],this}move(e,i){return this.applying.move&&this.end(!0,"move"),this.applySys("ox",e,"move"),this.applySys("oy",i,"move"),this}rotate(e){return this.applySys("angle",e,"rotate"),this}scale(e){return this.applySys("size",e,"resize"),this}shake(e,i){this.applying.shake===!0&&this.end(!0,"shake"),this.applying.shake=!0;const{easeTime:s,shakeTiming:n}=this,a=Date.now();this.hook("start","shakestart");const r=()=>{const l=Date.now()-a;l>s&&(this.ticker.remove(r),this.applying.shake=!1,this.sx=0,this.sy=0,this.hook("end","shakeend"));const c=l/s,d=n(c);this.sx=d*e,this.sy=d*i};return this.ticker.add(r),this.animateFn.system.shake=r,this}moveAs(e){this.applying.moveAs&&this.end(!0,"moveAs"),this.applying.moveAs=!0,this.path=e;const{easeTime:i,relation:s,timing:n}=this,a=Date.now(),[r,l]=[this.x,this.y],[c,d]=(()=>{if(s==="absolute")return e(1);{const[h,f]=e(1);return[r+h,l+f]}})();this.hook("start","movestart");const u=()=>{const h=Date.now()-a;if(h>i){this.end(!0,"moveAs");return}const f=h/i,[g,m]=e(n(f));s==="absolute"?(this.ox=g,this.oy=m):(this.ox=r+g,this.oy=l+m)};return this.ticker.add(u,!0),this.animateFn.system.moveAs=u,this.targetValue.system.moveAs=[c,d],this}register(e,i){if(typeof this.value[e]=="number")return this.error(`Property ${e} has been regietered twice.`,"reregister");this.value[e]=i,this.applying[e]=!1}apply(e,i,s=!1){this.applying[e]===!0&&this.end(!1,e),e in this.value||this.error(`You are trying to execute nonexistent property ${e}.`),this.applying[e]=!0;const n=this.value[e],a=Date.now(),{timing:r,relation:l,easeTime:c}=this,d=l==="absolute"?i-n:i;this.hook("start");const u=()=>{const h=Date.now()-a;if(h>c){this.end(!1,e);return}const f=h/c,g=r(f);this.value[e]=n+g*d};return this.ticker.add(u,s),this.animateFn.custom[e]=u,this.targetValue.custom[e]=d+n,this}applyMulti(e=!1){this.applying["@@bind"]===!0&&this.end(!1,"@@bind"),this.applying["@@bind"]=!0;const i=this.bindInfo,s=i.map(u=>this.value[u]),n=Date.now(),{multiTiming:a,relation:r,easeTime:l}=this,c=a(1);if(c.length!==s.length)throw new TypeError(`The number of binded animate attributes and timing function returns's length does not match. binded: ${i.length}, timing: ${c.length}`);this.hook("start");const d=()=>{const u=Date.now()-n;if(u>l){this.end(!1,"@@bind");return}const h=u/l,f=a(h);i.forEach((g,m)=>{r==="absolute"?this.value[g]=f[m]:this.value[g]=s[m]+f[m]})};return this.ticker.add(d,e),this.animateFn.custom["@@bind"]=d,this.targetValue.system["@@bind"]=c,this}applySys(e,i,s){s!=="move"&&this.applying[s]===!0&&this.end(!0,s),this.applying[s]=!0;const n=this[e],a=Date.now(),r=this.timing,l=this.relation,c=this.easeTime,d=l==="absolute"?i-n:i;this.hook("start",`${s}start`);const u=()=>{const h=Date.now()-a;if(h>c){this.end(!0,s);return}const f=h/c,g=r(f);this[e]=n+d*g,e!=="oy"&&this.hook(s)};this.ticker.add(u,!0),e==="ox"?this.animateFn.system.move[0]=u:e==="oy"?this.animateFn.system.move[1]=u:this.animateFn.system[s]=u,s==="move"?(e==="ox"&&(this.targetValue.system.move[0]=d+n),e==="oy"&&(this.targetValue.system.move[1]=d+n)):s!=="shake"&&(this.targetValue.system[s]=d+n)}error(e,i){throw i==="repeat"?new Error(`Cannot execute the same animation twice. Info: ${e}`):i==="reregister"?new Error(`Cannot register a animated property twice. Info: ${e}`):new Error(e)}end(e,i){if(e===!0)if(this.applying[i]=!1,i==="move"?(this.ticker.remove(this.animateFn.system.move[0]),this.ticker.remove(this.animateFn.system.move[1])):i==="moveAs"?this.ticker.remove(this.animateFn.system.moveAs):i==="@@bind"?this.ticker.remove(this.animateFn.system["@@bind"]):this.ticker.remove(this.animateFn.system[i]),i==="move"){const[s,n]=this.targetValue.system.move;this.ox=s,this.oy=n,this.hook("moveend","end")}else if(i==="moveAs"){const[s,n]=this.targetValue.system.moveAs;this.ox=s,this.oy=n,this.hook("moveend","end")}else i==="rotate"?(this.angle=this.targetValue.system.rotate,this.hook("rotateend","end")):i==="resize"?(this.size=this.targetValue.system.resize,this.hook("resizeend","end")):i==="@@bind"?this.bindInfo.forEach((s,n)=>{this.value[s]=this.targetValue.system["@@bind"][n]}):(this.sx=0,this.sy=0,this.hook("shakeend","end"));else this.applying[i]=!1,this.ticker.remove(this.animateFn.custom[i]),this.value[i]=this.targetValue.custom[i],this.hook("end")}}const T=(...t)=>t.reduce((e,i)=>e+i,0),y=t=>{if(t===0)return 1;let e=t;for(;t>1;)t--,e*=t;return e},A=(t,e)=>Math.round(y(e)/(y(t)*y(e-t))),p=(t,e,i=s=>1-e(1-s))=>t==="in"?e:t==="out"?i:t==="in-out"?s=>s<.5?e(s*2)/2:.5+i((s-.5)*2)/2:s=>s<.5?i(s*2)/2:.5+e((s-.5)*2)/2,$=Math.cosh(2),z=Math.acosh(2),V=Math.tanh(3);function j(){return t=>t}function O(...t){const e=[0].concat(t);e.push(1);const i=e.length,s=Array(i).fill(0).map((n,a)=>A(a,i-1));return n=>{const a=s.map((r,l)=>r*e[l]*(1-n)**(i-l-1)*n**l);return T(...a)}}function C(t,e){if(t==="sin")return p(e,i=>(Math.cosh(i*2)-1)/($-1));if(t==="tan"){const i=s=>Math.tanh(s*3)*1/V;return p(e,s=>1-i(1-s),i)}if(t==="sec"){const i=s=>1/Math.cosh(s);return p(e,s=>1-(i(s*z)-.5)*2)}throw new TypeError("Unexpected parameters are delivered in hyper timing function.")}const _default="",index$6="";var KeyCode=(t=>(t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.NumLock=78]="NumLock",t[t.ScrollLock=79]="ScrollLock",t[t.Semicolon=80]="Semicolon",t[t.Equal=81]="Equal",t[t.Comma=82]="Comma",t[t.Minus=83]="Minus",t[t.Period=84]="Period",t[t.Slash=85]="Slash",t[t.Backquote=86]="Backquote",t[t.BracketLeft=87]="BracketLeft",t[t.Backslash=88]="Backslash",t[t.BracketRight=89]="BracketRight",t[t.Quote=90]="Quote",t[t.OEM_8=91]="OEM_8",t[t.IntlBackslash=92]="IntlBackslash",t[t.Numpad0=93]="Numpad0",t[t.Numpad1=94]="Numpad1",t[t.Numpad2=95]="Numpad2",t[t.Numpad3=96]="Numpad3",t[t.Numpad4=97]="Numpad4",t[t.Numpad5=98]="Numpad5",t[t.Numpad6=99]="Numpad6",t[t.Numpad7=100]="Numpad7",t[t.Numpad8=101]="Numpad8",t[t.Numpad9=102]="Numpad9",t[t.NumpadMultiply=103]="NumpadMultiply",t[t.NumpadAdd=104]="NumpadAdd",t[t.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=106]="NumpadSubtract",t[t.NumpadDecimal=107]="NumpadDecimal",t[t.NumpadDivide=108]="NumpadDivide",t[t.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",t[t.ABNT_C1=110]="ABNT_C1",t[t.ABNT_C2=111]="ABNT_C2",t[t.AudioVolumeMute=112]="AudioVolumeMute",t[t.AudioVolumeUp=113]="AudioVolumeUp",t[t.AudioVolumeDown=114]="AudioVolumeDown",t[t.BrowserSearch=115]="BrowserSearch",t[t.BrowserHome=116]="BrowserHome",t[t.BrowserBack=117]="BrowserBack",t[t.BrowserForward=118]="BrowserForward",t[t.MediaTrackNext=119]="MediaTrackNext",t[t.MediaTrackPrevious=120]="MediaTrackPrevious",t[t.MediaStop=121]="MediaStop",t[t.MediaPlayPause=122]="MediaPlayPause",t[t.LaunchMediaPlayer=123]="LaunchMediaPlayer",t[t.LaunchMail=124]="LaunchMail",t[t.LaunchApp2=125]="LaunchApp2",t[t.Clear=126]="Clear",t[t.MAX_VALUE=127]="MAX_VALUE",t))(KeyCode||{});class KeyCodeStrMap{constructor(){Q(this,"_keyCodeToStr");Q(this,"_strToKeyCode");this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,i){this._keyCodeToStr[e]=i,this._strToKeyCode[i.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const uiMap=new KeyCodeStrMap,userSettingsUSMap=new KeyCodeStrMap,userSettingsGeneralMap=new KeyCodeStrMap,EVENT_KEY_CODE_MAP=new Array(230),scanCodeStrToInt=Object.create(null),scanCodeLowerCaseStrToInt=Object.create(null);(function(){const t="",e=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",t,t],[0,1,1,"Hyper",0,t,0,t,t,t],[0,1,2,"Super",0,t,0,t,t,t],[0,1,3,"Fn",0,t,0,t,t,t],[0,1,4,"FnLock",0,t,0,t,t,t],[0,1,5,"Suspend",0,t,0,t,t,t],[0,1,6,"Resume",0,t,0,t,t,t],[0,1,7,"Turbo",0,t,0,t,t,t],[0,1,8,"Sleep",0,t,0,"VK_SLEEP",t,t],[0,1,9,"WakeUp",0,t,0,t,t,t],[31,0,10,"KeyA",31,"A",65,"VK_A",t,t],[32,0,11,"KeyB",32,"B",66,"VK_B",t,t],[33,0,12,"KeyC",33,"C",67,"VK_C",t,t],[34,0,13,"KeyD",34,"D",68,"VK_D",t,t],[35,0,14,"KeyE",35,"E",69,"VK_E",t,t],[36,0,15,"KeyF",36,"F",70,"VK_F",t,t],[37,0,16,"KeyG",37,"G",71,"VK_G",t,t],[38,0,17,"KeyH",38,"H",72,"VK_H",t,t],[39,0,18,"KeyI",39,"I",73,"VK_I",t,t],[40,0,19,"KeyJ",40,"J",74,"VK_J",t,t],[41,0,20,"KeyK",41,"K",75,"VK_K",t,t],[42,0,21,"KeyL",42,"L",76,"VK_L",t,t],[43,0,22,"KeyM",43,"M",77,"VK_M",t,t],[44,0,23,"KeyN",44,"N",78,"VK_N",t,t],[45,0,24,"KeyO",45,"O",79,"VK_O",t,t],[46,0,25,"KeyP",46,"P",80,"VK_P",t,t],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",t,t],[48,0,27,"KeyR",48,"R",82,"VK_R",t,t],[49,0,28,"KeyS",49,"S",83,"VK_S",t,t],[50,0,29,"KeyT",50,"T",84,"VK_T",t,t],[51,0,30,"KeyU",51,"U",85,"VK_U",t,t],[52,0,31,"KeyV",52,"V",86,"VK_V",t,t],[53,0,32,"KeyW",53,"W",87,"VK_W",t,t],[54,0,33,"KeyX",54,"X",88,"VK_X",t,t],[55,0,34,"KeyY",55,"Y",89,"VK_Y",t,t],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",t,t],[22,0,36,"Digit1",22,"1",49,"VK_1",t,t],[23,0,37,"Digit2",23,"2",50,"VK_2",t,t],[24,0,38,"Digit3",24,"3",51,"VK_3",t,t],[25,0,39,"Digit4",25,"4",52,"VK_4",t,t],[26,0,40,"Digit5",26,"5",53,"VK_5",t,t],[27,0,41,"Digit6",27,"6",54,"VK_6",t,t],[28,0,42,"Digit7",28,"7",55,"VK_7",t,t],[29,0,43,"Digit8",29,"8",56,"VK_8",t,t],[30,0,44,"Digit9",30,"9",57,"VK_9",t,t],[21,0,45,"Digit0",21,"0",48,"VK_0",t,t],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",t,t],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",t,t],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",t,t],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",t,t],[10,1,50,"Space",10,"Space",32,"VK_SPACE",t,t],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,t,0,t,t,t],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",t,t],[59,1,64,"F1",59,"F1",112,"VK_F1",t,t],[60,1,65,"F2",60,"F2",113,"VK_F2",t,t],[61,1,66,"F3",61,"F3",114,"VK_F3",t,t],[62,1,67,"F4",62,"F4",115,"VK_F4",t,t],[63,1,68,"F5",63,"F5",116,"VK_F5",t,t],[64,1,69,"F6",64,"F6",117,"VK_F6",t,t],[65,1,70,"F7",65,"F7",118,"VK_F7",t,t],[66,1,71,"F8",66,"F8",119,"VK_F8",t,t],[67,1,72,"F9",67,"F9",120,"VK_F9",t,t],[68,1,73,"F10",68,"F10",121,"VK_F10",t,t],[69,1,74,"F11",69,"F11",122,"VK_F11",t,t],[70,1,75,"F12",70,"F12",123,"VK_F12",t,t],[0,1,76,"PrintScreen",0,t,0,t,t,t],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",t,t],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",t,t],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",t,t],[14,1,80,"Home",14,"Home",36,"VK_HOME",t,t],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",t,t],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",t,t],[13,1,83,"End",13,"End",35,"VK_END",t,t],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",t,t],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",t],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",t],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",t],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",t],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",t,t],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",t,t],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",t,t],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",t,t],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",t,t],[3,1,94,"NumpadEnter",3,t,0,t,t,t],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",t,t],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",t,t],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",t,t],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",t,t],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",t,t],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",t,t],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",t,t],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",t,t],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",t,t],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",t,t],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",t,t],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",t,t],[58,1,107,"ContextMenu",58,"ContextMenu",93,t,t,t],[0,1,108,"Power",0,t,0,t,t,t],[0,1,109,"NumpadEqual",0,t,0,t,t,t],[71,1,110,"F13",71,"F13",124,"VK_F13",t,t],[72,1,111,"F14",72,"F14",125,"VK_F14",t,t],[73,1,112,"F15",73,"F15",126,"VK_F15",t,t],[74,1,113,"F16",74,"F16",127,"VK_F16",t,t],[75,1,114,"F17",75,"F17",128,"VK_F17",t,t],[76,1,115,"F18",76,"F18",129,"VK_F18",t,t],[77,1,116,"F19",77,"F19",130,"VK_F19",t,t],[0,1,117,"F20",0,t,0,"VK_F20",t,t],[0,1,118,"F21",0,t,0,"VK_F21",t,t],[0,1,119,"F22",0,t,0,"VK_F22",t,t],[0,1,120,"F23",0,t,0,"VK_F23",t,t],[0,1,121,"F24",0,t,0,"VK_F24",t,t],[0,1,122,"Open",0,t,0,t,t,t],[0,1,123,"Help",0,t,0,t,t,t],[0,1,124,"Select",0,t,0,t,t,t],[0,1,125,"Again",0,t,0,t,t,t],[0,1,126,"Undo",0,t,0,t,t,t],[0,1,127,"Cut",0,t,0,t,t,t],[0,1,128,"Copy",0,t,0,t,t,t],[0,1,129,"Paste",0,t,0,t,t,t],[0,1,130,"Find",0,t,0,t,t,t],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",t,t],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",t,t],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",t,t],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",t,t],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",t,t],[0,1,136,"KanaMode",0,t,0,t,t,t],[0,0,137,"IntlYen",0,t,0,t,t,t],[0,1,138,"Convert",0,t,0,t,t,t],[0,1,139,"NonConvert",0,t,0,t,t,t],[0,1,140,"Lang1",0,t,0,t,t,t],[0,1,141,"Lang2",0,t,0,t,t,t],[0,1,142,"Lang3",0,t,0,t,t,t],[0,1,143,"Lang4",0,t,0,t,t,t],[0,1,144,"Lang5",0,t,0,t,t,t],[0,1,145,"Abort",0,t,0,t,t,t],[0,1,146,"Props",0,t,0,t,t,t],[0,1,147,"NumpadParenLeft",0,t,0,t,t,t],[0,1,148,"NumpadParenRight",0,t,0,t,t,t],[0,1,149,"NumpadBackspace",0,t,0,t,t,t],[0,1,150,"NumpadMemoryStore",0,t,0,t,t,t],[0,1,151,"NumpadMemoryRecall",0,t,0,t,t,t],[0,1,152,"NumpadMemoryClear",0,t,0,t,t,t],[0,1,153,"NumpadMemoryAdd",0,t,0,t,t,t],[0,1,154,"NumpadMemorySubtract",0,t,0,t,t,t],[0,1,155,"NumpadClear",126,"Clear",12,"VK_CLEAR",t,t],[0,1,156,"NumpadClearEntry",0,t,0,t,t,t],[5,1,0,t,5,"Ctrl",17,"VK_CONTROL",t,t],[4,1,0,t,4,"Shift",16,"VK_SHIFT",t,t],[6,1,0,t,6,"Alt",18,"VK_MENU",t,t],[57,1,0,t,57,"Meta",0,"VK_COMMAND",t,t],[5,1,157,"ControlLeft",5,t,0,"VK_LCONTROL",t,t],[4,1,158,"ShiftLeft",4,t,0,"VK_LSHIFT",t,t],[6,1,159,"AltLeft",6,t,0,"VK_LMENU",t,t],[57,1,160,"MetaLeft",57,t,0,"VK_LWIN",t,t],[5,1,161,"ControlRight",5,t,0,"VK_RCONTROL",t,t],[4,1,162,"ShiftRight",4,t,0,"VK_RSHIFT",t,t],[6,1,163,"AltRight",6,t,0,"VK_RMENU",t,t],[57,1,164,"MetaRight",57,t,0,"VK_RWIN",t,t],[0,1,165,"BrightnessUp",0,t,0,t,t,t],[0,1,166,"BrightnessDown",0,t,0,t,t,t],[0,1,167,"MediaPlay",0,t,0,t,t,t],[0,1,168,"MediaRecord",0,t,0,t,t,t],[0,1,169,"MediaFastForward",0,t,0,t,t,t],[0,1,170,"MediaRewind",0,t,0,t,t,t],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",t,t],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",t,t],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",t,t],[0,1,174,"Eject",0,t,0,t,t,t],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",t,t],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",t,t],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",t,t],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",t,t],[0,1,179,"LaunchApp1",0,t,0,"VK_MEDIA_LAUNCH_APP1",t,t],[0,1,180,"SelectTask",0,t,0,t,t,t],[0,1,181,"LaunchScreenSaver",0,t,0,t,t,t],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",t,t],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",t,t],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",t,t],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",t,t],[0,1,186,"BrowserStop",0,t,0,"VK_BROWSER_STOP",t,t],[0,1,187,"BrowserRefresh",0,t,0,"VK_BROWSER_REFRESH",t,t],[0,1,188,"BrowserFavorites",0,t,0,"VK_BROWSER_FAVORITES",t,t],[0,1,189,"ZoomToggle",0,t,0,t,t,t],[0,1,190,"MailReply",0,t,0,t,t,t],[0,1,191,"MailForward",0,t,0,t,t,t],[0,1,192,"MailSend",0,t,0,t,t,t],[109,1,0,t,109,"KeyInComposition",229,t,t,t],[111,1,0,t,111,"ABNT_C2",194,"VK_ABNT_C2",t,t],[91,1,0,t,91,"OEM_8",223,"VK_OEM_8",t,t],[0,1,0,t,0,t,0,"VK_KANA",t,t],[0,1,0,t,0,t,0,"VK_HANGUL",t,t],[0,1,0,t,0,t,0,"VK_JUNJA",t,t],[0,1,0,t,0,t,0,"VK_FINAL",t,t],[0,1,0,t,0,t,0,"VK_HANJA",t,t],[0,1,0,t,0,t,0,"VK_KANJI",t,t],[0,1,0,t,0,t,0,"VK_CONVERT",t,t],[0,1,0,t,0,t,0,"VK_NONCONVERT",t,t],[0,1,0,t,0,t,0,"VK_ACCEPT",t,t],[0,1,0,t,0,t,0,"VK_MODECHANGE",t,t],[0,1,0,t,0,t,0,"VK_SELECT",t,t],[0,1,0,t,0,t,0,"VK_PRINT",t,t],[0,1,0,t,0,t,0,"VK_EXECUTE",t,t],[0,1,0,t,0,t,0,"VK_SNAPSHOT",t,t],[0,1,0,t,0,t,0,"VK_HELP",t,t],[0,1,0,t,0,t,0,"VK_APPS",t,t],[0,1,0,t,0,t,0,"VK_PROCESSKEY",t,t],[0,1,0,t,0,t,0,"VK_PACKET",t,t],[0,1,0,t,0,t,0,"VK_DBE_SBCSCHAR",t,t],[0,1,0,t,0,t,0,"VK_DBE_DBCSCHAR",t,t],[0,1,0,t,0,t,0,"VK_ATTN",t,t],[0,1,0,t,0,t,0,"VK_CRSEL",t,t],[0,1,0,t,0,t,0,"VK_EXSEL",t,t],[0,1,0,t,0,t,0,"VK_EREOF",t,t],[0,1,0,t,0,t,0,"VK_PLAY",t,t],[0,1,0,t,0,t,0,"VK_ZOOM",t,t],[0,1,0,t,0,t,0,"VK_NONAME",t,t],[0,1,0,t,0,t,0,"VK_PA1",t,t],[0,1,0,t,0,t,0,"VK_OEM_CLEAR",t,t]],i=[],s=[];for(const n of e){const[a,r,l,c,d,u,h,f,g,m]=n;if(s[l]||(s[l]=!0,scanCodeStrToInt[c]=l,scanCodeLowerCaseStrToInt[c.toLowerCase()]=l),!i[d]){if(i[d]=!0,!u)throw new Error(`String representation missing for key code ${d} around scan code ${c}`);uiMap.define(d,u),userSettingsUSMap.define(d,g||u),userSettingsGeneralMap.define(d,m||g||u)}h&&(EVENT_KEY_CODE_MAP[h]=d)}})();var KeyCodeUtils;(t=>{function e(l){return uiMap.keyCodeToStr(l)}t.toString=e;function i(l){return uiMap.strToKeyCode(l)}t.fromString=i;function s(l){return userSettingsUSMap.keyCodeToStr(l)}t.toUserSettingsUS=s;function n(l){return userSettingsGeneralMap.keyCodeToStr(l)}t.toUserSettingsGeneral=n;function a(l){return userSettingsUSMap.strToKeyCode(l)||userSettingsGeneralMap.strToKeyCode(l)}t.fromUserSettings=a;function r(l){if(l>=93&&l<=108)return null;switch(l){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return uiMap.keyCodeToStr(l)}t.toElectronAccelerator=r})(KeyCodeUtils||(KeyCodeUtils={}));function init$a(){return{has,getDamageColor,parseCss,tip:tip$1}}function has(t){return!lodash.exports.isNil(t)}function getDamageColor(t){return typeof t!="number"?"#f00":t===0?"#2f2":t<0?"#7f7":t<core.status.hero.hp/3?"#fff":t<core.status.hero.hp*2/3?"#ff4":t<core.status.hero.hp?"#f93":"#f22"}function setCanvasSize(t,e,i){t.width=e,t.height=i,t.style.width=`${e}px`,t.style.height=`${i}px`}function keycode(t){return EVENT_KEY_CODE_MAP[t]}function parseCss(t){const i=t.replace(/[\n\s\t]*/g,"").replace(/[;,]*/g,";").split(";"),s={};for(const n of i){const[a,r]=n.split(":"),l=a.replace(/\-([a-z])/g,(c,d)=>d.toUpperCase());s[l]=r}return s}function type(str,time=1e3,timing=t=>t,avr=!1){const toShow=eval("`"+str+"`");if(typeof toShow!="string")throw new TypeError("Error str type in typing!");if(toShow.startsWith("!!html"))return ref(toShow);avr&&(time*=toShow.length);const ani=new R,content=ref(""),all=toShow.length,fn=t=>{if(!has(t))return;const e=ani.x;content.value=toShow.slice(0,Math.floor(e)),Math.floor(e)===all&&(ani.ticker.destroy(),content.value=toShow)};return ani.ticker.add(fn),ani.mode(timing).time(time).move(all,0),setTimeout(()=>ani.ticker.destroy(),time+100),content}function tip$1(t,e){message[t]({content:e,class:"antdv-message"})}function splitText(t){return t.map((e,i,s)=>/^\d+\./.test(e)?`${" ".repeat(12)}${e}`:has(s[i-1])&&e!=="<br>"&&s[i-1]==="<br>"||i===0?`${" ".repeat(8)}${e}`:e).join("")}function downloadCanvasImage(t,e){const i=t.toDataURL("image/png");download(i,e)}function download(t,e){const i=document.createElement("a");i.download=`${e}.png`,i.href=t,document.body.appendChild(i),i.click(),document.body.removeChild(i)}const animation=[];let animateTime=0;function init$9(){return core.registerAnimationFrame("animateController",!0,t=>{if(!(t-animateTime<=core.values.animateSpeed)){for(const e of animation)e(t);animateTime=core.animateFrame.animateTime}}),{addAnimate,removeAnimate}}function addAnimate(t){animation.push(t)}function removeAnimate(t){const e=animation.findIndex(i=>i===t);e!==-1&&animation.splice(e,1)}const _hoisted_1$p=["width","height","id"],_sfc_main$p=defineComponent({__name:"boxAnimate",props:{id:null,noborder:{type:Boolean},width:null,height:null},setup(t){const e=t,i=(Math.random()*1e8).toFixed(0);let s,n,a;function r(){var f,g;if(i==="none")return;has(a)&&removeAnimate(a);const l=core.getClsFromId(e.id),c=core.getAnimateFrames(l),d=(f=e.width)!=null?f:32,u=(g=e.height)!=null?g:32;e.noborder||(s.style.border="1.5px solid #ddd",s.style.backgroundColor="#222");const h=window.devicePixelRatio;if(s.style.width=`${d}px`,s.style.height=`${u}px`,s.width=h*d,s.height=h*u,n.scale(h,h),e.id!=="none")if(e.id==="hero"){const m=core.material.images.hero;n.drawImage(m,0,0,m.width/4,m.height/4,0,0,d,u)}else c===1?core.drawIcon(n,e.id,0,0,e.width,e.height):(a=()=>{core.clearMap(n);const m=core.status.globalAnimateStatus%c;core.drawIcon(n,e.id,0,0,d,u,m)},a(),addAnimate(a),onUnmounted(()=>{removeAnimate(a)}))}return onMounted(()=>{s=document.getElementById(`box-animate-${i}`),n=s.getContext("2d"),r()}),onUpdated(()=>{r()}),(l,c)=>{var d,u;return openBlock(),createElementBlock("canvas",{width:(d=t.width)!=null?d:32,height:(u=t.height)!=null?u:32,id:`box-animate-${unref(i)}`},null,8,_hoisted_1$p)}}});function init$8(){return{useDrag,useWheel,useUp,isMobile}}const dragFnMap=new Map,isMobile=matchMedia("(max-width: 600px)").matches;function useDrag(t,e,i,s,n=!1){let a=!1;const r=g=>{a=!0,i&&i(g.clientX,g.clientY,g)},l=g=>{a=!0,i&&i(g.touches[0].clientX,g.touches[0].clientY,g)};t instanceof Array?t.forEach(g=>{g.addEventListener("mousedown",r),g.addEventListener("touchstart",l)}):(t.addEventListener("mousedown",r),t.addEventListener("touchstart",l));const c=n?document:t,d=g=>{!a||e(g.clientX,g.clientY,g)},u=g=>{!a||e(g.touches[0].clientX,g.touches[0].clientY,g)},h=g=>{!a||(s&&s(g),a=!1)},f=g=>{!a||(s&&s(g),a=!1)};c instanceof Array?c.forEach(g=>{g.addEventListener("mouseup",h),g.addEventListener("touchend",f),g.addEventListener("mousemove",d),g.addEventListener("touchmove",u)}):(c.addEventListener("mouseup",h),c.addEventListener("touchend",f),c.addEventListener("mousemove",d),c.addEventListener("touchmove",u)),dragFnMap.set(e,[d,u,h,f])}function cancelGlobalDrag(t){const e=dragFnMap.get(t);dragFnMap.delete(t),e&&(document.removeEventListener("mousemove",e[0]),document.removeEventListener("touchmove",e[1]),document.removeEventListener("mouseup",e[0]),document.removeEventListener("touchend",e[1]))}function useWheel(t,e){t.addEventListener("wheel",i=>{e(i.deltaX,i.deltaY,i.deltaZ,i)})}function useUp(t,e){t.addEventListener("mouseup",i=>{e(i.clientX,i.clientY,i)}),t.addEventListener("touchend",i=>{e(i.touches[0].clientX,i.touches[0].clientY,i)})}const _hoisted_1$o=["selected"],_hoisted_2$l={class:"info"},_hoisted_3$l={class:"leftbar"},_hoisted_4$i={class:"name"},_hoisted_5$f={key:0,class:"special-text"},_hoisted_6$d={key:1,class:"special-text"},_hoisted_7$b={class:"rightbar"},_hoisted_8$a={class:"detail"},_hoisted_9$a={class:"detail-info"},_hoisted_10$8={style:{color:"lightgreen"}},_hoisted_11$8={class:"detail-info"},_hoisted_12$6={style:{color:"lightcoral"}},_hoisted_13$6={class:"detail-info"},_hoisted_14$6={style:{color:"lightblue"}},_hoisted_15$5={class:"detail-info"},_hoisted_16$5={style:{color:"lightyellow"}},_hoisted_17$4={class:"detail-info"},_hoisted_18$4={style:{color:"lawngreen"}},_hoisted_19$4={class:"detail-info"},_hoisted_20$4={class:"detail-info"},_hoisted_21$4={style:{color:"lightsalmon"}},_hoisted_22$3={class:"detail-info"},_hoisted_23$3={style:{color:"lightpink"}},_hoisted_24$3={style:{"font-family":"'Fira Code'"}},_hoisted_25$2={class:"detail-info"},_hoisted_26$2={style:{color:"cyan"}},_sfc_main$o=defineComponent({__name:"enemyOne",props:{enemy:null,selected:{type:Boolean}},emits:["select","hover"],setup(t,{emit:e}){const i=window.core,s=window.innerWidth*.032;function n(r){e("select")}function a(){e("hover")}return(r,l)=>{const c=__unplugin_components_0;return openBlock(),createElementBlock("div",{class:"enemy-container",onClick:n,onMouseenter:a,selected:t.selected},[createBaseVNode("div",_hoisted_2$l,[createBaseVNode("div",_hoisted_3$l,[createBaseVNode("span",_hoisted_4$i,toDisplayString(t.enemy.name),1),createVNode(_sfc_main$p,{id:t.enemy.id,width:unref(isMobile)?32:s,height:unref(isMobile)?32:s,style:{margin:"5%"}},null,8,["id","width","height"]),unref(has)(t.enemy.special)&&t.enemy.special.length>0?(openBlock(),createElementBlock("div",_hoisted_5$f,[(openBlock(!0),createElementBlock(Fragment,null,renderList(t.enemy.toShowSpecial,(d,u)=>(openBlock(),createElementBlock("span",{style:normalizeStyle({color:t.enemy.toShowColor[u]})},"\xA0"+toDisplayString(d)+"\xA0",5))),256))])):(openBlock(),createElementBlock("div",_hoisted_6$d,"\u65E0\u5C5E\u6027"))]),createVNode(c,{type:"vertical",dashed:"",style:{height:"100%",margin:"0 3% 0 1%","border-color":"#ddd4"}}),createBaseVNode("div",_hoisted_7$b,[createBaseVNode("div",_hoisted_8$a,[createBaseVNode("div",_hoisted_9$a,[createBaseVNode("span",_hoisted_10$8,"\u751F\u547D\xA0\xA0\xA0\xA0"+toDisplayString(unref(i).formatBigNumber(t.enemy.hp)),1)]),createBaseVNode("div",_hoisted_11$8,[createBaseVNode("span",_hoisted_12$6,"\u653B\u51FB\xA0\xA0\xA0\xA0"+toDisplayString(unref(i).formatBigNumber(t.enemy.atk)),1)]),createBaseVNode("div",_hoisted_13$6,[createBaseVNode("span",_hoisted_14$6,"\u9632\u5FA1\xA0\xA0\xA0\xA0"+toDisplayString(unref(i).formatBigNumber(t.enemy.def)),1)]),createBaseVNode("div",_hoisted_15$5,[createBaseVNode("span",_hoisted_16$5,"\u91D1\u5E01\xA0\xA0\xA0\xA0"+toDisplayString(unref(i).formatBigNumber(t.enemy.money)),1)]),createBaseVNode("div",_hoisted_17$4,[createBaseVNode("span",_hoisted_18$4,"\u7ECF\u9A8C\xA0\xA0\xA0\xA0"+toDisplayString(unref(i).formatBigNumber(t.enemy.exp)),1)]),createBaseVNode("div",_hoisted_19$4,[createBaseVNode("span",{style:normalizeStyle({color:t.enemy.damageColor})},"\u4F24\u5BB3\xA0\xA0\xA0\xA0"+toDisplayString(unref(i).formatBigNumber(t.enemy.damage)),5)]),createBaseVNode("div",_hoisted_20$4,[createBaseVNode("span",_hoisted_21$4,"\u4E34\u754C\xA0\xA0\xA0\xA0"+toDisplayString(unref(i).formatBigNumber(t.enemy.critical)),1)]),createBaseVNode("div",_hoisted_22$3,[createBaseVNode("span",_hoisted_23$3,[createTextVNode("\u51CF\u4F24\xA0\xA0\xA0\xA0"),createBaseVNode("span",{style:normalizeStyle({color:t.enemy.criticalDamage<0&&!unref(has)(t.enemy.damage)?"gold":"lightpink"})},[createBaseVNode("span",_hoisted_24$3,toDisplayString(t.enemy.criticalDamage<0&&!unref(has)(t.enemy.damage)?unref(isMobile)?"-":"=>":""),1),createTextVNode(toDisplayString(unref(i).formatBigNumber(t.enemy.criticalDamage<0?-t.enemy.criticalDamage:t.enemy.criticalDamage)),1)],4)])]),createBaseVNode("div",_hoisted_25$2,[createBaseVNode("span",_hoisted_26$2,toDisplayString(unref(i).formatBigNumber(unref(i).status.thisMap.ratio))+"\u9632\xA0\xA0\xA0\xA0"+toDisplayString(unref(i).formatBigNumber(t.enemy.defDamage)),1)])])])])],40,_hoisted_1$o)}}}),enemyOne_vue_vue_type_style_index_0_scoped_03a35715_lang="",_export_sfc=(t,e)=>{const i=t.__vccOpts||t;for(const[s,n]of e)i[s]=n;return i},EnemyOne=_export_sfc(_sfc_main$o,[["__scopeId","data-v-03a35715"]]),_hoisted_1$n=["id"],_hoisted_2$k={class:"main-div"},_hoisted_3$k=["id"],_hoisted_4$h=["id"],_sfc_main$n=defineComponent({__name:"scroll",props:{now:null,type:null,drag:{type:Boolean},width:null,update:{type:Boolean},noScroll:{type:Boolean}},emits:["update:now","update:drag","update:update"],setup(t,{emit:e}){var W;const i=t;let s,n=0,a=0;const r=(1e8*Math.random()).toFixed(0),l=window.devicePixelRatio,c=(W=i.width)!=null?W:20,d=i.type==="horizontal"?"left":"top",u=i.type==="horizontal"?"width":"height";let h,f,g=!1;const m=async()=>{await w(),_()};function _(){if(a===0||(a<h.canvas[u]/l?n=0:n>a-h.canvas[u]/l?n=a-h.canvas[u]/l:n<0&&(n=0),i.noScroll))return;const L=h.canvas.width,U=h.canvas.height;e("update:now",n);const K=Math.min(h.canvas[u]/a/l,1)*h.canvas[u],X=n/a*h.canvas[u];h.clearRect(0,0,h.canvas.width,h.canvas.height),h.beginPath(),i.type==="horizontal"?(h.moveTo(Math.max(X+5,5),U/2),h.lineTo(Math.min(X+K-5,h.canvas.width-5),U/2)):(h.moveTo(L/2,Math.max(X+5,5)),h.lineTo(L/2,Math.min(X+K-5,h.canvas.height-5))),h.lineCap="round",h.lineWidth=6,h.strokeStyle="#fff",h.stroke()}async function w(){await S(20);const L=h.canvas,U=getComputedStyle(L);L.style.width=`${c}px`,L.width=c*l,L.height=parseFloat(U.height)*l,i.noScroll&&(L.style.width="0px"),i.type==="horizontal"&&(s.style.flexDirection="column",L.style.height=`${c}px`,L.style.width="98%",L.style.margin="0 1% 0 1%",L.width=parseFloat(U.width)*l,L.height=c*l,i.noScroll&&(L.style.height="0px")),await new Promise(K=>{requestAnimationFrame(()=>{const X=getComputedStyle(f);a=parseFloat(X[u]),K("")})})}function B(){_(),f.style[d]=`${-n}px`}onUpdated(async()=>{var L;g||(n=(L=i.now)!=null?L:n,f.style.transition=`${d} 0.2s ease-out`,await w(),B())});let D,P;function H(L,U){e("update:drag",!0);const K=i.type==="horizontal"?L:U,X=K-D;D=K,h.canvas[u]<a*l&&(n+=X*a/h.canvas[u]*l),B()}function N(L,U){e("update:drag",!0);const K=i.type==="horizontal"?L:U,X=K-P;P=K,h.canvas[u]<a*l&&(n-=X),B()}return onMounted(async()=>{s=document.getElementById(`scroll-div-${r}`),f=document.getElementById(`content-${r}`);const U=document.getElementById(`scroll-${r}`);h=U.getContext("2d"),i.noScroll||useDrag(U,H,(K,X)=>{g=!0,D=i.type==="horizontal"?K:X,f.style.transition=""},()=>{setTimeout(()=>e("update:drag",!1)),g=!1},!0),useDrag(f,N,(K,X)=>{g=!0,P=i.type==="horizontal"?K:X,f.style.transition=""},()=>{setTimeout(()=>e("update:drag",!1)),g=!1},!0),useWheel(f,(K,X)=>{g=!0;const Y=K!==0?K:X;Math.abs(Y)>30?f.style.transition=`${d} 0.2s ease-out`:f.style.transition="",n+=Y,B(),g=!1}),window.addEventListener("resize",m),await w(),_()}),onUnmounted(()=>{window.removeEventListener("resize",m),cancelGlobalDrag(H),cancelGlobalDrag(N)}),(L,U)=>(openBlock(),createElementBlock("div",{id:`scroll-div-${unref(r)}`,class:"scroll-main"},[createBaseVNode("div",_hoisted_2$k,[createBaseVNode("div",{id:`content-${unref(r)}`,class:"content"},[renderSlot(L.$slots,"default",{},void 0,!0)],8,_hoisted_3$k)]),createBaseVNode("canvas",{id:`scroll-${unref(r)}`,class:"scroll"},null,8,_hoisted_4$h)],8,_hoisted_1$n))}}),scroll_vue_vue_type_style_index_0_scoped_1626479d_lang="",Scroll=_export_sfc(_sfc_main$n,[["__scopeId","data-v-1626479d"]]);function getSpecialHint(t){const e=core.getSpecials().filter(n=>t.special.includes(n[0])).sort((n,a)=>n[0]-a[0]),i=e.map(n=>{const a=n[2];return a instanceof Function?a(t):a}),s=e.map(n=>{const a=n[1];return a instanceof Function?a(t):a});return createVNode("div",null,[e.map((n,a)=>createVNode("div",{class:"special"},[createVNode("span",{style:{color:core.arrayToRGBA(n[3])}},[createTextVNode("\xA0\xA0\xA0\xA0"),s[a],createTextVNode("\uFF1A")]),createVNode("span",{innerHTML:i[a]},null)]))])}function getDefDamage(t,e=0,i=0,s,n,a){var u;const r=core.status.thisMap.ratio,l=[];let c;const d=100-Math.floor(e/r);for(let h=0;h<=d;h++){const f=core.getDamageInfo(t.id,{def:core.getStatus("def")+r*h+e,atk:core.getStatus("atk")+i},s,n,a);if(l.length===0){c=f==null?void 0:f.damage,has(c)&&l.push([e+h*r,c]);continue}!has(f)||f.damage!==((u=l.at(-1))==null?void 0:u[1])&&(f.damage,l.push([r*h+e,f.damage]))}return l}function getCriticalDamage(t,e=0,i=0,s,n,a){var u;const r=core.status.thisMap.ratio,l=[];let c;const d=100-Math.floor(e/r);for(let h=0;h<=d;h++){const f=core.getDamageInfo(t.id,{atk:core.getStatus("atk")+r*h+e,def:core.getStatus("def")+i},s,n,a);if(l.length===0){c=f==null?void 0:f.damage,has(c)&&l.push([e+h*r,c]);continue}!has(f)||f.damage!==((u=l.at(-1))==null?void 0:u[1])&&(f.damage,l.push([r*h+e,f.damage]))}return l}const _withScopeId$a=t=>(pushScopeId("data-v-723dadcb"),t=t(),popScopeId(),t),_hoisted_1$m={id:"special-main"},_hoisted_2$j={id:"special"},_hoisted_3$j={id:"critical"},_hoisted_4$g=_withScopeId$a(()=>createBaseVNode("div",{style:{"font-size":"2.5vh",width:"100%","text-align":"center"}}," \u4E34\u754C\u8868 ",-1)),_hoisted_5$e={id:"critical-main"},_hoisted_6$c=_withScopeId$a(()=>createBaseVNode("div",{id:"critical-des"},[createBaseVNode("span",null,"\u52A0\u653B"),createBaseVNode("span",null,"\u51CF\u4F24")],-1)),_hoisted_7$a={class:"critical"},_hoisted_8$9={class:"critical-atk"},_hoisted_9$9={style:{"font-family":"'Fira Code'"}},_sfc_main$m=defineComponent({__name:"enemySpecial",props:{fromBook:{type:Boolean}},setup(t){const e=t,[i,s]=e.fromBook?[void 0,void 0]:flags.mouseLoc,n=has(i)?Math.round(i+core.bigmap.offsetX/32):void 0,a=has(s)?Math.round(s+core.bigmap.offsetY/32):void 0,r=core.plugin.bookDetailEnemy,l=getSpecialHint(r),c=core.nextCriticals(r,isMobile?4:8,n,a),d=core.formatBigNumber;return(u,h)=>{const f=Scroll,g=__unplugin_components_0;return openBlock(),createElementBlock("div",_hoisted_1$m,[createVNode(f,{id:"special-scroll"},{default:withCtx(()=>[createBaseVNode("div",_hoisted_2$j,[(openBlock(),createBlock(resolveDynamicComponent(unref(l))))])]),_:1}),createVNode(g,{dashed:"",style:{margin:"2vh 0 2vh 0","border-color":"#ddd4"}}),createBaseVNode("div",_hoisted_3$j,[_hoisted_4$g,createBaseVNode("div",_hoisted_5$e,[_hoisted_6$c,(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(c),([m,_])=>(openBlock(),createElementBlock("div",_hoisted_7$a,[createBaseVNode("span",_hoisted_8$9,toDisplayString(unref(d)(m)),1),createBaseVNode("span",null,[createBaseVNode("span",_hoisted_9$9,toDisplayString(_<0?"=>":""),1),createTextVNode(toDisplayString(_<0?`${unref(d)(-_)}`:unref(d)(_)),1)])]))),256))])])])}}}),enemySpecial_vue_vue_type_style_index_0_scoped_723dadcb_lang="",EnemySpecial=_export_sfc(_sfc_main$m,[["__scopeId","data-v-723dadcb"]]),index$5="",index$4="";/*!
|
|
* @kurkle/color v0.3.2
|
|
* https://github.com/kurkle/color#readme
|
|
* (c) 2023 Jukka Kurkela
|
|
* Released under the MIT License
|
|
*/function round(t){return t+.5|0}const lim=(t,e,i)=>Math.max(Math.min(t,i),e);function p2b(t){return lim(round(t*2.55),0,255)}function n2b(t){return lim(round(t*255),0,255)}function b2n(t){return lim(round(t/2.55)/100,0,1)}function n2p(t){return lim(round(t*100),0,100)}const map$1={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},hex=[..."0123456789ABCDEF"],h1=t=>hex[t&15],h2=t=>hex[(t&240)>>4]+hex[t&15],eq=t=>(t&240)>>4===(t&15),isShort=t=>eq(t.r)&&eq(t.g)&&eq(t.b)&&eq(t.a);function hexParse(t){var e=t.length,i;return t[0]==="#"&&(e===4||e===5?i={r:255&map$1[t[1]]*17,g:255&map$1[t[2]]*17,b:255&map$1[t[3]]*17,a:e===5?map$1[t[4]]*17:255}:(e===7||e===9)&&(i={r:map$1[t[1]]<<4|map$1[t[2]],g:map$1[t[3]]<<4|map$1[t[4]],b:map$1[t[5]]<<4|map$1[t[6]],a:e===9?map$1[t[7]]<<4|map$1[t[8]]:255})),i}const alpha=(t,e)=>t<255?e(t):"";function hexString(t){var e=isShort(t)?h1:h2;return t?"#"+e(t.r)+e(t.g)+e(t.b)+alpha(t.a,e):void 0}const HUE_RE=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function hsl2rgbn(t,e,i){const s=e*Math.min(i,1-i),n=(a,r=(a+t/30)%12)=>i-s*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function hsv2rgbn(t,e,i){const s=(n,a=(n+t/60)%6)=>i-i*e*Math.max(Math.min(a,4-a,1),0);return[s(5),s(3),s(1)]}function hwb2rgbn(t,e,i){const s=hsl2rgbn(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function hueValue(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}function rgb2hsl(t){const i=t.r/255,s=t.g/255,n=t.b/255,a=Math.max(i,s,n),r=Math.min(i,s,n),l=(a+r)/2;let c,d,u;return a!==r&&(u=a-r,d=l>.5?u/(2-a-r):u/(a+r),c=hueValue(i,s,n,u,a),c=c*60+.5),[c|0,d||0,l]}function calln(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(n2b)}function hsl2rgb(t,e,i){return calln(hsl2rgbn,t,e,i)}function hwb2rgb(t,e,i){return calln(hwb2rgbn,t,e,i)}function hsv2rgb(t,e,i){return calln(hsv2rgbn,t,e,i)}function hue(t){return(t%360+360)%360}function hueParse(t){const e=HUE_RE.exec(t);let i=255,s;if(!e)return;e[5]!==s&&(i=e[6]?p2b(+e[5]):n2b(+e[5]));const n=hue(+e[2]),a=+e[3]/100,r=+e[4]/100;return e[1]==="hwb"?s=hwb2rgb(n,a,r):e[1]==="hsv"?s=hsv2rgb(n,a,r):s=hsl2rgb(n,a,r),{r:s[0],g:s[1],b:s[2],a:i}}function rotate(t,e){var i=rgb2hsl(t);i[0]=hue(i[0]+e),i=hsl2rgb(i),t.r=i[0],t.g=i[1],t.b=i[2]}function hslString(t){if(!t)return;const e=rgb2hsl(t),i=e[0],s=n2p(e[1]),n=n2p(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${b2n(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}const map$2={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},names$1={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function unpack(){const t={},e=Object.keys(names$1),i=Object.keys(map$2);let s,n,a,r,l;for(s=0;s<e.length;s++){for(r=l=e[s],n=0;n<i.length;n++)a=i[n],l=l.replace(a,map$2[a]);a=parseInt(names$1[r],16),t[l]=[a>>16&255,a>>8&255,a&255]}return t}let names;function nameParse(t){names||(names=unpack(),names.transparent=[0,0,0,0]);const e=names[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const RGB_RE=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function rgbParse(t){const e=RGB_RE.exec(t);let i=255,s,n,a;if(!!e){if(e[7]!==s){const r=+e[7];i=e[8]?p2b(r):lim(r*255,0,255)}return s=+e[1],n=+e[3],a=+e[5],s=255&(e[2]?p2b(s):lim(s,0,255)),n=255&(e[4]?p2b(n):lim(n,0,255)),a=255&(e[6]?p2b(a):lim(a,0,255)),{r:s,g:n,b:a,a:i}}}function rgbString(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${b2n(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const to=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,from=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function interpolate$1(t,e,i){const s=from(b2n(t.r)),n=from(b2n(t.g)),a=from(b2n(t.b));return{r:n2b(to(s+i*(from(b2n(e.r))-s))),g:n2b(to(n+i*(from(b2n(e.g))-n))),b:n2b(to(a+i*(from(b2n(e.b))-a))),a:t.a+i*(e.a-t.a)}}function modHSL(t,e,i){if(t){let s=rgb2hsl(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,e===0?360:1)),s=hsl2rgb(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function clone$1(t,e){return t&&Object.assign(e||{},t)}function fromObject(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=n2b(t[3]))):(e=clone$1(t,{r:0,g:0,b:0,a:1}),e.a=n2b(e.a)),e}function functionParse(t){return t.charAt(0)==="r"?rgbParse(t):hueParse(t)}class Color{constructor(e){if(e instanceof Color)return e;const i=typeof e;let s;i==="object"?s=fromObject(e):i==="string"&&(s=hexParse(e)||nameParse(e)||functionParse(e)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var e=clone$1(this._rgb);return e&&(e.a=b2n(e.a)),e}set rgb(e){this._rgb=fromObject(e)}rgbString(){return this._valid?rgbString(this._rgb):void 0}hexString(){return this._valid?hexString(this._rgb):void 0}hslString(){return this._valid?hslString(this._rgb):void 0}mix(e,i){if(e){const s=this.rgb,n=e.rgb;let a;const r=i===a?.5:i,l=2*r-1,c=s.a-n.a,d=((l*c===-1?l:(l+c)/(1+l*c))+1)/2;a=1-d,s.r=255&d*s.r+a*n.r+.5,s.g=255&d*s.g+a*n.g+.5,s.b=255&d*s.b+a*n.b+.5,s.a=r*s.a+(1-r)*n.a,this.rgb=s}return this}interpolate(e,i){return e&&(this._rgb=interpolate$1(this._rgb,e._rgb,i)),this}clone(){return new Color(this.rgb)}alpha(e){return this._rgb.a=n2b(e),this}clearer(e){const i=this._rgb;return i.a*=1-e,this}greyscale(){const e=this._rgb,i=round(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=i,this}opaquer(e){const i=this._rgb;return i.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return modHSL(this._rgb,2,e),this}darken(e){return modHSL(this._rgb,2,-e),this}saturate(e){return modHSL(this._rgb,1,e),this}desaturate(e){return modHSL(this._rgb,1,-e),this}rotate(e){return rotate(this._rgb,e),this}}/*!
|
|
* Chart.js v4.1.2
|
|
* https://www.chartjs.org
|
|
* (c) 2023 Chart.js Contributors
|
|
* Released under the MIT License
|
|
*/function noop(){}const uid=(()=>{let t=0;return()=>t++})();function isNullOrUndef(t){return t===null||typeof t>"u"}function isArray(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function isObject(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function isNumberFinite(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function finiteOrDefault(t,e){return isNumberFinite(t)?t:e}function valueOrDefault(t,e){return typeof t>"u"?e:t}const toPercentage=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,toDimension=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function callback(t,e,i){if(t&&typeof t.call=="function")return t.apply(i,e)}function each(t,e,i,s){let n,a,r;if(isArray(t))if(a=t.length,s)for(n=a-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;n<a;n++)e.call(i,t[n],n);else if(isObject(t))for(r=Object.keys(t),a=r.length,n=0;n<a;n++)e.call(i,t[r[n]],r[n])}function _elementsEqual(t,e){let i,s,n,a;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(n=t[i],a=e[i],n.datasetIndex!==a.datasetIndex||n.index!==a.index)return!1;return!0}function clone(t){if(isArray(t))return t.map(clone);if(isObject(t)){const e=Object.create(null),i=Object.keys(t),s=i.length;let n=0;for(;n<s;++n)e[i[n]]=clone(t[i[n]]);return e}return t}function isValidKey(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function _merger(t,e,i,s){if(!isValidKey(t))return;const n=e[t],a=i[t];isObject(n)&&isObject(a)?merge(n,a,s):e[t]=clone(a)}function merge(t,e,i){const s=isArray(e)?e:[e],n=s.length;if(!isObject(t))return t;i=i||{};const a=i.merger||_merger;let r;for(let l=0;l<n;++l){if(r=s[l],!isObject(r))continue;const c=Object.keys(r);for(let d=0,u=c.length;d<u;++d)a(c[d],t,r,i)}return t}function mergeIf(t,e){return merge(t,e,{merger:_mergerIf})}function _mergerIf(t,e,i){if(!isValidKey(t))return;const s=e[t],n=i[t];isObject(s)&&isObject(n)?mergeIf(s,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=clone(n))}const keyResolvers={"":t=>t,x:t=>t.x,y:t=>t.y};function _splitKey(t){const e=t.split("."),i=[];let s="";for(const n of e)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}function _getKeyResolver(t){const e=_splitKey(t);return i=>{for(const s of e){if(s==="")break;i=i&&i[s]}return i}}function resolveObjectKey(t,e){return(keyResolvers[e]||(keyResolvers[e]=_getKeyResolver(e)))(t)}function _capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)}const defined=t=>typeof t<"u",isFunction=t=>typeof t=="function",setsEqual=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function _isClickEvent(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const PI=Math.PI,TAU=2*PI,PITAU=TAU+PI,INFINITY=Number.POSITIVE_INFINITY,RAD_PER_DEG=PI/180,HALF_PI=PI/2,QUARTER_PI=PI/4,TWO_THIRDS_PI=PI*2/3,log10=Math.log10,sign=Math.sign;function almostEquals(t,e,i){return Math.abs(t-e)<i}function niceNum(t){const e=Math.round(t);t=almostEquals(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(log10(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function _factorize(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s===0&&(e.push(s),e.push(t/s));return i===(i|0)&&e.push(i),e.sort((n,a)=>n-a).pop(),e}function isNumber(t){return!isNaN(parseFloat(t))&&isFinite(t)}function almostWhole(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function _setMinAndMaxByKey(t,e,i){let s,n,a;for(s=0,n=t.length;s<n;s++)a=t[s][i],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function toRadians(t){return t*(PI/180)}function toDegrees(t){return t*(180/PI)}function _decimalPlaces(t){if(!isNumberFinite(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function getAngleFromPoint(t,e){const i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);let a=Math.atan2(s,i);return a<-.5*PI&&(a+=TAU),{angle:a,distance:n}}function distanceBetweenPoints(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function _angleDiff(t,e){return(t-e+PITAU)%TAU-PI}function _normalizeAngle(t){return(t%TAU+TAU)%TAU}function _angleBetween(t,e,i,s){const n=_normalizeAngle(t),a=_normalizeAngle(e),r=_normalizeAngle(i),l=_normalizeAngle(a-n),c=_normalizeAngle(r-n),d=_normalizeAngle(n-a),u=_normalizeAngle(n-r);return n===a||n===r||s&&a===r||l>c&&d<u}function _limitValue(t,e,i){return Math.max(e,Math.min(i,t))}function _int16Range(t){return _limitValue(t,-32768,32767)}function _isBetween(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function _lookup(t,e,i){i=i||(r=>t[r]<e);let s=t.length-1,n=0,a;for(;s-n>1;)a=n+s>>1,i(a)?n=a:s=a;return{lo:n,hi:s}}const _lookupByKey=(t,e,i,s)=>_lookup(t,i,s?n=>{const a=t[n][e];return a<i||a===i&&t[n+1][e]===i}:n=>t[n][e]<i),_rlookupByKey=(t,e,i)=>_lookup(t,i,s=>t[s][e]>=i);function _filterBetween(t,e,i){let s=0,n=t.length;for(;s<n&&t[s]<e;)s++;for(;n>s&&t[n-1]>i;)n--;return s>0||n<t.length?t.slice(s,n):t}const arrayEvents=["push","pop","shift","splice","unshift"];function listenArrayEvents(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),arrayEvents.forEach(i=>{const s="_onData"+_capitalize(i),n=t[i];Object.defineProperty(t,i,{configurable:!0,enumerable:!1,value(...a){const r=n.apply(this,a);return t._chartjs.listeners.forEach(l=>{typeof l[s]=="function"&&l[s](...a)}),r}})})}function unlistenArrayEvents(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);n!==-1&&s.splice(n,1),!(s.length>0)&&(arrayEvents.forEach(a=>{delete t[a]}),delete t._chartjs)}function _arrayUnique(t){const e=new Set;let i,s;for(i=0,s=t.length;i<s;++i)e.add(t[i]);return e.size===s?t:Array.from(e)}const requestAnimFrame=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function throttled(t,e){let i=[],s=!1;return function(...n){i=n,s||(s=!0,requestAnimFrame.call(window,()=>{s=!1,t.apply(e,i)}))}}function debounce(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}const _toLeftRightCenter=t=>t==="start"?"left":t==="end"?"right":"center",_alignStartEnd=(t,e,i)=>t==="start"?e:t==="end"?i:(e+i)/2,_textX=(t,e,i,s)=>t===(s?"left":"right")?i:t==="center"?(e+i)/2:e;function _getStartAndCountOfVisiblePoints(t,e,i){const s=e.length;let n=0,a=s;if(t._sorted){const{iScale:r,_parsed:l}=t,c=r.axis,{min:d,max:u,minDefined:h,maxDefined:f}=r.getUserBounds();h&&(n=_limitValue(Math.min(_lookupByKey(l,r.axis,d).lo,i?s:_lookupByKey(e,c,r.getPixelForValue(d)).lo),0,s-1)),f?a=_limitValue(Math.max(_lookupByKey(l,r.axis,u,!0).hi+1,i?0:_lookupByKey(e,c,r.getPixelForValue(u),!0).hi+1),n,s)-n:a=s-n}return{start:n,count:a}}function _scaleRangesChanged(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const a=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),a}const atEdge=t=>t===0||t===1,elasticIn=(t,e,i)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*TAU/i)),elasticOut=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*TAU/i)+1,effects={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*HALF_PI)+1,easeOutSine:t=>Math.sin(t*HALF_PI),easeInOutSine:t=>-.5*(Math.cos(PI*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>atEdge(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>atEdge(t)?t:elasticIn(t,.075,.3),easeOutElastic:t=>atEdge(t)?t:elasticOut(t,.075,.3),easeInOutElastic(t){return atEdge(t)?t:t<.5?.5*elasticIn(t*2,.1125,.45):.5+.5*elasticOut(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-effects.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?effects.easeInBounce(t*2)*.5:effects.easeOutBounce(t*2-1)*.5+.5};function isPatternOrGradient(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function color(t){return isPatternOrGradient(t)?t:new Color(t)}function getHoverColor(t){return isPatternOrGradient(t)?t:new Color(t).saturate(.5).darken(.1).hexString()}const numbers=["x","y","borderWidth","radius","tension"],colors=["color","borderColor","backgroundColor"];function applyAnimationsDefaults(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:colors},numbers:{type:"number",properties:numbers}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function applyLayoutsDefaults(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const intlCache=new Map;function getNumberFormat(t,e){e=e||{};const i=t+JSON.stringify(e);let s=intlCache.get(i);return s||(s=new Intl.NumberFormat(t,e),intlCache.set(i,s)),s}function formatNumber(t,e,i){return getNumberFormat(e,i).format(t)}const formatters={values(t){return isArray(t)?t:""+t},numeric(t,e,i){if(t===0)return"0";const s=this.chart.options.locale;let n,a=t;if(i.length>1){const d=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(d<1e-4||d>1e15)&&(n="scientific"),a=calculateDelta(t,i)}const r=log10(Math.abs(a)),l=Math.max(Math.min(-1*Math.floor(r),20),0),c={notation:n,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),formatNumber(t,s,c)},logarithmic(t,e,i){if(t===0)return"0";const s=i[e].significand||t/Math.pow(10,Math.floor(log10(t)));return[1,2,3,5,10,15].includes(s)||e>.8*i.length?formatters.numeric.call(this,t,e,i):""}};function calculateDelta(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}var Ticks={formatters};function applyScaleDefaults(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,i)=>i.lineWidth,tickColor:(e,i)=>i.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ticks.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const overrides=Object.create(null),descriptors=Object.create(null);function getScope$1(t,e){if(!e)return t;const i=e.split(".");for(let s=0,n=i.length;s<n;++s){const a=i[s];t=t[a]||(t[a]=Object.create(null))}return t}function set(t,e,i){return typeof e=="string"?merge(getScope$1(t,e),i):merge(getScope$1(t,""),e)}class Defaults{constructor(e,i){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>getHoverColor(n.backgroundColor),this.hoverBorderColor=(s,n)=>getHoverColor(n.borderColor),this.hoverColor=(s,n)=>getHoverColor(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(i)}set(e,i){return set(this,e,i)}get(e){return getScope$1(this,e)}describe(e,i){return set(descriptors,e,i)}override(e,i){return set(overrides,e,i)}route(e,i,s,n){const a=getScope$1(this,e),r=getScope$1(this,s),l="_"+i;Object.defineProperties(a,{[l]:{value:a[i],writable:!0},[i]:{enumerable:!0,get(){const c=this[l],d=r[n];return isObject(c)?Object.assign({},d,c):valueOrDefault(c,d)},set(c){this[l]=c}}})}apply(e){e.forEach(i=>i(this))}}var defaults=new Defaults({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[applyAnimationsDefaults,applyLayoutsDefaults,applyScaleDefaults]);function toFontString(t){return!t||isNullOrUndef(t.size)||isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function _measureText(t,e,i,s,n){let a=e[n];return a||(a=e[n]=t.measureText(n).width,i.push(n)),a>s&&(s=a),s}function _longestText(t,e,i,s){s=s||{};let n=s.data=s.data||{},a=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(n=s.data={},a=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let r=0;const l=i.length;let c,d,u,h,f;for(c=0;c<l;c++)if(h=i[c],h!=null&&isArray(h)!==!0)r=_measureText(t,n,a,r,h);else if(isArray(h))for(d=0,u=h.length;d<u;d++)f=h[d],f!=null&&!isArray(f)&&(r=_measureText(t,n,a,r,f));t.restore();const g=a.length/2;if(g>i.length){for(c=0;c<g;c++)delete n[a[c]];a.splice(0,g)}return r}function _alignPixel(t,e,i){const s=t.currentDevicePixelRatio,n=i!==0?Math.max(i/2,.5):0;return Math.round((e-n)*s)/s+n}function clearCanvas(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function drawPoint(t,e,i,s){drawPointLegend(t,e,i,s,null)}function drawPointLegend(t,e,i,s,n){let a,r,l,c,d,u,h,f;const g=e.pointStyle,m=e.rotation,_=e.radius;let w=(m||0)*RAD_PER_DEG;if(g&&typeof g=="object"&&(a=g.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){t.save(),t.translate(i,s),t.rotate(w),t.drawImage(g,-g.width/2,-g.height/2,g.width,g.height),t.restore();return}if(!(isNaN(_)||_<=0)){switch(t.beginPath(),g){default:n?t.ellipse(i,s,n/2,_,0,0,TAU):t.arc(i,s,_,0,TAU),t.closePath();break;case"triangle":u=n?n/2:_,t.moveTo(i+Math.sin(w)*u,s-Math.cos(w)*_),w+=TWO_THIRDS_PI,t.lineTo(i+Math.sin(w)*u,s-Math.cos(w)*_),w+=TWO_THIRDS_PI,t.lineTo(i+Math.sin(w)*u,s-Math.cos(w)*_),t.closePath();break;case"rectRounded":d=_*.516,c=_-d,r=Math.cos(w+QUARTER_PI)*c,h=Math.cos(w+QUARTER_PI)*(n?n/2-d:c),l=Math.sin(w+QUARTER_PI)*c,f=Math.sin(w+QUARTER_PI)*(n?n/2-d:c),t.arc(i-h,s-l,d,w-PI,w-HALF_PI),t.arc(i+f,s-r,d,w-HALF_PI,w),t.arc(i+h,s+l,d,w,w+HALF_PI),t.arc(i-f,s+r,d,w+HALF_PI,w+PI),t.closePath();break;case"rect":if(!m){c=Math.SQRT1_2*_,u=n?n/2:c,t.rect(i-u,s-c,2*u,2*c);break}w+=QUARTER_PI;case"rectRot":h=Math.cos(w)*(n?n/2:_),r=Math.cos(w)*_,l=Math.sin(w)*_,f=Math.sin(w)*(n?n/2:_),t.moveTo(i-h,s-l),t.lineTo(i+f,s-r),t.lineTo(i+h,s+l),t.lineTo(i-f,s+r),t.closePath();break;case"crossRot":w+=QUARTER_PI;case"cross":h=Math.cos(w)*(n?n/2:_),r=Math.cos(w)*_,l=Math.sin(w)*_,f=Math.sin(w)*(n?n/2:_),t.moveTo(i-h,s-l),t.lineTo(i+h,s+l),t.moveTo(i+f,s-r),t.lineTo(i-f,s+r);break;case"star":h=Math.cos(w)*(n?n/2:_),r=Math.cos(w)*_,l=Math.sin(w)*_,f=Math.sin(w)*(n?n/2:_),t.moveTo(i-h,s-l),t.lineTo(i+h,s+l),t.moveTo(i+f,s-r),t.lineTo(i-f,s+r),w+=QUARTER_PI,h=Math.cos(w)*(n?n/2:_),r=Math.cos(w)*_,l=Math.sin(w)*_,f=Math.sin(w)*(n?n/2:_),t.moveTo(i-h,s-l),t.lineTo(i+h,s+l),t.moveTo(i+f,s-r),t.lineTo(i-f,s+r);break;case"line":r=n?n/2:Math.cos(w)*_,l=Math.sin(w)*_,t.moveTo(i-r,s-l),t.lineTo(i+r,s+l);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(w)*(n?n/2:_),s+Math.sin(w)*_);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function _isPointInArea(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function clipArea(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function unclipArea(t){t.restore()}function _steppedLineTo(t,e,i,s,n){if(!e)return t.lineTo(i.x,i.y);if(n==="middle"){const a=(e.x+i.x)/2;t.lineTo(a,e.y),t.lineTo(a,i.y)}else n==="after"!=!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function _bezierCurveTo(t,e,i,s){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?i.cp2x:i.cp1x,s?i.cp2y:i.cp1y,i.x,i.y)}function renderText(t,e,i,s,n,a={}){const r=isArray(e)?e:[e],l=a.strokeWidth>0&&a.strokeColor!=="";let c,d;for(t.save(),t.font=n.string,setRenderOpts(t,a),c=0;c<r.length;++c)d=r[c],a.backdrop&&drawBackdrop(t,a.backdrop),l&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),isNullOrUndef(a.strokeWidth)||(t.lineWidth=a.strokeWidth),t.strokeText(d,i,s,a.maxWidth)),t.fillText(d,i,s,a.maxWidth),decorateText(t,i,s,d,a),s+=n.lineHeight;t.restore()}function setRenderOpts(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),isNullOrUndef(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function decorateText(t,e,i,s,n){if(n.strikethrough||n.underline){const a=t.measureText(s),r=e-a.actualBoundingBoxLeft,l=e+a.actualBoundingBoxRight,c=i-a.actualBoundingBoxAscent,d=i+a.actualBoundingBoxDescent,u=n.strikethrough?(c+d)/2:d;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(r,u),t.lineTo(l,u),t.stroke()}}function drawBackdrop(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function addRoundedRectPath(t,e){const{x:i,y:s,w:n,h:a,radius:r}=e;t.arc(i+r.topLeft,s+r.topLeft,r.topLeft,-HALF_PI,PI,!0),t.lineTo(i,s+a-r.bottomLeft),t.arc(i+r.bottomLeft,s+a-r.bottomLeft,r.bottomLeft,PI,HALF_PI,!0),t.lineTo(i+n-r.bottomRight,s+a),t.arc(i+n-r.bottomRight,s+a-r.bottomRight,r.bottomRight,HALF_PI,0,!0),t.lineTo(i+n,s+r.topRight),t.arc(i+n-r.topRight,s+r.topRight,r.topRight,0,-HALF_PI,!0),t.lineTo(i+r.topLeft,s)}const LINE_HEIGHT=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,FONT_STYLE=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function toLineHeight(t,e){const i=(""+t).match(LINE_HEIGHT);if(!i||i[1]==="normal")return e*1.2;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100;break}return e*t}const numberOrZero=t=>+t||0;function _readValueToProps(t,e){const i={},s=isObject(e),n=s?Object.keys(e):e,a=isObject(t)?s?r=>valueOrDefault(t[r],t[e[r]]):r=>t[r]:()=>t;for(const r of n)i[r]=numberOrZero(a(r));return i}function toTRBL(t){return _readValueToProps(t,{top:"y",right:"x",bottom:"y",left:"x"})}function toTRBLCorners(t){return _readValueToProps(t,["topLeft","topRight","bottomLeft","bottomRight"])}function toPadding(t){const e=toTRBL(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function toFont(t,e){t=t||{},e=e||defaults.font;let i=valueOrDefault(t.size,e.size);typeof i=="string"&&(i=parseInt(i,10));let s=valueOrDefault(t.style,e.style);s&&!(""+s).match(FONT_STYLE)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:valueOrDefault(t.family,e.family),lineHeight:toLineHeight(valueOrDefault(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:valueOrDefault(t.weight,e.weight),string:""};return n.string=toFontString(n),n}function resolve(t,e,i,s){let n=!0,a,r,l;for(a=0,r=t.length;a<r;++a)if(l=t[a],l!==void 0&&(e!==void 0&&typeof l=="function"&&(l=l(e),n=!1),i!==void 0&&isArray(l)&&(l=l[i%l.length],n=!1),l!==void 0))return s&&!n&&(s.cacheable=!1),l}function _addGrace(t,e,i){const{min:s,max:n}=t,a=toDimension(e,(n-s)/2),r=(l,c)=>i&&l===0?0:l+c;return{min:r(s,-Math.abs(a)),max:r(n,a)}}function createContext(t,e){return Object.assign(Object.create(t),e)}function _createResolver(t,e=[""],i=t,s,n=()=>t[0]){defined(s)||(s=_resolve("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:s,_getTarget:n,override:r=>_createResolver([r,...t],e,i,s)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete t[0][l],!0},get(r,l){return _cached(r,l,()=>_resolveWithPrefixes(l,e,t,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(r,l){return getKeysFromAllScopes(r).includes(l)},ownKeys(r){return getKeysFromAllScopes(r)},set(r,l,c){const d=r._storage||(r._storage=n());return r[l]=d[l]=c,delete r._keys,!0}})}function _attachContext(t,e,i,s){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:_descriptors(t,s),setContext:a=>_attachContext(t,a,i,s),override:a=>_attachContext(t.override(a),e,i,s)};return new Proxy(n,{deleteProperty(a,r){return delete a[r],delete t[r],!0},get(a,r,l){return _cached(a,r,()=>_resolveWithContext(a,r,l))},getOwnPropertyDescriptor(a,r){return a._descriptors.allKeys?Reflect.has(t,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,r)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(a,r){return Reflect.has(t,r)},ownKeys(){return Reflect.ownKeys(t)},set(a,r,l){return t[r]=l,delete a[r],!0}})}function _descriptors(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:isFunction(i)?i:()=>i,isIndexable:isFunction(s)?s:()=>s}}const readKey=(t,e)=>t?t+_capitalize(e):e,needsSubResolver=(t,e)=>isObject(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function _cached(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const s=i();return t[e]=s,s}function _resolveWithContext(t,e,i){const{_proxy:s,_context:n,_subProxy:a,_descriptors:r}=t;let l=s[e];return isFunction(l)&&r.isScriptable(e)&&(l=_resolveScriptable(e,l,t,i)),isArray(l)&&l.length&&(l=_resolveArray(e,l,t,r.isIndexable)),needsSubResolver(e,l)&&(l=_attachContext(l,n,a&&a[e],r)),l}function _resolveScriptable(t,e,i,s){const{_proxy:n,_context:a,_subProxy:r,_stack:l}=i;if(l.has(t))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+t);return l.add(t),e=e(a,r||s),l.delete(t),needsSubResolver(t,e)&&(e=createSubResolver(n._scopes,n,t,e)),e}function _resolveArray(t,e,i,s){const{_proxy:n,_context:a,_subProxy:r,_descriptors:l}=i;if(defined(a.index)&&s(t))e=e[a.index%e.length];else if(isObject(e[0])){const c=e,d=n._scopes.filter(u=>u!==c);e=[];for(const u of c){const h=createSubResolver(d,n,t,u);e.push(_attachContext(h,a,r&&r[t],l))}}return e}function resolveFallback(t,e,i){return isFunction(t)?t(e,i):t}const getScope=(t,e)=>t===!0?e:typeof t=="string"?resolveObjectKey(e,t):void 0;function addScopes(t,e,i,s,n){for(const a of e){const r=getScope(i,a);if(r){t.add(r);const l=resolveFallback(r._fallback,i,n);if(defined(l)&&l!==i&&l!==s)return l}else if(r===!1&&defined(s)&&i!==s)return null}return!1}function createSubResolver(t,e,i,s){const n=e._rootScopes,a=resolveFallback(e._fallback,i,s),r=[...t,...n],l=new Set;l.add(s);let c=addScopesFromKey(l,r,i,a||i,s);return c===null||defined(a)&&a!==i&&(c=addScopesFromKey(l,r,a,c,s),c===null)?!1:_createResolver(Array.from(l),[""],n,a,()=>subGetTarget(e,i,s))}function addScopesFromKey(t,e,i,s,n){for(;i;)i=addScopes(t,e,i,s,n);return i}function subGetTarget(t,e,i){const s=t._getTarget();e in s||(s[e]={});const n=s[e];return isArray(n)&&isObject(i)?i:n||{}}function _resolveWithPrefixes(t,e,i,s){let n;for(const a of e)if(n=_resolve(readKey(a,t),i),defined(n))return needsSubResolver(t,n)?createSubResolver(i,s,t,n):n}function _resolve(t,e){for(const i of e){if(!i)continue;const s=i[t];if(defined(s))return s}}function getKeysFromAllScopes(t){let e=t._keys;return e||(e=t._keys=resolveKeysFromAllScopes(t._scopes)),e}function resolveKeysFromAllScopes(t){const e=new Set;for(const i of t)for(const s of Object.keys(i).filter(n=>!n.startsWith("_")))e.add(s);return Array.from(e)}function _parseObjectDataRadialScale(t,e,i,s){const{iScale:n}=t,{key:a="r"}=this._parsing,r=new Array(s);let l,c,d,u;for(l=0,c=s;l<c;++l)d=l+i,u=e[d],r[l]={r:n.parse(resolveObjectKey(u,a),d)};return r}const EPSILON=Number.EPSILON||1e-14,getPoint=(t,e)=>e<t.length&&!t[e].skip&&t[e],getValueAxis=t=>t==="x"?"y":"x";function splineCurve(t,e,i,s){const n=t.skip?e:t,a=e,r=i.skip?e:i,l=distanceBetweenPoints(a,n),c=distanceBetweenPoints(r,a);let d=l/(l+c),u=c/(l+c);d=isNaN(d)?0:d,u=isNaN(u)?0:u;const h=s*d,f=s*u;return{previous:{x:a.x-h*(r.x-n.x),y:a.y-h*(r.y-n.y)},next:{x:a.x+f*(r.x-n.x),y:a.y+f*(r.y-n.y)}}}function monotoneAdjust(t,e,i){const s=t.length;let n,a,r,l,c,d=getPoint(t,0);for(let u=0;u<s-1;++u)if(c=d,d=getPoint(t,u+1),!(!c||!d)){if(almostEquals(e[u],0,EPSILON)){i[u]=i[u+1]=0;continue}n=i[u]/e[u],a=i[u+1]/e[u],l=Math.pow(n,2)+Math.pow(a,2),!(l<=9)&&(r=3/Math.sqrt(l),i[u]=n*r*e[u],i[u+1]=a*r*e[u])}}function monotoneCompute(t,e,i="x"){const s=getValueAxis(i),n=t.length;let a,r,l,c=getPoint(t,0);for(let d=0;d<n;++d){if(r=l,l=c,c=getPoint(t,d+1),!l)continue;const u=l[i],h=l[s];r&&(a=(u-r[i])/3,l[`cp1${i}`]=u-a,l[`cp1${s}`]=h-a*e[d]),c&&(a=(c[i]-u)/3,l[`cp2${i}`]=u+a,l[`cp2${s}`]=h+a*e[d])}}function splineCurveMonotone(t,e="x"){const i=getValueAxis(e),s=t.length,n=Array(s).fill(0),a=Array(s);let r,l,c,d=getPoint(t,0);for(r=0;r<s;++r)if(l=c,c=d,d=getPoint(t,r+1),!!c){if(d){const u=d[e]-c[e];n[r]=u!==0?(d[i]-c[i])/u:0}a[r]=l?d?sign(n[r-1])!==sign(n[r])?0:(n[r-1]+n[r])/2:n[r-1]:n[r]}monotoneAdjust(t,n,a),monotoneCompute(t,a,e)}function capControlPoint(t,e,i){return Math.max(Math.min(t,i),e)}function capBezierPoints(t,e){let i,s,n,a,r,l=_isPointInArea(t[0],e);for(i=0,s=t.length;i<s;++i)r=a,a=l,l=i<s-1&&_isPointInArea(t[i+1],e),a&&(n=t[i],r&&(n.cp1x=capControlPoint(n.cp1x,e.left,e.right),n.cp1y=capControlPoint(n.cp1y,e.top,e.bottom)),l&&(n.cp2x=capControlPoint(n.cp2x,e.left,e.right),n.cp2y=capControlPoint(n.cp2y,e.top,e.bottom)))}function _updateBezierControlPoints(t,e,i,s,n){let a,r,l,c;if(e.spanGaps&&(t=t.filter(d=>!d.skip)),e.cubicInterpolationMode==="monotone")splineCurveMonotone(t,n);else{let d=s?t[t.length-1]:t[0];for(a=0,r=t.length;a<r;++a)l=t[a],c=splineCurve(d,l,t[Math.min(a+1,r-(s?0:1))%r],e.tension),l.cp1x=c.previous.x,l.cp1y=c.previous.y,l.cp2x=c.next.x,l.cp2y=c.next.y,d=l}e.capBezierPoints&&capBezierPoints(t,i)}function _isDomSupported(){return typeof window<"u"&&typeof document<"u"}function _getParentNode(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function parseMaxStyle(t,e,i){let s;return typeof t=="string"?(s=parseInt(t,10),t.indexOf("%")!==-1&&(s=s/100*e.parentNode[i])):s=t,s}const getComputedStyle$1=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function getStyle(t,e){return getComputedStyle$1(t).getPropertyValue(e)}const positions=["top","right","bottom","left"];function getPositionedStyle(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const a=positions[n];s[a]=parseFloat(t[e+"-"+a+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const useOffsetPos=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function getCanvasPosition(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:a}=s;let r=!1,l,c;if(useOffsetPos(n,a,t.target))l=n,c=a;else{const d=e.getBoundingClientRect();l=s.clientX-d.left,c=s.clientY-d.top,r=!0}return{x:l,y:c,box:r}}function getRelativePosition(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=getComputedStyle$1(i),a=n.boxSizing==="border-box",r=getPositionedStyle(n,"padding"),l=getPositionedStyle(n,"border","width"),{x:c,y:d,box:u}=getCanvasPosition(t,i),h=r.left+(u&&l.left),f=r.top+(u&&l.top);let{width:g,height:m}=e;return a&&(g-=r.width+l.width,m-=r.height+l.height),{x:Math.round((c-h)/g*i.width/s),y:Math.round((d-f)/m*i.height/s)}}function getContainerSize(t,e,i){let s,n;if(e===void 0||i===void 0){const a=_getParentNode(t);if(!a)e=t.clientWidth,i=t.clientHeight;else{const r=a.getBoundingClientRect(),l=getComputedStyle$1(a),c=getPositionedStyle(l,"border","width"),d=getPositionedStyle(l,"padding");e=r.width-d.width-c.width,i=r.height-d.height-c.height,s=parseMaxStyle(l.maxWidth,a,"clientWidth"),n=parseMaxStyle(l.maxHeight,a,"clientHeight")}}return{width:e,height:i,maxWidth:s||INFINITY,maxHeight:n||INFINITY}}const round1=t=>Math.round(t*10)/10;function getMaximumSize(t,e,i,s){const n=getComputedStyle$1(t),a=getPositionedStyle(n,"margin"),r=parseMaxStyle(n.maxWidth,t,"clientWidth")||INFINITY,l=parseMaxStyle(n.maxHeight,t,"clientHeight")||INFINITY,c=getContainerSize(t,e,i);let{width:d,height:u}=c;if(n.boxSizing==="content-box"){const f=getPositionedStyle(n,"border","width"),g=getPositionedStyle(n,"padding");d-=g.width+f.width,u-=g.height+f.height}return d=Math.max(0,d-a.width),u=Math.max(0,s?d/s:u-a.height),d=round1(Math.min(d,r,c.maxWidth)),u=round1(Math.min(u,l,c.maxHeight)),d&&!u&&(u=round1(d/2)),(e!==void 0||i!==void 0)&&s&&c.height&&u>c.height&&(u=c.height,d=round1(Math.floor(u*s))),{width:d,height:u}}function retinaScale(t,e,i){const s=e||1,n=Math.floor(t.height*s),a=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),t.currentDevicePixelRatio!==s||r.height!==n||r.width!==a?(t.currentDevicePixelRatio=s,r.height=n,r.width=a,t.ctx.setTransform(s,0,0,s,0,0),!0):!1}const supportsEventListenerOptions=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}return t}();function readUsedSize(t,e){const i=getStyle(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function _pointInLine(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function _steppedInterpolation(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:s==="middle"?i<.5?t.y:e.y:s==="after"?i<1?t.y:e.y:i>0?e.y:t.y}}function _bezierInterpolation(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},r=_pointInLine(t,n,i),l=_pointInLine(n,a,i),c=_pointInLine(a,e,i),d=_pointInLine(r,l,i),u=_pointInLine(l,c,i);return _pointInLine(d,u,i)}const getRightToLeftAdapter=function(t,e){return{x(i){return t+t+e-i},setWidth(i){e=i},textAlign(i){return i==="center"?i:i==="right"?"left":"right"},xPlus(i,s){return i-s},leftForLtr(i,s){return i-s}}},getLeftToRightAdapter=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function getRtlAdapter(t,e,i){return t?getRightToLeftAdapter(e,i):getLeftToRightAdapter()}function overrideTextDirection(t,e){let i,s;(e==="ltr"||e==="rtl")&&(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function restoreTextDirection(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function propertyFn(t){return t==="angle"?{between:_angleBetween,compare:_angleDiff,normalize:_normalizeAngle}:{between:_isBetween,compare:(e,i)=>e-i,normalize:e=>e}}function normalizeSegment({start:t,end:e,count:i,loop:s,style:n}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i===0,style:n}}function getSegment(t,e,i){const{property:s,start:n,end:a}=i,{between:r,normalize:l}=propertyFn(s),c=e.length;let{start:d,end:u,loop:h}=t,f,g;if(h){for(d+=c,u+=c,f=0,g=c;f<g&&r(l(e[d%c][s]),n,a);++f)d--,u--;d%=c,u%=c}return u<d&&(u+=c),{start:d,end:u,loop:h,style:t.style}}function _boundSegment(t,e,i){if(!i)return[t];const{property:s,start:n,end:a}=i,r=e.length,{compare:l,between:c,normalize:d}=propertyFn(s),{start:u,end:h,loop:f,style:g}=getSegment(t,e,i),m=[];let _=!1,w=null,B,D,P;const H=()=>c(n,P,B)&&l(n,P)!==0,N=()=>l(a,B)===0||c(a,P,B),W=()=>_||H(),L=()=>!_||N();for(let U=u,K=u;U<=h;++U)D=e[U%r],!D.skip&&(B=d(D[s]),B!==P&&(_=c(B,n,a),w===null&&W()&&(w=l(B,n)===0?U:K),w!==null&&L()&&(m.push(normalizeSegment({start:w,end:U,loop:f,count:r,style:g})),w=null),K=U,P=B));return w!==null&&m.push(normalizeSegment({start:w,end:h,loop:f,count:r,style:g})),m}function _boundSegments(t,e){const i=[],s=t.segments;for(let n=0;n<s.length;n++){const a=_boundSegment(s[n],t.points,e);a.length&&i.push(...a)}return i}function findStartAndEnd(t,e,i,s){let n=0,a=e-1;if(i&&!s)for(;n<e&&!t[n].skip;)n++;for(;n<e&&t[n].skip;)n++;for(n%=e,i&&(a+=n);a>n&&t[a%e].skip;)a--;return a%=e,{start:n,end:a}}function solidSegments(t,e,i,s){const n=t.length,a=[];let r=e,l=t[e],c;for(c=e+1;c<=i;++c){const d=t[c%n];d.skip||d.stop?l.skip||(s=!1,a.push({start:e%n,end:(c-1)%n,loop:s}),e=r=d.stop?c:null):(r=c,l.skip&&(e=c)),l=d}return r!==null&&a.push({start:e%n,end:r%n,loop:s}),a}function _computeSegments(t,e){const i=t.points,s=t.options.spanGaps,n=i.length;if(!n)return[];const a=!!t._loop,{start:r,end:l}=findStartAndEnd(i,n,a,s);if(s===!0)return splitByStyles(t,[{start:r,end:l,loop:a}],i,e);const c=l<r?l+n:l,d=!!t._fullLoop&&r===0&&l===n-1;return splitByStyles(t,solidSegments(i,r,c,d),i,e)}function splitByStyles(t,e,i,s){return!s||!s.setContext||!i?e:doSplitByStyles(t,e,i,s)}function doSplitByStyles(t,e,i,s){const n=t._chart.getContext(),a=readStyle(t.options),{_datasetIndex:r,options:{spanGaps:l}}=t,c=i.length,d=[];let u=a,h=e[0].start,f=h;function g(m,_,w,B){const D=l?-1:1;if(m!==_){for(m+=c;i[m%c].skip;)m-=D;for(;i[_%c].skip;)_+=D;m%c!==_%c&&(d.push({start:m%c,end:_%c,loop:w,style:B}),u=B,h=_%c)}}for(const m of e){h=l?h:m.start;let _=i[h%c],w;for(f=h+1;f<=m.end;f++){const B=i[f%c];w=readStyle(s.setContext(createContext(n,{type:"segment",p0:_,p1:B,p0DataIndex:(f-1)%c,p1DataIndex:f%c,datasetIndex:r}))),styleChanged(w,u)&&g(h,f-1,m.loop,u),_=B,u=w}h<f-1&&g(h,f-1,m.loop,u)}return d}function readStyle(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function styleChanged(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}/*!
|
|
* Chart.js v4.1.2
|
|
* https://www.chartjs.org
|
|
* (c) 2023 Chart.js Contributors
|
|
* Released under the MIT License
|
|
*/class Animator{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,i,s,n){const a=i.listeners[n],r=i.duration;a.forEach(l=>l({chart:e,initial:i.initial,numSteps:r,currentStep:Math.min(s-i.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let i=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const a=s.items;let r=a.length-1,l=!1,c;for(;r>=0;--r)c=a[r],c._active?(c._total>s.duration&&(s.duration=c._total),c.tick(e),l=!0):(a[r]=a[a.length-1],a.pop());l&&(n.draw(),this._notify(n,s,e,"progress")),a.length||(s.running=!1,this._notify(n,s,e,"complete"),s.initial=!1),i+=a.length}),this._lastDate=e,i===0&&(this._running=!1)}_getAnims(e){const i=this._charts;let s=i.get(e);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},i.set(e,s)),s}listen(e,i,s){this._getAnims(e).listeners[i].push(s)}add(e,i){!i||!i.length||this._getAnims(e).items.push(...i)}has(e){return this._getAnims(e).items.length>0}start(e){const i=this._charts.get(e);!i||(i.running=!0,i.start=Date.now(),i.duration=i.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(e){if(!this._running)return!1;const i=this._charts.get(e);return!(!i||!i.running||!i.items.length)}stop(e){const i=this._charts.get(e);if(!i||!i.items.length)return;const s=i.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();i.items=[],this._notify(e,i,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var animator=new Animator;const transparent="transparent",interpolators={boolean(t,e,i){return i>.5?e:t},color(t,e,i){const s=color(t||transparent),n=s.valid&&color(e||transparent);return n&&n.valid?n.mix(s,i).hexString():e},number(t,e,i){return t+(e-t)*i}};class Animation{constructor(e,i,s,n){const a=i[s];n=resolve([e.to,n,a,e.from]);const r=resolve([e.from,a,n]);this._active=!0,this._fn=e.fn||interpolators[e.type||typeof r],this._easing=effects[e.easing]||effects.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=i,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(e,i,s){if(this._active){this._notify(!1);const n=this._target[this._prop],a=s-this._start,r=this._duration-a;this._start=s,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=resolve([e.to,i,n,e.from]),this._from=resolve([e.from,n,i])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const i=e-this._start,s=this._duration,n=this._prop,a=this._from,r=this._loop,l=this._to;let c;if(this._active=a!==l&&(r||i<s),!this._active){this._target[n]=l,this._notify(!0);return}if(i<0){this._target[n]=a;return}c=i/s%2,c=r&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[n]=this._fn(a,l,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((i,s)=>{e.push({res:i,rej:s})})}_notify(e){const i=e?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][i]()}}class Animations{constructor(e,i){this._chart=e,this._properties=new Map,this.configure(i)}configure(e){if(!isObject(e))return;const i=Object.keys(defaults.animation),s=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{const a=e[n];if(!isObject(a))return;const r={};for(const l of i)r[l]=a[l];(isArray(a.properties)&&a.properties||[n]).forEach(l=>{(l===n||!s.has(l))&&s.set(l,r)})})}_animateOptions(e,i){const s=i.options,n=resolveTargetOptions(e,s);if(!n)return[];const a=this._createAnimations(n,s);return s.$shared&&awaitAll(e.options.$animations,s).then(()=>{e.options=s},()=>{}),a}_createAnimations(e,i){const s=this._properties,n=[],a=e.$animations||(e.$animations={}),r=Object.keys(i),l=Date.now();let c;for(c=r.length-1;c>=0;--c){const d=r[c];if(d.charAt(0)==="$")continue;if(d==="options"){n.push(...this._animateOptions(e,i));continue}const u=i[d];let h=a[d];const f=s.get(d);if(h)if(f&&h.active()){h.update(f,u,l);continue}else h.cancel();if(!f||!f.duration){e[d]=u;continue}a[d]=h=new Animation(f,e,d,u),n.push(h)}return n}update(e,i){if(this._properties.size===0){Object.assign(e,i);return}const s=this._createAnimations(e,i);if(s.length)return animator.add(this._chart,s),!0}}function awaitAll(t,e){const i=[],s=Object.keys(e);for(let n=0;n<s.length;n++){const a=t[s[n]];a&&a.active()&&i.push(a.wait())}return Promise.all(i)}function resolveTargetOptions(t,e){if(!e)return;let i=t.options;if(!i){t.options=e;return}return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}function scaleClip(t,e){const i=t&&t.options||{},s=i.reverse,n=i.min===void 0?e:0,a=i.max===void 0?e:0;return{start:s?a:n,end:s?n:a}}function defaultClip(t,e,i){if(i===!1)return!1;const s=scaleClip(t,i),n=scaleClip(e,i);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function toClip(t){let e,i,s,n;return isObject(t)?(e=t.top,i=t.right,s=t.bottom,n=t.left):e=i=s=n=t,{top:e,right:i,bottom:s,left:n,disabled:t===!1}}function getSortedDatasetIndices(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,a;for(n=0,a=s.length;n<a;++n)i.push(s[n].index);return i}function applyStack(t,e,i,s={}){const n=t.keys,a=s.mode==="single";let r,l,c,d;if(e!==null){for(r=0,l=n.length;r<l;++r){if(c=+n[r],c===i){if(s.all)continue;break}d=t.values[c],isNumberFinite(d)&&(a||e===0||sign(e)===sign(d))&&(e+=d)}return e}}function convertObjectDataToArray(t){const e=Object.keys(t),i=new Array(e.length);let s,n,a;for(s=0,n=e.length;s<n;++s)a=e[s],i[s]={x:a,y:t[a]};return i}function isStacked(t,e){const i=t&&t.options.stacked;return i||i===void 0&&e.stack!==void 0}function getStackKey(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}function getUserBounds(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}function getOrCreateStack(t,e,i){const s=t[e]||(t[e]={});return s[i]||(s[i]={})}function getLastIndexInStack(t,e,i,s){for(const n of e.getMatchingVisibleMetas(s).reverse()){const a=t[n.index];if(i&&a>0||!i&&a<0)return n.index}return null}function updateStacks(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:a,vScale:r,index:l}=s,c=a.axis,d=r.axis,u=getStackKey(a,r,s),h=e.length;let f;for(let g=0;g<h;++g){const m=e[g],{[c]:_,[d]:w}=m,B=m._stacks||(m._stacks={});f=B[d]=getOrCreateStack(n,u,_),f[l]=w,f._top=getLastIndexInStack(f,r,!0,s.type),f._bottom=getLastIndexInStack(f,r,!1,s.type);const D=f._visualValues||(f._visualValues={});D[l]=w}}function getFirstScaleId(t,e){const i=t.scales;return Object.keys(i).filter(s=>i[s].axis===e).shift()}function createDatasetContext(t,e){return createContext(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function createDataContext(t,e,i){return createContext(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}function clearStacks(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(!!s){e=e||t._parsed;for(const n of e){const a=n._stacks;if(!a||a[s]===void 0||a[s][i]===void 0)return;delete a[s][i],a[s]._visualValues!==void 0&&a[s]._visualValues[i]!==void 0&&delete a[s]._visualValues[i]}}}const isDirectUpdateMode=t=>t==="reset"||t==="none",cloneIfNotShared=(t,e)=>e?t:Object.assign({},t),createStack=(t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:getSortedDatasetIndices(i,!0),values:null};class DatasetController{constructor(e,i){this.chart=e,this._ctx=e.ctx,this.index=i,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=isStacked(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&clearStacks(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,i=this._cachedMeta,s=this.getDataset(),n=(h,f,g,m)=>h==="x"?f:h==="r"?m:g,a=i.xAxisID=valueOrDefault(s.xAxisID,getFirstScaleId(e,"x")),r=i.yAxisID=valueOrDefault(s.yAxisID,getFirstScaleId(e,"y")),l=i.rAxisID=valueOrDefault(s.rAxisID,getFirstScaleId(e,"r")),c=i.indexAxis,d=i.iAxisID=n(c,a,r,l),u=i.vAxisID=n(c,r,a,l);i.xScale=this.getScaleForId(a),i.yScale=this.getScaleForId(r),i.rScale=this.getScaleForId(l),i.iScale=this.getScaleForId(d),i.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const i=this._cachedMeta;return e===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&unlistenArrayEvents(this._data,this),e._stacked&&clearStacks(e)}_dataCheck(){const e=this.getDataset(),i=e.data||(e.data=[]),s=this._data;if(isObject(i))this._data=convertObjectDataToArray(i);else if(s!==i){if(s){unlistenArrayEvents(s,this);const n=this._cachedMeta;clearStacks(n),n._parsed=[]}i&&Object.isExtensible(i)&&listenArrayEvents(i,this),this._syncList=[],this._data=i}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const i=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const a=i._stacked;i._stacked=isStacked(i.vScale,i),i.stack!==s.stack&&(n=!0,clearStacks(i),i.stack=s.stack),this._resyncElements(e),(n||a!==i._stacked)&&updateStacks(this,i._parsed)}configure(){const e=this.chart.config,i=e.datasetScopeKeys(this._type),s=e.getOptionScopes(this.getDataset(),i,!0);this.options=e.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,i){const{_cachedMeta:s,_data:n}=this,{iScale:a,_stacked:r}=s,l=a.axis;let c=e===0&&i===n.length?!0:s._sorted,d=e>0&&s._parsed[e-1],u,h,f;if(this._parsing===!1)s._parsed=n,s._sorted=!0,f=n;else{isArray(n[e])?f=this.parseArrayData(s,n,e,i):isObject(n[e])?f=this.parseObjectData(s,n,e,i):f=this.parsePrimitiveData(s,n,e,i);const g=()=>h[l]===null||d&&h[l]<d[l];for(u=0;u<i;++u)s._parsed[u+e]=h=f[u],c&&(g()&&(c=!1),d=h);s._sorted=c}r&&updateStacks(this,f)}parsePrimitiveData(e,i,s,n){const{iScale:a,vScale:r}=e,l=a.axis,c=r.axis,d=a.getLabels(),u=a===r,h=new Array(n);let f,g,m;for(f=0,g=n;f<g;++f)m=f+s,h[f]={[l]:u||a.parse(d[m],m),[c]:r.parse(i[m],m)};return h}parseArrayData(e,i,s,n){const{xScale:a,yScale:r}=e,l=new Array(n);let c,d,u,h;for(c=0,d=n;c<d;++c)u=c+s,h=i[u],l[c]={x:a.parse(h[0],u),y:r.parse(h[1],u)};return l}parseObjectData(e,i,s,n){const{xScale:a,yScale:r}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(n);let u,h,f,g;for(u=0,h=n;u<h;++u)f=u+s,g=i[f],d[u]={x:a.parse(resolveObjectKey(g,l),f),y:r.parse(resolveObjectKey(g,c),f)};return d}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,i,s){const n=this.chart,a=this._cachedMeta,r=i[e.axis],l={keys:getSortedDatasetIndices(n,!0),values:i._stacks[e.axis]._visualValues};return applyStack(l,r,a.index,{mode:s})}updateRangeFromParsed(e,i,s,n){const a=s[i.axis];let r=a===null?NaN:a;const l=n&&s._stacks[i.axis];n&&l&&(n.values=l,r=applyStack(n,a,this._cachedMeta.index)),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r)}getMinMax(e,i){const s=this._cachedMeta,n=s._parsed,a=s._sorted&&e===s.iScale,r=n.length,l=this._getOtherScale(e),c=createStack(i,s,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=getUserBounds(l);let f,g;function m(){g=n[f];const _=g[l.axis];return!isNumberFinite(g[e.axis])||u>_||h<_}for(f=0;f<r&&!(!m()&&(this.updateRangeFromParsed(d,e,g,c),a));++f);if(a){for(f=r-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(d,e,g,c);break}}return d}getAllParsedValues(e){const i=this._cachedMeta._parsed,s=[];let n,a,r;for(n=0,a=i.length;n<a;++n)r=i[n][e.axis],isNumberFinite(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(e){const i=this._cachedMeta,s=i.iScale,n=i.vScale,a=this.getParsed(e);return{label:s?""+s.getLabelForValue(a[s.axis]):"",value:n?""+n.getLabelForValue(a[n.axis]):""}}_update(e){const i=this._cachedMeta;this.update(e||"default"),i._clip=toClip(valueOrDefault(this.options.clip,defaultClip(i.xScale,i.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,i=this.chart,s=this._cachedMeta,n=s.data||[],a=i.chartArea,r=[],l=this._drawStart||0,c=this._drawCount||n.length-l,d=this.options.drawActiveElementsOnTop;let u;for(s.dataset&&s.dataset.draw(e,a,l,c),u=l;u<l+c;++u){const h=n[u];h.hidden||(h.active&&d?r.push(h):h.draw(e,a))}for(u=0;u<r.length;++u)r[u].draw(e,a)}getStyle(e,i){const s=i?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(e||0,s)}getContext(e,i,s){const n=this.getDataset();let a;if(e>=0&&e<this._cachedMeta.data.length){const r=this._cachedMeta.data[e];a=r.$context||(r.$context=createDataContext(this.getContext(),e,r)),a.parsed=this.getParsed(e),a.raw=n.data[e],a.index=a.dataIndex=e}else a=this.$context||(this.$context=createDatasetContext(this.chart.getContext(),this.index)),a.dataset=n,a.index=a.datasetIndex=this.index;return a.active=!!i,a.mode=s,a}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,i){return this._resolveElementOptions(this.dataElementType.id,i,e)}_resolveElementOptions(e,i="default",s){const n=i==="active",a=this._cachedDataOpts,r=e+"-"+i,l=a[r],c=this.enableOptionSharing&&defined(s);if(l)return cloneIfNotShared(l,c);const d=this.chart.config,u=d.datasetElementScopeKeys(this._type,e),h=n?[`${e}Hover`,"hover",e,""]:[e,""],f=d.getOptionScopes(this.getDataset(),u),g=Object.keys(defaults.elements[e]),m=()=>this.getContext(s,n,i),_=d.resolveNamedOptions(f,g,m,h);return _.$shared&&(_.$shared=c,a[r]=Object.freeze(cloneIfNotShared(_,c))),_}_resolveAnimations(e,i,s){const n=this.chart,a=this._cachedDataOpts,r=`animation-${i}`,l=a[r];if(l)return l;let c;if(n.options.animation!==!1){const u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,i),f=u.getOptionScopes(this.getDataset(),h);c=u.createResolver(f,this.getContext(e,s,i))}const d=new Animations(n,c&&c.animations);return c&&c._cacheable&&(a[r]=Object.freeze(d)),d}getSharedOptions(e){if(!!e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,i){return!i||isDirectUpdateMode(e)||this.chart._animationsDisabled}_getSharedOptions(e,i){const s=this.resolveDataElementOptions(e,i),n=this._sharedOptions,a=this.getSharedOptions(s),r=this.includeOptions(i,a)||a!==n;return this.updateSharedOptions(a,i,s),{sharedOptions:a,includeOptions:r}}updateElement(e,i,s,n){isDirectUpdateMode(n)?Object.assign(e,s):this._resolveAnimations(i,n).update(e,s)}updateSharedOptions(e,i,s){e&&!isDirectUpdateMode(i)&&this._resolveAnimations(void 0,i).update(e,s)}_setStyle(e,i,s,n){e.active=n;const a=this.getStyle(i,n);this._resolveAnimations(i,s,n).update(e,{options:!n&&this.getSharedOptions(a)||a})}removeHoverStyle(e,i,s){this._setStyle(e,s,"active",!1)}setHoverStyle(e,i,s){this._setStyle(e,s,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const i=this._data,s=this._cachedMeta.data;for(const[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];const n=s.length,a=i.length,r=Math.min(a,n);r&&this.parse(0,r),a>n?this._insertElements(n,a-n,e):a<n&&this._removeElements(a,n-a)}_insertElements(e,i,s=!0){const n=this._cachedMeta,a=n.data,r=e+i;let l;const c=d=>{for(d.length+=i,l=d.length-1;l>=r;l--)d[l]=d[l-i]};for(c(a),l=e;l<r;++l)a[l]=new this.dataElementType;this._parsing&&c(n._parsed),this.parse(e,i),s&&this.updateElements(a,e,i,"reset")}updateElements(e,i,s,n){}_removeElements(e,i){const s=this._cachedMeta;if(this._parsing){const n=s._parsed.splice(e,i);s._stacked&&clearStacks(s,n)}s.data.splice(e,i)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[i,s,n]=e;this[i](s,n)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,i){i&&this._sync(["_removeElements",e,i]);const s=arguments.length-2;s&&this._sync(["_insertElements",e,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Q(DatasetController,"defaults",{}),Q(DatasetController,"datasetElementType",null),Q(DatasetController,"dataElementType",null);function getAllScaleValues(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let s=[];for(let n=0,a=i.length;n<a;n++)s=s.concat(i[n].controller.getAllParsedValues(t));t._cache.$bar=_arrayUnique(s.sort((n,a)=>n-a))}return t._cache.$bar}function computeMinSampleSize(t){const e=t.iScale,i=getAllScaleValues(e,t.type);let s=e._length,n,a,r,l;const c=()=>{r===32767||r===-32768||(defined(l)&&(s=Math.min(s,Math.abs(r-l)||s)),l=r)};for(n=0,a=i.length;n<a;++n)r=e.getPixelForValue(i[n]),c();for(l=void 0,n=0,a=e.ticks.length;n<a;++n)r=e.getPixelForTick(n),c();return s}function computeFitCategoryTraits(t,e,i,s){const n=i.barThickness;let a,r;return isNullOrUndef(n)?(a=e.min*i.categoryPercentage,r=i.barPercentage):(a=n*s,r=1),{chunk:a/s,ratio:r,start:e.pixels[t]-a/2}}function computeFlexCategoryTraits(t,e,i,s){const n=e.pixels,a=n[t];let r=t>0?n[t-1]:null,l=t<n.length-1?n[t+1]:null;const c=i.categoryPercentage;r===null&&(r=a-(l===null?e.end-e.start:l-a)),l===null&&(l=a+a-r);const d=a-(a-Math.min(r,l))/2*c;return{chunk:Math.abs(l-r)/2*c/s,ratio:i.barPercentage,start:d}}function parseFloatBar(t,e,i,s){const n=i.parse(t[0],s),a=i.parse(t[1],s),r=Math.min(n,a),l=Math.max(n,a);let c=r,d=l;Math.abs(r)>Math.abs(l)&&(c=l,d=r),e[i.axis]=d,e._custom={barStart:c,barEnd:d,start:n,end:a,min:r,max:l}}function parseValue(t,e,i,s){return isArray(t)?parseFloatBar(t,e,i,s):e[i.axis]=i.parse(t,s),e}function parseArrayOrPrimitive(t,e,i,s){const n=t.iScale,a=t.vScale,r=n.getLabels(),l=n===a,c=[];let d,u,h,f;for(d=i,u=i+s;d<u;++d)f=e[d],h={},h[n.axis]=l||n.parse(r[d],d),c.push(parseValue(f,h,a,d));return c}function isFloatBar(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function barSign(t,e,i){return t!==0?sign(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}function borderProps(t){let e,i,s,n,a;return t.horizontal?(e=t.base>t.x,i="left",s="right"):(e=t.base<t.y,i="bottom",s="top"),e?(n="end",a="start"):(n="start",a="end"),{start:i,end:s,reverse:e,top:n,bottom:a}}function setBorderSkipped(t,e,i,s){let n=e.borderSkipped;const a={};if(!n){t.borderSkipped=a;return}if(n===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:l,reverse:c,top:d,bottom:u}=borderProps(t);n==="middle"&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?n=d:(i._bottom||0)===s?n=u:(a[parseEdge(u,r,l,c)]=!0,n=d)),a[parseEdge(n,r,l,c)]=!0,t.borderSkipped=a}function parseEdge(t,e,i,s){return s?(t=swap(t,e,i),t=startEnd(t,i,e)):t=startEnd(t,e,i),t}function swap(t,e,i){return t===e?i:t===i?e:t}function startEnd(t,e,i){return t==="start"?e:t==="end"?i:t}function setInflateAmount(t,{inflateAmount:e},i){t.inflateAmount=e==="auto"?i===1?.33:0:e}class BarController extends DatasetController{parsePrimitiveData(e,i,s,n){return parseArrayOrPrimitive(e,i,s,n)}parseArrayData(e,i,s,n){return parseArrayOrPrimitive(e,i,s,n)}parseObjectData(e,i,s,n){const{iScale:a,vScale:r}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=a.axis==="x"?l:c,u=r.axis==="x"?l:c,h=[];let f,g,m,_;for(f=s,g=s+n;f<g;++f)_=i[f],m={},m[a.axis]=a.parse(resolveObjectKey(_,d),f),h.push(parseValue(resolveObjectKey(_,u),m,r,f));return h}updateRangeFromParsed(e,i,s,n){super.updateRangeFromParsed(e,i,s,n);const a=s._custom;a&&i===this._cachedMeta.vScale&&(e.min=Math.min(e.min,a.min),e.max=Math.max(e.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const i=this._cachedMeta,{iScale:s,vScale:n}=i,a=this.getParsed(e),r=a._custom,l=isFloatBar(r)?"["+r.start+", "+r.end+"]":""+n.getLabelForValue(a[n.axis]);return{label:""+s.getLabelForValue(a[s.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const i=this._cachedMeta;this.updateElements(i.data,0,i.data.length,e)}updateElements(e,i,s,n){const a=n==="reset",{index:r,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),d=l.isHorizontal(),u=this._getRuler(),{sharedOptions:h,includeOptions:f}=this._getSharedOptions(i,n);for(let g=i;g<i+s;g++){const m=this.getParsed(g),_=a||isNullOrUndef(m[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(g),w=this._calculateBarIndexPixels(g,u),B=(m._stacks||{})[l.axis],D={horizontal:d,base:_.base,enableBorderRadius:!B||isFloatBar(m._custom)||r===B._top||r===B._bottom,x:d?_.head:w.center,y:d?w.center:_.head,height:d?w.size:Math.abs(_.size),width:d?Math.abs(_.size):w.size};f&&(D.options=h||this.resolveDataElementOptions(g,e[g].active?"active":n));const P=D.options||e[g].options;setBorderSkipped(D,P,B,r),setInflateAmount(D,P,u.ratio),this.updateElement(e[g],g,D,n)}}_getStacks(e,i){const{iScale:s}=this._cachedMeta,n=s.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),a=s.options.stacked,r=[],l=c=>{const d=c.controller.getParsed(i),u=d&&d[c.vScale.axis];if(isNullOrUndef(u)||isNaN(u))return!0};for(const c of n)if(!(i!==void 0&&l(c))&&((a===!1||r.indexOf(c.stack)===-1||a===void 0&&c.stack===void 0)&&r.push(c.stack),c.index===e))break;return r.length||r.push(void 0),r}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,i,s){const n=this._getStacks(e,s),a=i!==void 0?n.indexOf(i):-1;return a===-1?n.length-1:a}_getRuler(){const e=this.options,i=this._cachedMeta,s=i.iScale,n=[];let a,r;for(a=0,r=i.data.length;a<r;++a)n.push(s.getPixelForValue(this.getParsed(a)[s.axis],a));const l=e.barThickness;return{min:l||computeMinSampleSize(i),pixels:n,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:e.grouped,ratio:l?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:i,_stacked:s,index:n},options:{base:a,minBarLength:r}}=this,l=a||0,c=this.getParsed(e),d=c._custom,u=isFloatBar(d);let h=c[i.axis],f=0,g=s?this.applyStack(i,c,s):h,m,_;g!==h&&(f=g-h,g=h),u&&(h=d.barStart,g=d.barEnd-d.barStart,h!==0&&sign(h)!==sign(d.barEnd)&&(f=0),f+=h);const w=!isNullOrUndef(a)&&!u?a:f;let B=i.getPixelForValue(w);if(this.chart.getDataVisibility(e)?m=i.getPixelForValue(f+g):m=B,_=m-B,Math.abs(_)<r){_=barSign(_,i,l)*r,h===l&&(B-=_/2);const D=i.getPixelForDecimal(0),P=i.getPixelForDecimal(1),H=Math.min(D,P),N=Math.max(D,P);B=Math.max(Math.min(B,N),H),m=B+_,s&&!u&&(c._stacks[i.axis]._visualValues[n]=i.getValueForPixel(m)-i.getValueForPixel(B))}if(B===i.getPixelForValue(l)){const D=sign(_)*i.getLineWidthForValue(l)/2;B+=D,_-=D}return{size:_,base:B,head:m,center:m+_/2}}_calculateBarIndexPixels(e,i){const s=i.scale,n=this.options,a=n.skipNull,r=valueOrDefault(n.maxBarThickness,1/0);let l,c;if(i.grouped){const d=a?this._getStackCount(e):i.stackCount,u=n.barThickness==="flex"?computeFlexCategoryTraits(e,i,n,d):computeFitCategoryTraits(e,i,n,d),h=this._getStackIndex(this.index,this._cachedMeta.stack,a?e:void 0);l=u.start+u.chunk*h+u.chunk/2,c=Math.min(r,u.chunk*u.ratio)}else l=s.getPixelForValue(this.getParsed(e)[s.axis],e),c=Math.min(r,i.min*i.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const e=this._cachedMeta,i=e.vScale,s=e.data,n=s.length;let a=0;for(;a<n;++a)this.getParsed(a)[i.axis]!==null&&s[a].draw(this._ctx)}}Q(BarController,"id","bar"),Q(BarController,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Q(BarController,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class BubbleController extends DatasetController{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,i,s,n){const a=super.parsePrimitiveData(e,i,s,n);for(let r=0;r<a.length;r++)a[r]._custom=this.resolveDataElementOptions(r+s).radius;return a}parseArrayData(e,i,s,n){const a=super.parseArrayData(e,i,s,n);for(let r=0;r<a.length;r++){const l=i[s+r];a[r]._custom=valueOrDefault(l[2],this.resolveDataElementOptions(r+s).radius)}return a}parseObjectData(e,i,s,n){const a=super.parseObjectData(e,i,s,n);for(let r=0;r<a.length;r++){const l=i[s+r];a[r]._custom=valueOrDefault(l&&l.r&&+l.r,this.resolveDataElementOptions(r+s).radius)}return a}getMaxOverflow(){const e=this._cachedMeta.data;let i=0;for(let s=e.length-1;s>=0;--s)i=Math.max(i,e[s].size(this.resolveDataElementOptions(s))/2);return i>0&&i}getLabelAndValue(e){const i=this._cachedMeta,s=this.chart.data.labels||[],{xScale:n,yScale:a}=i,r=this.getParsed(e),l=n.getLabelForValue(r.x),c=a.getLabelForValue(r.y),d=r._custom;return{label:s[e]||"",value:"("+l+", "+c+(d?", "+d:"")+")"}}update(e){const i=this._cachedMeta.data;this.updateElements(i,0,i.length,e)}updateElements(e,i,s,n){const a=n==="reset",{iScale:r,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(i,n),u=r.axis,h=l.axis;for(let f=i;f<i+s;f++){const g=e[f],m=!a&&this.getParsed(f),_={},w=_[u]=a?r.getPixelForDecimal(.5):r.getPixelForValue(m[u]),B=_[h]=a?l.getBasePixel():l.getPixelForValue(m[h]);_.skip=isNaN(w)||isNaN(B),d&&(_.options=c||this.resolveDataElementOptions(f,g.active?"active":n),a&&(_.options.radius=0)),this.updateElement(g,f,_,n)}}resolveDataElementOptions(e,i){const s=this.getParsed(e);let n=super.resolveDataElementOptions(e,i);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const a=n.radius;return i!=="active"&&(n.radius=0),n.radius+=valueOrDefault(s&&s._custom,a),n}}Q(BubbleController,"id","bubble"),Q(BubbleController,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),Q(BubbleController,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function getRatioAndOffset(t,e,i){let s=1,n=1,a=0,r=0;if(e<TAU){const l=t,c=l+e,d=Math.cos(l),u=Math.sin(l),h=Math.cos(c),f=Math.sin(c),g=(P,H,N)=>_angleBetween(P,l,c,!0)?1:Math.max(H,H*i,N,N*i),m=(P,H,N)=>_angleBetween(P,l,c,!0)?-1:Math.min(H,H*i,N,N*i),_=g(0,d,h),w=g(HALF_PI,u,f),B=m(PI,d,h),D=m(PI+HALF_PI,u,f);s=(_-B)/2,n=(w-D)/2,a=-(_+B)/2,r=-(w+D)/2}return{ratioX:s,ratioY:n,offsetX:a,offsetY:r}}class DoughnutController extends DatasetController{constructor(e,i){super(e,i),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,i){const s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let a=c=>+s[c];if(isObject(s[e])){const{key:c="value"}=this._parsing;a=d=>+resolveObjectKey(s[d],c)}let r,l;for(r=e,l=e+i;r<l;++r)n._parsed[r]=a(r)}}_getRotation(){return toRadians(this.options.rotation-90)}_getCircumference(){return toRadians(this.options.circumference)}_getRotationExtents(){let e=TAU,i=-TAU;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const n=this.chart.getDatasetMeta(s).controller,a=n._getRotation(),r=n._getCircumference();e=Math.min(e,a),i=Math.max(i,a+r)}return{rotation:e,circumference:i-e}}update(e){const i=this.chart,{chartArea:s}=i,n=this._cachedMeta,a=n.data,r=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,l=Math.max((Math.min(s.width,s.height)-r)/2,0),c=Math.min(toPercentage(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:f,ratioY:g,offsetX:m,offsetY:_}=getRatioAndOffset(h,u,c),w=(s.width-r)/f,B=(s.height-r)/g,D=Math.max(Math.min(w,B)/2,0),P=toDimension(this.options.radius,D),H=Math.max(P*c,0),N=(P-H)/this._getVisibleDatasetWeightTotal();this.offsetX=m*P,this.offsetY=_*P,n.total=this.calculateTotal(),this.outerRadius=P-N*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-N*d,0),this.updateElements(a,0,a.length,e)}_circumference(e,i){const s=this.options,n=this._cachedMeta,a=this._getCircumference();return i&&s.animation.animateRotate||!this.chart.getDataVisibility(e)||n._parsed[e]===null||n.data[e].hidden?0:this.calculateCircumference(n._parsed[e]*a/TAU)}updateElements(e,i,s,n){const a=n==="reset",r=this.chart,l=r.chartArea,d=r.options.animation,u=(l.left+l.right)/2,h=(l.top+l.bottom)/2,f=a&&d.animateScale,g=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:_,includeOptions:w}=this._getSharedOptions(i,n);let B=this._getRotation(),D;for(D=0;D<i;++D)B+=this._circumference(D,a);for(D=i;D<i+s;++D){const P=this._circumference(D,a),H=e[D],N={x:u+this.offsetX,y:h+this.offsetY,startAngle:B,endAngle:B+P,circumference:P,outerRadius:m,innerRadius:g};w&&(N.options=_||this.resolveDataElementOptions(D,H.active?"active":n)),B+=P,this.updateElement(H,D,N,n)}}calculateTotal(){const e=this._cachedMeta,i=e.data;let s=0,n;for(n=0;n<i.length;n++){const a=e._parsed[n];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(n)&&!i[n].hidden&&(s+=Math.abs(a))}return s}calculateCircumference(e){const i=this._cachedMeta.total;return i>0&&!isNaN(e)?TAU*(Math.abs(e)/i):0}getLabelAndValue(e){const i=this._cachedMeta,s=this.chart,n=s.data.labels||[],a=formatNumber(i._parsed[e],s.options.locale);return{label:n[e]||"",value:a}}getMaxBorderWidth(e){let i=0;const s=this.chart;let n,a,r,l,c;if(!e){for(n=0,a=s.data.datasets.length;n<a;++n)if(s.isDatasetVisible(n)){r=s.getDatasetMeta(n),e=r.data,l=r.controller;break}}if(!e)return 0;for(n=0,a=e.length;n<a;++n)c=l.resolveDataElementOptions(n),c.borderAlign!=="inner"&&(i=Math.max(i,c.borderWidth||0,c.hoverBorderWidth||0));return i}getMaxOffset(e){let i=0;for(let s=0,n=e.length;s<n;++s){const a=this.resolveDataElementOptions(s);i=Math.max(i,a.offset||0,a.hoverOffset||0)}return i}_getRingWeightOffset(e){let i=0;for(let s=0;s<e;++s)this.chart.isDatasetVisible(s)&&(i+=this._getRingWeight(s));return i}_getRingWeight(e){return Math.max(valueOrDefault(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Q(DoughnutController,"id","doughnut"),Q(DoughnutController,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),Q(DoughnutController,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"}),Q(DoughnutController,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const i=e.data;if(i.labels.length&&i.datasets.length){const{labels:{pointStyle:s,color:n}}=e.legend.options;return i.labels.map((a,r)=>{const c=e.getDatasetMeta(0).controller.getStyle(r);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:n,lineWidth:c.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,i,s){s.chart.toggleDataVisibility(i.index),s.chart.update()}}}});class LineController extends DatasetController{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const i=this._cachedMeta,{dataset:s,data:n=[],_dataset:a}=i,r=this.chart._animationsDisabled;let{start:l,count:c}=_getStartAndCountOfVisiblePoints(i,n,r);this._drawStart=l,this._drawCount=c,_scaleRangesChanged(i)&&(l=0,c=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!a._decimated,s.points=n;const d=this.resolveDatasetElementOptions(e);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:d},e),this.updateElements(n,l,c,e)}updateElements(e,i,s,n){const a=n==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(i,n),f=r.axis,g=l.axis,{spanGaps:m,segment:_}=this.options,w=isNumber(m)?m:Number.POSITIVE_INFINITY,B=this.chart._animationsDisabled||a||n==="none",D=i+s,P=e.length;let H=i>0&&this.getParsed(i-1);for(let N=0;N<P;++N){const W=e[N],L=B?W:{};if(N<i||N>=D){L.skip=!0;continue}const U=this.getParsed(N),K=isNullOrUndef(U[g]),X=L[f]=r.getPixelForValue(U[f],N),Y=L[g]=a||K?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,U,c):U[g],N);L.skip=isNaN(X)||isNaN(Y)||K,L.stop=N>0&&Math.abs(U[f]-H[f])>w,_&&(L.parsed=U,L.raw=d.data[N]),h&&(L.options=u||this.resolveDataElementOptions(N,W.active?"active":n)),B||this.updateElement(W,N,L,n),H=U}}getMaxOverflow(){const e=this._cachedMeta,i=e.dataset,s=i.options&&i.options.borderWidth||0,n=e.data||[];if(!n.length)return s;const a=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,a,r)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Q(LineController,"id","line"),Q(LineController,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Q(LineController,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class PolarAreaController extends DatasetController{constructor(e,i){super(e,i),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const i=this._cachedMeta,s=this.chart,n=s.data.labels||[],a=formatNumber(i._parsed[e].r,s.options.locale);return{label:n[e]||"",value:a}}parseObjectData(e,i,s,n){return _parseObjectDataRadialScale.bind(this)(e,i,s,n)}update(e){const i=this._cachedMeta.data;this._updateRadius(),this.updateElements(i,0,i.length,e)}getMinMax(){const e=this._cachedMeta,i={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((s,n)=>{const a=this.getParsed(n).r;!isNaN(a)&&this.chart.getDataVisibility(n)&&(a<i.min&&(i.min=a),a>i.max&&(i.max=a))}),i}_updateRadius(){const e=this.chart,i=e.chartArea,s=e.options,n=Math.min(i.right-i.left,i.bottom-i.top),a=Math.max(n/2,0),r=Math.max(s.cutoutPercentage?a/100*s.cutoutPercentage:1,0),l=(a-r)/e.getVisibleDatasetCount();this.outerRadius=a-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,i,s,n){const a=n==="reset",r=this.chart,c=r.options.animation,d=this._cachedMeta.rScale,u=d.xCenter,h=d.yCenter,f=d.getIndexAngle(0)-.5*PI;let g=f,m;const _=360/this.countVisibleElements();for(m=0;m<i;++m)g+=this._computeAngle(m,n,_);for(m=i;m<i+s;m++){const w=e[m];let B=g,D=g+this._computeAngle(m,n,_),P=r.getDataVisibility(m)?d.getDistanceFromCenterForValue(this.getParsed(m).r):0;g=D,a&&(c.animateScale&&(P=0),c.animateRotate&&(B=D=f));const H={x:u,y:h,innerRadius:0,outerRadius:P,startAngle:B,endAngle:D,options:this.resolveDataElementOptions(m,w.active?"active":n)};this.updateElement(w,m,H,n)}}countVisibleElements(){const e=this._cachedMeta;let i=0;return e.data.forEach((s,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&i++}),i}_computeAngle(e,i,s){return this.chart.getDataVisibility(e)?toRadians(this.resolveDataElementOptions(e,i).angle||s):0}}Q(PolarAreaController,"id","polarArea"),Q(PolarAreaController,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),Q(PolarAreaController,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const i=e.data;if(i.labels.length&&i.datasets.length){const{labels:{pointStyle:s,color:n}}=e.legend.options;return i.labels.map((a,r)=>{const c=e.getDatasetMeta(0).controller.getStyle(r);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:n,lineWidth:c.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,i,s){s.chart.toggleDataVisibility(i.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class PieController extends DoughnutController{}Q(PieController,"id","pie"),Q(PieController,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class RadarController extends DatasetController{getLabelAndValue(e){const i=this._cachedMeta.vScale,s=this.getParsed(e);return{label:i.getLabels()[e],value:""+i.getLabelForValue(s[i.axis])}}parseObjectData(e,i,s,n){return _parseObjectDataRadialScale.bind(this)(e,i,s,n)}update(e){const i=this._cachedMeta,s=i.dataset,n=i.data||[],a=i.iScale.getLabels();if(s.points=n,e!=="resize"){const r=this.resolveDatasetElementOptions(e);this.options.showLine||(r.borderWidth=0);const l={_loop:!0,_fullLoop:a.length===n.length,options:r};this.updateElement(s,void 0,l,e)}this.updateElements(n,0,n.length,e)}updateElements(e,i,s,n){const a=this._cachedMeta.rScale,r=n==="reset";for(let l=i;l<i+s;l++){const c=e[l],d=this.resolveDataElementOptions(l,c.active?"active":n),u=a.getPointPositionForValue(l,this.getParsed(l).r),h=r?a.xCenter:u.x,f=r?a.yCenter:u.y,g={x:h,y:f,angle:u.angle,skip:isNaN(h)||isNaN(f),options:d};this.updateElement(c,l,g,n)}}}Q(RadarController,"id","radar"),Q(RadarController,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),Q(RadarController,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class ScatterController extends DatasetController{getLabelAndValue(e){const i=this._cachedMeta,s=this.chart.data.labels||[],{xScale:n,yScale:a}=i,r=this.getParsed(e),l=n.getLabelForValue(r.x),c=a.getLabelForValue(r.y);return{label:s[e]||"",value:"("+l+", "+c+")"}}update(e){const i=this._cachedMeta,{data:s=[]}=i,n=this.chart._animationsDisabled;let{start:a,count:r}=_getStartAndCountOfVisiblePoints(i,s,n);if(this._drawStart=a,this._drawCount=r,_scaleRangesChanged(i)&&(a=0,r=s.length),this.options.showLine){const{dataset:l,_dataset:c}=i;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=s;const d=this.resolveDatasetElementOptions(e);d.segment=this.options.segment,this.updateElement(l,void 0,{animated:!n,options:d},e)}this.updateElements(s,a,r,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,i,s,n){const a=n==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,u=this.resolveDataElementOptions(i,n),h=this.getSharedOptions(u),f=this.includeOptions(n,h),g=r.axis,m=l.axis,{spanGaps:_,segment:w}=this.options,B=isNumber(_)?_:Number.POSITIVE_INFINITY,D=this.chart._animationsDisabled||a||n==="none";let P=i>0&&this.getParsed(i-1);for(let H=i;H<i+s;++H){const N=e[H],W=this.getParsed(H),L=D?N:{},U=isNullOrUndef(W[m]),K=L[g]=r.getPixelForValue(W[g],H),X=L[m]=a||U?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,W,c):W[m],H);L.skip=isNaN(K)||isNaN(X)||U,L.stop=H>0&&Math.abs(W[g]-P[g])>B,w&&(L.parsed=W,L.raw=d.data[H]),f&&(L.options=h||this.resolveDataElementOptions(H,N.active?"active":n)),D||this.updateElement(N,H,L,n),P=W}this.updateSharedOptions(h,n,u)}getMaxOverflow(){const e=this._cachedMeta,i=e.data||[];if(!this.options.showLine){let l=0;for(let c=i.length-1;c>=0;--c)l=Math.max(l,i[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}const s=e.dataset,n=s.options&&s.options.borderWidth||0;if(!i.length)return n;const a=i[0].size(this.resolveDataElementOptions(0)),r=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,a,r)/2}}Q(ScatterController,"id","scatter"),Q(ScatterController,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Q(ScatterController,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var controllers=Object.freeze({__proto__:null,BarController,BubbleController,DoughnutController,LineController,PolarAreaController,PieController,RadarController,ScatterController});function abstract(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class DateAdapterBase{static override(e){Object.assign(DateAdapterBase.prototype,e)}constructor(e){this.options=e||{}}init(){}formats(){return abstract()}parse(){return abstract()}format(){return abstract()}add(){return abstract()}diff(){return abstract()}startOf(){return abstract()}endOf(){return abstract()}}var adapters={_date:DateAdapterBase};function binarySearch(t,e,i,s){const{controller:n,data:a,_sorted:r}=t,l=n._cachedMeta.iScale;if(l&&e===l.axis&&e!=="r"&&r&&a.length){const c=l._reversePixels?_rlookupByKey:_lookupByKey;if(s){if(n._sharedOptions){const d=a[0],u=typeof d.getRange=="function"&&d.getRange(e);if(u){const h=c(a,e,i-u),f=c(a,e,i+u);return{lo:h.lo,hi:f.hi}}}}else return c(a,e,i)}return{lo:0,hi:a.length-1}}function evaluateInteractionItems(t,e,i,s,n){const a=t.getSortedVisibleDatasetMetas(),r=i[e];for(let l=0,c=a.length;l<c;++l){const{index:d,data:u}=a[l],{lo:h,hi:f}=binarySearch(a[l],e,r,n);for(let g=h;g<=f;++g){const m=u[g];m.skip||s(m,d,g)}}}function getDistanceMetricForAxis(t){const e=t.indexOf("x")!==-1,i=t.indexOf("y")!==-1;return function(s,n){const a=e?Math.abs(s.x-n.x):0,r=i?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function getIntersectItems(t,e,i,s,n){const a=[];return!n&&!t.isPointInArea(e)||evaluateInteractionItems(t,i,e,function(l,c,d){!n&&!_isPointInArea(l,t.chartArea,0)||l.inRange(e.x,e.y,s)&&a.push({element:l,datasetIndex:c,index:d})},!0),a}function getNearestRadialItems(t,e,i,s){let n=[];function a(r,l,c){const{startAngle:d,endAngle:u}=r.getProps(["startAngle","endAngle"],s),{angle:h}=getAngleFromPoint(r,{x:e.x,y:e.y});_angleBetween(h,d,u)&&n.push({element:r,datasetIndex:l,index:c})}return evaluateInteractionItems(t,i,e,a),n}function getNearestCartesianItems(t,e,i,s,n,a){let r=[];const l=getDistanceMetricForAxis(i);let c=Number.POSITIVE_INFINITY;function d(u,h,f){const g=u.inRange(e.x,e.y,n);if(s&&!g)return;const m=u.getCenterPoint(n);if(!(!!a||t.isPointInArea(m))&&!g)return;const w=l(e,m);w<c?(r=[{element:u,datasetIndex:h,index:f}],c=w):w===c&&r.push({element:u,datasetIndex:h,index:f})}return evaluateInteractionItems(t,i,e,d),r}function getNearestItems(t,e,i,s,n,a){return!a&&!t.isPointInArea(e)?[]:i==="r"&&!s?getNearestRadialItems(t,e,i,n):getNearestCartesianItems(t,e,i,s,n,a)}function getAxisItems(t,e,i,s,n){const a=[],r=i==="x"?"inXRange":"inYRange";let l=!1;return evaluateInteractionItems(t,i,e,(c,d,u)=>{c[r](e[i],n)&&(a.push({element:c,datasetIndex:d,index:u}),l=l||c.inRange(e.x,e.y,n))}),s&&!l?[]:a}var Interaction={evaluateInteractionItems,modes:{index(t,e,i,s){const n=getRelativePosition(e,t),a=i.axis||"x",r=i.includeInvisible||!1,l=i.intersect?getIntersectItems(t,n,a,s,r):getNearestItems(t,n,a,!1,s,r),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(d=>{const u=l[0].index,h=d.data[u];h&&!h.skip&&c.push({element:h,datasetIndex:d.index,index:u})}),c):[]},dataset(t,e,i,s){const n=getRelativePosition(e,t),a=i.axis||"xy",r=i.includeInvisible||!1;let l=i.intersect?getIntersectItems(t,n,a,s,r):getNearestItems(t,n,a,!1,s,r);if(l.length>0){const c=l[0].datasetIndex,d=t.getDatasetMeta(c).data;l=[];for(let u=0;u<d.length;++u)l.push({element:d[u],datasetIndex:c,index:u})}return l},point(t,e,i,s){const n=getRelativePosition(e,t),a=i.axis||"xy",r=i.includeInvisible||!1;return getIntersectItems(t,n,a,s,r)},nearest(t,e,i,s){const n=getRelativePosition(e,t),a=i.axis||"xy",r=i.includeInvisible||!1;return getNearestItems(t,n,a,i.intersect,s,r)},x(t,e,i,s){const n=getRelativePosition(e,t);return getAxisItems(t,n,"x",i.intersect,s)},y(t,e,i,s){const n=getRelativePosition(e,t);return getAxisItems(t,n,"y",i.intersect,s)}}};const STATIC_POSITIONS=["left","top","right","bottom"];function filterByPosition(t,e){return t.filter(i=>i.pos===e)}function filterDynamicPositionByAxis(t,e){return t.filter(i=>STATIC_POSITIONS.indexOf(i.pos)===-1&&i.box.axis===e)}function sortByWeight(t,e){return t.sort((i,s)=>{const n=e?s:i,a=e?i:s;return n.weight===a.weight?n.index-a.index:n.weight-a.weight})}function wrapBoxes(t){const e=[];let i,s,n,a,r,l;for(i=0,s=(t||[]).length;i<s;++i)n=t[i],{position:a,options:{stack:r,stackWeight:l=1}}=n,e.push({index:i,box:n,pos:a,horizontal:n.isHorizontal(),weight:n.weight,stack:r&&a+r,stackWeight:l});return e}function buildStacks(t){const e={};for(const i of t){const{stack:s,pos:n,stackWeight:a}=i;if(!s||!STATIC_POSITIONS.includes(n))continue;const r=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=a}return e}function setLayoutDims(t,e){const i=buildStacks(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let a,r,l;for(a=0,r=t.length;a<r;++a){l=t[a];const{fullSize:c}=l.box,d=i[l.stack],u=d&&l.stackWeight/d.weight;l.horizontal?(l.width=u?u*s:c&&e.availableWidth,l.height=n):(l.width=s,l.height=u?u*n:c&&e.availableHeight)}return i}function buildLayoutBoxes(t){const e=wrapBoxes(t),i=sortByWeight(e.filter(d=>d.box.fullSize),!0),s=sortByWeight(filterByPosition(e,"left"),!0),n=sortByWeight(filterByPosition(e,"right")),a=sortByWeight(filterByPosition(e,"top"),!0),r=sortByWeight(filterByPosition(e,"bottom")),l=filterDynamicPositionByAxis(e,"x"),c=filterDynamicPositionByAxis(e,"y");return{fullSize:i,leftAndTop:s.concat(a),rightAndBottom:n.concat(c).concat(r).concat(l),chartArea:filterByPosition(e,"chartArea"),vertical:s.concat(n).concat(c),horizontal:a.concat(r).concat(l)}}function getCombinedMax(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function updateMaxPadding(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function updateDims(t,e,i,s){const{pos:n,box:a}=i,r=t.maxPadding;if(!isObject(n)){i.size&&(t[n]-=i.size);const h=s[i.stack]||{size:0,count:1};h.size=Math.max(h.size,i.horizontal?a.height:a.width),i.size=h.size/h.count,t[n]+=i.size}a.getPadding&&updateMaxPadding(r,a.getPadding());const l=Math.max(0,e.outerWidth-getCombinedMax(r,t,"left","right")),c=Math.max(0,e.outerHeight-getCombinedMax(r,t,"top","bottom")),d=l!==t.w,u=c!==t.h;return t.w=l,t.h=c,i.horizontal?{same:d,other:u}:{same:u,other:d}}function handleMaxPadding(t){const e=t.maxPadding;function i(s){const n=Math.max(e[s]-t[s],0);return t[s]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}function getMargins(t,e){const i=e.maxPadding;function s(n){const a={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{a[r]=Math.max(e[r],i[r])}),a}return s(t?["left","right"]:["top","bottom"])}function fitBoxes(t,e,i,s){const n=[];let a,r,l,c,d,u;for(a=0,r=t.length,d=0;a<r;++a){l=t[a],c=l.box,c.update(l.width||e.w,l.height||e.h,getMargins(l.horizontal,e));const{same:h,other:f}=updateDims(e,i,l,s);d|=h&&n.length,u=u||f,c.fullSize||n.push(l)}return d&&fitBoxes(n,e,i,s)||u}function setBoxDims(t,e,i,s,n){t.top=i,t.left=e,t.right=e+s,t.bottom=i+n,t.width=s,t.height=n}function placeBoxes(t,e,i,s){const n=i.padding;let{x:a,y:r}=e;for(const l of t){const c=l.box,d=s[l.stack]||{count:1,placed:0,weight:1},u=l.stackWeight/d.weight||1;if(l.horizontal){const h=e.w*u,f=d.size||c.height;defined(d.start)&&(r=d.start),c.fullSize?setBoxDims(c,n.left,r,i.outerWidth-n.right-n.left,f):setBoxDims(c,e.left+d.placed,r,h,f),d.start=r,d.placed+=h,r=c.bottom}else{const h=e.h*u,f=d.size||c.width;defined(d.start)&&(a=d.start),c.fullSize?setBoxDims(c,a,n.top,f,i.outerHeight-n.bottom-n.top):setBoxDims(c,a,e.top+d.placed,f,h),d.start=a,d.placed+=h,a=c.right}}e.x=a,e.y=r}var layouts={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(i){e.draw(i)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;i!==-1&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,s){if(!t)return;const n=toPadding(t.options.layout.padding),a=Math.max(e-n.width,0),r=Math.max(i-n.height,0),l=buildLayoutBoxes(t.boxes),c=l.vertical,d=l.horizontal;each(t.boxes,_=>{typeof _.beforeLayout=="function"&&_.beforeLayout()});const u=c.reduce((_,w)=>w.box.options&&w.box.options.display===!1?_:_+1,0)||1,h=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:a,availableHeight:r,vBoxMaxWidth:a/2/u,hBoxMaxHeight:r/2}),f=Object.assign({},n);updateMaxPadding(f,toPadding(s));const g=Object.assign({maxPadding:f,w:a,h:r,x:n.left,y:n.top},n),m=setLayoutDims(c.concat(d),h);fitBoxes(l.fullSize,g,h,m),fitBoxes(c,g,h,m),fitBoxes(d,g,h,m)&&fitBoxes(c,g,h,m),handleMaxPadding(g),placeBoxes(l.leftAndTop,g,h,m),g.x+=g.w,g.y+=g.h,placeBoxes(l.rightAndBottom,g,h,m),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},each(l.chartArea,_=>{const w=_.box;Object.assign(w,t.chartArea),w.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class BasePlatform{acquireContext(e,i){}releaseContext(e){return!1}addEventListener(e,i,s){}removeEventListener(e,i,s){}getDevicePixelRatio(){return 1}getMaximumSize(e,i,s,n){return i=Math.max(0,i||e.width),s=s||e.height,{width:i,height:Math.max(0,n?Math.floor(i/n):s)}}isAttached(e){return!0}updateConfig(e){}}class BasicPlatform extends BasePlatform{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const EXPANDO_KEY="$chartjs",EVENT_TYPES={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},isNullOrEmpty=t=>t===null||t==="";function initCanvas(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t[EXPANDO_KEY]={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",isNullOrEmpty(n)){const a=readUsedSize(t,"width");a!==void 0&&(t.width=a)}if(isNullOrEmpty(s))if(t.style.height==="")t.height=t.width/(e||2);else{const a=readUsedSize(t,"height");a!==void 0&&(t.height=a)}return t}const eventListenerOptions=supportsEventListenerOptions?{passive:!0}:!1;function addListener(t,e,i){t.addEventListener(e,i,eventListenerOptions)}function removeListener(t,e,i){t.canvas.removeEventListener(e,i,eventListenerOptions)}function fromNativeEvent(t,e){const i=EVENT_TYPES[t.type]||t.type,{x:s,y:n}=getRelativePosition(t,e);return{type:i,chart:e,native:t,x:s!==void 0?s:null,y:n!==void 0?n:null}}function nodeListContains(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function createAttachObserver(t,e,i){const s=t.canvas,n=new MutationObserver(a=>{let r=!1;for(const l of a)r=r||nodeListContains(l.addedNodes,s),r=r&&!nodeListContains(l.removedNodes,s);r&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}function createDetachObserver(t,e,i){const s=t.canvas,n=new MutationObserver(a=>{let r=!1;for(const l of a)r=r||nodeListContains(l.removedNodes,s),r=r&&!nodeListContains(l.addedNodes,s);r&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}const drpListeningCharts=new Map;let oldDevicePixelRatio=0;function onWindowResize(){const t=window.devicePixelRatio;t!==oldDevicePixelRatio&&(oldDevicePixelRatio=t,drpListeningCharts.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function listenDevicePixelRatioChanges(t,e){drpListeningCharts.size||window.addEventListener("resize",onWindowResize),drpListeningCharts.set(t,e)}function unlistenDevicePixelRatioChanges(t){drpListeningCharts.delete(t),drpListeningCharts.size||window.removeEventListener("resize",onWindowResize)}function createResizeObserver(t,e,i){const s=t.canvas,n=s&&_getParentNode(s);if(!n)return;const a=throttled((l,c)=>{const d=n.clientWidth;i(l,c),d<n.clientWidth&&i()},window),r=new ResizeObserver(l=>{const c=l[0],d=c.contentRect.width,u=c.contentRect.height;d===0&&u===0||a(d,u)});return r.observe(n),listenDevicePixelRatioChanges(t,a),r}function releaseObserver(t,e,i){i&&i.disconnect(),e==="resize"&&unlistenDevicePixelRatioChanges(t)}function createProxyAndListen(t,e,i){const s=t.canvas,n=throttled(a=>{t.ctx!==null&&i(fromNativeEvent(a,t))},t);return addListener(s,e,n),n}class DomPlatform extends BasePlatform{acquireContext(e,i){const s=e&&e.getContext&&e.getContext("2d");return s&&s.canvas===e?(initCanvas(e,i),s):null}releaseContext(e){const i=e.canvas;if(!i[EXPANDO_KEY])return!1;const s=i[EXPANDO_KEY].initial;["height","width"].forEach(a=>{const r=s[a];isNullOrUndef(r)?i.removeAttribute(a):i.setAttribute(a,r)});const n=s.style||{};return Object.keys(n).forEach(a=>{i.style[a]=n[a]}),i.width=i.width,delete i[EXPANDO_KEY],!0}addEventListener(e,i,s){this.removeEventListener(e,i);const n=e.$proxies||(e.$proxies={}),r={attach:createAttachObserver,detach:createDetachObserver,resize:createResizeObserver}[i]||createProxyAndListen;n[i]=r(e,i,s)}removeEventListener(e,i){const s=e.$proxies||(e.$proxies={}),n=s[i];if(!n)return;({attach:releaseObserver,detach:releaseObserver,resize:releaseObserver}[i]||removeListener)(e,i,n),s[i]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,i,s,n){return getMaximumSize(e,i,s,n)}isAttached(e){const i=_getParentNode(e);return!!(i&&i.isConnected)}}function _detectPlatform(t){return!_isDomSupported()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?BasicPlatform:DomPlatform}class Element{constructor(){Q(this,"active",!1)}tooltipPosition(e){const{x:i,y:s}=this.getProps(["x","y"],e);return{x:i,y:s}}hasValue(){return isNumber(this.x)&&isNumber(this.y)}getProps(e,i){const s=this.$animations;if(!i||!s)return this;const n={};return e.forEach(a=>{n[a]=s[a]&&s[a].active()?s[a]._to:this[a]}),n}}Q(Element,"defaults",{}),Q(Element,"defaultRoutes");function autoSkip(t,e){const i=t.options.ticks,s=determineMaxTicks(t),n=Math.min(i.maxTicksLimit||s,s),a=i.major.enabled?getMajorIndices(e):[],r=a.length,l=a[0],c=a[r-1],d=[];if(r>n)return skipMajors(e,d,a,r/n),d;const u=calculateSpacing(a,e,n);if(r>0){let h,f;const g=r>1?Math.round((c-l)/(r-1)):null;for(skip(e,d,u,isNullOrUndef(g)?0:l-g,l),h=0,f=r-1;h<f;h++)skip(e,d,u,a[h],a[h+1]);return skip(e,d,u,c,isNullOrUndef(g)?e.length:c+g),d}return skip(e,d,u),d}function determineMaxTicks(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}function calculateSpacing(t,e,i){const s=getEvenSpacing(t),n=e.length/i;if(!s)return Math.max(n,1);const a=_factorize(s);for(let r=0,l=a.length-1;r<l;r++){const c=a[r];if(c>n)return c}return Math.max(n,1)}function getMajorIndices(t){const e=[];let i,s;for(i=0,s=t.length;i<s;i++)t[i].major&&e.push(i);return e}function skipMajors(t,e,i,s){let n=0,a=i[0],r;for(s=Math.ceil(s),r=0;r<t.length;r++)r===a&&(e.push(t[r]),n++,a=i[n*s])}function skip(t,e,i,s,n){const a=valueOrDefault(s,0),r=Math.min(valueOrDefault(n,t.length),t.length);let l=0,c,d,u;for(i=Math.ceil(i),n&&(c=n-s,i=c/Math.floor(c/i)),u=a;u<0;)l++,u=Math.round(a+l*i);for(d=Math.max(a,0);d<r;d++)d===u&&(e.push(t[d]),l++,u=Math.round(a+l*i))}function getEvenSpacing(t){const e=t.length;let i,s;if(e<2)return!1;for(s=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==s)return!1;return s}const reverseAlign=t=>t==="left"?"right":t==="right"?"left":t,offsetFromEdge=(t,e,i)=>e==="top"||e==="left"?t[e]+i:t[e]-i;function sample(t,e){const i=[],s=t.length/e,n=t.length;let a=0;for(;a<n;a+=s)i.push(t[Math.floor(a)]);return i}function getPixelForGridLine(t,e,i){const s=t.ticks.length,n=Math.min(e,s-1),a=t._startPixel,r=t._endPixel,l=1e-6;let c=t.getPixelForTick(n),d;if(!(i&&(s===1?d=Math.max(c-a,r-c):e===0?d=(t.getPixelForTick(1)-c)/2:d=(c-t.getPixelForTick(n-1))/2,c+=n<e?d:-d,c<a-l||c>r+l)))return c}function garbageCollect(t,e){each(t,i=>{const s=i.gc,n=s.length/2;let a;if(n>e){for(a=0;a<n;++a)delete i.data[s[a]];s.splice(0,n)}})}function getTickMarkLength(t){return t.drawTicks?t.tickLength:0}function getTitleHeight(t,e){if(!t.display)return 0;const i=toFont(t.font,e),s=toPadding(t.padding);return(isArray(t.text)?t.text.length:1)*i.lineHeight+s.height}function createScaleContext(t,e){return createContext(t,{scale:e,type:"scale"})}function createTickContext(t,e,i){return createContext(t,{tick:i,index:e,type:"tick"})}function titleAlign(t,e,i){let s=_toLeftRightCenter(t);return(i&&e!=="right"||!i&&e==="right")&&(s=reverseAlign(s)),s}function titleArgs(t,e,i,s){const{top:n,left:a,bottom:r,right:l,chart:c}=t,{chartArea:d,scales:u}=c;let h=0,f,g,m;const _=r-n,w=l-a;if(t.isHorizontal()){if(g=_alignStartEnd(s,a,l),isObject(i)){const B=Object.keys(i)[0],D=i[B];m=u[B].getPixelForValue(D)+_-e}else i==="center"?m=(d.bottom+d.top)/2+_-e:m=offsetFromEdge(t,i,e);f=l-a}else{if(isObject(i)){const B=Object.keys(i)[0],D=i[B];g=u[B].getPixelForValue(D)-w+e}else i==="center"?g=(d.left+d.right)/2-w+e:g=offsetFromEdge(t,i,e);m=_alignStartEnd(s,r,n),h=i==="left"?-HALF_PI:HALF_PI}return{titleX:g,titleY:m,maxWidth:f,rotation:h}}class Scale extends Element{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,i){return e}getUserBounds(){let{_userMin:e,_userMax:i,_suggestedMin:s,_suggestedMax:n}=this;return e=finiteOrDefault(e,Number.POSITIVE_INFINITY),i=finiteOrDefault(i,Number.NEGATIVE_INFINITY),s=finiteOrDefault(s,Number.POSITIVE_INFINITY),n=finiteOrDefault(n,Number.NEGATIVE_INFINITY),{min:finiteOrDefault(e,s),max:finiteOrDefault(i,n),minDefined:isNumberFinite(e),maxDefined:isNumberFinite(i)}}getMinMax(e){let{min:i,max:s,minDefined:n,maxDefined:a}=this.getUserBounds(),r;if(n&&a)return{min:i,max:s};const l=this.getMatchingVisibleMetas();for(let c=0,d=l.length;c<d;++c)r=l[c].controller.getMinMax(this,e),n||(i=Math.min(i,r.min)),a||(s=Math.max(s,r.max));return i=a&&i>s?s:i,s=n&&i>s?i:s,{min:finiteOrDefault(i,finiteOrDefault(s,i)),max:finiteOrDefault(s,finiteOrDefault(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){callback(this.options.beforeUpdate,[this])}update(e,i,s){const{beginAtZero:n,grace:a,ticks:r}=this.options,l=r.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=i,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_addGrace(this,a,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?sample(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=autoSkip(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,i,s;this.isHorizontal()?(i=this.left,s=this.right):(i=this.top,s=this.bottom,e=!e),this._startPixel=i,this._endPixel=s,this._reversePixels=e,this._length=s-i,this._alignToPixels=this.options.alignToPixels}afterUpdate(){callback(this.options.afterUpdate,[this])}beforeSetDimensions(){callback(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){callback(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),callback(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){callback(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const i=this.options.ticks;let s,n,a;for(s=0,n=e.length;s<n;s++)a=e[s],a.label=callback(i.callback,[a.value,s,e],this)}afterTickToLabelConversion(){callback(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){callback(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,i=e.ticks,s=this.ticks.length,n=i.minRotation||0,a=i.maxRotation;let r=n,l,c,d;if(!this._isVisible()||!i.display||n>=a||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const u=this._getLabelSizes(),h=u.widest.width,f=u.highest.height,g=_limitValue(this.chart.width-h,0,this.maxWidth);l=e.offset?this.maxWidth/s:g/(s-1),h+6>l&&(l=g/(s-(e.offset?.5:1)),c=this.maxHeight-getTickMarkLength(e.grid)-i.padding-getTitleHeight(e.title,this.chart.options.font),d=Math.sqrt(h*h+f*f),r=toDegrees(Math.min(Math.asin(_limitValue((u.highest.height+6)/l,-1,1)),Math.asin(_limitValue(c/d,-1,1))-Math.asin(_limitValue(f/d,-1,1)))),r=Math.max(n,Math.min(a,r))),this.labelRotation=r}afterCalculateLabelRotation(){callback(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){callback(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:i,options:{ticks:s,title:n,grid:a}}=this,r=this._isVisible(),l=this.isHorizontal();if(r){const c=getTitleHeight(n,i.options.font);if(l?(e.width=this.maxWidth,e.height=getTickMarkLength(a)+c):(e.height=this.maxHeight,e.width=getTickMarkLength(a)+c),s.display&&this.ticks.length){const{first:d,last:u,widest:h,highest:f}=this._getLabelSizes(),g=s.padding*2,m=toRadians(this.labelRotation),_=Math.cos(m),w=Math.sin(m);if(l){const B=s.mirror?0:w*h.width+_*f.height;e.height=Math.min(this.maxHeight,e.height+B+g)}else{const B=s.mirror?0:_*h.width+w*f.height;e.width=Math.min(this.maxWidth,e.width+B+g)}this._calculatePadding(d,u,w,_)}}this._handleMargins(),l?(this.width=this._length=i.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=i.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,i,s,n){const{ticks:{align:a,padding:r},position:l}=this.options,c=this.labelRotation!==0,d=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,g=0;c?d?(f=n*e.width,g=s*i.height):(f=s*e.height,g=n*i.width):a==="start"?g=i.width:a==="end"?f=e.width:a!=="inner"&&(f=e.width/2,g=i.width/2),this.paddingLeft=Math.max((f-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((g-h+r)*this.width/(this.width-h),0)}else{let u=i.height/2,h=e.height/2;a==="start"?(u=0,h=e.height):a==="end"&&(u=i.height,h=0),this.paddingTop=u+r,this.paddingBottom=h+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){callback(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:i}=this.options;return i==="top"||i==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let i,s;for(i=0,s=e.length;i<s;i++)isNullOrUndef(e[i].label)&&(e.splice(i,1),s--,i--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const i=this.options.ticks.sampleSize;let s=this.ticks;i<s.length&&(s=sample(s,i)),this._labelSizes=e=this._computeLabelSizes(s,s.length)}return e}_computeLabelSizes(e,i){const{ctx:s,_longestTextCache:n}=this,a=[],r=[];let l=0,c=0,d,u,h,f,g,m,_,w,B,D,P;for(d=0;d<i;++d){if(f=e[d].label,g=this._resolveTickFontOptions(d),s.font=m=g.string,_=n[m]=n[m]||{data:{},gc:[]},w=g.lineHeight,B=D=0,!isNullOrUndef(f)&&!isArray(f))B=_measureText(s,_.data,_.gc,B,f),D=w;else if(isArray(f))for(u=0,h=f.length;u<h;++u)P=f[u],!isNullOrUndef(P)&&!isArray(P)&&(B=_measureText(s,_.data,_.gc,B,P),D+=w);a.push(B),r.push(D),l=Math.max(B,l),c=Math.max(D,c)}garbageCollect(n,i);const H=a.indexOf(l),N=r.indexOf(c),W=L=>({width:a[L]||0,height:r[L]||0});return{first:W(0),last:W(i-1),widest:W(H),highest:W(N),widths:a,heights:r}}getLabelForValue(e){return e}getPixelForValue(e,i){return NaN}getValueForPixel(e){}getPixelForTick(e){const i=this.ticks;return e<0||e>i.length-1?null:this.getPixelForValue(i[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const i=this._startPixel+e*this._length;return _int16Range(this._alignToPixels?_alignPixel(this.chart,i,0):i)}getDecimalForPixel(e){const i=(e-this._startPixel)/this._length;return this._reversePixels?1-i:i}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:i}=this;return e<0&&i<0?i:e>0&&i>0?e:0}getContext(e){const i=this.ticks||[];if(e>=0&&e<i.length){const s=i[e];return s.$context||(s.$context=createTickContext(this.getContext(),e,s))}return this.$context||(this.$context=createScaleContext(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,i=toRadians(this.labelRotation),s=Math.abs(Math.cos(i)),n=Math.abs(Math.sin(i)),a=this._getLabelSizes(),r=e.autoSkipPadding||0,l=a?a.widest.width+r:0,c=a?a.highest.height+r:0;return this.isHorizontal()?c*s>l*n?l/s:c/n:c*n<l*s?c/s:l/n}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const i=this.axis,s=this.chart,n=this.options,{grid:a,position:r,border:l}=n,c=a.offset,d=this.isHorizontal(),h=this.ticks.length+(c?1:0),f=getTickMarkLength(a),g=[],m=l.setContext(this.getContext()),_=m.display?m.width:0,w=_/2,B=function(re){return _alignPixel(s,re,_)};let D,P,H,N,W,L,U,K,X,Y,J,oe;if(r==="top")D=B(this.bottom),L=this.bottom-f,K=D-w,Y=B(e.top)+w,oe=e.bottom;else if(r==="bottom")D=B(this.top),Y=e.top,oe=B(e.bottom)-w,L=D+w,K=this.top+f;else if(r==="left")D=B(this.right),W=this.right-f,U=D-w,X=B(e.left)+w,J=e.right;else if(r==="right")D=B(this.left),X=e.left,J=B(e.right)-w,W=D+w,U=this.left+f;else if(i==="x"){if(r==="center")D=B((e.top+e.bottom)/2+.5);else if(isObject(r)){const re=Object.keys(r)[0],ae=r[re];D=B(this.chart.scales[re].getPixelForValue(ae))}Y=e.top,oe=e.bottom,L=D+w,K=L+f}else if(i==="y"){if(r==="center")D=B((e.left+e.right)/2);else if(isObject(r)){const re=Object.keys(r)[0],ae=r[re];D=B(this.chart.scales[re].getPixelForValue(ae))}W=D-w,U=W-f,X=e.left,J=e.right}const de=valueOrDefault(n.ticks.maxTicksLimit,h),se=Math.max(1,Math.ceil(h/de));for(P=0;P<h;P+=se){const re=this.getContext(P),ae=a.setContext(re),ge=l.setContext(re),fe=ae.lineWidth,ie=ae.color,ee=ge.dash||[],le=ge.dashOffset,he=ae.tickWidth,pe=ae.tickColor,me=ae.tickBorderDash||[],ue=ae.tickBorderDashOffset;H=getPixelForGridLine(this,P,c),H!==void 0&&(N=_alignPixel(s,H,fe),d?W=U=X=J=N:L=K=Y=oe=N,g.push({tx1:W,ty1:L,tx2:U,ty2:K,x1:X,y1:Y,x2:J,y2:oe,width:fe,color:ie,borderDash:ee,borderDashOffset:le,tickWidth:he,tickColor:pe,tickBorderDash:me,tickBorderDashOffset:ue}))}return this._ticksLength=h,this._borderValue=D,g}_computeLabelItems(e){const i=this.axis,s=this.options,{position:n,ticks:a}=s,r=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:d,padding:u,mirror:h}=a,f=getTickMarkLength(s.grid),g=f+u,m=h?-u:g,_=-toRadians(this.labelRotation),w=[];let B,D,P,H,N,W,L,U,K,X,Y,J,oe="middle";if(n==="top")W=this.bottom-m,L=this._getXAxisLabelAlignment();else if(n==="bottom")W=this.top+m,L=this._getXAxisLabelAlignment();else if(n==="left"){const se=this._getYAxisLabelAlignment(f);L=se.textAlign,N=se.x}else if(n==="right"){const se=this._getYAxisLabelAlignment(f);L=se.textAlign,N=se.x}else if(i==="x"){if(n==="center")W=(e.top+e.bottom)/2+g;else if(isObject(n)){const se=Object.keys(n)[0],re=n[se];W=this.chart.scales[se].getPixelForValue(re)+g}L=this._getXAxisLabelAlignment()}else if(i==="y"){if(n==="center")N=(e.left+e.right)/2-g;else if(isObject(n)){const se=Object.keys(n)[0],re=n[se];N=this.chart.scales[se].getPixelForValue(re)}L=this._getYAxisLabelAlignment(f).textAlign}i==="y"&&(c==="start"?oe="top":c==="end"&&(oe="bottom"));const de=this._getLabelSizes();for(B=0,D=l.length;B<D;++B){P=l[B],H=P.label;const se=a.setContext(this.getContext(B));U=this.getPixelForTick(B)+a.labelOffset,K=this._resolveTickFontOptions(B),X=K.lineHeight,Y=isArray(H)?H.length:1;const re=Y/2,ae=se.color,ge=se.textStrokeColor,fe=se.textStrokeWidth;let ie=L;r?(N=U,L==="inner"&&(B===D-1?ie=this.options.reverse?"left":"right":B===0?ie=this.options.reverse?"right":"left":ie="center"),n==="top"?d==="near"||_!==0?J=-Y*X+X/2:d==="center"?J=-de.highest.height/2-re*X+X:J=-de.highest.height+X/2:d==="near"||_!==0?J=X/2:d==="center"?J=de.highest.height/2-re*X:J=de.highest.height-Y*X,h&&(J*=-1),_!==0&&!se.showLabelBackdrop&&(N+=X/2*Math.sin(_))):(W=U,J=(1-Y)*X/2);let ee;if(se.showLabelBackdrop){const le=toPadding(se.backdropPadding),he=de.heights[B],pe=de.widths[B];let me=J-le.top,ue=0-le.left;switch(oe){case"middle":me-=he/2;break;case"bottom":me-=he;break}switch(L){case"center":ue-=pe/2;break;case"right":ue-=pe;break}ee={left:ue,top:me,width:pe+le.width,height:he+le.height,color:se.backdropColor}}w.push({label:H,font:K,textOffset:J,options:{rotation:_,color:ae,strokeColor:ge,strokeWidth:fe,textAlign:ie,textBaseline:oe,translation:[N,W],backdrop:ee}})}return w}_getXAxisLabelAlignment(){const{position:e,ticks:i}=this.options;if(-toRadians(this.labelRotation))return e==="top"?"left":"right";let n="center";return i.align==="start"?n="left":i.align==="end"?n="right":i.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(e){const{position:i,ticks:{crossAlign:s,mirror:n,padding:a}}=this.options,r=this._getLabelSizes(),l=e+a,c=r.widest.width;let d,u;return i==="left"?n?(u=this.right+a,s==="near"?d="left":s==="center"?(d="center",u+=c/2):(d="right",u+=c)):(u=this.right-l,s==="near"?d="right":s==="center"?(d="center",u-=c/2):(d="left",u=this.left)):i==="right"?n?(u=this.left+a,s==="near"?d="right":s==="center"?(d="center",u-=c/2):(d="left",u-=c)):(u=this.left+l,s==="near"?d="left":s==="center"?(d="center",u+=c/2):(d="right",u=this.right)):d="right",{textAlign:d,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,i=this.options.position;if(i==="left"||i==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(i==="top"||i==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:i},left:s,top:n,width:a,height:r}=this;i&&(e.save(),e.fillStyle=i,e.fillRect(s,n,a,r),e.restore())}getLineWidthForValue(e){const i=this.options.grid;if(!this._isVisible()||!i.display)return 0;const n=this.ticks.findIndex(a=>a.value===e);return n>=0?i.setContext(this.getContext(n)).lineWidth:0}drawGrid(e){const i=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let a,r;const l=(c,d,u)=>{!u.width||!u.color||(s.save(),s.lineWidth=u.width,s.strokeStyle=u.color,s.setLineDash(u.borderDash||[]),s.lineDashOffset=u.borderDashOffset,s.beginPath(),s.moveTo(c.x,c.y),s.lineTo(d.x,d.y),s.stroke(),s.restore())};if(i.display)for(a=0,r=n.length;a<r;++a){const c=n[a];i.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),i.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:i,options:{border:s,grid:n}}=this,a=s.setContext(this.getContext()),r=s.display?a.width:0;if(!r)return;const l=n.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,u,h,f;this.isHorizontal()?(d=_alignPixel(e,this.left,r)-r/2,u=_alignPixel(e,this.right,l)+l/2,h=f=c):(h=_alignPixel(e,this.top,r)-r/2,f=_alignPixel(e,this.bottom,l)+l/2,d=u=c),i.save(),i.lineWidth=a.width,i.strokeStyle=a.color,i.beginPath(),i.moveTo(d,h),i.lineTo(u,f),i.stroke(),i.restore()}drawLabels(e){if(!this.options.ticks.display)return;const s=this.ctx,n=this._computeLabelArea();n&&clipArea(s,n);const a=this.getLabelItems(e);for(const r of a){const l=r.options,c=r.font,d=r.label,u=r.textOffset;renderText(s,d,0,u,c,l)}n&&unclipArea(s)}drawTitle(){const{ctx:e,options:{position:i,title:s,reverse:n}}=this;if(!s.display)return;const a=toFont(s.font),r=toPadding(s.padding),l=s.align;let c=a.lineHeight/2;i==="bottom"||i==="center"||isObject(i)?(c+=r.bottom,isArray(s.text)&&(c+=a.lineHeight*(s.text.length-1))):c+=r.top;const{titleX:d,titleY:u,maxWidth:h,rotation:f}=titleArgs(this,c,i,l);renderText(e,s.text,0,0,a,{color:s.color,maxWidth:h,rotation:f,textAlign:titleAlign(l,i,n),textBaseline:"middle",translation:[d,u]})}draw(e){!this._isVisible()||(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,i=e.ticks&&e.ticks.z||0,s=valueOrDefault(e.grid&&e.grid.z,-1),n=valueOrDefault(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Scale.prototype.draw?[{z:i,draw:a=>{this.draw(a)}}]:[{z:s,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:i,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(e){const i=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let a,r;for(a=0,r=i.length;a<r;++a){const l=i[a];l[s]===this.id&&(!e||l.type===e)&&n.push(l)}return n}_resolveTickFontOptions(e){const i=this.options.ticks.setContext(this.getContext(e));return toFont(i.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class TypedRegistry{constructor(e,i,s){this.type=e,this.scope=i,this.override=s,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const i=Object.getPrototypeOf(e);let s;isIChartComponent(i)&&(s=this.register(i));const n=this.items,a=e.id,r=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+e);return a in n||(n[a]=e,registerDefaults(e,r,s),this.override&&defaults.override(e.id,e.overrides)),r}get(e){return this.items[e]}unregister(e){const i=this.items,s=e.id,n=this.scope;s in i&&delete i[s],n&&s in defaults[n]&&(delete defaults[n][s],this.override&&delete overrides[s])}}function registerDefaults(t,e,i){const s=merge(Object.create(null),[i?defaults.get(i):{},defaults.get(e),t.defaults]);defaults.set(e,s),t.defaultRoutes&&routeDefaults(e,t.defaultRoutes),t.descriptors&&defaults.describe(e,t.descriptors)}function routeDefaults(t,e){Object.keys(e).forEach(i=>{const s=i.split("."),n=s.pop(),a=[t].concat(s).join("."),r=e[i].split("."),l=r.pop(),c=r.join(".");defaults.route(a,n,c,l)})}function isIChartComponent(t){return"id"in t&&"defaults"in t}class Registry{constructor(){this.controllers=new TypedRegistry(DatasetController,"datasets",!0),this.elements=new TypedRegistry(Element,"elements"),this.plugins=new TypedRegistry(Object,"plugins"),this.scales=new TypedRegistry(Scale,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,i,s){[...i].forEach(n=>{const a=s||this._getRegistryForType(n);s||a.isForType(n)||a===this.plugins&&n.id?this._exec(e,a,n):each(n,r=>{const l=s||this._getRegistryForType(r);this._exec(e,l,r)})})}_exec(e,i,s){const n=_capitalize(e);callback(s["before"+n],[],s),i[e](s),callback(s["after"+n],[],s)}_getRegistryForType(e){for(let i=0;i<this._typedRegistries.length;i++){const s=this._typedRegistries[i];if(s.isForType(e))return s}return this.plugins}_get(e,i,s){const n=i.get(e);if(n===void 0)throw new Error('"'+e+'" is not a registered '+s+".");return n}}var registry=new Registry;class PluginService{constructor(){this._init=[]}notify(e,i,s,n){i==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const a=n?this._descriptors(e).filter(n):this._descriptors(e),r=this._notify(a,e,i,s);return i==="afterDestroy"&&(this._notify(a,e,"stop"),this._notify(this._init,e,"uninstall")),r}_notify(e,i,s,n){n=n||{};for(const a of e){const r=a.plugin,l=r[s],c=[i,n,a.options];if(callback(l,c,r)===!1&&n.cancelable)return!1}return!0}invalidate(){isNullOrUndef(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const i=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),i}_createDescriptors(e,i){const s=e&&e.config,n=valueOrDefault(s.options&&s.options.plugins,{}),a=allPlugins(s);return n===!1&&!i?[]:createDescriptors(e,a,n,i)}_notifyStateChanges(e){const i=this._oldCache||[],s=this._cache,n=(a,r)=>a.filter(l=>!r.some(c=>l.plugin.id===c.plugin.id));this._notify(n(i,s),e,"stop"),this._notify(n(s,i),e,"start")}}function allPlugins(t){const e={},i=[],s=Object.keys(registry.plugins.items);for(let a=0;a<s.length;a++)i.push(registry.getPlugin(s[a]));const n=t.plugins||[];for(let a=0;a<n.length;a++){const r=n[a];i.indexOf(r)===-1&&(i.push(r),e[r.id]=!0)}return{plugins:i,localIds:e}}function getOpts(t,e){return!e&&t===!1?null:t===!0?{}:t}function createDescriptors(t,{plugins:e,localIds:i},s,n){const a=[],r=t.getContext();for(const l of e){const c=l.id,d=getOpts(s[c],n);d!==null&&a.push({plugin:l,options:pluginOpts(t.config,{plugin:l,local:i[c]},d,r)})}return a}function pluginOpts(t,{plugin:e,local:i},s,n){const a=t.pluginScopeKeys(e),r=t.getOptionScopes(s,a);return i&&e.defaults&&r.push(e.defaults),t.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function getIndexAxis(t,e){const i=defaults.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function getAxisFromDefaultScaleID(t,e){let i=t;return t==="_index_"?i=e:t==="_value_"&&(i=e==="x"?"y":"x"),i}function getDefaultScaleIDFromAxis(t,e){return t===e?"_index_":"_value_"}function axisFromPosition(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function determineAxis(t,e){if(t==="x"||t==="y"||t==="r"||(t=e.axis||axisFromPosition(e.position)||t.length>1&&determineAxis(t[0].toLowerCase(),e),t))return t;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function mergeScaleConfig(t,e){const i=overrides[t.type]||{scales:{}},s=e.scales||{},n=getIndexAxis(t.type,e),a=Object.create(null);return Object.keys(s).forEach(r=>{const l=s[r];if(!isObject(l))return console.error(`Invalid scale configuration for scale: ${r}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const c=determineAxis(r,l),d=getDefaultScaleIDFromAxis(c,n),u=i.scales||{};a[r]=mergeIf(Object.create(null),[{axis:c},l,u[c],u[d]])}),t.data.datasets.forEach(r=>{const l=r.type||t.type,c=r.indexAxis||getIndexAxis(l,e),u=(overrides[l]||{}).scales||{};Object.keys(u).forEach(h=>{const f=getAxisFromDefaultScaleID(h,c),g=r[f+"AxisID"]||f;a[g]=a[g]||Object.create(null),mergeIf(a[g],[{axis:f},s[g],u[h]])})}),Object.keys(a).forEach(r=>{const l=a[r];mergeIf(l,[defaults.scales[l.type],defaults.scale])}),a}function initOptions(t){const e=t.options||(t.options={});e.plugins=valueOrDefault(e.plugins,{}),e.scales=mergeScaleConfig(t,e)}function initData(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function initConfig(t){return t=t||{},t.data=initData(t.data),initOptions(t),t}const keyCache=new Map,keysCached=new Set;function cachedKeys(t,e){let i=keyCache.get(t);return i||(i=e(),keyCache.set(t,i),keysCached.add(i)),i}const addIfFound=(t,e,i)=>{const s=resolveObjectKey(e,i);s!==void 0&&t.add(s)};class Config{constructor(e){this._config=initConfig(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=initData(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),initOptions(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return cachedKeys(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,i){return cachedKeys(`${e}.transition.${i}`,()=>[[`datasets.${e}.transitions.${i}`,`transitions.${i}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,i){return cachedKeys(`${e}-${i}`,()=>[[`datasets.${e}.elements.${i}`,`datasets.${e}`,`elements.${i}`,""]])}pluginScopeKeys(e){const i=e.id,s=this.type;return cachedKeys(`${s}-plugin-${i}`,()=>[[`plugins.${i}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,i){const s=this._scopeCache;let n=s.get(e);return(!n||i)&&(n=new Map,s.set(e,n)),n}getOptionScopes(e,i,s){const{options:n,type:a}=this,r=this._cachedScopes(e,s),l=r.get(i);if(l)return l;const c=new Set;i.forEach(u=>{e&&(c.add(e),u.forEach(h=>addIfFound(c,e,h))),u.forEach(h=>addIfFound(c,n,h)),u.forEach(h=>addIfFound(c,overrides[a]||{},h)),u.forEach(h=>addIfFound(c,defaults,h)),u.forEach(h=>addIfFound(c,descriptors,h))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),keysCached.has(i)&&r.set(i,d),d}chartOptionScopes(){const{options:e,type:i}=this;return[e,overrides[i]||{},defaults.datasets[i]||{},{type:i},defaults,descriptors]}resolveNamedOptions(e,i,s,n=[""]){const a={$shared:!0},{resolver:r,subPrefixes:l}=getResolver(this._resolverCache,e,n);let c=r;if(needContext(r,i)){a.$shared=!1,s=isFunction(s)?s():s;const d=this.createResolver(e,s,l);c=_attachContext(r,s,d)}for(const d of i)a[d]=c[d];return a}createResolver(e,i,s=[""],n){const{resolver:a}=getResolver(this._resolverCache,e,s);return isObject(i)?_attachContext(a,i,void 0,n):a}}function getResolver(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let a=s.get(n);return a||(a={resolver:_createResolver(e,i),subPrefixes:i.filter(l=>!l.toLowerCase().includes("hover"))},s.set(n,a)),a}const hasFunction=t=>isObject(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||isFunction(t[i]),!1);function needContext(t,e){const{isScriptable:i,isIndexable:s}=_descriptors(t);for(const n of e){const a=i(n),r=s(n),l=(r||a)&&t[n];if(a&&(isFunction(l)||hasFunction(l))||r&&isArray(l))return!0}return!1}var version="4.1.2";const KNOWN_POSITIONS=["top","bottom","left","right","chartArea"];function positionIsHorizontal(t,e){return t==="top"||t==="bottom"||KNOWN_POSITIONS.indexOf(t)===-1&&e==="x"}function compare2Level(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function onAnimationsComplete(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),callback(i&&i.onComplete,[t],e)}function onAnimationProgress(t){const e=t.chart,i=e.options.animation;callback(i&&i.onProgress,[t],e)}function getCanvas(t){return _isDomSupported()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const instances={},getChart=t=>{const e=getCanvas(t);return Object.values(instances).filter(i=>i.canvas===e).pop()};function moveNumericKeys(t,e,i){const s=Object.keys(t);for(const n of s){const a=+n;if(a>=e){const r=t[n];delete t[n],(i>0||a>e)&&(t[a+i]=r)}}}function determineLastEvent(t,e,i,s){return!i||t.type==="mouseout"?null:s?e:t}function getDatasetArea(t){const{xScale:e,yScale:i}=t;if(e&&i)return{left:e.left,right:e.right,top:i.top,bottom:i.bottom}}class Chart{static register(...e){registry.add(...e),invalidatePlugins()}static unregister(...e){registry.remove(...e),invalidatePlugins()}constructor(e,i){const s=this.config=new Config(i),n=getCanvas(e),a=getChart(n);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||_detectPlatform(n)),this.platform.updateConfig(s);const l=this.platform.acquireContext(n,r.aspectRatio),c=l&&l.canvas,d=c&&c.height,u=c&&c.width;if(this.id=uid(),this.ctx=l,this.canvas=c,this.width=u,this.height=d,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new PluginService,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=debounce(h=>this.update(h),r.resizeDelay||0),this._dataChanges=[],instances[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}animator.listen(this,"complete",onAnimationsComplete),animator.listen(this,"progress",onAnimationProgress),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:i},width:s,height:n,_aspectRatio:a}=this;return isNullOrUndef(e)?i&&a?a:n?s/n:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return registry}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return clearCanvas(this.canvas,this.ctx),this}stop(){return animator.stop(this),this}resize(e,i){animator.running(this)?this._resizeBeforeDraw={width:e,height:i}:this._resize(e,i)}_resize(e,i){const s=this.options,n=this.canvas,a=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,e,i,a),l=s.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,retinaScale(this,l,!0)&&(this.notifyPlugins("resize",{size:r}),callback(s.onResize,[this,r],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const i=this.options.scales||{};each(i,(s,n)=>{s.id=n})}buildOrUpdateScales(){const e=this.options,i=e.scales,s=this.scales,n=Object.keys(s).reduce((r,l)=>(r[l]=!1,r),{});let a=[];i&&(a=a.concat(Object.keys(i).map(r=>{const l=i[r],c=determineAxis(r,l),d=c==="r",u=c==="x";return{options:l,dposition:d?"chartArea":u?"bottom":"left",dtype:d?"radialLinear":u?"category":"linear"}}))),each(a,r=>{const l=r.options,c=l.id,d=determineAxis(c,l),u=valueOrDefault(l.type,r.dtype);(l.position===void 0||positionIsHorizontal(l.position,d)!==positionIsHorizontal(r.dposition))&&(l.position=r.dposition),n[c]=!0;let h=null;if(c in s&&s[c].type===u)h=s[c];else{const f=registry.getScale(u);h=new f({id:c,type:u,ctx:this.ctx,chart:this}),s[h.id]=h}h.init(l,e)}),each(n,(r,l)=>{r||delete s[l]}),each(s,r=>{layouts.configure(this,r,r.options),layouts.addBox(this,r)})}_updateMetasets(){const e=this._metasets,i=this.data.datasets.length,s=e.length;if(e.sort((n,a)=>n.index-a.index),s>i){for(let n=i;n<s;++n)this._destroyDatasetMeta(n);e.splice(i,s-i)}this._sortedMetasets=e.slice(0).sort(compare2Level("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:i}}=this;e.length>i.length&&delete this._stacks,e.forEach((s,n)=>{i.filter(a=>a===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const e=[],i=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=i.length;s<n;s++){const a=i[s];let r=this.getDatasetMeta(s);const l=a.type||this.config.type;if(r.type&&r.type!==l&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=l,r.indexAxis=a.indexAxis||getIndexAxis(l,this.options),r.order=a.order||0,r.index=s,r.label=""+a.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{const c=registry.getController(l),{datasetElementType:d,dataElementType:u}=defaults.datasets[l];Object.assign(c,{dataElementType:registry.getElement(u),datasetElementType:d&®istry.getElement(d)}),r.controller=new c(this,s),e.push(r.controller)}}return this._updateMetasets(),e}_resetElements(){each(this.data.datasets,(e,i)=>{this.getDatasetMeta(i).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const i=this.config;i.update();const s=this._options=i.createResolver(i.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let d=0,u=this.data.datasets.length;d<u;d++){const{controller:h}=this.getDatasetMeta(d),f=!n&&a.indexOf(h)===-1;h.buildOrUpdateElements(f),r=Math.max(+h.getMaxOverflow(),r)}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),n||each(a,d=>{d.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(compare2Level("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){each(this.scales,e=>{layouts.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,i=new Set(Object.keys(this._listeners)),s=new Set(e.events);(!setsEqual(i,s)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,i=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:a}of i){const r=s==="_removeElements"?-a:a;moveNumericKeys(e,n,r)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const i=this.data.datasets.length,s=a=>new Set(e.filter(r=>r[0]===a).map((r,l)=>l+","+r.splice(1).join(","))),n=s(0);for(let a=1;a<i;a++)if(!setsEqual(n,s(a)))return;return Array.from(n).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;layouts.update(this,this.width,this.height,e);const i=this.chartArea,s=i.width<=0||i.height<=0;this._layers=[],each(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,a)=>{n._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let i=0,s=this.data.datasets.length;i<s;++i)this.getDatasetMeta(i).controller.configure();for(let i=0,s=this.data.datasets.length;i<s;++i)this._updateDataset(i,isFunction(e)?e({datasetIndex:i}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,i){const s=this.getDatasetMeta(e),n={meta:s,index:e,mode:i,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(s.controller._update(i),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(animator.has(this)?this.attached&&!animator.running(this)&&animator.start(this):(this.draw(),onAnimationsComplete({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:s,height:n}=this._resizeBeforeDraw;this._resize(s,n),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const i=this._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(this.chartArea);for(this._drawDatasets();e<i.length;++e)i[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const i=this._sortedMetasets,s=[];let n,a;for(n=0,a=i.length;n<a;++n){const r=i[n];(!e||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let i=e.length-1;i>=0;--i)this._drawDataset(e[i]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const i=this.ctx,s=e._clip,n=!s.disabled,a=getDatasetArea(e)||this.chartArea,r={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(n&&clipArea(i,{left:s.left===!1?0:a.left-s.left,right:s.right===!1?this.width:a.right+s.right,top:s.top===!1?0:a.top-s.top,bottom:s.bottom===!1?this.height:a.bottom+s.bottom}),e.controller.draw(),n&&unclipArea(i),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return _isPointInArea(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,i,s,n){const a=Interaction.modes[i];return typeof a=="function"?a(this,e,s,n):[]}getDatasetMeta(e){const i=this.data.datasets[e],s=this._metasets;let n=s.filter(a=>a&&a._dataset===i).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:i&&i.order||0,index:e,_dataset:i,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=createContext(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const i=this.data.datasets[e];if(!i)return!1;const s=this.getDatasetMeta(e);return typeof s.hidden=="boolean"?!s.hidden:!i.hidden}setDatasetVisibility(e,i){const s=this.getDatasetMeta(e);s.hidden=!i}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,i,s){const n=s?"show":"hide",a=this.getDatasetMeta(e),r=a.controller._resolveAnimations(void 0,n);defined(i)?(a.data[i].hidden=!s,this.update()):(this.setDatasetVisibility(e,s),r.update(a,{visible:s}),this.update(l=>l.datasetIndex===e?n:void 0))}hide(e,i){this._updateVisibility(e,i,!1)}show(e,i){this._updateVisibility(e,i,!0)}_destroyDatasetMeta(e){const i=this._metasets[e];i&&i.controller&&i.controller._destroy(),delete this._metasets[e]}_stop(){let e,i;for(this.stop(),animator.remove(this),e=0,i=this.data.datasets.length;e<i;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:i}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),clearCanvas(e,i),this.platform.releaseContext(i),this.canvas=null,this.ctx=null),delete instances[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,i=this.platform,s=(a,r)=>{i.addEventListener(this,a,r),e[a]=r},n=(a,r,l)=>{a.offsetX=r,a.offsetY=l,this._eventHandler(a)};each(this.options.events,a=>s(a,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,i=this.platform,s=(c,d)=>{i.addEventListener(this,c,d),e[c]=d},n=(c,d)=>{e[c]&&(i.removeEventListener(this,c,d),delete e[c])},a=(c,d)=>{this.canvas&&this.resize(c,d)};let r;const l=()=>{n("attach",l),this.attached=!0,this.resize(),s("resize",a),s("detach",r)};r=()=>{this.attached=!1,n("resize",a),this._stop(),this._resize(0,0),s("attach",l)},i.isAttached(this.canvas)?l():r()}unbindEvents(){each(this._listeners,(e,i)=>{this.platform.removeEventListener(this,i,e)}),this._listeners={},each(this._responsiveListeners,(e,i)=>{this.platform.removeEventListener(this,i,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,i,s){const n=s?"set":"remove";let a,r,l,c;for(i==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+n+"DatasetHoverStyle"]()),l=0,c=e.length;l<c;++l){r=e[l];const d=r&&this.getDatasetMeta(r.datasetIndex).controller;d&&d[n+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const i=this._active||[],s=e.map(({datasetIndex:a,index:r})=>{const l=this.getDatasetMeta(a);if(!l)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:l.data[r],index:r}});!_elementsEqual(s,i)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,i))}notifyPlugins(e,i,s){return this._plugins.notify(this,e,i,s)}isPluginEnabled(e){return this._plugins._cache.filter(i=>i.plugin.id===e).length===1}_updateHoverStyles(e,i,s){const n=this.options.hover,a=(c,d)=>c.filter(u=>!d.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),r=a(i,e),l=s?e:a(e,i);r.length&&this.updateHoverStyle(r,n.mode,!1),l.length&&n.mode&&this.updateHoverStyle(l,n.mode,!0)}_eventHandler(e,i){const s={event:e,replay:i,cancelable:!0,inChartArea:this.isPointInArea(e)},n=r=>(r.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const a=this._handleEvent(e,i,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(a||s.changed)&&this.render(),this}_handleEvent(e,i,s){const{_active:n=[],options:a}=this,r=i,l=this._getActiveElements(e,n,s,r),c=_isClickEvent(e),d=determineLastEvent(e,this._lastEvent,s,c);s&&(this._lastEvent=null,callback(a.onHover,[e,l,this],this),c&&callback(a.onClick,[e,l,this],this));const u=!_elementsEqual(l,n);return(u||i)&&(this._active=l,this._updateHoverStyles(l,n,i)),this._lastEvent=d,u}_getActiveElements(e,i,s,n){if(e.type==="mouseout")return[];if(!s)return i;const a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,n)}}Q(Chart,"defaults",defaults),Q(Chart,"instances",instances),Q(Chart,"overrides",overrides),Q(Chart,"registry",registry),Q(Chart,"version",version),Q(Chart,"getChart",getChart);function invalidatePlugins(){return each(Chart.instances,t=>t._plugins.invalidate())}function clipArc(t,e,i){const{startAngle:s,pixelMargin:n,x:a,y:r,outerRadius:l,innerRadius:c}=e;let d=n/l;t.beginPath(),t.arc(a,r,l,s-d,i+d),c>n?(d=n/c,t.arc(a,r,c,i+d,s-d,!0)):t.arc(a,r,n,i+HALF_PI,s-HALF_PI),t.closePath(),t.clip()}function toRadiusCorners(t){return _readValueToProps(t,["outerStart","outerEnd","innerStart","innerEnd"])}function parseBorderRadius$1(t,e,i,s){const n=toRadiusCorners(t.options.borderRadius),a=(i-e)/2,r=Math.min(a,s*e/2),l=c=>{const d=(i-Math.min(a,c))*s/2;return _limitValue(c,0,Math.min(a,d))};return{outerStart:l(n.outerStart),outerEnd:l(n.outerEnd),innerStart:_limitValue(n.innerStart,0,r),innerEnd:_limitValue(n.innerEnd,0,r)}}function rThetaToXY(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function pathArc(t,e,i,s,n,a){const{x:r,y:l,startAngle:c,pixelMargin:d,innerRadius:u}=e,h=Math.max(e.outerRadius+s+i-d,0),f=u>0?u+s+i+d:0;let g=0;const m=n-c;if(s){const se=u>0?u-s:0,re=h>0?h-s:0,ae=(se+re)/2,ge=ae!==0?m*ae/(ae+s):m;g=(m-ge)/2}const _=Math.max(.001,m*h-i/PI)/h,w=(m-_)/2,B=c+w+g,D=n-w-g,{outerStart:P,outerEnd:H,innerStart:N,innerEnd:W}=parseBorderRadius$1(e,f,h,D-B),L=h-P,U=h-H,K=B+P/L,X=D-H/U,Y=f+N,J=f+W,oe=B+N/Y,de=D-W/J;if(t.beginPath(),a){const se=(K+X)/2;if(t.arc(r,l,h,K,se),t.arc(r,l,h,se,X),H>0){const fe=rThetaToXY(U,X,r,l);t.arc(fe.x,fe.y,H,X,D+HALF_PI)}const re=rThetaToXY(J,D,r,l);if(t.lineTo(re.x,re.y),W>0){const fe=rThetaToXY(J,de,r,l);t.arc(fe.x,fe.y,W,D+HALF_PI,de+Math.PI)}const ae=(D-W/f+(B+N/f))/2;if(t.arc(r,l,f,D-W/f,ae,!0),t.arc(r,l,f,ae,B+N/f,!0),N>0){const fe=rThetaToXY(Y,oe,r,l);t.arc(fe.x,fe.y,N,oe+Math.PI,B-HALF_PI)}const ge=rThetaToXY(L,B,r,l);if(t.lineTo(ge.x,ge.y),P>0){const fe=rThetaToXY(L,K,r,l);t.arc(fe.x,fe.y,P,B-HALF_PI,K)}}else{t.moveTo(r,l);const se=Math.cos(K)*h+r,re=Math.sin(K)*h+l;t.lineTo(se,re);const ae=Math.cos(X)*h+r,ge=Math.sin(X)*h+l;t.lineTo(ae,ge)}t.closePath()}function drawArc(t,e,i,s,n){const{fullCircles:a,startAngle:r,circumference:l}=e;let c=e.endAngle;if(a){pathArc(t,e,i,s,c,n);for(let d=0;d<a;++d)t.fill();isNaN(l)||(c=r+(l%TAU||TAU))}return pathArc(t,e,i,s,c,n),t.fill(),c}function drawBorder(t,e,i,s,n){const{fullCircles:a,startAngle:r,circumference:l,options:c}=e,{borderWidth:d,borderJoinStyle:u}=c,h=c.borderAlign==="inner";if(!d)return;h?(t.lineWidth=d*2,t.lineJoin=u||"round"):(t.lineWidth=d,t.lineJoin=u||"bevel");let f=e.endAngle;if(a){pathArc(t,e,i,s,f,n);for(let g=0;g<a;++g)t.stroke();isNaN(l)||(f=r+(l%TAU||TAU))}h&&clipArc(t,e,f),a||(pathArc(t,e,i,s,f,n),t.stroke())}class ArcElement extends Element{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,i,s){const n=this.getProps(["x","y"],s),{angle:a,distance:r}=getAngleFromPoint(n,{x:e,y:i}),{startAngle:l,endAngle:c,innerRadius:d,outerRadius:u,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=this.options.spacing/2,m=valueOrDefault(h,c-l)>=TAU||_angleBetween(a,l,c),_=_isBetween(r,d+f,u+f);return m&&_}getCenterPoint(e){const{x:i,y:s,startAngle:n,endAngle:a,innerRadius:r,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:c,spacing:d}=this.options,u=(n+a)/2,h=(r+l+d+c)/2;return{x:i+Math.cos(u)*h,y:s+Math.sin(u)*h}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:s}=this,n=(i.offset||0)/4,a=(i.spacing||0)/2,r=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>TAU?Math.floor(s/TAU):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*n,Math.sin(l)*n);const c=1-Math.sin(Math.min(PI,s||0)),d=n*c;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,drawArc(e,this,d,a,r),drawBorder(e,this,d,a,r),e.restore()}}Q(ArcElement,"id","arc"),Q(ArcElement,"defaults",{borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),Q(ArcElement,"defaultRoutes",{backgroundColor:"backgroundColor"});function setStyle(t,e,i=e){t.lineCap=valueOrDefault(i.borderCapStyle,e.borderCapStyle),t.setLineDash(valueOrDefault(i.borderDash,e.borderDash)),t.lineDashOffset=valueOrDefault(i.borderDashOffset,e.borderDashOffset),t.lineJoin=valueOrDefault(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=valueOrDefault(i.borderWidth,e.borderWidth),t.strokeStyle=valueOrDefault(i.borderColor,e.borderColor)}function lineTo(t,e,i){t.lineTo(i.x,i.y)}function getLineMethod(t){return t.stepped?_steppedLineTo:t.tension||t.cubicInterpolationMode==="monotone"?_bezierCurveTo:lineTo}function pathVars(t,e,i={}){const s=t.length,{start:n=0,end:a=s-1}=i,{start:r,end:l}=e,c=Math.max(n,r),d=Math.min(a,l),u=n<r&&a<r||n>l&&a>l;return{count:s,start:c,loop:e.loop,ilen:d<c&&!u?s+d-c:d-c}}function pathSegment(t,e,i,s){const{points:n,options:a}=e,{count:r,start:l,loop:c,ilen:d}=pathVars(n,i,s),u=getLineMethod(a);let{move:h=!0,reverse:f}=s||{},g,m,_;for(g=0;g<=d;++g)m=n[(l+(f?d-g:g))%r],!m.skip&&(h?(t.moveTo(m.x,m.y),h=!1):u(t,_,m,f,a.stepped),_=m);return c&&(m=n[(l+(f?d:0))%r],u(t,_,m,f,a.stepped)),!!c}function fastPathSegment(t,e,i,s){const n=e.points,{count:a,start:r,ilen:l}=pathVars(n,i,s),{move:c=!0,reverse:d}=s||{};let u=0,h=0,f,g,m,_,w,B;const D=H=>(r+(d?l-H:H))%a,P=()=>{_!==w&&(t.lineTo(u,w),t.lineTo(u,_),t.lineTo(u,B))};for(c&&(g=n[D(0)],t.moveTo(g.x,g.y)),f=0;f<=l;++f){if(g=n[D(f)],g.skip)continue;const H=g.x,N=g.y,W=H|0;W===m?(N<_?_=N:N>w&&(w=N),u=(h*u+H)/++h):(P(),t.lineTo(H,N),m=W,h=0,_=w=N),B=N}P()}function _getSegmentMethod(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!i?fastPathSegment:pathSegment}function _getInterpolationMethod(t){return t.stepped?_steppedInterpolation:t.tension||t.cubicInterpolationMode==="monotone"?_bezierInterpolation:_pointInLine}function strokePathWithCache(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),setStyle(t,e.options),t.stroke(n)}function strokePathDirect(t,e,i,s){const{segments:n,options:a}=e,r=_getSegmentMethod(e);for(const l of n)setStyle(t,a,l.style),t.beginPath(),r(t,e,l,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}const usePath2D=typeof Path2D=="function";function draw(t,e,i,s){usePath2D&&!e.options.segment?strokePathWithCache(t,e,i,s):strokePathDirect(t,e,i,s)}class LineElement extends Element{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,i){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;_updateBezierControlPoints(this._points,s,e,n,i),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=_computeSegments(this,this.options.segment))}first(){const e=this.segments,i=this.points;return e.length&&i[e[0].start]}last(){const e=this.segments,i=this.points,s=e.length;return s&&i[e[s-1].end]}interpolate(e,i){const s=this.options,n=e[i],a=this.points,r=_boundSegments(this,{property:i,start:n,end:n});if(!r.length)return;const l=[],c=_getInterpolationMethod(s);let d,u;for(d=0,u=r.length;d<u;++d){const{start:h,end:f}=r[d],g=a[h],m=a[f];if(g===m){l.push(g);continue}const _=Math.abs((n-g[i])/(m[i]-g[i])),w=c(g,m,_,s.stepped);w[i]=e[i],l.push(w)}return l.length===1?l[0]:l}pathSegment(e,i,s){return _getSegmentMethod(this)(e,this,i,s)}path(e,i,s){const n=this.segments,a=_getSegmentMethod(this);let r=this._loop;i=i||0,s=s||this.points.length-i;for(const l of n)r&=a(e,this,l,{start:i,end:i+s-1});return!!r}draw(e,i,s,n){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(e.save(),draw(e,this,s,n),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Q(LineElement,"id","line"),Q(LineElement,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Q(LineElement,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Q(LineElement,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function inRange$1(t,e,i,s){const n=t.options,{[i]:a}=t.getProps([i],s);return Math.abs(e-a)<n.radius+n.hitRadius}class PointElement extends Element{constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,s){const n=this.options,{x:a,y:r}=this.getProps(["x","y"],s);return Math.pow(e-a,2)+Math.pow(i-r,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(e,i){return inRange$1(this,e,"x",i)}inYRange(e,i){return inRange$1(this,e,"y",i)}getCenterPoint(e){const{x:i,y:s}=this.getProps(["x","y"],e);return{x:i,y:s}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const s=i&&e.borderWidth||0;return(i+s)*2}draw(e,i){const s=this.options;this.skip||s.radius<.1||!_isPointInArea(this,i,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,drawPoint(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}Q(PointElement,"id","point"),Q(PointElement,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Q(PointElement,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function getBarBounds(t,e){const{x:i,y:s,base:n,width:a,height:r}=t.getProps(["x","y","base","width","height"],e);let l,c,d,u,h;return t.horizontal?(h=r/2,l=Math.min(i,n),c=Math.max(i,n),d=s-h,u=s+h):(h=a/2,l=i-h,c=i+h,d=Math.min(s,n),u=Math.max(s,n)),{left:l,top:d,right:c,bottom:u}}function skipOrLimit(t,e,i,s){return t?0:_limitValue(e,i,s)}function parseBorderWidth(t,e,i){const s=t.options.borderWidth,n=t.borderSkipped,a=toTRBL(s);return{t:skipOrLimit(n.top,a.top,0,i),r:skipOrLimit(n.right,a.right,0,e),b:skipOrLimit(n.bottom,a.bottom,0,i),l:skipOrLimit(n.left,a.left,0,e)}}function parseBorderRadius(t,e,i){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,a=toTRBLCorners(n),r=Math.min(e,i),l=t.borderSkipped,c=s||isObject(n);return{topLeft:skipOrLimit(!c||l.top||l.left,a.topLeft,0,r),topRight:skipOrLimit(!c||l.top||l.right,a.topRight,0,r),bottomLeft:skipOrLimit(!c||l.bottom||l.left,a.bottomLeft,0,r),bottomRight:skipOrLimit(!c||l.bottom||l.right,a.bottomRight,0,r)}}function boundingRects(t){const e=getBarBounds(t),i=e.right-e.left,s=e.bottom-e.top,n=parseBorderWidth(t,i/2,s/2),a=parseBorderRadius(t,i/2,s/2);return{outer:{x:e.left,y:e.top,w:i,h:s,radius:a},inner:{x:e.left+n.l,y:e.top+n.t,w:i-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,a.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(n.b,n.r))}}}}function inRange(t,e,i,s){const n=e===null,a=i===null,l=t&&!(n&&a)&&getBarBounds(t,s);return l&&(n||_isBetween(e,l.left,l.right))&&(a||_isBetween(i,l.top,l.bottom))}function hasRadius(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function addNormalRectPath(t,e){t.rect(e.x,e.y,e.w,e.h)}function inflateRect(t,e,i={}){const s=t.x!==i.x?-e:0,n=t.y!==i.y?-e:0,a=(t.x+t.w!==i.x+i.w?e:0)-s,r=(t.y+t.h!==i.y+i.h?e:0)-n;return{x:t.x+s,y:t.y+n,w:t.w+a,h:t.h+r,radius:t.radius}}class BarElement extends Element{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:i,options:{borderColor:s,backgroundColor:n}}=this,{inner:a,outer:r}=boundingRects(this),l=hasRadius(r.radius)?addRoundedRectPath:addNormalRectPath;e.save(),(r.w!==a.w||r.h!==a.h)&&(e.beginPath(),l(e,inflateRect(r,i,a)),e.clip(),l(e,inflateRect(a,-i,r)),e.fillStyle=s,e.fill("evenodd")),e.beginPath(),l(e,inflateRect(a,i)),e.fillStyle=n,e.fill(),e.restore()}inRange(e,i,s){return inRange(this,e,i,s)}inXRange(e,i){return inRange(this,e,null,i)}inYRange(e,i){return inRange(this,null,e,i)}getCenterPoint(e){const{x:i,y:s,base:n,horizontal:a}=this.getProps(["x","y","base","horizontal"],e);return{x:a?(i+n)/2:i,y:a?s:(s+n)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}Q(BarElement,"id","bar"),Q(BarElement,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Q(BarElement,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var elements=Object.freeze({__proto__:null,ArcElement,LineElement,PointElement,BarElement});const BORDER_COLORS=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],BACKGROUND_COLORS=BORDER_COLORS.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function getBorderColor(t){return BORDER_COLORS[t%BORDER_COLORS.length]}function getBackgroundColor(t){return BACKGROUND_COLORS[t%BACKGROUND_COLORS.length]}function colorizeDefaultDataset(t,e){return t.borderColor=getBorderColor(e),t.backgroundColor=getBackgroundColor(e),++e}function colorizeDoughnutDataset(t,e){return t.backgroundColor=t.data.map(()=>getBorderColor(e++)),e}function colorizePolarAreaDataset(t,e){return t.backgroundColor=t.data.map(()=>getBackgroundColor(e++)),e}function getColorizer(t){let e=0;return(i,s)=>{const n=t.getDatasetMeta(s).controller;n instanceof DoughnutController?e=colorizeDoughnutDataset(i,e):n instanceof PolarAreaController?e=colorizePolarAreaDataset(i,e):n&&(e=colorizeDefaultDataset(i,e))}}function containsColorsDefinitions(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var plugin_colors={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{options:{elements:s},data:{datasets:n}}=t.config;if(!i.forceOverride&&(containsColorsDefinitions(n)||s&&containsColorsDefinitions(s)))return;const a=getColorizer(t);n.forEach(a)}};function lttbDecimation(t,e,i,s,n){const a=n.samples||s;if(a>=i)return t.slice(e,e+i);const r=[],l=(i-2)/(a-2);let c=0;const d=e+i-1;let u=e,h,f,g,m,_;for(r[c++]=t[u],h=0;h<a-2;h++){let w=0,B=0,D;const P=Math.floor((h+1)*l)+1+e,H=Math.min(Math.floor((h+2)*l)+1,i)+e,N=H-P;for(D=P;D<H;D++)w+=t[D].x,B+=t[D].y;w/=N,B/=N;const W=Math.floor(h*l)+1+e,L=Math.min(Math.floor((h+1)*l)+1,i)+e,{x:U,y:K}=t[u];for(g=m=-1,D=W;D<L;D++)m=.5*Math.abs((U-w)*(t[D].y-K)-(U-t[D].x)*(B-K)),m>g&&(g=m,f=t[D],_=D);r[c++]=f,u=_}return r[c++]=t[d],r}function minMaxDecimation(t,e,i,s){let n=0,a=0,r,l,c,d,u,h,f,g,m,_;const w=[],B=e+i-1,D=t[e].x,H=t[B].x-D;for(r=e;r<e+i;++r){l=t[r],c=(l.x-D)/H*s,d=l.y;const N=c|0;if(N===u)d<m?(m=d,h=r):d>_&&(_=d,f=r),n=(a*n+l.x)/++a;else{const W=r-1;if(!isNullOrUndef(h)&&!isNullOrUndef(f)){const L=Math.min(h,f),U=Math.max(h,f);L!==g&&L!==W&&w.push({...t[L],x:n}),U!==g&&U!==W&&w.push({...t[U],x:n})}r>0&&W!==g&&w.push(t[W]),w.push(l),u=N,a=0,m=_=d,h=f=g=r}}return w}function cleanDecimatedDataset(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function cleanDecimatedData(t){t.data.datasets.forEach(e=>{cleanDecimatedDataset(e)})}function getStartAndCountOfVisiblePointsSimplified(t,e){const i=e.length;let s=0,n;const{iScale:a}=t,{min:r,max:l,minDefined:c,maxDefined:d}=a.getUserBounds();return c&&(s=_limitValue(_lookupByKey(e,a.axis,r).lo,0,i-1)),d?n=_limitValue(_lookupByKey(e,a.axis,l).hi+1,s,i)-s:n=i-s,{start:s,count:n}}var plugin_decimation={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled){cleanDecimatedData(t);return}const s=t.width;t.data.datasets.forEach((n,a)=>{const{_data:r,indexAxis:l}=n,c=t.getDatasetMeta(a),d=r||n.data;if(resolve([l,t.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const u=t.scales[c.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:h,count:f}=getStartAndCountOfVisiblePointsSimplified(c,d);const g=i.threshold||4*s;if(f<=g){cleanDecimatedDataset(n);return}isNullOrUndef(r)&&(n._data=d,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(_){this._data=_}}));let m;switch(i.algorithm){case"lttb":m=lttbDecimation(d,h,f,s,i);break;case"min-max":m=minMaxDecimation(d,h,f,s);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}n._decimated=m})},destroy(t){cleanDecimatedData(t)}};function _segments(t,e,i){const s=t.segments,n=t.points,a=e.points,r=[];for(const l of s){let{start:c,end:d}=l;d=_findSegmentEnd(c,d,n);const u=_getBounds(i,n[c],n[d],l.loop);if(!e.segments){r.push({source:l,target:u,start:n[c],end:n[d]});continue}const h=_boundSegments(e,u);for(const f of h){const g=_getBounds(i,a[f.start],a[f.end],f.loop),m=_boundSegment(l,n,g);for(const _ of m)r.push({source:_,target:f,start:{[i]:_getEdge(u,g,"start",Math.max)},end:{[i]:_getEdge(u,g,"end",Math.min)}})}}return r}function _getBounds(t,e,i,s){if(s)return;let n=e[t],a=i[t];return t==="angle"&&(n=_normalizeAngle(n),a=_normalizeAngle(a)),{property:t,start:n,end:a}}function _pointsFromSegments(t,e){const{x:i=null,y:s=null}=t||{},n=e.points,a=[];return e.segments.forEach(({start:r,end:l})=>{l=_findSegmentEnd(r,l,n);const c=n[r],d=n[l];s!==null?(a.push({x:c.x,y:s}),a.push({x:d.x,y:s})):i!==null&&(a.push({x:i,y:c.y}),a.push({x:i,y:d.y}))}),a}function _findSegmentEnd(t,e,i){for(;e>t;e--){const s=i[e];if(!isNaN(s.x)&&!isNaN(s.y))break}return e}function _getEdge(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function _createBoundaryLine(t,e){let i=[],s=!1;return isArray(t)?(s=!0,i=t):i=_pointsFromSegments(t,e),i.length?new LineElement({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function _shouldApplyFill(t){return t&&t.fill!==!1}function _resolveTarget(t,e,i){let n=t[e].fill;const a=[e];let r;if(!i)return n;for(;n!==!1&&a.indexOf(n)===-1;){if(!isNumberFinite(n))return n;if(r=t[n],!r)return!1;if(r.visible)return n;a.push(n),n=r.fill}return!1}function _decodeFill(t,e,i){const s=parseFillOption(t);if(isObject(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return isNumberFinite(n)&&Math.floor(n)===n?decodeTargetIndex(s[0],e,n,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function decodeTargetIndex(t,e,i,s){return(t==="-"||t==="+")&&(i=e+i),i===e||i<0||i>=s?!1:i}function _getTargetPixel(t,e){let i=null;return t==="start"?i=e.bottom:t==="end"?i=e.top:isObject(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}function _getTargetValue(t,e,i){let s;return t==="start"?s=i:t==="end"?s=e.options.reverse?e.min:e.max:isObject(t)?s=t.value:s=e.getBaseValue(),s}function parseFillOption(t){const e=t.options,i=e.fill;let s=valueOrDefault(i&&i.target,i);return s===void 0&&(s=!!e.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function _buildStackLine(t){const{scale:e,index:i,line:s}=t,n=[],a=s.segments,r=s.points,l=getLinesBelow(e,i);l.push(_createBoundaryLine({x:null,y:e.bottom},s));for(let c=0;c<a.length;c++){const d=a[c];for(let u=d.start;u<=d.end;u++)addPointsBelow(n,r[u],l)}return new LineElement({points:n,options:{}})}function getLinesBelow(t,e){const i=[],s=t.getMatchingVisibleMetas("line");for(let n=0;n<s.length;n++){const a=s[n];if(a.index===e)break;a.hidden||i.unshift(a.dataset)}return i}function addPointsBelow(t,e,i){const s=[];for(let n=0;n<i.length;n++){const a=i[n],{first:r,last:l,point:c}=findPoint(a,e,"x");if(!(!c||r&&l)){if(r)s.unshift(c);else if(t.push(c),!l)break}}t.push(...s)}function findPoint(t,e,i){const s=t.interpolate(e,i);if(!s)return{};const n=s[i],a=t.segments,r=t.points;let l=!1,c=!1;for(let d=0;d<a.length;d++){const u=a[d],h=r[u.start][i],f=r[u.end][i];if(_isBetween(n,h,f)){l=n===h,c=n===f;break}}return{first:l,last:c,point:s}}class simpleArc{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,i,s){const{x:n,y:a,radius:r}=this;return i=i||{start:0,end:TAU},e.arc(n,a,r,i.end,i.start,!0),!s.bounds}interpolate(e){const{x:i,y:s,radius:n}=this,a=e.angle;return{x:i+Math.cos(a)*n,y:s+Math.sin(a)*n,angle:a}}}function _getTarget(t){const{chart:e,fill:i,line:s}=t;if(isNumberFinite(i))return getLineByIndex(e,i);if(i==="stack")return _buildStackLine(t);if(i==="shape")return!0;const n=computeBoundary(t);return n instanceof simpleArc?n:_createBoundaryLine(n,s)}function getLineByIndex(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}function computeBoundary(t){return(t.scale||{}).getPointPositionForValue?computeCircularBoundary(t):computeLinearBoundary(t)}function computeLinearBoundary(t){const{scale:e={},fill:i}=t,s=_getTargetPixel(i,e);if(isNumberFinite(s)){const n=e.isHorizontal();return{x:n?s:null,y:n?null:s}}return null}function computeCircularBoundary(t){const{scale:e,fill:i}=t,s=e.options,n=e.getLabels().length,a=s.reverse?e.max:e.min,r=_getTargetValue(i,e,a),l=[];if(s.grid.circular){const c=e.getPointPositionForValue(0,a);return new simpleArc({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(r)})}for(let c=0;c<n;++c)l.push(e.getPointPositionForValue(c,r));return l}function _drawfill(t,e,i){const s=_getTarget(e),{line:n,scale:a,axis:r}=e,l=n.options,c=l.fill,d=l.backgroundColor,{above:u=d,below:h=d}=c||{};s&&n.points.length&&(clipArea(t,i),doFill(t,{line:n,target:s,above:u,below:h,area:i,scale:a,axis:r}),unclipArea(t))}function doFill(t,e){const{line:i,target:s,above:n,below:a,area:r,scale:l}=e,c=i._loop?"angle":e.axis;t.save(),c==="x"&&a!==n&&(clipVertical(t,s,r.top),fill(t,{line:i,target:s,color:n,scale:l,property:c}),t.restore(),t.save(),clipVertical(t,s,r.bottom)),fill(t,{line:i,target:s,color:a,scale:l,property:c}),t.restore()}function clipVertical(t,e,i){const{segments:s,points:n}=e;let a=!0,r=!1;t.beginPath();for(const l of s){const{start:c,end:d}=l,u=n[c],h=n[_findSegmentEnd(c,d,n)];a?(t.moveTo(u.x,u.y),a=!1):(t.lineTo(u.x,i),t.lineTo(u.x,u.y)),r=!!e.pathSegment(t,l,{move:r}),r?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function fill(t,e){const{line:i,target:s,property:n,color:a,scale:r}=e,l=_segments(i,s,n);for(const{source:c,target:d,start:u,end:h}of l){const{style:{backgroundColor:f=a}={}}=c,g=s!==!0;t.save(),t.fillStyle=f,clipBounds(t,r,g&&_getBounds(n,u,h)),t.beginPath();const m=!!i.pathSegment(t,c);let _;if(g){m?t.closePath():interpolatedLineTo(t,s,h,n);const w=!!s.pathSegment(t,d,{move:m,reverse:!0});_=m&&w,_||interpolatedLineTo(t,s,u,n)}t.closePath(),t.fill(_?"evenodd":"nonzero"),t.restore()}}function clipBounds(t,e,i){const{top:s,bottom:n}=e.chart.chartArea,{property:a,start:r,end:l}=i||{};a==="x"&&(t.beginPath(),t.rect(r,s,l-r,n-s),t.clip())}function interpolatedLineTo(t,e,i,s){const n=e.interpolate(i,s);n&&t.lineTo(n.x,n.y)}var index$3={id:"filler",afterDatasetsUpdate(t,e,i){const s=(t.data.datasets||[]).length,n=[];let a,r,l,c;for(r=0;r<s;++r)a=t.getDatasetMeta(r),l=a.dataset,c=null,l&&l.options&&l instanceof LineElement&&(c={visible:t.isDatasetVisible(r),index:r,fill:_decodeFill(l,r,s),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:l}),a.$filler=c,n.push(c);for(r=0;r<s;++r)c=n[r],!(!c||c.fill===!1)&&(c.fill=_resolveTarget(n,r,i.propagate))},beforeDraw(t,e,i){const s=i.drawTime==="beforeDraw",n=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let r=n.length-1;r>=0;--r){const l=n[r].$filler;!l||(l.line.updateControlPoints(a,l.axis),s&&l.fill&&_drawfill(t.ctx,l,a))}},beforeDatasetsDraw(t,e,i){if(i.drawTime!=="beforeDatasetsDraw")return;const s=t.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const a=s[n].$filler;_shouldApplyFill(a)&&_drawfill(t.ctx,a,t.chartArea)}},beforeDatasetDraw(t,e,i){const s=e.meta.$filler;!_shouldApplyFill(s)||i.drawTime!=="beforeDatasetDraw"||_drawfill(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const getBoxSize=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}},itemsEqual=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Legend extends Element{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,i,s){this.maxWidth=e,this.maxHeight=i,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let i=callback(e.generateLabels,[this.chart],this)||[];e.filter&&(i=i.filter(s=>e.filter(s,this.chart.data))),e.sort&&(i=i.sort((s,n)=>e.sort(s,n,this.chart.data))),this.options.reverse&&i.reverse(),this.legendItems=i}fit(){const{options:e,ctx:i}=this;if(!e.display){this.width=this.height=0;return}const s=e.labels,n=toFont(s.font),a=n.size,r=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=getBoxSize(s,a);let d,u;i.font=n.string,this.isHorizontal()?(d=this.maxWidth,u=this._fitRows(r,a,l,c)+10):(u=this.maxHeight,d=this._fitCols(r,n,l,c)+10),this.width=Math.min(d,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,i,s,n){const{ctx:a,maxWidth:r,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],u=n+l;let h=e;a.textAlign="left",a.textBaseline="middle";let f=-1,g=-u;return this.legendItems.forEach((m,_)=>{const w=s+i/2+a.measureText(m.text).width;(_===0||d[d.length-1]+w+2*l>r)&&(h+=u,d[d.length-(_>0?0:1)]=0,g+=u,f++),c[_]={left:0,top:g,row:f,width:w,height:n},d[d.length-1]+=w+l}),h}_fitCols(e,i,s,n){const{ctx:a,maxHeight:r,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],u=r-e;let h=l,f=0,g=0,m=0,_=0;return this.legendItems.forEach((w,B)=>{const{itemWidth:D,itemHeight:P}=calculateItemSize(s,i,a,w,n);B>0&&g+P+2*l>u&&(h+=f+l,d.push({width:f,height:g}),m+=f+l,_++,f=g=0),c[B]={left:m,top:g,col:_,width:D,height:P},f=Math.max(f,D),g+=P+l}),h+=f,d.push({width:f,height:g}),h}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:i,options:{align:s,labels:{padding:n},rtl:a}}=this,r=getRtlAdapter(a,this.left,this.width);if(this.isHorizontal()){let l=0,c=_alignStartEnd(s,this.left+n,this.right-this.lineWidths[l]);for(const d of i)l!==d.row&&(l=d.row,c=_alignStartEnd(s,this.left+n,this.right-this.lineWidths[l])),d.top+=this.top+e+n,d.left=r.leftForLtr(r.x(c),d.width),c+=d.width+n}else{let l=0,c=_alignStartEnd(s,this.top+e+n,this.bottom-this.columnSizes[l].height);for(const d of i)d.col!==l&&(l=d.col,c=_alignStartEnd(s,this.top+e+n,this.bottom-this.columnSizes[l].height)),d.top=c,d.left+=this.left+n,d.left=r.leftForLtr(r.x(d.left),d.width),c+=d.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;clipArea(e,this),this._draw(),unclipArea(e)}}_draw(){const{options:e,columnSizes:i,lineWidths:s,ctx:n}=this,{align:a,labels:r}=e,l=defaults.color,c=getRtlAdapter(e.rtl,this.left,this.width),d=toFont(r.font),{padding:u}=r,h=d.size,f=h/2;let g;this.drawTitle(),n.textAlign=c.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=d.string;const{boxWidth:m,boxHeight:_,itemHeight:w}=getBoxSize(r,h),B=function(W,L,U){if(isNaN(m)||m<=0||isNaN(_)||_<0)return;n.save();const K=valueOrDefault(U.lineWidth,1);if(n.fillStyle=valueOrDefault(U.fillStyle,l),n.lineCap=valueOrDefault(U.lineCap,"butt"),n.lineDashOffset=valueOrDefault(U.lineDashOffset,0),n.lineJoin=valueOrDefault(U.lineJoin,"miter"),n.lineWidth=K,n.strokeStyle=valueOrDefault(U.strokeStyle,l),n.setLineDash(valueOrDefault(U.lineDash,[])),r.usePointStyle){const X={radius:_*Math.SQRT2/2,pointStyle:U.pointStyle,rotation:U.rotation,borderWidth:K},Y=c.xPlus(W,m/2),J=L+f;drawPointLegend(n,X,Y,J,r.pointStyleWidth&&m)}else{const X=L+Math.max((h-_)/2,0),Y=c.leftForLtr(W,m),J=toTRBLCorners(U.borderRadius);n.beginPath(),Object.values(J).some(oe=>oe!==0)?addRoundedRectPath(n,{x:Y,y:X,w:m,h:_,radius:J}):n.rect(Y,X,m,_),n.fill(),K!==0&&n.stroke()}n.restore()},D=function(W,L,U){renderText(n,U.text,W,L+w/2,d,{strikethrough:U.hidden,textAlign:c.textAlign(U.textAlign)})},P=this.isHorizontal(),H=this._computeTitleHeight();P?g={x:_alignStartEnd(a,this.left+u,this.right-s[0]),y:this.top+u+H,line:0}:g={x:this.left+u,y:_alignStartEnd(a,this.top+H+u,this.bottom-i[0].height),line:0},overrideTextDirection(this.ctx,e.textDirection);const N=w+u;this.legendItems.forEach((W,L)=>{n.strokeStyle=W.fontColor,n.fillStyle=W.fontColor;const U=n.measureText(W.text).width,K=c.textAlign(W.textAlign||(W.textAlign=r.textAlign)),X=m+f+U;let Y=g.x,J=g.y;c.setWidth(this.width),P?L>0&&Y+X+u>this.right&&(J=g.y+=N,g.line++,Y=g.x=_alignStartEnd(a,this.left+u,this.right-s[g.line])):L>0&&J+N>this.bottom&&(Y=g.x=Y+i[g.line].width+u,g.line++,J=g.y=_alignStartEnd(a,this.top+H+u,this.bottom-i[g.line].height));const oe=c.x(Y);if(B(oe,J,W),Y=_textX(K,Y+m+f,P?Y+X:this.right,e.rtl),D(c.x(Y),J,W),P)g.x+=X+u;else if(typeof W.text!="string"){const de=d.lineHeight;g.y+=calculateLegendItemHeight(W,de)}else g.y+=N}),restoreTextDirection(this.ctx,e.textDirection)}drawTitle(){const e=this.options,i=e.title,s=toFont(i.font),n=toPadding(i.padding);if(!i.display)return;const a=getRtlAdapter(e.rtl,this.left,this.width),r=this.ctx,l=i.position,c=s.size/2,d=n.top+c;let u,h=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+d,h=_alignStartEnd(e.align,h,this.right-f);else{const m=this.columnSizes.reduce((_,w)=>Math.max(_,w.height),0);u=d+_alignStartEnd(e.align,this.top,this.bottom-m-e.labels.padding-this._computeTitleHeight())}const g=_alignStartEnd(l,h,h+f);r.textAlign=a.textAlign(_toLeftRightCenter(l)),r.textBaseline="middle",r.strokeStyle=i.color,r.fillStyle=i.color,r.font=s.string,renderText(r,i.text,g,u,s)}_computeTitleHeight(){const e=this.options.title,i=toFont(e.font),s=toPadding(e.padding);return e.display?i.lineHeight+s.height:0}_getLegendItemAt(e,i){let s,n,a;if(_isBetween(e,this.left,this.right)&&_isBetween(i,this.top,this.bottom)){for(a=this.legendHitBoxes,s=0;s<a.length;++s)if(n=a[s],_isBetween(e,n.left,n.left+n.width)&&_isBetween(i,n.top,n.top+n.height))return this.legendItems[s]}return null}handleEvent(e){const i=this.options;if(!isListened(e.type,i))return;const s=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const n=this._hoveredItem,a=itemsEqual(n,s);n&&!a&&callback(i.onLeave,[e,n,this],this),this._hoveredItem=s,s&&!a&&callback(i.onHover,[e,s,this],this)}else s&&callback(i.onClick,[e,s,this],this)}}function calculateItemSize(t,e,i,s,n){const a=calculateItemWidth(s,t,e,i),r=calculateItemHeight(n,s,e.lineHeight);return{itemWidth:a,itemHeight:r}}function calculateItemWidth(t,e,i,s){let n=t.text;return n&&typeof n!="string"&&(n=n.reduce((a,r)=>a.length>r.length?a:r)),e+i.size/2+s.measureText(n).width}function calculateItemHeight(t,e,i){let s=t;return typeof e.text!="string"&&(s=calculateLegendItemHeight(e,i)),s}function calculateLegendItemHeight(t,e){const i=t.text?t.text.length+.5:0;return e*i}function isListened(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var plugin_legend={id:"legend",_element:Legend,start(t,e,i){const s=t.legend=new Legend({ctx:t.ctx,options:i,chart:t});layouts.configure(t,s,i),layouts.addBox(t,s)},stop(t){layouts.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const s=t.legend;layouts.configure(t,s,i),s.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const s=e.datasetIndex,n=i.chart;n.isDatasetVisible(s)?(n.hide(s),e.hidden=!0):(n.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:a,useBorderRadius:r,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(i?0:void 0),u=toPadding(d.borderWidth);return{text:e[c.index].label,fillStyle:d.backgroundColor,fontColor:a,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:d.borderColor,pointStyle:s||d.pointStyle,rotation:d.rotation,textAlign:n||d.textAlign,borderRadius:r&&(l||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Title extends Element{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,i){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=i;const n=isArray(s.text)?s.text.length:1;this._padding=toPadding(s.padding);const a=n*toFont(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:i,left:s,bottom:n,right:a,options:r}=this,l=r.align;let c=0,d,u,h;return this.isHorizontal()?(u=_alignStartEnd(l,s,a),h=i+e,d=a-s):(r.position==="left"?(u=s+e,h=_alignStartEnd(l,n,i),c=PI*-.5):(u=a-e,h=_alignStartEnd(l,i,n),c=PI*.5),d=n-i),{titleX:u,titleY:h,maxWidth:d,rotation:c}}draw(){const e=this.ctx,i=this.options;if(!i.display)return;const s=toFont(i.font),a=s.lineHeight/2+this._padding.top,{titleX:r,titleY:l,maxWidth:c,rotation:d}=this._drawArgs(a);renderText(e,i.text,0,0,s,{color:i.color,maxWidth:c,rotation:d,textAlign:_toLeftRightCenter(i.align),textBaseline:"middle",translation:[r,l]})}}function createTitle(t,e){const i=new Title({ctx:t.ctx,options:e,chart:t});layouts.configure(t,i,e),layouts.addBox(t,i),t.titleBlock=i}var plugin_title={id:"title",_element:Title,start(t,e,i){createTitle(t,i)},stop(t){const e=t.titleBlock;layouts.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;layouts.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const map=new WeakMap;var plugin_subtitle={id:"subtitle",start(t,e,i){const s=new Title({ctx:t.ctx,options:i,chart:t});layouts.configure(t,s,i),layouts.addBox(t,s),map.set(t,s)},stop(t){layouts.removeBox(t,map.get(t)),map.delete(t)},beforeUpdate(t,e,i){const s=map.get(t);layouts.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const positioners={average(t){if(!t.length)return!1;let e,i,s=0,n=0,a=0;for(e=0,i=t.length;e<i;++e){const r=t[e].element;if(r&&r.hasValue()){const l=r.tooltipPosition();s+=l.x,n+=l.y,++a}}return{x:s/a,y:n/a}},nearest(t,e){if(!t.length)return!1;let i=e.x,s=e.y,n=Number.POSITIVE_INFINITY,a,r,l;for(a=0,r=t.length;a<r;++a){const c=t[a].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),u=distanceBetweenPoints(e,d);u<n&&(n=u,l=c)}}if(l){const c=l.tooltipPosition();i=c.x,s=c.y}return{x:i,y:s}}};function pushOrConcat(t,e){return e&&(isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function splitNewlines(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
`)>-1?t.split(`
|
|
`):t}function createTooltipItem(t,e){const{element:i,datasetIndex:s,index:n}=e,a=t.getDatasetMeta(s).controller,{label:r,value:l}=a.getLabelAndValue(n);return{chart:t,label:r,parsed:a.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:l,dataset:a.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function getTooltipSize(t,e){const i=t.chart.ctx,{body:s,footer:n,title:a}=t,{boxWidth:r,boxHeight:l}=e,c=toFont(e.bodyFont),d=toFont(e.titleFont),u=toFont(e.footerFont),h=a.length,f=n.length,g=s.length,m=toPadding(e.padding);let _=m.height,w=0,B=s.reduce((H,N)=>H+N.before.length+N.lines.length+N.after.length,0);if(B+=t.beforeBody.length+t.afterBody.length,h&&(_+=h*d.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),B){const H=e.displayColors?Math.max(l,c.lineHeight):c.lineHeight;_+=g*H+(B-g)*c.lineHeight+(B-1)*e.bodySpacing}f&&(_+=e.footerMarginTop+f*u.lineHeight+(f-1)*e.footerSpacing);let D=0;const P=function(H){w=Math.max(w,i.measureText(H).width+D)};return i.save(),i.font=d.string,each(t.title,P),i.font=c.string,each(t.beforeBody.concat(t.afterBody),P),D=e.displayColors?r+2+e.boxPadding:0,each(s,H=>{each(H.before,P),each(H.lines,P),each(H.after,P)}),D=0,i.font=u.string,each(t.footer,P),i.restore(),w+=m.width,{width:w,height:_}}function determineYAlign(t,e){const{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}function doesNotFitWithAlign(t,e,i,s){const{x:n,width:a}=s,r=i.caretSize+i.caretPadding;if(t==="left"&&n+a+r>e.width||t==="right"&&n-a-r<0)return!0}function determineXAlign(t,e,i,s){const{x:n,width:a}=i,{width:r,chartArea:{left:l,right:c}}=t;let d="center";return s==="center"?d=n<=(l+c)/2?"left":"right":n<=a/2?d="left":n>=r-a/2&&(d="right"),doesNotFitWithAlign(d,t,e,i)&&(d="center"),d}function determineAlignment(t,e,i){const s=i.yAlign||e.yAlign||determineYAlign(t,i);return{xAlign:i.xAlign||e.xAlign||determineXAlign(t,e,i,s),yAlign:s}}function alignX(t,e){let{x:i,width:s}=t;return e==="right"?i-=s:e==="center"&&(i-=s/2),i}function alignY(t,e,i){let{y:s,height:n}=t;return e==="top"?s+=i:e==="bottom"?s-=n+i:s-=n/2,s}function getBackgroundPoint(t,e,i,s){const{caretSize:n,caretPadding:a,cornerRadius:r}=t,{xAlign:l,yAlign:c}=i,d=n+a,{topLeft:u,topRight:h,bottomLeft:f,bottomRight:g}=toTRBLCorners(r);let m=alignX(e,l);const _=alignY(e,c,d);return c==="center"?l==="left"?m+=d:l==="right"&&(m-=d):l==="left"?m-=Math.max(u,f)+n:l==="right"&&(m+=Math.max(h,g)+n),{x:_limitValue(m,0,s.width-e.width),y:_limitValue(_,0,s.height-e.height)}}function getAlignedX(t,e,i){const s=toPadding(i.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-s.right:t.x+s.left}function getBeforeAfterBodyLines(t){return pushOrConcat([],splitNewlines(t))}function createTooltipContext(t,e,i){return createContext(t,{tooltip:e,tooltipItems:i,type:"tooltip"})}function overrideCallbacks(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const defaultCallbacks={beforeTitle:noop,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return i[e.dataIndex]}return""},afterTitle:noop,beforeBody:noop,beforeLabel:noop,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return isNullOrUndef(i)||(e+=i),e},labelColor(t){const i=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor,borderWidth:i.borderWidth,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const i=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}},afterLabel:noop,afterBody:noop,beforeFooter:noop,footer:noop,afterFooter:noop};function invokeCallbackWithFallback(t,e,i,s){const n=t[e].call(i,s);return typeof n>"u"?defaultCallbacks[e].call(i,s):n}class Tooltip extends Element{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const i=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&i.options.animation&&s.animations,a=new Animations(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=createTooltipContext(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,i){const{callbacks:s}=i,n=invokeCallbackWithFallback(s,"beforeTitle",this,e),a=invokeCallbackWithFallback(s,"title",this,e),r=invokeCallbackWithFallback(s,"afterTitle",this,e);let l=[];return l=pushOrConcat(l,splitNewlines(n)),l=pushOrConcat(l,splitNewlines(a)),l=pushOrConcat(l,splitNewlines(r)),l}getBeforeBody(e,i){return getBeforeAfterBodyLines(invokeCallbackWithFallback(i.callbacks,"beforeBody",this,e))}getBody(e,i){const{callbacks:s}=i,n=[];return each(e,a=>{const r={before:[],lines:[],after:[]},l=overrideCallbacks(s,a);pushOrConcat(r.before,splitNewlines(invokeCallbackWithFallback(l,"beforeLabel",this,a))),pushOrConcat(r.lines,invokeCallbackWithFallback(l,"label",this,a)),pushOrConcat(r.after,splitNewlines(invokeCallbackWithFallback(l,"afterLabel",this,a))),n.push(r)}),n}getAfterBody(e,i){return getBeforeAfterBodyLines(invokeCallbackWithFallback(i.callbacks,"afterBody",this,e))}getFooter(e,i){const{callbacks:s}=i,n=invokeCallbackWithFallback(s,"beforeFooter",this,e),a=invokeCallbackWithFallback(s,"footer",this,e),r=invokeCallbackWithFallback(s,"afterFooter",this,e);let l=[];return l=pushOrConcat(l,splitNewlines(n)),l=pushOrConcat(l,splitNewlines(a)),l=pushOrConcat(l,splitNewlines(r)),l}_createItems(e){const i=this._active,s=this.chart.data,n=[],a=[],r=[];let l=[],c,d;for(c=0,d=i.length;c<d;++c)l.push(createTooltipItem(this.chart,i[c]));return e.filter&&(l=l.filter((u,h,f)=>e.filter(u,h,f,s))),e.itemSort&&(l=l.sort((u,h)=>e.itemSort(u,h,s))),each(l,u=>{const h=overrideCallbacks(e.callbacks,u);n.push(invokeCallbackWithFallback(h,"labelColor",this,u)),a.push(invokeCallbackWithFallback(h,"labelPointStyle",this,u)),r.push(invokeCallbackWithFallback(h,"labelTextColor",this,u))}),this.labelColors=n,this.labelPointStyles=a,this.labelTextColors=r,this.dataPoints=l,l}update(e,i){const s=this.options.setContext(this.getContext()),n=this._active;let a,r=[];if(!n.length)this.opacity!==0&&(a={opacity:0});else{const l=positioners[s.position].call(this,n,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);const c=this._size=getTooltipSize(this,s),d=Object.assign({},l,c),u=determineAlignment(this.chart,s,d),h=getBackgroundPoint(s,d,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:h.x,y:h.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=r,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:i})}drawCaret(e,i,s,n){const a=this.getCaretPosition(e,s,n);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)}getCaretPosition(e,i,s){const{xAlign:n,yAlign:a}=this,{caretSize:r,cornerRadius:l}=s,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:h}=toTRBLCorners(l),{x:f,y:g}=e,{width:m,height:_}=i;let w,B,D,P,H,N;return a==="center"?(H=g+_/2,n==="left"?(w=f,B=w-r,P=H+r,N=H-r):(w=f+m,B=w+r,P=H-r,N=H+r),D=w):(n==="left"?B=f+Math.max(c,u)+r:n==="right"?B=f+m-Math.max(d,h)-r:B=this.caretX,a==="top"?(P=g,H=P-r,w=B-r,D=B+r):(P=g+_,H=P+r,w=B+r,D=B-r),N=P),{x1:w,x2:B,x3:D,y1:P,y2:H,y3:N}}drawTitle(e,i,s){const n=this.title,a=n.length;let r,l,c;if(a){const d=getRtlAdapter(s.rtl,this.x,this.width);for(e.x=getAlignedX(this,s.titleAlign,s),i.textAlign=d.textAlign(s.titleAlign),i.textBaseline="middle",r=toFont(s.titleFont),l=s.titleSpacing,i.fillStyle=s.titleColor,i.font=r.string,c=0;c<a;++c)i.fillText(n[c],d.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+l,c+1===a&&(e.y+=s.titleMarginBottom-l)}}_drawColorBox(e,i,s,n,a){const r=this.labelColors[s],l=this.labelPointStyles[s],{boxHeight:c,boxWidth:d,boxPadding:u}=a,h=toFont(a.bodyFont),f=getAlignedX(this,"left",a),g=n.x(f),m=c<h.lineHeight?(h.lineHeight-c)/2:0,_=i.y+m;if(a.usePointStyle){const w={radius:Math.min(d,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},B=n.leftForLtr(g,d)+d/2,D=_+c/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,drawPoint(e,w,B,D),e.strokeStyle=r.borderColor,e.fillStyle=r.backgroundColor,drawPoint(e,w,B,D)}else{e.lineWidth=isObject(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,e.strokeStyle=r.borderColor,e.setLineDash(r.borderDash||[]),e.lineDashOffset=r.borderDashOffset||0;const w=n.leftForLtr(g,d-u),B=n.leftForLtr(n.xPlus(g,1),d-u-2),D=toTRBLCorners(r.borderRadius);Object.values(D).some(P=>P!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,addRoundedRectPath(e,{x:w,y:_,w:d,h:c,radius:D}),e.fill(),e.stroke(),e.fillStyle=r.backgroundColor,e.beginPath(),addRoundedRectPath(e,{x:B,y:_+1,w:d-2,h:c-2,radius:D}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(w,_,d,c),e.strokeRect(w,_,d,c),e.fillStyle=r.backgroundColor,e.fillRect(B,_+1,d-2,c-2))}e.fillStyle=this.labelTextColors[s]}drawBody(e,i,s){const{body:n}=this,{bodySpacing:a,bodyAlign:r,displayColors:l,boxHeight:c,boxWidth:d,boxPadding:u}=s,h=toFont(s.bodyFont);let f=h.lineHeight,g=0;const m=getRtlAdapter(s.rtl,this.x,this.width),_=function(U){i.fillText(U,m.x(e.x+g),e.y+f/2),e.y+=f+a},w=m.textAlign(r);let B,D,P,H,N,W,L;for(i.textAlign=r,i.textBaseline="middle",i.font=h.string,e.x=getAlignedX(this,w,s),i.fillStyle=s.bodyColor,each(this.beforeBody,_),g=l&&w!=="right"?r==="center"?d/2+u:d+2+u:0,H=0,W=n.length;H<W;++H){for(B=n[H],D=this.labelTextColors[H],i.fillStyle=D,each(B.before,_),P=B.lines,l&&P.length&&(this._drawColorBox(i,e,H,m,s),f=Math.max(h.lineHeight,c)),N=0,L=P.length;N<L;++N)_(P[N]),f=h.lineHeight;each(B.after,_)}g=0,f=h.lineHeight,each(this.afterBody,_),e.y-=a}drawFooter(e,i,s){const n=this.footer,a=n.length;let r,l;if(a){const c=getRtlAdapter(s.rtl,this.x,this.width);for(e.x=getAlignedX(this,s.footerAlign,s),e.y+=s.footerMarginTop,i.textAlign=c.textAlign(s.footerAlign),i.textBaseline="middle",r=toFont(s.footerFont),i.fillStyle=s.footerColor,i.font=r.string,l=0;l<a;++l)i.fillText(n[l],c.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+s.footerSpacing}}drawBackground(e,i,s,n){const{xAlign:a,yAlign:r}=this,{x:l,y:c}=e,{width:d,height:u}=s,{topLeft:h,topRight:f,bottomLeft:g,bottomRight:m}=toTRBLCorners(n.cornerRadius);i.fillStyle=n.backgroundColor,i.strokeStyle=n.borderColor,i.lineWidth=n.borderWidth,i.beginPath(),i.moveTo(l+h,c),r==="top"&&this.drawCaret(e,i,s,n),i.lineTo(l+d-f,c),i.quadraticCurveTo(l+d,c,l+d,c+f),r==="center"&&a==="right"&&this.drawCaret(e,i,s,n),i.lineTo(l+d,c+u-m),i.quadraticCurveTo(l+d,c+u,l+d-m,c+u),r==="bottom"&&this.drawCaret(e,i,s,n),i.lineTo(l+g,c+u),i.quadraticCurveTo(l,c+u,l,c+u-g),r==="center"&&a==="left"&&this.drawCaret(e,i,s,n),i.lineTo(l,c+h),i.quadraticCurveTo(l,c,l+h,c),i.closePath(),i.fill(),n.borderWidth>0&&i.stroke()}_updateAnimationTarget(e){const i=this.chart,s=this.$animations,n=s&&s.x,a=s&&s.y;if(n||a){const r=positioners[e.position].call(this,this._active,this._eventPosition);if(!r)return;const l=this._size=getTooltipSize(this,e),c=Object.assign({},r,this._size),d=determineAlignment(i,e,c),u=getBackgroundPoint(e,c,d,i);(n._to!==u.x||a._to!==u.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const i=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(i);const n={width:this.width,height:this.height},a={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const r=toPadding(i.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;i.enabled&&l&&(e.save(),e.globalAlpha=s,this.drawBackground(a,e,n,i),overrideTextDirection(e,i.textDirection),a.y+=r.top,this.drawTitle(a,e,i),this.drawBody(a,e,i),this.drawFooter(a,e,i),restoreTextDirection(e,i.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,i){const s=this._active,n=e.map(({datasetIndex:l,index:c})=>{const d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[c],index:c}}),a=!_elementsEqual(s,n),r=this._positionChanged(n,i);(a||r)&&(this._active=n,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,i,s=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,a=this._active||[],r=this._getActiveElements(e,a,i,s),l=this._positionChanged(r,e),c=i||!_elementsEqual(r,a)||l;return c&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,i))),c}_getActiveElements(e,i,s,n){const a=this.options;if(e.type==="mouseout")return[];if(!n)return i;const r=this.chart.getElementsAtEventForMode(e,a.mode,a,s);return a.reverse&&r.reverse(),r}_positionChanged(e,i){const{caretX:s,caretY:n,options:a}=this,r=positioners[a.position].call(this,e,i);return r!==!1&&(s!==r.x||n!==r.y)}}Q(Tooltip,"positioners",positioners);var plugin_tooltip={id:"tooltip",_element:Tooltip,positioners,afterInit(t,e,i){i&&(t.tooltip=new Tooltip({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:defaultCallbacks},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},plugins=Object.freeze({__proto__:null,Colors:plugin_colors,Decimation:plugin_decimation,Filler:index$3,Legend:plugin_legend,SubTitle:plugin_subtitle,Title:plugin_title,Tooltip:plugin_tooltip});const addIfString=(t,e,i,s)=>(typeof e=="string"?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i);function findOrAddLabel(t,e,i,s){const n=t.indexOf(e);if(n===-1)return addIfString(t,e,i,s);const a=t.lastIndexOf(e);return n!==a?i:n}const validIndex=(t,e)=>t===null?null:_limitValue(Math.round(t),0,e);function _getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class CategoryScale extends Scale{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const i=this._addedLabels;if(i.length){const s=this.getLabels();for(const{index:n,label:a}of i)s[n]===a&&s.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,i){if(isNullOrUndef(e))return null;const s=this.getLabels();return i=isFinite(i)&&s[i]===e?i:findOrAddLabel(s,e,valueOrDefault(i,e),this._addedLabels),validIndex(i,s.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(s=0),i||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){const e=this.min,i=this.max,s=this.options.offset,n=[];let a=this.getLabels();a=e===0&&i===a.length-1?a:a.slice(e,i+1),this._valueRange=Math.max(a.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=e;r<=i;r++)n.push({value:r});return n}getLabelForValue(e){return _getLabelForValue.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const i=this.ticks;return e<0||e>i.length-1?null:this.getPixelForValue(i[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}Q(CategoryScale,"id","category"),Q(CategoryScale,"defaults",{ticks:{callback:_getLabelForValue}});function generateTicks$1(t,e){const i=[],{bounds:n,step:a,min:r,max:l,precision:c,count:d,maxTicks:u,maxDigits:h,includeBounds:f}=t,g=a||1,m=u-1,{min:_,max:w}=e,B=!isNullOrUndef(r),D=!isNullOrUndef(l),P=!isNullOrUndef(d),H=(w-_)/(h+1);let N=niceNum((w-_)/m/g)*g,W,L,U,K;if(N<1e-14&&!B&&!D)return[{value:_},{value:w}];K=Math.ceil(w/N)-Math.floor(_/N),K>m&&(N=niceNum(K*N/m/g)*g),isNullOrUndef(c)||(W=Math.pow(10,c),N=Math.ceil(N*W)/W),n==="ticks"?(L=Math.floor(_/N)*N,U=Math.ceil(w/N)*N):(L=_,U=w),B&&D&&a&&almostWhole((l-r)/a,N/1e3)?(K=Math.round(Math.min((l-r)/N,u)),N=(l-r)/K,L=r,U=l):P?(L=B?r:L,U=D?l:U,K=d-1,N=(U-L)/K):(K=(U-L)/N,almostEquals(K,Math.round(K),N/1e3)?K=Math.round(K):K=Math.ceil(K));const X=Math.max(_decimalPlaces(N),_decimalPlaces(L));W=Math.pow(10,isNullOrUndef(c)?X:c),L=Math.round(L*W)/W,U=Math.round(U*W)/W;let Y=0;for(B&&(f&&L!==r?(i.push({value:r}),L<r&&Y++,almostEquals(Math.round((L+Y*N)*W)/W,r,relativeLabelSize(r,H,t))&&Y++):L<r&&Y++);Y<K;++Y)i.push({value:Math.round((L+Y*N)*W)/W});return D&&f&&U!==l?i.length&&almostEquals(i[i.length-1].value,l,relativeLabelSize(l,H,t))?i[i.length-1].value=l:i.push({value:l}):(!D||U===l)&&i.push({value:U}),i}function relativeLabelSize(t,e,{horizontal:i,minRotation:s}){const n=toRadians(s),a=(i?Math.sin(n):Math.cos(n))||.001,r=.75*e*(""+t).length;return Math.min(e/a,r)}class LinearScaleBase extends Scale{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,i){return isNullOrUndef(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:i,maxDefined:s}=this.getUserBounds();let{min:n,max:a}=this;const r=c=>n=i?n:c,l=c=>a=s?a:c;if(e){const c=sign(n),d=sign(a);c<0&&d<0?l(0):c>0&&d>0&&r(0)}if(n===a){let c=a===0?1:Math.abs(a*.05);l(a+c),e||r(n-c)}this.min=n,this.max=a}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:i,stepSize:s}=e,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),i=i||11),i&&(n=Math.min(i,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,i=e.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:e.bounds,min:e.min,max:e.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:i.minRotation||0,includeBounds:i.includeBounds!==!1},a=this._range||this,r=generateTicks$1(n,a);return e.bounds==="ticks"&&_setMinAndMaxByKey(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let i=this.min,s=this.max;if(super.configure(),this.options.offset&&e.length){const n=(s-i)/Math.max(e.length-1,1)/2;i-=n,s+=n}this._startValue=i,this._endValue=s,this._valueRange=s-i}getLabelForValue(e){return formatNumber(e,this.chart.options.locale,this.options.ticks.format)}}class LinearScale extends LinearScaleBase{determineDataLimits(){const{min:e,max:i}=this.getMinMax(!0);this.min=isNumberFinite(e)?e:0,this.max=isNumberFinite(i)?i:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),i=e?this.width:this.height,s=toRadians(this.options.ticks.minRotation),n=(e?Math.sin(s):Math.cos(s))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,a.lineHeight/n))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Q(LinearScale,"id","linear"),Q(LinearScale,"defaults",{ticks:{callback:Ticks.formatters.numeric}});const log10Floor=t=>Math.floor(log10(t)),changeExponent=(t,e)=>Math.pow(10,log10Floor(t)+e);function isMajor(t){return t/Math.pow(10,log10Floor(t))===1}function steps(t,e,i){const s=Math.pow(10,i),n=Math.floor(t/s);return Math.ceil(e/s)-n}function startExp(t,e){const i=e-t;let s=log10Floor(i);for(;steps(t,e,s)>10;)s++;for(;steps(t,e,s)<10;)s--;return Math.min(s,log10Floor(t))}function generateTicks(t,{min:e,max:i}){e=finiteOrDefault(t.min,e);const s=[],n=log10Floor(e);let a=startExp(e,i),r=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),c=n>a?Math.pow(10,n):0,d=Math.round((e-c)*r)/r,u=Math.floor((e-c)/l/10)*l*10;let h=Math.floor((d-u)/Math.pow(10,a)),f=finiteOrDefault(t.min,Math.round((c+u+h*Math.pow(10,a))*r)/r);for(;f<i;)s.push({value:f,major:isMajor(f),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,r=a>=0?1:r),f=Math.round((c+u+h*Math.pow(10,a))*r)/r;const g=finiteOrDefault(t.max,f);return s.push({value:g,major:isMajor(g),significand:h}),s}class LogarithmicScale extends Scale{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,i){const s=LinearScaleBase.prototype.parse.apply(this,[e,i]);if(s===0){this._zero=!0;return}return isNumberFinite(s)&&s>0?s:null}determineDataLimits(){const{min:e,max:i}=this.getMinMax(!0);this.min=isNumberFinite(e)?Math.max(0,e):null,this.max=isNumberFinite(i)?Math.max(0,i):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!isNumberFinite(this._userMin)&&(this.min=e===changeExponent(this.min,0)?changeExponent(this.min,-1):changeExponent(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:i}=this.getUserBounds();let s=this.min,n=this.max;const a=l=>s=e?s:l,r=l=>n=i?n:l;s===n&&(s<=0?(a(1),r(10)):(a(changeExponent(s,-1)),r(changeExponent(n,1)))),s<=0&&a(changeExponent(n,-1)),n<=0&&r(changeExponent(s,1)),this.min=s,this.max=n}buildTicks(){const e=this.options,i={min:this._userMin,max:this._userMax},s=generateTicks(i,this);return e.bounds==="ticks"&&_setMinAndMaxByKey(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(e){return e===void 0?"0":formatNumber(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=log10(e),this._valueRange=log10(this.max)-log10(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(log10(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const i=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+i*this._valueRange)}}Q(LogarithmicScale,"id","logarithmic"),Q(LogarithmicScale,"defaults",{ticks:{callback:Ticks.formatters.logarithmic,major:{enabled:!0}}});function getTickBackdropHeight(t){const e=t.ticks;if(e.display&&t.display){const i=toPadding(e.backdropPadding);return valueOrDefault(e.font&&e.font.size,defaults.font.size)+i.height}return 0}function measureLabelSize(t,e,i){return i=isArray(i)?i:[i],{w:_longestText(t,e.string,i),h:i.length*e.lineHeight}}function determineLimits(t,e,i,s,n){return t===s||t===n?{start:e-i/2,end:e+i/2}:t<s||t>n?{start:e-i,end:e}:{start:e,end:e+i}}function fitWithPointLabels(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),s=[],n=[],a=t._pointLabels.length,r=t.options.pointLabels,l=r.centerPointLabels?PI/a:0;for(let c=0;c<a;c++){const d=r.setContext(t.getPointLabelContext(c));n[c]=d.padding;const u=t.getPointPosition(c,t.drawingArea+n[c],l),h=toFont(d.font),f=measureLabelSize(t.ctx,h,t._pointLabels[c]);s[c]=f;const g=_normalizeAngle(t.getIndexAngle(c)+l),m=Math.round(toDegrees(g)),_=determineLimits(m,u.x,f.w,0,180),w=determineLimits(m,u.y,f.h,90,270);updateLimits(i,e,g,_,w)}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=buildPointLabelItems(t,s,n)}function updateLimits(t,e,i,s,n){const a=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let l=0,c=0;s.start<e.l?(l=(e.l-s.start)/a,t.l=Math.min(t.l,e.l-l)):s.end>e.r&&(l=(s.end-e.r)/a,t.r=Math.max(t.r,e.r+l)),n.start<e.t?(c=(e.t-n.start)/r,t.t=Math.min(t.t,e.t-c)):n.end>e.b&&(c=(n.end-e.b)/r,t.b=Math.max(t.b,e.b+c))}function buildPointLabelItems(t,e,i){const s=[],n=t._pointLabels.length,a=t.options,r=getTickBackdropHeight(a)/2,l=t.drawingArea,c=a.pointLabels.centerPointLabels?PI/n:0;for(let d=0;d<n;d++){const u=t.getPointPosition(d,l+r+i[d],c),h=Math.round(toDegrees(_normalizeAngle(u.angle+HALF_PI))),f=e[d],g=yForAngle(u.y,f.h,h),m=getTextAlignForAngle(h),_=leftForTextAlign(u.x,f.w,m);s.push({x:u.x,y:g,textAlign:m,left:_,top:g,right:_+f.w,bottom:g+f.h})}return s}function getTextAlignForAngle(t){return t===0||t===180?"center":t<180?"left":"right"}function leftForTextAlign(t,e,i){return i==="right"?t-=e:i==="center"&&(t-=e/2),t}function yForAngle(t,e,i){return i===90||i===270?t-=e/2:(i>270||i<90)&&(t-=e),t}function drawPointLabels(t,e){const{ctx:i,options:{pointLabels:s}}=t;for(let n=e-1;n>=0;n--){const a=s.setContext(t.getPointLabelContext(n)),r=toFont(a.font),{x:l,y:c,textAlign:d,left:u,top:h,right:f,bottom:g}=t._pointLabelItems[n],{backdropColor:m}=a;if(!isNullOrUndef(m)){const _=toTRBLCorners(a.borderRadius),w=toPadding(a.backdropPadding);i.fillStyle=m;const B=u-w.left,D=h-w.top,P=f-u+w.width,H=g-h+w.height;Object.values(_).some(N=>N!==0)?(i.beginPath(),addRoundedRectPath(i,{x:B,y:D,w:P,h:H,radius:_}),i.fill()):i.fillRect(B,D,P,H)}renderText(i,t._pointLabels[n],l,c+r.lineHeight/2,r,{color:a.color,textAlign:d,textBaseline:"middle"})}}function pathRadiusLine(t,e,i,s){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,TAU);else{let a=t.getPointPosition(0,e);n.moveTo(a.x,a.y);for(let r=1;r<s;r++)a=t.getPointPosition(r,e),n.lineTo(a.x,a.y)}}function drawRadiusLine(t,e,i,s,n){const a=t.ctx,r=e.circular,{color:l,lineWidth:c}=e;!r&&!s||!l||!c||i<0||(a.save(),a.strokeStyle=l,a.lineWidth=c,a.setLineDash(n.dash),a.lineDashOffset=n.dashOffset,a.beginPath(),pathRadiusLine(t,i,r,s),a.closePath(),a.stroke(),a.restore())}function createPointLabelContext(t,e,i){return createContext(t,{label:i,index:e,type:"pointLabel"})}class RadialLinearScale extends LinearScaleBase{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=toPadding(getTickBackdropHeight(this.options)/2),i=this.width=this.maxWidth-e.width,s=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+i/2+e.left),this.yCenter=Math.floor(this.top+s/2+e.top),this.drawingArea=Math.floor(Math.min(i,s)/2)}determineDataLimits(){const{min:e,max:i}=this.getMinMax(!1);this.min=isNumberFinite(e)&&!isNaN(e)?e:0,this.max=isNumberFinite(i)&&!isNaN(i)?i:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/getTickBackdropHeight(this.options))}generateTickLabels(e){LinearScaleBase.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((i,s)=>{const n=callback(this.options.pointLabels.callback,[i,s],this);return n||n===0?n:""}).filter((i,s)=>this.chart.getDataVisibility(s))}fit(){const e=this.options;e.display&&e.pointLabels.display?fitWithPointLabels(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,i,s,n){this.xCenter+=Math.floor((e-i)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,i,s,n))}getIndexAngle(e){const i=TAU/(this._pointLabels.length||1),s=this.options.startAngle||0;return _normalizeAngle(e*i+toRadians(s))}getDistanceFromCenterForValue(e){if(isNullOrUndef(e))return NaN;const i=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*i:(e-this.min)*i}getValueForDistanceFromCenter(e){if(isNullOrUndef(e))return NaN;const i=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-i:this.min+i}getPointLabelContext(e){const i=this._pointLabels||[];if(e>=0&&e<i.length){const s=i[e];return createPointLabelContext(this.getContext(),e,s)}}getPointPosition(e,i,s=0){const n=this.getIndexAngle(e)-HALF_PI+s;return{x:Math.cos(n)*i+this.xCenter,y:Math.sin(n)*i+this.yCenter,angle:n}}getPointPositionForValue(e,i){return this.getPointPosition(e,this.getDistanceFromCenterForValue(i))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:i,top:s,right:n,bottom:a}=this._pointLabelItems[e];return{left:i,top:s,right:n,bottom:a}}drawBackground(){const{backgroundColor:e,grid:{circular:i}}=this.options;if(e){const s=this.ctx;s.save(),s.beginPath(),pathRadiusLine(this,this.getDistanceFromCenterForValue(this._endValue),i,this._pointLabels.length),s.closePath(),s.fillStyle=e,s.fill(),s.restore()}}drawGrid(){const e=this.ctx,i=this.options,{angleLines:s,grid:n,border:a}=i,r=this._pointLabels.length;let l,c,d;if(i.pointLabels.display&&drawPointLabels(this,r),n.display&&this.ticks.forEach((u,h)=>{if(h!==0){c=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(h),g=n.setContext(f),m=a.setContext(f);drawRadiusLine(this,g,c,r,m)}}),s.display){for(e.save(),l=r-1;l>=0;l--){const u=s.setContext(this.getPointLabelContext(l)),{color:h,lineWidth:f}=u;!f||!h||(e.lineWidth=f,e.strokeStyle=h,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,c=this.getDistanceFromCenterForValue(i.ticks.reverse?this.min:this.max),d=this.getPointPosition(l,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(d.x,d.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,i=this.options,s=i.ticks;if(!s.display)return;const n=this.getIndexAngle(0);let a,r;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(n),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,c)=>{if(c===0&&!i.reverse)return;const d=s.setContext(this.getContext(c)),u=toFont(d.font);if(a=this.getDistanceFromCenterForValue(this.ticks[c].value),d.showLabelBackdrop){e.font=u.string,r=e.measureText(l.label).width,e.fillStyle=d.backdropColor;const h=toPadding(d.backdropPadding);e.fillRect(-r/2-h.left,-a-u.size/2-h.top,r+h.width,u.size+h.height)}renderText(e,l.label,0,-a,u,{color:d.color})}),e.restore()}drawTitle(){}}Q(RadialLinearScale,"id","radialLinear"),Q(RadialLinearScale,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ticks.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Q(RadialLinearScale,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Q(RadialLinearScale,"descriptors",{angleLines:{_fallback:"grid"}});const INTERVALS={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},UNITS=Object.keys(INTERVALS);function sorter(t,e){return t-e}function parse(t,e){if(isNullOrUndef(e))return null;const i=t._adapter,{parser:s,round:n,isoWeekday:a}=t._parseOpts;let r=e;return typeof s=="function"&&(r=s(r)),isNumberFinite(r)||(r=typeof s=="string"?i.parse(r,s):i.parse(r)),r===null?null:(n&&(r=n==="week"&&(isNumber(a)||a===!0)?i.startOf(r,"isoWeek",a):i.startOf(r,n)),+r)}function determineUnitForAutoTicks(t,e,i,s){const n=UNITS.length;for(let a=UNITS.indexOf(t);a<n-1;++a){const r=INTERVALS[UNITS[a]],l=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((i-e)/(l*r.size))<=s)return UNITS[a]}return UNITS[n-1]}function determineUnitForFormatting(t,e,i,s,n){for(let a=UNITS.length-1;a>=UNITS.indexOf(i);a--){const r=UNITS[a];if(INTERVALS[r].common&&t._adapter.diff(n,s,r)>=e-1)return r}return UNITS[i?UNITS.indexOf(i):0]}function determineMajorUnit(t){for(let e=UNITS.indexOf(t)+1,i=UNITS.length;e<i;++e)if(INTERVALS[UNITS[e]].common)return UNITS[e]}function addTick(t,e,i){if(!i)t[e]=!0;else if(i.length){const{lo:s,hi:n}=_lookup(i,e),a=i[s]>=e?i[s]:i[n];t[a]=!0}}function setMajorTicks(t,e,i,s){const n=t._adapter,a=+n.startOf(e[0].value,s),r=e[e.length-1].value;let l,c;for(l=a;l<=r;l=+n.add(l,1,s))c=i[l],c>=0&&(e[c].major=!0);return e}function ticksFromTimestamps(t,e,i){const s=[],n={},a=e.length;let r,l;for(r=0;r<a;++r)l=e[r],n[l]=r,s.push({value:l,major:!1});return a===0||!i?s:setMajorTicks(t,s,n,i)}class TimeScale extends Scale{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,i={}){const s=e.time||(e.time={}),n=this._adapter=new adapters._date(e.adapters.date);n.init(i),mergeIf(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(e),this._normalized=i.normalized}parse(e,i){return e===void 0?null:parse(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,i=this._adapter,s=e.time.unit||"day";let{min:n,max:a,minDefined:r,maxDefined:l}=this.getUserBounds();function c(d){!r&&!isNaN(d.min)&&(n=Math.min(n,d.min)),!l&&!isNaN(d.max)&&(a=Math.max(a,d.max))}(!r||!l)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),n=isNumberFinite(n)&&!isNaN(n)?n:+i.startOf(Date.now(),s),a=isNumberFinite(a)&&!isNaN(a)?a:+i.endOf(Date.now(),s)+1,this.min=Math.min(n,a-1),this.max=Math.max(n+1,a)}_getLabelBounds(){const e=this.getLabelTimestamps();let i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return e.length&&(i=e[0],s=e[e.length-1]),{min:i,max:s}}buildTicks(){const e=this.options,i=e.time,s=e.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const a=this.min,r=this.max,l=_filterBetween(n,a,r);return this._unit=i.unit||(s.autoSkip?determineUnitForAutoTicks(i.minUnit,this.min,this.max,this._getLabelCapacity(a)):determineUnitForFormatting(this,l.length,i.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:determineMajorUnit(this._unit),this.initOffsets(n),e.reverse&&l.reverse(),ticksFromTimestamps(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let i=0,s=0,n,a;this.options.offset&&e.length&&(n=this.getDecimalForValue(e[0]),e.length===1?i=1-n:i=(this.getDecimalForValue(e[1])-n)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?s=a:s=(a-this.getDecimalForValue(e[e.length-2]))/2);const r=e.length<3?.5:.25;i=_limitValue(i,0,r),s=_limitValue(s,0,r),this._offsets={start:i,end:s,factor:1/(i+1+s)}}_generate(){const e=this._adapter,i=this.min,s=this.max,n=this.options,a=n.time,r=a.unit||determineUnitForAutoTicks(a.minUnit,i,s,this._getLabelCapacity(i)),l=valueOrDefault(n.ticks.stepSize,1),c=r==="week"?a.isoWeekday:!1,d=isNumber(c)||c===!0,u={};let h=i,f,g;if(d&&(h=+e.startOf(h,"isoWeek",c)),h=+e.startOf(h,d?"day":r),e.diff(s,i,r)>1e5*l)throw new Error(i+" and "+s+" are too far apart with stepSize of "+l+" "+r);const m=n.ticks.source==="data"&&this.getDataTimestamps();for(f=h,g=0;f<s;f=+e.add(f,l,r),g++)addTick(u,f,m);return(f===s||n.bounds==="ticks"||g===1)&&addTick(u,f,m),Object.keys(u).sort((_,w)=>_-w).map(_=>+_)}getLabelForValue(e){const i=this._adapter,s=this.options.time;return s.tooltipFormat?i.format(e,s.tooltipFormat):i.format(e,s.displayFormats.datetime)}_tickFormatFunction(e,i,s,n){const a=this.options,r=a.ticks.callback;if(r)return callback(r,[e,i,s],this);const l=a.time.displayFormats,c=this._unit,d=this._majorUnit,u=c&&l[c],h=d&&l[d],f=s[i],g=d&&h&&f&&f.major;return this._adapter.format(e,n||(g?h:u))}generateTickLabels(e){let i,s,n;for(i=0,s=e.length;i<s;++i)n=e[i],n.label=this._tickFormatFunction(n.value,i,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const i=this._offsets,s=this.getDecimalForValue(e);return this.getPixelForDecimal((i.start+s)*i.factor)}getValueForPixel(e){const i=this._offsets,s=this.getDecimalForPixel(e)/i.factor-i.end;return this.min+s*(this.max-this.min)}_getLabelSize(e){const i=this.options.ticks,s=this.ctx.measureText(e).width,n=toRadians(this.isHorizontal()?i.maxRotation:i.minRotation),a=Math.cos(n),r=Math.sin(n),l=this._resolveTickFontOptions(0).size;return{w:s*a+l*r,h:s*r+l*a}}_getLabelCapacity(e){const i=this.options.time,s=i.displayFormats,n=s[i.unit]||s.millisecond,a=this._tickFormatFunction(e,0,ticksFromTimestamps(this,[e],this._majorUnit),n),r=this._getLabelSize(a),l=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return l>0?l:1}getDataTimestamps(){let e=this._cache.data||[],i,s;if(e.length)return e;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(i=0,s=n.length;i<s;++i)e=e.concat(n[i].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let i,s;if(e.length)return e;const n=this.getLabels();for(i=0,s=n.length;i<s;++i)e.push(parse(this,n[i]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return _arrayUnique(e.sort(sorter))}}Q(TimeScale,"id","time"),Q(TimeScale,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function interpolate(t,e,i){let s=0,n=t.length-1,a,r,l,c;i?(e>=t[s].pos&&e<=t[n].pos&&({lo:s,hi:n}=_lookupByKey(t,"pos",e)),{pos:a,time:l}=t[s],{pos:r,time:c}=t[n]):(e>=t[s].time&&e<=t[n].time&&({lo:s,hi:n}=_lookupByKey(t,"time",e)),{time:a,pos:l}=t[s],{time:r,pos:c}=t[n]);const d=r-a;return d?l+(c-l)*(e-a)/d:l}class TimeSeriesScale extends TimeScale{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),i=this._table=this.buildLookupTable(e);this._minPos=interpolate(i,this.min),this._tableRange=interpolate(i,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:i,max:s}=this,n=[],a=[];let r,l,c,d,u;for(r=0,l=e.length;r<l;++r)d=e[r],d>=i&&d<=s&&n.push(d);if(n.length<2)return[{time:i,pos:0},{time:s,pos:1}];for(r=0,l=n.length;r<l;++r)u=n[r+1],c=n[r-1],d=n[r],Math.round((u+c)/2)!==d&&a.push({time:d,pos:r/(l-1)});return a}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const i=this.getDataTimestamps(),s=this.getLabelTimestamps();return i.length&&s.length?e=this.normalize(i.concat(s)):e=i.length?i:s,e=this._cache.all=e,e}getDecimalForValue(e){return(interpolate(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const i=this._offsets,s=this.getDecimalForPixel(e)/i.factor-i.end;return interpolate(this._table,s*this._tableRange+this._minPos,!0)}}Q(TimeSeriesScale,"id","timeseries"),Q(TimeSeriesScale,"defaults",TimeScale.defaults);var scales=Object.freeze({__proto__:null,CategoryScale,LinearScale,LogarithmicScale,RadialLinearScale,TimeScale,TimeSeriesScale});const registerables=[controllers,elements,plugins,scales];Chart.register(...registerables);const _withScopeId$9=t=>(pushScopeId("data-v-10edff82"),t=t(),popScopeId(),t),_hoisted_1$l={id:"critical-main"},_hoisted_2$i={id:"critical"},_hoisted_3$i=_withScopeId$9(()=>createBaseVNode("div",{class:"des"},"\u52A0\u653B\u4F24\u5BB3",-1)),_hoisted_4$f={class:"slider-div"},_hoisted_5$d={id:"def"},_hoisted_6$b=_withScopeId$9(()=>createBaseVNode("div",{class:"des"},"\u52A0\u9632\u4F24\u5BB3",-1)),_hoisted_7$9={class:"slider-div"},_hoisted_8$8={id:"now-damage"},_hoisted_9$8={style:{"font-family":"'Fira Code'"}},_sfc_main$l=defineComponent({__name:"enemyCritical",props:{fromBook:{type:Boolean}},setup(t){const e=t,i=ref(),s=ref(),n=core.plugin.bookDetailEnemy,a=Math.ceil,r=ref(e.fromBook?void 0:flags.mouseLoc[0]),l=ref(e.fromBook?void 0:flags.mouseLoc[1]);r.value=has(r.value)?Math.round(r.value+core.bigmap.offsetX/32):void 0,l.value=has(l.value)?Math.round(l.value+core.bigmap.offsetY/32):void 0;let c=getCriticalDamage(n,0,0,r.value,l.value),d=getDefDamage(n,0,0,r.value,l.value);const u=ref(c),h=ref(d),f=ref(0),g=ref(0),m=core.getDamageInfo(n.id,void 0,r.value,l.value),_=core.formatBigNumber,w=core.status.thisMap.ratio,B=computed(()=>{const N=core.getDamageInfo(n.id,{atk:core.getStatus("atk")+f.value*w,def:core.getStatus("def")+g.value*w},r.value,l.value);return has(N)?has(m)?[m.damage-N.damage,N.damage]:[-N.damage,N.damage]:["???","???"]});function D(N,W){Chart.defaults.color="#aaa";const L={type:"line",data:P(W),options:{elements:{point:{radius:5,hoverRadius:7},line:{borderJoinStyle:"round"}},scales:{y:{grid:{color:"#ddd3"}}},plugins:{legend:{display:!1}}}};return new Chart(N,L)}function P(N){return{datasets:[{data:N.map(W=>W[1]),label:"\u602A\u7269\u4F24\u5BB3"}],labels:N.map(W=>Math.round(W[0]/w))}}const H=lodash.exports.debounce((N,W)=>{u.value=getCriticalDamage(n,f.value*w,g.value*w,r.value,l.value),h.value=getDefDamage(n,g.value*w,f.value*w,r.value,l.value),u.value.length>c.length&&(c=u.value),h.value.length>d.length&&(d=h.value),N.data=P(u.value),W.data=P(h.value),N.update("resize"),W.update("resize")},200);return onMounted(()=>{const N=document.getElementById("critical-main"),W=getComputedStyle(N),L=parseFloat(W.width),U=window.innerHeight/5,K=i.value,X=s.value;setCanvasSize(K,L,U),setCanvasSize(X,L,U);const Y=D(K,u.value),J=D(X,h.value);watch(f,oe=>{H(Y,J)}),watch(g,oe=>{H(Y,J)})}),(N,W)=>{var K,X,Y,J,oe,de,se,re;const L=__unplugin_components_0$1,U=__unplugin_components_0;return openBlock(),createElementBlock("div",_hoisted_1$l,[createBaseVNode("div",_hoisted_2$i,[_hoisted_3$i,createBaseVNode("canvas",{ref_key:"critical",ref:i,class:"chart"},null,512),createBaseVNode("div",_hoisted_4$f,[createBaseVNode("span",null,"\u52A0\u653B\u6B21\u6570\xA0\xA0\xA0\xA0"+toDisplayString(f.value),1),createVNode(L,{class:"slider",value:f.value,"onUpdate:value":W[0]||(W[0]=ae=>f.value=ae),max:unref(a)(((X=(K=unref(c).at(-1))==null?void 0:K[0])!=null?X:2)/unref(w))-1},null,8,["value","max"]),createBaseVNode("span",null,"\u6700\u5927\u503C\xA0\xA0\xA0\xA0"+toDisplayString(unref(a)(((J=(Y=unref(c).at(-1))==null?void 0:Y[0])!=null?J:2)/unref(w))-1),1)])]),createVNode(U,{dashed:"",style:{width:"100%","border-color":"#ddd4",margin:"1vh 0 1vh 0"}}),createBaseVNode("div",_hoisted_5$d,[_hoisted_6$b,createBaseVNode("canvas",{ref_key:"def",ref:s,class:"chart"},null,512),createBaseVNode("div",_hoisted_7$9,[createBaseVNode("span",null,"\u52A0\u9632\u6B21\u6570\xA0\xA0\xA0\xA0"+toDisplayString(g.value),1),createVNode(L,{class:"slider",value:g.value,"onUpdate:value":W[1]||(W[1]=ae=>g.value=ae),max:unref(a)(((de=(oe=unref(d).at(-1))==null?void 0:oe[0])!=null?de:2)/unref(w))-1},null,8,["value","max"]),createBaseVNode("span",null,"\u6700\u5927\u503C\xA0\xA0\xA0\xA0"+toDisplayString(unref(a)(((re=(se=unref(d).at(-1))==null?void 0:se[0])!=null?re:2)/unref(w))-1),1)])]),createBaseVNode("div",_hoisted_8$8,[createBaseVNode("div",null,[createBaseVNode("span",null,"\u5F53\u524D\u52A0\u653B"+toDisplayString(unref(isMobile)?"":"\xA0\xA0\xA0\xA0"),1),createBaseVNode("span",null,toDisplayString(unref(_)(f.value*unref(w))),1)]),createBaseVNode("div",null,[createBaseVNode("span",null,"\u5F53\u524D\u52A0\u9632"+toDisplayString(unref(isMobile)?"":"\xA0\xA0\xA0\xA0"),1),createBaseVNode("span",null,toDisplayString(unref(_)(g.value*unref(w))),1)]),createBaseVNode("div",null,[createBaseVNode("span",null,"\u5F53\u524D\u51CF\u4F24"+toDisplayString(unref(isMobile)?"":"\xA0\xA0\xA0\xA0"),1),createBaseVNode("span",null,[createBaseVNode("span",_hoisted_9$8,toDisplayString(unref(B)[0]<0&&!unref(has)(unref(n).damage)?"=>":""),1),createTextVNode(toDisplayString(unref(B)[0]<0&&!unref(has)(unref(n).damage)?unref(_)(-unref(B)[0]):unref(_)(unref(B)[0])),1)])]),createBaseVNode("div",null,[createBaseVNode("span",null,"\u5F53\u524D\u4F24\u5BB3"+toDisplayString(unref(isMobile)?"":"\xA0\xA0\xA0\xA0"),1),createBaseVNode("span",null,toDisplayString(unref(_)(unref(B)[1])),1)])])])}}}),enemyCritical_vue_vue_type_style_index_0_scoped_10edff82_lang="",EnemyCritical=_export_sfc(_sfc_main$l,[["__scopeId","data-v-10edff82"]]),showMarkedEnemy=ref(!1),markedEnemy=reactive([]),markInfo={},criticalReached={},enemyDamageInfo={};function markEnemy$1(t){var e,i;hasMarkedEnemy(t)||(markedEnemy.push(t),markInfo[t]={nextCritical:(i=(e=core.nextCriticals(t,1)[0])==null?void 0:e[0])!=null?i:0+core.status.hero.atk},criticalReached[t]={0:!0},enemyDamageInfo[t]={1:!1,2:!1,3:!1},getMarkInfo(t,!0),checkMarkedEnemy(!0))}function hasMarkedEnemy(t){return markedEnemy.includes(t)}function unmarkEnemy(t){const e=markedEnemy.indexOf(t);e!==-1&&(markedEnemy.splice(e,1),checkMarkedEnemy())}function getMarkedEnemy(){return markedEnemy}function getMarkInfo(t,e=!1){var n;const i=criticalReached[t],s=markInfo[t];if(core.status.hero.atk>=s.nextCritical){!i[s.nextCritical]&&!e&&tip$1("success",`\u8E29\u5230\u4E86${core.material.enemys[t].name}\u7684\u4E34\u754C\uFF01`),i[s.nextCritical]=!0;const a=(n=core.nextCriticals(t,1,void 0,void 0,"empty")[0])==null?void 0:n[0],r=(a!=null?a:0)+core.status.hero.atk;s.nextCritical=r}}function checkMarkedEnemy(t=!1){checkMarkedStatus.value=!checkMarkedStatus.value;const e=core.status.hero.hp;getMarkedEnemy().forEach(i=>{var l,c;getMarkInfo(i);const s=(c=(l=core.getDamageInfo(i,void 0,void 0,void 0,"empty"))==null?void 0:l.damage)!=null?c:-1;if(s===-1)return;const n=enemyDamageInfo[i],a=core.material.enemys[i].name;let r=0;s<=0?t||tip$1("success",`${a}\u5DF2\u7ECF\u96F6\u4F24\u4E86\uFF01`):s<e/3?(!n[3]&&!t&&tip$1("success",`${a}\u7684\u4F24\u5BB3\u5DF2\u964D\u81F3\u52C7\u58EB\u751F\u547D\u503C\u76841/3\uFF01`),r=7):s<e/3*2?(!n[2]&&!t&&tip$1("success",`${a}\u7684\u4F24\u5BB3\u5DF2\u964D\u81F3\u52C7\u58EB\u751F\u547D\u503C\u76842/3\uFF01`),r=6):s<e&&(!n[1]&&!t&&tip$1("success",`\u4F60\u5DF2\u7ECF\u80FD\u6253\u8FC7${a}\u4E86\uFF01`),r=4),n[1]=n[2]=n[3]=!1,r&4&&(n[1]=!0),r&2&&(n[2]=!0),r&1&&(n[3]=!0)})}const checkMarkedStatus=ref(!1);function init$7(){return core.registerAction("onmove","mark",(t,e)=>(core.isPlaying()&&(flags.mouseLoc=[t,e]),!1),150),{checkMarkedEnemy,checkStatus:checkMarkedStatus,markEnemy:markEnemy$1,hasMarkedEnemy,unmarkEnemy,showMarkedEnemy}}const _withScopeId$8=t=>(pushScopeId("data-v-90e08ea9"),t=t(),popScopeId(),t),_hoisted_1$k={id:"enemy-target"},_hoisted_2$h={id:"enemy-desc"},_hoisted_3$h=_withScopeId$8(()=>createBaseVNode("span",null,"\u602A\u7269\u63CF\u8FF0",-1)),_hoisted_4$e={id:"mark-target"},_hoisted_5$c=["onClick"],_sfc_main$k=defineComponent({__name:"enemyTarget",setup(t){const e=core.plugin.bookDetailEnemy,i=ref(hasMarkedEnemy(e.id));function s(){i.value&&unmarkEnemy(e.id),i.value||markEnemy$1(e.id),i.value=!i.value}return(n,a)=>{const r=__unplugin_components_0;return openBlock(),createElementBlock("div",_hoisted_1$k,[createBaseVNode("div",_hoisted_2$h,[_hoisted_3$h,createVNode(Scroll,{id:"enemy-desc-scroll"},{default:withCtx(()=>[createBaseVNode("span",null,toDisplayString(unref(e).description),1)]),_:1})]),createVNode(r,{dashed:"",style:{"border-color":"#ddd4"}}),createBaseVNode("div",null,[createBaseVNode("div",_hoisted_4$e,[createBaseVNode("span",{id:"mark-info",style:normalizeStyle({color:i.value?"lightgreen":"lightcoral"})},toDisplayString(i.value?"\u5DF2\u6807\u8BB0\u8BE5\u602A\u7269":"\u672A\u6807\u8BB0\u8BE5\u602A\u7269"),5),createBaseVNode("span",{class:"button-text",onClick:withModifiers(s,["stop"])},toDisplayString(i.value?"\u53D6\u6D88\u6807\u8BB0\u8BE5\u602A\u7269":"\u6807\u8BB0\u8BE5\u602A\u7269\u4E3A\u76EE\u6807"),9,_hoisted_5$c)])])])}}}),enemyTarget_vue_vue_type_style_index_0_scoped_90e08ea9_lang="",EnemyTarget=_export_sfc(_sfc_main$k,[["__scopeId","data-v-90e08ea9"]]),_withScopeId$7=t=>(pushScopeId("data-v-c8f01fef"),t=t(),popScopeId(),t),_hoisted_1$j={id:"detail"},_hoisted_2$g={id:"detail-more"},_hoisted_3$g={key:0,id:"special-more",class:"detial-more"},_hoisted_4$d={key:1,id:"special-more",class:"detial-more"},_hoisted_5$b={key:2,id:"special-more",class:"detial-more"},_hoisted_6$a=_withScopeId$7(()=>createBaseVNode("span",null,null,-1)),_sfc_main$j=defineComponent({__name:"bookDetail",props:{fromBook:{type:Boolean},defaultPanel:null},emits:["close"],setup(t,{emit:e}){var u;const i=t,s=core.plugin.bookDetailEnemy,n=ref(core.plugin.bookDetailPos),a=ref((u=i.defaultPanel)!=null?u:"special");let r;function l(h,f){h.stopPropagation(),a.value=f}function c(){n.value=core.plugin.bookDetailPos,r.style.opacity="0",e("close")}function d(h){const f=keycode(h.keyCode);(f===KeyCode.Enter||f===KeyCode.Space||f===KeyCode.KeyC)&&c(),i.fromBook||(f===KeyCode.KeyX||f===KeyCode.Escape)&&c()}return onMounted(async()=>{n.value=0,r=document.getElementById("detail"),r.style.opacity="1";const h=getComputedStyle(r);let f=!1,g=[0,0];await S(600),useDrag(r,(m,_)=>{(m-g[0])**2+(_-g[1])**2>=100&&(f=!0)},(m,_)=>{g=[m,_],_>parseFloat(h.height)*4/5&&(f=!0)},()=>{f===!1&&a.value!=="critical"&&c(),f=!1}),document.addEventListener("keyup",d)}),onUnmounted(()=>{document.removeEventListener("keyup",d)}),(h,f)=>{const g=__unplugin_components_0;return openBlock(),createElementBlock("div",_hoisted_1$j,[createBaseVNode("div",{id:"info",style:normalizeStyle({top:`${n.value}px`})},[createVNode(EnemyOne,{enemy:unref(s)},null,8,["enemy"]),createVNode(g,{dashed:"",style:{margin:"2vh 0 2vh 0","border-color":"#ddd4",width:"100%"}})],4),createVNode(Transition,{name:"detail"},{default:withCtx(()=>[a.value==="special"?(openBlock(),createBlock(EnemySpecial,{key:0,"from-book":t.fromBook},null,8,["from-book"])):a.value==="critical"?(openBlock(),createBlock(EnemyCritical,{key:1,"from-book":t.fromBook},null,8,["from-book"])):a.value==="target"?(openBlock(),createBlock(EnemyTarget,{key:2})):createCommentVNode("",!0)]),_:1}),createBaseVNode("div",_hoisted_2$g,[createVNode(Transition,{name:"detail"},{default:withCtx(()=>[a.value==="special"?(openBlock(),createElementBlock("div",_hoisted_3$g,[createBaseVNode("span",{id:"enemy-target",class:"button-text more",onClick:f[0]||(f[0]=m=>l(m,"target"))},[createVNode(unref(LeftOutlined)),createTextVNode(" \u602A\u7269\u66F4\u591A\u4FE1\u606F")]),createBaseVNode("span",{id:"critical-more",class:"button-text more",onClick:f[1]||(f[1]=m=>l(m,"critical"))},[createTextVNode("\u8BE6\u7EC6\u4E34\u754C\u4FE1\u606F "),createVNode(unref(RightOutlined))])])):a.value==="critical"?(openBlock(),createElementBlock("div",_hoisted_4$d,[createBaseVNode("span",{id:"enemy-pos",class:"button-text more",onClick:f[2]||(f[2]=m=>l(m,"special"))},[createVNode(unref(LeftOutlined)),createTextVNode(" \u602A\u7269\u7279\u6B8A\u5C5E\u6027")])])):a.value==="target"?(openBlock(),createElementBlock("div",_hoisted_5$b,[_hoisted_6$a,createBaseVNode("span",{id:"enemy-pos",class:"button-text more",onClick:f[3]||(f[3]=m=>l(m,"special"))},[createTextVNode("\u602A\u7269\u7279\u6B8A\u5C5E\u6027 "),createVNode(unref(RightOutlined))])])):createCommentVNode("",!0)]),_:1})])])}}}),bookDetail_vue_vue_type_style_index_0_scoped_c8f01fef_lang="",BookDetail=_export_sfc(_sfc_main$j,[["__scopeId","data-v-c8f01fef"]]),_withScopeId$6=t=>(pushScopeId("data-v-84294ce9"),t=t(),popScopeId(),t),_hoisted_1$i={id:"book"},_hoisted_2$f={id:"tools"},_hoisted_3$f={key:0,id:"none"},_hoisted_4$c=_withScopeId$6(()=>createBaseVNode("div",null,"\u672C\u5C42\u65E0\u602A\u7269",-1)),_hoisted_5$a=[_hoisted_4$c],_hoisted_6$9={class:"enemy"},_sfc_main$i=defineComponent({__name:"book",setup(t){var _,w,B;const e=(B=core.floorIds[(w=(_=core.status.event)==null?void 0:_.ui)==null?void 0:w.index])!=null?B:core.status.floorId;e!==core.status.floorId&&core.status.checkBlock&&(core.status.checkBlock.cache={});const i=core.getCurrentEnemys(e),s=ref(0),n=ref(!1),a=ref(!1),r=ref(0);i.forEach(D=>{const P=D.specialText.length;D.toShowSpecial=lodash.exports.cloneDeep(D.specialText),D.toShowColor=lodash.exports.cloneDeep(D.specialColor),P>=3&&(D.toShowSpecial=D.specialText.slice(0,2).concat(["..."]),D.toShowColor=D.specialColor.slice(0,2).concat(["#fff"])),D.toShowColor=D.toShowColor.map(H=>typeof H=="string"?H:core.arrayToRGBA(H)),D.damageColor=getDamageColor(D.damage)});function l(D,P){if(n.value)return;const H=window.innerHeight,N=P*H*.2-s.value;core.plugin.bookDetailEnemy=D,core.plugin.bookDetailPos=N,a.value=!0,c()}async function c(){const D=document.getElementById("book");D.style.opacity="0",await S(600),D.style.display="none"}async function d(){u(),await S(600),a.value=!1}async function u(){const D=document.getElementById("book");D.style.display="flex",await S(50),D.style.opacity="1"}async function h(){noClosePanel.value=!0,core.plugin.bookOpened.value=!1,core.plugin.transition.value?await S(650):await S(100),!core.events.recoverEvents(core.status.event.interval)&&(has(core.status.event.ui)?(core.status.boxAnimateObjs=[],core.ui._drawViewMaps(core.status.event.ui)):core.ui.closePanel())}function f(){const D=window.innerHeight,P=r.value*D*.2-s.value;P<0&&(s.value+=P-20),P>D*.655&&(s.value+=P-D*.655+20)}function g(D){const P=keycode(D.keyCode);(P===KeyCode.KeyX||P===KeyCode.Escape)&&h(),P===KeyCode.Enter&&!a.value&&l(i[r.value],r.value)}function m(D){const P=keycode(D.keyCode);a.value||(P===KeyCode.DownArrow&&(r.value<i.length-1&&r.value++,f()),P===KeyCode.UpArrow&&(r.value>0&&r.value--,f()),(P===KeyCode.LeftArrow||P===KeyCode.PageUp)&&(r.value<=4?r.value=0:r.value-=5,f()),(P===KeyCode.RightArrow||P===KeyCode.PageDown)&&(r.value>=i.length-5?r.value=i.length-1:r.value+=5,f()))}return onMounted(async()=>{core.plugin.transition.value?await S(600):await S(50),document.addEventListener("keyup",g),document.addEventListener("keydown",m)}),onUnmounted(async()=>{document.removeEventListener("keyup",g),document.removeEventListener("keydown",m)}),(D,P)=>{const H=__unplugin_components_0;return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",_hoisted_1$i,[createBaseVNode("div",_hoisted_2$f,[createBaseVNode("span",{id:"back",class:"button-text tools",onClick:h},[createVNode(unref(LeftOutlined)),createTextVNode("\u8FD4\u56DE\u6E38\u620F")])]),unref(i).length===0?(openBlock(),createElementBlock("div",_hoisted_3$f,_hoisted_5$a)):(openBlock(),createBlock(Scroll,{key:1,style:{width:"100%",height:"94%","font-family":"normal"},now:s.value,"onUpdate:now":P[0]||(P[0]=N=>s.value=N),drag:n.value,"onUpdate:drag":P[1]||(P[1]=N=>n.value=N)},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(i),(N,W)=>(openBlock(),createElementBlock("div",_hoisted_6$9,[(openBlock(),createBlock(EnemyOne,{selected:W===r.value,enemy:N,key:W,onSelect:L=>l(N,W),onHover:L=>r.value=W},null,8,["selected","enemy","onSelect","onHover"])),createVNode(H,{dashed:"",style:{width:"100%","border-color":"#ddd4"}})]))),256))]),_:1},8,["now","drag"]))]),a.value?(openBlock(),createBlock(BookDetail,{key:0,"from-book":!0,onClose:P[2]||(P[2]=N=>d())})):createCommentVNode("",!0)],64)}}}),book_vue_vue_type_style_index_0_scoped_84294ce9_lang="",Book=_export_sfc(_sfc_main$i,[["__scopeId","data-v-84294ce9"]]),clsMap={tools:"\u6D88\u8017\u9053\u5177",constants:"\u6C38\u4E45\u9053\u5177",all:"\u5168\u90E8\u9053\u5177"};function getClsName(t){return clsMap[t]}function getItems(t){const e=core.status.hero.items,i=["book"];if(t==="all")return{tools:Object.entries(e.tools).filter(a=>!i.includes(a[0])),constants:Object.entries(e.constants).filter(a=>!i.includes(a[0]))};const s=e[t];return Object.entries(s)}const _withScopeId$5=t=>(pushScopeId("data-v-88c6bbe5"),t=t(),popScopeId(),t),_hoisted_1$h={id:"toolbox"},_hoisted_2$e={id:"tools"},_hoisted_3$e={id:"toolbox-main"},_hoisted_4$b={class:"item-main"},_hoisted_5$9={class:"item-info"},_hoisted_6$8={key:0,class:"item-type"},_hoisted_7$8={key:1,id:"item-type-mobile"},_hoisted_8$7=["selected"],_hoisted_9$7=["selected"],_hoisted_10$7=["selected","onClick"],_hoisted_11$7={class:"item-icon"},_hoisted_12$5={class:"item-name"},_hoisted_13$5={id:"detail"},_hoisted_14$5={id:"info"},_hoisted_15$4={id:"basic-info"},_hoisted_16$4={style:{"border-bottom":"1px solid #ddd4"}},_hoisted_17$3=_withScopeId$5(()=>createBaseVNode("span",{style:{"margin-top":"2vh"}},"\u70B9\u51FB\u8BE5\u7269\u54C1\u4EE5\u4F7F\u7528",-1)),_hoisted_18$3={id:"desc"},_hoisted_19$3=_withScopeId$5(()=>createBaseVNode("span",null,"\u9053\u5177\u63CF\u8FF0",-1)),_hoisted_20$3={key:0},_hoisted_21$3=["innerHTML"],_sfc_main$h=defineComponent({__name:"toolbox",setup(t){var m,_;const e=ref("tools"),i=getItems("all"),s=computed(()=>isMobile?[e.value]:["tools","constants"]),n=core.material.items,a=ref((_=(m=i[s.value[0]][0])==null?void 0:m[0])!=null?_:"none"),r=ref(0);watch(r,w=>{c(i[e.value][w][0],!0)}),watch(e,w=>{if(!has(i[w][r.value])){a.value="none";return}c(i[w][r.value][0],!0)});const l=computed(()=>{const w=a.value;return w==="none"?ref("\u6CA1\u6709\u9009\u62E9\u9053\u5177"):type(n[w].text,25,C("sin","out"),!0)});async function c(w,B=!1){a.value===w&&!B&&u(w),r.value=i[e.value].findIndex(D=>D[0]===w),a.value=w}function d(){core.plugin.toolOpened.value=!1}async function u(w){if(w!=="none")if(core.canUseItem(w)){const B=core.plugin.transition.value;core.plugin.transition.value=!1,d(),await S(50),core.useItem(w),core.plugin.transition.value=B}else message.warn({content:"\u5F53\u524D\u65E0\u6CD5\u4F7F\u7528\u8BE5\u9053\u5177\uFF01",class:"antdv-message"})}async function h(){const w=core.plugin.transition.value;core.plugin.transition.value=!1,d(),await S(50),core.plugin.equipOpened.value=!0,core.plugin.transition.value=w}function f(w){const B=keycode(w.keyCode);(B===KeyCode.Escape||B===KeyCode.KeyX||B===KeyCode.KeyT)&&d(),(B===KeyCode.Enter||B===KeyCode.KeyC)&&u(a.value)}function g(w){const B=keycode(w.keyCode),D=i[e.value].length;if(B===KeyCode.DownArrow&&r.value<D-1&&r.value++,B===KeyCode.UpArrow&&r.value>0&&r.value--,B===KeyCode.RightArrow){const P=i.constants.length;e.value==="tools"&&(r.value>=P&&(r.value=P-1),e.value="constants")}if(B===KeyCode.LeftArrow){const P=i.tools.length;e.value==="constants"&&(r.value>=P&&(r.value=P-1),e.value="tools")}}return onMounted(async()=>{core.plugin.transition.value?await S(600):await S(50),document.addEventListener("keyup",f),document.addEventListener("keydown",g)}),onUnmounted(()=>{document.removeEventListener("keyup",f),document.removeEventListener("keydown",g)}),(w,B)=>{var P;const D=__unplugin_components_0;return openBlock(),createElementBlock("div",_hoisted_1$h,[createBaseVNode("div",_hoisted_2$e,[createBaseVNode("span",{class:"button-text tools",onClick:d},[createVNode(unref(LeftOutlined)),createTextVNode(" \u8FD4\u56DE\u6E38\u620F")]),createBaseVNode("span",{class:"button-text tools",onClick:h},[createTextVNode("\u88C5\u5907\u680F "),createVNode(unref(RightOutlined))])]),createBaseVNode("div",_hoisted_3$e,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(s),H=>(openBlock(),createElementBlock("div",_hoisted_4$b,[createBaseVNode("div",_hoisted_5$9,[unref(isMobile)?(openBlock(),createElementBlock("div",_hoisted_7$8,[createBaseVNode("span",{class:"button-text",onClick:B[0]||(B[0]=N=>e.value="tools"),selected:e.value==="tools"},"\u6D88\u8017\u9053\u5177",8,_hoisted_8$7),createVNode(D,{dashed:"",style:{"border-color":"#ddd4",height:"100%"},type:"vertical"}),createBaseVNode("span",{class:"button-text",onClick:B[1]||(B[1]=N=>e.value="constants"),selected:e.value==="constants"},"\u6C38\u4E45\u9053\u5177",8,_hoisted_9$7)])):(openBlock(),createElementBlock("div",_hoisted_6$8,toDisplayString(unref(getClsName)(H)),1)),createVNode(D,{dashed:"",style:{margin:"1vh 0 1vh 0","border-color":"#ddd4"}}),createVNode(Scroll,{class:"item-list"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(i)[H],([N,W])=>(openBlock(),createElementBlock("div",{class:"item selectable",selected:a.value===N,onClick:L=>{e.value=H,c(N)}},[createBaseVNode("div",_hoisted_11$7,[createVNode(_sfc_main$p,{id:N,width:32,height:32,noborder:!0},null,8,["id"]),createBaseVNode("span",_hoisted_12$5,toDisplayString(unref(n)[N].name),1)]),createBaseVNode("span",null,"\xD7\xA0"+toDisplayString(W),1)],8,_hoisted_10$7))),256))]),_:2},1024)]),createVNode(D,{dashed:"",type:unref(isMobile)?"horizontal":"vertical",class:"divider",style:{"border-color":"#ddd4",margin:"1%"}},null,8,["type"])]))),256)),createBaseVNode("div",_hoisted_13$5,[createBaseVNode("div",_hoisted_14$5,[createVNode(_sfc_main$p,{id:a.value,width:32,height:32},null,8,["id"]),createBaseVNode("div",_hoisted_15$4,[createBaseVNode("span",_hoisted_16$4,toDisplayString(a.value==="none"?"\u6CA1\u6709\u9053\u5177":unref(n)[a.value].name),1),createBaseVNode("span",null,toDisplayString(a.value==="none"?"\u6C38\u4E45\u9053\u5177":(P=unref(getClsName)(unref(n)[a.value].cls))!=null?P:"\u6C38\u4E45\u9053\u5177"),1)])]),_hoisted_17$3,createVNode(D,{dashed:"",style:{"border-color":"#ddd4"}}),createBaseVNode("div",_hoisted_18$3,[_hoisted_19$3,createVNode(Scroll,{id:"desc-text"},{default:withCtx(()=>[unref(l).value.startsWith("!!html")?(openBlock(),createElementBlock("div",{key:1,innerHTML:unref(l).value.slice(6)},null,8,_hoisted_21$3)):(openBlock(),createElementBlock("div",_hoisted_20$3,toDisplayString(unref(l).value),1))]),_:1})])])])])}}}),toolbox_vue_vue_type_style_index_0_scoped_88c6bbe5_lang="",Toolbox=_export_sfc(_sfc_main$h,[["__scopeId","data-v-88c6bbe5"]]),index$2="",index$1="";function getEquips(){return Object.entries(core.status.hero.items.equips)}function getAddStatus(t){const e=Object.assign({},t.value,t.percentage),i=Object.keys(e);return createVNode("div",{class:"equip-add-detail"},[i.map(s=>{var a,r;const n=Math.floor(((a=t.value[s])!=null?a:0)*core.getBuff(s)+core.status.hero[s]*((r=t.percentage[s])!=null?r:0)/100);return createVNode("span",{style:"display: flex"},[createVNode("span",{style:"flex-basis: 50%"},[core.getStatusLabel(s)]),createTextVNode("\xA0\xA0\xA0\xA0"),createVNode("span",{style:{color:n>0?"lightgreen":"lightsalmon"}},[n>0?`+${n}`:n])])})])}function getNowStatus(t,e=!1){return createVNode("div",{id:"hero-status"},[["hp","lv","atk","def","mdef","mana","hpmax","money"].map(s=>{var r,l,c;let n;s==="lv"?n=(r=core.getLvName())!=null?r:"":n=(l=core.getRealStatus(s))==null?void 0:l.toString();let a=0;if(has(t)){a+=Math.floor(((c=t.value[s])!=null?c:0)*core.getBuff(s));const d=Math.floor(t.percentage[s]*core.getStatus(s)/100);a+=isNaN(d)?0:d}return e&&(a=-a),createVNode("div",{class:"hero-status-one"},[createVNode("span",{class:"hero-status-label"},[core.getStatusLabel(s)]),createVNode("div",{class:"hero-status-value"},[createVNode("span",{style:"margin-right: 20%"},[n]),a!==0&&createVNode("span",{style:{color:a>0?"lightgreen":"lightsalmon"}},[a>0?"+"+a:"-"+-a])])])})])}const _hoisted_1$g={id:"equipbox"},_hoisted_2$d={id:"tools"},_hoisted_3$d={id:"equipbox-main"},_hoisted_4$a={id:"equip-list"},_hoisted_5$8={id:"filter"},_hoisted_6$7={key:0},_hoisted_7$7={key:1},_hoisted_8$6=["selected","onMousedown","onTouchstart","onClick"],_hoisted_9$6={class:"equip-icon"},_hoisted_10$6={class:"equip-name"},_hoisted_11$6={id:"equip-status"},_hoisted_12$4={id:"equip-status-main"},_hoisted_13$4={id:"equip-now"},_hoisted_14$4={id:"equip-now-div"},_hoisted_15$3=["draged","access","selected","onMouseenter","onClick"],_hoisted_16$3={key:0,id:"equip-hero"},_hoisted_17$2={id:"hero-icon"},_hoisted_18$2={id:"hero-status"},_hoisted_19$2={id:"equip-desc"},_hoisted_20$2={id:"equip-icon"},_hoisted_21$2={id:"equip-type"},_hoisted_22$2={id:"equip-add"},_hoisted_23$2={id:"equip-desc-text"},_hoisted_24$2={key:0},_hoisted_25$1=["innerHTML"],_hoisted_26$1={id:"icon-drag"},_sfc_main$g=defineComponent({__name:"equipbox",setup(t){const e=ref(getEquips()),i=ref("all"),s=core.material.items,n=ref(0),a=ref(!1),r=core.status.globalAttribute.equipName,l=ref(core.status.hero.equipment),c=ref(!1),d=ref(!1),u=ref(-1),h=ref("down"),f=ref("none"),g=ref("value"),m=["none","atk","def","hpmax","mana"],_=core.getStatusLabel;watch(h,ie=>{n.value=H.value.length-n.value-1}),watch(f,ie=>{n.value=0}),watch(g,ie=>{n.value=0});const w=computed(()=>{const ie=H.value[n.value],ee={name:"\u6CA1\u6709\u9009\u62E9\u88C5\u5907",cls:"equip",text:"\u6CA1\u6709\u9009\u62E9\u88C5\u5907",equip:{type:"\u65E0",value:{},percentage:{},animate:""}};if(a.value){const le=l.value[n.value],he=core.material.items[le];return has(he)?he:ee}return has(ie)?s[ie[0]]:ee}),B=computed(()=>getAddStatus(w.value.equip,a.value)),D=computed(()=>w.value.text.startsWith("!!html")?ref(w.value.text):type(w.value.text,25,C("sin","out"),!0)),P=computed(()=>getNowStatus(w.value.equip,a.value)),H=computed(()=>{const ie=h.value,ee=f.value,le=g.value,he=e.value.filter(pe=>{const me=s[pe[0]].equip,ue=me.type;return ee!=="none"&&!has(me[le][ee])?!1:i.value==="all"?!0:typeof ue=="string"?ue===i.value:core.status.globalAttribute.equipName[ue]===i.value});return ee==="none"?he:ie==="down"?he.sort((pe,me)=>{const ue=s[pe[0]].equip,be=s[me[0]].equip;return ue[le][ee]-be[le][ee]}):he.sort((pe,me)=>{const ue=s[pe[0]].equip;return s[me[0]].equip[le][ee]-ue[le][ee]})});function N(){h.value==="down"?h.value="up":h.value="down"}function W(){core.plugin.equipOpened.value=!1}function L(ie){var ee;if(ie===n.value&&c.value){const le=(ee=H.value[n.value])==null?void 0:ee[0];if(!core.canEquip(le)){tip$1("warn","\u65E0\u6CD5\u88C5\u5907\uFF01");return}core.loadEquip(le),Y(),c.value=!1}c.value=!0}function U(ie,ee=!1){ie!==n.value&&!ee&&(c.value=!1),ee&&(c.value=!1),ee&&a.value===ee&&n.value===ie&&(core.unloadEquip(ie),Y()),a.value=ee,n.value=ie}function K(ie){var le,he;if(ie<0)return!1;const ee=(le=w.value.equip)==null?void 0:le.type;return!core.canEquip((he=H.value[n.value])==null?void 0:he[0])||!has(ee)?!1:typeof ee=="number"?ie===ee:r[ie]===ee}function X(){var he;const ie=u.value;if(ie<0)return;if(!K(ie)){tip$1("warn","\u65E0\u6CD5\u88C5\u5907\uFF01");return}const ee=l.value[ie],le=(he=H.value[n.value])==null?void 0:he[0];core.items._realLoadEquip(ie,le,ee),Y()}function Y(){l.value=core.status.hero.equipment,e.value=getEquips()}function J(){const ie=Array.from(document.querySelectorAll(".equip"));useDrag(ie,se,(ee,le)=>{oe=ee,de=le},()=>{d.value&&(d.value=!1,X())},!0)}let[oe,de]=[0,0];function se(ie,ee,le){if((ie-oe)**2+(ee-de)**2>10**2&&!d.value&&(d.value=!0),d.value){const he=document.getElementById("icon-drag");he.style.left=`${ie-24}px`,he.style.top=`${ee-24}px`}}function re(ie,ee){ie.stopPropagation(),u.value=ee}function ae(ie){ie.stopPropagation(),u.value=-1}async function ge(){const ie=core.plugin.transition.value;core.plugin.transition.value=!1,W(),await S(50),core.plugin.toolOpened.value=!0,core.plugin.transition.value=ie}function fe(ie){const ee=keycode(ie.keyCode);(ee===KeyCode.KeyQ||ee===KeyCode.KeyX||ee===KeyCode.Escape)&&W()}return watch(H,ie=>{J()}),onMounted(async()=>{J(),core.plugin.transition.value?await S(600):await S(50),document.addEventListener("keyup",fe)}),onUnmounted(()=>{cancelGlobalDrag(se),document.removeEventListener("keyup",fe)}),(ie,ee)=>{var me,ue,be,we,Be,xe;const le=SelectOption,he=__unplugin_components_1,pe=__unplugin_components_0;return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",_hoisted_1$g,[createBaseVNode("div",_hoisted_2$d,[createBaseVNode("span",{class:"button-text tools",onClick:W},[createVNode(unref(LeftOutlined)),createTextVNode(" \u8FD4\u56DE\u6E38\u620F")]),createBaseVNode("span",{class:"button-text tools",onClick:ge},[createTextVNode("\u9053\u5177\u680F "),createVNode(unref(RightOutlined))])]),createBaseVNode("div",_hoisted_3$d,[createBaseVNode("div",_hoisted_4$a,[createBaseVNode("div",_hoisted_5$8,[createVNode(he,{value:f.value,"onUpdate:value":ee[0]||(ee[0]=_e=>f.value=_e),class:"select"},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(m,_e=>createVNode(le,{value:_e},{default:withCtx(()=>[createTextVNode(toDisplayString(_e==="none"?"\u6240\u6709":unref(_)(_e)),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"]),createVNode(pe,{type:"vertical",class:"divider"}),createVNode(he,{value:g.value,"onUpdate:value":ee[1]||(ee[1]=_e=>g.value=_e),class:"select"},{default:withCtx(()=>[createVNode(le,{value:"value"},{default:withCtx(()=>[createTextVNode("\u6570\u503C")]),_:1}),createVNode(le,{value:"percentage"},{default:withCtx(()=>[createTextVNode("\u767E\u5206\u6BD4")]),_:1})]),_:1},8,["value"]),createVNode(pe,{type:"vertical",class:"divider"}),createBaseVNode("span",{onClick:ee[2]||(ee[2]=_e=>N()),class:"button-text",id:"sort-type"},[h.value==="down"?(openBlock(),createElementBlock("span",_hoisted_6$7,[createVNode(unref(SortAscendingOutlined))])):(openBlock(),createElementBlock("span",_hoisted_7$7,[createVNode(unref(SortDescendingOutlined))]))])]),createVNode(pe,{dashed:"",style:{"border-color":"#ddd4",margin:"1vh 0 1vh 0"}}),createVNode(Scroll,{id:"equip-scroll"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(H),([_e,ve],ke)=>(openBlock(),createElementBlock("div",{class:"equip selectable",selected:n.value===ke&&!a.value,onMousedown:Ae=>U(ke),onTouchstart:Ae=>U(ke),onClick:Ae=>L(ke)},[createBaseVNode("div",_hoisted_9$6,[createVNode(_sfc_main$p,{id:_e!=null?_e:"none",width:32,height:32,noborder:!0},null,8,["id"]),createBaseVNode("span",_hoisted_10$6,toDisplayString(unref(s)[_e].name),1)]),createBaseVNode("span",null,"\xD7\xA0"+toDisplayString(ve),1)],40,_hoisted_8$6))),256))]),_:1})]),createBaseVNode("div",_hoisted_11$6,[createVNode(pe,{class:"divider",type:unref(isMobile)?"horizontal":"vertical",dashed:"",style:{"border-color":"#ddd4"}},null,8,["type"]),createBaseVNode("div",_hoisted_12$4,[createBaseVNode("div",_hoisted_13$4,[createVNode(Scroll,{style:normalizeStyle({height:unref(isMobile)?"10vh":"30vh"})},{default:withCtx(()=>[createBaseVNode("div",_hoisted_14$4,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(r),(_e,ve)=>{var ke;return openBlock(),createElementBlock("div",{class:"equip-now-one draginable selectable",draged:d.value,access:K(ve),selected:a.value&&n.value===ve,onMouseenter:Ae=>re(Ae,ve),onMouseleave:ae,onClick:Ae=>U(ve,!0)},[createVNode(_sfc_main$p,{id:(ke=l.value[ve])!=null?ke:"none"},null,8,["id"]),createBaseVNode("span",null,toDisplayString(_e),1)],40,_hoisted_15$3)}),256))])]),_:1},8,["style"])]),createVNode(pe,{dashed:"",style:{"border-color":"#ddd4",margin:"1vh 0 1vh 0"}}),unref(isMobile)?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_16$3,[createBaseVNode("div",_hoisted_17$2,[createVNode(_sfc_main$p,{id:"hero",width:48,height:64,noborder:""})]),createBaseVNode("div",_hoisted_18$2,[(openBlock(),createBlock(resolveDynamicComponent(unref(P))))])]))]),unref(isMobile)?createCommentVNode("",!0):(openBlock(),createBlock(pe,{key:0,class:"divider",type:"vertical",dashed:"",style:{"border-color":"#ddd4"}}))]),createBaseVNode("div",_hoisted_19$2,[createBaseVNode("div",_hoisted_20$2,[createVNode(_sfc_main$p,{id:a.value?(me=l.value[n.value])!=null?me:"none":(be=(ue=unref(H)[n.value])==null?void 0:ue[0])!=null?be:"none"},null,8,["id"]),createBaseVNode("span",null,toDisplayString(unref(w).name),1)]),createBaseVNode("div",_hoisted_21$2,[createBaseVNode("span",null,"\u88C5\u5907\u5B54\uFF1A"+toDisplayString((we=unref(w).equip)==null?void 0:we.type),1)]),createVNode(pe,{dashed:"",style:{"border-color":"#ddd4",margin:"1vh 0 1vh 0"}}),createBaseVNode("div",_hoisted_22$2,[createBaseVNode("span",{style:normalizeStyle({"font-size":unref(isMobile)?"3.8vw":"3vh"}),id:"title"},"\u589E\u51CF\u5C5E\u6027",4),createVNode(Scroll,{style:{width:"100%",height:"100%"}},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(B))))]),_:1})]),createVNode(pe,{dashed:"",style:{"border-color":"#ddd4",margin:"1vh 0 1vh 0"}}),createBaseVNode("div",_hoisted_23$2,[createBaseVNode("span",{style:normalizeStyle({"font-size":unref(isMobile)?"3.8vw":"3vh"}),id:"title"},"\u88C5\u5907\u4ECB\u7ECD",4),createVNode(Scroll,{id:"desc-text",style:{height:"100%",width:"100%"}},{default:withCtx(()=>[unref(D).value.startsWith("!!html")?(openBlock(),createElementBlock("div",{key:1,innerHTML:unref(D).value.slice(6)},null,8,_hoisted_25$1)):(openBlock(),createElementBlock("div",_hoisted_24$2,toDisplayString(unref(D).value),1))]),_:1})])])])]),createBaseVNode("div",_hoisted_26$1,[d.value?(openBlock(),createBlock(_sfc_main$p,{key:0,class:"drag-icon",id:(xe=(Be=unref(H)[n.value])==null?void 0:Be[0])!=null?xe:"none",width:48,height:48,noborder:""},null,8,["id"])):createCommentVNode("",!0)])],64)}}}),equipbox_vue_vue_type_style_index_0_scoped_4fac9519_lang="",Equipbox=_export_sfc(_sfc_main$g,[["__scopeId","data-v-4fac9519"]]),transition$2=ref(!1),itemDetail$1=ref(!0),autoSkill$1=ref(!0),autoScale$1=ref(!0),showHalo$1=ref(!0),showStudied$1=ref(!0),useFixed$1=ref(!0),autoLocate$1=ref(!0),antiAliasing$1=ref(!0);watch(transition$2,t=>{core.plugin.transition.value=t,core.setLocalStorage("transition",t)});watch(itemDetail$1,t=>{flags.itemDetail=t,core.updateStatusBar()});watch(autoSkill$1,t=>{flags.autoSkill=t,core.updateStatusBar(),core.status.route.push(`set:autoSkill:${t}`)});watch(autoScale$1,t=>{core.setLocalStorage("autoScale",t)});watch(showStudied$1,t=>{core.setLocalStorage("showStudied",t)});watch(showHalo$1,t=>{core.setLocalStorage("showHalo",t)});watch(useFixed$1,t=>{core.setLocalStorage("useFixed",t)});watch(autoSkill$1,t=>{flags.autoLocate=t,core.updateStatusBar(),core.status.route.push(`set:autoLocate:${t}`)});watch(antiAliasing$1,t=>{core.setLocalStorage("antiAliasing",t);for(const e of core.dom.gameCanvas)core.domStyle.hdCanvas.includes(e.id)||(t?e.classList.remove("no-anti-aliasing"):e.classList.add("no-anti-aliasing"))});function reset(){const t=core.getLocalStorage("transition",!1);transition$2.value=t,core.plugin.transition.value=transition$2.value,autoScale$1.value=core.getLocalStorage("autoScale",!0),showStudied$1.value=core.getLocalStorage("showStudied",!0),showHalo$1.value=core.getLocalStorage("showHalo",!0),antiAliasing$1.value=core.getLocalStorage("antiAliasing",!1)}function resetFlag(){var t,e,i;(t=flags.autoSkill)!=null||(flags.autoSkill=!0),(e=flags.itemDetail)!=null||(flags.itemDetail=!0),(i=flags.autoLocate)!=null||(flags.autoLocate=!0),itemDetail$1.value=!!flags.itemDetail,autoSkill$1.value=!!flags.autoSkill,autoLocate$1.value=!!flags.autoLocate}function init$6(){return{resetSettings:reset,resetFlagSettings:resetFlag}}const transition$1={text:"\u754C\u9762\u52A8\u753B",desc:["\u662F\u5426\u5C55\u793A\u5F53\u4E00\u4E2Aui\u754C\u9762\uFF0C\u5982\u602A\u7269\u624B\u518C\u7B49\u7684\u6253\u5F00\u4E0E\u5173\u95ED\u65F6\u7684\u52A8\u753B\u3002\u5F53\u6B64\u9879\u5F00\u542F\u65F6\uFF0C","\u6240\u6709\u754C\u9762\u88AB\u6253\u5F00\u6216\u5173\u95ED\u65F6\u90FD\u4F1A\u5C55\u793A\u52A8\u753B\uFF0C\u5426\u5219\u4F1A\u76F4\u63A5\u5C55\u793A\u51FA\u6765"]},itemDetail={text:"\u5B9D\u77F3\u8840\u74F6\u663E\u4F24",desc:["\u662F\u5426\u5728\u5730\u56FE\u4E0A\u663E\u793A\u5B9D\u77F3\u8840\u74F6\u88C5\u5907\u7B49\u589E\u52A0\u7684\u5C5E\u6027\u503C"]},autoSkill={text:"\u81EA\u52A8\u5207\u6362\u6280\u80FD",desc:["\u5F00\u542F\u540E\uFF0C\u6253\u602A\u7269\u7684\u65F6\u5019\u4F1A\u81EA\u52A8\u9009\u62E9\u4F24\u5BB3\u6700\u4F4E\u7684\u6280\u80FD\u3002\u540C\u65F6\u663E\u4F24\u4E5F\u4F1A\u663E\u793A\u6B64\u72B6\u6001\u4E0B\u7684\u4F24\u5BB3\uFF0C","\u4E34\u754C\u4E5F\u4F1A\u8003\u8651\u6280\u80FD\u5728\u5185"]},autoScale={text:"\u81EA\u52A8\u653E\u7F29",desc:["\u5F00\u542F\u540E\uFF0C\u6BCF\u6B21\u8FDB\u5165\u6E38\u620F\u65F6\u4F1A\u81EA\u52A8\u7F29\u653E\u6E38\u620F\u753B\u9762\u81F3\u5408\u9002\u503C\u3002\u8BE5\u9879\u53EA\u5BF9\u7535\u8111\u7AEF\u6709\u6548\u3002","<br>","<br>","\u7F29\u653E\u539F\u5219\u5982\u4E0B\uFF1A","<br>","1. \u9996\u5148\u5C1D\u8BD5\u7F29\u653E\u81F3\u6700\u5927\u7F29\u653E\u6BD4\u4F8B","<br>","2. \u5982\u679C\u7F29\u653E\u540E\u6E38\u620F\u753B\u9762\u9AD8\u5EA6\u9AD8\u4E8E\u9875\u9762\u9AD8\u5EA6\u768495%\uFF0C\u90A3\u4E48\u7F29\u5C0F\u4E00\u4E2A\u7F29\u653E\u6BD4\u4F8B\uFF0C\u5426\u5219\u4FDD\u6301\u6700\u5927\u6BD4\u4F8B"]},showHalo={text:"\u5C55\u793A\u8303\u56F4\u5149\u73AF",desc:["\u5F00\u542F\u540E\uFF0C\u4F1A\u5728\u5730\u56FE\u4E0A\u663E\u793A\u8303\u56F4\u5149\u73AF\u3002"]},useFixed={text:"\u79FB\u52A8\u9F20\u6807\u663E\u793A\u602A\u7269\u4FE1\u606F",desc:["\u5F00\u542F\u540E\uFF0C\u5F53\u9F20\u6807\u79FB\u52A8\u5230\u602A\u7269\u4E0A\u65F6\uFF0C\u4F1A\u4EE5\u76D2\u5B50\u7684\u5F62\u5F0F\u5C55\u793A\u8BE5\u70B9\u7684\u602A\u7269\u4FE1\u606F\u3002\u624B\u673A\u7AEF\u6B64\u529F\u80FD\u65E0\u6548\u3002","<br>","<br>","\u6CE8\uFF1A\u5F53\u9F20\u6807\u79FB\u52A8\u5230\u602A\u7269\u4E0A\u65F6\uFF0C\u7ECF\u8FC7200\u6BEB\u79D2\u624D\u4F1A\u663E\u793A\u4FE1\u606F\uFF0C\u9632\u6B62\u8BEF\u64CD\u4F5C\u3002"]},autoLocate={text:"\u81EA\u52A8\u52C7\u58EB\u5B9A\u4F4D",desc:["\u6B64\u9879\u4F1A\u5728\u8FDB\u5165\u7B2C\u4E8C\u7AE0\u540E\u4F1A\u8D77\u4F5C\u7528\u3002\u5F00\u542F\u540E\uFF0C\u5F53\u52C7\u58EB\u5904\u4E8E\u4E0D\u540C\u4F4D\u7F6E\u6253\u540C\u4E00\u4E2A\u602A\u7269\u4F24\u5BB3\u4E0D\u540C\u65F6\uFF0C\u5728\u5730\u56FE\u4E0A\u4F7F\u7528\u7EFF\u8272\u7BAD\u5934\u6807\u51FA\u4F24\u5BB3\u6700\u4F4E\u7684\u4F4D\u7F6E\uFF0C","\u5176\u4F59\u65B9\u5411\uFF0C\u4F24\u5BB3\u8D8A\u9AD8\uFF0C\u7BAD\u5934\u989C\u8272\u8D8A\u7EA2\uFF0C\u540C\u65F6\u5728\u81EA\u52A8\u5BFB\u8DEF\u4E2D\u9009\u62E9\u53EF\u4EE5\u5230\u8FBE\u7684\u4F24\u5BB3\u6700\u4F4E\u7684\u4F4D\u7F6E\u3002","<br>","<br>","\u6CE8\uFF1A\u5982\u679C\u51FA\u73B0\u660E\u663E\u5361\u987F\u73B0\u8C61\u53EF\u4EE5\u8003\u8651\u5173\u95ED\u672C\u8BBE\u7F6E\u6216\u81EA\u52A8\u5207\u6362\u6280\u80FD\u8BBE\u7F6E\u3002"]},antiAliasing={text:"\u6297\u952F\u9F7F",desc:["\u662F\u5426\u5F00\u542F\u6297\u952F\u9F7F\u3002\u5F00\u542F\u540E\uFF0C\u753B\u9762\u4F1A\u53D8\u5F97\u4E0D\u90A3\u4E48\u9510\u5229\uFF0C\u89C2\u611F\u66F4\u52A0\u8212\u9002\uFF1B\u5173\u95ED\u540E\uFF0C\u53EF\u4EE5\u66F4\u597D\u5730\u5C55\u73B0\u51FA\u50CF\u7D20\u611F\uFF0C\u540C\u65F6\u90E8\u5206\u50CF\u7D20\u9519\u8BEF\u4E5F\u4E0D\u4F1A\u51FA\u73B0\u3002"]},showStudied={text:"\u5C55\u793A\u5DF2\u5B66\u4E60\u6280\u80FD",desc:["\u5F00\u542F\u540E\uFF0C\u4F1A\u5728\u753B\u9762\u5185\u4EE5\u7C7B\u4F3C\u72B6\u6001\u680F\u7684\u76D2\u5B50\u7684\u5F62\u5F0F\u663E\u793A\u5F53\u524D\u5DF2\u5B66\u4E60\u7684\u602A\u7269\u6280\u80FD\u3002"]},settingInfo={transition:transition$1,itemDetail,autoSkill,autoScale,showHalo,useFixed,autoLocate,antiAliasing,showStudied},_hoisted_1$f={class:"colomn"},_hoisted_2$c={class:"tools"},_hoisted_3$c=["id"],_sfc_main$f=defineComponent({__name:"colomn",props:{width:null,height:null,left:null,right:null},emits:["close"],setup(t,{emit:e}){const i=t,s=(1e8*Math.random()).toFixed(0);let n,a,r;function l(){n=document.getElementById(`column-${s}`),a=document.getElementById(`column-left-${s}`),r=document.getElementById(`column-right-${s}`),has(i.width)&&!isMobile&&(n.style.width=`${i.width}%`),has(i.height)&&(n.style.height=`${i.height}%`),has(i.left)&&(a.style.flexBasis=`${i.left}%`),has(i.right)&&(r.style.flexBasis=`${i.right}%`)}function c(d){const u=keycode(d.keyCode);(u===KeyCode.Escape||u===KeyCode.KeyX)&&e("close")}return onMounted(async()=>{l(),await S(50),core.plugin.transition.value&&await S(600),document.addEventListener("keyup",c)}),onUpdated(l),onUnmounted(()=>{document.removeEventListener("keyup",c)}),(d,u)=>{const h=__unplugin_components_0;return openBlock(),createElementBlock("div",_hoisted_1$f,[createBaseVNode("div",_hoisted_2$c,[createBaseVNode("span",{class:"button-text",onClick:u[0]||(u[0]=f=>e("close"))},[createVNode(unref(LeftOutlined)),createTextVNode(" \u8FD4\u56DE\u6E38\u620F")])]),createBaseVNode("div",{class:"column-main",id:`column-${unref(s)}`},[createVNode(Scroll,{class:"column-left",id:`column-left-${unref(s)}`},{default:withCtx(()=>[renderSlot(d.$slots,"left",{},void 0,!0)]),_:3},8,["id"]),createVNode(h,{class:"divider",dashed:"",style:{"border-color":"#ddd4"},type:unref(isMobile)?"horizontal":"vertical"},null,8,["type"]),createVNode(Scroll,{class:"column-right",id:`column-right-${unref(s)}`},{default:withCtx(()=>[renderSlot(d.$slots,"right",{},void 0,!0)]),_:3},8,["id"])],8,_hoisted_3$c)])}}}),colomn_vue_vue_type_style_index_0_scoped_682173f1_lang="",Column=_export_sfc(_sfc_main$f,[["__scopeId","data-v-682173f1"]]),_hoisted_1$e={id:"setting-list"},_hoisted_2$b=["selected"],_hoisted_3$b=["selected"],_hoisted_4$9=["selected"],_hoisted_5$7=["selected"],_hoisted_6$6=["selected"],_hoisted_7$6=["selected"],_hoisted_8$5=["selected"],_hoisted_9$5=["selected"],_hoisted_10$5=["selected"],_hoisted_11$5=["innerHTML"],_sfc_main$e=defineComponent({__name:"settings",setup(t){const e=window.core,i=ref("transition"),s=computed(()=>splitText(settingInfo[i.value].desc)),n={transition:transition$2,itemDetail:itemDetail$1,autoSkill:autoSkill$1,autoScale:autoScale$1,showHalo:showHalo$1,showStudied:showStudied$1,useFixed:useFixed$1,autoLocate:autoLocate$1,antiAliasing:antiAliasing$1};function a(){e.plugin.settingsOpened.value=!1}function r(l){if(i.value!==l){i.value=l;return}n[l].value=!n[l].value}return(l,c)=>(openBlock(),createBlock(Column,{width:60,height:60,onClose:a},{left:withCtx(()=>[createBaseVNode("div",_hoisted_1$e,[createBaseVNode("span",{class:"selectable",selected:i.value==="transition",onClick:c[0]||(c[0]=d=>r("transition"))},"\u754C\u9762\u52A8\u753B:\xA0\xA0\xA0"+toDisplayString(unref(transition$2)?"ON":"OFF"),9,_hoisted_2$b),createBaseVNode("span",{class:"selectable",selected:i.value==="itemDetail",onClick:c[1]||(c[1]=d=>r("itemDetail"))},"\u5B9D\u77F3\u8840\u74F6\u663E\u4F24:\xA0\xA0\xA0"+toDisplayString(unref(itemDetail$1)?"ON":"OFF"),9,_hoisted_3$b),createBaseVNode("span",{class:"selectable",selected:i.value==="autoSkill",onClick:c[2]||(c[2]=d=>r("autoSkill"))},"\u81EA\u52A8\u5207\u6362\u6280\u80FD:\xA0\xA0\xA0"+toDisplayString(unref(autoSkill$1)?"ON":"OFF"),9,_hoisted_4$9),createBaseVNode("span",{class:"selectable",selected:i.value==="autoScale",onClick:c[3]||(c[3]=d=>r("autoScale"))},"\u81EA\u52A8\u653E\u7F29:\xA0\xA0\xA0"+toDisplayString(unref(autoScale$1)?"ON":"OFF"),9,_hoisted_5$7),createBaseVNode("span",{class:"selectable",selected:i.value==="showHalo",onClick:c[4]||(c[4]=d=>r("showHalo"))},"\u5C55\u793A\u8303\u56F4\u5149\u73AF:\xA0\xA0\xA0"+toDisplayString(unref(showHalo$1)?"ON":"OFF"),9,_hoisted_6$6),createBaseVNode("span",{class:"selectable",selected:i.value==="useFixed",onClick:c[5]||(c[5]=d=>r("useFixed"))},"\u79FB\u52A8\u9F20\u6807\u663E\u793A\u602A\u7269\u4FE1\u606F:\xA0\xA0\xA0"+toDisplayString(unref(useFixed$1)?"ON":"OFF"),9,_hoisted_7$6),createBaseVNode("span",{class:"selectable",selected:i.value==="autoLocate",onClick:c[6]||(c[6]=d=>r("autoLocate"))},"\u52C7\u58EB\u81EA\u52A8\u5B9A\u4F4D:\xA0\xA0\xA0"+toDisplayString(unref(autoLocate$1)?"ON":"OFF"),9,_hoisted_8$5),createBaseVNode("span",{class:"selectable",selected:i.value==="antiAliasing",onClick:c[7]||(c[7]=d=>r("antiAliasing"))},"\u6297\u952F\u9F7F:\xA0\xA0\xA0"+toDisplayString(unref(antiAliasing$1)?"ON":"OFF"),9,_hoisted_9$5),unref(e).getSkillLevel(11)>0?(openBlock(),createElementBlock("span",{key:0,class:"selectable",selected:i.value==="showStudied",onClick:c[8]||(c[8]=d=>r("showStudied"))},"\u5C55\u793A\u5DF2\u5B66\u4E60\u6280\u80FD:\xA0\xA0\xA0"+toDisplayString(unref(showStudied$1)?"ON":"OFF"),9,_hoisted_10$5)):createCommentVNode("",!0)])]),right:withCtx(()=>[createBaseVNode("span",{innerHTML:unref(s)},null,8,_hoisted_11$5)]),_:1}))}}),settings_vue_vue_type_style_index_0_scoped_98d9836e_lang="",Settings=_export_sfc(_sfc_main$e,[["__scopeId","data-v-98d9836e"]]),tip={text:"\u6CE8\u610F\u4E8B\u9879",condition:"true",desc:["\u8FD9\u91CC\u663E\u793A\u672C\u5854\u4E2D\u9700\u8981\u6CE8\u610F\u7684\u4E8B\u9879\u3002","<br>","<br>",'1. <span style="color: yellow; font-weight: 700">',"\u672C\u767E\u79D1\u5168\u4E66\u5B57\u6570\u5F88\u591A\uFF0C\u53EF\u4EE5\u9009\u62E9\u6027\u5730\u9605\u8BFB\u3002</span>\u4E0D\u8FC7\u672C\u6761\u76EE\u6700\u597D\u53EF\u4EE5\u5168\u90E8\u9605\u8BFB\u4E00\u904D\u3002","<br>","<br>",'2. \u672C\u767E\u79D1\u5168\u4E66\u7684\u5185\u5BB9\u4F1A<span style="color: gold">\u968F\u7740\u6E38\u620F\u7684\u63A8\u8FDB\u800C\u589E\u52A0\u65B0\u5185\u5BB9</span>\uFF0C',"\u540C\u65F6\u6BCF\u6B21\u589E\u52A0\u65B0\u5185\u5BB9\u65F6\u90FD\u4F1A\u6709\u63D0\u793A\u3002","<br>","<br>","3. \u80CC\u5305\u4E2D\u7684\u7CFB\u7EDF\u8BBE\u7F6E\u540C\u6837\u975E\u5E38\u91CD\u8981\uFF0C\u6709\u4E9B\u95EE\u9898\u53EF\u4EE5\u5728\u90A3\u91CC\u627E\u5230\u539F\u56E0\u3002\u4F8B\u5982\u5F53\u4F60\u83B7\u5F97\u6280\u80FD\u65F6\u53EF\u80FD\u4F1A\u53D1\u73B0\u5F00\u542F\u4E0D\u4E86\u6280\u80FD\uFF0C","\u5C31\u662F\u56E0\u4E3A\u4F60\u6253\u5F00\u4E86\u81EA\u52A8\u5207\u6362\u6280\u80FD\u7684\u529F\u80FD\uFF0C\u5728\u7CFB\u7EDF\u8BBE\u7F6E\u91CC\u9762\u6709\u8BF4\u3002","<br>","<br>",'4. \u672C\u5854\u4E2D<span style="color: gold">\u51E0\u4E4E\u6240\u6709 ui </span>\u90FD\u53EF\u4EE5\u7EB5\u5411\u6EDA\u52A8\uFF0C\u5982\u679C\u53D1\u73B0\u663E\u793A\u4E0D\u5168\uFF0C',"\u53EF\u4EE5\u5C1D\u8BD5\u4E0A\u4E0B\u62D6\u52A8\uFF0C\u5C31\u50CF\u6D4F\u89C8\u7F51\u9875\u4E00\u6837\u3002\u7535\u8111\u7AEF\u8FD8\u53EF\u4EE5\u4F7F\u7528\u6EDA\u8F6E\u4E0A\u4E0B\u6EDA\u52A8\u3002","\u5927\u90E8\u5206\u53EF\u4EE5\u7EB5\u5411\u6EDA\u52A8\u7684 ui \u90FD\u4F1A\u5728\u53F3\u65B9\u6709\u4E00\u4E2A\u6EDA\u52A8\u6761\uFF0C\u4E5F\u53EF\u4EE5\u62D6\u52A8\u5B83\u8FDB\u884C\u6EDA\u52A8\uFF0C\u4F8B\u5982\u672C\u767E\u79D1\u5168\u4E66\u7684\u6761\u76EE\u5217\u8868\u548C","\u6761\u76EE\u8BF4\u660E\u90FD\u662F\u53EF\u4EE5\u901A\u8FC7\u4E0A\u8FF0\u65B9\u5F0F\u6EDA\u52A8\u7684\u3002","<br>","<br>","5. \u672C\u5854\u4E3B\u8981\u9762\u5411\u7535\u8111\u7AEF\u8BBE\u8BA1\uFF0C",'<span style="color: gold">\u5EFA\u8BAE\u4F7F\u7528\u7535\u8111\u6E38\u73A9\u4EE5\u83B7\u5F97\u66F4\u597D\u7684\u6E38\u620F\u4F53\u9A8C</span>\u3002\u4F46\u662F\u624B\u673A\u4F9D\u7136\u53EF\u4EE5\u6E38\u73A9\u672C\u5854\uFF0C',"\u4F46\u90E8\u5206\u64CD\u4F5C\u53EF\u80FD\u4E0D\u662F\u5F88\u65B9\u4FBF\uFF0Cui \u4E5F\u53EF\u80FD\u4E0D\u662F\u5F88\u7F8E\u89C2\uFF0C\u4E0D\u8FC7\u4F9D\u7136\u53EF\u4EE5\u5B8C\u6574\u4F53\u9A8C\u672C\u6E38\u620F\u3002","<br>","<br>",'6. \u5BF9\u4E8E\u624B\u673A\u7AEF\uFF0C\u53EF\u4EE5\u70B9\u51FB<span style="color: gold">\u53F3\u4E0B\u89D2\u7684\u96BE\u5EA6\u6587\u5B57</span>\u6765\u5207\u6362\u5DE5\u5177\u680F\u81F3\u6570\u5B57\u952E\u3002',"\u8FD9\u6837\uFF0C\u4F60\u53EF\u4EE5\u66F4\u52A0\u65B9\u4FBF\u5730\u8FDB\u884C\u4F7F\u7528\u6280\u80FD\u7B49\u64CD\u4F5C\u3002","<br>","<br>","6. \u672C\u5854\u4E2D\u51E0\u4E4E\u6240\u6709 ui \u5728\u6253\u5F00\u65F6\u90FD\u4F1A\u6709\u4E00\u4E2A0.6s\u7684\u52A8\u753B\uFF0C\u5982\u679C\u4E0D\u60F3\u8981\uFF0C\u53EF\u4EE5\u5728\u5F00\u5934\u6361\u7684\u7CFB\u7EDF\u8BBE\u7F6E\u91CC\u9762\u5173\u95ED\uFF08\u9ED8\u8BA4\u5173\u95ED\uFF09\u3002","\u540C\u65F6\uFF0C\u51E0\u4E4E\u6240\u6709 ui \u7684\u9000\u51FA\u6309\u94AE\u90FD\u5728\u5DE6\u4E0A\u89D2\u3002","<br>","<br>",'7. \u5730\u56FE\u4E0A\u663E\u793A\u7684\u602A\u7269\u4E34\u754C\u6709\u53EF\u80FD\u4E0D\u51C6\uFF0C\u5F53\u5176\u4E0E\u6298\u7EBF\u56FE\u6709\u5DEE\u5F02\u65F6\uFF0C<span style="color: gold">\u8BF7\u4EE5\u6298\u7EBF\u56FE\u4E3A\u51C6</span>\u3002']},about={text:"\u5173\u4E8E\u6E38\u620F",condition:"true",desc:["\u4F7F\u7528\u6837\u677F\uFF1AVite \u9B54\u5854\u6837\u677F","<br>","\u6837\u677F\u7248\u672C\uFF1AV2.10.0","<br>",'\u6E38\u620F\u5F00\u6E90\u5730\u5740\uFF1A<a href="https://github.com/unanmed/HumanBreak" target="_blank">',"https://github.com/unanmed/HumanBreak</a>","<br>","\u6E38\u620F\u4F5C\u8005\uFF1A\u53E4\u7960","<br>","BGM\u6765\u6E90\uFF1A\u7F51\u6613\u4E91\u97F3\u4E50\u7B49","<br>","\u7D20\u6750\u6765\u6E90\uFF1A\u5927\u7D20\u6750\u5E93\u3001\u7231\u7ED9\u7F51\u3001\u7F51\u7AD9\u7D20\u6750\u5E93\u7B49","<br>","\u7279\u522B\u9E23\u8C22\uFF1A\u65E0\u540D\u7532\u70F7\u83CC\uFF08\u63D0\u4F9B\u90E8\u5206\u7279\u6B8A\u5C5E\u6027\u4E0E\u673A\u5236\u60F3\u6CD5\uFF09","<br>","\u6D4B\u8BD5\uFF1A"]},tutorial={text:"\u65B0\u624B\u6559\u7A0B",condition:"true",desc:["\u672C\u6761\u76EE\u662F\u9B54\u5854\u6E38\u620F\u7684\u65B0\u624B\u6559\u7A0B\uFF0C\u5982\u679C\u5BF9\u9B54\u5854\u6709\u4E00\u5B9A\u7684\u4E86\u89E3\uFF0C\u53EF\u4EE5\u76F4\u63A5\u5FFD\u7565\u3002","<br>","<br>",'\u9B54\u5854\u662F\u4E00\u79CD\u56FA\u5B9A\u6570\u503Crpg\u6E38\u620F\uFF0C\u5728\u6253\u602A\u7684\u65F6\u5019\uFF0C\u9075\u5FAA<span style="color: gold">\u6211\u6253\u4F60\u4E00\u4E0B\uFF0C\u4F60\u6253\u6211\u4E00\u4E0B</span>',"\u7684\u539F\u5219\uFF0C\u9020\u6210\u7684\u4F24\u5BB3\u662F\u5DF1\u65B9\u653B\u51FB\u51CF\u53BB\u5BF9\u65B9\u9632\u5FA1\uFF0C\u6700\u540E\u602A\u7269\u7684\u4F24\u5BB3\u4FBF\u662F\u4F60\u5728\u6218\u6597\u4E2D\u5931\u53BB\u7684\u751F\u547D\u503C\u3002\u5F53\u7136\uFF0C\u4E3A\u4E86\u6E38\u620F\u4F53\u9A8C\uFF0C","\u6218\u6597\u8FC7\u7A0B\u4F1A\u88AB\u7701\u7565\u3002","<br>","<br>","\u5B9D\u77F3\u53EF\u4EE5\u589E\u52A0\u4F60\u7684\u5C5E\u6027\uFF0C\u5728\u5927\u90E8\u5206\u9B54\u5854\u4E2D\uFF0C\u7EA2\u5B9D\u77F3\u589E\u52A0\u653B\u51FB\uFF0C\u84DD\u5B9D\u77F3\u589E\u52A0\u9632\u5FA1\uFF0C\u672C\u5854\u4E5F\u4E0D\u4F8B\u5916\u3002\u8840\u74F6\u53EF\u4EE5\u589E\u52A0\u4F60\u7684\u751F\u547D\u503C\u3002",'\u4E00\u822C\u60C5\u51B5\u4E0B\uFF0C\u62FE\u53D6\u5B9D\u7269\u7684\u4F18\u5148\u7EA7\u662F<span style="color: gold">\u7EA2\u5B9D\u77F3 > \u84DD\u5B9D\u77F3 > \u8840\u74F6</span>\uFF0C',"\u4F46\u90E8\u5206\u60C5\u51B5\u53EF\u80FD\u4E0D\u662F\u8FD9\u6837\uFF0C\u8FD9\u9700\u8981\u4F60\u81EA\u5DF1\u7684\u6E38\u73A9\u7ECF\u9A8C\u7B49\u3002","<br>","<br>","\u672C\u5854\u8FD8\u62E5\u6709\u5347\u7EA7\u673A\u5236\uFF0C\u5347\u7EA7\u65F6\u80FD\u591F\u7ED9\u4F60\u589E\u52A0\u5927\u91CF\u7684\u5C5E\u6027\uFF0C\u56E0\u6B64\uFF0C\u4E00\u822C\u60C5\u51B5\u4E0B\u5F53\u4F60\u63A5\u8FD1\u5347\u7EA7\u65F6\uFF0C\u9700\u8981\u5C3D\u5FEB\u6253\u602A\u5347\u7EA7\u3002","<br>","<br>","\u7136\u540E\u662F\u95E8\u3002\u5728\u9B54\u5854\u4E2D\uFF0C\u5F88\u591A\u95E8\u90FD\u4E0D\u662F\u5FC5\u5F00\u7684\u95E8\uFF0C\u5B83\u4EEC\u7684\u4F5C\u7528\u4E00\u822C\u662F\u53EF\u4EE5\u8EB2\u5F00\u602A\u7269\u62FF\u5B9D\u77F3\uFF0C\u6216\u8005\u95E8\u91CC\u9762\u6709\u8840\u74F6\u7B49\u3002","\u5F53\u4F60\u8840\u91CF\u8DB3\u591F\u65F6\uFF0C\u8FD9\u4E9B\u95E8\u53EF\u4EE5\u4E0D\u7528\u5F00\uFF0C\u4E0D\u7136\u53EF\u80FD\u4F1A\u6709\u5FC5\u5F00\u7684\u95E8\u65E0\u6CD5\u5F00\u542F\u5BFC\u81F4\u5361\u5173\u3002\u5BF9\u4E8E\u94A5\u5319\uFF0C\u6BCF\u79CD\u989C\u8272\u7684\u94A5\u5319\u5F00\u5BF9\u5E94\u989C\u8272\u7684\u95E8\uFF0C",'\u4EF7\u503C\u662F<span style="color: gold">\u7EA2 > \u84DD > \u9EC4</span>\u3002',"<br>","<br>","\u4E3A\u4E86\u66F4\u52A0\u65B9\u4FBF\uFF0C\u672C\u5854\u589E\u52A0\u4E86\u5B9D\u77F3\u8840\u74F6\u663E\u793A\u6570\u636E\u7684\u529F\u80FD\uFF0C\u8FD9\u6837\u4F60\u53EF\u4EE5\u6E05\u6670\u5730\u77E5\u9053\u6BCF\u4E2A\u5B9D\u77F3\u589E\u52A0\u4E86\u591A\u5C11\u5C5E\u6027\u3002","<br>","<br>","\u4E0B\u9762\u662F\u52C7\u58EB\u57FA\u7840\u5C5E\u6027\u7684\u8BF4\u660E:","<br>",'<span style="color: lightgreen">1. \u751F\u547D\u503C</span>\uFF1A',"\u52C7\u58EB\u7684\u8840\u91CF\uFF0C\u5F53\u5B83\u5F52\u96F6\u65F6\uFF0C\u6E38\u620F\u7ED3\u675F","<br>",'<span style="color: lightcoral">2. \u653B\u51FB</span>\uFF1A',"\u52C7\u58EB\u7684\u653B\u51FB\uFF0C\u653B\u51FB\u8D8A\u9AD8\uFF0C\u6BCF\u56DE\u5408\u5BF9\u602A\u7269\u9020\u6210\u7684\u4F24\u5BB3\u8D8A\u9AD8","<br>",'<span style="color: lightblue">3. \u9632\u5FA1</span>\uFF1A',"\u52C7\u58EB\u7684\u9632\u5FA1\uFF0C\u9632\u5FA1\u8D8A\u9AD8\uFF0C\u602A\u7269\u6BCF\u56DE\u5408\u5BF9\u4F60\u9020\u6210\u7684\u4F24\u5BB3\u8D8A\u4F4E","<br>",'<span style="color: green">4. \u7ECF\u9A8C</span>\uFF1A',"\u52C7\u58EB\u7684\u7ECF\u9A8C\uFF0C\u5230\u8FBE\u4E00\u5B9A\u503C\u540E\u4F1A\u5347\u7EA7\u3002\u672C\u5854\u5728\u72B6\u6001\u680F\u4E2D\u663E\u793A\u4E3A\u8DDD\u79BB\u5347\u7EA7\u5269\u4F59\u7684\u7ECF\u9A8C","<br>",'<span style="color: gold">5. \u91D1\u5E01</span>\uFF1A',"\u52C7\u58EB\u7684\u91D1\u5E01\uFF0C\u53EF\u4EE5\u7528\u4E8E\u8D2D\u4E70\u7269\u54C1\u3002\u672C\u5854\u4E2D\u5728\u8FDB\u5165\u7B2C\u4E8C\u7AE0\u540E\u4F1A\u6709\u7528","<br>",'<span style="color: lightgreen">6. \u62A4\u76FE</span>\uFF1A',"\u52C7\u58EB\u7684\u62A4\u76FE\uFF0C\u7528\u5904\u662F\u80FD\u591F\u5728\u6218\u540E\u51CF\u5C11\u540C\u7B49\u6570\u503C\u7684\u4F24\u5BB3\uFF0C\u5728\u672C\u5854\u4E2D\u53EF\u4EE5\u4F7F\u4F24\u5BB3\u53D8\u4E3A\u8D1F\u503C\u3002\u672C\u5854\u4E2D\uFF0C\u5728\u70B9\u5F00\u65E0\u4E0A\u4E4B\u76FE\u6280\u80FD\u540E\uFF0C","\u667A\u6167\u4F1A\u5145\u5F53\u62A4\u76FE\u3002\u66F4\u591A\u4FE1\u606F\u53EF\u4EE5\u67E5\u770B\u201C\u52C7\u58EB\u5C5E\u6027\u201D\u6761\u76EE\u3002"]},noun={text:"\u540D\u8BCD\u89E3\u91CA",condition:"true",desc:["\u672C\u6761\u76EE\u4F1A\u89E3\u91CA\u8BF8\u5982\u4E34\u754C\u7B49\u9B54\u5854\u672F\u8BED\uFF0C\u5BF9\u9B54\u5854\u6709\u4E00\u5B9A\u4E86\u89E3\u7684\u53EF\u4EE5\u76F4\u63A5\u5FFD\u7565\u3002","<br>","<br>",'<span style="color: lightcoral">1. \u4E34\u754C</span>\uFF1A',"\u5728\u9B54\u5854\u4E2D\uFF0C\u4E34\u754C\u662F\u4E00\u4E2A\u975E\u5E38\u91CD\u8981\u7684\u4E1C\u897F\u3002\u9996\u5148\uFF0C\u6211\u4EEC\u5F88\u5BB9\u6613\u53EF\u4EE5\u5F97\u5230\uFF0C\u5403\u653B\u51FB\u65F6\u53EA\u6709\u5F53\u51CF\u5C11\u4E86\u6218\u6597\u56DE\u5408\u6570\u65F6\u602A\u7269\u7684\u4F24\u5BB3\u4F1A\u51CF\u5C11\uFF0C",'\u90A3\u4E48\uFF0C\u5403\u653B\u51FB\u65F6\u602A\u7269\u7684\u51CF\u4F24\u662F\u4E0D\u8FDE\u7EED\u7684\u3002\u800C<span style="color: gold">\u8DDD\u79BB\u4E0B\u4E00\u6B21\u51CF\u5C11\u602A\u7269\u7684\u4F24\u5BB3\u9700\u8981\u52A0\u7684\u653B\u51FB\u7684\u91CF</span>',"\u4FBF\u662F\u4E34\u754C\u3002\u5F53\u6211\u4EEC\u5403\u4E00\u4E2A\u653B\u51FB\u6070\u597D\u4F7F\u602A\u7269\u4F24\u5BB3\u51CF\u5C11\u65F6\uFF0C\u79F0\u4E3A\u201C\u8E29\u4E34\u754C\u201D\u3002\u4E00\u822C\u60C5\u51B5\u4E0B\uFF0C\u8E29\u4E34\u754C\u7684\u51CF\u4F24\u8981\u6BD4\u5403\u9632\u5FA1\u8981\u9AD8\uFF0C","\u56E0\u6B64\uFF0C\u5F53\u80FD\u8E29\u5230\u4E34\u754C\u65F6\uFF0C\u6211\u4EEC\u5E94\u5F53\u5148\u8E29\u4E34\u754C\uFF0C\u518D\u5403\u9632\u5FA1\u3002","<br>","<br>",'<span style="color: lightblue">2. \u52A0\u9632</span>\uFF1A',"\u52A0\u9632\u6307\u7684\u662F\u52A0\u9632\u5BF9\u602A\u7269\u7684\u51CF\u4F24\u3002\u5728\u672C\u5854\u4E2D\uFF0C\u4F1A\u4EE5\u201Cn\u9632\u201D\u7684\u5F62\u5F0F\u663E\u793A\u5728\u602A\u7269\u624B\u518C\u6216\u5176\u4ED6\u5730\u65B9\u3002\u5728\u672C\u5854\u4E2D\uFF0C\u4E00\u822C\u4F60\u4E0D\u9700\u8981\u523B\u610F\u8BA1\u7B97",'\u4E34\u754C\u4E0E\u52A0\u9632\u51CF\u4F24\uFF0C\u4F60\u53EF\u4EE5\u5728\u602A\u7269\u624B\u518C\u4E2D<span style="color: gold">\u67E5\u770B\u51CF\u4F24\u6298\u7EBF\u56FE</span>\uFF0C',"\u66F4\u591A\u4FE1\u606F\u8BF7\u67E5\u770B\u201C\u602A\u7269\u624B\u518C\u201D\u6761\u76EE\u3002","<br>","<br>",'<span style="color: gold">3. \u54B8\u9C7C</span>\uFF1A',"\u4E00\u822C\u6765\u8BB2\uFF0C\u5F00\u4E0D\u5FC5\u5F00\u7684\u95E8\uFF0C\u6216\u8005\u4F7F\u7528\u4E0D\u5FC5\u4F7F\u7528\u7684\u9053\u5177\u88AB\u79F0\u4E3A\u54B8\u9C7C\uFF0C\u6216\u8005\u662F\u54B8\u95E8\uFF0C\u54B8\u9053\u5177\u3002\u4E00\u822C\u60C5\u51B5\u4E0B\uFF0C\u8BF4\u201C\u54B8\u201D\u4FBF\u662F\u6307\u54B8\u9C7C\u3002","\u4E00\u822C\u60C5\u51B5\u4E0B\uFF0C\u95E8\u540E\u9762\u6709\u5B9D\u77F3\u4E14\u65E0\u6CD5\u901A\u8FC7\u5176\u4ED6\u65B9\u5F0F\u8FDB\u5165\u7684\u90FD\u662F\u5FC5\u5F00\u95E8\uFF0C\u800C\u53EA\u6709\u8840\u74F6\u7684\u90FD\u662F\u54B8\u9C7C\u95E8\u3002"]},shortcut={text:"\u5FEB\u6377\u952E",condition:"true",desc:["\u8FD9\u91CC\u5305\u542B\u672C\u5854\u4E2D\u6240\u6709\u7684\u5FEB\u6377\u952E\u3002\u5BF9\u4E8E\u624B\u673A\u7AEF\uFF0C\u53EF\u4EE5\u70B9\u51FB\u5DE5\u5177\u680F\u7684\u96BE\u5EA6\u7684\u4F4D\u7F6E\u5207\u6362\u5DE5\u5177\u680F\u81F3\u6570\u5B57\u952E\u3002","\u4E0B\u9762\u4F1A\u5206\u4E3A\u6837\u677F\u5FEB\u6377\u952E\u548C\u672C\u5854\u5FEB\u6377\u952E\u4E24\u7C7B\u5206\u522B\u8BF4\u660E\u3002\u53EF\u4EE5ctrl+F\u8FDB\u884C\u641C\u7D22\u5FEB\u6377\u952E\u7684\u529F\u80FD\u3002","<br>","<br>","\u4E0B\u9762\u662F\u6837\u677F\u4E2D\u7684\u6240\u6709\u5FEB\u6377\u952E\uFF1A","<br>",'<span style="color: gold">X</span>\uFF1A\u6253\u5F00\u602A\u7269\u624B\u518C',"<br>",'<span style="color: gold">S</span>\uFF1A\u6253\u5F00\u5B58\u6863\u754C\u9762',"<br>",'<span style="color: gold">D</span>\uFF1A\u6253\u5F00\u8BFB\u6863\u754C\u9762',"<br>",'<span style="color: gold">A\u62165</span>\uFF1A\u8BFB\u53D6\u81EA\u52A8\u5B58\u6863',"<br>",'<span style="color: gold">W\u62166</span>\uFF1A\u64A4\u9500\u8BFB\u53D6\u7684\u81EA\u52A8\u5B58\u6863',"<br>",'<span style="color: gold">Q</span>\uFF1A\u6253\u5F00\u88C5\u5907\u680F',"<br>",'<span style="color: gold">T</span>\uFF1A\u6253\u5F00\u9053\u5177\u680F',"<br>",'<span style="color: gold">G</span>\uFF1A\u6253\u5F00\u697C\u5C42\u4F20\u9001\u5668',"<br>",'<span style="color: gold">Z\u6216\u5355\u51FB\u52C7\u58EB</span>\uFF1A\u52C7\u58EB\u8F6C\u5411',"<br>",'<span style="color: gold">\u7A7A\u683C\u6216\u53CC\u51FB\u52C7\u58EB\u62167</span>\uFF1A\u8F7B\u6309\uFF08\u62FE\u53D6\u52C7\u58EB\u5468\u56F4\u7684\u5B9D\u7269\u4F46\u4E0D\u79FB\u52A8\u52C7\u58EB\uFF09',"<br>",'<span style="color: gold">Esc</span>\uFF1A\u6253\u5F00\u6E38\u620F\u83DC\u5355',"<br>",'<span style="color: gold">R</span>\uFF1A\u6253\u5F00\u5F55\u50CF\u56DE\u653E\u83DC\u5355',"<br>",'<span style="color: gold">N</span>\uFF1A\u8BE2\u95EE\u662F\u5426\u8FD4\u56DE\u6E38\u620F\u4E3B\u83DC\u5355',"<br>",'<span style="color: gold">V</span>\uFF1A\u6253\u5F00\u5FEB\u6377\u5546\u5E97',"<br>",'<span style="color: gold">B</span>\uFF1A\u6253\u5F00\u6570\u636E\u7EDF\u8BA1\u754C\u9762',"<br>",'<span style="color: gold">Alt + \u6570\u5B57\u952E</span>\uFF1A\u5FEB\u901F\u6362\u88C5',"<br>",'<span style="color: gold">PgUp\u6216PgDn</span>\uFF1A\u6D4F\u89C8\u5730\u56FE',"<br>",'<span style="color: gold">P</span>\uFF1A\u6253\u5F00\u8BC4\u8BBA\u533A',"<br>","<br>","\u4E0B\u9762\u662F\u672C\u5854\u4E2D\u65B0\u589E\u7684\u5FEB\u6377\u952E\uFF08\u4E0D\u5305\u62EC\u6280\u80FD\uFF0C\u6280\u80FD\u5FEB\u6377\u952E\u8BF7\u5728\u67E5\u770B\u6280\u80FD\u754C\u9762\u4E2D\u67E5\u770B\uFF09\uFF1A","<br>",'<span style="color: gold">M</span>\uFF1A\u5FEB\u901F\u6807\u8BB0\u602A\u7269',"<br>",'<span style="color: gold">J</span>\uFF1A\u6253\u5F00\u6280\u80FD\u6811',"<br>",'<span style="color: gold">H</span>\uFF1A\u6253\u5F00\u767E\u79D1\u5168\u4E66',"<br>",'<span style="color: gold">E</span>\uFF1A\u67E5\u770B\u9F20\u6807\u4F4D\u7F6E\u602A\u7269\u7684\u7279\u6B8A\u5C5E\u6027\u4FE1\u606F',"<br>",'<span style="color: gold">C</span>\uFF1A\u67E5\u770B\u9F20\u6807\u4F4D\u7F6E\u602A\u7269\u7684\u8BE6\u7EC6\u4E34\u754C\u4FE1\u606F']},extraAttr={text:"\u52C7\u58EB\u5C5E\u6027",condition:"true",desc:["\u8FD9\u91CC\u53EA\u5BF9\u672C\u5854\u4E2D\u65B0\u589E\u7684\u52C7\u58EB\u5C5E\u6027\u8FDB\u884C\u8BF4\u660E\u3002","<br>","<br>",'<span style="color: lightblue">1. \u667A\u6167</span>\uFF1A',"\u667A\u6167\u662F\u8BE5\u5854\u7684\u6838\u5FC3\u5C5E\u6027\u4E4B\u4E00\u3002\u667A\u6167\u53EF\u7528\u4E8E\u667A\u6167\u52A0\u70B9\uFF0C\u8BE5\u529F\u80FD\u4F1A\u5728\u8FDB\u5165\u7B2C\u4E00\u7AE0\u540E\u5F00\u542F\u3002\u4F7F\u7528\u667A\u6167\u53EF\u4EE5\u70B9\u6280\u80FD\u6811\u3002","\u9664\u6B64\u4E4B\u5916\uFF0C\u667A\u6167\u4E5F\u6709\u5176\u5B83\u529F\u80FD\u3002\u4F8B\u5982\u70B9\u5F00\u65E0\u4E0A\u4E4B\u76FE\u6280\u80FD\u540E\u667A\u6167\u8FD8\u53EF\u4EE5\u5145\u5F53\u62A4\u76FE\uFF0C\u7B2C\u4E8C\u7AE0\u70B9\u5F00\u5B66\u4E60\u6280\u80FD\u540E\u53EF\u4EE5\u4F7F\u7528\u667A\u6167\u5B66\u4E60\u602A\u7269\u6280\u80FD\u7B49\u3002","<br>","<br>",'<span style="color: lightgreen">2. \u751F\u547D\u56DE\u590D</span>\uFF1A',"\u751F\u547D\u56DE\u590D\u6307\u7684\u662F\u52C7\u58EB\u6BCF\u56DE\u5408\u56DE\u590D\u7684\u751F\u547D\u503C\u3002\u5F53\u4E0E\u602A\u7269\u6218\u6597\u65F6\uFF0C\u52C7\u58EB\u6BCF\u56DE\u5408\u90FD\u4F1A\u56DE\u590D\u5BF9\u5E94\u91CF\u7684\u751F\u547D\u503C\u3002\u56E0\u6B64\uFF0C\u5F53\u5403\u653B\u51FB\u65F6\uFF0C","\u4E0E\u602A\u7269\u6218\u6597\u7684\u56DE\u5408\u6570\u53EF\u80FD\u4F1A\u51CF\u5C11\uFF0C\u5BFC\u81F4\u751F\u547D\u56DE\u590D\u7684\u603B\u56DE\u590D\u91CF\u51CF\u5C11\u3002\u4E0D\u8FC7\u5927\u90E8\u5206\u60C5\u51B5\u4E0B\u4E0D\u9700\u8981\u5728\u610F\u8FD9\u4E00\u70B9\uFF0C","\u51CF\u5C11\u4E00\u56DE\u5408\u5E76\u4E0D\u4F1A\u5BF9\u5438\u7684\u8840\u9020\u6210\u5F88\u5927\u7684\u5F71\u54CD\uFF0C\u9664\u4E86\u4E00\u4E9B\u7279\u6B8A\u60C5\u51B5\u3002","\u8BE5\u9879\u4F1A\u663E\u793A\u5728\u72B6\u6001\u680F\u7684\u751F\u547D\u503C\u53F3\u65B9\u504F\u4E0B\u7684\u4F4D\u7F6E\u3002","<br>","<br>",'<span style="color: lightcoral">3. \u989D\u5916\u653B\u51FB</span>\uFF1A',"\u989D\u5916\u653B\u51FB\u6307\u7684\u662F\u52C7\u58EB\u6BCF\u56DE\u5408\u7684\u989D\u5916\u9020\u6210\u7684\u4F24\u5BB3\u3002\u4E00\u822C\u60C5\u51B5\u4E0B\uFF0C\u5F53\u52C7\u58EB\u7834\u4E86\u602A\u7269\u7684\u9632\u5FA1\u65F6\uFF0C\u8BE5\u9879\u4FBF\u4F1A\u8D77\u4F5C\u7528\u3002","\u989D\u5916\u653B\u51FB\u76F8\u5F53\u4E8E\u9B54\u653B\uFF0C\u65E0\u6CD5\u901A\u8FC7\u4E00\u822C\u65B9\u5F0F\u51CF\u514D\u3002\u5F53\u52C7\u58EB\u653B\u51FB\u602A\u7269\u65F6\uFF0C\u6BCF\u56DE\u5408\u90FD\u4F1A\u9644\u52A0\u5BF9\u5E94\u91CF\u7684\u4F24\u5BB3\uFF0C\u5BF9\u575A\u56FA\u602A\u540C\u6837\u6709\u6548\u3002","\u989D\u5916\u653B\u51FB\u4F1A\u663E\u793A\u5728\u72B6\u6001\u680F\u7684\u653B\u51FB\u53F3\u65B9\u504F\u4E0B\u7684\u4F4D\u7F6E\u3002"]},statusBar={text:"\u72B6\u6001\u680F",condition:"true",desc:["\u5728\u672C\u5854\u4E2D\uFF0C\u72B6\u6001\u680F\u4E0E\u6E38\u620F\u753B\u9762\u662F\u5206\u5F00\u7684\u3002\u4F60\u53EF\u4EE5\u81EA\u7531\u62D6\u52A8\u72B6\u6001\u680F\uFF0C\u4E5F\u53EF\u4EE5\u4FEE\u6539\u5176\u5927\u5C0F\u3002","\u5177\u4F53\u65B9\u6CD5\u5982\u4E0B\uFF1A\u70B9\u51FB\u4E00\u4E0B\u72B6\u6001\u680F\u4E4B\u540E\uFF0C\u5DE6\u4E0A\u89D2\u7684\u62D6\u62FD\u56FE\u6807\u4F1A\u653E\u5927\uFF0C\u6B64\u65F6\u4F60\u53EF\u4EE5\u6309\u4F4F\u5B83\u62D6\u52A8\u72B6\u6001\u680F\u3002","\u4F60\u53EF\u4EE5\u76F4\u63A5\u5C06\u9F20\u6807\u653E\u5230\u72B6\u6001\u680F\u7684\u8FB9\u6846\u4E0A\uFF0C\u7136\u540E\u76F4\u63A5\u62D6\u52A8\u4EE5\u6539\u53D8\u72B6\u6001\u680F\u7684\u5927\u5C0F\u3002\u624B\u673A\u7AEF\u53EF\u4EE5\u5148\u70B9\u51FB\u4E00\u4E0B\u72B6\u6001\u680F\u4F7F\u8FB9\u6846","\u53D8\u5BBD\uFF0C\u7136\u540E\u62D6\u52A8\u3002\u7535\u8111\u7AEF\u70B9\u51FB\u72B6\u6001\u680F\u4E5F\u53EF\u4EE5\u4F7F\u8FB9\u6846\u53D8\u5BBD\u3002\u5982\u679C\u4F60\u60F3\u6298\u53E0\u72B6\u6001\u680F\uFF0C\u5B8C\u5168\u53EF\u4EE5\u62D6\u52A8\u72B6\u6001\u680F\u7684\u4E0B\u8FB9\u6846\uFF0C","\u7136\u540E\u76F4\u63A5\u62D6\u52A8\u81F3\u4E0A\u65B9\uFF0C\u8FD9\u65F6\u72B6\u6001\u680F\u4FBF\u4F1A\u53D8\u6210\u4E00\u6761\u7EBF\uFF0C\u76F8\u5F53\u4E8E\u6298\u53E0\u4E86\u72B6\u6001\u680F","<br>","<br>","\u72B6\u6001\u680F\u53EF\u4EE5\u7EB5\u5411\u6EDA\u52A8\uFF0C\u5982\u679C\u4F60\u53D1\u73B0\u72B6\u6001\u680F\u663E\u793A\u4E0D\u5168\uFF0C\u53EF\u4EE5\u5C1D\u8BD5\u62C9\u5927\u72B6\u6001\u680F\uFF0C\u6216\u8005\u7EB5\u5411\u62D6\u52A8\u72B6\u6001\u680F\uFF0C\u5C31\u50CF\u7F51\u9875\u4E0A\u4E0B\u6EDA\u52A8\u4E00\u6837\u3002","\u7535\u8111\u7AEF\u8FD8\u53EF\u4EE5\u4F7F\u7528\u6EDA\u8F6E\u4E0A\u4E0B\u6EDA\u52A8\u3002","<br>","<br>","\u5982\u679C\u4F60\u89C9\u5F97\u72B6\u6001\u680F\u6709\u4E9B\u788D\u4E8B\uFF0C\u4F60\u5B8C\u5168\u53EF\u4EE5\u5C06\u5176\u7F29\u5C0F\uFF0C\u6216\u8005\u628A\u5B83\u653E\u5230\u4E0D\u788D\u4E8B\u7684\u5730\u65B9\u3002","<br>","<br>","\u72B6\u6001\u680F\u4E0A\u9762\u53EF\u80FD\u4F1A\u6709\u6309\u94AE\uFF0C\u4F60\u53EF\u4EE5\u76F4\u63A5\u70B9\u51FB\u3002","<br>","<br>","\u5BF9\u72B6\u6001\u680F\u5E03\u5C40\u7684\u8BF4\u660E\u3002","<br>","\u672C\u5854\u7684\u72B6\u6001\u680F\u7684\u5E03\u5C40\u8F83\u4E3A\u7075\u6D3B\u3002\u5B83\u662F\u6A2A\u5411\u7684\u5E03\u5C40\uFF0C\u5728\u72B6\u6001\u680F\u8F83\u5BBD\u65F6\u53EF\u4EE5\u770B\u5230\uFF0C\u5C5E\u6027\u4F1A\u6A2A\u5411\u4F9D\u6B21\u663E\u793A\u3002\u6309\u7167\u663E\u793A\u987A\u5E8F\uFF0C","\u72B6\u6001\u680F\u663E\u793A\u9879\u4F9D\u6B21\u4E3A\uFF1A","<br>","<br>","1. \u697C\u5C42\u540D\uFF0C\u70B9\u51FB\u540E\u8FDB\u5165\u6D4F\u89C8\u5730\u56FE\u754C\u9762","<br>","2. \u52C7\u58EB\u7B49\u7EA7","<br>","3. \u5F53\u524D\u5F00\u542F\u7684\u6280\u80FD","<br>","4. \u5F53\u524D\u52C7\u58EB\u751F\u547D\u503C\uFF0C\u53F3\u65B9\u504F\u4E0B\u4E3A\u6BCF\u56DE\u5408\u56DE\u590D\u7684\u751F\u547D\u503C\uFF0C\u5F53\u70B9\u5F00\u6CBB\u6108\u4E4B\u6CC9\u6280\u80FD\u65F6\uFF0C\u53F3\u65B9\u504F\u4E0A\u4F1A\u663E\u793A\u8DDD\u79BB\u589E\u52A0\u751F\u547D\u56DE\u590D\u5269\u4F59\u8840\u74F6\u6570","<br>","5. \u5F53\u524D\u52C7\u58EB\u7684\u653B\u51FB\uFF0C\u53F3\u65B9\u504F\u4E0B\u4E3A\u52C7\u58EB\u7684\u989D\u5916\u653B\u51FB","<br>","6. \u5F53\u524D\u52C7\u58EB\u7684\u9632\u5FA1","<br>","7. \u5F53\u524D\u52C7\u58EB\u7684\u667A\u6167\uFF0C\u53EF\u4EE5\u7528\u4E8E\u667A\u6167\u52A0\u70B9\u7B49","<br>","8. \u5F53\u524D\u52C7\u58EB\u7684\u91D1\u5E01","<br>","9. \u5F53\u524D\u52C7\u58EB\u8DDD\u79BB\u5347\u7EA7\u5269\u4F59\u7ECF\u9A8C\u6570","<br>","10. \u4E09\u8272\u94A5\u5319","<br>","11. \u6253\u5F00\u6280\u80FD\u6811\uFF08\u8FDB\u5165\u7B2C\u4E00\u7AE0\u540E\u5F00\u542F\uFF09","<br>","12. \u67E5\u770B\u52C7\u58EB\u7684\u6280\u80FD\uFF08\u8FDB\u5165\u7B2C\u4E00\u7AE0\u540E\u5F00\u542F\uFF09"]},markEnemy={text:"\u6807\u8BB0\u602A\u7269",condition:"true",desc:["\u6807\u8BB0\u602A\u7269\u53EF\u4EE5\u4F7F\u4F60\u80FD\u591F\u66F4\u52A0\u65B9\u4FBF\u5730\u4E86\u89E3\u4E00\u4E2A\u602A\u7269\u7684\u60C5\u51B5\u3002","<br>","\u4F60\u53EF\u4EE5\u901A\u8FC7\u4EE5\u4E0B\u4E24\u79CD\u65B9\u5F0F\u6807\u8BB0\u602A\u7269\uFF1A","<br>","1. \u6253\u5F00\u602A\u7269\u624B\u518C\uFF0C\u9009\u4E2D\u602A\u7269\uFF0C\u8FDB\u5165\u602A\u7269\u66F4\u591A\u4FE1\u606F\u680F\uFF0C\u70B9\u51FB\u6807\u8BB0\u602A\u7269\u3002","<br>",'2. \u5C06\u9F20\u6807\u79FB\u52A8\u5230\u4F60\u60F3\u8981\u6807\u8BB0\u7684\u602A\u7269\u4E0A\u9762\uFF0C<span style="color: gold">',"\u6309\u4E0BM\u952E</span>\uFF0C\u5373\u53EF\u6807\u8BB0\u602A\u7269\uFF0C\u6CE8\u610F\u6D4F\u89C8\u5730\u56FE\u4E2D\u4E0D\u80FD\u7528\u8BE5\u65B9\u5F0F\u6807\u8BB0\u3002","\u624B\u673A\u7AEF\u6682\u65F6\u6CA1\u6709\u5FEB\u901F\u6807\u8BB0\u602A\u7269\u7684\u65B9\u5F0F\u3002","<br>","<br>","\u5F53\u4E00\u4E2A\u602A\u7269\u88AB\u6807\u8BB0\u540E\uFF0C\u602A\u7269\u4F1A\u6709\u4EE5\u4E0B\u884C\u4E3A\uFF1A","<br>","1. \u5F53\u52C7\u58EB\u6070\u597D\u80FD\u6253\u8D25\u602A\u7269\u65F6\uFF0C\u4F1A\u8FDB\u884C\u63D0\u793A","<br>","2. \u5F53\u602A\u7269\u7684\u4F24\u5BB3\u6070\u597D\u4F4E\u4E8E\u52C7\u58EB\u751F\u547D\u503C\u76842/3\u62161/3\u65F6\uFF0C\u4F1A\u8FDB\u884C\u63D0\u793A","<br>","3. \u5F53\u52C7\u58EB\u6070\u597D\u8E29\u5230\u602A\u7269\u7684\u4E34\u754C\u65F6\uFF0C\u4F1A\u8FDB\u884C\u63D0\u793A","<br>","4. \u5F53\u602A\u7269\u96F6\u4F24\u65F6\uFF0C\u4F1A\u8FDB\u884C\u63D0\u793A","<br>","5. \u88AB\u6807\u8BB0\u7684\u602A\u7269\u4F1A\u51FA\u73B0\u7C7B\u4F3C\u4E8E\u72B6\u6001\u680F\u7684\u76D2\u5B50\uFF0C\u53EF\u4EE5\u968F\u610F\u62D6\u52A8\u548C\u6539\u53D8\u5927\u5C0F\u3002\u4F60\u4E5F\u53EF\u4EE5\u9009\u62E9\u5173\u95ED\u8FD9\u4E2A\u76D2\u5B50\uFF0C","\u88AB\u5173\u95ED\u540E\u53EF\u4EE5\u901A\u8FC7\u91CD\u65B0\u6807\u8BB0\u6765\u6253\u5F00\u3002\u8FD9\u4E2A\u76D2\u5B50\u4F1A\u663E\u793A\u6807\u8BB0\u7684\u602A\u7269\u7684\u4E34\u754C\u4E0E\u4F24\u5BB3\u4FE1\u606F\u7B49\uFF0C\u4E0E\u72B6\u6001\u680F\u4E00\u6837\uFF0C\u53EF\u4EE5\u7EB5\u5411\u6EDA\u52A8\u3002","<br>","<br>","\u8FD9\u4E2A\u529F\u80FD\u53EF\u4EE5\u7528\u4E8E\u6807\u8BB0boss\u6216\u8005\u8F83\u5F3A\u7684\u6321\u8DEF\u602A\uFF0C\u5F53\u8FD9\u4E9B\u602A\u80FD\u591F\u653B\u51FB\u65F6\u4F60\u53EF\u4EE5\u76F4\u63A5\u6536\u5230\u4FE1\u606F\uFF0C\u4E0D\u9700\u8981\u518D\u65F6\u523B\u8D39\u5FC3\u6CE8\u610F\u602A\u7269\u7684\u4F24\u5BB3\u3002","<br>","<br>","\u6CE8\u610F\uFF0C\u6807\u8BB0\u7684\u602A\u7269\u662F\u4E0D\u8BA1\u5165\u5B58\u6863\u7684\uFF0C\u540C\u65F6\u6807\u8BB0\u7684\u602A\u7269\u53EA\u5728\u672C\u6B21\u6E38\u620F\u4E2D\u6709\u6548\uFF0C\u5237\u65B0\u9875\u9762\u540E\u4FBF\u4F1A\u6D88\u5931\u3002"]},book={text:"\u602A\u7269\u624B\u518C",condition:"true",desc:["\u672C\u5854\u7684\u602A\u7269\u624B\u518C\u529F\u80FD\u5F88\u591A\uFF0C\u4E0B\u9762\u4E00\u4E00\u4ECB\u7ECD\u3002","<br>","<br>","\u9996\u5148\uFF0C\u4F60\u53EF\u4EE5\u6309X\u6253\u5F00\u602A\u7269\u624B\u518C\u3002\u9664\u6B64\u4E4B\u5916\uFF0C\u5C06\u9F20\u6807\u79FB\u52A8\u5230\u602A\u7269\u4E0A\u4E5F\u53EF\u4EE5\u5B9A\u70B9\u67E5\u770B\u602A\u7269\u7684\u7C97\u7565\u4FE1\u606F\u3002",'\u5C06\u9F20\u6807\u79FB\u52A8\u5230\u4E00\u4E2A\u602A\u7269\u4E0A\uFF0C\u6309\u4E0B<span style="color: gold">','E\u952E</span>\uFF0C\u53EF\u4EE5\u67E5\u770B\u8BE5\u602A\u7269\u7684\u7279\u6B8A\u5C5E\u6027\u4FE1\u606F\u3002\u6309\u4E0B<span style="color: gold">',"C\u952E</span>\uFF0C\u53EF\u4EE5\u67E5\u770B\u8BE5\u602A\u7269\u7684\u8BE6\u7EC6\u4E34\u754C\u4FE1\u606F\u3002","<br>","<br>","\u602A\u7269\u624B\u518C\u6253\u5F00\u7684\u65F6\u5019\u6709\u4E00\u4E2A0.6\u79D2\u7684\u52A8\u753B\uFF0C\u5982\u679C\u4E0D\u60F3\u8981\u53EF\u4EE5\u5728\u5F00\u5934\u6361\u7684\u7CFB\u7EDF\u8BBE\u7F6E\u91CC\u9762\u5173\u95ED\uFF08\u9ED8\u8BA4\u5173\u95ED\uFF09\u3002","<br>","<br>","\u6253\u5F00\u602A\u7269\u624B\u518C\u540E\uFF0C\u602A\u7269\u624B\u518C\u7684\u5E03\u5C40\u4E0E\u6837\u677F\u81EA\u5E26\u7684\u7C7B\u4F3C\u3002\u4E0E\u6837\u677F\u4E0D\u540C\u7684\u662F\uFF0C\u8FD9\u91CC\u7684\u602A\u7269\u624B\u518C\u4E0D\u518D\u662F\u7FFB\u9875\u5F0F\u7ED3\u6784\u3002","\u8FD9\u91CC\u7684\u602A\u7269\u624B\u518C\u662F\u6EDA\u52A8\u5F0F\u7ED3\u6784\uFF0C\u4F60\u53EF\u4EE5\u50CF\u6D4F\u89C8\u7F51\u9875\u4E00\u6837\uFF0C\u7528\u624B\u6307\u6216\u9F20\u6807\u4E0A\u4E0B\u6EDA\u52A8\u6216\u8005\u62D6\u52A8\u53F3\u8FB9\u7684\u6EDA\u52A8\u6761\uFF0C\u7535\u8111\u7AEF\u8FD8\u53EF\u4EE5\u4F7F\u7528\u6EDA\u8F6E\u3002","\u5BF9\u4E8E\u7535\u8111\u7AEF\uFF0C\u8FD8\u53EF\u4EE5\u4F7F\u7528\u952E\u76D8\u64CD\u4F5C\u3002\u4E0A\u548C\u4E0B\u53EF\u4EE5\u4E0A\u4E0B\u9009\u62E9\u602A\u7269\uFF0C\u5DE6\u548C\u53F3\u53EF\u4EE5\u5411\u4E0A\u6216\u5411\u4E0B\u79FB\u52A85\u4E2A\u602A\u7269\u3002\u8FD9\u4E9B\u64CD\u4F5C\u4E0E\u6837\u677F\u90FD\u7C7B\u4F3C\u3002","<br>","<br>","\u70B9\u51FB\u4E00\u4E2A\u602A\u7269\u6216\u8005\u6309\u4E0B\u56DE\u8F66\u7A7A\u683C\u540E\uFF0C\u5C06\u8FDB\u5165\u602A\u7269\u8BE6\u7EC6\u4FE1\u606F\u754C\u9762\u3002\u8FD9\u4E2A\u754C\u9762\u5206\u4E3A\u591A\u4E2A\u680F\uFF0C\u5206\u522B\u662F\u7279\u6B8A\u5C5E\u6027\u680F\uFF0C\u8BE6\u7EC6\u4E34\u754C\u680F\uFF0C\u66F4\u591A\u4FE1\u606F\u680F\u3002","\u8FDB\u5165\u602A\u7269\u8BE6\u7EC6\u4FE1\u606F\u540E\u9ED8\u8BA4\u5728\u7279\u6B8A\u5C5E\u6027\u680F\uFF0C\u8BE5\u680F\u53EF\u4EE5\u67E5\u770B\u602A\u7269\u7684\u7279\u6B8A\u5C5E\u6027\u3002","\u6CE8\u610F\u7279\u6B8A\u5C5E\u6027\u4F9D\u7136\u53EF\u4EE5\u7EB5\u5411\u6EDA\u52A8\u3002\u5728\u7279\u6B8A\u5C5E\u6027\u4E0B\u65B9\uFF0C","\u662F\u602A\u7269\u7684\u4E34\u754C\u8868\uFF0C\u53EF\u4EE5\u7C97\u7565\u5730\u67E5\u770B\u602A\u7269\u7684\u4E34\u754C\u4FE1\u606F\u3002\u5728\u4E0B\u65B9\uFF0C\u4F60\u53EF\u4EE5\u70B9\u51FB\u8BE6\u7EC6\u4E34\u754C\u4FE1\u606F\u8FDB\u5165\u8BE6\u7EC6\u4E34\u754C\u680F\u3002","<br>","<br>","\u5728\u8BE6\u7EC6\u4E34\u754C\u680F\u4E2D\uFF0C\u602A\u7269\u7684\u4F24\u5BB3\u4F1A\u4EE5\u53EF\u89C6\u5316\u6298\u7EBF\u56FE\u7684\u65B9\u5F0F\u663E\u793A\u51FA\u6765\uFF0C\u4ECE\u800C\u4F60\u53EF\u4EE5\u66F4\u4E3A\u6E05\u6670\u5730\u770B\u51FA\u602A\u7269\u51CF\u4F24\u8D8B\u52BF\u3002","\u9664\u4E86\u67E5\u770B\u602A\u7269\u4F24\u5BB3\u66F2\u7EBF\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u89C4\u5212\u5B9D\u77F3\u3002\u6BCF\u4E2A\u6298\u7EBF\u56FE\u4E0B\u65B9\u90FD\u6709\u4E00\u4E2A\u6ED1\u52A8\u6761\uFF0C\u4F60\u53EF\u4EE5\u62D6\u52A8\u6765\u6A21\u62DF\u5403\u5B9D\u77F3\u3002","\u6CE8\u610F\uFF0C\u62D6\u52A8\u65F6\uFF0C\u6ED1\u52A8\u6761\u5DE6\u8FB9\u4F1A\u663E\u793A\u5F53\u524D\u7684\u52A0\u653B\u6216\u52A0\u9632\u6B21\u6570\uFF0C\u8FD9\u4E2A\u6570\u503C\u6307\u7684\u662F\u5728\u52C7\u58EB\u6240\u5728\u5730\u56FE\u4E2D\u9700\u8981\u5403\u7684\u6700\u5F31\u7684\u5B9D\u77F3\u6570\u91CF\u3002","\u4F8B\u5982\uFF0C\u5F53\u524D\u52C7\u58EB\u6240\u5728\u5730\u56FE\u4E2D\u6700\u5F31\u7684\u5B9D\u77F3\u52A02\u70B9\u653B\u51FB\uFF0C\u52A0\u653B\u6B21\u6570\u4E3A3\uFF0C\u90A3\u4E48\u52C7\u58EB\u7684\u653B\u51FB\u589E\u52A0\u91CF\u5C31\u4E3A6\u3002","\u52C7\u58EB\u589E\u52A0\u7684\u653B\u51FB\u6570\u503C\u4E5F\u4F1A\u5728\u4E0B\u65B9\u663E\u793A\u3002\u5F53\u52A0\u653B\u6B21\u6570\u548C\u52A0\u9632\u6B21\u6570\u6539\u53D8\u65F6\uFF0C\u6298\u7EBF\u56FE\u4E5F\u4F1A\u53D8\u5316\u3002",'\u5F53\u524D\u72B6\u6001\u4E0B\u602A\u7269\u7684\u4F24\u5BB3\u4EE5\u53CA\u51CF\u4F24\u603B\u91CF\u4E5F\u4F1A\u5728\u4E0B\u65B9\u663E\u793A\u3002<span style="color: gold">',"\u6CE8\u610F\u5728\u6B64\u680F\u4E2D\u65E0\u6CD5\u901A\u8FC7\u70B9\u51FB\u5C4F\u5E55\u56DE\u5230\u602A\u7269\u624B\u518C\u754C\u9762\uFF0C\u66F4\u591A\u4FE1\u606F\u8BF7\u67E5\u770B\u6700\u540E\u4E00\u6BB5</span>\u3002","<br>","<br>","\u5728\u7279\u6B8A\u5C5E\u6027\u680F\uFF0C\u70B9\u51FB\u4E0B\u65B9\u7684\u602A\u7269\u66F4\u591A\u4FE1\u606F\u53EF\u4EE5\u8FDB\u5165\u66F4\u591A\u4FE1\u606F\u680F\u3002\u6B64\u680F\u4E2D\uFF0C\u4F60\u53EF\u4EE5\u67E5\u770B\u602A\u7269\u63CF\u8FF0\u3002\u4F46\u8FD9\u4E0D\u662F\u8FD9\u4E00\u680F\u7684\u6838\u5FC3\u529F\u80FD\u3002","\u8FD9\u4E00\u680F\u7684\u6838\u5FC3\u529F\u80FD\u662F\u6807\u8BB0\u602A\u7269\u3002\u88AB\u6807\u8BB0\u7684\u602A\u7269\u4F1A\u6709\u4E00\u4E9B\u975E\u5E38\u65B9\u4FBF\u7684\u884C\u4E3A\uFF0C\u8FD9\u4E9B\u884C\u4E3A\u53EF\u4EE5\u5728\u201C\u6807\u8BB0\u602A\u7269\u201D\u6761\u76EE\u4E2D\u67E5\u770B\u3002","<br>","<br>","\u6CE8\u610F\uFF0C\u5728\u602A\u7269\u8BE6\u7EC6\u4FE1\u606F\u4E2D\uFF0C\u9664\u8BE6\u7EC6\u4E34\u754C\u680F\u5916\u5747\u53EF\u4EE5\u901A\u8FC7\u70B9\u51FB\u5C4F\u5E55\u8FD4\u56DE\u5230\u602A\u7269\u624B\u518C\u754C\u9762\u3002",'\u5982\u679C\u4F60\u662F\u7535\u8111\u7AEF\uFF0C\u5728\u4EFB\u610F\u680F\u76EE\u4E2D<span style="color: gold">\u6309\u4E0BX\u952E</span>\u4F1A\u9000\u51FA\u602A\u7269\u624B\u518C\uFF0C\u8FD4\u56DE\u6E38\u620F\uFF0C','<span style="color: gold">\u6309\u4E0B\u56DE\u8F66\uFF08Enter\uFF09\u952E</span>\u4F1A\u56DE\u5230\u602A\u7269\u624B\u518C\u754C\u9762\u3002']},fly={text:"\u697C\u5C42\u4F20\u9001\u5668",condition:"true",desc:["\u697C\u4F20\u754C\u9762\u6253\u5F00\u65F6\u4F1A\u6709\u4E00\u4E2A0.6\u79D2\u7684\u52A8\u753B\uFF0C\u5982\u679C\u4E0D\u60F3\u8981\u53EF\u4EE5\u5728\u5F00\u5934\u6361\u7684\u7CFB\u7EDF\u8BBE\u7F6E\u91CC\u9762\u5173\u95ED\u3002\uFF08\u9ED8\u8BA4\u5173\u95ED\uFF09","<br>","<br>",'\u672C\u5854\u7684\u697C\u5C42\u4F20\u9001\u5668\u662F\u4E00\u4E2A\u96C6<span style="color: gold">\u5206\u533A\u3001\u5C0F\u5730\u56FE\u3001\u697C\u5C42\u4F20\u9001\u3001\u6D4F\u89C8\u5730\u56FE</span>\u4E8E\u4E00\u4F53\u7684\u591A\u529F\u80FD\u697C\u4F20\u3002',"\u4E0B\u9762\u662F\u697C\u4F20\u7684\u5177\u4F53\u8BF4\u660E\uFF1A","<br>","<br>","\u9996\u5148\uFF0C\u5BF9\u4E8E\u7535\u8111\u7AEF\uFF0C\u6700\u5DE6\u4FA7\u663E\u793A\u533A\u57DF\u4FE1\u606F\uFF0C\u624B\u673A\u7AEF\u5219\u5728\u4E0A\u65B9\u7684\u5DE6\u4FA7\u3002","<br>","<br>","\u7136\u540E\uFF0C\u533A\u57DF\u7684\u53F3\u4FA7\u662F\u5C0F\u5730\u56FE\u680F\uFF0C\u8FD9\u4E00\u680F\u4F1A\u663E\u793A\u697C\u5C42\u7684\u5E73\u9762\u7ED3\u6784\u3002\u4F60\u53EF\u4EE5\u62D6\u52A8\uFF0C\u4E5F\u53EF\u4EE5\u4F7F\u7528\u6EDA\u8F6E\u6216\u8005\u53CC\u6307\u653E\u7F29\uFF0C\u5F53\u653E\u7F29\u5230\u4E00\u5B9A\u5927\u5C0F\u65F6\uFF0C","\u4F1A\u663E\u793A\u5730\u56FE\u7684\u7F29\u7565\u56FE\u3002\u76F4\u63A5\u70B9\u51FB\u5730\u56FE\u4E5F\u53EF\u4EE5\u9009\u4E2D\u5730\u56FE\uFF0C\u518D\u6B21\u70B9\u51FB\u4F1A\u4F20\u9001\u81F3\u76EE\u6807\u5730\u56FE\u3002","<br>","<br>","\u5BF9\u4E8E\u7535\u8111\u7AEF\uFF0C\u6700\u53F3\u4FA7\u662F\u5F53\u524D\u9009\u4E2D\u7684\u5730\u56FE\u7684\u7F29\u7565\u56FE\uFF0C\u624B\u673A\u5219\u5728\u4E0B\u65B9\uFF0C\u70B9\u51FB\u7F29\u7565\u56FE\u4E5F\u53EF\u4EE5\u4F20\u9001\u3002\u7F29\u7565\u56FE\u7684\u4E0B\u65B9\u662F\u5F53\u524D\u9009\u4E2D\u7684\u5730\u56FE\u540D\uFF0C","\u5DE6\u53F3\u5404\u6709\u4E24\u4E2A\u6309\u94AE\uFF0C\u8868\u793A\u540E\u900010\u5C42\u3001\u540E\u90001\u5C42\u3001\u524D\u8FDB1\u5C42\u3001\u524D\u8FDB10\u5C42\uFF0C\u4E0E\u6837\u677F\u7684\u697C\u4F20\u7684\u6309\u94AE\u529F\u80FD\u7C7B\u4F3C\uFF0C\u5BF9\u4E8E\u5C0F\u5730\u56FE\u65E0\u6CD5\u663E\u793A\u7684\u5355\u5C42\uFF0C","\u53EF\u4EE5\u4F7F\u7528\u8BE5\u529F\u80FD\u5230\u8FBE\u3002","<br>","<br>","\u6700\u4E0B\u65B9\u662F\u8BBE\u7F6E\u6309\u94AE\uFF0C\u53EF\u4EE5\u5207\u6362\u65E0\u8FB9\u6846\u6A21\u5F0F\uFF0C\u7535\u8111\u7AEF\u8FD8\u53EF\u4EE5\u5207\u6362\u4F20\u7EDF\u6309\u952E\u6A21\u5F0F\uFF0C\u4F20\u7EDF\u6309\u952E\u6A21\u5F0F\u4E0B\u6309\u952E\u9075\u5FAA\u6837\u677F\u7684\u697C\u4F20\u6309\u952E\u65B9\u5F0F\u3002",'\u5BF9\u4E8E\u975E\u4F20\u7EDF\u6A21\u5F0F\uFF0C<span style="color: gold">\u4E0A\u4E0B\u5DE6\u53F3</span>\u53EF\u4EE5\u79FB\u52A8\u5730\u56FE\uFF0C','<span style="color: gold">PageUp\u548CPageDown</span>\u53EF\u4EE5\u524D\u8FDB1\u5C42\u6216\u540E\u90001\u5C42\u3002']},tools={text:"\u9053\u5177\u680F\u4E0E\u88C5\u5907\u680F",condition:"true",desc:["\u9053\u5177\u680F\u4E0E\u88C5\u5907\u680F\u6253\u5F00\u65F6\u4F1A\u6709\u4E00\u4E2A0.6\u79D2\u7684\u52A8\u753B\uFF0C\u5982\u679C\u4E0D\u60F3\u8981\u53EF\u4EE5\u5728\u5F00\u5934\u6361\u7684\u7CFB\u7EDF\u8BBE\u7F6E\u91CC\u9762\u5173\u95ED\u3002\uFF08\u9ED8\u8BA4\u5173\u95ED\uFF09","<br>","<br>","\u672C\u5854\u7684\u9053\u5177\u680F\u6CA1\u6709\u7279\u522B\u4E4B\u5904\uFF0C\u8FD9\u91CC\u4E0D\u9700\u8981\u8BF4\u660E\u3002\u4E3B\u8981\u662F\u88C5\u5907\u680F\u3002","<br>","<br>","\u672C\u5854\u7684\u88C5\u5907\u680F\u624B\u673A\u548C\u7535\u8111\u7AEF\u4E0D\u540C\uFF0C\u7535\u8111\u7AEF\u6BD4\u624B\u673A\u7AEF\u591A\u4E86\u4E00\u4E2A\u52C7\u58EB\u5C5E\u6027\u7684\u663E\u793A\u3002\u5728\u88C5\u5907\u680F\u7684\u88C5\u5907\u5217\u8868\u680F\uFF0C","\u4E0A\u65B9\u6709\u4E24\u4E2A\u9009\u62E9\u6846\u4E0E\u4E00\u4E2A\u6392\u5E8F\u65B9\u5F0F\u7684\u9009\u9879\u3002\u8FD9\u4E09\u4E2A\u53EF\u4EE5\u7B5B\u9009\u4F60\u62E5\u6709\u7684\u88C5\u5907\u5E76\u8FDB\u884C\u6392\u5E8F\uFF0C\u4ECE\u800C\u8BA9\u4F60\u80FD\u591F\u66F4\u6E05\u695A\u5730\u77E5\u9053\u54EA\u4E2A\u88C5\u5907\u66F4\u5F3A\u3002","\u7B2C\u4E00\u4E2A\u9009\u62E9\u6846\u53EF\u4EE5\u7B5B\u9009\u88C5\u5907\u589E\u52A0\u7684\u5C5E\u6027\uFF0C\u5982\u679C\u88C5\u5907\u4E0D\u589E\u52A0\u9009\u62E9\u7684\u5C5E\u6027\uFF0C\u90A3\u4E48\u4F1A\u4E0D\u663E\u793A\u3002\u7B2C\u4E8C\u4E2A\u9009\u62E9\u6846\u53EF\u4EE5\u7B5B\u9009\u589E\u52A0\u7684\u5C5E\u6027\u7684\u65B9\u5F0F\uFF0C","\u6709\u6570\u503C\u589E\u52A0\u548C\u767E\u5206\u6BD4\u589E\u52A0\u4E24\u79CD\u3002\u5728\u8FD9\u4E2A\u9009\u62E9\u6846\u53F3\u8FB9\u6709\u4E00\u4E2A\u56FE\u6807\uFF0C\u8FD9\u4E2A\u56FE\u6807\u53EF\u4EE5\u6539\u53D8\u6B66\u5668\u7684\u6392\u5E8F\u65B9\u5F0F\uFF0C\u6709\u5347\u5E8F\u548C\u964D\u5E8F\u4E24\u79CD\uFF0C\u9ED8\u8BA4\u4E3A\u5347\u5E8F\u3002","\u4F8B\u5982\uFF0C\u4F60\u62E5\u6709\u4E24\u4E2A\u88C5\u5907\uFF0C\u5206\u522B\u589E\u52A010\u653B\u51FB\u548C20\u653B\u51FB\uFF0C\u4E09\u8005\u4F60\u5206\u522B\u9009\u62E9\u4E86\u653B\u51FB\uFF0C\u6570\u503C\uFF0C\u5347\u5E8F\uFF0C\u90A3\u4E48\u589E\u52A010\u653B\u51FB\u7684\u88C5\u5907\u4F1A\u6392\u5728\u4E0A\u9762\uFF0C","\u800C\u589E\u52A020\u653B\u51FB\u7684\u88C5\u5907\u4F1A\u6392\u5728\u4E0B\u9762\u3002","<br>","<br>","\u5BF9\u4E8E\u7535\u8111\u7AEF\uFF0C\u5982\u679C\u4F60\u60F3\u88C5\u88C5\u5907\uFF0C\u53EF\u4EE5\u76F4\u63A5\u62D6\u52A8\u88C5\u5907\u81F3\u88C5\u5907\u5B54\uFF0C\u4E5F\u53EF\u4EE5\u9009\u4E2D\u88C5\u5907\u540E\u518D\u6B21\u70B9\u51FB\u3002\u624B\u673A\u7AEF\u6682\u65F6\u65E0\u6CD5\u62D6\u52A8\u88C5\u5907\u3002\u5F53\u9009\u4E2D\u4E00\u4E2A\u88C5\u5907\u540E\uFF0C","\u7535\u8111\u7AEF\u548C\u624B\u673A\u7AEF\u5747\u4F1A\u663E\u793A\u88C5\u5907\u589E\u52A0\u6216\u51CF\u5C11\u7684\u5C5E\u6027\uFF0C\u6CE8\u610F\u6709\u7684\u88C5\u5907\u53EF\u80FD\u4E0D\u589E\u52A0\u5C5E\u6027\u4F46\u662F\u6709\u7279\u6B8A\u529F\u80FD\u3002\u5BF9\u4E8E\u7535\u8111\u7AEF\uFF0C","\u8FD8\u4F1A\u76F4\u63A5\u5728\u52C7\u58EB\u5C5E\u6027\u680F\u663E\u793A\u589E\u52A0\u6216\u51CF\u5C11\u7684\u5C5E\u6027\u3002"]},skillTree={text:"\u6280\u80FD\u6811",condition:"flags.chapter > 0",desc:['\u6253\u5F00\u6280\u80FD\u6811\u53EF\u4EE5\u70B9\u51FB\u72B6\u6001\u680F\u7684<span style="color: gold">',"\u6280\u80FD\u6811\u6309\u94AE</span>\uFF08\u5982\u679C\u53D1\u73B0\u6CA1\u6709\u663E\u793A\u53EF\u4EE5\u5C1D\u8BD5\u4E0A\u4E0B\u6EDA\u52A8\u72B6\u6001\u680F\uFF09\uFF0C\u8FD8\u53EF\u4EE5\u6309",'<span style="color: gold">\u5FEB\u6377\u952EJ</span>\u6253\u5F00\u3002',"<br>","<br>","\u6280\u80FD\u6811\u662F\u672C\u5854\u7684\u4E3B\u8981\u73A9\u6CD5\u4E4B\u4E00\u3002\u5B83\u53EF\u4EE5\u8BA9\u4F60\u4F7F\u7528\u667A\u6167\u6765\u5B66\u4E60\u6280\u80FD\uFF0C\u589E\u52A0\u5C5E\u6027\u7B49\u3002\u667A\u6167\u5728\u72B6\u6001\u680F\u663E\u793A\u5728\u9632\u5FA1\u7684\u4E0B\u4E00\u9879\uFF0C","\u7EFF\u5B9D\u77F3\u53EF\u4EE5\u589E\u52A0\u52C7\u58EB\u7684\u667A\u6167\u3002","<br>","<br>","\u6253\u5F00\u6280\u80FD\u6811\u9875\u9762\u540E\uFF0C\u4F60\u53EF\u4EE5\u5728\u4E0A\u65B9\u770B\u5230\u6280\u80FD\u7684\u540D\u79F0\u4E0E\u63CF\u8FF0\uFF0C\u4E0B\u65B9\u4F1A\u663E\u793A\u6280\u80FD\u6811\uFF0C\u4EE5\u53CA\u5347\u7EA7\u8981\u6C42\u7B49\u3002\u70B9\u51FB\u4E00\u4E2A\u6280\u80FD\u53EF\u4EE5\u9009\u4E2D\u6280\u80FD\uFF0C","\u518D\u6B21\u70B9\u51FB\u53EF\u4EE5\u5347\u7EA7\u6280\u80FD\u3002\u6CE8\u610F\uFF0C\u524D\u7F6E\u6280\u80FD\u680F\u53EF\u4EE5\u4E0A\u4E0B\u6EDA\u52A8\uFF0C\u56E0\u6B64\u5982\u679C\u53D1\u73B0\u663E\u793A\u4E0D\u5168\uFF0C\u53EF\u4EE5\u5C1D\u8BD5\u4E0A\u4E0B\u6EDA\u52A8\u524D\u7F6E\u6280\u80FD\u680F","<br>","<br>","\u6CE8\u610F\uFF0C\u6280\u80FD\u5728\u70B9\u5F00\u4E4B\u540E\u662F\u65E0\u6CD5\u53D6\u6D88\u7684\uFF0C\u56E0\u6B64\uFF0C\u52A0\u70B9\u65F6\u8BF7\u614E\u91CD\u52A0\u70B9\u3002\u6CE8\u610F\uFF0C\u90E8\u5206\u6280\u80FD\u662F\u5FC5\u70B9\u6280\u80FD\uFF0C\u8FD9\u4E9B\u6280\u80FD\u4F1A\u5728\u6280\u80FD\u8BF4\u660E\u4E2D\u660E\u786E\u6307\u51FA\uFF0C","\u8FD9\u4E9B\u6280\u80FD\u4E00\u822C\u9700\u8981\u5C3D\u65E9\u70B9\u51FA\u3002"]},study={text:"\u5B66\u4E60",condition:"core.getSkillLevel(11) > 0",desc:["\u672C\u6761\u76EE\u4F1A\u8BE6\u7EC6\u8BF4\u660E\u5B66\u4E60\u7684\u673A\u5236\u4E0E\u6240\u6709\u53EF\u4EE5\u88AB\u5B66\u4E60\u7684\u6280\u80FD\u88AB\u5B66\u4E60\u540E\u7684\u6548\u679C\u3002\u5F53\u524D\u5DF2\u7ECF\u5B66\u4E60\u7684\u6280\u80FD\u4F1A\u4EE5\u4E0E\u72B6\u6001\u680F\u7C7B\u4F3C\u7684\u76D2\u5B50\u5C55\u793A\u51FA\u6765\u3002","<br>","<br>","\u9996\u5148\uFF0C\u5B66\u4E60\u6280\u80FD\u6D88\u8017\u7684\u667A\u6167\u70B9\u4F1A\u8D8A\u6765\u8D8A\u591A\uFF0C\u521D\u59CB\u6D88\u8017\u7684\u667A\u6167\u70B9\u4E3A500\uFF0C\u6BCF\u5B66\u4E60\u4E00\u6B21\u589E\u52A0250\u3002","\u5B66\u4E60\u7684\u6280\u80FD\u53EF\u4EE5\u6301\u7EED5\u573A\u6218\u6597\uFF0C\u5728\u6280\u80FD\u6811\u754C\u9762\u6BCF\u5347\u7EA7\u4E00\u6B21\u589E\u52A03\u573A\uFF0C",'<span style="color: gold">\u5F53\u524D\u4E3A${core.getSkillLevel(11) * 3 + 2}\u573A</span>\u3002',"\u5B66\u4E60\u540E\u5BF9\u5E94\u5C5E\u6027\u7684\u503C\uFF0C\u4F8B\u5982\u62B1\u56E2\u602A\u589E\u52A0\u7684\u5C5E\u6027\u767E\u5206\u6BD4\uFF0C\u4F1A\u4E0E\u88AB\u5B66\u4E60\u7684\u602A\u7269\u76F8\u540C\u3002\u5B66\u4E60\u754C\u9762\u53EF\u4EE5\u4F7F\u7528\u80CC\u5305\u4E2D\u7684\u9053\u5177\u6216\u70B9\u51FB\u72B6\u6001\u680F\u6253\u5F00\u3002","<br>","<br>","\u4E0B\u9762\u4F1A\u8BE6\u7EC6\u8BF4\u660E\u6BCF\u4E00\u79CD\u53EF\u4EE5\u88AB\u5B66\u4E60\u7684\u6280\u80FD\u88AB\u5B66\u4E60\u540E\u7684\u6548\u679C\uFF0C\u6CA1\u6709\u5217\u51FA\u7684\u5747\u4E0D\u53EF\u5B66\u4E60\u3002","<br>","<br>",'<span style="color: #fc3">1. \u81F4\u547D\u4E00\u51FB</span>\uFF1A\u52C7\u58EB\u6BCF5\u56DE\u5408\u5BF9\u602A\u7269\u9020\u6210\u4E00\u6B21\u5F3A\u529B\u653B\u51FB\u3002',"<br>",'<span style="color: #bbb0ff">2. \u6076\u6BD2</span>\uFF1A\u52C7\u58EB\u653B\u51FB\u65E0\u89C6\u602A\u7269\u7684\u9632\u5FA1\u3002',"<br>",'<span style="color: #c0b088">3. \u575A\u56FA</span>\uFF1A\u52C7\u58EB\u9632\u5FA1\u4E0D\u4F4E\u4E8E\u602A\u7269\u7684\u653B\u51FB-1\u3002',"<br>",'<span style="color: #fe7">4. n\u8FDE\u51FB</span>\uFF1A\u52C7\u58EB\u6BCF\u56DE\u5408\u653B\u51FBn\u6B21',"<br>",'<span style="color: #b30000">5. \u9965\u6E34</span>\uFF1A\u52C7\u58EB\u5728\u6218\u524D\u5438\u53D6\u602A\u7269\u4E00\u5B9A\u91CF\u7684\u653B\u51FB\u52A0\u8F7D\u81EA\u5DF1\u8EAB\u4E0A\uFF0C',"\u540C\u65F6\u51CF\u5C11\u602A\u7269\u76F8\u5E94\u91CF\u7684\u653B\u51FB\uFF0C\u4F18\u5148\u4E8E\u602A\u7269\u3002","<br>",'<span style="color: #fa4">6. \u62B1\u56E2</span>\uFF1A\u52C7\u58EB\u5468\u56F4\u6BCF\u6709\u4E00\u4E2A\u62E5\u6709\u62B1\u56E2\u5C5E\u6027\u7684\u602A\u7269\uFF0C\u52C7\u58EB\u7684\u5C5E\u6027\u4FBF\u589E\u52A0\u4E00\u5B9A\u503C\u3002',"\u76F8\u5E94\u5730\uFF0C\u62E5\u6709\u62B1\u56E2\u5C5E\u6027\u7684\u602A\u7269\u4E5F\u4F1A\u53D7\u5230\u52C7\u58EB\u7684\u52A0\u6210\u3002","<br>",'<span style="color: #b0c0dd">7. \u52C7\u6C14\u4E4B\u5203</span>\uFF1A\u52C7\u58EB\u7B2C\u4E00\u56DE\u5408\u9020\u6210\u4E00\u5B9A\u91CF\u7684\u4F24\u5BB3\uFF0C\u4E4B\u540E\u6B63\u5E38\u3002',"<br>",'<span style="color: #ff00d2">8. \u52C7\u6C14\u51B2\u950B</span>\uFF1A\u52C7\u58EB\u9996\u5148\u53D1\u52A8\u51B2\u950B\uFF0C\u9020\u6210\u4E00\u5B9A\u91CF\u7684\u4F24\u5BB3\uFF0C\u7729\u6655\u602A\u72695\u56DE\u5408\u3002',"\u5B66\u4E60\u8BE5\u6280\u80FD\u540E\uFF0C\u52C7\u58EB\u65E0\u6761\u4EF6\u5148\u624B\u3002","<br>",'<span style="color: #bbb0ff">9. \u9B54\u653B</span>\uFF1A\u52C7\u58EB\u653B\u51FB\u65E0\u89C6\u602A\u7269\u7684\u9632\u5FA1\u3002',"<br>",'<span style="color: #b0b666">10. \u5148\u653B</span>\uFF1A\u52C7\u58EB\u65E0\u6761\u4EF6\u5148\u624B\u3002']},special1={text:"\u7B2C\u4E00\u7AE0\u602A\u7269\u7279\u6280",condition:"flags.chapter > 0",desc:["\u8FD9\u91CC\u4F1A\u5C55\u793A\u7B2C\u4E00\u7AE0\u7684\u602A\u7269\u4E2D\u9700\u8981\u7279\u522B\u8BF4\u660E\u7684\u602A\u7269\u7279\u6280\u3002","<br>","<br>",'<span style="color: #c0b088">1. \u575A\u56FA</span>\uFF1A',"\u5728\u672C\u5854\u4E2D\uFF0C\u989D\u5916\u653B\u51FB\u53EF\u4EE5\u5BF9\u575A\u56FA\u602A\u9020\u6210\u989D\u5916\u4F24\u5BB3\u3002","<br>","<br>",'<span style="color: #80eed6">2. \u7EDD\u5BF9\u9632\u5FA1</span>\uFF1A',"\u8BE5\u602A\u7269\u4E00\u822C\u53EF\u4EE5\u7528\u4E8E\u5237\u8840\u3002\u8BE5\u602A\u7269\u53EF\u4EE5\u4F7F\u4F60\u6BCF\u56DE\u5408\u5BF9\u602A\u7269\u9020\u6210\u7684\u4F24\u5BB3\u6070\u597D\u4E3A1\uFF0C\u5BFC\u81F4\u6218\u6597\u56DE\u5408\u6570\u5F88\u9AD8\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5237\u8840\u3002","<br>","<br>",'<span style="color: #fc3">3. \u81F4\u547D\u4E00\u51FB\u3001\u52C7\u6C14\u4E4B\u5203\u3001\u52C7\u6C14\u51B2\u950B</span>\uFF1A',"\u9020\u6210\u7684\u4F24\u5BB3\u4E3A\u602A\u7269\u6BCF\u56DE\u5408\u5BF9\u52C7\u58EB\u7684\u4F24\u5BB3\u7684\u4E00\u5B9A\u500D\u6570\uFF0C\u800C\u975E\u653B\u51FB\u63D0\u9AD8\u4E00\u5B9A\u500D\u6570\u3002"]},special2={text:"\u7B2C\u4E8C\u7AE0\u602A\u7269\u7279\u6280",condition:"flags.chapter > 1",desc:["\u8FD9\u91CC\u4F1A\u5C55\u793A\u7B2C\u4E8C\u7AE0\u7684\u602A\u7269\u4E2D\u9700\u8981\u7279\u522B\u8BF4\u660E\u7684\u602A\u7269\u7279\u6280\u3002","<br>","<br>",'<span style="color: #f66">1. \u7535\u6447\u5632\u8BBD</span>\uFF1A',"\u8BE5\u7279\u6280\u4F1A\u649E\u788E\u8DEF\u4E0A\u7684\u6240\u6709\u5730\u5F62\u548C\u95E8\uFF0C\u4E0D\u9700\u8981\u6D88\u8017\u94A5\u5319\uFF0C\u62FE\u53D6\u8DEF\u4E0A\u7684\u6240\u6709\u9053\u5177\uFF0C\u4E0E\u8DEF\u4E0A\u7684\u602A\u7269\u6218\u6597\uFF0C\u6700\u540E\u4E0E\u8BE5\u602A\u7269\u6218\u6597\u3002","\u5982\u679C\u602A\u7269\u6240\u5728\u4F4D\u7F6E\u53EF\u4EE5\u88AB\u5632\u8BBD\uFF0C\u90A3\u4E48\u52C7\u58EB\u4F1A\u88AB\u7EE7\u7EED\u5632\u8BBD\u3002\u5982\u679C\u5728\u88AB\u5632\u8BBD\u7684\u8DEF\u4E0A\u53EF\u4EE5\u88AB\u5176\u4ED6\u602A\u7269\u5632\u8BBD\uFF0C\u5219\u4E0D\u4F1A\u89E6\u53D1\u3002","\u5982\u679C\u4E00\u4E2A\u70B9\u53EF\u4EE5\u88AB\u591A\u4E2A\u602A\u7269\u5632\u8BBD\uFF0C\u90A3\u4E48\u4F1A\u4F18\u5148\u9009\u62E9\u6700\u9760\u5DE6\u4E0A\u89D2\u7684\u602A\u7269\u3002",'<span style="color: gold">\u5728\u88AB\u5632\u8BBD\u4E4B\u524D\u4F1A\u81EA\u52A8\u5B58\u6863\u3002</span>',"<br>","<br>",'<span style="color: #d8a">2. \u6C38\u591C</span>\u3001<span style="color: #ffd">\u6781\u663C</span>\uFF1A',"\u6218\u6597\u540E\u4F1A\u5728\u672C\u697C\u5C42\u4E2D\u52A0\u51CF\u602A\u7269\u4E0E\u52C7\u58EB\u7684\u653B\u9632\uFF0C\u6BCF\u4E2A\u697C\u5C42\u4F1A\u5355\u72EC\u5B58\u50A8\u3002\u4F8B\u5982\u4F60\u57281\u697C\u5C42\u589E\u52A0\u4E86100\u70B9\u653B\u51FB\uFF0C2\u697C\u5C42\u51CF\u5C11\u4E86100\u70B9\u653B\u51FB\uFF0C","\u90A3\u4E48\u5F53\u4F60\u4ECE2\u697C\u5C42\u52301\u697C\u5C42\u65F6\uFF0C\u653B\u51FB\u4F1A\u589E\u52A0200\u70B9\uFF0C\u53CD\u4E4B\u4EA6\u7136\u3002\u6CE8\u610F\u8FD9\u91CC\u6CA1\u6709\u8BA1\u7B97buff\u3002"]},desc={tip,about,tutorial,noun,shortcut,extraAttr,statusBar,markEnemy,book,fly,tools,skillTree,study,special1,special2},_hoisted_1$d={id:"desc-list"},_hoisted_2$a=["selected","show","onClick"],_hoisted_3$a={key:0},_hoisted_4$8=["innerHTML"],_sfc_main$d=defineComponent({__name:"desc",setup(__props){const selected=ref(Object.keys(desc)[0]);function exit(){core.plugin.descOpened.value=!1}const content=computed(()=>eval("`"+splitText(desc[selected.value].desc)+"`"));function click(key){!eval(desc[key].condition)||(selected.value=key)}function show(condition){return eval(condition)}return(t,e)=>(openBlock(),createBlock(Column,{onClose:exit,width:80,height:80,left:30,right:70},{left:withCtx(()=>[createBaseVNode("div",_hoisted_1$d,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(desc),(i,s)=>(openBlock(),createElementBlock("div",{class:"selectable desc-item",selected:selected.value===s,show:show(i.condition),onClick:n=>click(s)},[show(i.condition)?(openBlock(),createElementBlock("span",_hoisted_3$a,toDisplayString(i.text),1)):createCommentVNode("",!0)],8,_hoisted_2$a))),256))])]),right:withCtx(()=>[createBaseVNode("span",{innerHTML:unref(content)},null,8,_hoisted_4$8)]),_:1}))}}),desc_vue_vue_type_style_index_0_scoped_bcbf0734_lang="",Desc=_export_sfc(_sfc_main$d,[["__scopeId","data-v-bcbf0734"]]),none={text:"\u65E0",opened:"true",desc:["\u5F53\u524D\u672A\u9009\u62E9\u6280\u80FD"]},blade={text:"1\uFF1A\u65AD\u706D\u4E4B\u5203",opened:"core.getSkillLevel(2) > 0",desc:['<span style="color: gold">\u5FEB\u6377\u952E1</span>\uFF0C\u5F00\u542F\u540E\u52C7\u58EB\u653B\u51FB\u589E\u52A0${level:2 * 10}%\uFF0C',"\u540C\u65F6\u9632\u5FA1\u51CF\u5C11${level:2 * 10}%\u3002","<br>","<br>","\u5F53\u524D\u7B49\u7EA7\uFF1A${level:2}"]},jump={text:"2\uFF1A\u8DF3\u8DC3",opened:"flags.skill2 === true",desc:['<span style="color: gold">\u5FEB\u6377\u952E2</span>\uFF0C\u6D88\u8017200\u70B9\u751F\u547D\u503C\uFF0C\u56F0\u96BE\u6D88\u8017400\u70B9\uFF0C\u4E00\u4E2A\u5730\u56FE\u53EA\u80FD\u4F7F\u75283\u6B21\uFF0C',"\u5982\u679C\u524D\u65B9\u4E3A\u53EF\u901A\u884C\u7684\u5730\u9762\uFF0C\u5219\u4E0D\u80FD\u4F7F\u7528\u8BE5\u6280\u80FD\uFF0C\u5982\u679C\u524D\u65B9\u4E3A\u602A\u7269\uFF0C\u5219\u5C06\u602A\u7269\u79FB\u81F3\u52C7\u58EB\u89C6\u7EBF\u4E0A\u7B2C\u4E00\u4E2A\u4E0D\u80FD\u901A\u884C\u7684\u65B9\u5757\u540E","\u5982\u679C\u524D\u65B9\u4E3A\u969C\u788D\u7269\uFF0C\u5219\u76F4\u63A5\u8DF3\u5230\u8BE5\u969C\u788D\u7269\u7684\u540E\u65B9\u3002","<br>","<br>","\u8FDB\u5165\u7B2C\u4E8C\u7AE0\u540E\u4E0D\u518D\u6D88\u8017\u751F\u547D\u503C\u3002"]},shield={text:"3\uFF1A\u94F8\u5251\u4E3A\u76FE",opened:"core.getSkillLevel(10) > 0",desc:['<span style="color: gold">\u5FEB\u6377\u952E3</span>\uFF0C\u5F00\u542F\u540E\u52C7\u58EB\u9632\u5FA1\u589E\u52A0${level:10 * 10}%\uFF0C',"\u540C\u65F6\u653B\u51FB\u51CF\u5C11${level:10 * 10}%\u3002","<br>","<br>","\u5F53\u524D\u7B49\u7EA7\uFF1A${level:10}"]},skills={none,blade,jump,shield},_hoisted_1$c={id:"skill-list"},_hoisted_2$9=["selected","selectable","onClick"],_hoisted_3$9=["innerHTML"],_sfc_main$c=defineComponent({__name:"skill",setup(__props){const selected=ref("none");function skillOpened(skill){return eval(skills[skill].opened)}function select(t){!skillOpened(t)||(selected.value=t)}const content=computed(()=>eval("`"+skills[selected.value].desc.map((t,e,i)=>/^\d+\./.test(t)?`${" ".repeat(12)}${t}`:has(i[e-1])&&t!=="<br>"&&i[e-1]==="<br>"||e===0?`${" ".repeat(8)}${t}`:t).join("").replace(/level:(\d+)/g,"core.getSkillLevel($1)")+"`"));function exit(){core.plugin.skillOpened.value=!1}return(t,e)=>(openBlock(),createBlock(Column,{onClose:exit,width:70,height:70},{left:withCtx(()=>[createBaseVNode("div",_hoisted_1$c,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(skills),(i,s)=>(openBlock(),createElementBlock("span",{class:"selectable skill-item",selected:s===selected.value,selectable:skillOpened(s),onClick:n=>select(s)},toDisplayString(i.text),9,_hoisted_2$9))),256))])]),right:withCtx(()=>[createBaseVNode("span",{innerHTML:unref(content)},null,8,_hoisted_3$9)]),_:1}))}}),skill_vue_vue_type_style_index_0_scoped_9f619ff1_lang="",Skill=_export_sfc(_sfc_main$c,[["__scopeId","data-v-9f619ff1"]]),_withScopeId$4=t=>(pushScopeId("data-v-b1be4e88"),t=t(),popScopeId(),t),_hoisted_1$b={id:"skill-tree"},_hoisted_2$8={id:"tools"},_hoisted_3$8={id:"skill-title"},_hoisted_4$7={id:"skill-info"},_hoisted_5$6=["innerHTML"],_hoisted_6$5={id:"skill-effect"},_hoisted_7$5=["innerHTML"],_hoisted_8$4=["innerHTML"],_hoisted_9$4={id:"skill-bottom"},_hoisted_10$4=_withScopeId$4(()=>createBaseVNode("canvas",{id:"skill-canvas"},null,-1)),_hoisted_11$4={id:"skill-upgrade-info"},_hoisted_12$3={id:"skill-level"},_hoisted_13$3={key:1,id:"skill-consume",style:{color:"gold"}},_hoisted_14$3={id:"skill-front"},_hoisted_15$2=_withScopeId$4(()=>createBaseVNode("span",null,"\u524D\u7F6E\u6280\u80FD",-1)),_hoisted_16$2={id:"skill-chapter"},_sfc_main$b=defineComponent({__name:"skillTree",setup(__props){var t;let canvas,ctx;const selected=ref(0),chapter=ref("chapter1"),update=ref(!1),chapterDict={chapter1:"\u7B2C\u4E00\u7AE0",chapter2:"\u7B2C\u4E8C\u7AE0"};(t=flags.skillTree)!=null||(flags.skillTree=0);const chapterList=Object.keys(core.plugin.skills);selected.value=core.plugin.skills[chapterList[flags.skillTree]][0].index,chapter.value=chapterList[flags.skillTree],watch(selected,draw),watch(update,()=>mdef.value=core.status.hero.mdef);const mdef=ref(core.status.hero.mdef),skill=computed(()=>(update.value,core.getSkillFromIndex(selected.value))),skills=computed(()=>core.plugin.skills[chapter.value]),desc=computed(()=>eval("`"+splitText(skill.value.desc).replace(/level(:\d+)?/g,(e,i)=>i?`core.getSkillLevel(${i})`:`core.getSkillLevel(${skill.value.index})`)+"`")),effect=computed(()=>[0,1].map(v=>eval(`\`${v===0?"\u5F53\u524D\u6548\u679C\uFF1A":"\u4E0B\u4E00\u7EA7\u6548\u679C\uFF1A"}`+skill.value.effect.join("").replace(/level(:\d+)?/g,(e,i)=>i?`(core.getSkillLevel(${i}) + ${v})`:`(core.getSkillLevel(${skill.value.index}) + ${v})`)+"`"))),dict=computed(()=>{const e={};return skills.value.forEach((s,n)=>{e[s.index]=n}),e}),front=computed(()=>skill.value.front.map(e=>`${core.getSkillLevel(e[0])>=e[1]?"a":"b"}${e[1]}\u7EA7 ${skills.value[dict.value[e[0]]].title}`)),consume=computed(()=>(update.value,core.getSkillConsume(selected.value))),level=computed(()=>(update.value,core.getSkillLevel(selected.value)));function exit(){core.plugin.skillTreeOpened.value=!1}function resize(){const e=getComputedStyle(canvas);canvas.width=parseFloat(e.width)*devicePixelRatio,canvas.height=parseFloat(e.height)*devicePixelRatio}function draw(){const e=dict.value,s=canvas.width/11;ctx.clearRect(0,0,canvas.width,canvas.height),skills.value.forEach(n=>{const[a,r]=n.loc.map(l=>l*2-1);n.front.forEach(([l],c)=>{const d=skills.value[e[l]];ctx.beginPath(),ctx.moveTo(a*s+s/2,r*s+s/2),ctx.lineTo(...d.loc.map(u=>(u*2-1)*s+s/2)),core.getSkillLevel(d.index)<n.front[c][1]?ctx.strokeStyle="#aaa":core.getSkillLevel(d.index)===d.max?ctx.strokeStyle="#ff0":ctx.strokeStyle="#0f8",ctx.lineWidth=devicePixelRatio,ctx.stroke()})}),skills.value.forEach(n=>{const[a,r]=n.loc.map(d=>d*2-1),l=core.getSkillLevel(n.index);ctx.save(),ctx.lineWidth=s*.06,selected.value===n.index?(ctx.strokeStyle="#ff0",ctx.lineWidth*=2):l===0?ctx.strokeStyle="#888":l===n.max?ctx.strokeStyle="#F7FF68":ctx.strokeStyle="#00FF69",ctx.strokeRect(a*s,r*s,s,s);const c=core.material.images.images[`skill${n.index}.png`];ctx.drawImage(c,a*s,r*s,s,s),selected.value===n.index&&(ctx.fillStyle="#ff04",ctx.fillRect(a*s,r*s,s,s)),ctx.restore()})}function click(e){const i=e.offsetX,s=e.offsetY,a=canvas.width/devicePixelRatio/11,r=Math.floor(i/a),l=Math.floor(s/a);if(r%2!==1||l%2!==1)return;const c=Math.floor(r/2)+1,d=Math.floor(l/2)+1,u=skills.value.find(h=>h.loc[0]===c&&h.loc[1]===d);!u||(selected.value!==u.index?selected.value=u.index:upgrade(u.index))}function upgrade(e){core.upgradeSkill(e)?(tip$1("success","\u5347\u7EA7\u6210\u529F\uFF01"),update.value=!update.value,core.status.route.push(`skill:${selected.value}`)):tip$1("error","\u5347\u7EA7\u5931\u8D25\uFF01")}function key(e){const i=keycode(e.keyCode);(i===KeyCode.Escape||i===KeyCode.KeyX||i===KeyCode.KeyJ)&&exit(),(i===KeyCode.Space||i===KeyCode.Enter||i===KeyCode.KeyC)&&upgrade(selected.value)}onMounted(async()=>{canvas=document.getElementById("skill-canvas"),ctx=canvas.getContext("2d"),resize(),draw(),await S(50),core.plugin.transition.value&&await S(600),canvas.addEventListener("click",click),document.addEventListener("keyup",key)}),onUnmounted(()=>{document.removeEventListener("keyup",key)});function selectChapter(e){const s=chapterList.indexOf(chapter.value)+e;has(chapterList[s])&&flags.chapter>s&&(selected.value=core.plugin.skills[chapterList[s]][0].index,chapter.value=chapterList[s],update.value=!update.value,flags.skillTree=s,draw())}return(e,i)=>{const s=__unplugin_components_0;return openBlock(),createElementBlock("div",_hoisted_1$b,[createBaseVNode("div",_hoisted_2$8,[createBaseVNode("span",{id:"back",class:"button-text tools",onClick:exit},[createVNode(unref(LeftOutlined)),createTextVNode("\u8FD4\u56DE\u6E38\u620F")])]),createBaseVNode("span",_hoisted_3$8,toDisplayString(unref(skill).title),1),createVNode(s,{dashed:"",style:{"border-color":"#ddd4"},id:"divider"}),createBaseVNode("div",_hoisted_4$7,[createVNode(Scroll,{id:"skill-desc","no-scroll":!0},{default:withCtx(()=>[createBaseVNode("span",{innerHTML:unref(desc)},null,8,_hoisted_5$6)]),_:1}),createBaseVNode("div",_hoisted_6$5,[unref(level)>0?(openBlock(),createElementBlock("span",{key:0,innerHTML:unref(effect)[0]},null,8,_hoisted_7$5)):createCommentVNode("",!0),unref(level)<unref(skill).max?(openBlock(),createElementBlock("span",{key:1,innerHTML:unref(effect)[1]},null,8,_hoisted_8$4)):createCommentVNode("",!0)])]),createVNode(s,{dashed:"",style:{"border-color":"#ddd4"},id:"divider-split"}),createBaseVNode("div",_hoisted_9$4,[_hoisted_10$4,createVNode(s,{dashed:"",style:{"border-color":"#ddd4"},type:unref(isMobile)?"horizontal":"vertical",id:"divider-vertical"},null,8,["type"]),createBaseVNode("div",_hoisted_11$4,[createBaseVNode("span",_hoisted_12$3,"\u5F53\u524D\u7B49\u7EA7\uFF1A"+toDisplayString(unref(level))+" / "+toDisplayString(unref(skill).max),1),createVNode(s,{dashed:"",class:"upgrade-divider"}),unref(level)<unref(skill).max?(openBlock(),createElementBlock("span",{key:0,id:"skill-consume",style:normalizeStyle({color:unref(consume)<=mdef.value?"#fff":"#f44"})},"\u5347\u7EA7\u82B1\u8D39\uFF1A"+toDisplayString(unref(consume)),5)):(openBlock(),createElementBlock("span",_hoisted_13$3,"\u5DF2\u6EE1\u7EA7")),createVNode(s,{dashed:"",class:"upgrade-divider"}),createVNode(Scroll,{id:"front-scroll","no-scroll":!0},{default:withCtx(()=>[createBaseVNode("div",_hoisted_14$3,[_hoisted_15$2,(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(front),n=>(openBlock(),createElementBlock("span",{style:normalizeStyle({color:n.startsWith("a")?"#fff":"#f44"})},toDisplayString(n.slice(1)),5))),256))])]),_:1}),createVNode(s,{dashed:"",class:"upgrade-divider"}),createBaseVNode("div",_hoisted_16$2,[createBaseVNode("span",{class:"button-text",onClick:i[0]||(i[0]=n=>selectChapter(-1))},[createVNode(unref(LeftOutlined))]),createTextVNode(" \xA0\xA0 "),createBaseVNode("span",null,toDisplayString(chapterDict[chapter.value]),1),createTextVNode(" \xA0\xA0 "),createBaseVNode("span",{class:"button-text",onClick:i[1]||(i[1]=n=>selectChapter(1))},[createVNode(unref(RightOutlined))])])])])])}}}),skillTree_vue_vue_type_style_index_0_scoped_b1be4e88_lang="",SkillTree=_export_sfc(_sfc_main$b,[["__scopeId","data-v-b1be4e88"]]),index="";function init$5(){return{splitArea,getMapDrawData}}let area={};const bfsCache={},drawCache={},arrow={leftPortal:"left",rightPortal:"right",upPortal:"up",downPortal:"down"};function splitArea(){area={};const t=[];for(const e of core.floorIds){if(t.includes(e)||core.status.maps[e].deleted)continue;const i=getMapData(e,!0);if(t.push(...i.maps),i.maps.length>1){const s=core.status.maps[e].title;area[s]=i.maps}}}function getArea(){return area}function getMapDrawData(t,e=5,i=1,s=!1){var _;const n=`${t},${e},${i}`;if(drawCache[n]&&!s)return drawCache[n];const{link:a,maps:r}=getMapData(t,s),l={},c=[],d=core.status.maps[t];let u=-d.width/2,h=d.width/2,f=-d.height/2,g=d.height/2;for(const[w,B]of Object.entries(a)){const[D,P,H,N]=w.split(","),[W,L,U]=B.split(","),K=core.status.maps[D],X=core.status.maps[W],Y=parseInt(P),J=parseInt(H),oe=parseInt(L),de=parseInt(U),se=K.width,re=K.height,ae=X.width,ge=X.height;(_=l[D])!=null||(l[D]=[0,0]);const[fe,ie]=l[D];if(!l[W]){const be=core.utils.scan[N].x,we=core.utils.scan[N].y,Be=fe+(Y-se/2)-(oe-ae/2)+(i*2+e)*be,xe=ie+(J-re/2)-(de-ge/2)+(i*2+e)*we;l[W]=[Be,xe]}const[ee,le]=l[W];c.push([fe+(Y-se/2+.5),ie+(J-re/2+.5),ee+(oe-ae/2+.5),le+(de-ge/2+.5)]);const he=ee-ae/2,pe=ee+ae/2,me=le-ge/2,ue=le+ge/2;he<u&&(u=he),pe>h&&(h=pe),me<f&&(f=me),ue>g&&(g=ue)}Object.values(l).forEach(w=>{w[0]-=u,w[1]-=f}),c.forEach(w=>{w[0]-=u,w[2]-=u,w[1]-=f,w[3]-=f}),u-=5,h+=5,f-=5,g+=5;const m={locs:l,line:c,width:h-u,height:g-f};return drawCache[n]=m}function getMapData(t,e=!1){if(has(bfsCache[t])&&!e)return bfsCache[t];const i=[t],s={[t]:!0},n=[t],a={};for(;i.length>0;){const l=i.shift(),c=core.floors[l].changeFloor,d=core.getMapBlocksObj(l);for(const[u,h]of Object.entries(c)){const f=h.floorId;if(f.startsWith(":"))continue;const m=d[u].event.id;if(m in arrow&&!s[f]){const _=`${l},${u},${arrow[m]}`,w=`${f},${h.loc[0]},${h.loc[1]}`;a[_]=w,i.push(f),n.push(f)}}s[l]=!0}const r={maps:n,link:a};return bfsCache[t]=r}const _withScopeId$3=t=>(pushScopeId("data-v-bb735987"),t=t(),popScopeId(),t),_hoisted_1$a={id:"fly"},_hoisted_2$7={id:"tools"},_hoisted_3$7={id:"fly-settings"},_hoisted_4$6={id:"fly-border"},_hoisted_5$5=_withScopeId$3(()=>createBaseVNode("span",null,"\u65E0\u8FB9\u6846\u6A21\u5F0F",-1)),_hoisted_6$4={key:0,id:"fly-tradition"},_hoisted_7$4=_withScopeId$3(()=>createBaseVNode("span",null,"\u4F20\u7EDF\u6309\u952E\u6A21\u5F0F",-1)),_hoisted_8$3={id:"fly-main"},_hoisted_9$3={id:"fly-left"},_hoisted_10$3={id:"area-list"},_hoisted_11$3=["selected","onClick"],_hoisted_12$2={id:"fly-right"},_hoisted_13$2={id:"fly-tools"},_hoisted_14$2={id:"fly-now"},_sfc_main$a=defineComponent({__name:"fly",setup(t){var De;const e=getArea(),i=ref((De=Object.keys(e).find(q=>e[q].includes(core.status.floorId)))!=null?De:""),s=ref(core.status.floorId),n=ref(!0),a=ref(!1);let r=isMobile?1.5:3,l=0,c=0,d={},u={};n.value=core.getLocalStorage("noBorder",!0),a.value=core.getLocalStorage("flyTradition",!1);const h=computed(()=>core.status.maps[s.value]);watch(s,J),watch(i,q=>{var G;l=0,c=0,r=3,se=3,e[q]&&!e[q].includes(s.value)&&(s.value=(G=e[q].find(te=>te===core.status.floorId))!=null?G:e[q][0])}),watch(n,q=>{core.setLocalStorage("noBorder",q),d={},N()}),watch(a,q=>{core.setLocalStorage("flyTradition",q)});const f=document.createElement("canvas"),g=f.getContext("2d");let m,_,w,B,D=!1;function P(){core.plugin.flyOpened.value=!1}const H=computed(()=>core.status.maps[s.value].title);function N(q=!1){const G=n.value?.5:1,te=getMapDrawData(s.value,n.value?0:5,G,q),ne=g,Z=r*devicePixelRatio;f.width=te.width*Z,f.height=te.height*Z,ne.lineWidth=G*devicePixelRatio/2,ne.strokeStyle="#fff",ne.scale(Z,Z),ne.translate(5,5),n.value||te.line.forEach(([ce,Se,ye,Me])=>{ne.beginPath(),ne.moveTo(ce,Se),ne.lineTo(ye,Me),ne.stroke()});for(const[ce,[Se,ye]]of Object.entries(te.locs))n.value||W(ce,Se,ye),K(ce,Se,ye);L()}function W(q,G,te){const ne=n.value?.5:1,Z=g;Z.lineWidth=ne*devicePixelRatio;const ce=core.status.maps[q];core.hasVisitedFloor(q)?Z.fillStyle="#000":Z.fillStyle="#d0d",q===s.value?Z.strokeStyle="gold":Z.strokeStyle="#fff",Z.strokeRect(G-ce.width/2,te-ce.height/2,ce.width,ce.height),Z.fillRect(G-ce.width/2,te-ce.height/2,ce.width,ce.height),q===s.value&&(Z.fillStyle="#ff04",Z.fillRect(G-ce.width/2,te-ce.height/2,ce.width,ce.height))}function L(q=1){_.clearRect(0,0,m.width,m.height),_.drawImage(f,0,0,f.width,f.height,l*devicePixelRatio+(m.width-f.width)/2,c*devicePixelRatio+(m.height-f.height)/2,f.width,f.height)}function U(q,G,te){const ne=core.status.maps[q],Z=r*devicePixelRatio,ce=l*devicePixelRatio+(m.width-f.width)/2+5*Z,Se=c*devicePixelRatio+(m.height-f.height)/2+5*Z,ye=ce+(G-ne.width/2)*Z,Me=Se+(te-ne.height/2)*Z,Ee=ye+ne.width*Z,Ce=Me+ne.height*Z;return u[q]=[ye,Me,Ee,Ce],!(d[q]||!n.value&&r<=4||Ee<0||Ce<0||ye>m.width||Me>m.height)}function K(q,G,te,ne=!1){if(!D&&!ne&&!U(q,G,te))return;const Z=core.status.maps[q];d[q]=!0;const ce=g;core.drawThumbnail(q,void 0,{all:!0,inFlyMap:!0,x:G-Z.width/2,y:te-Z.height/2,w:Z.width,h:Z.height,ctx:ce,damage:r>7}),D||(core.hasVisitedFloor(q)||(ce.fillStyle="#d0d6",ce.fillRect(G-Z.width/2,te-Z.height/2,Z.width,Z.height),ce.fillStyle="#000"),s.value===q&&(ce.fillStyle="#ff04",ce.fillRect(G-Z.width/2,te-Z.height/2,Z.width,Z.height),ce.fillStyle="#000"))}function X(){const q=n.value?.5:1,G=getMapDrawData(s.value,n.value?0:5,q);for(const[te,[ne,Z]]of Object.entries(G.locs))U(te,ne,Z)&&K(te,ne,Z,!0)}function Y(){let q=w.width,G=w.height,te=0,ne=0;const Z=h.value.width/h.value.height;Z>1&&(G=q/Z,ne=w.height/2-G/2),Z<1&&(q=G*Z,te=w.width/2-q/2),B.fillStyle="#000",B.fillRect(0,0,w.width,w.height),core.drawThumbnail(s.value,void 0,{ctx:B,all:!0,damage:!0,inFlyMap:!0,x:te,y:ne,w:q,h:G})}function J(){d={},u={},N(),Y()}function oe(){if(i.value===""){tip$1("error","\u5F53\u524D\u5730\u56FE\u4E0D\u518D\u4EFB\u610F\u4E00\u4E2A\u533A\u57DF\u5185\uFF01");return}D=!0;const q=r;r=32,N(),downloadCanvasImage(f,i.value),r=q,D=!1,J(),tip$1("success","\u56FE\u7247\u4E0B\u8F7D\u6210\u529F\uFF01")}function de(){core.flyTo(s.value)?P():tip$1("error",`\u65E0\u6CD5\u98DE\u5F80${h.value.title}`)}let se=r;const re=lodash.exports.debounce(q=>{m.style.transform="",d={},N(),se=q},200);function ae(q){l*=q,c*=q,r=q*r,re(r),m.style.transform=`scale(${r/se})`,u={}}let ge=0,fe=0,ie=!1,ee=0,le=0;function he(q,G){if(xe)return;const te=q-ge,ne=G-fe;l+=te,c+=ne,ge=q,fe=G,X(),L(),(Math.abs(q-ee)>10||Math.abs(G-le)>10)&&(ie=!0)}function pe(q){if(ie)return;const G=q.offsetX*devicePixelRatio,te=q.offsetY*devicePixelRatio;for(const[ne,[Z,ce,Se,ye]]of Object.entries(u))G>=Z&&G<=Se&&te>=ce&&te<=ye&&(ne===s.value?de():s.value=ne)}function me(q){i.value=Object.keys(e).find(G=>e[G].includes(q))}function ue(q){const G=core.floorIds.indexOf(s.value);let te=G+q;te<0&&(te=0),te>=core.floorIds.length&&(te=core.floorIds.length-1);const ne=core.status.maps[core.floorIds[te]];if(ne.deleted||ne.forceDelete)for(;te!==G;){te+=Math.sign(q);const Z=core.status.maps[core.floorIds[te]];if(!Z.cannotViewMap&&(!Z.deleted&&!Z.forceDelete||te<0||te>=core.floorIds.length))break}s.value=core.floorIds[te],me(s.value),we(s.value)}function be(q){const G=getMapData(s.value);for(const[te,ne]of Object.entries(G.link)){if(!te.startsWith(s.value))continue;if(te.split(",")[3]===q){const ce=ne.split(",")[0];we(ce),s.value=ce;return}}}function we(q){const G=getMapDrawData(q,n.value?0:5,n.value?.5:1);if(!G.locs[q])return;const[te,ne]=G.locs[q];l=(-te+G.width/2-5)*r,c=(-ne+G.height/2-5)*r}function Be(q){const G=keycode(q.keyCode);(G===KeyCode.Enter||G===KeyCode.Space||G===KeyCode.KeyC)&&de(),(G===KeyCode.Escape||G===KeyCode.KeyX||G===KeyCode.KeyG)&&P(),a.value?(G===KeyCode.UpArrow&&ue(1),G===KeyCode.DownArrow&&ue(-1),G===KeyCode.LeftArrow&&ue(-10),G===KeyCode.RightArrow&&ue(10),G===KeyCode.PageUp&&ue(10),G===KeyCode.PageDown&&ue(-10)):(G===KeyCode.LeftArrow&&be("left"),G===KeyCode.RightArrow&&be("right"),G===KeyCode.UpArrow&&be("up"),G===KeyCode.DownArrow&&be("down"),G===KeyCode.PageUp&&ue(1),G===KeyCode.PageDown&&ue(-1))}let xe=!1,_e=0;function ve(q){q.touches.length>=2&&(xe=!0,_e=Math.sqrt((q.touches[0].clientX-q.touches[1].clientX)**2+(q.touches[0].clientY-q.touches[1].clientY)**2))}function ke(q){q.touches.length<2&&(xe=!1)}function Ae(q){if(!xe)return;const G=Math.sqrt((q.touches[0].clientX-q.touches[1].clientX)**2+(q.touches[0].clientY-q.touches[1].clientY)**2);ae(G/_e),_e=G}return onMounted(async()=>{m=document.getElementById("fly-map"),_=m.getContext("2d"),w=document.getElementById("fly-thumbnail"),B=w.getContext("2d");const q=getComputedStyle(m),G=getComputedStyle(w);m.width=parseFloat(q.width)*devicePixelRatio,m.height=parseFloat(q.height)*devicePixelRatio,w.width=parseFloat(G.width)*devicePixelRatio,w.height=parseFloat(G.width)*devicePixelRatio,Array.from(document.getElementsByClassName("fly-settings")).forEach(te=>{te.addEventListener("click",ne=>te.blur())}),we(s.value),J(),useDrag(m,he,(te,ne)=>{ge=te,fe=ne,ee=te,le=ne},()=>{setTimeout(()=>{ie=!1},50)},!0),useWheel(m,(te,ne)=>{const Z=-Math.sign(ne)*.1+1;ae(Z)}),await S(50),core.plugin.transition.value&&await S(600),document.addEventListener("keyup",Be),m.addEventListener("touchstart",ve),m.addEventListener("touchend",ke),m.addEventListener("touchend",Ae)}),onUnmounted(()=>{cancelGlobalDrag(he),document.removeEventListener("keyup",Be)}),(q,G)=>{const te=__unplugin_components_0$2,ne=__unplugin_components_0;return openBlock(),createElementBlock("div",_hoisted_1$a,[createBaseVNode("div",_hoisted_2$7,[createBaseVNode("span",{class:"button-text",onClick:P},[createVNode(unref(LeftOutlined)),createTextVNode(" \u8FD4\u56DE\u6E38\u620F")])]),createBaseVNode("div",_hoisted_3$7,[createBaseVNode("div",_hoisted_4$6,[_hoisted_5$5,createVNode(te,{class:"fly-settings",checked:n.value,"onUpdate:checked":G[0]||(G[0]=Z=>n.value=Z),"checked-children":"ON","un-checked-children":"OFF"},null,8,["checked"])]),unref(isMobile)?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_6$4,[_hoisted_7$4,createVNode(te,{class:"fly-settings",checked:a.value,"onUpdate:checked":G[1]||(G[1]=Z=>a.value=Z),"checked-children":"ON","un-checked-children":"OFF"},null,8,["checked"])])),unref(isMobile)?createCommentVNode("",!0):(openBlock(),createElementBlock("span",{key:1,class:"button-text",id:"fly-download",onClick:oe},"\u4E0B\u8F7D\u5730\u56FE\u56FE\u7247"))]),createBaseVNode("div",_hoisted_8$3,[createBaseVNode("div",_hoisted_9$3,[createVNode(Scroll,{id:"fly-area"},{default:withCtx(()=>[createBaseVNode("div",_hoisted_10$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(e),(Z,ce)=>(openBlock(),createElementBlock("span",{selected:i.value===ce,class:"selectable",onClick:Se=>i.value=ce},toDisplayString(ce),9,_hoisted_11$3))),256))])]),_:1}),createVNode(ne,{type:"vertical",dashed:"",id:"divider-left"}),createBaseVNode("div",{id:"fly-map-div"},[createBaseVNode("canvas",{id:"fly-map",onClick:pe})])]),createVNode(ne,{id:"divider-right",dashed:"",type:unref(isMobile)?"horizontal":"vertical"},null,8,["type"]),createBaseVNode("div",_hoisted_12$2,[createBaseVNode("canvas",{id:"fly-thumbnail",onClick:de}),createBaseVNode("div",_hoisted_13$2,[createVNode(unref(DoubleLeftOutlined),{onClick:G[2]||(G[2]=Z=>ue(-10)),class:"button-text"}),createVNode(unref(LeftOutlined),{onClick:G[3]||(G[3]=Z=>ue(-1)),class:"button-text"}),createBaseVNode("span",_hoisted_14$2,toDisplayString(unref(H)),1),createVNode(unref(RightOutlined),{onClick:G[4]||(G[4]=Z=>ue(1)),class:"button-text"}),createVNode(unref(DoubleRightOutlined),{onClick:G[5]||(G[5]=Z=>ue(10)),class:"button-text"})])])])])}}}),fly_vue_vue_type_style_index_0_scoped_bb735987_lang="",Fly=_export_sfc(_sfc_main$a,[["__scopeId","data-v-bb735987"]]),showFixed=ref(!1);let lastId;const show=lodash.exports.debounce(t=>{var r;if(!window.flags||!flags.mouseLoc)return;flags.clientLoc=[t.clientX,t.clientY];const[e,i]=getLocFromMouseLoc(...flags.mouseLoc),s=core.getBlockId(e,i);if(s!==lastId&&(showFixed.value=!1),!s||!((r=core.getClsFromId(s))!=null&&r.startsWith("enemy")))return;lastId=s;const n=core.material.enemys[s],a=getDetailedEnemy(n,e,i);core.plugin.bookDetailEnemy=a,showFixed.value=!0},200);function init$4(){const t=core.canvas.data.canvas;return t.addEventListener("mousemove",e=>{if(!core.isPlaying()||core.status.lockControl)return;const[i,s]=getLocFromMouseLoc(...flags.mouseLoc),n=core.getBlockId(i,s);n!==lastId&&(showFixed.value=!1),n&&show(e)}),t.addEventListener("mousedown",e=>{showFixed.value=!1}),{showFixed}}function getLocFromMouseLoc(t,e){const i=Math.round(t+core.bigmap.offsetX/32),s=Math.round(e+core.bigmap.offsetY/32);return[i,s]}function getDetailedEnemy(t,e,i,s=core.status.floorId){var m,_,w,B,D;const n=core.status.maps[s].ratio,a=Object.assign({},t,core.getEnemyInfo(t,void 0,e,i,s),(m=core.getDamageInfo(t,void 0,e,i,s))!=null?m:{}),r=core.nextCriticals(t,1,e,i,s),l=core.getDefDamage(t,n,e,i,s),c=core.getSpecialText(a);let d=lodash.exports.cloneDeep(c);d.length>2&&(d=d.slice(0,2).concat(["..."]));const u=core.getSpecialColor(a);let h=lodash.exports.cloneDeep(u);h.length>2&&(h=h.slice(0,2).concat(["#fff"])),d.length===0&&(d=["\u65E0\u5C5E\u6027"],h=["#fff"]);const f=getDamageColor(a.damage);return Object.assign(a,{critical:(w=(_=r[0])==null?void 0:_[0])!=null?w:"???",criticalDamage:(D=(B=r[0])==null?void 0:B[1])!=null?D:"???",defDamage:l,specialColor:u,specialText:c,toShowColor:h,toShowSpecial:d,damageColor:f})}const _hoisted_1$9={id:"fixed-detail"},_sfc_main$9=defineComponent({__name:"fixedDetail",setup(t){var c,d;const e=(c=core.plugin.fixedDetailPanel)!=null?c:"special";core.plugin.bookDetailPos=0;const[i,s]=flags.mouseLoc,n=Math.round(i+core.bigmap.offsetX/32),a=Math.round(s+core.bigmap.offsetY/32),r=core.getBlockId(n,a);if(r&&((d=core.getClsFromId(r))==null?void 0:d.startsWith("enemy"))){const u=core.material.enemys[r],h=getDetailedEnemy(u,n,a);core.plugin.bookDetailEnemy=h}else l();function l(){core.plugin.fixedDetailOpened.value=!1}return(u,h)=>(openBlock(),createElementBlock("div",_hoisted_1$9,[createVNode(BookDetail,{"from-book":!1,"default-panel":unref(e),onClose:l},null,8,["default-panel"])]))}}),fixedDetail_vue_vue_type_style_index_0_scoped_95b38cb5_lang="",FixedDetail=_export_sfc(_sfc_main$9,[["__scopeId","data-v-95b38cb5"]]),_withScopeId$2=t=>(pushScopeId("data-v-a9359e67"),t=t(),popScopeId(),t),_hoisted_1$8={id:"shop"},_hoisted_2$6={id:"tools"},_hoisted_3$6={id:"item-name"},_hoisted_4$5={id:"item-info"},_hoisted_5$4=["innerHTML"],_hoisted_6$3={id:"shop-bottom"},_hoisted_7$3={id:"item-list"},_hoisted_8$2=["selected","onClick"],_hoisted_9$2={class:"item-icon"},_hoisted_10$2={id:"item-sell-info"},_hoisted_11$2={id:"shop-mode"},_hoisted_12$1=["active"],_hoisted_13$1=["active"],_hoisted_14$1=_withScopeId$2(()=>createBaseVNode("span",null,"\u4E70\u4EF7",-1)),_hoisted_15$1=_withScopeId$2(()=>createBaseVNode("span",null,"\u5356\u4EF7",-1)),_hoisted_16$1={class:"item-sell-info"},_hoisted_17$1=_withScopeId$2(()=>createBaseVNode("span",null,"\u5B58\u8D27",-1)),_hoisted_18$1={class:"item-sell-info"},_hoisted_19$1=_withScopeId$2(()=>createBaseVNode("span",null,"\u62E5\u6709",-1)),_hoisted_20$1={id:"sell-count"},_hoisted_21$1={id:"sell-count-select"},_hoisted_22$1={id:"fly-now"},_hoisted_23$1={id:"sell-confirm"},_hoisted_24$1=["danger"],_sfc_main$8=defineComponent({__name:"shop",setup(t){var W;const e=core.plugin.openedShopId,i=core.status.shops[core.plugin.openedShopId];if(!i.item)throw new TypeError("Wrong global shop type delivered in opening item shop.");(W=flags.itemShop)!=null||(flags.itemShop={});const s=flags,n=i.choices,a=ref(0),r=ref("buy"),l=core.material.items,c=core.itemCount,d=ref(0),u=ref(core.status.hero.money),h=ref(!1);let f=!1;watch(d,L=>{if(L<0&&(L=0),r.value==="buy")L>m.value&&(L=m.value);else{const U=c(g.value.id);L>U&&(L=U)}d.value=L});const g=computed(()=>n[a.value]),m=computed(()=>{var L,U;return h.value,g.value.number-((U=(L=flags.itemShop[e])==null?void 0:L[g.value.id])!=null?U:0)}),_=computed(()=>core.material.items[g.value.id]),w=computed(()=>{const L=_.value.text;return splitText([L.startsWith("!!html")?L.slice(6):L])}),B=computed(()=>d.value*parseInt(r.value==="buy"?g.value.money:g.value.sell));watch(m,L=>{L<d.value&&(d.value=L)});function D(){var U,K,X,Y,J,oe,de,se,re,ae;if(d.value===0)return;const L=core.status.hero.money;f=!0,core.status.route.push(`openShop:${e}`),r.value==="buy"?B.value<=L?(core.getItem(g.value.id,d.value),core.status.hero.money-=B.value,u.value-=B.value,(K=(U=flags.itemShop)[e])!=null||(U[e]={}),(J=(X=flags.itemShop[e])[Y=g.value.id])!=null||(X[Y]=0),flags.itemShop[e][g.value.id]+=d.value,tip$1("success",`\u6210\u529F\u8D2D\u4E70${d.value}\u4E2A${_.value.name}\uFF01`),core.status.route.push(`buy:${g.value.id}:${d.value}`)):tip$1("error","\u4F60\u7684\u91D1\u5E01\u4E0D\u591F\uFF01"):(core.addItem(g.value.id,-d.value),core.status.hero.money+=B.value,u.value+=B.value,(de=(oe=flags.itemShop)[e])!=null||(oe[e]={}),(ae=(se=flags.itemShop[e])[re=g.value.id])!=null||(se[re]=0),flags.itemShop[e][g.value.id]-=d.value,tip$1("success",`\u6210\u529F\u5356\u51FA${d.value}\u4E2A${_.value.name}\uFF01`),core.status.route.push(`sell:${g.value.id}:${d.value}`)),d.value=0,h.value=!h.value}function P(L){const U=keycode(L.keyCode);(U===KeyCode.KeyX||U===KeyCode.Escape||U===KeyCode.KeyV)&&N(),U===KeyCode.UpArrow&&a.value>=1&&a.value--,U===KeyCode.DownArrow&&a.value<=n.length-2&&a.value++,(U===KeyCode.KeyC||U===KeyCode.Space||U===KeyCode.Enter)&&D()}function H(L){const U=keycode(L.keyCode);U===KeyCode.LeftArrow&&d.value--,U===KeyCode.RightArrow&&d.value++}function N(){f&&core.status.route.push("closeShop"),core.plugin.shopOpened.value=!1}return onMounted(async()=>{await S(50),core.plugin.transition.value&&await S(600),document.addEventListener("keyup",P),document.addEventListener("keydown",H)}),onUnmounted(()=>{document.removeEventListener("keyup",P),document.removeEventListener("keydown",H)}),(L,U)=>{const K=__unplugin_components_0;return openBlock(),createElementBlock("div",_hoisted_1$8,[createBaseVNode("div",_hoisted_2$6,[createBaseVNode("span",{class:"button-text",onClick:N},[createVNode(unref(LeftOutlined)),createTextVNode(" \u8FD4\u56DE\u6E38\u620F")])]),createBaseVNode("span",_hoisted_3$6,toDisplayString(unref(_).name),1),createVNode(K,{dashed:"",style:{"border-color":"#ddd4"},id:"divider"}),createBaseVNode("div",_hoisted_4$5,[createVNode(Scroll,{id:"item-desc","no-scroll":!0},{default:withCtx(()=>[createBaseVNode("span",{innerHTML:unref(w)},null,8,_hoisted_5$4)]),_:1})]),createVNode(K,{dashed:"",style:{"border-color":"#ddd4"},id:"divider-split"}),createBaseVNode("div",_hoisted_6$3,[createBaseVNode("div",_hoisted_7$3,[createVNode(Scroll,{style:{width:"100%",height:"100%"}},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(n),(X,Y)=>{var J,oe;return openBlock(),createElementBlock("div",{class:"selectable item-one",selected:Y===a.value,onClick:de=>a.value=Y},[createBaseVNode("div",_hoisted_9$2,[createVNode(_sfc_main$p,{id:X.id,noborder:!0},null,8,["id"]),createBaseVNode("span",null,toDisplayString(unref(l)[X.id].name),1)]),createBaseVNode("span",null,"\xD7\xA0"+toDisplayString((r.value==="buy"?X.number-((oe=(J=unref(s).itemShop[unref(e)])==null?void 0:J[X.id])!=null?oe:0):unref(c)(X.id))+(h.value,0)),1)],8,_hoisted_8$2)}),256))]),_:1})]),createVNode(K,{dashed:"",style:{"border-color":"#ddd4"},type:unref(isMobile)?"horizontal":"vertical",id:"divider-vertical"},null,8,["type"]),createBaseVNode("div",_hoisted_10$2,[createBaseVNode("div",_hoisted_11$2,[createBaseVNode("span",{class:"button-text mode-button",active:r.value==="buy",onClick:U[0]||(U[0]=X=>r.value="buy")},"\u8D2D\u4E70",8,_hoisted_12$1),createVNode(K,{dashed:"",type:"vertical",id:"divider-vertical",style:{"border-color":"#ddd4"}}),createBaseVNode("span",{class:"button-text mode-button",active:r.value==="sell",danger:"true",onClick:U[1]||(U[1]=X=>r.value="sell")},"\u552E\u51FA",8,_hoisted_13$1)]),createVNode(K,{dashed:"",style:{"border-color":"#ddd4"},id:"divider-mode"}),createBaseVNode("div",{class:"item-sell-info",style:normalizeStyle({color:r.value==="buy"?"lightgreen":"white"})},[_hoisted_14$1,createBaseVNode("span",null,toDisplayString(unref(g).money),1)],4),createBaseVNode("div",{class:"item-sell-info",style:normalizeStyle({color:r.value==="sell"?"lightcoral":"white"})},[_hoisted_15$1,createBaseVNode("span",null,toDisplayString(unref(g).sell),1)],4),createBaseVNode("div",_hoisted_16$1,[_hoisted_17$1,createBaseVNode("span",null,toDisplayString(unref(m)),1)]),createBaseVNode("div",_hoisted_18$1,[_hoisted_19$1,createBaseVNode("span",null,toDisplayString(unref(c)(unref(g).id)),1)]),createVNode(K,{dashed:"",style:{"border-color":"#ddd4"},id:"divider-mode"}),createBaseVNode("div",_hoisted_20$1,[createBaseVNode("span",null,toDisplayString(r.value==="buy"?"\u8D2D\u4E70":"\u552E\u51FA")+"\u6570\u91CF",1),createBaseVNode("div",_hoisted_21$1,[createVNode(unref(DoubleLeftOutlined),{class:"button-text",onClick:U[2]||(U[2]=X=>d.value-=10)}),createVNode(unref(LeftOutlined),{class:"button-text",onClick:U[3]||(U[3]=X=>d.value--)}),createBaseVNode("span",_hoisted_22$1,toDisplayString(d.value),1),createVNode(unref(RightOutlined),{class:"button-text",onClick:U[4]||(U[4]=X=>d.value++)}),createVNode(unref(DoubleRightOutlined),{class:"button-text",onClick:U[5]||(U[5]=X=>d.value+=10)})])]),createVNode(K,{dashed:"",style:{"border-color":"#ddd4",margin:"2vh 0 2vh 0"}}),createBaseVNode("div",_hoisted_23$1,[createBaseVNode("span",{id:"sell-total",style:normalizeStyle({color:r.value==="buy"&&u.value>unref(B)?"lightgreen":"lightcoral"})},"\u603B\u4EF7\uFF1A"+toDisplayString(d.value*parseInt(r.value==="buy"?unref(g).money:unref(g).sell)),5),createBaseVNode("span",{id:"sell-button",class:"button-text",danger:r.value==="sell","danger-display":"true",active:"true",onClick:D},"\u786E\u8BA4"+toDisplayString(r.value==="buy"?"\u8D2D\u4E70":"\u552E\u51FA"),9,_hoisted_24$1)])])])])}}}),shop_vue_vue_type_style_index_0_scoped_a9359e67_lang="",Shop=_export_sfc(_sfc_main$8,[["__scopeId","data-v-a9359e67"]]),bookOpened=ref(!1),toolOpened=ref(!1),equipOpened=ref(!1),showStatusBar=ref(!1),settingsOpened=ref(!1),descOpened=ref(!1),skillOpened=ref(!1),skillTreeOpened=ref(!1),flyOpened=ref(!1),showStudiedSkill=ref(!1),fixedDetailOpened=ref(!1),shopOpened=ref(!1),transition=ref(!0),noClosePanel=ref(!1);let app;const UI_LIST=[[bookOpened,Book],[toolOpened,Toolbox],[equipOpened,Equipbox],[settingsOpened,Settings],[descOpened,Desc],[skillOpened,Skill],[skillTreeOpened,SkillTree],[flyOpened,Fly],[fixedDetailOpened,FixedDetail],[shopOpened,Shop]],uiStack=shallowReactive([]);function init$3(){return app=document.getElementById("root"),UI_LIST.forEach(([t,e])=>{watch(t,i=>{if(i===!0)uiStack.push(markRaw(e)),showApp();else{const s=uiStack.findIndex(n=>n===e);if(s===-1)return;uiStack.length===1?hideApp(s):uiStack.splice(s,1)}})}),{uiStack,transition,bookOpened,toolOpened,equipOpened,showStatusBar,settingsOpened,descOpened,skillOpened,skillTreeOpened,flyOpened,showStudiedSkill,fixedDetailOpened,shopOpened}}async function showApp(){core.lockControl(),transition.value?app.style.transition="all 0.6s linear":app.style.transition="none",app.style.display="flex",await S(50),app.style.opacity="1"}async function hideApp(t){transition.value?(app.style.transition="all 0.6s linear",app.style.opacity="0",await S(600)):(app.style.transition="",app.style.opacity="0"),uiStack.splice(t,1),app.style.display="none",noClosePanel.value||core.closePanel(),noClosePanel.value=!1}const status=ref(!1);function init$2(){return{statusBarStatus:status}}const chapterShowed=ref(!1),chapterContent=ref("");function init$1(){return{chapterShowed,chapterContent}}const ani=new R;ani.register("rect",0);const path1={MT16:[[23,23],[0,23]],MT15:[[63,4],[61,4],[61,5],[58,5],[58,8],[54,8],[54,11],[51,11],[51,8],[45,8],[45,4],[47,4],[47,6],[51,6],[51,5],[52,5],[52,3],[50,3],[50,5],[48,5],[48,3],[35,3],[35,5],[31,5],[31,7],[34,7],[34,9],[31,9],[31,11],[12,11],[12,8],[1,8],[1,7],[0,7]],MT14:[[127,7],[126,7],[126,8],[124,8],[124,7],[115.2,7],[115.2,9.2],[110.2,9.2],[110.2,11],[109.8,11],[109.8,8.8],[111.8,8.8],[111.8,7],[104,7],[104,3],[100,3],[100,4],[98,4],[98,3],[96,3],[96,6],[95,6],[95,7],[88,7],[88,6],[85,6],[85,8],[83,8],[83,9],[81,9],[81,11],[72,11],[72,5],[68,5],[68,8],[67,8],[67,10],[65,10],[65,11],[62,11],[62,9],[60,9],[60,11],[57,11],[57,9],[54,9]]},camera1=[["MT16",0,10,0,1600,C("sin","in")],["MT15",45,0,0,2324,C("sin","in")],["MT15",40,0,2324,1992,C("sin","out")],["MT15",41,0,5312,498,C("sin","in-out")],["MT15",37,0,5810,1660,C("sin","in")],["MT15",29,0,7470,830,C("sin","out")],["MT15",25,0,11454,996,C("sin","in")],["MT15",12,0,12450,996,j()],["MT15",0,0,13446,1470,C("sin","out")],["MT14",109,0,0,1328,C("sin","in")],["MT14",104,0,1328,332,C("sin","out")],["MT14",92,0,5478,2822,C("sin","in")],["MT14",84,0,8300,1992,j()],["MT14",74,0,10292,2988,j()],["MT14",65,0,13280,2988,j()],["MT14",58,0,16268,1992,j()],["MT14",47,0,18260,3320,j()],["MT14",36,0,21580,3320,j()],["MT14",0,0,24900,9960,j()]];function init1(){const t=["MT13","MT14","MT15"],e=[];t.forEach(i=>{core.status.maps[i].cannotMoveDirectly=!0,core.extractBlocks(i),core.status.maps[i].blocks.forEach(s=>{["animates","items"].includes(s.event.cls)&&!s.event.id.endsWith("Portal")&&e.push([s.x,s.y,i])})}),e.forEach(i=>{core.removeBlock(...i)})}function chaseShake(t){t.ani.mode(shake2(2/32,O(1,1,1,1,1,1,1,1,1,1,1,1)),!0).time(5e4).shake(1,0)}async function wolfMove(t){core.moveBlock(23,17,Array(6).fill("down"),80),await S(550),core.setBlock(508,23,23)}function judgeFail1(t){t.ani.ticker.add(()=>{core.status.hero.loc.x>core.bigmap.offsetX/32+17&&(t.end(),ani.time(750).apply("rect",0),core.lose("\u9003\u8DD1\u5931\u8D25"))})}function drawBack(t){t.on("MT15",0,()=>{ani.mode(C("sin","out")).time(1500).absolute().apply("rect",64);const e=core.createCanvas("chaseBack",0,0,480,480,120);e.fillStyle="#000";const i=()=>{e||ani.ticker.remove(i),core.clearMap(e),e.fillRect(0,0,480,ani.value.rect),e.fillRect(0,480,480,-ani.value.rect)};ani.ticker.add(i)})}function para1(t){t.on("MT15",830,()=>{for(let e=53;e<58;e++)for(let i=3;i<8;i++)core.setBlock(336,e,i);core.drawAnimate("explosion3",55,5),core.drawAnimate("stone",55,5)}),t.on("MT15",1080,()=>{core.setBlock(336,58,9),core.setBlock(336,59,9),core.drawAnimate("explosion1",58,9),core.drawAnimate("explosion1",59,9)}),t.on("MT15",1190,()=>{core.setBlock(336,53,8),core.setBlock(336,52,8),core.drawAnimate("explosion1",53,8),core.drawAnimate("explosion1",52,8)}),t.on("MT15",1580,()=>{core.setBlock(336,51,7),core.drawAnimate("explosion1",51,7)}),t.on("MT15",1830,()=>{core.setBlock(336,47,7),core.setBlock(336,49,9),core.drawAnimate("explosion1",49,9),core.drawAnimate("explosion1",47,7)})}function para2(t){t.onHeroLoc("MT15",()=>{core.setBlock(336,45,9),core.drawAnimate("explosion1",45,9)},45,8),t.onHeroLoc("MT15",()=>{core.setBlock(336,44,6),core.drawAnimate("explosion1",44,6)},45,6),t.onHeroLoc("MT15",()=>{core.setBlock(336,44,4),core.drawAnimate("explosion1",44,4),core.drawAnimate("explosion1",48,6),core.removeBlock(48,6)},45,4),t.onHeroLoc("MT15",()=>{core.setBlock(336,41,4),core.setBlock(336,32,6),core.drawAnimate("explosion1",41,4),core.drawAnimate("explosion1",32,6)},41,3),t.onHeroLoc("MT15",()=>{core.drawAnimate("explosion3",37,7),core.vibrate("vertical",1e3,25,10);for(let e=36;e<42;e++)for(let i=4;i<11;i++)core.setBlock(336,e,i)},35,3),t.onHeroLoc("MT15",()=>{core.vibrate("vertical",1e4,25,1),core.removeBlock(34,8),core.removeBlock(33,8),core.drawAnimate("explosion1",34,8),core.drawAnimate("explosion1",33,8)},31,5),t.onHeroLoc("MT15",()=>{core.setBlock(336,32,9),core.drawAnimate("explosion1",32,9)},33,7),t.onHeroLoc("MT15",()=>{core.removeBlock(32,9),core.drawAnimate("explosion1",32,9)},[33,34,34],9);for(let e=19;e<31;e++){const i=e;t.onHeroLoc("MT15",()=>{core.setBlock(336,i+1,11),core.drawAnimate("explosion1",i+1,11)},i,11)}}function para3(t){t.onHeroLoc("MT14",()=>{core.setBlock(336,126,6),core.setBlock(336,124,6),core.setBlock(336,124,9),core.setBlock(336,126,9),core.drawAnimate("explosion1",126,6),core.drawAnimate("explosion1",124,6),core.drawAnimate("explosion1",124,9),core.drawAnimate("explosion1",126,9)},126,7),t.onHeroLoc("MT14",()=>{core.setBlock(508,127,7),core.jumpBlock(127,7,112,7,500,!0),setTimeout(()=>{core.setBlock(509,112,7)},520),core.drawHeroAnimate("amazed"),core.setBlock(336,121,6),core.setBlock(336,122,6),core.setBlock(336,120,8),core.setBlock(336,121,8),core.setBlock(336,122,8),core.drawAnimate("explosion1",121,6),core.drawAnimate("explosion1",122,6),core.drawAnimate("explosion1",120,8),core.drawAnimate("explosion1",121,8),core.drawAnimate("explosion1",122,8)},123,7),t.onHeroLoc("MT14",()=>{core.setBlock(336,109,11),core.removeBlock(112,8),core.drawAnimate("explosion1",109,11),core.drawAnimate("explosion1",112,8),core.insertAction([{type:"moveHero",time:400,steps:["backward:1"]}]),t.onHeroLoc("MT14",()=>{core.jumpBlock(112,7,110,4,500,!0),core.drawHeroAnimate("amazed"),setTimeout(()=>{core.setBlock(506,110,4)},540)},112,8)},110,10),t.onHeroLoc("MT14",()=>{core.setBlock(336,117,6),core.setBlock(336,116,6),core.setBlock(336,115,6),core.setBlock(336,114,6),core.setBlock(336,117,8),core.setBlock(336,116,8),core.drawAnimate("explosion1",117,6),core.drawAnimate("explosion1",116,6),core.drawAnimate("explosion1",115,6),core.drawAnimate("explosion1",114,6),core.drawAnimate("explosion1",116,8),core.drawAnimate("explosion1",117,8)},118,7),t.onHeroLoc("MT14",()=>{core.setBlock(336,112,8),core.setBlock(336,113,7),core.drawAnimate("explosion1",112,8),core.drawAnimate("explosion1",113,7)},112,7),t.onHeroLoc("MT14",()=>{for(let e=111;e<=115;e++)core.setBlock(336,e,10),core.drawAnimate("explosion1",e,10);core.setBlock(336,112,8),core.drawAnimate("explosion1",112,8)},115,7),t.onHeroLoc("MT14",()=>{core.jumpBlock(97,4,120,-3,2e3);for(let e=109;e<=120;e++)for(let i=3;i<=11;i++)i!=7&&core.setBlock(336,e,i);core.drawAnimate("explosion2",119,7),core.removeBlock(105,7),core.drawAnimate("explosion1",105,7)},110,7),t.onHeroLoc("MT14",()=>{core.setBlock(336,95,3),core.setBlock(336,93,6),core.drawAnimate("explosion1",95,3),core.drawAnimate("explosion1",93,6)},97,3),t.onHeroLoc("MT14",()=>{core.setBlock(336,87,4),core.setBlock(336,88,5),core.drawAnimate("explosion1",87,4),core.drawAnimate("explosion1",88,5)},88,6),t.onHeroLoc("MT14",()=>{core.setBlock(336,84,6),core.setBlock(336,85,5),core.setBlock(336,86,8),core.drawAnimate("explosion1",84,6),core.drawAnimate("explosion1",85,5),core.drawAnimate("explosion1",86,8)},86,6),t.onHeroLoc("MT14",()=>{core.setBlock(336,81,8),core.setBlock(336,82,11),core.drawAnimate("explosion1",81,8),core.drawAnimate("explosion1",82,11)},81,9),t.onHeroLoc("MT14",()=>{core.setBlock(336,73,8),core.setBlock(336,72,4),core.drawAnimate("explosion1",73,8),core.drawAnimate("explosion1",72,4)},72,11),t.onHeroLoc("MT14",()=>{for(let e=74;e<86;e++)for(let i=3;i<12;i++)core.setBlock(336,e,i);core.drawAnimate("explosion2",79,7),core.vibrate("vertical",4e3,25,15)},71,7),t.onHeroLoc("MT14",()=>{core.setBlock(336,68,4),core.setBlock(336,67,6),core.drawAnimate("explosion1",68,4),core.drawAnimate("explosion1",67,6)},68,5),t.onHeroLoc("MT14",()=>{for(let e=65;e<=72;e++)for(let i=3;i<=9;i++)core.setBlock(336,e,i);core.setBlock(336,72,10),core.setBlock(336,72,11),core.drawAnimate("explosion3",69,5)},67,10),t.onHeroLoc("MT14",()=>{core.setBlock(336,63,9),core.setBlock(336,60,8),core.setBlock(336,56,11),core.drawAnimate("explosion1",63,9),core.drawAnimate("explosion1",60,8),core.drawAnimate("explosion1",56,11)},64,11),t.onHeroLoc("MT14",()=>{for(let e=58;e<=64;e++)for(let i=3;i<=11;i++)core.setBlock(336,e,i);core.drawAnimate("explosion2",61,7)},57,9);for(let e=21;e<49;e++)t.onHeroLoc("MT14",()=>{for(let i=3;i<=11;i++)core.setBlock(336,e+4,i),core.drawAnimate("explosion1",e+4,i)},e);t.onHeroLoc("MT14",async()=>{flags.finishChase1=!0,core.autoFixRouteBoss(),core.showStatusBar(),ani.time(750).apply("rect",0),t.end(),await S(750),ani.ticker.destroy(),core.deleteCanvas("chaseBack")},21)}function getChaseDataByIndex(t){if(t===1)return init1(),{camera:camera1,fns:[para1,para2,para3,chaseShake,wolfMove,drawBack,judgeFail1],path:path1};throw new ReferenceError("Deliver wrong chase index.")}function init(){return{startChase}}function shake2(t,e){let i=0;return s=>(i+=Math.PI/2,Math.sin(i)*t*e(s))}class Chase{constructor(e,i,s,n=!1){Q(this,"ani",new R);Q(this,"path");Q(this,"showPath",!1);this.path=e,flags.__lockViewport__=!0,flags.onChase=!0,flags.chaseTime={[core.status.floorId]:Date.now()},this.ani.absolute().time(0).move(core.bigmap.offsetX/32,core.bigmap.offsetY/32),i.forEach(l=>l(this));const a=[],r=core.createCanvas("chasePath",0,0,0,0,35);for(const[l,c,d,u,h,f,g]of s)a.includes(l)||(this.on(l,0,()=>{flags.__lockViewport__=!1,core.drawHero(),flags.__lockViewport__=!0,this.ani.time(0).move(core.bigmap.offsetX/32,core.bigmap.offsetY/32)},!0),a.push(l)),has(g)?this.on(l,u,()=>{this.ani.time(h).mode(f).moveAs(g)}):this.on(l,u,()=>{this.ani.time(h).mode(f).move(c,d)});if(this.ani.ticker.add(()=>{flags.floorChanging||(core.setViewport(this.ani.x*32,this.ani.y*32),core.relocateCanvas(r,-this.ani.x*32,-this.ani.y*32))}),n)for(const[l,c]of Object.entries(e))this.on(l,0,()=>{const d=core.status.maps[l];core.resizeCanvas(r,d.width*32,d.height*32),r.beginPath(),r.moveTo(c[0][0]*32+16,c[1][1]*32+24),r.lineJoin="round",r.lineWidth=4,r.strokeStyle="cyan",r.globalAlpha=.3,c.forEach((u,h,f)=>{if(h===0)return;const[g,m]=u;r.lineTo(g*32+16,m*32+24)}),r.stroke()})}on(e,i,s,n=!1){const a=()=>{var r,l,c;!((r=flags.chaseTime)!=null&&r[e])||Date.now()-((c=(l=flags.chaseTime)==null?void 0:l[e])!=null?c:0)>=i&&(s(this),this.ani.ticker.remove(a))};this.ani.ticker.add(a,n)}onHeroLoc(e,i,s,n,a=0){if(a===1){typeof s=="number"&&(s=[s]),typeof n=="number"&&(n=[n]),s.forEach(c=>{n.forEach(d=>{this.onHeroLoc(e,i,c,d)})});return}const r=()=>{if(core.status.floorId!==e)return!1;if(has(s)){if(typeof s=="number"){if(core.status.hero.loc.x!==s)return!1}else if(!s.includes(core.status.hero.loc.x))return!1}if(has(n)){if(typeof n=="number"){if(core.status.hero.loc.y!==n)return!1}else if(!n.includes(core.status.hero.loc.y))return!1}return!0},l=()=>{if(r()){i(this);try{this.ani.ticker.remove(l)}catch(c){}}};this.ani.ticker.add(l)}setPathShowStatus(e){this.showPath=e}end(){this.ani.ticker.destroy(),delete flags.onChase,delete flags.chase,delete flags.chaseTime,delete flags.chaseHard,delete flags.chaseIndex,flags.__lockViewport__=!1,core.deleteCanvas("chasePath")}}async function startChase(t){const e=getChaseDataByIndex(t);flags.chaseIndex=t,flags.onChase=!0,await S(20),flags.chase=new Chase(e.path,e.fns,e.camera,flags.chaseHard===0)}function forward(){const t=[init$b(),init$3(),init$8(),init$9(),init$a(),init$2(),init$7(),init$6(),init$1(),init$5(),init(),init$4()];(async function(){for(const e of t)for(const i in e){const s=e[i];i in core.plugin||(core.plugin[i]=s),s instanceof Function&&(i in core||i.startsWith("_")||(core[i]=s))}console.log("\u63D2\u4EF6\u8F6C\u53D1\u5B8C\u6210\uFF01")})()}main.forward=forward;const _hoisted_1$7={id:"ui"},_sfc_main$7=defineComponent({__name:"App",setup(t){return(e,i)=>(openBlock(),createElementBlock("div",_hoisted_1$7,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(uiStack),s=>(openBlock(),createBlock(resolveDynamicComponent(s)))),256))]))}}),App_vue_vue_type_style_index_0_scoped_9668aeb3_lang="",App=_export_sfc(_sfc_main$7,[["__scopeId","data-v-9668aeb3"]]),_imports_0="/HumanBreak/project/images/skill.png",_imports_1="/HumanBreak/project/images/hp.png",_imports_2="/HumanBreak/project/images/atk.png",_imports_3="/HumanBreak/project/images/def.png",_imports_4="/HumanBreak/project/images/IQ.png",_imports_5="/HumanBreak/project/images/money.png",_imports_6="/HumanBreak/project/images/exp.png",_hoisted_1$6=["id"],_hoisted_2$5=["id"],_hoisted_3$5=["id","selected"],_hoisted_4$4=["id","selected","selectable"],_hoisted_5$3=["id","selected","selectable"],_hoisted_6$2=["id","selected","selectable"],_hoisted_7$2=["id","selected","selectable"],_sfc_main$6=defineComponent({__name:"box",props:{dragable:{type:Boolean},resizable:{type:Boolean},left:null,top:null,width:null,height:null},emits:["update:left","update:top","update:width","update:height"],setup(t,{emit:e}){const i=t,s=(1e8*Math.random()).toFixed(0),n=ref(!1);let a=0,r,l,c,d,u,h;const f=ref(isMobile?window.innerWidth-100:window.innerWidth*.175),g=ref(isMobile?250:window.innerHeight-100),m=ref(50),_=ref(50);watch(m,Y=>e("update:left",Y)),watch(_,Y=>e("update:top",Y)),watch(f,Y=>e("update:width",Y)),watch(g,Y=>e("update:height",Y));async function w(){n.value=!0,a=window.setTimeout(()=>{n.value=!1},4e3)}let B=0,D=0;function P(Y,J){const oe=getComputedStyle(r),de=parseFloat(oe.left),se=parseFloat(oe.top);m.value=de+Y-B,_.value=se+J-D,r.style.left=`${m.value}px`,r.style.top=`${_.value}px`,n.value=!0,clearTimeout(a),B=Y,D=J}let H=m.value+f.value;function N(Y,J){r.style.left=`${Y}px`,f.value=H-Y,m.value=Y,r.style.width=`${f.value}px`}let W=_.value+g.value;function L(Y,J){r.style.top=`${J}px`,g.value=W-J,_.value=J,r.style.height=`${g.value}px`}function U(Y,J){const oe=getComputedStyle(r);f.value=Y-parseFloat(oe.left),r.style.width=`${f.value}px`}function K(Y,J){const oe=getComputedStyle(r);g.value=J-parseFloat(oe.top),r.style.height=`${g.value}px`}function X(){r=document.getElementById(`box-${s}`),document.getElementById(`box-move-${s}`),l=document.getElementById(`border-left-${s}`),d=document.getElementById(`border-top-${s}`),c=document.getElementById(`border-right-${s}`),u=document.getElementById(`border-bottom-${s}`),h=document.getElementById(`box-drag-${s}`),r&&(has(i.left)&&(m.value=i.left),has(i.top)&&(_.value=i.top),has(i.width)&&(f.value=i.width),has(i.height)&&(g.value=i.height),r.style.left=`${m.value}px`,r.style.top=`${_.value}px`,r.style.width=`${f.value}px`,r.style.height=`${g.value}px`)}return onUpdated(X),onMounted(async()=>{await S(50),X(),r&&(i.dragable&&useDrag(h,P,(Y,J)=>{B=Y,D=J},()=>{n.value=!1},!0),i.resizable&&(useDrag(l,N,(Y,J)=>{H=m.value+f.value},void 0,!0),useDrag(d,L,(Y,J)=>{W=_.value+g.value},void 0,!0),useDrag(c,U,void 0,void 0,!0),useDrag(u,K,void 0,void 0,!0)))}),onUnmounted(()=>{i.dragable&&cancelGlobalDrag(P),i.resizable&&(cancelGlobalDrag(N),cancelGlobalDrag(L),cancelGlobalDrag(U),cancelGlobalDrag(K))}),(Y,J)=>(openBlock(),createElementBlock("div",{id:`box-${unref(s)}`,class:"box"},[createBaseVNode("div",{id:`box-main-${unref(s)}`,class:"box-main",onClick:w},[renderSlot(Y.$slots,"default",{},void 0,!0)],8,_hoisted_2$5),t.dragable?(openBlock(),createElementBlock("div",{key:0,id:`box-move-${unref(s)}`,class:"box-move",selected:n.value},[createVNode(unref(DragOutlined),{id:`box-drag-${unref(s)}`,class:"box-drag",style:{right:"0",bottom:"0",position:"absolute"}},null,8,["id"])],8,_hoisted_3$5)):createCommentVNode("",!0),createBaseVNode("div",{class:"border border-vertical border-left",id:`border-left-${unref(s)}`,selected:n.value&&t.resizable,selectable:t.resizable},null,8,_hoisted_4$4),createBaseVNode("div",{class:"border border-horizontal border-top",id:`border-top-${unref(s)}`,selected:n.value&&t.resizable,selectable:t.resizable},null,8,_hoisted_5$3),createBaseVNode("div",{class:"border border-vertical border-right",id:`border-right-${unref(s)}`,selected:n.value&&t.resizable,selectable:t.resizable},null,8,_hoisted_6$2),createBaseVNode("div",{class:"border border-horizontal border-bottom",id:`border-bottom-${unref(s)}`,selected:n.value&&t.resizable,selectable:t.resizable},null,8,_hoisted_7$2)],8,_hoisted_1$6))}}),box_vue_vue_type_style_index_0_scoped_fc84168a_lang="",Box=_export_sfc(_sfc_main$6,[["__scopeId","data-v-fc84168a"]]),_withScopeId$1=t=>(pushScopeId("data-v-f0e92f32"),t=t(),popScopeId(),t),_hoisted_1$5={id:"status-bar"},_hoisted_2$4={id:"status-div"},_hoisted_3$4=["onClick"],_hoisted_4$3={id:"status-lv"},_hoisted_5$2={id:"status-skill",class:"status-item"},_hoisted_6$1=_withScopeId$1(()=>createBaseVNode("img",{src:_imports_0,class:"status-icon"},null,-1)),_hoisted_7$1={id:"status-hp",class:"status-item"},_hoisted_8$1=_withScopeId$1(()=>createBaseVNode("img",{src:_imports_1,class:"status-icon"},null,-1)),_hoisted_9$1={class:"status-item-bold"},_hoisted_10$1={id:"status-hpmax",class:"status-extra status-item-bold"},_hoisted_11$1={key:0,id:"status-spring",class:"status-extra"},_hoisted_12={id:"status-atk",class:"status-item"},_hoisted_13=_withScopeId$1(()=>createBaseVNode("img",{src:_imports_2,class:"status-icon"},null,-1)),_hoisted_14={class:"status-item-bold"},_hoisted_15={id:"status-mana",class:"status-extra status-item-bold"},_hoisted_16={id:"status-def",class:"status-item status-item-bold"},_hoisted_17=_withScopeId$1(()=>createBaseVNode("img",{src:_imports_3,class:"status-icon"},null,-1)),_hoisted_18={id:"status-mdef",class:"status-item status-item-bold"},_hoisted_19=_withScopeId$1(()=>createBaseVNode("img",{src:_imports_4,class:"status-icon"},null,-1)),_hoisted_20={id:"status-money",class:"status-item status-item-bold"},_hoisted_21=_withScopeId$1(()=>createBaseVNode("img",{src:_imports_5,class:"status-icon"},null,-1)),_hoisted_22={id:"status-exp",class:"status-item status-item-bold"},_hoisted_23=_withScopeId$1(()=>createBaseVNode("img",{src:_imports_6,class:"status-icon"},null,-1)),_hoisted_24={id:"status-key",class:"status-item status-item-bold"},_hoisted_25={style:{color:"#fca","padding-left":"10%"}},_hoisted_26={style:{color:"#aad"}},_hoisted_27={style:{color:"#f88","padding-right":"10%"}},_hoisted_28={key:0,class:"status-item"},_hoisted_29=["onClick"],_hoisted_30={key:1,class:"status-item"},_hoisted_31=["onClick"],_hoisted_32={key:2,class:"status-item"},_hoisted_33=["onClick"],_sfc_main$5=defineComponent({__name:"statusBar",setup(t){const e=ref(isMobile?window.innerWidth-100:window.innerWidth*.175),i=ref(isMobile?250:window.innerHeight-100),s=ref(!1),n=core.formatBigNumber;watch(e,H=>s.value=!s.value),watch(i,H=>s.value=!s.value);const a=shallowReactive({}),r=shallowReactive([]),l=ref(),c=ref(),d=ref("\u65E0"),u=ref(0),h=ref(),f=ref(core.getFlag("chapter",0)>0),g=ref(core.getSkillLevel(11)>0),m=["hp","atk","def","mdef","hpmax","mana","money","exp","lv"];watch(status,_);function _(){var H,N;m.forEach(W=>{a[W]=core.getRealStatus(W)}),r[0]=core.itemCount("yellowKey"),r[1]=core.itemCount("blueKey"),r[2]=core.itemCount("redKey"),l.value=(H=core.status.thisMap)==null?void 0:H.title,c.value=core.getLvName(a.lv),flags.blade&&flags.bladeOn?d.value="\u65AD\u706D\u4E4B\u5203":flags.shield&&flags.shieldOn?d.value="\u94F8\u5251\u4E3A\u76FE":d.value="\u65E0",u.value=(N=core.getNextLvUpNeed())!=null?N:0,core.hasFlag("spring")&&(h.value=50-flags.springCount),f.value=core.getFlag("chapter",0)>0,g.value=core.getSkillLevel(11)>0}function w(){core.useItem("skill1")}function B(){core.useItem("cross")}function D(){core.ui._drawViewMaps()}function P(){}return(H,N)=>(openBlock(),createElementBlock("div",_hoisted_1$5,[createVNode(Box,{resizable:!0,dragable:!0,width:e.value,"onUpdate:width":N[1]||(N[1]=W=>e.value=W),height:i.value,"onUpdate:height":N[2]||(N[2]=W=>i.value=W)},{default:withCtx(()=>[createVNode(Scroll,{id:"status-main",update:s.value,"onUpdate:update":N[0]||(N[0]=W=>s.value=W),"no-scroll":!0},{default:withCtx(()=>{var W,L,U;return[createBaseVNode("div",_hoisted_2$4,[createBaseVNode("span",{id:"status-floor",onClick:withModifiers(D,["stop"]),class:"button-text"},toDisplayString(l.value),9,_hoisted_3$4),createBaseVNode("span",_hoisted_4$3,toDisplayString(c.value),1),createBaseVNode("div",_hoisted_5$2,[_hoisted_6$1,createBaseVNode("span",null,toDisplayString(d.value),1)]),createBaseVNode("div",_hoisted_7$1,[_hoisted_8$1,createBaseVNode("span",_hoisted_9$1,toDisplayString(unref(n)(unref(a).hp)),1),createBaseVNode("span",_hoisted_10$1,"+"+toDisplayString(unref(n)(unref(a).hpmax))+"/t",1),unref(has)(h.value)?(openBlock(),createElementBlock("span",_hoisted_11$1,"\u5269\u4F59"+toDisplayString(h.value),1)):createCommentVNode("",!0)]),createBaseVNode("div",_hoisted_12,[_hoisted_13,createBaseVNode("span",_hoisted_14,toDisplayString(unref(n)(unref(a).atk)),1),createBaseVNode("span",_hoisted_15,"+"+toDisplayString(unref(n)(unref(a).mana)),1)]),createBaseVNode("div",_hoisted_16,[_hoisted_17,createBaseVNode("span",null,toDisplayString(unref(n)(unref(a).def)),1)]),createBaseVNode("div",_hoisted_18,[_hoisted_19,createBaseVNode("span",null,toDisplayString(unref(n)(unref(a).mdef)),1)]),createBaseVNode("div",_hoisted_20,[_hoisted_21,createBaseVNode("span",null,toDisplayString(unref(n)(unref(a).money)),1)]),createBaseVNode("div",_hoisted_22,[_hoisted_23,createBaseVNode("span",null,toDisplayString(unref(n)(u.value)),1)]),createBaseVNode("div",_hoisted_24,[createBaseVNode("span",_hoisted_25,toDisplayString((W=unref(r)[0])==null?void 0:W.toString().padStart(2,"0")),1),createBaseVNode("span",_hoisted_26,toDisplayString((L=unref(r)[1])==null?void 0:L.toString().padStart(2,"0")),1),createBaseVNode("span",_hoisted_27,toDisplayString((U=unref(r)[2])==null?void 0:U.toString().padStart(2,"0")),1)]),f.value?(openBlock(),createElementBlock("div",_hoisted_28,[createBaseVNode("span",{id:"skill-tree",class:"button-text",onClick:withModifiers(w,["stop"])},"\u6280\u80FD\u6811",8,_hoisted_29)])):createCommentVNode("",!0),f.value?(openBlock(),createElementBlock("div",_hoisted_30,[createBaseVNode("span",{id:"status-skill",class:"button-text",onClick:withModifiers(B,["stop"])},"\u67E5\u770B\u6280\u80FD",8,_hoisted_31)])):createCommentVNode("",!0),g.value?(openBlock(),createElementBlock("div",_hoisted_32,[createBaseVNode("span",{id:"status-study",class:"button-text",onClick:withModifiers(P,["stop"])},"\u5B66\u4E60",8,_hoisted_33)])):createCommentVNode("",!0)])]}),_:1},8,["update"])]),_:1},8,["width","height"])]))}}),statusBar_vue_vue_type_style_index_0_scoped_f0e92f32_lang="",StatusBar=_export_sfc(_sfc_main$5,[["__scopeId","data-v-f0e92f32"]]),_hoisted_1$4={id:"marked-enemy"},_hoisted_2$3={class:"marked-main"},_hoisted_3$3={class:"marked-info"},_hoisted_4$2={class:"marked-name marked-item"},_hoisted_5$1={class:"marked-damage marked-item"},_hoisted_6={class:"marked-critical marked-item"},_hoisted_7={class:"marked-critical-damage marked-item"},_hoisted_8={class:"marked-def marked-item"},_hoisted_9={class:"marked-button"},_hoisted_10=["onClick"],_hoisted_11=["onClick"],_sfc_main$4=defineComponent({__name:"markedEnemy",setup(t){var u,h;const e=(h=(u=core.status.thisMap)==null?void 0:u.ratio)!=null?h:1;let i=getMarkedEnemy();watch(checkMarkedStatus,n);const s=reactive({});function n(){i.push(...i.splice(0,i.length));for(const f in s)i.includes(f)||delete s[f]}function a(f){return has(s[f])||(s[f]={left:window.innerWidth-300,top:100,width:200,height:150,hidden:!1}),s[f]}function r(f){return core.material.enemys[f].name}function l(f){var g,m;return(m=core.formatBigNumber((g=core.getDamageInfo(f,void 0,void 0,void 0,"empty"))==null?void 0:g.damage))!=null?m:"???"}function c(f){var g,m;return(m=(g=core.nextCriticals(f,1,void 0,void 0,"empty")[0])==null?void 0:g.map(_=>core.formatBigNumber(_)))!=null?m:[0,0]}function d(f){return core.formatBigNumber(core.getDefDamage(f,e,void 0,void 0,"empty"))}return(f,g)=>(openBlock(),createElementBlock("div",_hoisted_1$4,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(i),m=>(openBlock(),createElementBlock("div",null,[a(m).hidden?createCommentVNode("",!0):(openBlock(),createBlock(Box,{key:m,left:a(m).left,"onUpdate:left":_=>a(m).left=_,top:a(m).top,"onUpdate:top":_=>a(m).top=_,width:a(m).width,"onUpdate:width":_=>a(m).width=_,height:a(m).height,"onUpdate:height":_=>a(m).height=_,resizable:!0,dragable:!0},{default:withCtx(()=>[createVNode(Scroll,{class:"box-scroll","no-scroll":!0},{default:withCtx(()=>[createBaseVNode("div",_hoisted_2$3,[createBaseVNode("div",_hoisted_3$3,[createVNode(_sfc_main$p,{id:m,width:24,height:24},null,8,["id"]),createBaseVNode("span",_hoisted_4$2,toDisplayString(r(m)),1)]),createBaseVNode("span",_hoisted_5$1,"\u4F24\u5BB3\uFF1A"+toDisplayString(l(m)),1),createBaseVNode("span",_hoisted_6,"\u4E34\u754C\uFF1A"+toDisplayString(c(m)[0]),1),createBaseVNode("span",_hoisted_7,"\u51CF\u4F24\uFF1A"+toDisplayString(c(m)[1]),1),createBaseVNode("span",_hoisted_8,toDisplayString(unref(e))+"\u9632\uFF1A"+toDisplayString(d(m)),1),createBaseVNode("div",_hoisted_9,[createBaseVNode("span",{class:"marked-hide button-text",onClick:withModifiers(_=>a(m).hidden=!0,["stop"])},"\u9690\u85CF\u76D2\u5B50",8,_hoisted_10),createBaseVNode("span",{class:"marked-cancel button-text",onClick:withModifiers(_=>unref(unmarkEnemy)(m),["stop"])},"\u53D6\u6D88\u6807\u8BB0",8,_hoisted_11)])])]),_:2},1024)]),_:2},1032,["left","onUpdate:left","top","onUpdate:top","width","onUpdate:width","height","onUpdate:height"]))]))),256))]))}}),markedEnemy_vue_vue_type_style_index_0_scoped_b674387d_lang="",MarkedEnemy=_export_sfc(_sfc_main$4,[["__scopeId","data-v-b674387d"]]),_withScopeId=t=>(pushScopeId("data-v-feaaf373"),t=t(),popScopeId(),t),_hoisted_1$3={id:"chapter"},_hoisted_2$2=_withScopeId(()=>createBaseVNode("canvas",{id:"chapter-back"},null,-1)),_hoisted_3$2={id:"chapter-text"},_sfc_main$3=defineComponent({__name:"chapter",props:{chapter:null},setup(t){const e=t;let i,s,n;return onMounted(async()=>{i=document.getElementById("chapter-back"),s=i.getContext("2d"),n=document.getElementById("chapter-text");const a=new R,r=window.innerWidth*devicePixelRatio,l=window.innerHeight*devicePixelRatio;s.font="5vh scroll";const c=s.measureText(e.chapter).width,d=l*.05;a.register("rect",0),a.register("line",-10),a.register("lineOpacity",1),a.register("rect2",l/2),a.register("text",window.innerWidth+10+c),i.width=r,i.height=l,i.style.width=`${window.innerWidth}px`,i.style.height=`${window.innerHeight}px`,n.style.left=`${r+10}px`,n.style.top=`${window.innerHeight/2-l*.025}px`,n.style.height=`${l*.05}px`,n.style.width=`${c}px`;let u=!1,h=!1;a.ticker.add(f=>{if(!(!has(f)||isNaN(f))){if(!h){h=!0;return}f>=4050&&(chapterShowed.value=!1,a.ticker.destroy()),!u&&f>=1500&&(u=!0,core.playSound("chapter.mp3")),s.restore(),s.save(),n.style.left=`${a.value.text}px`,s.fillStyle="#000",s.clearRect(0,0,r,l),f<=2e3?(s.fillRect(0,l/2,r,-a.value.rect),s.fillRect(0,l/2,r,a.value.rect)):f>=2e3&&f<=3050&&(s.fillRect(0,0,r,a.value.rect2),s.fillRect(0,l,r,-a.value.rect2)),s.shadowColor="#fff",s.shadowBlur=3,s.shadowOffsetX=0,s.shadowOffsetY=0,s.lineWidth=3,s.strokeStyle="#fff",s.fillStyle="#fff",s.globalAlpha=a.value.lineOpacity,s.beginPath(),s.moveTo(0,l/2-d),s.lineTo(a.value.line,l/2-d),s.stroke(),s.beginPath(),s.moveTo(r,l/2+d),s.lineTo(r-a.value.line,l/2+d),s.stroke(),s.shadowBlur=0,s.filter="blur(5px)",s.beginPath(),s.arc(a.value.line,l/2-d,10,0,Math.PI*2),s.fill(),s.beginPath(),s.arc(r-a.value.line,l/2+d,10,0,Math.PI*2),s.fill()}}),a.mode(C("tan","center")).time(3e3).absolute().apply("line",r+10).mode(C("sin","out")).time(1e3).apply("rect",l/2).mode(C("tan","center")).time(3e3).apply("text",-c*2-10),await S(2e3),a.mode(C("sin","in")).time(1e3).apply("rect2",0),await S(1e3),a.mode(C("sin","out")).time(1e3).apply("lineOpacity",0)}),(a,r)=>(openBlock(),createElementBlock("div",_hoisted_1$3,[_hoisted_2$2,createBaseVNode("span",_hoisted_3$2,toDisplayString(t.chapter),1)]))}}),chapter_vue_vue_type_style_index_0_scoped_feaaf373_lang="",Chapter=_export_sfc(_sfc_main$3,[["__scopeId","data-v-feaaf373"]]),_hoisted_1$2={id:"studied"},_hoisted_2$1={id:"studied-main"},_hoisted_3$1={id:"studied-rough"},_hoisted_4$1={key:0,id:"studied-detail"},_sfc_main$2=defineComponent({__name:"studied",setup(t){watch(status,f=>{});let e;const i=ref(200),s=ref(0),n=ref(window.innerWidth-300),a=ref(window.innerHeight-300),r=reactive([]),l=computed(()=>{var f,g;return status.value,(g=(f=core.status.hero.special)==null?void 0:f.num)!=null?g:[]}),c=computed(()=>{var f,g;return status.value,(g=(f=core.status.hero.special)==null?void 0:f.last)!=null?g:[]}),d=computed(()=>{const f=core.getSpecials();return l.value.map(g=>{const m=f[g-1][1];return m instanceof Function?m(core.status.hero.special):m})});function u(f){const m=core.getSpecials()[f-1][2];return m instanceof Function?m(core.status.hero.special):m}async function h(){await new Promise(f=>{requestAnimationFrame(()=>{const g=getComputedStyle(e);s.value=parseFloat(g.height),f()})})}return onUpdated(()=>{h()}),onMounted(()=>{e=document.getElementById("studied-main"),h()}),(f,g)=>(openBlock(),createElementBlock("div",_hoisted_1$2,[createVNode(Box,{resizable:!0,dragable:!0,width:i.value,"onUpdate:width":g[0]||(g[0]=m=>i.value=m),height:s.value,"onUpdate:height":g[1]||(g[1]=m=>s.value=m),left:n.value,"onUpdate:left":g[2]||(g[2]=m=>n.value=m),top:a.value,"onUpdate:top":g[3]||(g[3]=m=>a.value=m)},{default:withCtx(()=>[createVNode(Scroll,{"no-scroll":!0,style:{height:"100%"}},{default:withCtx(()=>[createBaseVNode("div",_hoisted_2$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(l),(m,_)=>(openBlock(),createElementBlock("div",{key:_},[createBaseVNode("div",_hoisted_3$1,[createVNode(unref(RightOutlined),{folded:!!r[_],onClick:w=>r[_]=!r[_],id:"studied-fold"},null,8,["folded","onClick"]),createBaseVNode("span",null,toDisplayString(_)+". "+toDisplayString(unref(d)[_])+"\uFF0C\u5269\u4F59"+toDisplayString(unref(c)[_])+"\u573A\u6218\u6597",1)]),r[_]?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_4$1,toDisplayString(u(m)),1))]))),128))])]),_:1})]),_:1},8,["width","height","left","top"])]))}}),studied_vue_vue_type_style_index_0_scoped_bd83c8c3_lang="",Studied=_export_sfc(_sfc_main$2,[["__scopeId","data-v-bd83c8c3"]]),_hoisted_1$1={id:"fixed"},_hoisted_2={id:"enemy-fixed"},_hoisted_3={id:"enemy-name"},_hoisted_4={id:"enemy-special"},_hoisted_5={class:"enemy-attr"},_sfc_main$1=defineComponent({__name:"fixed",setup(t){watch(showFixed,m=>{m&&f()});let e;const i=core.formatBigNumber,s=["hp","atk","def","money","exp","critical","criticalDamage","defDamage"],n=["lightgreen","lightcoral","lightblue","lightyellow","lawngreen","lightsalmon","lightpink","cyan"],a=ref(core.plugin.bookDetailEnemy),r=ref(0),l=ref(0),c=ref(300),d=ref(400);let u=window.innerHeight,h=window.innerWidth;async function f(){if(a.value=core.plugin.bookDetailEnemy,u=window.innerHeight,h=window.innerWidth,c.value=u*.28,await new Promise(D=>requestAnimationFrame(D)),core.plugin.fixedDetailOpened.value&&(showFixed.value=!1),e=document.getElementById("enemy-fixed"),!e)return;const m=getComputedStyle(e),_=parseFloat(m.height),[w,B]=flags.clientLoc;B+_+10>u-10?l.value=u-_-10:l.value=B+10,w+c.value+10>h-10?r.value=h-c.value-10:r.value=w+10,d.value=_}function g(m){var _,w,B;return m==="critical"?"\u4E34\u754C":m==="criticalDamage"?"\u4E34\u754C\u51CF\u4F24":m==="defDamage"?`${(B=(w=(_=core.status)==null?void 0:_.thisMap)==null?void 0:w.ratio)!=null?B:1}\u9632`:core.getStatusLabel(m)}return onUpdated(f),onMounted(()=>{e=document.getElementById("enemy-fixed"),f()}),(m,_)=>(openBlock(),createElementBlock("div",_hoisted_1$1,[createVNode(Transition,null,{default:withCtx(()=>[unref(showFixed)?(openBlock(),createBlock(Box,{key:0,height:d.value,"onUpdate:height":_[0]||(_[0]=w=>d.value=w),left:r.value,"onUpdate:left":_[1]||(_[1]=w=>r.value=w),top:l.value,"onUpdate:top":_[2]||(_[2]=w=>l.value=w),width:c.value,"onUpdate:width":_[3]||(_[3]=w=>c.value=w)},{default:withCtx(()=>[createBaseVNode("div",_hoisted_2,[createBaseVNode("span",_hoisted_3,toDisplayString(a.value.name),1),createBaseVNode("div",_hoisted_4,[(openBlock(!0),createElementBlock(Fragment,null,renderList(a.value.toShowSpecial,(w,B)=>(openBlock(),createElementBlock("span",{style:normalizeStyle({color:a.value.toShowColor[B]})},toDisplayString(w),5))),256))]),(openBlock(),createElementBlock(Fragment,null,renderList(s,(w,B)=>createBaseVNode("div",_hoisted_5,[createBaseVNode("span",{class:"attr-name",style:normalizeStyle({color:n[B]})},toDisplayString(g(w)),5),createBaseVNode("span",{class:"attr-value",style:normalizeStyle({color:n[B]})},toDisplayString(unref(i)(a.value[w])),5)])),64))])]),_:1},8,["height","left","top","width"])):createCommentVNode("",!0)]),_:1})]))}}),fixed_vue_vue_type_style_index_0_scoped_d7e97953_lang="",Fixed=_export_sfc(_sfc_main$1,[["__scopeId","data-v-d7e97953"]]),_hoisted_1={id:"non-ui"},_sfc_main=defineComponent({__name:"App2",setup(t){return(e,i)=>(openBlock(),createElementBlock("div",_hoisted_1,[unref(showStatusBar)?(openBlock(),createBlock(StatusBar,{key:0})):createCommentVNode("",!0),unref(showMarkedEnemy)&&unref(showStatusBar)?(openBlock(),createBlock(MarkedEnemy,{key:1})):createCommentVNode("",!0),unref(showStudiedSkill)&&unref(showStatusBar)&&unref(showStudied$1)?(openBlock(),createBlock(Studied,{key:2})):createCommentVNode("",!0),unref(showStatusBar)&&unref(useFixed$1)?(openBlock(),createBlock(Fixed,{key:3})):createCommentVNode("",!0),unref(chapterShowed)?(openBlock(),createBlock(Chapter,{key:4,chapter:unref(chapterContent)},null,8,["chapter"])):createCommentVNode("",!0)]))}}),App2_vue_vue_type_style_index_0_scoped_02d8acd2_lang="",App2=_export_sfc(_sfc_main,[["__scopeId","data-v-02d8acd2"]]),styles="",antd_dark="";createApp(App).mount("#root");createApp(App2).mount("#root2");export{__vite_legacy_guard};
|