From 9c98ac17a3c03cf379bcc73062bc40c6ef4cdb4a Mon Sep 17 00:00:00 2001 From: AxiBright Date: Sun, 19 Apr 2026 14:46:44 +0800 Subject: [PATCH] vault backup: 2026-04-19 14:46:44 --- .obsidian/community-plugins.json | 3 +- .../plugins/albus-super-daily-notes/main.js | 156 ++++++++++++++++++ .../albus-super-daily-notes/manifest.json | 1 + .../albus-super-daily-notes/styles.css | 1 + .obsidian/plugins/obsidian42-brat/data.json | 5 + .obsidian/workspace.json | 4 +- 6 files changed, 167 insertions(+), 3 deletions(-) create mode 100644 .obsidian/plugins/albus-super-daily-notes/main.js create mode 100644 .obsidian/plugins/albus-super-daily-notes/manifest.json create mode 100644 .obsidian/plugins/albus-super-daily-notes/styles.css diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index ee188bf..9e198af 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -17,5 +17,6 @@ "obsidian42-brat", "obsidian-custom-attachment-location", "i18n", - "heatmap-tracker" + "heatmap-tracker", + "albus-super-daily-notes" ] \ No newline at end of file diff --git a/.obsidian/plugins/albus-super-daily-notes/main.js b/.obsidian/plugins/albus-super-daily-notes/main.js new file mode 100644 index 0000000..51120c5 --- /dev/null +++ b/.obsidian/plugins/albus-super-daily-notes/main.js @@ -0,0 +1,156 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var b5=Object.create;var mh=Object.defineProperty;var S5=Object.getOwnPropertyDescriptor;var w5=Object.getOwnPropertyNames;var T5=Object.getPrototypeOf,D5=Object.prototype.hasOwnProperty;var C5=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),WC=(r,e)=>{for(var t in e)mh(r,t,{get:e[t],enumerable:!0})},YC=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of w5(e))!D5.call(r,i)&&i!==t&&mh(r,i,{get:()=>e[i],enumerable:!(a=S5(e,i))||a.enumerable});return r};var r0=(r,e,t)=>(t=r!=null?b5(T5(r)):{},YC(e||!r||!r.__esModule?mh(t,"default",{value:r,enumerable:!0}):t,r)),M5=r=>YC(mh({},"__esModule",{value:!0}),r);var c0=C5(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});var Ie=require("obsidian"),a0="YYYY-MM-DD",i0="gggg-[W]ww",XC="YYYY-MM",qC="YYYY-[Q]Q",jC="YYYY";function kc(r){var t,a;let e=window.app.plugins.getPlugin("periodic-notes");return e&&((a=(t=e.settings)==null?void 0:t[r])==null?void 0:a.enabled)}function Rc(){var r,e,t,a;try{let{internalPlugins:i,plugins:n}=window.app;if(kc("daily")){let{format:u,folder:c,template:f}=((e=(r=n.getPlugin("periodic-notes"))==null?void 0:r.settings)==null?void 0:e.daily)||{};return{format:u||a0,folder:(c==null?void 0:c.trim())||"",template:(f==null?void 0:f.trim())||""}}let{folder:o,format:s,template:l}=((a=(t=i.getPluginById("daily-notes"))==null?void 0:t.instance)==null?void 0:a.options)||{};return{format:s||a0,folder:(o==null?void 0:o.trim())||"",template:(l==null?void 0:l.trim())||""}}catch(i){console.info("No custom daily note settings found!",i)}}function Nc(){var r,e,t,a,i,n,o;try{let s=window.app.plugins,l=(r=s.getPlugin("calendar"))==null?void 0:r.options,u=(t=(e=s.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.weekly;if(kc("weekly"))return{format:u.format||i0,folder:((a=u.folder)==null?void 0:a.trim())||"",template:((i=u.template)==null?void 0:i.trim())||""};let c=l||{};return{format:c.weeklyNoteFormat||i0,folder:((n=c.weeklyNoteFolder)==null?void 0:n.trim())||"",template:((o=c.weeklyNoteTemplate)==null?void 0:o.trim())||""}}catch(s){console.info("No custom weekly note settings found!",s)}}function Oc(){var e,t,a,i;let r=window.app.plugins;try{let n=kc("monthly")&&((t=(e=r.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.monthly)||{};return{format:n.format||XC,folder:((a=n.folder)==null?void 0:a.trim())||"",template:((i=n.template)==null?void 0:i.trim())||""}}catch(n){console.info("No custom monthly note settings found!",n)}}function zc(){var e,t,a,i;let r=window.app.plugins;try{let n=kc("quarterly")&&((t=(e=r.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.quarterly)||{};return{format:n.format||qC,folder:((a=n.folder)==null?void 0:a.trim())||"",template:((i=n.template)==null?void 0:i.trim())||""}}catch(n){console.info("No custom quarterly note settings found!",n)}}function Vc(){var e,t,a,i;let r=window.app.plugins;try{let n=kc("yearly")&&((t=(e=r.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.yearly)||{};return{format:n.format||jC,folder:((a=n.folder)==null?void 0:a.trim())||"",template:((i=n.template)==null?void 0:i.trim())||""}}catch(n){console.info("No custom yearly note settings found!",n)}}function $C(...r){let e=[];for(let a=0,i=r.length;a{let y=a(),x=r.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return d&&x.add(parseInt(v,10),m),g?x.format(g.substring(1).trim()):x.format(n)}).replace(/{{\s*yesterday\s*}}/gi,r.clone().subtract(1,"day").format(n)).replace(/{{\s*tomorrow\s*}}/gi,r.clone().add(1,"d").format(n)));return e.foldManager.save(f,l),f}catch(f){console.error(`Failed to create file: '${c}'`,f),new Ie.Notice("Unable to create new file.")}}function R5(r,e){var t;return(t=e[ci(r,"day")])!=null?t:null}function N5(){let{vault:r}=window.app,{folder:e}=Rc(),t=r.getAbstractFileByPath(Ie.normalizePath(e));if(!t)throw new n0("Failed to find daily notes folder");let a={};return Ie.Vault.recurseChildren(t,i=>{if(i instanceof Ie.TFile){let n=Hl(i,"day");if(n){let o=ci(n,"day");a[o]=i}}}),a}var o0=class extends Error{};function O5(){let{moment:r}=window,e=r.localeData()._week.dow,t=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;e;)t.push(t.shift()),e--;return t}function z5(r){return O5().indexOf(r.toLowerCase())}async function tM(r){let{vault:e}=window.app,{template:t,format:a,folder:i}=Nc(),[n,o]=await Fl(t),s=r.format(a),l=await Bc(i,s);try{let u=await e.create(l,n.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(c,f,p,h,d,v)=>{let m=window.moment(),g=r.clone().set({hour:m.get("hour"),minute:m.get("minute"),second:m.get("second")});return p&&g.add(parseInt(h,10),d),v?g.format(v.substring(1).trim()):g.format(a)}).replace(/{{\s*title\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(c,f,p)=>{let h=z5(f);return r.weekday(h).format(p.trim())}));return window.app.foldManager.save(u,o),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Ie.Notice("Unable to create new file.")}}function V5(r,e){var t;return(t=e[ci(r,"week")])!=null?t:null}function B5(){let r={};if(!rM())return r;let{vault:e}=window.app,{folder:t}=Nc(),a=e.getAbstractFileByPath(Ie.normalizePath(t));if(!a)throw new o0("Failed to find weekly notes folder");return Ie.Vault.recurseChildren(a,i=>{if(i instanceof Ie.TFile){let n=Hl(i,"week");if(n){let o=ci(n,"week");r[o]=i}}}),r}var s0=class extends Error{};async function eM(r){let{vault:e}=window.app,{template:t,format:a,folder:i}=Oc(),[n,o]=await Fl(t),s=r.format(a),l=await Bc(i,s);try{let u=await e.create(l,n.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(c,f,p,h,d,v)=>{let m=window.moment(),g=r.clone().set({hour:m.get("hour"),minute:m.get("minute"),second:m.get("second")});return p&&g.add(parseInt(h,10),d),v?g.format(v.substring(1).trim()):g.format(a)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,o),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Ie.Notice("Unable to create new file.")}}function U5(r,e){var t;return(t=e[ci(r,"month")])!=null?t:null}function F5(){let r={};if(!aM())return r;let{vault:e}=window.app,{folder:t}=Oc(),a=e.getAbstractFileByPath(Ie.normalizePath(t));if(!a)throw new s0("Failed to find monthly notes folder");return Ie.Vault.recurseChildren(a,i=>{if(i instanceof Ie.TFile){let n=Hl(i,"month");if(n){let o=ci(n,"month");r[o]=i}}}),r}var l0=class extends Error{};async function H5(r){let{vault:e}=window.app,{template:t,format:a,folder:i}=zc(),[n,o]=await Fl(t),s=r.format(a),l=await Bc(i,s);try{let u=await e.create(l,n.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(c,f,p,h,d,v)=>{let m=window.moment(),g=r.clone().set({hour:m.get("hour"),minute:m.get("minute"),second:m.get("second")});return p&&g.add(parseInt(h,10),d),v?g.format(v.substring(1).trim()):g.format(a)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,o),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Ie.Notice("Unable to create new file.")}}function G5(r,e){var t;return(t=e[ci(r,"quarter")])!=null?t:null}function W5(){let r={};if(!iM())return r;let{vault:e}=window.app,{folder:t}=zc(),a=e.getAbstractFileByPath(Ie.normalizePath(t));if(!a)throw new l0("Failed to find quarterly notes folder");return Ie.Vault.recurseChildren(a,i=>{if(i instanceof Ie.TFile){let n=Hl(i,"quarter");if(n){let o=ci(n,"quarter");r[o]=i}}}),r}var u0=class extends Error{};async function Y5(r){let{vault:e}=window.app,{template:t,format:a,folder:i}=Vc(),[n,o]=await Fl(t),s=r.format(a),l=await Bc(i,s);try{let u=await e.create(l,n.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(c,f,p,h,d,v)=>{let m=window.moment(),g=r.clone().set({hour:m.get("hour"),minute:m.get("minute"),second:m.get("second")});return p&&g.add(parseInt(h,10),d),v?g.format(v.substring(1).trim()):g.format(a)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,o),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Ie.Notice("Unable to create new file.")}}function Z5(r,e){var t;return(t=e[ci(r,"year")])!=null?t:null}function X5(){let r={};if(!nM())return r;let{vault:e}=window.app,{folder:t}=Vc(),a=e.getAbstractFileByPath(Ie.normalizePath(t));if(!a)throw new u0("Failed to find yearly notes folder");return Ie.Vault.recurseChildren(a,i=>{if(i instanceof Ie.TFile){let n=Hl(i,"year");if(n){let o=ci(n,"year");r[o]=i}}}),r}function q5(){var a,i;let{app:r}=window,e=r.internalPlugins.plugins["daily-notes"];if(e&&e.enabled)return!0;let t=r.plugins.getPlugin("periodic-notes");return t&&((i=(a=t.settings)==null?void 0:a.daily)==null?void 0:i.enabled)}function rM(){var t,a;let{app:r}=window;if(r.plugins.getPlugin("calendar"))return!0;let e=r.plugins.getPlugin("periodic-notes");return e&&((a=(t=e.settings)==null?void 0:t.weekly)==null?void 0:a.enabled)}function aM(){var t,a;let{app:r}=window,e=r.plugins.getPlugin("periodic-notes");return e&&((a=(t=e.settings)==null?void 0:t.monthly)==null?void 0:a.enabled)}function iM(){var t,a;let{app:r}=window,e=r.plugins.getPlugin("periodic-notes");return e&&((a=(t=e.settings)==null?void 0:t.quarterly)==null?void 0:a.enabled)}function nM(){var t,a;let{app:r}=window,e=r.plugins.getPlugin("periodic-notes");return e&&((a=(t=e.settings)==null?void 0:t.yearly)==null?void 0:a.enabled)}function j5(r){let e={day:Rc,week:Nc,month:Oc,quarter:zc,year:Vc}[r];return e()}function $5(r,e){return{day:QC,month:eM,week:tM}[r](e)}Xt.DEFAULT_DAILY_NOTE_FORMAT=a0;Xt.DEFAULT_MONTHLY_NOTE_FORMAT=XC;Xt.DEFAULT_QUARTERLY_NOTE_FORMAT=qC;Xt.DEFAULT_WEEKLY_NOTE_FORMAT=i0;Xt.DEFAULT_YEARLY_NOTE_FORMAT=jC;Xt.appHasDailyNotesPluginLoaded=q5;Xt.appHasMonthlyNotesPluginLoaded=aM;Xt.appHasQuarterlyNotesPluginLoaded=iM;Xt.appHasWeeklyNotesPluginLoaded=rM;Xt.appHasYearlyNotesPluginLoaded=nM;Xt.createDailyNote=QC;Xt.createMonthlyNote=eM;Xt.createPeriodicNote=$5;Xt.createQuarterlyNote=H5;Xt.createWeeklyNote=tM;Xt.createYearlyNote=Y5;Xt.getAllDailyNotes=N5;Xt.getAllMonthlyNotes=F5;Xt.getAllQuarterlyNotes=W5;Xt.getAllWeeklyNotes=B5;Xt.getAllYearlyNotes=X5;Xt.getDailyNote=R5;Xt.getDailyNoteSettings=Rc;Xt.getDateFromFile=Hl;Xt.getDateFromPath=k5;Xt.getDateUID=ci;Xt.getMonthlyNote=U5;Xt.getMonthlyNoteSettings=Oc;Xt.getPeriodicNoteSettings=j5;Xt.getQuarterlyNote=G5;Xt.getQuarterlyNoteSettings=zc;Xt.getTemplateInfo=Fl;Xt.getWeeklyNote=V5;Xt.getWeeklyNoteSettings=Nc;Xt.getYearlyNote=Z5;Xt.getYearlyNoteSettings=Vc});var Tat={};WC(Tat,{default:()=>t0});module.exports=M5(Tat);var _5=require("obsidian");var E5=[],A5=[],ZC={license:{key:""},scheduleTitle:"# \u65E5\u7A0B",habitTitle:"# \u6253\u5361",journalTitle:"# \u65E5\u5FD7",dayStartHour:8,grayOutCompleted:!0,customTags:E5,habitItems:A5,dragSnapMode:"precise",showOnlyLeafTag:!1,cardStyle:"colorful",statsEnabled:!0,habitsEnabled:!0,eventsEnabled:!0,journalEnabled:!0,floatingTimerEnabled:!0,floatingTimerAudioEnabled:!0,floatingTimerExpandRadius:140,settingsTab:"basic"};var br=require("obsidian"),pi=r0(c0());function ne(r){let e=r.getFullYear(),t=(r.getMonth()+1).toString().padStart(2,"0"),a=r.getDate().toString().padStart(2,"0");return`${e}-${t}-${a}`}function fi(r){let e=r.getDay(),t=e===0?-6:1-e,a=new Date(r);return a.setDate(r.getDate()+t),a.setHours(0,0,0,0),a}function xe(r){let[e,t]=r.split(":").map(Number);return e*60+t}function _r(r){if(r>=1440)return"23:59";r<0&&(r=0);let e=Math.floor(r/60),t=Math.round(r%60);return`${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`}function Gl(r){let e=r.getFullYear(),t=r.getMonth(),a=new Date(e,t,1),i=new Date(e,t+1,0),n=(a.getDay()+6)%7,o=i.getDate(),s=[],l=new Date(e,t,0).getDate();for(let c=0;cu.startTime.localeCompare(c.startTime));let n=r.split(` +`),o=!1,s="",l=!1;for(let u of n){if(u.trim()===e){o=!0,l=!0,s+=u+` + +`;for(let c of i)s+=_h(c)+` +`;for(let c of a)s+=f0(c)+` +`;continue}if(o&&u.startsWith("#")&&u!==e){o=!1,s+=u+` +`;continue}o&&u.match(/^- \[(x| )\]/)||o||(s+=u+` +`)}return s}function Sh(r,e,t){let a=[],i=r.split(` +`),n=!1,o=/^- \[(x| )\] (.+)$/u;for(let s of i){if(s.trim()===e){n=!0;continue}if(n&&s.startsWith("#")&&s!==e){n=!1;continue}if(n){let l=s.match(o);if(l){let[,u,c]=l;a.push({id:`habit-${t}-${c.trim()}`,date:t,habitName:c.trim(),completed:u==="x"})}}}return a}function sM(r){return`- [${r.completed?"x":" "}] ${r.habitName}`}function lM(r,e,t){let a=r.split(` +`),i=!1,n="",o=!1;for(let s of a){if(s.trim()===e){i=!0,o=!0,n+=s+` + +`;for(let l of t)n+=sM(l)+` +`;continue}if(i&&s.startsWith("#")&&s!==e){i=!1,n+=s+` +`;continue}i||(n+=s+` +`)}if(!o){n=n.trimEnd()+` + +`+e+` + +`;for(let s of t)n+=sM(s)+` +`;n+=` +`}return n}function d0(r,e,t){let a=r.split(` +`),i=!1,n=[],o=(e.match(/^#+/)||["#"])[0].length;for(let p of a){if(p.trim()===e){i=!0;continue}if(i){let h=p.match(/^(#+)\s/);if(h&&h[1].length<=o)break;n.push(p)}}let s=n.join(` +`).trim(),l=[],u=/!\[\[([^\]|]+?)(?:\|[^\]]*?)?\]\]/g,c=/!\[(?:[^\]]*?)\]\(([^)]+?)\)/g,f;for(;(f=u.exec(s))!==null;)l.push(f[1]);for(;(f=c.exec(s))!==null;)l.push(f[1]);return{date:t,content:s,images:l,hasContent:s.length>0}}function uM(r,e,t){let a=r.split(` +`),i=(e.match(/^#+/)||["#"])[0].length,n=!1,o=!1,s="";for(let l of a){if(l.trim()===e){n=!0,o=!0,s+=l+` +`,t.trim().length>0&&(s+=` +`+t.trim()+` +`);continue}if(n){let u=l.match(/^(#+)\s/);if(u&&u[1].length<=i){n=!1,s+=` +`+l+` +`;continue}continue}s+=l+` +`}return o||(s=s.trimEnd()+` + +`+e+` +`,t.trim().length>0&&(s+=` +`+t.trim()+` +`)),s}var Hc=class{constructor(e,t,a){this.app=e;this.settings=t;this.saveSettings=a;this.dailyTasksCache=new Map;this.fileContentCache=new Map;this.cacheTimestamp=0;this.CACHE_TTL=3e5;this.FILE_CACHE_TTL=6e4}getDailyNotePath(e){let{format:t,folder:a}=(0,pi.getDailyNoteSettings)(),i=window.moment(e).format(t||"YYYY-MM-DD"),n=(a==null?void 0:a.trim())||"";return n?`${n}/${i}.md`:`${i}.md`}getDailyNoteFile(e){let t=window.moment(e);try{let a=(0,pi.getAllDailyNotes)(),i=(0,pi.getDailyNote)(t,a);return i!=null?i:null}catch(a){let i=this.getDailyNotePath(e),n=this.app.vault.getAbstractFileByPath(i);return n instanceof br.TFile?n:null}}async getOrCreateDailyNoteFile(e){let t=this.getDailyNoteFile(e);if(t)return t;try{let a=window.moment(e);return await(0,pi.createDailyNote)(a)}catch(a){return console.error("Failed to create daily note:",a),null}}async loadDayTasks(e){let t=ne(e);if(this.isCacheValid()&&this.dailyTasksCache.has(t))return this.dailyTasksCache.get(t);let a=await this.loadActualTasksFromFile(e);return this.dailyTasksCache.set(t,a),a}async loadActualTasksFromFile(e){let t=this.getDailyNoteFile(e);if(!t)return[];let a=ne(e),i=this.fileContentCache.get(t.path),n;return i&&Date.now()-i.timestampsetTimeout(()=>o(new Error("Week tasks load timeout")),5e3)),i;try{i=await Promise.race([Promise.all(t),a])}catch(n){i=[]}return i.flat()}async loadMonthTasks(e){let t=e.getFullYear(),a=e.getMonth(),i=new Date(t,a+1,0).getDate(),n=[];for(let s=1;s<=i;s++){let l=new Date(t,a,s);n.push(this.loadDayTasks(l))}return(await Promise.all(n)).flat()}async loadYearTasks(e){let t=[];for(let i=0;i<12;i++){let n=new Date(e,i,1);t.push(this.loadMonthTasks(n))}return(await Promise.all(t)).flat()}async createTask(e,t=!1){let a=await this.saveSingleTaskSilent(e);return t||new br.Notice("\u65E5\u7A0B\u5DF2\u521B\u5EFA"),a}async updateTask(e,t,a=!1){let i=await this.saveSingleTaskSilent(e,t);return a||new br.Notice("\u65E5\u7A0B\u5DF2\u66F4\u65B0"),i}async saveSingleTask(e,t){let a=new Date(e.date),i=await this.getOrCreateDailyNoteFile(a);if(!i)throw new br.Notice("\u65E0\u6CD5\u521B\u5EFA\u6216\u627E\u5230\u65E5\u8BB0\u6587\u4EF6"),new Error("\u65E0\u6CD5\u521B\u5EFA\u6216\u627E\u5230\u65E5\u8BB0\u6587\u4EF6");if(t&&t.date!==e.date){let c=new Date(t.date),f=this.getDailyNoteFile(c);if(f){let p=await this.app.vault.read(f),d=cs(p,this.settings.scheduleTitle,t.date).filter(m=>!(m.id===t.id||m.startTime===t.startTime&&m.endTime===t.endTime&&m.description===t.description)),v=Uc(p,this.settings.scheduleTitle,d);await this.app.vault.modify(f,v)}}let n=await this.app.vault.read(i),o=cs(n,this.settings.scheduleTitle,e.date),s=p0(e.startTime,e.endTime,e.description);e.id=s;let l=o;t?l=o.filter(c=>!(c.id===t.id||c.startTime===t.startTime&&c.endTime===t.endTime&&c.description===t.description)):l=o.filter(c=>c.id!==e.id),l.push(e);let u=Uc(n,this.settings.scheduleTitle,l);return u=bh(u,this.settings.scheduleTitle,e.date),await this.app.vault.modify(i,u),t&&t.date!==e.date?(this.clearDateCache(t.date),this.clearDateCache(e.date)):this.clearDateCache(e.date),e}async saveSingleTaskSilent(e,t){return this.saveSingleTask(e,t)}clearAllCaches(){this.dailyTasksCache.clear(),this.fileContentCache.clear(),this.cacheTimestamp=0}clearDateCache(e){this.dailyTasksCache.delete(e);let t=new Date(e),a=this.getDailyNotePath(t);this.fileContentCache.delete(a)}async deleteTask(e){let t=new Date(e.date),a=this.getDailyNoteFile(t);if(!a){new br.Notice("\u627E\u4E0D\u5230\u65E5\u8BB0\u6587\u4EF6");return}let i=await this.app.vault.read(a),o=cs(i,this.settings.scheduleTitle,e.date).filter(l=>l.id!==e.id),s=Uc(i,this.settings.scheduleTitle,o);await this.app.vault.modify(a,s),this.clearDateCache(e.date),new br.Notice("\u65E5\u7A0B\u5DF2\u5220\u9664")}async toggleTaskStatus(e){let t={...e},a=new Date(t.date),i=await this.getOrCreateDailyNoteFile(a);if(!i)throw new Error("\u65E0\u6CD5\u627E\u5230\u65E5\u8BB0\u6587\u4EF6");let n=await this.app.vault.read(i),o=cs(n,this.settings.scheduleTitle,t.date),s=o.findIndex(u=>u.id===e.id||u.startTime===e.startTime&&u.endTime===e.endTime&&u.description===e.description);s>=0&&(o[s]=t);let l=Uc(n,this.settings.scheduleTitle,o);return await this.app.vault.modify(i,l),this.clearDateCache(t.date),t}async loadDayEvents(e){let t=ne(e),a=this.getDailyNoteFile(e);if(!a)return[];let i=this.fileContentCache.get(a.path),n;return i&&Date.now()-i.timestamp{let p=new Date(f.date);return p.getFullYear()===t&&p.getMonth()===a?!0:!!f.endDate&&f.endDate>=n})}async createEvent(e){let t=new Date(e.date),a=await this.getOrCreateDailyNoteFile(t);if(!a)throw new br.Notice("\u65E0\u6CD5\u521B\u5EFA\u4E8B\u9879\u6587\u4EF6"),new Error("Failed to create event file");let i=await this.app.vault.read(a),n=ao(i,this.settings.scheduleTitle,e.date);n.push(e);let o=Fc(i,this.settings.scheduleTitle,n);return o=bh(o,this.settings.scheduleTitle,e.date),await this.app.vault.modify(a,o),this.clearDateCache(e.date),new br.Notice("\u4E8B\u9879\u5DF2\u521B\u5EFA"),e}async updateEvent(e,t){if(e.date!==t.date)return await this.deleteEvent(t),await this.createEvent(e);let a=new Date(e.date),i=this.getDailyNoteFile(a);if(!i)throw new br.Notice("\u4E8B\u9879\u6587\u4EF6\u4E0D\u5B58\u5728"),new Error("Event file not found");let n=await this.app.vault.read(i),o=ao(n,this.settings.scheduleTitle,e.date),s=o.findIndex(u=>u.id===t.id);s>=0&&(o[s]=e);let l=Fc(n,this.settings.scheduleTitle,o);return l=bh(l,this.settings.scheduleTitle,e.date),await this.app.vault.modify(i,l),this.clearDateCache(e.date),new br.Notice("\u4E8B\u9879\u5DF2\u66F4\u65B0"),e}async deleteEvent(e){let t=new Date(e.date),a=this.getDailyNoteFile(t);if(!a){new br.Notice("\u4E8B\u9879\u6587\u4EF6\u4E0D\u5B58\u5728");return}let i=await this.app.vault.read(a),o=ao(i,this.settings.scheduleTitle,e.date).filter(l=>l.id!==e.id),s=Fc(i,this.settings.scheduleTitle,o);await this.app.vault.modify(a,s),this.clearDateCache(e.date),new br.Notice("\u4E8B\u9879\u5DF2\u5220\u9664")}async toggleEventStatus(e){let t={...e},a=new Date(t.date),i=this.getDailyNoteFile(a);if(!i)throw new Error("\u4E8B\u9879\u6587\u4EF6\u4E0D\u5B58\u5728");let n=await this.app.vault.read(i),o=ao(n,this.settings.scheduleTitle,t.date),s=o.findIndex(u=>u.id===e.id);s>=0&&(o[s]=t);let l=Fc(n,this.settings.scheduleTitle,o);return await this.app.vault.modify(i,l),this.clearDateCache(t.date),t}async loadDayHabits(e){let t=ne(e),a=this.getDailyNoteFile(e);if(!a)return[];let i=this.fileContentCache.get(a.path),n;return i&&Date.now()-i.timestamp{let l=this.fileContentCache.get(o.path),u;return l&&Date.now()-l.timestampu.habitName===t);s?s.completed=!s.completed:o.push({id:`habit-${i}-${t}`,date:i,habitName:t,completed:!0});let l=lM(n,this.settings.habitTitle,o);await this.app.vault.modify(a,l),this.clearDateCache(i)}async loadDayJournal(e){let t=ne(e),a=this.getDailyNoteFile(e);if(!a)return{date:t,content:"",images:[],hasContent:!1};let i=this.fileContentCache.get(a.path),n;return i&&Date.now()-i.timestamps.hasContent)}async loadOnThisDayJournals(e){let t=e.getMonth(),a=e.getDate(),i;try{i=(0,pi.getAllDailyNotes)()}catch(l){return[]}let n=[],o=new Set;for(let l of Object.keys(i)){let u=i[l],c=window.moment(l,"YYYY-MM-DD");c.isValid()&&c.month()===t&&c.date()===a&&(o.has(u.path)||(o.add(u.path),n.push({file:u,dateStr:c.format("YYYY-MM-DD")})))}return n.length===0?[]:(await Promise.all(n.map(async({file:l,dateStr:u})=>{let c=this.fileContentCache.get(l.path),f;return c&&Date.now()-c.timestampl.hasContent).sort((l,u)=>u.date.localeCompare(l.date))}async saveJournal(e,t){let a=await this.getOrCreateDailyNoteFile(e);if(!a){new br.Notice("\u65E0\u6CD5\u521B\u5EFA\u65E5\u8BB0\u6587\u4EF6");return}let i=await this.app.vault.read(a),n=uM(i,this.settings.journalTitle,t);await this.app.vault.modify(a,n);let o=ne(e);this.clearDateCache(o)}};var Vl=require("obsidian"),u5=r0(c0());var hi=require("obsidian");var wn=require("obsidian");var cM=require("obsidian"),wh=require("@codemirror/view"),m0=require("@codemirror/state");function K5(r){let e=r.embedRegistry.embedByExtension.md({app:r,containerEl:document.createElement("div")},null,"");e.editable=!0,e.showEditor();let t=Object.getPrototypeOf(Object.getPrototypeOf(e.editMode));return e.unload(),t.constructor}var v0=null,Pa=class{constructor(e,t,a){this.app=e;this.options=a;this._destroyed=!1;this._observer=null;this.contentDom=null;var f,p;this.containerEl=t,v0||(v0=K5(e));let i={app:e,file:(f=a.file)!=null?f:null,editMode:null,editor:null,getFile:()=>{var h;return(h=a.file)!=null?h:null},onMarkdownScroll:()=>{},syncScroll:()=>{},getMode:()=>"source",requestSave:()=>{},save:()=>{}};this.editMode=new v0(e,t,i),this.scope=new cM.Scope(e.scope),this.scope.register(["Mod"],"Enter",()=>!0),i.editMode=this.editMode,i.editor=this.editMode.editor,this.editMode.set(String(a.value||""),!1);let n=this.editMode.unload.bind(this.editMode);this.editMode.unload=()=>{this._destroyed&&n()},typeof this.editMode.hide=="function"&&(this.editMode.hide=()=>{});let o=this.editMode,s=e.workspace.setActiveLeaf,l=function(h){var d;if(!((d=o.activeCM)!=null&&d.hasFocus))return s.apply(this,arguments)};e.workspace.setActiveLeaf=l,o.register(()=>{e.workspace.setActiveLeaf===l&&(e.workspace.setActiveLeaf=s)});let u=this.editMode.onUpdate.bind(this.editMode);this.editMode.onUpdate=(h,d)=>{var v;if(!this._destroyed){try{u(h,d)}catch(m){}if(a.singleLineAutoGrow&&d){let m=this.value.replace(/[\r\n]+/g," ");if(m!==this.value){let g=(v=this.editMode.editor)==null?void 0:v.cm;g==null||g.dispatch({changes:{from:0,to:g.state.doc.length,insert:m}});return}}d&&a.onChange&&a.onChange(this.value)}};let c=(p=this.editMode.editor)==null?void 0:p.cm;if(c){this.contentDom=c.contentDOM;let h=()=>{let d=c.state.doc.length;c.dispatch({selection:{anchor:d,head:d}})};if(c.contentDOM.addEventListener("focusin",()=>{e.keymap.pushScope(this.scope),e.workspace.activeEditor=i,a.singleLineAutoGrow&&requestAnimationFrame(h)}),c.contentDOM.addEventListener("blur",()=>{e.keymap.popScope(this.scope)}),this._observer=new MutationObserver(()=>{!this._destroyed&&c.contentDOM.contentEditable!=="true"&&(c.contentDOM.contentEditable="true")}),this._observer.observe(c.contentDOM,{attributes:!0,attributeFilter:["contenteditable"]}),this.containerEl.addEventListener("mousedown",d=>{this._destroyed||(c.contentDOM.contentEditable!=="true"&&(c.contentDOM.contentEditable="true"),c.contentDOM.contains(d.target)||(d.preventDefault(),c.focus()))}),a.placeholder&&c.dispatch({effects:m0.StateEffect.appendConfig.of([(0,wh.placeholder)(a.placeholder)])}),a.singleLineAutoGrow){this.containerEl.addClass("albus-super-daily-notes-inline-editor-field-single-line");let d=wh.EditorView.theme({"&":{minHeight:"42px"},".cm-scroller":{minHeight:"42px",overflowX:"hidden",overflowY:"hidden",padding:"11px 12px"},".cm-content":{minHeight:"0",padding:"0",lineHeight:"20px",backgroundColor:"transparent"},".cm-line":{padding:"0",lineHeight:"20px",backgroundColor:"transparent"},".cm-activeLine":{backgroundColor:"transparent"},".cm-focused .cm-activeLine":{backgroundColor:"transparent"},".cm-selectionLayer":{display:"none"},".cm-selectionBackground":{backgroundColor:"transparent"},".cm-placeholder":{lineHeight:"20px",color:"var(--text-muted)",whiteSpace:"nowrap",pointerEvents:"none"}});c.dispatch({effects:m0.StateEffect.appendConfig.of([d])}),c.contentDOM.addEventListener("keydown",v=>{v.key==="Enter"&&v.preventDefault()})}}}get value(){var e,t,a,i,n,o;return(o=(n=(i=(a=(t=(e=this.editMode)==null?void 0:e.editor)==null?void 0:t.cm)==null?void 0:a.state)==null?void 0:i.doc)==null?void 0:n.toString())!=null?o:""}focus(){var e,t,a;(a=(t=(e=this.editMode)==null?void 0:e.editor)==null?void 0:t.cm)==null||a.focus()}destroy(){var e,t;if(!this._destroyed){this._destroyed=!0,this.editMode&&(this.editMode.onUpdate=()=>{}),(e=this._observer)==null||e.disconnect(),this._observer=null,this.app.keymap.popScope(this.scope),this.app.workspace.activeEditor=null;try{(t=this.editMode)!=null&&t._loaded&&this.editMode.unload()}catch(a){}this.containerEl.empty()}}};var Th=class extends wn.Modal{constructor(t,a){var i,n,o;super(t);this.editor=null;this.saveButton=null;this.descriptionSetting=null;this.endDateSetting=null;this.task=(i=a.task)!=null?i:null,this.initialData=(n=a.initialData)!=null?n:null,this.customTags=a.customTags,this.onSubmit=a.onSubmit,this.onDelete=a.onDelete,this.showOnlyLeafTag=(o=a.showOnlyLeafTag)!=null?o:!1,this.formData=this.createInitialFormData()}createInitialFormData(){var t,a,i,n,o,s,l;return this.task?{...this.task}:{id:"",date:((t=this.initialData)==null?void 0:t.date)||ne(new Date),startTime:((a=this.initialData)==null?void 0:a.startTime)||"09:00",endTime:((i=this.initialData)==null?void 0:i.endTime)||"09:30",tag:((n=this.initialData)==null?void 0:n.tag)||"",description:((o=this.initialData)==null?void 0:o.description)||"",completed:(l=(s=this.initialData)==null?void 0:s.completed)!=null?l:!1}}getTagDisplayName(t){return this.showOnlyLeafTag&&t.split("/").pop()||t}renderDescriptionEditor(t){this.descriptionSetting=new wn.Setting(t).setName("\u63CF\u8FF0"),this.descriptionSetting.settingEl.addClass("albus-super-daily-notes-inline-editor-setting"),this.descriptionSetting.settingEl.addClass("albus-super-daily-notes-inline-editor-setting-single-line");let a=this.descriptionSetting.controlEl.createDiv({cls:"albus-super-daily-notes-inline-editor-field"});this.editor=new Pa(this.app,a,{value:this.formData.description,placeholder:"\u8F93\u5165\u65E5\u7A0B\u63CF\u8FF0...",singleLineAutoGrow:!0,onChange:i=>{this.formData.description=i,this.validateForm()}}),window.setTimeout(()=>{var i;return(i=this.editor)==null?void 0:i.focus()},30)}validateForm(){let a=this.formData.description.trim().length>0,i=this.formData.startTime,n=this.formData.endTime,o=!!i&&!!n&&i(i.setValue(this.formData.date).onChange(n=>this.formData.date=n),i.inputEl.type="date",i)),new wn.Setting(t).setName("\u5F00\u59CB\u65F6\u95F4").addText(i=>(i.setValue(this.formData.startTime).onChange(n=>{this.formData.startTime=n,this.validateForm()}),i.inputEl.type="time",i)),this.endDateSetting=new wn.Setting(t).setName("\u7ED3\u675F\u65F6\u95F4").addText(i=>(i.setValue(this.formData.endTime).onChange(n=>{this.formData.endTime=n,this.validateForm()}),i.inputEl.type="time",i)),new wn.Setting(t).setName("\u6807\u7B7E").addDropdown(i=>{i.addOption("","\u65E0\u6807\u7B7E"),this.customTags.forEach(n=>{i.addOption(n.name,this.getTagDisplayName(n.name))}),i.setValue(this.formData.tag||""),i.onChange(n=>this.formData.tag=n||void 0)}),this.renderDescriptionEditor(t),new wn.Setting(t).setName("\u72B6\u6001").addToggle(i=>i.setValue(this.formData.completed).onChange(n=>this.formData.completed=n));let a=t.createDiv({cls:"albus-super-daily-notes-modal-button-container"});this.task&&this.onDelete&&a.createEl("button",{text:"\u5220\u9664",cls:"mod-warning"}).addEventListener("click",async()=>{var i;await((i=this.onDelete)==null?void 0:i.call(this)),this.close()}),a.createEl("button",{text:"\u53D6\u6D88"}).addEventListener("click",()=>this.close()),this.saveButton=a.createEl("button",{text:this.task?"\u4FDD\u5B58":"\u521B\u5EFA",cls:"mod-cta"}),this.validateForm(),this.saveButton.addEventListener("click",async()=>{var i,n;this.validateForm()&&(this.formData.description=(n=(i=this.editor)==null?void 0:i.value)!=null?n:this.formData.description,await this.onSubmit({...this.formData}),this.close())})}onClose(){var a;(a=this.editor)==null||a.destroy(),this.editor=null;let{contentEl:t}=this;t.empty()}};var Tn=require("obsidian");var ka=class extends Tn.Modal{constructor(t,a,i){super(t);this.calendarView="month";this.currentDate=new Date(a),this.onSelect=i}onOpen(){this.modalEl.addClass("albus-super-daily-notes-datepicker-modal"),this.render()}render(){let{contentEl:t}=this;t.empty(),this.renderHeader(t),this.calendarView==="month"?this.renderMonthView(t):this.calendarView==="year"&&this.renderYearView(t)}renderHeader(t){let a=t.createDiv({cls:"albus-super-daily-notes-datepicker-header"});if(this.calendarView==="month"){let i=a.createEl("button");(0,Tn.setIcon)(i,"chevrons-left"),i.addEventListener("click",()=>{this.currentDate.setFullYear(this.currentDate.getFullYear()-1),this.render()});let n=a.createEl("button");(0,Tn.setIcon)(n,"chevron-left"),n.addEventListener("click",()=>{this.currentDate.setMonth(this.currentDate.getMonth()-1),this.render()}),a.createEl("span",{text:`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708`,cls:"albus-super-daily-notes-datepicker-title"}).addEventListener("click",()=>{this.calendarView="year",this.render()});let s=a.createEl("button");(0,Tn.setIcon)(s,"chevron-right"),s.addEventListener("click",()=>{this.currentDate.setMonth(this.currentDate.getMonth()+1),this.render()});let l=a.createEl("button");(0,Tn.setIcon)(l,"chevrons-right"),l.addEventListener("click",()=>{this.currentDate.setFullYear(this.currentDate.getFullYear()+1),this.render()})}else if(this.calendarView==="year"){let i=a.createEl("button");(0,Tn.setIcon)(i,"chevron-left"),i.addEventListener("click",()=>{this.currentDate.setFullYear(this.currentDate.getFullYear()-1),this.render()});let n=a.createEl("input",{type:"text",value:this.currentDate.getFullYear().toString(),cls:"albus-super-daily-notes-datepicker-year-input"});n.addEventListener("blur",()=>{let s=parseInt(n.value);!isNaN(s)&&s>=1e3&&s<=9999?(this.currentDate.setFullYear(s),this.render()):n.value=this.currentDate.getFullYear().toString()}),n.addEventListener("keydown",s=>{s.key==="Enter"&&n.blur()}),n.addEventListener("focus",()=>{n.select()});let o=a.createEl("button");(0,Tn.setIcon)(o,"chevron-right"),o.addEventListener("click",()=>{this.currentDate.setFullYear(this.currentDate.getFullYear()+1),this.render()})}}renderMonthView(t){let a=t.createDiv({cls:"albus-super-daily-notes-datepicker-unified-grid"});a.createEl("div",{text:"\u5468",cls:"albus-super-daily-notes-week-number-header"}),["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"].forEach(s=>{a.createEl("div",{text:s,cls:"albus-super-daily-notes-weekday"})});let i=Gl(this.currentDate),n=new Date,o=this.currentDate.getMonth();for(let s=0;s{let p=fi(l);this.onSelect(p),this.close()});for(let p=0;p<7;p++){let h=i[s+p],d=h.getMonth()===o,v=h.toDateString()===n.toDateString(),m=a.createEl("button",{text:h.getDate().toString(),cls:"albus-super-daily-notes-datepicker-day"});d&&m.addClass("albus-super-daily-notes-current-month"),v&&m.addClass("albus-super-daily-notes-today"),d||(m.disabled=!0),m.addEventListener("click",()=>{this.onSelect(h),this.close()})}}}renderYearView(t){let a=t.createDiv({cls:"albus-super-daily-notes-datepicker-months"});["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"].forEach((n,o)=>{a.createEl("button",{text:n,cls:"albus-super-daily-notes-datepicker-month"}).addEventListener("click",()=>{this.currentDate.setMonth(o),this.calendarView="month",this.render()})})}onClose(){let{contentEl:t}=this;t.empty()}};function Ra(r,e,t=!1){return e==="precise"?Math.round(r):Math.round(r/5)*5}function fM(r,e,t,a,i="precise"){let n=null,o=null,s=null;function l(f,p,h,d){var m,g;let v=d||f.currentTarget;if(!(!f||!v)){if(f.preventDefault(),f.stopPropagation(),h==="create"){let y=null;if(v.classList.contains("albus-super-daily-notes-week-day-column")||v.classList.contains("albus-super-daily-notes-timeline-content")?y=v:y=v.closest(".albus-super-daily-notes-week-day-column")||v.closest(".albus-super-daily-notes-timeline-content"),y){let x=y.getBoundingClientRect(),b=(f.clientY-x.top)/t+a*60,S=Math.min(Ra(b,i,!0),1439),w=((m=y.dataset)==null?void 0:m.date)||"";n={mode:h,task:null,startY:f.clientY,startTime:_r(S),startDuration:0,pixelPerMinute:t,dayStartHour:a,hasMoved:!1,sourceDate:w,sourceColumn:y},s=y.createDiv({cls:"albus-super-daily-notes-task-drag-preview"});let D=(S-a*60)*t;s.style.top=`${D}px`,s.style.height="0px",s.style.left="0",s.style.right="0",s.style.backgroundColor="var(--interactive-accent)",s.style.opacity="0.3",s.style.border="2px dashed var(--interactive-accent)";let C=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-start"});C.textContent=_r(S);let M=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-end"});M.textContent=_r(S)}}else if(p){let y=v.closest(".albus-super-daily-notes-week-day-column"),x=((g=y==null?void 0:y.dataset)==null?void 0:g.date)||p.date;n={mode:h,task:{...p},startY:f.clientY,startTime:p.startTime,startDuration:J5(p.startTime,p.endTime),pixelPerMinute:t,dayStartHour:a,hasMoved:!1,sourceDate:x,sourceColumn:y||void 0},n.startX=f.clientX,o=v;let _=v.closest(".albus-super-daily-notes-week-day-column")||v.closest(".albus-super-daily-notes-timeline-content");if(_){s=_.createDiv({cls:"albus-super-daily-notes-task-drag-preview"}),s.style.pointerEvents="none",s.style.zIndex="1000";let b=o.getBoundingClientRect(),S=_.getBoundingClientRect();s.style.top=`${b.top-S.top}px`,s.style.height=`${b.height}px`,s.style.left="0",s.style.right="0",s.style.backgroundColor="var(--interactive-accent)",s.style.opacity="0.4",s.style.borderRadius="8px";let w=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-start"});w.textContent=p.startTime;let D=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-end"});D.textContent=p.endTime,h==="resize-top"?(w.style.display="block",D.style.display="none"):h==="resize-bottom"?(w.style.display="none",D.style.display="block"):(w.style.display="block",D.style.display="block")}}document.addEventListener("mousemove",u),document.addEventListener("mouseup",c)}}function u(f){var m;if(!n)return;let p=f.clientY-n.startY,h=f.clientX-n.startX,d=p/n.pixelPerMinute,v=Ra(d,i,!1);if((Math.abs(p)>5||Math.abs(h||0)>5)&&(n.hasMoved=!0),n.mode==="create"){if(s){let g=Math.abs(v*n.pixelPerMinute);s.style.height=`${g}px`;let y=xe(n.startTime),x,_;if(v>=0?(x=y,_=Ra(y+v,i,!1)):(_=y,x=Math.max(n.dayStartHour*60,Ra(y+v,i,!0))),_=Math.min(_,1440),_<=x&&(_=x+Ra(1,i,!1)),p<0){let w=(x-n.dayStartHour*60)*n.pixelPerMinute;s.style.top=`${w}px`}let b=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-start"),S=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-end");b&&(b.textContent=_r(x)),S&&(S.textContent=_r(_))}}else if(n.task){let g=n.task;if(n.mode==="move"){let y=(m=document.elementFromPoint(f.clientX,f.clientY))==null?void 0:m.closest(".albus-super-daily-notes-week-day-column");if(y&&y.dataset.date){let w=y.dataset.date,D=w!==n.sourceDate;if(g.date=w,s&&y!==s.parentElement){s.remove(),s=y.createDiv({cls:"albus-super-daily-notes-task-drag-preview"}),s.style.backgroundColor="var(--interactive-accent)",s.style.opacity="0.4",s.style.borderRadius="8px",s.style.pointerEvents="none",s.style.zIndex="1000";let C=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-start"});C.textContent=g.startTime;let M=s.createDiv({cls:"albus-super-daily-notes-task-drag-time-label albus-super-daily-notes-task-drag-time-end"});M.textContent=g.endTime}}let x=xe(n.startTime)+v,_=Ra(x,i,!0),b=1440-n.startDuration,S=Math.max(a*60,Math.min(b,_));if(g.startTime=_r(S),g.endTime=_r(S+n.startDuration),s){let w=(S-a*60)*t,D=n.startDuration*t;s.style.top=`${w}px`,s.style.height=`${D}px`,s.style.left="0",s.style.right="0";let C=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-start"),M=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-end");C&&(C.textContent=g.startTime),M&&(M.textContent=g.endTime)}}else if(n.mode==="resize-top"){let y=xe(n.startTime)+v,x=Ra(y,i,!0),_=xe(g.endTime),b=Math.max(a*60,Math.min(_-5,x));if(g.startTime=_r(b),s){let S=(b-a*60)*t,w=(_-b)*t;s.style.top=`${S}px`,s.style.height=`${w}px`;let D=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-start");D&&(D.textContent=g.startTime)}}else if(n.mode==="resize-bottom"){let y=xe(n.startTime)+n.startDuration+v,x=Ra(y,i,!1),_=xe(g.startTime),b=Math.max(_+5,Math.min(1440,x));if(g.endTime=_r(b),s){let S=(_-a*60)*t,w=(b-_)*t;s.style.top=`${S}px`,s.style.height=`${w}px`;let D=s.querySelector(".albus-super-daily-notes-task-drag-time-label.albus-super-daily-notes-task-drag-time-end");D&&(D.textContent=g.endTime)}}}}function c(f){if(n){if(document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",c),n.hasMoved){if(n.mode==="create"){let h=(f.clientY-n.startY)/n.pixelPerMinute,d=Ra(h,i,!1),v=n.sourceDate||"",m=xe(n.startTime),g,y;if(d>=0)g=m,y=Ra(m+d,i,!1);else{y=m;let x=m+d;g=Math.max(n.dayStartHour*60,Ra(x,i,!0))}y=Math.min(y,1440),y<=g&&(y=g+Ra(1,i,!1)),e({startTime:_r(g),endTime:_r(y),description:"",date:v})}else if(n.task){let p={...n.task};p.startTime=n.startTime,p.endTime=_r(xe(n.startTime)+n.startDuration),p.date=n.sourceDate||p.date;let h={...n.task};r(h,p)}}o&&(o.classList.remove("albus-super-daily-notes-dragging"),o=null),s&&(s.remove(),s=null),n=null}}return{onDragStart:l,onDragMove:u,onDragEnd:c}}function J5(r,e){return xe(e)-xe(r)}function pM(r){let e=[...r].sort((a,i)=>xe(a.startTime)-xe(i.startTime)),t=[];return e.forEach(a=>{let i=xe(a.startTime),n=xe(a.endTime),o=0,s=!1;for(;!s;)t[o]||(t[o]=[]),t[o].some(u=>{let c=xe(u.startTime),f=xe(u.endTime);return ic})?o++:(t[o].push(a),a.columnIndex=o,s=!0)}),e.forEach(a=>{let i=xe(a.startTime),n=xe(a.endTime),o=e.filter(l=>{if(l===a)return!1;let u=xe(l.startTime),c=xe(l.endTime);return iu}),s=new Set([a.columnIndex]);o.forEach(l=>{s.add(l.columnIndex)}),a.totalColumns=Math.max(...s)+1}),e}function hM(r){let e=[];for(let t=r;t<=23;t++)e.push({hour:t,time:`${t}`,isFullHour:!0}),e.push({hour:t+.5,time:"",isFullHour:!1});return e}var Dh="#9ca3af";function g0(r,e){if(!r.tag)return null;let t=r.tag.split("/")[0];for(let a of e)if(t===a.name||r.tag===a.name)return a.name;return null}function Q5(r){let[e,t]=r.startTime.split(":").map(Number),[a,i]=r.endTime.split(":").map(Number),n=e*60+t,s=a*60+i-n;return s<0&&(s+=1440),s}function y0(r,e){let t={},a=0,i={};e.forEach(o=>{i[o.name]=o.color}),r.forEach(o=>{let s=Q5(o),l=g0(o,e)||"\u5176\u4ED6";t[l]||(t[l]={name:l,duration:0,color:i[l]||"#9ca3af",count:0}),t[l].duration+=s,t[l].count+=1,a+=s});let n=Object.keys(t).sort((o,s)=>t[s].duration-t[o].duration);return{tagStats:t,totalDuration:a,filteredTasks:r,sortedTagNames:n}}function fs(r){let e=Math.round(r),t=Math.floor(e/60),a=e%60;return t>0?a>0?`${t}h${a}m`:`${t}h`:`${a}m`}function x0(r,e,t){let a=r.getFullYear(),i=r.getMonth()+1,n=r.getDate();switch(t){case"day":return`${a}\u5E74${i}\u6708${n}\u65E5`;case"week":let o=yh(r);return`${xh(r)}\u5E74\u7B2C${o}\u5468`;case"month":return`${a}\u5E74${i}\u6708`;case"year":return`${a}\u5E74`;default:return""}}var Ch=class{constructor(e,t,a,i){this.container=null;this.contentContainer=null;this.viewMode="week";this.tasks=[];this.dragHandlers=null;this.currentTimeIndicator=null;this.timeIndicatorInterval=null;this.scrollPosition=0;this.needsAutoScroll=!1;this.clipboardTask=null;this.app=e,this.plugin=t,this.currentDate=a,this.callbacks=i}setTasks(e){this.tasks=e}getViewMode(){return this.viewMode}setViewMode(e){e==="week"&&this.viewMode!=="week"&&(this.needsAutoScroll=!0),this.viewMode=e}requestAutoScroll(){this.needsAutoScroll=!0}getCurrentDate(){return this.currentDate}setCurrentDate(e){this.currentDate=e}renderHeader(e,t){let a=["week","month"],i={week:"\u5468",month:"\u6708"},n={week:"calendar-minus-2",month:"calendar-days"},o=e.createDiv({cls:"albus-super-daily-notes-planner-mode-group"});a.forEach(h=>{let d=o.createEl("button",{cls:`albus-super-daily-notes-view-mode-btn ${this.viewMode===h?"albus-super-daily-notes-active":""}`});(0,hi.setIcon)(d,n[h]),d.createSpan({text:i[h]}),d.addEventListener("click",()=>{this.setViewMode(h),t()})});let s=e.createDiv({cls:"albus-super-daily-notes-planner-navigation albus-super-daily-notes-planner-navigation-centered"}),l=s.createEl("button");(0,hi.setIcon)(l,"chevron-left"),l.addEventListener("click",()=>{this.navigatePrevious(),t()}),s.createEl("button",{text:this.getViewTitle()}).addEventListener("click",()=>{new ka(this.app,this.currentDate,h=>{this.currentDate=h,t()}).open()});let c=s.createEl("button");(0,hi.setIcon)(c,"chevron-right"),c.addEventListener("click",()=>{this.navigateNext(),t()}),e.createDiv({cls:"albus-super-daily-notes-planner-actions"}).createEl("button",{text:this.viewMode==="week"?"\u672C\u5468":"\u672C\u6708"}).addEventListener("click",()=>{this.currentDate=new Date,t(),this.viewMode==="week"&&setTimeout(()=>this.scrollToCurrentTime(),100)})}renderContent(e,t){this.container=e,requestAnimationFrame(()=>{switch(this.viewMode){case"week":this.contentContainer=e,this.renderWeekView(e,t),this.needsAutoScroll&&(this.needsAutoScroll=!1,setTimeout(()=>this.scrollToCurrentTime(),100));break;case"month":this.renderMonthView(e,t);break}})}getViewTitle(){if(this.viewMode==="month")return`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708`;let e=this.getWeekNumber(this.currentDate);return`${this.currentDate.getFullYear()}\u5E74\u7B2C${e}\u5468`}getWeekNumber(e){let t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),a=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-a);let i=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-i.getTime())/864e5+1)/7)}navigatePrevious(){let e=new Date(this.currentDate);this.viewMode==="month"?e.setMonth(e.getMonth()-1):e.setDate(e.getDate()-7),this.currentDate=e}navigateNext(){let e=new Date(this.currentDate);this.viewMode==="month"?e.setMonth(e.getMonth()+1):e.setDate(e.getDate()+7),this.currentDate=e}renderMonthView(e,t){let a=Gl(this.currentDate),i=e.createDiv({cls:"albus-super-daily-notes-schedule-month-view"});this.contentContainer=i;let n=i.createDiv({cls:"albus-super-daily-notes-month-header"});["\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D","\u5468\u65E5"].forEach(s=>{n.createDiv({cls:"albus-super-daily-notes-month-day-header",text:s})});let o=[];for(let s=0;s{let l=i.createDiv({cls:"albus-super-daily-notes-schedule-month-week"});s.forEach(u=>{let c=gh(u,this.currentDate),f=u.toDateString()===new Date().toDateString(),p=ne(u),h=this.tasks.filter(x=>x.date===p).sort((x,_)=>x.startTime.localeCompare(_.startTime)),d=h.length>0,v=l.createDiv({cls:"albus-super-daily-notes-schedule-month-day"+(c?" is-current-month":" is-other-month")+(f?" is-today":"")+(d?" has-tasks":"")}),g=v.createDiv({cls:"albus-super-daily-notes-schedule-day-header"}).createEl("span",{cls:"albus-super-daily-notes-schedule-day-number"+(f?" is-today-number":""),text:u.getDate().toString()});c&&g.addEventListener("click",x=>{x.stopPropagation(),this.openTaskModal({id:"",date:p,startTime:"09:00",endTime:"09:30",description:"",completed:!1},t)});let y=v.createDiv({cls:"albus-super-daily-notes-schedule-day-tasks"});h.forEach(x=>{let _=this.getTaskDisplayColor(x),b=y.createDiv({cls:"albus-super-daily-notes-schedule-month-task"+(x.completed?" is-completed":"")});b.style.setProperty("--task-color",_),b.setAttribute("data-task-key",`${x.date}-${x.id}`);let S=b.createDiv({cls:"albus-super-daily-notes-schedule-task-dot"});S.style.backgroundColor=_,b.createSpan({cls:"albus-super-daily-notes-schedule-task-time",text:x.startTime}),b.createSpan({cls:"albus-super-daily-notes-schedule-task-desc",text:x.description}),b.addEventListener("click",w=>{w.stopPropagation(),this.openTaskModal(x,t)})}),c&&v.addEventListener("contextmenu",x=>{x.preventDefault(),this.callbacks.openDailyNote(u)})})})}getTaskDisplayColor(e){if(e.completed&&this.plugin.settings.grayOutCompleted)return"#E0E0E0";if(e.tag){let t=this.plugin.settings.customTags.find(a=>a.name===e.tag);if(!t){let a=e.tag.split("/")[0].trim();t=this.plugin.settings.customTags.find(i=>i.name===a)}if(t!=null&&t.color)return t.color}return Dh}renderWeekView(e,t){let a=fi(this.currentDate),i=[];for(let m=0;m<7;m++){let g=new Date(a);g.setDate(a.getDate()+m),i.push(g)}let n=this.plugin.settings.dayStartHour,o=2,s=(24-n)*60,l=s*o+10,u=hM(n);this.dragHandlers=fM((m,g)=>this.handleTaskDragUpdate(m,g,t),m=>this.handleTaskCreate(m,t),o,n,this.plugin.settings.dragSnapMode),this.contentContainer=e;let c=e.createDiv({cls:"albus-super-daily-notes-week-view-container"}),f=c.createDiv({cls:"albus-super-daily-notes-week-header"});f.createDiv({cls:"albus-super-daily-notes-week-time-label"});let p=["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"];i.forEach(m=>{let g=m.toDateString()===new Date().toDateString(),y=f.createDiv({cls:`albus-super-daily-notes-week-day-header ${g?"albus-super-daily-notes-today":""}`}),x=String(m.getMonth()+1).padStart(2,"0"),_=String(m.getDate()).padStart(2,"0");y.createDiv({cls:"albus-super-daily-notes-week-day-date",text:`${x}/${_}`}),y.createDiv({cls:"albus-super-daily-notes-week-day-name",text:p[m.getDay()]}),y.addEventListener("contextmenu",b=>{b.preventDefault(),this.callbacks.openDailyNote(m)})});let h=c.createDiv({cls:"albus-super-daily-notes-week-content-wrapper"}),d=h.createDiv({cls:"albus-super-daily-notes-week-timeline-labels"});d.style.height=`${l}px`,u.forEach(m=>{let g=d.createDiv({cls:`albus-super-daily-notes-week-timeline-label ${m.isFullHour?"albus-super-daily-notes-full-hour":"albus-super-daily-notes-half-hour"}`});if(g.style.top=`${(m.hour-n)*60*o}px`,g.style.height=`${60*o}px`,m.isFullHour){let y=String(m.hour).padStart(2,"0");g.createEl("span",{text:`${y}:00`})}});let v=h.createDiv({cls:"albus-super-daily-notes-week-timeline-content"});v.style.height=`${l}px`,u.forEach(m=>{let g=v.createDiv({cls:`albus-super-daily-notes-week-timeline-gridline ${m.isFullHour?"albus-super-daily-notes-full-hour":"albus-super-daily-notes-half-hour"}`});g.style.top=`${(m.hour-n)*60*o}px`}),i.forEach(m=>{let g=v.createDiv({cls:"albus-super-daily-notes-week-day-column"});g.dataset.date=ne(m);let y=this.tasks.filter(S=>S.date===ne(m)),x=pM(y),_=!1,b=0;g.addEventListener("mousedown",S=>{if(S.button!==0)return;if(S.target.classList.contains("albus-super-daily-notes-week-day-column")){_=!1,b=S.clientY;let D=M=>{Math.abs(M.clientY-b)>10&&(_=!0,document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",C),this.dragHandlers&&this.dragHandlers.onDragStart(S,null,"create",g))},C=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",C)};document.addEventListener("mousemove",D),document.addEventListener("mouseup",C)}}),g.addEventListener("contextmenu",S=>{if(S.target.classList.contains("albus-super-daily-notes-week-day-column")){S.preventDefault(),S.stopPropagation();let D=new hi.Menu;this.clipboardTask?D.addItem(C=>{C.setTitle("\u7C98\u8D34\u65E5\u7A0B"),C.setIcon("clipboard-paste"),C.onClick(async()=>{let M=g.getBoundingClientRect(),L=(S.clientY-M.top)/o+n*60,A=Math.round(L/5)*5,P=xe(this.clipboardTask.endTime)-xe(this.clipboardTask.startTime),R=Math.min(A+P,1440),k={...this.clipboardTask,id:"",date:ne(m),startTime:_r(A),endTime:_r(R)};await this.plugin.taskService.createTask(k),t()})}):D.addItem(C=>{C.setTitle("\u6CA1\u6709\u590D\u5236\u7684\u65E5\u7A0B"),C.setDisabled(!0)}),D.showAtMouseEvent(S)}}),x.forEach(S=>{this.renderWeekTask(g,S,n,o,s,t)})}),this.renderTimeIndicator(v,n,o,s)}renderWeekTask(e,t,a,i,n,o){let s=xe(t.startTime),l=xe(t.endTime),u=s-a*60,c=l-a*60,f=c-u;if(c<0||u>n)return;let p=100/(t.totalColumns||1),h=(t.columnIndex||0)*p,d=this.getTaskDisplayColor(t),v=e.createDiv({cls:`albus-super-daily-notes-timeline-task albus-super-daily-notes-week-timeline-task albus-super-daily-notes-task-block ${t.completed?"albus-super-daily-notes-completed":""} ${this.plugin.settings.cardStyle==="minimal"?"albus-super-daily-notes-minimal-style":""}`});v.setAttribute("data-task-key",`${t.date}-${t.id}`),v.style.top=`${u*i}px`,v.style.height=`${f*i}px`,v.style.backgroundColor=d,v.style.width=`${p}%`,v.style.left=`${h}%`,v.style.setProperty("--task-bg-color",d);let m=v.createDiv({cls:"albus-super-daily-notes-task-resize-handle albus-super-daily-notes-task-resize-top"}),g=v.createDiv({cls:"albus-super-daily-notes-task-resize-handle albus-super-daily-notes-task-resize-bottom"}),x=v.createDiv({cls:"albus-super-daily-notes-task-checkbox"}).createEl("input",{type:"checkbox"});x.checked=t.completed,x.addEventListener("change",async D=>{D.stopPropagation(),this.saveScrollPosition(),t.completed=!t.completed,this.updateTaskElementAppearance(v,t),await this.plugin.taskService.toggleTaskStatus(t),this.restoreScrollPosition()}),t.tag&&v.createDiv({cls:"albus-super-daily-notes-task-tags-container"}).createDiv({cls:"albus-super-daily-notes-task-tag",text:this.getTagDisplayName(t.tag)});let _=v.createDiv({cls:"albus-super-daily-notes-task-content"});_.createDiv({cls:"albus-super-daily-notes-task-description",text:t.description}),_.createDiv({cls:"albus-super-daily-notes-task-time",text:`${t.startTime} - ${t.endTime}`}),m.addEventListener("mousedown",D=>{D.preventDefault(),D.stopPropagation(),this.dragHandlers&&D.currentTarget&&this.dragHandlers.onDragStart(D,t,"resize-top")}),g.addEventListener("mousedown",D=>{D.preventDefault(),D.stopPropagation(),this.dragHandlers&&D.currentTarget&&this.dragHandlers.onDragStart(D,t,"resize-bottom")}),v.addEventListener("contextmenu",D=>{D.preventDefault(),D.stopPropagation();let C=new hi.Menu;C.addItem(M=>{M.setTitle("\u590D\u5236\u65E5\u7A0B"),M.setIcon("copy"),M.onClick(()=>{this.clipboardTask={...t},new hi.Notice("\u65E5\u7A0B\u5DF2\u590D\u5236")})}),C.showAtMouseEvent(D)}),v.style.cursor="grab";let b=!1,S=0,w=0;v.addEventListener("mousedown",D=>{if(D.button!==0)return;let C=D.target;if(C.tagName==="INPUT"||C.classList.contains("albus-super-daily-notes-task-resize-handle"))return;b=!1,S=D.clientX,w=D.clientY,v.style.cursor="grabbing";let M=L=>{let A=Math.abs(L.clientX-S),P=Math.abs(L.clientY-w);(A>5||P>5)&&(b=!0,document.removeEventListener("mousemove",M),this.dragHandlers&&this.dragHandlers.onDragStart(D,t,"move",v))},E=L=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",E),v.style.cursor="grab",!b&&L.target instanceof HTMLElement&&L.target.tagName!=="INPUT"&&this.openTaskModal(t,o)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",E)})}renderTimeIndicator(e,t,a,i){let n=new Date,o=n.getHours(),s=n.getMinutes(),u=o*60+s-t*60;if(u>=0&&u<=i){let c=u*a,f=e.createDiv({cls:"albus-super-daily-notes-timeline-current-time"});f.style.top=`${c}px`,f.setAttribute("data-day-start",t.toString()),f.setAttribute("data-pixel-per-minute",a.toString()),f.setAttribute("data-total-minutes",i.toString()),f.createDiv({cls:"albus-super-daily-notes-timeline-current-time-line"});let p=f.createDiv({cls:"albus-super-daily-notes-timeline-current-time-label"});p.textContent=`${String(o).padStart(2,"0")}:${s.toString().padStart(2,"0")}`,this.currentTimeIndicator=f}}updateTimeIndicator(){if(!this.currentTimeIndicator)return;let e=parseInt(this.currentTimeIndicator.getAttribute("data-day-start")||"8"),t=parseInt(this.currentTimeIndicator.getAttribute("data-pixel-per-minute")||"2"),a=parseInt(this.currentTimeIndicator.getAttribute("data-total-minutes")||"960"),i=new Date,n=i.getHours(),o=i.getMinutes(),l=n*60+o-e*60;if(l>=0&&l<=a){let u=l*t;this.currentTimeIndicator.style.top=`${u}px`;let c=this.currentTimeIndicator.querySelector(".albus-super-daily-notes-timeline-current-time-label");c&&(c.textContent=`${String(n).padStart(2,"0")}:${o.toString().padStart(2,"0")}`)}}async handleTaskDragUpdate(e,t,a){try{if(t.startTime===e.startTime&&t.endTime===e.endTime&&t.date===e.date)return;t.date!==e.date?(await this.plugin.taskService.deleteTask(t),await this.plugin.taskService.createTask(e,!0),new hi.Notice("\u65E5\u7A0B\u5DF2\u79FB\u52A8\u5230\u65B0\u65E5\u671F")):(await this.plugin.taskService.updateTask(e,t,!0),new hi.Notice("\u65E5\u7A0B\u65F6\u95F4\u5DF2\u66F4\u65B0")),a()}catch(i){console.error("Failed to update task:",i),a()}}async handleTaskCreate(e,t){this.openTaskModal({id:"",date:e.date||ne(this.currentDate),startTime:e.startTime||"09:00",endTime:e.endTime||"10:00",description:e.description||"",completed:!1},t)}getTagDisplayName(e){return this.plugin.settings.showOnlyLeafTag&&e.split("/").pop()||e}openTaskModal(e=null,t){new Th(this.app,{task:e&&e.id?e:null,initialData:e&&e.id?null:e,customTags:this.plugin.settings.customTags,onSubmit:async i=>{e&&e.id?await this.plugin.taskService.updateTask(i,e):await this.plugin.taskService.createTask(i),t()},onDelete:e&&e.id?async()=>{await this.plugin.taskService.deleteTask(e),t()}:void 0,showOnlyLeafTag:this.plugin.settings.showOnlyLeafTag}).open()}scrollToCurrentTime(){if(!this.contentContainer||this.viewMode!=="week")return;let e=new Date,t=e.getHours(),a=e.getMinutes(),s=(t*60+a-this.plugin.settings.dayStartHour*60)*2,l=this.contentContainer.clientHeight,u=s-l/2,c=this.contentContainer.scrollHeight-l,f=Math.max(0,Math.min(u,c));this.contentContainer.scrollTo({top:f,behavior:"smooth"})}updateTaskElementAppearance(e,t){t.completed?e.classList.add("albus-super-daily-notes-completed"):e.classList.remove("albus-super-daily-notes-completed");let a=this.getTaskDisplayColor(t);e.style.backgroundColor=a,e.style.setProperty("--task-bg-color",a);let i=e.querySelector('input[type="checkbox"]');i&&(i.checked=t.completed)}saveScrollPosition(){this.contentContainer&&(this.scrollPosition=this.contentContainer.scrollTop)}restoreScrollPosition(){this.contentContainer&&this.scrollPosition!==void 0&&requestAnimationFrame(()=>{this.contentContainer&&(this.contentContainer.scrollTop=this.scrollPosition)})}cleanup(){this.timeIndicatorInterval!==null&&(window.clearInterval(this.timeIndicatorInterval),this.timeIndicatorInterval=null)}};var Wi=require("obsidian");var _0=function(r,e){return _0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])},_0(r,e)};function I(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");_0(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var t3=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),e3=(function(){function r(){this.browser=new t3,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window!="undefined"}return r})(),io=new e3;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(io.wxa=!0,io.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?io.worker=!0:!io.hasGlobalWindow||"Deno"in window||typeof navigator!="undefined"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(io.node=!0,io.svgSupported=!0):r3(navigator.userAgent,io);function r3(r,e){var t=e.browser,a=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),n=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(t.firefox=!0,t.version=a[1]),i&&(t.ie=!0,t.version=i[1]),n&&(t.edge=!0,t.version=n[1],t.newEdge=+n[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect!="undefined",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document!="undefined";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}var Lt=io;var Mh=12,b0="sans-serif",qr=Mh+"px "+b0,a3=20,i3=100,n3="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function o3(r){var e={};if(typeof JSON=="undefined")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",i[u]+":0",a[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return e.clearMarkers=function(){T(t,function(c){c.parentNode&&c.parentNode.removeChild(c)})},t}function S3(r,e,t){for(var a=t?"invTrans":"trans",i=e[a],n=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,p=c.left,h=c.top;o.push(p,h),l=l&&n&&p===n[f]&&h===n[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[a]=t?M0(s,o):M0(o,s))}function A0(r){return r.nodeName.toUpperCase()==="CANVAS"}var w3=/([&<>"'])/g,T3={"&":"&","<":"<",">":">",'"':""","'":"'"};function We(r){return r==null?"":(r+"").replace(w3,function(e,t){return T3[t]})}var D3=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,L0=[],C3=Lt.browser.firefox&&+Lt.browser.version.split(".")[0]<39;function zh(r,e,t,a){return t=t||{},a?CM(r,e,t):C3&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):CM(r,e,t),t}function CM(r,e,t){if(Lt.domSupported&&r.getBoundingClientRect){var a=e.clientX,i=e.clientY;if(A0(r)){var n=r.getBoundingClientRect();t.zrX=a-n.left,t.zrY=i-n.top;return}else if(Oh(L0,r,a,i)){t.zrX=L0[0],t.zrY=L0[1];return}}t.zrX=t.zrY=0}function Vh(r){return r||window.event}function $r(r,e,t){if(e=Vh(e),e.zrX!=null)return e;var a=e.type,i=a&&a.indexOf("touch")>=0;if(i){var o=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&zh(r,o,e,t)}else{zh(r,e,e,t);var n=M3(e);e.zrDelta=n?n/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&D3.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function M3(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,a=r.deltaY;if(t==null||a==null)return e;var i=Math.abs(a!==0?a:t),n=a>0?-1:a<0?1:t>0?-1:1;return 3*i*n}function Xc(r,e,t,a){r.addEventListener(e,t,a)}function MM(r,e,t,a){r.removeEventListener(e,t,a)}var Kr=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function I0(r){return r.which===2||r.which===3}var AM=(function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,a){return this._doTrack(e,t,a),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,a){var i=e.touches;if(i){for(var n={points:[],touches:[],target:t,event:e},o=0,s=i.length;o1&&a&&a.length>1){var n=EM(a)/EM(i);!isFinite(n)&&(n=1),e.pinchScale=n;var o=E3(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function fe(){return[1,0,0,1,0,0]}function uo(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function ds(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function fr(r,e,t){var a=e[0]*t[0]+e[2]*t[1],i=e[1]*t[0]+e[3]*t[1],n=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=a,r[1]=i,r[2]=n,r[3]=o,r[4]=s,r[5]=l,r}function pr(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function Sr(r,e,t,a){a===void 0&&(a=[0,0]);var i=e[0],n=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),f=Math.cos(t);return r[0]=i*f+s*c,r[1]=-i*c+s*f,r[2]=n*f+l*c,r[3]=-n*c+f*l,r[4]=f*(o-a[0])+c*(u-a[1])+a[0],r[5]=f*(u-a[1])-c*(o-a[0])+a[1],r}function Kl(r,e,t){var a=t[0],i=t[1];return r[0]=e[0]*a,r[1]=e[1]*i,r[2]=e[2]*a,r[3]=e[3]*i,r[4]=e[4]*a,r[5]=e[5]*i,r}function Fe(r,e){var t=e[0],a=e[2],i=e[4],n=e[1],o=e[3],s=e[5],l=t*o-n*a;return l?(l=1/l,r[0]=o*l,r[1]=-n*l,r[2]=-a*l,r[3]=t*l,r[4]=(a*s-o*i)*l,r[5]=(n*i-t*s)*l,r):null}function LM(r){var e=fe();return ds(e,r),e}var A3=(function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,a=this.y-e.y;return Math.sqrt(t*t+a*a)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,a=this.y-e.y;return t*t+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,a=this.y;return this.x=e[0]*t+e[2]*a+e[4],this.y=e[1]*t+e[3]*a+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,a){e.x=t,e.y=a},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,a){e.x=t.x+a.x,e.y=t.y+a.y},r.sub=function(e,t,a){e.x=t.x-a.x,e.y=t.y-a.y},r.scale=function(e,t,a){e.x=t.x*a,e.y=t.y*a},r.scaleAndAdd=function(e,t,a,i){e.x=t.x+a.x*i,e.y=t.y+a.y*i},r.lerp=function(e,t,a,i){var n=1-i;e.x=n*t.x+i*a.x,e.y=n*t.y+i*a.y},r})(),pt=A3;var xs=Math.min,Jl=Math.max,k0=Math.abs,IM=["x","y"],L3=["width","height"],vs=new pt,ms=new pt,gs=new pt,ys=new pt,xa=O0(),qc=xa.minTv,R0=xa.maxTv,jc=[0,0],N0=(function(){function r(e,t,a,i){r.set(this,e,t,a,i)}return r.set=function(e,t,a,i,n){return i<0&&(t=t+i,i=-i),n<0&&(a=a+n,n=-n),e.x=t,e.y=a,e.width=i,e.height=n,e},r.prototype.union=function(e){var t=xs(e.x,this.x),a=xs(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Jl(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Jl(e.y+e.height,this.y+this.height)-a:this.height=e.height,this.x=t,this.y=a},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,a=e.width/t.width,i=e.height/t.height,n=fe();return pr(n,n,[-t.x,-t.y]),Kl(n,n,[a,i]),pr(n,n,[e.x,e.y]),n},r.prototype.intersect=function(e,t,a){return r.intersect(this,e,t,a)},r.intersect=function(e,t,a,i){a&&pt.set(a,0,0);var n=i&&i.outIntersectRect||null,o=i&&i.clamp;if(n&&(n.x=n.y=n.width=n.height=NaN),!e||!t)return!1;e instanceof r||(e=r.set(I3,e.x,e.y,e.width,e.height)),t instanceof r||(t=r.set(P3,t.x,t.y,t.width,t.height));var s=!!a;xa.reset(i,s);var l=xa.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,p=e.y+e.height-l,h=t.x+l,d=t.x+t.width-l,v=t.y+l,m=t.y+t.height-l;if(u>c||f>p||h>d||v>m)return!1;var g=!(c=e.x&&t<=e.x+e.width&&a>=e.y&&a<=e.y+e.height},r.prototype.contain=function(e,t){return r.contain(this,e,t)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},r.applyTransform=function(e,t,a){if(!a){e!==t&&r.copy(e,t);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var i=a[0],n=a[3],o=a[4],s=a[5];e.x=t.x*i+o,e.y=t.y*n+s,e.width=t.width*i,e.height=t.height*n,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}vs.x=gs.x=t.x,vs.y=ys.y=t.y,ms.x=ys.x=t.x+t.width,ms.y=gs.y=t.y+t.height,vs.transform(a),ys.transform(a),ms.transform(a),gs.transform(a),e.x=xs(vs.x,ms.x,gs.x,ys.x),e.y=xs(vs.y,ms.y,gs.y,ys.y);var l=Jl(vs.x,ms.x,gs.x,ys.x),u=Jl(vs.y,ms.y,gs.y,ys.y);e.width=l-e.x,e.height=u-e.y},r})(),I3=new N0(0,0,0,0),P3=new N0(0,0,0,0);function PM(r,e,t,a,i,n,o,s){var l=k0(e-t),u=k0(a-r),c=xs(l,u),f=IM[i],p=IM[1-i],h=L3[i];e=u||!xa.bidirectional)&&(qc[f]=-u,qc[p]=0,xa.useDir&&xa.calcDirMTV())))}function O0(){var r=0,e=new pt,t=new pt,a={minTv:new pt,maxTv:new pt,useDir:!1,dirMinTv:new pt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(n,o){a.touchThreshold=0,n&&n.touchThreshold!=null&&(a.touchThreshold=Jl(0,n.touchThreshold)),a.negativeSize=!1,o&&(a.minTv.set(1/0,1/0),a.maxTv.set(0,0),a.useDir=!1,n&&n.direction!=null&&(a.useDir=!0,a.dirMinTv.copy(a.minTv),t.copy(a.minTv),r=n.direction,a.bidirectional=n.bidirectional==null||!!n.bidirectional,a.bidirectional||e.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var n=a.minTv,o=a.dirMinTv,s=n.y*n.y+n.x*n.x,l=Math.sin(r),u=Math.cos(r),c=l*n.y+u*n.x;if(i(c)){i(n.x)&&i(n.y)&&o.set(0,0);return}if(t.x=s*u/c,t.y=s*l/c,i(t.x)&&i(t.y)){o.set(0,0);return}(a.bidirectional||e.dot(t)>0)&&t.len()=0;f--){var p=n[f];p!==i&&!p.ignore&&!p.ignoreCoarsePointer&&(!p.parent||!p.parent.ignoreCoarsePointer)&&(z0.copy(p.getBoundingRect()),p.transform&&z0.applyTransform(p.transform),z0.intersect(c)&&s.push(p))}if(s.length)for(var h=4,d=Math.PI/12,v=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(n,r,e)}});function z3(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var a=r,i=void 0,n=!1;a;){if(a.ignoreClip&&(n=!0),!n){var o=a.getClipPath();if(o&&!o.contain(e,t))return!1}a.silent&&(i=!0);var s=a.__hostTarget;a=s?a.ignoreHostSilent?null:s:a.parent}return i?RM:!0}return!1}function kM(r,e,t,a,i){for(var n=r.length-1;n>=0;n--){var o=r[n],s=void 0;if(o!==i&&!o.ignore&&(s=z3(o,t,a))&&(!e.topTarget&&(e.topTarget=o),s!==RM)){e.target=o;break}}}function OM(r,e,t){var a=r.painter;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}var zM=NM;var UM=32,Kc=7;function V3(r){for(var e=0;r>=UM;)e|=r&1,r>>=1;return r+e}function VM(r,e,t,a){var i=e+1;if(i===t)return 1;if(a(r[i++],r[e])<0){for(;i=0;)i++;return i-e}function B3(r,e,t){for(t--;e>>1,i(n,r[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=n}}function V0(r,e,t,a,i,n){var o=0,s=0,l=1;if(n(r,e[t+i])>0){for(s=a-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);n(r,e[t+c])>0?o=c+1:l=c}return l}function B0(r,e,t,a,i,n){var o=0,s=0,l=1;if(n(r,e[t+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=a-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);n(r,e[t+c])<0?l=c:o=c+1}return l}function U3(r,e){var t=Kc,a,i,n=0,o=[];a=[],i=[];function s(h,d){a[n]=h,i[n]=d,n+=1}function l(){for(;n>1;){var h=n-2;if(h>=1&&i[h-1]<=i[h]+i[h+1]||h>=2&&i[h-2]<=i[h]+i[h-1])i[h-1]i[h+1])break;c(h)}}function u(){for(;n>1;){var h=n-2;h>0&&i[h-1]=Kc||w>=Kc);if(D)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),d===1){for(g=0;g=0;g--)r[S+g]=r[b+g];r[_]=o[x];return}for(var w=t;;){var D=0,C=0,M=!1;do if(e(o[x],r[y])<0){if(r[_--]=r[y--],D++,C=0,--d===0){M=!0;break}}else if(r[_--]=o[x--],C++,D=0,--m===1){M=!0;break}while((D|C)=0;g--)r[S+g]=r[b+g];if(d===0){M=!0;break}}if(r[_--]=o[x--],--m===1){M=!0;break}if(C=m-V0(r[y],o,0,m,m-1,e),C!==0){for(_-=C,x-=C,m-=C,S=_+1,b=x+1,g=0;g=Kc||C>=Kc);if(M)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),m===1){for(_-=d,y-=d,S=_+1,b=y+1,g=d-1;g>=0;g--)r[S+g]=r[b+g];r[_]=o[x]}else{if(m===0)throw new Error;for(b=_-(m-1),g=0;gs&&(l=s),BM(r,t,t+l,t+n,e),n=l}o.pushRun(t,n),o.mergeRuns(),i-=n,t+=n}while(i!==0);o.forceMergeRuns()}}var Ye=1,bs=2,co=4;var FM=!1;function U0(){FM||(FM=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function HM(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var F3=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=HM}return r.prototype.traverse=function(e,t){for(var a=0;a=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),GM=F3;var WM;WM=Lt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Jc=WM;var Bh={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)))},elasticOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-Bh.bounceOut(1-r)},bounceOut:function(r){return r<.36363636363636365?7.5625*r*r:r<.7272727272727273?7.5625*(r-=.5454545454545454)*r+.75:r<.9090909090909091?7.5625*(r-=.8181818181818182)*r+.9375:7.5625*(r-=.9545454545454546)*r+.984375},bounceInOut:function(r){return r<.5?Bh.bounceIn(r*2)*.5:Bh.bounceOut(r*2-1)*.5+.5}},Uh=Bh;var Fh=Math.pow,po=Math.sqrt,Gh=1e-8,ZM=1e-4,YM=po(3),Hh=1/3,Zi=Yi(),za=Yi(),Ql=Yi();function fo(r){return r>-Gh&&rGh||r<-Gh}function Ee(r,e,t,a,i){var n=1-i;return n*n*(n*r+3*i*e)+i*i*(i*a+3*n*t)}function F0(r,e,t,a,i){var n=1-i;return 3*(((e-r)*n+2*(t-e)*i)*n+(a-t)*i*i)}function Ss(r,e,t,a,i,n){var o=a+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-i,c=s*s-3*o*l,f=s*l-9*o*u,p=l*l-3*s*u,h=0;if(fo(c)&&fo(f))if(fo(s))n[0]=0;else{var d=-l/s;d>=0&&d<=1&&(n[h++]=d)}else{var v=f*f-4*c*p;if(fo(v)){var m=f/c,d=-s/o+m,g=-m/2;d>=0&&d<=1&&(n[h++]=d),g>=0&&g<=1&&(n[h++]=g)}else if(v>0){var y=po(v),x=c*s+1.5*o*(-f+y),_=c*s+1.5*o*(-f-y);x<0?x=-Fh(-x,Hh):x=Fh(x,Hh),_<0?_=-Fh(-_,Hh):_=Fh(_,Hh);var d=(-s-(x+_))/(3*o);d>=0&&d<=1&&(n[h++]=d)}else{var b=(2*c*s-3*o*f)/(2*po(c*c*c)),S=Math.acos(b)/3,w=po(c),D=Math.cos(S),d=(-s-2*w*D)/(3*o),g=(-s+w*(D+YM*Math.sin(S)))/(3*o),C=(-s+w*(D-YM*Math.sin(S)))/(3*o);d>=0&&d<=1&&(n[h++]=d),g>=0&&g<=1&&(n[h++]=g),C>=0&&C<=1&&(n[h++]=C)}}return h}function Wh(r,e,t,a,i){var n=6*t-12*e+6*r,o=9*e+3*a-3*r-9*t,s=3*e-3*r,l=0;if(fo(o)){if(XM(n)){var u=-s/n;u>=0&&u<=1&&(i[l++]=u)}}else{var c=n*n-4*o*s;if(fo(c))i[0]=-n/(2*o);else if(c>0){var f=po(c),u=(-n+f)/(2*o),p=(-n-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),p>=0&&p<=1&&(i[l++]=p)}}return l}function Va(r,e,t,a,i,n){var o=(e-r)*i+r,s=(t-e)*i+e,l=(a-t)*i+t,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;n[0]=r,n[1]=o,n[2]=u,n[3]=f,n[4]=f,n[5]=c,n[6]=l,n[7]=a}function Yh(r,e,t,a,i,n,o,s,l,u,c){var f,p=.005,h=1/0,d,v,m,g;Zi[0]=l,Zi[1]=u;for(var y=0;y<1;y+=.05)za[0]=Ee(r,t,i,o,y),za[1]=Ee(e,a,n,s,y),m=Cn(Zi,za),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*n*s;if(fo(c)){var u=-o/(2*n);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=po(c),u=(-o+f)/(2*n),p=(-o-f)/(2*n);u>=0&&u<=1&&(i[l++]=u),p>=0&&p<=1&&(i[l++]=p)}}return l}function Zh(r,e,t){var a=r+t-2*e;return a===0?.5:(r-e)/a}function ho(r,e,t,a,i){var n=(e-r)*a+r,o=(t-e)*a+e,s=(o-n)*a+n;i[0]=r,i[1]=n,i[2]=s,i[3]=s,i[4]=o,i[5]=t}function Xh(r,e,t,a,i,n,o,s,l){var u,c=.005,f=1/0;Zi[0]=o,Zi[1]=s;for(var p=0;p<1;p+=.05){za[0]=Pe(r,t,i,p),za[1]=Pe(e,a,n,p);var h=Cn(Zi,za);h=0&&h=1?1:Ss(0,a,n,1,l,s)&&Ee(0,i,o,1,s[0])}}}var G3=(function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||ie,this.ondestroy=e.ondestroy||ie,this.onrestart=e.onrestart||ie,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var a=this._life,i=e-this._startTime-this._pausedTime,n=i/a;n<0&&(n=0),n=Math.min(n,1);var o=this.easingFunc,s=o?o(n):n;if(this.onframe(s),n===1)if(this.loop){var l=i%a;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=$(e)?e:Uh[e]||tu(e)},r})(),KM=G3;var JM=(function(){function r(e){this.value=e}return r})();var W3=(function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new JM(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,a=e.next;t?t.next=a:this.head=a,a?a.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})();var Y3=(function(){function r(e){this._list=new W3,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var a=this._list,i=this._map,n=null;if(i[e]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete i[l.key],n=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new JM(t),s.key=e,a.insertEntry(s),i[e]=s}return n},r.prototype.get=function(e){var t=this._map[e],a=this._list;if(t!=null)return t!==a.tail&&(a.remove(t),a.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),Xi=Y3;var QM={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function mi(r){return r=Math.round(r),r<0?0:r>255?255:r}function Z3(r){return r=Math.round(r),r<0?0:r>360?360:r}function ef(r){return r<0?0:r>1?1:r}function H0(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?mi(parseFloat(e)/100*255):mi(parseInt(e,10))}function Mn(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?ef(parseFloat(e)/100):ef(parseFloat(e))}function G0(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function vo(r,e,t){return r+(e-r)*t}function Ba(r,e,t,a,i){return r[0]=e,r[1]=t,r[2]=a,r[3]=i,r}function W0(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var eE=new Xi(20),qh=null;function eu(r,e){qh&&W0(qh,e),qh=eE.put(r,qh||e.slice())}function Ze(r,e){if(r){e=e||[];var t=eE.get(r);if(t)return W0(e,t);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in QM)return W0(e,QM[a]),eu(r,e),e;var i=a.length;if(a.charAt(0)==="#"){if(i===4||i===5){var n=parseInt(a.slice(1,4),16);if(!(n>=0&&n<=4095)){Ba(e,0,0,0,1);return}return Ba(e,(n&3840)>>4|(n&3840)>>8,n&240|(n&240)>>4,n&15|(n&15)<<4,i===5?parseInt(a.slice(4),16)/15:1),eu(r,e),e}else if(i===7||i===9){var n=parseInt(a.slice(1,7),16);if(!(n>=0&&n<=16777215)){Ba(e,0,0,0,1);return}return Ba(e,(n&16711680)>>16,(n&65280)>>8,n&255,i===9?parseInt(a.slice(7),16)/255:1),eu(r,e),e}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===i){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Ba(e,+u[0],+u[1],+u[2],1):Ba(e,0,0,0,1);c=Mn(u.pop());case"rgb":if(u.length>=3)return Ba(e,H0(u[0]),H0(u[1]),H0(u[2]),u.length===3?c:Mn(u[3])),eu(r,e),e;Ba(e,0,0,0,1);return;case"hsla":if(u.length!==4){Ba(e,0,0,0,1);return}return u[3]=Mn(u[3]),Y0(u,e),eu(r,e),e;case"hsl":if(u.length!==3){Ba(e,0,0,0,1);return}return Y0(u,e),eu(r,e),e;default:return}}Ba(e,0,0,0,1)}}function Y0(r,e){var t=(parseFloat(r[0])%360+360)%360/360,a=Mn(r[1]),i=Mn(r[2]),n=i<=.5?i*(a+1):i+a-i*a,o=i*2-n;return e=e||[],Ba(e,mi(G0(o,n,t+1/3)*255),mi(G0(o,n,t)*255),mi(G0(o,n,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function X3(r){if(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,i=Math.min(e,t,a),n=Math.max(e,t,a),o=n-i,s=(n+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(n+i):u=o/(2-n-i);var c=((n-e)/6+o/2)/o,f=((n-t)/6+o/2)/o,p=((n-a)/6+o/2)/o;e===n?l=p-f:t===n?l=1/3+c-p:a===n&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return r[3]!=null&&h.push(r[3]),h}}function jh(r,e){var t=Ze(r);if(t){for(var a=0;a<3;a++)e<0?t[a]=t[a]*(1-e)|0:t[a]=(255-t[a])*e+t[a]|0,t[a]>255?t[a]=255:t[a]<0&&(t[a]=0);return Jr(t,t.length===4?"rgba":"rgb")}}function $h(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var a=r*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=e[i],s=e[n],l=a-i;return t[0]=mi(vo(o[0],s[0],l)),t[1]=mi(vo(o[1],s[1],l)),t[2]=mi(vo(o[2],s[2],l)),t[3]=ef(vo(o[3],s[3],l)),t}}function rE(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var a=r*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=Ze(e[i]),s=Ze(e[n]),l=a-i,u=Jr([mi(vo(o[0],s[0],l)),mi(vo(o[1],s[1],l)),mi(vo(o[2],s[2],l)),ef(vo(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:i,rightIndex:n,value:a}:u}}function Ua(r,e,t,a){var i=Ze(r);if(r)return i=X3(i),e!=null&&(i[0]=Z3($(e)?e(i[0]):e)),t!=null&&(i[1]=Mn($(t)?t(i[1]):t)),a!=null&&(i[2]=Mn($(a)?a(i[2]):a)),Jr(Y0(i),"rgba")}function ws(r,e){var t=Ze(r);if(t&&e!=null)return t[3]=ef(e),Jr(t,"rgba")}function Jr(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function ru(r,e){var t=Ze(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var tE=new Xi(100);function rf(r){if(W(r)){var e=tE.get(r);return e||(e=jh(r,-.1),tE.put(r,e)),e}else if(oo(r)){var t=O({},r);return t.colorStops=V(r.colorStops,function(a){return{offset:a.offset,color:jh(a.color,-.1)}}),t}return r}var Qh=Math.round;function mo(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=Ze(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e==null?1:e}}var aE=1e-4;function qi(r){return r-aE}function Jh(r){return Qh(r*1e3)/1e3}function td(r){return Qh(r*1e4)/1e4}function iE(r){return"matrix("+Jh(r[0])+","+Jh(r[1])+","+Jh(r[2])+","+Jh(r[3])+","+td(r[4])+","+td(r[5])+")"}var nE={left:"start",right:"end",center:"middle",middle:"middle"};function oE(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function sE(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function lE(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function Z0(r){return r&&!!r.image}function q3(r){return r&&!!r.svgElement}function af(r){return Z0(r)||q3(r)}function ed(r){return r.type==="linear"}function rd(r){return r.type==="radial"}function ad(r){return r&&(r.type==="linear"||r.type==="radial")}function nf(r){return"url(#"+r+")"}function id(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function nd(r){var e=r.x||0,t=r.y||0,a=(r.rotation||0)*Zl,i=Q(r.scaleX,1),n=Q(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),a&&l.push("rotate("+a+")"),(i!==1||n!==1)&&l.push("scale("+i+","+n+")"),(o||s)&&l.push("skew("+Qh(o*Zl)+"deg, "+Qh(s*Zl)+"deg)"),l.join(" ")}var uE=(function(){return Lt.hasGlobalWindow&&$(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer!="undefined"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})();var q0=Array.prototype.slice;function En(r,e,t){return(e-r)*t+r}function X0(r,e,t,a){for(var i=e.length,n=0;na?e:r,n=Math.min(t,a),o=i[n-1]||{color:[0,0,0,0],offset:0},s=n;so;if(s)a.length=o;else for(var l=n;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,a){this._needsSort=!0;var i=this.keyframes,n=i.length,o=!1,s=fE,l=t;if(Ce(t)){var u=J3(t);s=u,(u===1&&!yt(t[0])||u===2&&!yt(t[0][0]))&&(o=!0)}else if(yt(t)&&!Me(t))s=sd;else if(W(t))if(!isNaN(+t))s=sd;else{var c=Ze(t);c&&(l=c,s=sf)}else if(oo(t)){var f=O({},l);f.colorStops=V(t.colorStops,function(h){return{offset:h.offset,color:Ze(h.color)}}),ed(t)?s=j0:rd(t)&&(s=$0),l=f}n===0?this.valType=s:(s!==this.valType||s===fE)&&(o=!0),this.discrete=this.discrete||o;var p={time:e,value:l,rawValue:t,percent:0};return a&&(p.easing=a,p.easingFunc=$(a)?a:Uh[a]||tu(a)),i.push(p),p},r.prototype.prepare=function(e,t){var a=this.keyframes;this._needsSort&&a.sort(function(v,m){return v.time-m.time});for(var i=this.valType,n=a.length,o=a[n-1],s=this.discrete,l=ld(i),u=pE(i),c=0;c=0&&!(o[c].percent<=t);c--);c=p(c,s-2)}else{for(c=f;ct);c++);c=p(c-1,s-2)}d=o[c+1],h=o[c]}if(h&&d){this._lastFr=c,this._lastFrP=t;var m=d.percent-h.percent,g=m===0?1:p((t-h.percent)/m,1);d.easingFunc&&(g=d.easingFunc(g));var y=a?this._additiveValue:u?of:e[l];if((ld(n)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=g<1?h.rawValue:d.rawValue;else if(ld(n))n===cd?X0(y,h[i],d[i],g):j3(y,h[i],d[i],g);else if(pE(n)){var x=h[i],_=d[i],b=n===j0;e[l]={type:b?"linear":"radial",x:En(x.x,_.x,g),y:En(x.y,_.y,g),colorStops:V(x.colorStops,function(w,D){var C=_.colorStops[D];return{offset:En(w.offset,C.offset,g),color:ud(X0([],w.color,C.color,g))}}),global:_.global},b?(e[l].x2=En(x.x2,_.x2,g),e[l].y2=En(x.y2,_.y2,g)):e[l].r=En(x.r,_.r,g)}else if(u)X0(y,h[i],d[i],g),a||(e[l]=ud(y));else{var S=En(h[i],d[i],g);a?this._additiveValue=S:e[l]=S}a&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,a=this.propName,i=this._additiveValue;t===sd?e[a]=e[a]+i:t===sf?(Ze(e[a],of),od(of,of,i,1),e[a]=ud(of)):t===cd?od(e[a],e[a],i,1):t===hE&&cE(e[a],e[a],i,1)},r})(),tW=(function(){function r(e,t,a,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){ps("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,a){return this.whenWithKeys(e,t,gt(t),a)},r.prototype.whenWithKeys=function(e,t,a,i){for(var n=this._tracks,o=0;o0&&l.addKeyframe(0,Ts(u),i),this._trackKeys.push(s)}l.addKeyframe(e,Ts(t[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,a=0;a0)){this._started=1;for(var t=this,a=[],i=this._maxTime||0,n=0;n1){var s=o.pop();n.addKeyframe(s.time,e[i]),n.prepare(this._maxTime,n.getAdditiveTrack())}}}},r})(),lf=tW;function Ds(){return new Date().getTime()}var eW=(function(r){kt(e,r);function e(t){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,t=t||{},a.stage=t.stage||{},a}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var a=t.getClip();a&&this.addClip(a)},e.prototype.removeClip=function(t){if(t.animation){var a=t.prev,i=t.next;a?a.next=i:this._head=i,i?i.prev=a:this._tail=a,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var a=t.getClip();a&&this.removeClip(a),t.animation=null},e.prototype.update=function(t){for(var a=Ds()-this._pausedTime,i=a-this._time,n=this._head;n;){var o=n.next,s=n.step(a,i);s&&(n.ondestroy(),this.removeClip(n)),n=o}this._time=a,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function a(){t._running&&(Jc(a),!t._paused&&t.update())}Jc(a)},e.prototype.start=function(){this._running||(this._time=Ds(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Ds(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Ds()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var a=t.next;t.prev=t.next=t.animation=null,t=a}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,a){a=a||{},this.start();var i=new lf(t,a.loop);return this.addAnimator(i),i},e})(Ue),dE=eW;var rW=300,K0=Lt.domSupported,J0=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=V(r,function(i){var n=i.replace("mouse","pointer");return t.hasOwnProperty(n)?n:i});return{mouse:r,touch:e,pointer:a}})(),vE={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},mE=!1;function ex(r){var e=r.pointerType;return e==="pen"||e==="touch"}function aW(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Q0(r){r&&(r.zrByTouch=!0)}function iW(r,e){return $r(r.dom,new nW(r,e),!0)}function yE(r,e){for(var t=e,a=!1;t&&t.nodeType!==9&&!(a=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return a}var nW=(function(){function r(e,t){this.stopPropagation=ie,this.stopImmediatePropagation=ie,this.preventDefault=ie,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r})(),gi={mousedown:function(r){r=$r(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=$r(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=$r(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=$r(this.dom,r);var e=r.toElement||r.relatedTarget;yE(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){mE=!0,r=$r(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){mE||(r=$r(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=$r(this.dom,r),Q0(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),gi.mousemove.call(this,r),gi.mousedown.call(this,r)},touchmove:function(r){r=$r(this.dom,r),Q0(r),this.handler.processGesture(r,"change"),gi.mousemove.call(this,r)},touchend:function(r){r=$r(this.dom,r),Q0(r),this.handler.processGesture(r,"end"),gi.mouseup.call(this,r),+new Date-+this.__lastTouchMomentwE||r<-wE}var Es=[],au=[],ax=fe(),ix=Math.abs,uW=(function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Ms(this.rotation)||Ms(this.x)||Ms(this.y)||Ms(this.scaleX-1)||Ms(this.scaleY-1)||Ms(this.skewX)||Ms(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),a=this.transform;if(!(t||e)){a&&(SE(a),this.invTransform=null);return}a=a||fe(),t?this.getLocalTransform(a):SE(a),e&&(t?fr(a,e,a):ds(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Es);var a=Es[0]<0?-1:1,i=Es[1]<0?-1:1,n=((Es[0]-a)*t+a)/Es[0]||0,o=((Es[1]-i)*t+i)/Es[1]||0;e[0]*=n,e[1]*=n,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||fe(),Fe(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),n=Math.PI/2+i-Math.atan2(e[3],e[2]);a=Math.sqrt(a)*Math.cos(n),t=Math.sqrt(t),this.skewX=n,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||fe(),fr(au,e.invTransform,t),t=au);var a=this.originX,i=this.originY;(a||i)&&(ax[4]=a,ax[5]=i,fr(au,t,ax),au[4]-=a,au[5]-=i,t=au),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var a=[e,t],i=this.invTransform;return i&&ce(a,a,i),a},r.prototype.transformCoordToGlobal=function(e,t){var a=[e,t],i=this.transform;return i&&ce(a,a,i),a},r.prototype.getLineScale=function(){var e=this.transform;return e&&ix(e[0]-1)>1e-10&&ix(e[3]-1)>1e-10?Math.sqrt(ix(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){iu(this,e)},r.getLocalTransform=function(e,t){t=t||[];var a=e.originX||0,i=e.originY||0,n=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,p=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(a||i||s||l){var d=a+s,v=i+l;t[4]=-d*n-p*v*o,t[5]=-v*o-h*d*n}else t[4]=t[5]=0;return t[0]=n,t[3]=o,t[1]=h*n,t[2]=p*o,u&&Sr(t,t,u),t[4]+=a+c,t[5]+=i+f,t},r.initDefaultProps=(function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),r})(),_a=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function iu(r,e){for(var t=0;t<_a.length;t++){var a=_a[t];r[a]=e[a]}}var Qr=uW;function yi(r){pd||(pd=new Xi(100)),r=r||qr;var e=pd.get(r);return e||(e={font:r,strWidthCache:new Xi(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Ke.measureText("\u56FD",r).width,asciiCharWidth:Ke.measureText("a",r).width},pd.put(r,e)),e}var pd;function cW(r){if(!(nx>=TE)){r=r||qr;for(var e=[],t=+new Date,a=0;a<=127;a++)e[a]=Ke.measureText(String.fromCharCode(a),r).width;var i=+new Date-t;return i>16?nx=TE:i>2&&nx++,e}}var nx=0,TE=5;function ox(r,e){return r.asciiWidthMapTried||(r.asciiWidthMap=cW(r.font),r.asciiWidthMapTried=!0),0<=e&&e<=127?r.asciiWidthMap!=null?r.asciiWidthMap[e]:r.asciiCharWidth:r.stWideCharWidth}function xi(r,e){var t=r.strWidthCache,a=t.get(e);return a==null&&(a=Ke.measureText(e,r.font).width,t.put(e,a)),a}function DE(r,e,t,a){var i=xi(yi(e),r),n=As(e),o=yo(0,i,t),s=An(0,n,a),l=new at(o,s,i,n);return l}function go(r,e,t,a){var i=((r||"")+"").split(` +`),n=i.length;if(n===1)return DE(i[0],e,t,a);for(var o=new at(0,0,0,0),s=0;s=0?parseFloat(r)/100*e:parseFloat(r):r}function Ls(r,e,t){var a=e.position||"inside",i=e.distance!=null?e.distance:5,n=t.height,o=t.width,s=n/2,l=t.x,u=t.y,c="left",f="top";if(a instanceof Array)l+=hr(a[0],t.width),u+=hr(a[1],t.height),c=null,f=null;else switch(a){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=n+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=n-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=n-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=n-i,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var sx="__zr_normal__",lx=_a.concat(["ignore"]),fW=cr(_a,function(r,e){return r[e]=!0,r},{ignore:!1}),nu={},pW=new at(0,0,0,0),dd=[],fx=(function(){function r(e){this.id=Lh(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,a){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var a=this.textConfig,i=a.local,n=t.innerTransformable,o=void 0,s=void 0,l=!1;n.parent=i?this:null;var u=!1;n.copyTransform(t);var c=a.position!=null,f=a.autoOverflowArea,p=void 0;if((f||c)&&(p=pW,a.layoutRect?p.copy(a.layoutRect):p.copy(this.getBoundingRect()),i||p.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(nu,a,p):Ls(nu,a,p),n.x=nu.x,n.y=nu.y,o=nu.align,s=nu.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var d=void 0,v=void 0;h==="center"?(d=p.width*.5,v=p.height*.5):(d=hr(h[0],p.width),v=hr(h[1],p.height)),u=!0,n.originX=-n.x+d+(i?0:p.x),n.originY=-n.y+v+(i?0:p.y)}}a.rotation!=null&&(n.rotation=a.rotation);var m=a.offset;m&&(n.x+=m[0],n.y+=m[1],u||(n.originX=-m[0],n.originY=-m[1]));var g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var y=g.overflowRect=g.overflowRect||new at(0,0,0,0);n.getLocalTransform(dd),Fe(dd,dd),at.copy(y,p),y.applyTransform(dd)}else g.overflowRect=null;var x=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,_=void 0,b=void 0,S=void 0;x&&this.canBeInsideText()?(_=a.insideFill,b=a.insideStroke,(_==null||_==="auto")&&(_=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(_),S=!0)):(_=a.outsideFill,b=a.outsideStroke,(_==null||_==="auto")&&(_=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(_),S=!0)),_=_||"#000",(_!==g.fill||b!==g.stroke||S!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=_,g.stroke=b,g.autoStroke=S,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=Ye,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ff:cf},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),a=typeof t=="string"&&Ze(t);a||(a=[255,255,255,1]);for(var i=a[3],n=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*i+(n?0:255)*(1-i);return a[3]=1,Jr(a,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},O(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(et(e))for(var a=e,i=gt(a),n=0;n0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(sx,!1,e)},r.prototype.useState=function(e,t,a,i){var n=e===sx,o=this.hasState();if(!(!o&&n)){var s=this.currentStates,l=this.stateTransition;if(!(lt(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!n&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!n){ps("State "+e+" not exists.");return}n||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!a&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,p=this._textGuide;return f&&f.useState(e,t,a,c),p&&p.useState(e,t,a,c),n?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ye),u}}},r.prototype.useStates=function(e,t,a){if(!e.length)this.clearStates();else{var i=[],n=this.currentStates,o=e.length,s=o===n.length;if(s){for(var l=0;l0,d);var v=this._textContent,m=this._textGuide;v&&v.useStates(e,t,p),m&&m.useStates(e,t,p),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!p&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ye)}},r.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var a=this.currentStates.slice();a.splice(t,1),this.useStates(a)}},r.prototype.replaceState=function(e,t,a){var i=this.currentStates.slice(),n=lt(i,e),o=lt(i,t)>=0;n>=0?o?i.splice(n,1):i[n]=t:a&&!o&&i.push(t),this.useStates(i)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},a,i=0;i=0&&n.splice(o,1)}),this.animators.push(e),a&&a.animation.addAnimator(e),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var a=this.animators,i=a.length,n=[],o=0;o0&&t.during&&n[0].during(function(d,v){t.during(v)});for(var p=0;p0||i.force&&!o.length){var D=void 0,C=void 0,M=void 0;if(s){C={},p&&(D={});for(var _=0;_=0&&(i.splice(n,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,a){var i=lt(this._children,t);return i>=0&&this.replaceAt(a,i),this},e.prototype.replaceAt=function(t,a){var i=this._children,n=i[a];if(t&&t!==this&&t.parent!==this&&t!==n){i[a]=t,n.parent=null;var o=this.__zr;o&&n.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var a=this.__zr;a&&a!==t.__zr&&t.addSelfToZr(a),a&&a.refresh()},e.prototype.remove=function(t){var a=this.__zr,i=this._children,n=lt(i,t);return n<0?this:(i.splice(n,1),t.parent=null,a&&t.removeSelfFromZr(a),a&&a.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,a=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,a){return this._disposed||this.handler.on(e,t,a),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(r<=i)return o;if(r>=n)return s}else{if(r>=i)return o;if(r<=n)return s}else{if(r===i)return o;if(r===n)return s}return(r-i)/l*u+o}var j=SW;function SW(r,e,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return ou(r,e,t)}function ou(r,e,t){return W(r)?bW(r).match(/%$/)?parseFloat(r)/100*e+(t||0):parseFloat(r):r==null?NaN:+r}function oe(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),kE),r=(+r).toFixed(e),t?r:+r}function Xe(r){return r.sort(function(e,t){return e-t}),r}function kr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return wW(r)}function wW(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),a=t>0?+e.slice(t+1):0,i=t>0?t:e.length,n=e.indexOf("."),o=n<0?0:i-1-n;return Math.max(0,o-a)}function gd(r,e){var t=Math.log,a=Math.LN10,i=Math.floor(t(r[1]-r[0])/a),n=Math.round(t(_i(e[1]-e[0]))/a),o=Math.min(Math.max(-i+n,0),20);return isFinite(o)?o:20}function RE(r,e){var t=cr(r,function(h,d){return h+(isNaN(d)?0:d)},0);if(t===0)return[];for(var a=Math.pow(10,e),i=V(r,function(h){return(isNaN(h)?0:h)/t*a*100}),n=a*100,o=V(i,function(h){return Math.floor(h)}),s=cr(o,function(h,d){return h+d},0),l=V(i,function(h,d){return h-o[d]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return V(o,function(h){return h/a})}function NE(r,e){var t=Math.max(kr(r),kr(e)),a=r+e;return t>kE?a:oe(a,t)}var dx=9007199254740991;function vx(r){var e=Math.PI*2;return(r%e+e)%e}function Is(r){return r>-PE&&r=10&&e++,e}function xd(r,e){var t=yd(r),a=Math.pow(10,t),i=r/a,n;return e?i<1.5?n=1:i<2.5?n=2:i<4?n=3:i<7?n=5:n=10:i<1?n=1:i<2?n=2:i<3?n=3:i<5?n=5:n=10,r=n*a,t>=-20?+r.toFixed(t<0?-t:0):r}function _d(r,e){var t=(r.length-1)*e+1,a=Math.floor(t),i=+r[a-1],n=t-a;return n?i+n*(r[a]-i):i}function mx(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,a=0;a0?e.length:0,this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r})();function Td(r){r.option=r.parentModel=r.ecModel=null}var NW=".",Ps="___EC__COMPONENT__CONTAINER___",JE="___EC__EXTENDED_CLASS___";function ea(r){var e={main:"",sub:""};if(r){var t=r.split(NW);e.main=t[0]||"",e.sub=t[1]||""}return e}function OW(r){ee(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function QE(r){return!!(r&&r[JE])}function uu(r,e){r.$constructor=r,r.extend=function(t){var a=this,i;return zW(a)?i=(function(n){I(o,n);function o(){return n.apply(this,arguments)||this}return o})(a):(i=function(){(t.$constructor||a).apply(this,arguments)},yM(i,this)),O(i.prototype,t),i[JE]=!0,i.extend=this.extend,i.superCall=BW,i.superApply=UW,i.superClass=a,i}}function zW(r){return $(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function Dd(r,e){r.extend=e.extend}var VW=Math.round(Math.random()*10);function tA(r){var e=["__\0is_clz",VW++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function BW(r,e){for(var t=[],a=2;a=0||n&<(n,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var FW=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],HW=ra(FW),eA=(function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return HW(this,e,t)},r})();var Sx=new Xi(50);function aA(r){if(typeof r=="string"){var e=Sx.get(r);return e&&e.image}else return r}function mf(r,e,t,a,i){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var n=Sx.get(r),o={hostEl:t,cb:a,cbPayload:i};return n?(e=n.image,!cu(e)&&n.pending.push(o)):(e=Ke.loadImage(r,rA,rA),e.__zrImageSrc=r,Sx.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function rA(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var c=xi(o,t);return c>l&&(t="",c=0),l=r-c,i.ellipsis=t,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=r,i}function lA(r,e,t){var a=t.containerWidth,i=t.contentWidth,n=t.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=xi(n,e);if(o<=a){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?YW(e,i,n):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=xi(n,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function YW(r,e,t){for(var a=0,i=0,n=r.length;im&&h){var x=Math.floor(m/p);d=d||g.length>x,g=g.slice(0,x),y=g.length*p}if(i&&c&&v!=null)for(var _=sA(v,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),b={},S=0;Sd&&Dx(n,o.substring(d,m),e,h),Dx(n,v[2],e,h,v[1]),d=Tx.lastIndex}df){var F=n.lines.length;L>0?(C.tokens=C.tokens.slice(0,L),w(C,E,M),n.lines=n.lines.slice(0,D+1)):n.lines=n.lines.slice(0,D),n.isTruncated=n.isTruncated||n.lines.length0&&d+a.accumWidth>a.width&&(c=e.split(` +`),u=!0),a.accumWidth=d}else{var v=fA(e,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=v.accumWidth+h,f=v.linesWidths,c=v.lines}}c||(c=e.split(` +`));for(var m=yi(l),g=0;g=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var jW=cr(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function $W(r){return qW(r)?!!jW[r]:!0}function fA(r,e,t,a,i){for(var n=[],o=[],s="",l="",u=0,c=0,f=yi(e),p=0;pt:i+c+d>t){c?(s||l)&&(v?(s||(s=l,l="",u=0,c=u),n.push(s),o.push(c-u),l+=h,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),n.push(s),o.push(c),s=h,c=d)):v?(n.push(l),o.push(u),l=h,u=d):(n.push(h),o.push(d));continue}c+=d,v?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return l&&(s+=l),s&&(n.push(s),o.push(c)),n.length===1&&(c+=i),{accumWidth:c,lines:n,linesWidths:o}}function Cx(r,e,t,a,i,n){if(r.baseX=t,r.baseY=a,r.outerWidth=r.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;at.set(nA,yo(t,o,i),An(a,s,n),o,s),at.intersect(e,nA,null,oA);var l=oA.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=yo(l.x,l.width,i,!0),r.baseY=An(l.y,l.height,n,!0)}}var nA=new at(0,0,0,0),oA={outIntersectRect:{},clamp:!0};function Mx(r){return r!=null?r+="":r=""}function pA(r){var e=Mx(r.text),t=r.font,a=xi(yi(t),e),i=As(t);return Cd(r,a,i,null)}function Cd(r,e,t,a){var i=new at(yo(r.x||0,e,r.textAlign),An(r.y||0,t,r.textBaseline),e,t),n=a!=null?a:Ex(r)?r.lineWidth:0;return n>0&&(i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n),i}function Ex(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var Ix="__zr_style_"+Math.round(Math.random()*10),Ki={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ks={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ki[Ix]=!0;var hA=["z","z2","invisible"],KW=["invisible"],JW=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var a=gt(t),i=0;i1e-4){s[0]=r-t,s[1]=e-a,l[0]=r+t,l[1]=e+a;return}if(Md[0]=kx(i)*t+r,Md[1]=Px(i)*a+e,Ed[0]=kx(n)*t+r,Ed[1]=Px(n)*a+e,u(s,Md,Ed),c(l,Md,Ed),i=i%Rs,i<0&&(i=i+Rs),n=n%Rs,n<0&&(n=n+Rs),i>n&&!o?n+=Rs:ii&&(Ad[0]=kx(h)*t+r,Ad[1]=Px(h)*a+e,u(s,Ad,s),c(l,Ad,l))}var pe={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Os=[],zs=[],Ji=[],_o=[],Qi=[],tn=[],Nx=Math.min,Ox=Math.max,Vs=Math.cos,Bs=Math.sin,Ln=Math.abs,Bx=Math.PI,bo=Bx*2,zx=typeof Float32Array!="undefined",gf=[];function Vx(r){var e=Math.round(r/Bx*1e8)/1e8;return e%2*Bx}function Us(r,e){var t=Vx(r[0]);t<0&&(t+=bo);var a=t-r[0],i=r[1];i+=a,!e&&i-t>=bo?i=t+bo:e&&t-i>=bo?i=t-bo:!e&&t>i?i=t+(bo-Vx(t-i)):e&&t0&&(this._ux=Ln(a/Cs/e)||0,this._uy=Ln(a/Cs/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(pe.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var a=Ln(e-this._xi),i=Ln(t-this._yi),n=a>this._ux||i>this._uy;if(this.addData(pe.L,e,t),this._ctx&&n&&this._ctx.lineTo(e,t),n)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=a*a+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,a,i,n,o){return this._drawPendingPt(),this.addData(pe.C,e,t,a,i,n,o),this._ctx&&this._ctx.bezierCurveTo(e,t,a,i,n,o),this._xi=n,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,a,i){return this._drawPendingPt(),this.addData(pe.Q,e,t,a,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,a,i),this._xi=a,this._yi=i,this},r.prototype.arc=function(e,t,a,i,n,o){this._drawPendingPt(),gf[0]=i,gf[1]=n,Us(gf,o),i=gf[0],n=gf[1];var s=n-i;return this.addData(pe.A,e,t,a,a,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,a,i,n,o),this._xi=Vs(n)*a+e,this._yi=Bs(n)*a+t,this},r.prototype.arcTo=function(e,t,a,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,a,i,n),this},r.prototype.rect=function(e,t,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,a,i),this.addData(pe.R,e,t,a,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(pe.Z);var e=this._ctx,t=this._x0,a=this._y0;return e&&e.closePath(),this._xi=t,this._yi=a,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&zx&&(this.data=new Float32Array(t));for(var a=0;a0&&o))for(var s=0;sc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Ji[0]=Ji[1]=Qi[0]=Qi[1]=Number.MAX_VALUE,_o[0]=_o[1]=tn[0]=tn[1]=-Number.MAX_VALUE;var e=this.data,t=0,a=0,i=0,n=0,o;for(o=0;oa||Ln(x)>i||p===t-1)&&(v=Math.sqrt(y*y+x*x),n=m,o=g);break}case pe.C:{var _=e[p++],b=e[p++],m=e[p++],g=e[p++],S=e[p++],w=e[p++];v=qM(n,o,_,b,m,g,S,w,10),n=S,o=w;break}case pe.Q:{var _=e[p++],b=e[p++],m=e[p++],g=e[p++];v=$M(n,o,_,b,m,g,10),n=m,o=g;break}case pe.A:var D=e[p++],C=e[p++],M=e[p++],E=e[p++],L=e[p++],A=e[p++],P=A+L;p+=1,d&&(s=Vs(L)*M+D,l=Bs(L)*E+C),v=Ox(M,E)*Nx(bo,Math.abs(A)),n=Vs(P)*M+D,o=Bs(P)*E+C;break;case pe.R:{s=n=e[p++],l=o=e[p++];var R=e[p++],k=e[p++];v=R*2+k*2;break}case pe.Z:{var y=s-n,x=l-o;v=Math.sqrt(y*y+x*x),n=s,o=l;break}}v>=0&&(u[f++]=v,c+=v)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var a=this.data,i=this._ux,n=this._uy,o=this._len,s,l,u,c,f,p,h=t<1,d,v,m=0,g=0,y,x=0,_,b;if(!(h&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,v=this._pathLen,y=t*v,!y)))t:for(var S=0;S0&&(e.lineTo(_,b),x=0),w){case pe.M:s=u=a[S++],l=c=a[S++],e.moveTo(u,c);break;case pe.L:{f=a[S++],p=a[S++];var C=Ln(f-u),M=Ln(p-c);if(C>i||M>n){if(h){var E=d[g++];if(m+E>y){var L=(y-m)/E;e.lineTo(u*(1-L)+f*L,c*(1-L)+p*L);break t}m+=E}e.lineTo(f,p),u=f,c=p,x=0}else{var A=C*C+M*M;A>x&&(_=f,b=p,x=A)}break}case pe.C:{var P=a[S++],R=a[S++],k=a[S++],B=a[S++],U=a[S++],F=a[S++];if(h){var E=d[g++];if(m+E>y){var L=(y-m)/E;Va(u,P,k,U,L,Os),Va(c,R,B,F,L,zs),e.bezierCurveTo(Os[1],zs[1],Os[2],zs[2],Os[3],zs[3]);break t}m+=E}e.bezierCurveTo(P,R,k,B,U,F),u=U,c=F;break}case pe.Q:{var P=a[S++],R=a[S++],k=a[S++],B=a[S++];if(h){var E=d[g++];if(m+E>y){var L=(y-m)/E;ho(u,P,k,L,Os),ho(c,R,B,L,zs),e.quadraticCurveTo(Os[1],zs[1],Os[2],zs[2]);break t}m+=E}e.quadraticCurveTo(P,R,k,B),u=k,c=B;break}case pe.A:var H=a[S++],G=a[S++],Y=a[S++],rt=a[S++],st=a[S++],mt=a[S++],Ht=a[S++],Kt=!a[S++],Et=Y>rt?Y:rt,vt=Ln(Y-rt)>.001,It=st+mt,ct=!1;if(h){var E=d[g++];m+E>y&&(It=st+mt*(y-m)/E,ct=!0),m+=E}if(vt&&e.ellipse?e.ellipse(H,G,Y,rt,Ht,st,It,Kt):e.arc(H,G,Et,st,It,Kt),ct)break t;D&&(s=Vs(st)*Y+H,l=Bs(st)*rt+G),u=Vs(It)*Y+H,c=Bs(It)*rt+G;break;case pe.R:s=u=a[S],l=c=a[S+1],f=a[S++],p=a[S++];var Ct=a[S++],ae=a[S++];if(h){var E=d[g++];if(m+E>y){var Wt=y-m;e.moveTo(f,p),e.lineTo(f+Nx(Wt,Ct),p),Wt-=Ct,Wt>0&&e.lineTo(f+Ct,p+Nx(Wt,ae)),Wt-=ae,Wt>0&&e.lineTo(f+Ox(Ct-Wt,0),p+ae),Wt-=Ct,Wt>0&&e.lineTo(f,p+Ox(ae-Wt,0));break t}m+=E}e.rect(f,p,Ct,ae);break;case pe.Z:if(h){var E=d[g++];if(m+E>y){var L=(y-m)/E;e.lineTo(u*(1-L)+s*L,c*(1-L)+l*L);break t}m+=E}e.closePath(),u=s,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.prototype.canSave=function(){return!!this._saveData},r.CMD=pe,r.initDefaultProps=(function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),r})(),tr=t4;function en(r,e,t,a,i,n,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>e+s&&o>a+s||or+s&&n>t+s||ne+f&&c>a+f&&c>n+f&&c>s+f||cr+f&&u>t+f&&u>i+f&&u>o+f||ue+u&&l>a+u&&l>n+u||lr+u&&s>t+u&&s>i+u||st||c+ui&&(i+=yf);var p=Math.atan2(l,s);return p<0&&(p+=yf),p>=a&&p<=i||p+yf>=a&&p+yf<=i}function Wa(r,e,t,a,i,n){if(n>e&&n>a||ni?s:0}var So=tr.CMD,Fs=Math.PI*2,a4=1e-4;function i4(r,e){return Math.abs(r-e)e&&u>a&&u>n&&u>s||u1&&n4(),h=Ee(e,a,n,s,Ya[0]),p>1&&(d=Ee(e,a,n,s,Ya[1]))),p===2?me&&s>a&&s>n||s=0&&u<=1){for(var c=0,f=Pe(e,a,n,u),p=0;pt||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Rr[0]=-l,Rr[1]=l;var u=Math.abs(a-i);if(u<1e-4)return 0;if(u>=Fs-1e-4){a=0,i=Fs;var c=n?1:-1;return o>=Rr[0]+r&&o<=Rr[1]+r?c:0}if(a>i){var f=a;a=i,i=f}a<0&&(a+=Fs,i+=Fs);for(var p=0,h=0;h<2;h++){var d=Rr[h];if(d+r>o){var v=Math.atan2(s,d),c=n?1:-1;v<0&&(v=Fs+v),(v>=a&&v<=i||v+Fs>=a&&v+Fs<=i)&&(v>Math.PI/2&&v1&&(t||(s+=Wa(l,u,c,f,a,i))),m&&(l=n[d],u=n[d+1],c=l,f=u),v){case So.M:c=n[d++],f=n[d++],l=c,u=f;break;case So.L:if(t){if(en(l,u,n[d],n[d+1],e,a,i))return!0}else s+=Wa(l,u,n[d],n[d+1],a,i)||0;l=n[d++],u=n[d++];break;case So.C:if(t){if(bA(l,u,n[d++],n[d++],n[d++],n[d++],n[d],n[d+1],e,a,i))return!0}else s+=o4(l,u,n[d++],n[d++],n[d++],n[d++],n[d],n[d+1],a,i)||0;l=n[d++],u=n[d++];break;case So.Q:if(t){if(Ld(l,u,n[d++],n[d++],n[d],n[d+1],e,a,i))return!0}else s+=s4(l,u,n[d++],n[d++],n[d],n[d+1],a,i)||0;l=n[d++],u=n[d++];break;case So.A:var g=n[d++],y=n[d++],x=n[d++],_=n[d++],b=n[d++],S=n[d++];d+=1;var w=!!(1-n[d++]);p=Math.cos(b)*x+g,h=Math.sin(b)*_+y,m?(c=p,f=h):s+=Wa(l,u,p,h,a,i);var D=(a-g)*_/x+g;if(t){if(TA(g,y,_,b,b+S,w,e,D,i))return!0}else s+=l4(g,y,_,b,b+S,w,D,i);l=Math.cos(b+S)*x+g,u=Math.sin(b+S)*_+y;break;case So.R:c=l=n[d++],f=u=n[d++];var C=n[d++],M=n[d++];if(p=c+C,h=f+M,t){if(en(c,f,p,f,e,a,i)||en(p,f,p,h,e,a,i)||en(p,h,c,h,e,a,i)||en(c,h,c,f,e,a,i))return!0}else s+=Wa(p,f,p,h,a,i),s+=Wa(c,h,c,f,a,i);break;case So.Z:if(t){if(en(l,u,c,f,e,a,i))return!0}else s+=Wa(l,u,c,f,a,i);l=c,u=f;break}}return!t&&!i4(u,f)&&(s+=Wa(l,u,c,f,a,i)||0),s!==0}function CA(r,e,t){return DA(r,0,!1,e,t)}function MA(r,e,t,a){return DA(r,e,!0,t,a)}var fu=J({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ki),c4={style:J({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ks.style)},Ux=_a.concat(["invisible","culling","z","z2","zlevel","parent"]),f4=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){t.buildPath(l,t.shape)}),i.silent=!0;var n=i.style;for(var o in a)n[o]!==a[o]&&(n[o]=a[o]);n.fill=a.fill?a.decal:null,n.decal=null,n.shadowColor=null,a.strokeFirst&&(n.stroke=null);for(var s=0;s.5?cf:a>.2?bE:ff}else if(t)return ff}return cf},e.prototype.getInsideTextStroke=function(t){var a=this.style.fill;if(W(a)){var i=this.__zr,n=!!(i&&i.isDarkMode()),o=ru(t,0)0))},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,a=this.style,i=!t;if(i){var n=!1;this.path||(n=!0,this.createPathProxy());var o=this.path;(n||this.__dirty&co)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){s.copy(t);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c==null?4:c)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect(),o=this.style;if(t=i[0],a=i[1],n.contain(t,a)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),MA(s,l/u,t,a)))return!0}if(this.hasFill())return CA(s,t,a)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=co,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,a){t==="shape"?this.setShape(a):r.prototype.attrKV.call(this,t,a)},e.prototype.setShape=function(t,a){var i=this.shape;return i||(i=this.shape={}),typeof t=="string"?i[t]=a:O(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&co)},e.prototype.createStyle=function(t){return lo(fu,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var a=this._normalState;t.shape&&!a.shape&&(a.shape=O({},this.shape))},e.prototype._applyStateObj=function(t,a,i,n,o,s){r.prototype._applyStateObj.call(this,t,a,i,n,o,s);var l=!(a&&n),u;if(a&&a.shape?o?n?u=a.shape:(u=O({},i.shape),O(u,a.shape)):(u=O({},n?this.shape:i.shape),O(u,a.shape)):l&&(u=i.shape),u)if(o){this.shape=O({},this.shape);for(var c={},f=gt(u),p=0;pi&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>n&&(f=l+u,l*=n/f,u*=n/f),s+c>n&&(f=s+c,s*=n/f,c*=n/f),r.moveTo(t+s,a),r.lineTo(t+i-l,a),l!==0&&r.arc(t+i-l,a+l,l,-Math.PI/2,0),r.lineTo(t+i,a+n-u),u!==0&&r.arc(t+i-u,a+n-u,u,0,Math.PI/2),r.lineTo(t+c,a+n),c!==0&&r.arc(t+c,a+n-c,c,Math.PI/2,Math.PI),r.lineTo(t,a+s),s!==0&&r.arc(t+s,a+s,s,Math.PI,Math.PI*1.5)}var pu=Math.round;function Hs(r,e,t){if(e){var a=e.x1,i=e.x2,n=e.y1,o=e.y2;r.x1=a,r.x2=i,r.y1=n,r.y2=o;var s=t&&t.lineWidth;return s&&(pu(a*2)===pu(i*2)&&(r.x1=r.x2=Nr(a,s,!0)),pu(n*2)===pu(o*2)&&(r.y1=r.y2=Nr(n,s,!0))),r}}function Id(r,e,t){if(e){var a=e.x,i=e.y,n=e.width,o=e.height;r.x=a,r.y=i,r.width=n,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Nr(a,s,!0),r.y=Nr(i,s,!0),r.width=Math.max(Nr(a+n,s,!1)-r.x,n===0?0:1),r.height=Math.max(Nr(i+o,s,!1)-r.y,o===0?0:1)),r}}function Nr(r,e,t){if(!e)return r;var a=pu(r*2);return(a+pu(e))%2===0?a/2:(a+(t?1:-1))/2}var y4=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})();var x4={},IA=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new y4},e.prototype.buildPath=function(t,a){var i,n,o,s;if(this.subPixelOptimize){var l=Id(x4,a,this.style);i=l.x,n=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else i=a.x,n=a.y,o=a.width,s=a.height;a.r?LA(t,a):t.rect(i,n,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e})(ft);IA.prototype.type="rect";var ht=IA;var PA={fill:"#000"},kA=2,rn={},_4={style:J({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ks.style)},FA=(function(r){kt(e,r);function e(t){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=PA,a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,L=0;L=0&&(P=S[A],P.align==="right");)this._placeToken(P,t,D,g,L,"right",x),C-=P.width,L-=P.width,A--;for(E+=(c-(E-m)-(y-L)-C)/2;M<=A;)P=S[M],this._placeToken(P,t,D,g,E+P.width/2,"center",x),E+=P.width,M++;g+=D}},e.prototype._placeToken=function(t,a,i,n,o,s,l){var u=a.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,f=n+i/2;c==="top"?f=n+t.height/2:c==="bottom"&&(f=n+i-t.height/2);var p=!t.isLineHolder&&Fx(u);p&&this._renderBackground(u,a,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var h=!!u.backgroundColor,d=t.textPadding;d&&(o=BA(o,s,d),f-=t.height/2-d[0]-t.innerHeight/2);var v=this._getOrCreateChild(In),m=v.createStyle();v.useStyle(m);var g=this._defaultStyle,y=!1,x=0,_=!1,b=VA("fill"in u?u.fill:"fill"in a?a.fill:(y=!0,g.fill)),S=zA("stroke"in u?u.stroke:"stroke"in a?a.stroke:!h&&!l&&(!g.autoStroke||y)?(x=kA,_=!0,g.stroke):null),w=u.textShadowBlur>0||a.textShadowBlur>0;m.text=t.text,m.x=o,m.y=f,w&&(m.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,m.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=t.font||qr,m.opacity=Te(u.opacity,a.opacity,1),NA(m,u),S&&(m.lineWidth=Te(u.lineWidth,a.lineWidth,x),m.lineDash=Q(u.lineDash,a.lineDash),m.lineDashOffset=a.lineDashOffset||0,m.stroke=S),b&&(m.fill=b),v.setBoundingRect(Cd(m,t.contentWidth,t.contentHeight,_?0:null))},e.prototype._renderBackground=function(t,a,i,n,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,f=l&&l.image,p=l&&!f,h=t.borderRadius,d=this,v,m;if(p||t.lineHeight||u&&c){v=this._getOrCreateChild(ht),v.useStyle(v.createStyle()),v.style.fill=null;var g=v.shape;g.x=i,g.y=n,g.width=o,g.height=s,g.r=h,v.dirtyShape()}if(p){var y=v.style;y.fill=l||null,y.fillOpacity=Q(t.fillOpacity,1)}else if(f){m=this._getOrCreateChild(se),m.onload=function(){d.dirtyStyle()};var x=m.style;x.image=l.image,x.x=i,x.y=n,x.width=o,x.height=s}if(u&&c){var y=v.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=Q(t.strokeOpacity,1),y.lineDash=t.borderDash,y.lineDashOffset=t.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var _=(v||m).style;_.shadowBlur=t.shadowBlur||0,_.shadowColor=t.shadowColor||"transparent",_.shadowOffsetX=t.shadowOffsetX||0,_.shadowOffsetY=t.shadowOffsetY||0,_.opacity=Te(t.opacity,a.opacity,1)},e.makeFont=function(t){var a="";return Gx(t)&&(a=[t.fontStyle,t.fontWeight,Hx(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),a&&Be(a)||t.textFont||t.font},e})(ke),b4={left:!0,right:1,center:1},S4={top:1,bottom:1,middle:1},RA=["fontStyle","fontWeight","fontSize","fontFamily"];function Hx(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Mh+"px":r+"px"}function NA(r,e){for(var t=0;t=0,n=!1;if(r instanceof ft){var o=qA(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(hu(s)||hu(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(n=!0,a=O({},a),u=O({},u),u.fill=s):!hu(u.fill)&&hu(s)?(n=!0,a=O({},a),u=O({},u),u.fill=rf(s)):!hu(u.stroke)&&hu(l)&&(n||(a=O({},a),u=O({},u)),u.stroke=rf(l)),a.style=u}}if(a&&a.z2==null){n||(a=O({},a));var c=r.z2EmphasisLift;a.z2=r.z2+(c!=null?c:Pn)}return a}function A4(r,e,t){if(t&&t.z2==null){t=O({},t);var a=r.z2SelectLift;t.z2=r.z2+(a!=null?a:T4)}return t}function L4(r,e,t){var a=lt(r.currentStates,e)>=0,i=r.style.opacity,n=a?null:M4(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=O({},t),o=O({opacity:a?i:n.opacity*.1},o),t.style=o),t}function Wx(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return E4(this,r,e,t);if(r==="blur")return L4(this,r,t);if(r==="select")return A4(this,r,t)}return t}function wi(r){r.stateProxy=Wx;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=Wx),t&&(t.stateProxy=Wx)}function YA(r,e){!JA(r,e)&&!r.__highByOuter&&kn(r,jA)}function ZA(r,e){!JA(r,e)&&!r.__highByOuter&&kn(r,$A)}function Tr(r,e){r.__highByOuter|=1<<(e||0),kn(r,jA)}function Dr(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&kn(r,$A)}function Od(r){kn(r,qx)}function Tf(r){kn(r,KA)}function jx(r){kn(r,D4)}function $x(r){kn(r,C4)}function JA(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function Kx(r){var e=r.getModel(),t=[],a=[];e.eachComponent(function(i,n){var o=Zx(n),s=i==="series",l=s?r.getViewOfSeriesModel(n):r.getViewOfComponentModel(n);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){KA(u)}),s&&t.push(n)),o.isBlured=!1}),T(a,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(t,!1,e)})}function Yx(r,e,t,a){var i=a.getModel();t=t||"coordinateSystem";function n(u,c){for(var f=0;f0){var l={dataIndex:s,seriesIndex:t.seriesIndex};o!=null&&(l.dataType=o),e.push(l)}})}),e}function an(r,e,t){Rn(r,!0),kn(r,wi),Vd(r,e,t)}function I4(r){Rn(r,!1)}function Rt(r,e,t,a){a?I4(r):an(r,e,t)}function Vd(r,e,t){var a=nt(r);e!=null?(a.focus=e,a.blurScope=t):a.focus&&(a.focus=null)}var XA=["emphasis","blur","select"],P4={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function te(r,e,t,a){t=t||"itemStyle";for(var i=0;iAf,BezierCurve:()=>Xs,BoundingRect:()=>at,Circle:()=>Or,CompoundPath:()=>Co,Ellipse:()=>Cf,Group:()=>K,Image:()=>se,IncrementalDisplayable:()=>LL,Line:()=>le,LinearGradient:()=>Za,OrientedBoundingRect:()=>Kd,Path:()=>ft,Point:()=>pt,Polygon:()=>ye,Polyline:()=>he,RadialGradient:()=>Xd,Rect:()=>ht,Ring:()=>Zs,Sector:()=>De,Text:()=>Dt,WH:()=>be,XY:()=>bt,applyTransform:()=>vr,calcZ2Range:()=>f_,clipPointsByRect:()=>c_,clipRectByRect:()=>pY,createIcon:()=>Vn,ensureCopyRect:()=>xu,ensureCopyTransform:()=>tv,expandOrShrinkRect:()=>qa,extendPath:()=>uY,extendShape:()=>sY,getShapeClass:()=>gu,getTransform:()=>Ci,groupTransition:()=>zn,initProps:()=>Vt,isBoundingRectAxisAligned:()=>Qd,isElementRemoved:()=>Nn,lineLineIntersect:()=>VL,linePolygonIntersect:()=>yu,makeImage:()=>u_,makePath:()=>$s,mergePath:()=>Mr,registerShape:()=>Di,removeElement:()=>Xa,removeElementWithFadeOut:()=>oa,resizePath:()=>zL,retrieveZInfo:()=>ja,setTooltipConfig:()=>Er,subPixelOptimize:()=>Lf,subPixelOptimizeLine:()=>On,subPixelOptimizeRect:()=>cY,transformDirection:()=>Ks,traverseElements:()=>zr,traverseUpdateZ:()=>Js,updateProps:()=>wt});var du=tr.CMD,k4=[[],[],[]],sL=Math.sqrt,R4=Math.atan2;function Ud(r,e){if(e){var t=r.data,a=r.len(),i,n,o,s,l,u,c=du.M,f=du.C,p=du.L,h=du.R,d=du.A,v=du.Q;for(o=0,s=0;o1&&(o*=t_(d),s*=t_(d));var v=(i===n?-1:1)*t_((o*o*(s*s)-o*o*(h*h)-s*s*(p*p))/(o*o*(h*h)+s*s*(p*p)))||0,m=v*o*h/s,g=v*-s*p/o,y=(r+t)/2+Hd(f)*m-Fd(f)*g,x=(e+a)/2+Fd(f)*m+Hd(f)*g,_=uL([1,0],[(p-m)/o,(h-g)/s]),b=[(p-m)/o,(h-g)/s],S=[(-1*p-m)/o,(-1*h-g)/s],w=uL(b,S);if(e_(b,S)<=-1&&(w=Df),e_(b,S)>=1&&(w=0),w<0){var D=Math.round(w/Df*1e6)/1e6;w=Df*2+D%2*Df}c.addData(u,y,x,o,s,_,w,f,n)}var N4=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,O4=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function z4(r){var e=new tr;if(!r)return e;var t=0,a=0,i=t,n=a,o,s=tr.CMD,l=r.match(N4);if(!l)return e;for(var u=0;uP*P+R*R&&(D=M,C=E),{cx:D,cy:C,x0:-c,y0:-f,x1:D*(i/b-1),y1:C*(i/b-1)}}function G4(r){var e;if(z(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function _L(r,e){var t,a=Mf(e.r,0),i=Mf(e.r0||0,0),n=a>0,o=i>0;if(!(!n&&!o)){if(n||(a=i,i=0),i>a){var s=a;a=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,p=!!e.clockwise,h=yL(u-l),d=h>r_&&h%r_;if(d>Ti&&(h=d),!(a>Ti))r.moveTo(c,f);else if(h>r_-Ti)r.moveTo(c+a*mu(l),f+a*Ys(l)),r.arc(c,f,a,l,u,!p),i>Ti&&(r.moveTo(c+i*mu(u),f+i*Ys(u)),r.arc(c,f,i,u,l,p));else{var v=void 0,m=void 0,g=void 0,y=void 0,x=void 0,_=void 0,b=void 0,S=void 0,w=void 0,D=void 0,C=void 0,M=void 0,E=void 0,L=void 0,A=void 0,P=void 0,R=a*mu(l),k=a*Ys(l),B=i*mu(u),U=i*Ys(u),F=h>Ti;if(F){var H=e.cornerRadius;H&&(t=G4(H),v=t[0],m=t[1],g=t[2],y=t[3]);var G=yL(a-i)/2;if(x=nn(G,g),_=nn(G,y),b=nn(G,v),S=nn(G,m),C=w=Mf(x,_),M=D=Mf(b,S),(w>Ti||D>Ti)&&(E=a*mu(u),L=a*Ys(u),A=i*mu(l),P=i*Ys(l),hTi){var vt=nn(g,C),It=nn(y,C),ct=Wd(A,P,R,k,a,vt,p),Ct=Wd(E,L,B,U,a,It,p);r.moveTo(c+ct.cx+ct.x0,f+ct.cy+ct.y0),C0&&r.arc(c+ct.cx,f+ct.cy,vt,Cr(ct.y0,ct.x0),Cr(ct.y1,ct.x1),!p),r.arc(c,f,a,Cr(ct.cy+ct.y1,ct.cx+ct.x1),Cr(Ct.cy+Ct.y1,Ct.cx+Ct.x1),!p),It>0&&r.arc(c+Ct.cx,f+Ct.cy,It,Cr(Ct.y1,Ct.x1),Cr(Ct.y0,Ct.x0),!p))}else r.moveTo(c+R,f+k),r.arc(c,f,a,l,u,!p);if(!(i>Ti)||!F)r.lineTo(c+B,f+U);else if(M>Ti){var vt=nn(v,M),It=nn(m,M),ct=Wd(B,U,E,L,i,-It,p),Ct=Wd(R,k,A,P,i,-vt,p);r.lineTo(c+ct.cx+ct.x0,f+ct.cy+ct.y0),M0&&r.arc(c+ct.cx,f+ct.cy,It,Cr(ct.y0,ct.x0),Cr(ct.y1,ct.x1),!p),r.arc(c,f,i,Cr(ct.cy+ct.y1,ct.cx+ct.x1),Cr(Ct.cy+Ct.y1,Ct.cx+Ct.x1),p),vt>0&&r.arc(c+Ct.cx,f+Ct.cy,vt,Cr(Ct.y1,Ct.x1),Cr(Ct.y0,Ct.x0),!p))}else r.lineTo(c+B,f+U),r.arc(c,f,i,u,l,p)}r.closePath()}}}var Y4=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r})();var bL=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Y4},e.prototype.buildPath=function(t,a){_L(t,a)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e})(ft);bL.prototype.type="sector";var De=bL;var Z4=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})();var SL=(function(r){kt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Z4},e.prototype.buildPath=function(t,a){var i=a.cx,n=a.cy,o=Math.PI*2;t.moveTo(i+a.r,n),t.arc(i,n,a.r,0,o,!1),t.moveTo(i+a.r0,n),t.arc(i,n,a.r0,0,o,!0)},e})(ft);SL.prototype.type="ring";var Zs=SL;function a_(r,e,t,a){var i=[],n=[],o=[],s=[],l,u,c,f;if(a){c=[1/0,1/0],f=[-1/0,-1/0];for(var p=0,h=r.length;p=2){if(a){var n=a_(i,a,t,e.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(t?o:o-1);s++){var l=n[s*2],u=n[s*2+1],c=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;sjs[1]){if(n=!1,nr.negativeSize||a)return n;var l=qd(js[0]-qs[1]),u=qd(qs[0]-js[1]);i_(l,u)>$d.len()&&(l=u||!nr.bidirectional)&&(pt.scale(jd,s,-u*i),nr.useDir&&nr.calcDirMTV()))}}return n},r.prototype._getProjMinMaxOnAxis=function(e,t,a){for(var i=this._axes[e],n=this._origin,o=t[0].dot(i)+n[e],s=o,l=o,u=1;u0){var f=c.duration,p=c.delay,h=c.easing,d={duration:f,delay:p||0,easing:h,done:n,force:!!n||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,d):e.animateTo(t,d)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),n&&n()}function wt(r,e,t,a,i,n){n_("update",r,e,t,a,i,n)}function Vt(r,e,t,a,i,n){n_("enter",r,e,t,a,i,n)}function Nn(r){if(!r.__zr)return!0;for(var e=0;e_i(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function RL(r){return!r.isGroup}function fY(r){return r.shape!=null}function zn(r,e,t){if(!r||!e)return;function a(o){var s={};return o.traverse(function(l){RL(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return fY(o)&&(s.shape=tt(o.shape)),s}var n=a(r);e.traverse(function(o){if(RL(o)&&o.anid){var s=n[o.anid];if(s){var l=i(o);o.attr(i(s)),wt(o,l,t,nt(o).dataIndex)}}})}function c_(r,e){return V(r,function(t){var a=t[0];a=_e(a,e.x),a=wr(a,e.x+e.width);var i=t[1];return i=_e(i,e.y),i=wr(i,e.y+e.height),[a,i]})}function pY(r,e){var t=_e(r.x,e.x),a=wr(r.x+r.width,e.x+e.width),i=_e(r.y,e.y),n=wr(r.y+r.height,e.y+e.height);if(a>=t&&n>=i)return{x:t,y:i,width:a-t,height:n-i}}function Vn(r,e,t){var a=O({rectHover:!0},e),i=a.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),J(i,t),new se(a)):$s(r.replace("path://",""),a,t,"center")}function yu(r,e,t,a,i){for(var n=0,o=i[i.length-1];n1)return!1;var m=o_(h,d,c,f)/p;return!(m<0||m>1)}function o_(r,e,t,a){return r*a-t*e}function hY(r){return r<=1e-6&&r>=-1e-6}function qa(r,e,t,a,i){return e==null||(yt(e)?Se[0]=Se[1]=Se[2]=Se[3]=e:(Se[0]=e[0],Se[1]=e[1],Se[2]=e[2],Se[3]=e[3]),a&&(Se[0]=_e(0,Se[0]),Se[1]=_e(0,Se[1]),Se[2]=_e(0,Se[2]),Se[3]=_e(0,Se[3])),t&&(Se[0]=-Se[0],Se[1]=-Se[1],Se[2]=-Se[2],Se[3]=-Se[3]),NL(r,Se,"x","width",3,1,i&&i[0]||0),NL(r,Se,"y","height",0,2,i&&i[1]||0)),r}var Se=[0,0,0,0];function NL(r,e,t,a,i,n,o){var s=e[n]+e[i],l=r[a];r[a]+=s,o=_e(0,wr(o,l)),r[a]=0?-e[i]:e[n]>=0?l+e[n]:_i(s)>1e-8?(l-o)*e[i]/s:0):r[t]-=e[i]}function Er(r){var e=r.itemTooltipOption,t=r.componentModel,a=r.itemName,i=W(e)?{formatter:e}:e,n=t.mainType,o=t.componentIndex,s={componentType:n,name:a,$vars:["name"]};s[n+"Index"]=o;var l=r.formatterParamsExtra;l&&T(gt(l),function(c){it(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=nt(r.el);u.componentMainType=n,u.componentIndex=o,u.tooltipConfig={name:a,option:J({content:a,encodeHTMLContent:!0,formatterParams:s},i)}}function l_(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function zr(r,e){if(r)if(z(r))for(var t=0;te&&(e=o),oe&&(t=e=0),{min:t,max:e}}function Js(r,e,t){BL(r,e,t,-1/0)}function BL(r,e,t,a){if(r.ignoreModelZ)return a;var i=r.getTextContent(),n=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l=0&&s.push(l)}),s}}function Ar(r,e){return dt(dt({},r,!0),e,!0)}var $L={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}};var KL={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE",custom:"\u81EA\u5B9A\u4E49\u56FE\u8868",chart:"\u56FE\u8868"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}};var nv="ZH",y_="EN",bu=y_,iv={},x_={},ov=Lt.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||bu).toUpperCase();return r.indexOf(nv)>-1?nv:bu})():bu;function JL(r,e){r=r.toUpperCase(),x_[r]=new Mt(e),iv[r]=e}function QL(r){if(W(r)){var e=iv[r.toUpperCase()]||{};return r===nv||r===y_?tt(e):dt(tt(e),tt(iv[bu]),!1)}else return dt(tt(r),tt(iv[bu]),!1)}function Pf(r){return x_[r]}function tI(){return x_[bu]}JL(y_,$L);JL(nv,KL);var __=null;function eI(r){__||(__=r)}function me(){return __}var uv=1e3,cv=uv*60,Su=cv*60,Sa=Su*24,b_=Sa*365,SY={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},lv={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},wY="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",sv="{yyyy}-{MM}-{dd}",S_={year:"{yyyy}",month:"{yyyy}-{MM}",day:sv,hour:sv+" "+lv.hour,minute:sv+" "+lv.minute,second:sv+" "+lv.second,millisecond:wY},sa=["year","month","day","hour","minute","second","millisecond"],rI=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function aI(r){return!W(r)&&!$(r)?TY(r):r}function TY(r){r=r||{};var e={},t=!0;return T(sa,function(a){t&&(t=r[a]==null)}),T(sa,function(a,i){var n=r[a];e[a]={};for(var o=null,s=i;s>=0;s--){var l=sa[s],u=et(n)&&!z(n)?n[l]:n,c=void 0;z(u)?(c=u.slice(),o=c[0]||""):W(u)?(o=u,c=[o]):(o==null?o=lv[a]:SY[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],t&&(c[1]="{primary|"+o+"}")),e[a][l]=c}}),e}function Un(r,e){return r+="","0000".substr(0,e-r.length)+r}function wu(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function iI(r){return r===wu(r)}function nI(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function el(r,e,t,a){var i=Fa(r),n=i[w_(t)](),o=i[pv(t)]()+1,s=Math.floor((o-1)/3)+1,l=i[hv(t)](),u=i["get"+(t?"UTC":"")+"Day"](),c=i[dv(t)](),f=(c-1)%12+1,p=i[vv(t)](),h=i[mv(t)](),d=i[gv(t)](),v=c>=12?"pm":"am",m=v.toUpperCase(),g=a instanceof Mt?a:Pf(a||ov)||tI(),y=g.getModel("time"),x=y.get("month"),_=y.get("monthAbbr"),b=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,v+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,n+"").replace(/{yy}/g,Un(n%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,x[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,Un(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Un(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Un(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Un(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Un(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Un(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Un(d,3)).replace(/{S}/g,d+"")}function oI(r,e,t,a,i){var n=null;if(W(t))n=t;else if($(t)){var o={time:r.time,level:r.time.level},s=me();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),n=t(r.value,e,o)}else{var l=r.time;if(l){var u=t[l.lowerTimeUnit][l.upperTimeUnit];n=u[Math.min(l.level,u.length-1)]||""}else{var c=rl(r.value,i);n=t[c][c][0]}}return el(new Date(r.value),n,i,a)}function rl(r,e){var t=Fa(r),a=t[pv(e)]()+1,i=t[hv(e)](),n=t[dv(e)](),o=t[vv(e)](),s=t[mv(e)](),l=t[gv(e)](),u=l===0,c=u&&s===0,f=c&&o===0,p=f&&n===0,h=p&&i===1,d=h&&a===1;return d?"year":h?"month":p?"day":f?"hour":c?"minute":u?"second":"millisecond"}function fv(r,e,t){switch(e){case"year":r[T_(t)](0);case"month":r[D_(t)](1);case"day":r[C_(t)](0);case"hour":r[M_(t)](0);case"minute":r[E_(t)](0);case"second":r[A_(t)](0)}return r}function w_(r){return r?"getUTCFullYear":"getFullYear"}function pv(r){return r?"getUTCMonth":"getMonth"}function hv(r){return r?"getUTCDate":"getDate"}function dv(r){return r?"getUTCHours":"getHours"}function vv(r){return r?"getUTCMinutes":"getMinutes"}function mv(r){return r?"getUTCSeconds":"getSeconds"}function gv(r){return r?"getUTCMilliseconds":"getMilliseconds"}function sI(r){return r?"setUTCFullYear":"setFullYear"}function T_(r){return r?"setUTCMonth":"setMonth"}function D_(r){return r?"setUTCDate":"setDate"}function C_(r){return r?"setUTCHours":"setHours"}function M_(r){return r?"setUTCMinutes":"setMinutes"}function E_(r){return r?"setUTCSeconds":"setSeconds"}function A_(r){return r?"setUTCMilliseconds":"setMilliseconds"}function I_(r){if(!pf(r))return W(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function yv(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,a){return a.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var sn=so;function xv(r,e,t){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Be(c)?c:"-"}function n(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Fa(r):r;if(isNaN(+l)){if(s)return"-"}else return el(l,a,t)}if(e==="ordinal")return Wc(r)?i(r):yt(r)&&n(r)?r+"":"-";var u=Ha(r);return n(u)?I_(u):Wc(r)?i(r):typeof r=="boolean"?r+"":"-"}var lI=["a","b","c","d","e","f","g"],L_=function(r,e){return"{"+r+(e==null?"":e)+"}"};function _v(r,e,t){z(e)||(e=[e]);var a=e.length;if(!a)return"";for(var i=e[0].$vars||[],n=0;n':'';var o=t.markerId||"markerX";return{renderMode:n,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function Mi(r,e){return e=e||"transparent",W(r)?r:et(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function al(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var bv={},P_={},DY=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(e,t){this._nonSeriesBoxMasterList=a(bv,!0),this._normalMasterList=a(P_,!1);function a(i,n){var o=[];return T(i,function(s,l){var u=s.create(e,t);o=o.concat(u||[])}),o}},r.prototype.update=function(e,t){T(this._normalMasterList,function(a){a.update&&a.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(e,t){if(e==="matrix"||e==="calendar"){bv[e]=t;return}P_[e]=t},r.get=function(e){return P_[e]||bv[e]},r})();function CY(r){return!!bv[r]}var Sv={coord:1,coord2:2};function fI(r){pI.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var pI=q();function hI(r){var e=r.getShallow("coord",!0),t=Sv.coord;if(e==null){var a=pI.get(r.type);a&&a.getCoord2&&(t=Sv.coord2,e=a.getCoord2(r))}return{coord:e,from:t}}var Ei={none:0,dataCoordSys:1,boxCoordSys:2};function k_(r,e){var t=r.getShallow("coordinateSystem"),a=r.getShallow("coordinateSystemUsage",!0),i=a!=null,n=Ei.none;if(t){var o=r.mainType==="series";a==null&&(a=o?"data":"box"),a==="data"?(n=Ei.dataCoordSys,o||(n=Ei.none)):a==="box"&&(n=Ei.boxCoordSys,!o&&!CY(t)&&(n=Ei.none))}return{coordSysType:t,kind:n}}function ln(r){var e=r.targetModel,t=r.coordSysType,a=r.coordSysProvider,i=r.isDefaultDataCoordSys,n=r.allowNotFound,o=k_(e,!0),s=o.kind,l=o.coordSysType;if(i&&s!==Ei.dataCoordSys&&(s=Ei.dataCoordSys,l=t),s===Ei.none||l!==t)return!1;var u=a(t,e);return u?(s===Ei.dataCoordSys?e.coordinateSystem=u:e.boxCoordinateSystem=u,!0):!1}var wv=function(r,e){var t=e.getReferringComponents(r,Yt).models[0];return t&&t.coordinateSystem},Fn=DY;var Tv=T,R_=["left","right","top","bottom","width","height"],il=[["width","left","right"],["height","top","bottom"]];function N_(r,e,t,a,i){var n=0,o=0;a==null&&(a=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),p=f&&f.getBoundingRect(),h,d;if(r==="horizontal"){var v=c.width+(p?-p.x+c.x:0);h=n+v,h>a||l.newline?(n=0,h=v,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(p?-p.y+c.y:0);d=o+m,d>i||l.newline?(n+=s+t,o=0,d=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=n,l.y=o,l.markRedraw(),r==="horizontal"?n=h+t:o=d+t)})}var Ai=N_,Vut=ut(N_,"vertical"),But=ut(N_,"horizontal");function Dv(r,e){return{left:r.getShallow("left",e),top:r.getShallow("top",e),right:r.getShallow("right",e),bottom:r.getShallow("bottom",e),width:r.getShallow("width",e),height:r.getShallow("height",e)}}function MY(r,e){var t=Zt(r,e,{enableLayoutOnlyByCenter:!0}),a=r.getBoxLayoutParams(),i,n;if(t.type===Rf.point)n=t.refPoint,i=Bt(a,{width:e.getWidth(),height:e.getHeight()});else{var o=r.get("center"),s=z(o)?o:[o,o];i=Bt(a,t.refContainer),n=t.boxCoordFrom===Sv.coord2?t.refPoint:[j(s[0],i.width)+i.x,j(s[1],i.height)+i.y]}return{viewRect:i,center:n}}function Cv(r,e){var t=MY(r,e),a=t.viewRect,i=t.center,n=r.get("radius");z(n)||(n=[0,n]);var o=j(a.width,e.getWidth()),s=j(a.height,e.getHeight()),l=Math.min(o,s),u=j(n[0],l/2),c=j(n[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:a}}function Bt(r,e,t){t=sn(t||0);var a=e.width,i=e.height,n=j(r.left,a),o=j(r.top,i),s=j(r.right,a),l=j(r.bottom,i),u=j(r.width,a),c=j(r.height,i),f=t[2]+t[0],p=t[1]+t[3],h=r.aspect;switch(isNaN(u)&&(u=a-s-p-n),isNaN(c)&&(c=i-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>a/i?u=a*.8:c=i*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(n)&&(n=a-s-u-p),isNaN(o)&&(o=i-l-c-f),r.left||r.right){case"center":n=a/2-u/2-t[3];break;case"right":n=a-u-p;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-c/2-t[0];break;case"bottom":o=i-c-f;break}n=n||0,o=o||0,isNaN(u)&&(u=a-p-n-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var d=new at((e.x||0)+n+t[3],(e.y||0)+o+t[0],u,c);return d.margin=t,d}function Mv(r,e,t){var a=r.getShallow("preserveAspect",!0);if(!a)return e;var i=e.width/e.height;if(Math.abs(Math.atan(t)-Math.atan(i))<1e-9)return e;var n=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=a==="cover";return i>t&&!l||i=v)return f;for(var m=0;m=0;l--)s=dt(s,i[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(t,a){var i=t+"Index",n=t+"Id";return $i(this.ecModel,t,{index:this.get(i,!0),id:this.get(n,!0)},a)},e.prototype.getBoxLayoutParams=function(){return Dv(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=(function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0})(),e})(Mt);Dd(Tu,Mt);xo(Tu);qL(Tu);jL(Tu,AY);function AY(r){var e=[];return T(Tu.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=V(e,function(t){return ea(t).main}),r!=="dataset"&<(e,"dataset")<=0&&e.unshift("dataset"),e}var St=Tu;var nl={color:{},darkColor:{},size:{}},Oe=nl.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};O(Oe,{primary:Oe.neutral80,secondary:Oe.neutral70,tertiary:Oe.neutral60,quaternary:Oe.neutral50,disabled:Oe.neutral20,border:Oe.neutral30,borderTint:Oe.neutral20,borderShade:Oe.neutral40,background:Oe.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Oe.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Oe.neutral70,axisLineTint:Oe.neutral40,axisTick:Oe.neutral70,axisTickMinor:Oe.neutral60,axisLabel:Oe.neutral70,axisSplitLine:Oe.neutral15,axisMinorSplitLine:Oe.neutral05});for(Ao in Oe)Oe.hasOwnProperty(Ao)&&(z_=Oe[Ao],Ao==="theme"?nl.darkColor.theme=Oe.theme.slice():Ao==="highlight"?nl.darkColor.highlight="rgba(255,231,130,0.4)":Ao.indexOf("accent")===0?nl.darkColor[Ao]=Ua(z_,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):nl.darkColor[Ao]=Ua(z_,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)}));var z_,Ao;nl.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var N=nl;var vI="";typeof navigator!="undefined"&&(vI=navigator.platform||"");var Du="rgba(0, 0, 0, 0.2)",mI=N.color.theme[0],LY=Ua(mI,null,null,.9),gI={darkMode:"auto",colorBy:"series",color:N.color.theme,gradientColor:[LY,mI],aria:{decal:{decals:[{color:Du,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Du,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Du,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Du,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Du,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Du,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:vI.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Ev=q(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),er="original",Ae="arrayRows",or="objectRows",ca="keyedColumns",wa="typedArray",V_="unknown",Vr="column",un="row";var rr={Must:1,Might:2,Not:3},yI=ot();function xI(r){yI(r).datasetMap=q()}function Av(r,e,t){var a={},i=Lv(e);if(!i||!r)return a;var n=[],o=[],s=e.ecModel,l=yI(s).datasetMap,u=i.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),T(r,function(v,m){var g=et(v)?v:r[m]={name:v};g.type==="ordinal"&&c==null&&(c=m,f=d(g)),a[g.name]=[]});var p=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});T(r,function(v,m){var g=v.name,y=d(v);if(c==null){var x=p.valueWayDim;h(a[g],x,y),h(o,x,y),p.valueWayDim+=y}else if(c===m)h(a[g],0,y),h(n,0,y);else{var x=p.categoryWayDim;h(a[g],x,y),h(o,x,y),p.categoryWayDim+=y}});function h(v,m,g){for(var y=0;ye)return r[a];return r[t-1]}function DI(r,e,t,a,i,n,o){n=n||r;var s=e(n),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!a?t:PY(a,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function kY(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Pv,zf,CI,MI="\0_ec_inner",RY=1;var II=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,a,i,n,o,s){n=n||{},this.option=null,this._theme=new Mt(n),this._locale=new Mt(o),this._optionManager=s},e.prototype.setOption=function(t,a,i){var n=LI(a);this._optionManager.setOption(t,i,n),this._resetOption(null,n)},e.prototype.resetOption=function(t,a){return this._resetOption(t,LI(a))},e.prototype._resetOption=function(t,a){var i=!1,n=this._optionManager;if(!t||t==="recreate"){var o=n.mountOption(t==="recreate");!this.option||t==="recreate"?CI(this,o):(this.restoreData(),this._mergeOption(o,a)),i=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=n.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,a))}if(!t||t==="recreate"||t==="media"){var l=n.getMediaOption(this);l.length&&T(l,function(u){i=!0,this._mergeOption(u,a)},this)}return i},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,a){var i=this.option,n=this._componentsMap,o=this._componentsCount,s=[],l=q(),u=a&&a.replaceMergeMainTypeMap;xI(this),T(t,function(f,p){f!=null&&(St.hasClass(p)?p&&(s.push(p),l.set(p,!0)):i[p]=i[p]==null?tt(f):dt(i[p],f,!0))}),u&&u.each(function(f,p){St.hasClass(p)&&!l.get(p)&&(s.push(p),l.set(p,!0))}),St.topologicalTravel(s,St.getAllClassMainTypes(),c,this);function c(f){var p=wI(this,f,Ft(t[f])),h=n.get(f),d=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",v=Sd(h,p,d);XE(v,f,St),i[f]=null,n.set(f,null),o.set(f,0);var m=[],g=[],y=0,x,_;T(v,function(b,S){var w=b.existing,D=b.newOption;if(!D)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var C=f==="series",M=St.getClass(f,b.keyInfo.subType,!C);if(!M){if(0)var E,L;return}if(f==="tooltip"){if(x)return;x=!0}if(w&&w.constructor===M)w.name=b.keyInfo.name,w.mergeOption(D,this),w.optionUpdated(D,!1);else{var A=O({componentIndex:S},b.keyInfo);w=new M(D,this,this,A),O(w,A),b.brandNew&&(w.__requireNewView=!0),w.init(D,this,this),w.optionUpdated(null,!0)}}w?(m.push(w.option),g.push(w),y++):(m.push(void 0),g.push(void 0))},this),i[f]=m,n.set(f,g),o.set(f,y),f==="series"&&Pv(this)}this._seriesIndices||Pv(this)},e.prototype.getOption=function(){var t=tt(this.option);return T(t,function(a,i){if(St.hasClass(i)){for(var n=Ft(a),o=n.length,s=!1,l=o-1;l>=0;l--)n[l]&&!su(n[l])?s=!0:(n[l]=null,!s&&o--);n.length=o,t[i]=n}}),delete t[MI],t},e.prototype.setTheme=function(t){this._theme=new Mt(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,a){var i=this._componentsMap.get(t);if(i){var n=i[a||0];if(n)return n;if(a==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function WY(r,e){return r.join(",")===e.join(",")}var PI=UY;var Li=T,Bf=et,kI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function U_(r){var e=r&&r.itemStyle;if(e)for(var t=0,a=kI.length;t0?t[o-1].seriesModel:null)}),KY(t)}})}function KY(r){T(r,function(e,t){var a=[],i=[NaN,NaN],n=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(n,function(u,c,f){var p=o.get(e.stackedDimension,f);if(isNaN(p))return i;var h,d;s?d=o.getRawIndex(f):h=o.get(e.stackedByDimension,f);for(var v=NaN,m=t-1;m>=0;m--){var g=r[m];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,h)),d>=0){var y=g.data.getByRawIndex(g.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&p>=0&&y>0||l==="samesign"&&p<=0&&y<0){p=NE(p,y),v=y;break}}}return a[0]=p,a[1]=v,a})})}var Ov=(function(){function r(e){this.data=e.data||(e.sourceFormat===ca?{}:[]),this.sourceFormat=e.sourceFormat||V_,this.seriesLayoutBy=e.seriesLayoutBy||Vr,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var a=0;av&&(v=x)}h[0]=d,h[1]=v}},i=function(){return this._data?this._data.length/this._dimSize:0};HI=(e={},e[Ae+"_"+Vr]={pure:!0,appendData:n},e[Ae+"_"+un]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[or]={pure:!0,appendData:n},e[ca]={pure:!0,appendData:function(o){var s=this._data;T(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[er]={appendData:n},e[wa]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function n(o){for(var s=0;s=0&&(v=o.interpolatedValue[m])}return v!=null?v+"":""})}},r.prototype.getRawValue=function(e,t){return Gn(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,a){},r})();function $_(r){var e,t;return et(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Lo(r){return new i6(r)}var i6=(function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,a=e&&e.skip;if(this._dirty&&t){var i=this.context;i.data=i.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var n;this._plan&&!a&&(n=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(n="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||n==="reset")&&(this._dirty=!1,f=this._doReset(a)),this._modBy=l,this._modDataCount=u;var p=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,d=Math.min(p!=null?this._dueIndex+p:1/0,this._dueEnd);if(!a&&(f||h1&&a>0?s:o}};return n;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},o6=(function(){function r(e,t){if(!yt(t)){var a="";Ut(a)}this._opFn=XI[e],this._rvalFloat=Ha(t)}return r.prototype.evaluate=function(e){return yt(e)?this._opFn(e,this._rvalFloat):this._opFn(Ha(e),this._rvalFloat)},r})(),Fv=(function(){function r(e,t){var a=e==="desc";this._resultLT=a?1:-1,t==null&&(t=a?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var a=yt(e)?e:Ha(e),i=yt(t)?t:Ha(t),n=isNaN(a),o=isNaN(i);if(n&&(a=this._incomparable),o&&(i=this._incomparable),n&&o){var s=W(e),l=W(t);s&&(a=l?e:0),l&&(i=s?t:0)}return ai?-this._resultLT:0},r})();var s6=(function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ha(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var a=typeof e;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(t=Ha(e)===this._rvalFloat)}return this._isEQ?t:!t},r})();function qI(r,e){return r==="eq"||r==="ne"?new s6(r==="eq",e):it(XI,r)?new o6(r,e):null}var l6=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Ja(e,t)},r})();function u6(r,e){var t=new l6,a=r.data,i=t.sourceFormat=r.sourceFormat,n=r.startIndex,o="";r.seriesLayoutBy!==Vr&&Ut(o);var s=[],l={},u=r.dimensionsDefine;if(u)T(u,function(v,m){var g=v.name,y={index:m,name:g,displayName:v.displayName};if(s.push(y),g!=null){var x="";it(l,g)&&Ut(x),l[g]=y}});else for(var c=0;c65535?v6:m6}function Lu(){return[1/0,-1/0]}function g6(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function QI(r,e,t,a,i){var n=tP[t||"float"];if(i){var o=r[e],s=o&&o.length;if(s!==a){for(var l=new n(a),u=0;um[1]&&(m[1]=v)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,a){for(var i=this._provider,n=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=V(o,function(y){return y.property}),c=0;cg[1]&&(g[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,a=t[e];if(a!=null&&ae)n=o-1;else return o}return-1},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var a=t.constructor,i=this._count;if(a===Array){e=new a(i);for(var n=0;n=f&&y<=p||isNaN(y))&&(l[u++]=v),v++}d=!0}else if(n===2){for(var m=h[i[0]],x=h[i[1]],_=e[i[1]][0],b=e[i[1]][1],g=0;g=f&&y<=p||isNaN(y))&&(S>=_&&S<=b||isNaN(S))&&(l[u++]=v),v++}d=!0}}if(!d)if(n===1)for(var g=0;g=f&&y<=p||isNaN(y))&&(l[u++]=w)}else for(var g=0;ge[M][1])&&(D=!1)}D&&(l[u++]=t.getRawIndex(g))}return ug[1]&&(g[1]=m)}}}},r.prototype.lttbDownSample=function(e,t){var a=this.clone([e],!0),i=a._chunks,n=i[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,f,p,h=new(Au(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var d=1;dc&&(c=f,p=_)}E>0&&Es&&(v=s-c);for(var m=0;md&&(d=y,h=c+m)}var x=this.getRawIndex(f),_=this.getRawIndex(h);fc-d&&(l=c-d,s.length=l);for(var v=0;vf[1]&&(f[1]=g),p[h++]=y}return n._count=h,n._indices=p,n._updateGetRawIdx(),n},r.prototype.each=function(e,t){if(this._count)for(var a=e.length,i=this._chunks,n=0,o=this.count();nl&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var a=[],i=this._chunks,n=0;n=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function e(t,a,i,n){return Ja(t[n],this._dimensions[n])}J_={arrayRows:e,objectRows:function(t,a,i,n){return Ja(t[a],this._dimensions[n])},keyedColumns:e,original:function(t,a,i,n){var o=t&&(t.value==null?t:t.value);return Ja(o instanceof Array?o[n]:o,this._dimensions[n])},typedArray:function(t,a,i,n){return t[n]}}})(),r})(),Hf=y6;var Wv=(function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),a=!!t.length,i,n;if(Gv(e)){var o=e,s=void 0,l=void 0,u=void 0;if(a){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,n=[c._getVersionSign()]}else s=o.get("data",!0),l=Ne(s)?wa:er,n=[];var f=this._getSourceMetaRawOption()||{},p=u&&u.metaRawOption||{},h=Q(f.seriesLayoutBy,p.seriesLayoutBy)||null,d=Q(f.sourceHeader,p.sourceHeader),v=Q(f.dimensions,p.dimensions),m=h!==p.seriesLayoutBy||!!d!=!!p.sourceHeader||v;i=m?[Ff(s,{seriesLayoutBy:h,sourceHeader:d,dimensions:v},l)]:[]}else{var g=e;if(a){var y=this._applyTransform(t);i=y.sourceList,n=y.upstreamSignList}else{var x=g.get("source",!0);i=[Ff(x,this._getSourceMetaRawOption(),null)],n=[]}}this._setLocalSource(i,n)},r.prototype._applyTransform=function(e){var t=this._sourceHost,a=t.get("transform",!0),i=t.get("fromTransformResult",!0);if(i!=null){var n="";e.length!==1&&eP(n)}var o,s=[],l=[];return T(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&eP(f),s.push(c),l.push(u._getVersionSign())}),a?o=KI(a,s,{datasetIndex:t.componentIndex}):i!=null&&(o=[FI(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return T(r.blocks,function(i){var n=nP(i);n>=e&&(e=n+ +(a&&(!n||eb(i)&&!i.noHeader)))}),e}return 0}function S6(r,e,t,a){var i=e.noHeader,n=T6(nP(e)),o=[],s=e.blocks||[];ee(!s||z(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(it(u,l)){var c=new Fv(u[l],null);s.sort(function(v,m){return c.evaluate(v.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}T(s,function(v,m){var g=e.valueFormatter,y=iP(v)(g?O(O({},r),{valueFormatter:g}):r,v,m>0?n.html:0,a);y!=null&&o.push(y)});var f=r.renderMode==="richText"?o.join(n.richText):rb(a,o.join(""),i?t:n.html);if(i)return f;var p=xv(e.header,"ordinal",r.useUTC),h=aP(a,r.renderMode).nameStyle,d=rP(a);return r.renderMode==="richText"?oP(r,p,h)+n.richText+f:rb(a,'
'+We(p)+"
"+f,t)}function w6(r,e,t,a){var i=r.renderMode,n=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(_){return _=z(_)?_:[_],V(_,function(b,S){return xv(b,z(h)?h[S]:h,u)})};if(!(n&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||N.color.secondary,i),p=n?"":xv(l,"ordinal",u),h=e.valueType,d=o?[]:c(e.value,e.dataIndex),v=!s||!n,m=!s&&n,g=aP(a,i),y=g.nameStyle,x=g.valueStyle;return i==="richText"?(s?"":f)+(n?"":oP(r,p,y))+(o?"":M6(r,d,v,m,x)):rb(a,(s?"":f)+(n?"":D6(p,!s,y))+(o?"":C6(d,v,m,x)),t)}}function ab(r,e,t,a,i,n){if(r){var o=iP(r),s={useUTC:i,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,n)}}function T6(r){return{html:_6[r],richText:b6[r]}}function rb(r,e,t){var a='
',i="margin: "+t+"px 0 0",n=rP(r);return'
'+e+a+"
"}function D6(r,e,t){var a=e?"margin-left:2px":"";return''+We(r)+""}function C6(r,e,t,a){var i=t?"10px":"20px",n=e?"float:right;margin-left:"+i:"";return r=z(r)?r:[r],''+V(r,function(o){return We(o)}).join("  ")+""}function oP(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function M6(r,e,t,a,i){var n=[i],o=a?10:20;return t&&n.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(z(e)?e.join(" "):e,n)}function Yv(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return Mi(a)}function Zv(r,e){var t=r.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var Xv=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=bd()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,a){var i=a==="richText"?this._generateStyleName():null,n=cI({color:t,type:e,renderMode:a,markerId:i});return W(n)?n:(this.richTextStyles[i]=n.style,n.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};z(t)?T(t,function(n){return O(a,n)}):O(a,t);var i=this._generateStyleName();return this.richTextStyles[i]=a,"{"+i+"|"+e+"}"},r})();function qv(r){var e=r.series,t=r.dataIndex,a=r.multipleSeries,i=e.getData(),n=i.mapDimensionsAll("defaultedTooltip"),o=n.length,s=e.getRawValue(t),l=z(s),u=Yv(e,t),c,f,p,h;if(o>1||l&&!o){var d=E6(s,e,t,n,u);c=d.inlineValues,f=d.inlineValueTypes,p=d.blocks,h=d.inlineValues[0]}else if(o){var v=i.getDimensionInfo(n[0]);h=c=Gn(i,t,n[0]),f=v.type}else h=c=l?s[0]:s;var m=lu(e),g=m&&e.name||"",y=i.getName(t),x=a?g:y;return re("section",{header:g,noHeader:a||!m,sortParam:h,blocks:[re("nameValue",{markerType:"item",markerColor:u,name:x,noName:!Be(x),value:c,valueType:f,dataIndex:t})].concat(p||[])})}function E6(r,e,t,a,i){var n=e.getData(),o=cr(r,function(f,p,h){var d=n.getDimensionInfo(h);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];a.length?T(a,function(f){c(Gn(n,t,f),f)}):T(r,c);function c(f,p){var h=n.getDimensionInfo(p);!h||h.otherDims.tooltip===!1||(o?u.push(re("nameValue",{markerType:"subItem",markerColor:i,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Io=ot();function jv(r,e){return r.getName(e)||r.getId(e)}var Gf="__universalTransitionEnabled",$v=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,a,i){this.seriesIndex=this.componentIndex,this.dataTask=Lo({count:L6,reset:I6}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i);var n=Io(this).sourceManager=new Wv(this);n.prepareSource();var o=this.getInitialData(t,i);lP(o,this),this.dataTask.context.data=o,Io(this).dataBeforeProcessed=o,sP(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,a){var i=Eo(this),n=i?la(t):{},o=this.subType;St.hasClass(o)&&(o+="Series"),dt(t,a.getTheme().get(this.subType)),dt(t,this.getDefaultOption()),ba(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&mr(t,n,i)},e.prototype.mergeOption=function(t,a){t=dt(this.option,t,!0),this.fillDataTextStyle(t.data);var i=Eo(this);i&&mr(this.option,t,i);var n=Io(this).sourceManager;n.dirty(),n.prepareSource();var o=this.getInitialData(t,a);lP(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Io(this).dataBeforeProcessed=o,sP(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Ne(t))for(var a=["show"],i=0;i=0&&p<0)&&(f=y,p=g,h=0),g===p&&(c[h++]=v))}),c.length=h,c},e.prototype.formatTooltip=function(t,a,i){return qv({series:this,dataIndex:t,multipleSeries:a})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(Lt.node&&!(t&&t.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,a,i){var n=this.ecModel,o=Nf.prototype.getColorFromPalette.call(this,t,a,i);return o||(o=n.getColorFromPalette(t,a,i)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,a){this._innerSelect(this.getData(a),t)},e.prototype.unselect=function(t,a){var i=this.option.selectedMap;if(i){var n=this.option.selectedMode,o=this.getData(a);if(n==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(t,a){var i=this.option.selectedMap;if(!i)return!1;var n=this.getData(a);return(i==="all"||i[jv(n,t)])&&!n.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Gf])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,a){var i,n,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){et(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(t,a)}},e.registerClass=function(t){return St.registerClass(t)},e.protoInitialize=(function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"})(),e})(St);Jt($v,cl);Jt($v,Nf);Dd($v,St);function sP(r){var e=r.name;lu(r)||(r.name=A6(r)||e)}function A6(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),a=[];return T(t,function(i){var n=e.getDimensionInfo(i);n.displayName&&a.push(n.displayName)}),a.join(" ")}function L6(r){return r.model.getRawData().count()}function I6(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),P6}function P6(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function lP(r,e){T(Dn(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,ut(k6,e))})}function k6(r,e){var t=ib(r);return t&&t.setOutputEnd((e||this).count()),e}function ib(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var a=t.currentTask;if(a){var i=a.agentStubMap;i&&(a=i.get(r.uid))}return a}}var Nt=$v;var nb=(function(){function r(){this.group=new K,this.uid=$a("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,i){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,i){},r.prototype.updateLayout=function(e,t,a,i){},r.prototype.updateVisual=function(e,t,a,i){},r.prototype.toggleBlurSeries=function(e,t,a){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r})();uu(nb);xo(nb);var Ot=nb;function Ta(){var r=ot();return function(e){var t=r(e),a=e.pipelineContext,i=!!t.large,n=!!t.progressiveRender,o=t.large=!!(a&&a.large),s=t.progressiveRender=!!(a&&a.progressiveRender);return(i!==o||n!==s)&&"reset"}}var fP=ot(),R6=Ta(),ob=(function(){function r(){this.group=new K,this.uid=$a("viewChart"),this.renderTask=Lo({plan:N6,reset:O6}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,i){},r.prototype.highlight=function(e,t,a,i){var n=e.getData(i&&i.dataType);n&&cP(n,i,"emphasis")},r.prototype.downplay=function(e,t,a,i){var n=e.getData(i&&i.dataType);n&&cP(n,i,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.updateLayout=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.updateVisual=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.eachRendered=function(e){zr(this.group,e)},r.markUpdateMethod=function(e,t){fP(e).updateMethod=t},r.protoInitialize=(function(){var e=r.prototype;e.type="chart"})(),r})();function uP(r,e,t){r&&Do(r)&&(e==="emphasis"?Tr:Dr)(r,t)}function cP(r,e,t){var a=Ga(r,e),i=e&&e.highlightKey!=null?nL(e.highlightKey):null;a!=null?T(Ft(a),function(n){uP(r.getItemGraphicEl(n),t,i)}):r.eachItemGraphicEl(function(n){uP(n,t,i)})}uu(ob,["dispose"]);xo(ob);function N6(r){return R6(r.model)}function O6(r){var e=r.model,t=r.ecModel,a=r.api,i=r.payload,n=e.pipelineContext.progressiveRender,o=r.view,s=i&&fP(i).updateMethod,l=n?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,a,i),z6[l]}var z6={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Pt=ob;var Kv="\0__throttleOriginMethod",pP="\0__throttleRate",hP="\0__throttleType";function Wf(r,e,t){var a,i=0,n=0,o=null,s,l,u,c;e=e||0;function f(){n=new Date().getTime(),o=null,r.apply(l,u||[])}var p=function(){for(var h=[],d=0;d=0?f():o=setTimeout(f,-s),i=a};return p.clear=function(){o&&(clearTimeout(o),o=null)},p.debounceNextCall=function(h){c=h},p}function Qa(r,e,t,a){var i=r[e];if(i){var n=i[Kv]||i,o=i[hP],s=i[pP];if(s!==t||o!==a){if(t==null||!a)return r[e]=n;i=r[e]=Wf(n,t,a==="debounce"),i[Kv]=n,i[hP]=a,i[pP]=t}return i}}function Wn(r,e){var t=r[e];t&&t[Kv]&&(t.clear&&t.clear(),r[e]=t[Kv])}var dP=ot(),vP={itemStyle:ra(m_,!0),lineStyle:ra(v_,!0)},V6={lineStyle:"stroke",itemStyle:"fill"};function mP(r,e){var t=r.visualStyleMapper||vP[e];return t||(console.warn("Unknown style type '"+e+"'."),vP.itemStyle)}function gP(r,e){var t=r.visualDrawType||V6[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var yP={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",i=r.getModel(a),n=mP(r,a),o=n(i),s=i.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=gP(r,a),u=o[l],c=$(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var p=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=p,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||$(o.fill)?p:o.fill,o.stroke=o.stroke==="auto"||$(o.stroke)?p:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,d){var v=r.getDataParams(d),m=O({},o);m[l]=c(v),h.setItemVisual(d,"style",m)}}}},Yf=new Mt,xP={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",i=mP(r,a),n=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){Yf.option=l[a];var u=i(Yf),c=o.ensureUniqueItemVisual(s,"style");O(c,u),Yf.option.decal&&(o.setItemVisual(s,"decal",Yf.option.decal),Yf.option.decal.dirty=!0),n in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},_P={performRawSeries:!0,overallReset:function(r){var e=q();r.eachSeries(function(t){var a=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+a,n=e.get(i);n||(n={},e.set(i,n)),dP(t).scope=n}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var a=t.getRawData(),i={},n=t.getData(),o=dP(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=gP(t,s);n.each(function(u){var c=n.getRawIndex(u);i[c]=u}),a.each(function(u){var c=i[u],f=n.getItemVisual(c,"colorFromPalette");if(f){var p=n.ensureUniqueItemVisual(c,"style"),h=a.getName(u)||u+"",d=a.count();p[l]=t.getColorFromPalette(h,o,d)}})}})}};var Qv=Math.PI;function sb(r,e){e=e||{},J(e,{text:"loading",textColor:N.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:N.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new K,a=new ht({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(a);var i=new Dt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),n=new ht({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(n);var o;return e.showSpinner&&(o=new Af({shape:{startAngle:-Qv/2,endAngle:-Qv/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Qv*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qv*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),n.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var B6=(function(){function r(e,t,a,i){this._stageTaskMap=q(),this.ecInstance=e,this.api=t,a=this._dataProcessorHandlers=a.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=a.concat(i)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(a){var i=a.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var a=this._pipelineMap.get(e.__pipeline.id),i=a.context,n=!t&&a.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>a.blockIndex,o=n?a.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var a=this._pipelineMap.get(e.uid),i=e.getData(),n=i.count(),o=a.progressiveEnabled&&t.incrementalPrepareRender&&n>=a.threshold,s=e.get("large")&&n>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?n:null;e.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,a=t._pipelineMap=q();e.eachSeries(function(i){var n=i.getProgressive(),o=i.uid;a.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:n&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),t._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),a=this.api;T(this._allHandlers,function(i){var n=e.get(i.uid)||e.set(i.uid,{}),o="";ee(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,n,t,a),i.overallReset&&this._createOverallStageTask(i,n,t,a)},this)},r.prototype.prepareView=function(e,t,a,i){var n=e.renderTask,o=n.context;o.model=t,o.ecModel=a,o.api=i,n.__block=!e.incrementalPrepareRender,this._pipe(t,n)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,a){this._performStageTasks(this._visualHandlers,e,t,a)},r.prototype._performStageTasks=function(e,t,a,i){i=i||{};var n=!1,o=this;T(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,p=c.overallTask;if(p){var h,d=p.agentStubMap;d.each(function(m){s(i,m)&&(m.dirty(),h=!0)}),h&&p.dirty(),o.updatePayload(p,a);var v=o.getPerformArgs(p,i.block);d.each(function(m){m.perform(v)}),p.perform(v)&&(n=!0)}else f&&f.each(function(m,g){s(i,m)&&m.dirty();var y=o.getPerformArgs(m,i.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(m.context.model),o.updatePayload(m,a),m.perform(y)&&(n=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=n||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(a){t=a.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,a,i){var n=this,o=t.seriesTaskMap,s=t.seriesTaskMap=q(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(c):l?a.eachRawSeriesByType(l,c):u&&u(a,i).each(c);function c(f){var p=f.uid,h=s.set(p,o&&o.get(p)||Lo({plan:W6,reset:Y6,count:X6}));h.context={model:f,ecModel:a,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:n},n._pipe(f,h)}},r.prototype._createOverallStageTask=function(e,t,a,i){var n=this,o=t.overallTask=t.overallTask||Lo({reset:U6});o.context={ecModel:a,api:i,overallReset:e.overallReset,scheduler:n};var s=o.agentStubMap,l=o.agentStubMap=q(),u=e.seriesType,c=e.getTargetSeries,f=!0,p=!1,h="";ee(!e.createOnAllSeries,h),u?a.eachRawSeriesByType(u,d):c?c(a,i).each(d):(f=!1,T(a.getSeries(),d));function d(v){var m=v.uid,g=l.set(m,s&&s.get(m)||(p=!0,Lo({reset:F6,onDirty:G6})));g.context={model:v,overallProgress:f},g.agent=o,g.__block=f,n._pipe(v,g)}p&&o.dirty()},r.prototype._pipe=function(e,t){var a=e.uid,i=this._pipelineMap.get(a);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},r.wrapStageHandler=function(e,t){return $(e)&&(e={overallReset:e,seriesType:q6(e)}),e.uid=$a("stageHandler"),t&&(e.visualType=t),e},r})();function U6(r){r.overallReset(r.ecModel,r.api,r.payload)}function F6(r){return r.overallProgress&&H6}function H6(){this.agent.dirty(),this.getDownstream().dirty()}function G6(){this.agent&&this.agent.dirty()}function W6(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function Y6(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Ft(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?V(e,function(t,a){return bP(a)}):Z6}var Z6=bP(0);function bP(r){return function(e,t){var a=t.data,i=t.resetDefines[r];if(i&&i.dataEach)for(var n=e.start;n0&&h===u.length-p.length){var d=u.slice(0,h);d!=="data"&&(t.mainType=d,t[p.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(a[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:t,dataQuery:a,otherQuery:i}},r.prototype.filter=function(e,t){var a=this.eventInfo;if(!a)return!0;var i=a.targetEl,n=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,n,"name")&&c(u,n,"dataIndex")&&c(u,n,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,i,n));function c(f,p,h,d){return f[h]==null||p[d||h]===f[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})();var ub=["symbol","symbolSize","symbolRotate","symbolOffset"],EP=ub.concat(["symbolKeepAspect"]),AP={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},i={},n=!1,o=0;o=0&&fl(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function $f(r,e,t){for(var a=e.type==="radial"?l8(r,e,t):s8(r,e,t),i=e.colorStops,n=0;n0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:yt(r)?[r]:z(r)?r:null}function Kf(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&u8(e.lineDash,e.lineWidth),a=e.lineDashOffset;if(t){var i=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(t=V(t,function(n){return n/i}),a/=i)}return[t,a]}var c8=new tr(!0);function am(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function NP(r){return typeof r=="string"&&r!=="none"}function im(r){var e=r.fill;return e!=null&&e!=="none"}function OP(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function zP(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function nm(r,e,t){var a=mf(e.image,e.__image,t);if(cu(a)){var i=r.createPattern(a,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var n=new DOMMatrix;n.translateSelf(e.x||0,e.y||0),n.rotateSelf(0,0,(e.rotation||0)*Zl),n.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(n)}return i}}function f8(r,e,t,a){var i,n=am(t),o=im(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||c8,f=e.__dirty;if(!a){var p=t.fill,h=t.stroke,d=o&&!!p.colorStops,v=n&&!!h.colorStops,m=o&&!!p.image,g=n&&!!h.image,y=void 0,x=void 0,_=void 0,b=void 0,S=void 0;(d||v)&&(S=e.getBoundingRect()),d&&(y=f?$f(r,p,S):e.__canvasFillGradient,e.__canvasFillGradient=y),v&&(x=f?$f(r,h,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=x),m&&(_=f||!e.__canvasFillPattern?nm(r,p,e):e.__canvasFillPattern,e.__canvasFillPattern=_),g&&(b=f||!e.__canvasStrokePattern?nm(r,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),d?r.fillStyle=y:m&&(_?r.fillStyle=_:o=!1),v?r.strokeStyle=x:g&&(b?r.strokeStyle=b:n=!1)}var w=e.getGlobalScale();c.setScale(w[0],w[1],e.segmentIgnoreThreshold);var D,C;r.setLineDash&&t.lineDash&&(i=Kf(e),D=i[0],C=i[1]);var M=!0;(u||f&co)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),M=!1),c.reset(),e.buildPath(c,e.shape,a),c.toStatic(),e.pathUpdated()),M&&c.rebuildPath(r,l?s:1),D&&(r.setLineDash(D),r.lineDashOffset=C),a||(t.strokeFirst?(n&&zP(r,t),o&&OP(r,t)):(o&&OP(r,t),n&&zP(r,t))),D&&r.setLineDash([])}function p8(r,e,t){var a=e.__image=mf(t.image,e.__image,e,e.onload);if(!(!a||!cu(a))){var i=t.x||0,n=t.y||0,o=e.getWidth(),s=e.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(a,u,c,t.sWidth,t.sHeight,i,n,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,p=s-c;r.drawImage(a,u,c,f,p,i,n,o,s)}else r.drawImage(a,i,n,o,s)}}function h8(r,e,t){var a,i=t.text;if(i!=null&&(i+=""),i){r.font=t.font||qr,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var n=void 0,o=void 0;r.setLineDash&&t.lineDash&&(a=Kf(e),n=a[0],o=a[1]),n&&(r.setLineDash(n),r.lineDashOffset=o),t.strokeFirst?(am(t)&&r.strokeText(i,t.x,t.y),im(t)&&r.fillText(i,t.x,t.y)):(im(t)&&r.fillText(i,t.x,t.y),am(t)&&r.strokeText(i,t.x,t.y)),n&&r.setLineDash([])}}var VP=["shadowBlur","shadowOffsetX","shadowOffsetY"],BP=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function YP(r,e,t,a,i){var n=!1;if(!a&&(t=t||{},e===t))return!1;if(a||e.opacity!==t.opacity){fa(r,i),n=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Ki.opacity:o}(a||e.blend!==t.blend)&&(n||(fa(r,i),n=!0),r.globalCompositeOperation=e.blend||Ki.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,a,i){if(!this[je]){if(this._disposed){this.id;return}var n,o,s;if(et(a)&&(i=a.lazyUpdate,n=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[je]=!0,Ru(this),!this._model||a){var l=new PI(this._api),u=this._theme,c=this._model=new kv;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Sb);var f={seriesTransition:s,optionChanged:!0};if(i)this[sr]={silent:n,updateParams:f},this[je]=!1,this.getZr().wakeUp();else{try{pl(this),Yn.update.call(this,null,f)}catch(p){throw this[sr]=null,this[je]=!1,p}this._ssr||this._zr.flush(),this[sr]=null,this[je]=!1,Pu.call(this,n),ku.call(this,n)}}},e.prototype.setTheme=function(t,a){if(!this[je]){if(this._disposed){this.id;return}var i=this._model;if(i){var n=a&&a.silent,o=null;this[sr]&&(n==null&&(n=this[sr].silent),o=this[sr].updateParams,this[sr]=null),this[je]=!0,Ru(this);try{this._updateTheme(t),i.setTheme(this._theme),pl(this),Yn.update.call(this,{type:"setTheme"},o)}catch(s){throw this[je]=!1,s}this[je]=!1,Pu.call(this,n),ku.call(this,n)}}},e.prototype._updateTheme=function(t){W(t)&&(t=Tk[t]),t&&(t=tt(t),t&&Nv(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Lt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var a=this._zr.painter;return a.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,a=t.storage.getDisplayList();return T(a,function(i){i.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var a=t.excludeComponents,i=this._model,n=[],o=this;T(a,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(n.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return T(n,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var a=t.type==="svg",i=this.group,n=Math.min,o=Math.max,s=1/0;if(fk[i]){var l=s,u=s,c=-s,f=-s,p=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();T(Qf,function(x,_){if(x.group===i){var b=a?x.getZr().painter.getSvgDom().innerHTML:x.renderToCanvas(tt(t)),S=x.getDom().getBoundingClientRect();l=n(S.left,l),u=n(S.top,u),c=o(S.right,c),f=o(S.bottom,f),p.push({dom:b,left:S.left,top:S.top})}}),l*=h,u*=h,c*=h,f*=h;var d=c-l,v=f-u,m=Ke.createCanvas(),g=hx(m,{renderer:a?"svg":"canvas"});if(g.resize({width:d,height:v}),a){var y="";return T(p,function(x){var _=x.left-l,b=x.top-u;y+=''+x.dom+""}),g.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new ht({shape:{x:0,y:0,width:d,height:v},style:{fill:t.connectedBackgroundColor}})),T(p,function(x){var _=new se({style:{x:x.left*h-l,y:x.top*h-u,image:x.dom}});g.add(_)}),g.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,a,i){return um(this,"convertToPixel",t,a,i)},e.prototype.convertToLayout=function(t,a,i){return um(this,"convertToLayout",t,a,i)},e.prototype.convertFromPixel=function(t,a,i){return um(this,"convertFromPixel",t,a,i)},e.prototype.containPixel=function(t,a){if(this._disposed){this.id;return}var i=this._model,n,o=ji(i,t);return T(o,function(s,l){l.indexOf("Models")>=0&&T(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)n=n||!!c.containPoint(a);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(n=n||f.containPoint(a,u))}},this)},this),!!n},e.prototype.getVisual=function(t,a){var i=this._model,n=ji(i,t,{defaultMainType:"series"}),o=n.seriesModel,s=o.getData(),l=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?s.indexOfRawIndex(n.dataIndex):null;return l!=null?qf(s,l,a):cn(s,a)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;T(N8,function(i){var n=function(o){var s=t.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Ii(l,function(v){var m=nt(v);if(m&&m.dataIndex!=null){var g=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=g&&g.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=O({},m.eventData),!0},!0),u){var f=u.componentType,p=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",p=u.seriesIndex);var h=f&&p!=null&&s.getComponent(f,p),d=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];u.event=o,u.type=i,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:d},t.trigger(i,u)}};n.zrEventfulCallAtLast=!0,t._zr.on(i,n,t)});var a=this._messageCenter;T(_b,function(i,n){a.on(n,function(o){t.trigger(n,o)})}),IP(a,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&_x(this.getDom(),Cb,"");var a=this,i=a._api,n=a._model;T(a._componentsViews,function(o){o.dispose(n,i)}),T(a._chartsViews,function(o){o.dispose(n,i)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete Qf[a.id]},e.prototype.resize=function(t){if(!this[je]){if(this._disposed){this.id;return}this._zr.resize(t);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var i=a.resetOption("media"),n=t&&t.silent;this[sr]&&(n==null&&(n=this[sr].silent),i=!0,this[sr]=null),this[je]=!0,Ru(this);try{i&&pl(this),Yn.update.call(this,{type:"resize",animation:O({duration:0},t&&t.animation)})}catch(o){throw this[je]=!1,o}this[je]=!1,Pu.call(this,n),ku.call(this,n)}}},e.prototype.showLoading=function(t,a){if(this._disposed){this.id;return}if(et(t)&&(a=t,t=""),t=t||"default",this.hideLoading(),!!wb[t]){var i=wb[t](this._api,a),n=this._zr;this._loadingFX=i,n.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var a=O({},t);return a.type=xb[t.type],a},e.prototype.dispatchAction=function(t,a){if(this._disposed){this.id;return}if(et(a)||(a={silent:!!a}),!!fm[t.type]&&this._model){if(this[je]){this._pendingActions.push(t);return}var i=a.silent;gb.call(this,t,i);var n=a.flush;n?this._zr.flush():n!==!1&&Lt.browser.weChat&&this._throttledZrFlush(),Pu.call(this,i),ku.call(this,i)}},e.prototype.updateLabelLayout=function(){ti.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var a=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(a);n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){pl=function(f){var p=f._scheduler;p.restorePipelines(f._model),p.prepareStageTasks(),vb(f,!0),vb(f,!1),p.plan()},vb=function(f,p){for(var h=f._model,d=f._scheduler,v=p?f._componentsViews:f._chartsViews,m=p?f._componentsMap:f._chartsMap,g=f._zr,y=f._api,x=0;xp.get("hoverLayerThreshold")&&!Lt.node&&!Lt.worker&&p.eachSeries(function(m){if(!m.preventUsingHoverLayer){var g=f._chartsMap[m.__viewId];g.__alive&&g.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function s(f,p){var h=f.get("blendMode")||null;p.eachRendered(function(d){d.isGroup||(d.style.blend=h)})}function l(f,p){if(!f.preventAutoZ){var h=ja(f);p.eachRendered(function(d){return Js(d,h.z,h.zlevel),!0})}}function u(f,p){p.eachRendered(function(h){if(!Nn(h)){var d=h.getTextContent(),v=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function c(f,p){var h=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),v=h.get("duration"),m=v>0?{duration:v,delay:h.get("delay"),easing:h.get("easing")}:null;p.eachRendered(function(g){if(g.states&&g.states.emphasis){if(Nn(g))return;if(g instanceof ft&&oL(g),g.__dirty){var y=g.prevStates;y&&g.useStates(y)}if(d){g.stateTransition=m;var x=g.getTextContent(),_=g.getTextGuideLine();x&&(x.stateTransition=m),_&&(_.stateTransition=m)}g.__dirty&&n(g)}})}uk=function(f){return new((function(p){I(h,p);function h(){return p!==null&&p.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(d){for(;d;){var v=d.__ecComponentInfo;if(v!=null)return f._model.getComponent(v.mainType,v.index);d=d.parent}},h.prototype.enterEmphasis=function(d,v){Tr(d,v),ei(f)},h.prototype.leaveEmphasis=function(d,v){Dr(d,v),ei(f)},h.prototype.enterBlur=function(d){Od(d),ei(f)},h.prototype.leaveBlur=function(d){Tf(d),ei(f)},h.prototype.enterSelect=function(d){jx(d),ei(f)},h.prototype.leaveSelect=function(d){$x(d),ei(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},h.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},h.prototype.getMainProcessVersion=function(){return f[sm]},h})(Rv))(f)},Sk=function(f){function p(h,d){for(var v=0;v=0)){pk.push(t);var n=lb.wrapStageHandler(t,i);n.__prio=e,n.__raw=t,r.push(n)}}function Ib(r,e){wb[r]=e}function Lk(r,e,t){var a=tk("registerMap");a&&a(r,e,t)}var Ik=$I;Ro(Tb,yP);Ro(hm,xP);Ro(hm,_P);Ro(Tb,AP);Ro(hm,LP);Ro(vk,pb);Eb(Nv);Ab(T8,G_);Ib("default",sb);Br({type:To,event:To,update:To},ie);Br({type:bf,event:bf,update:bf},ie);Br({type:Sf,event:Rd,update:Sf,action:ie,refineEvent:Pb,publishNonRefinedEvent:!0});Br({type:kd,event:Rd,update:kd,action:ie,refineEvent:Pb,publishNonRefinedEvent:!0});Br({type:wf,event:Rd,update:wf,action:ie,refineEvent:Pb,publishNonRefinedEvent:!0});function Pb(r,e,t,a){return{eventContent:{selected:aL(t),isFromClick:e.isFromClick||!1}}}Dk("default",{});Dk("dark",CP);var Pk=[],z8={registerPreprocessor:Eb,registerProcessor:Ab,registerPostInit:Ck,registerPostUpdate:Mk,registerUpdateLifecycle:dm,registerAction:Br,registerCoordinateSystem:Ek,registerLayout:Ak,registerVisual:Ro,registerTransform:Ik,registerLoading:Ib,registerMap:Lk,registerImpl:QP,PRIORITY:mk,ComponentModel:St,ComponentView:Ot,SeriesModel:Nt,ChartView:Pt,registerComponentModel:function(r){St.registerClass(r)},registerComponentView:function(r){Ot.registerClass(r)},registerSeriesModel:function(r){Nt.registerClass(r)},registerChartView:function(r){Pt.registerClass(r)},registerCustomSeries:function(r,e){rk(r,e)},registerSubTypeDefaulter:function(r,e){St.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){AE(r,e)}};function Tt(r){if(z(r)){T(r,function(e){Tt(e)});return}lt(Pk,r)>=0||(Pk.push(r),$(r)&&(r={install:r}),r.install(z8))}function tp(r){return r==null?0:r.length||1}function kk(r){return r}var V8=(function(){function r(e,t,a,i,n,o){this._old=e,this._new=t,this._oldKeyGetter=a||kk,this._newKeyGetter=i||kk,this.context=n,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,a={},i=new Array(e.length),n=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,a,n,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(c,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(n,a)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,a={},i={},n=[],o=[];this._initIndexMap(e,a,n,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var s=0;s1&&p===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&p>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&p===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&p>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var h=0;h1)for(var s=0;s30}var ep=et,No=V,W8=typeof Int32Array=="undefined"?Array:Int32Array,Y8="e\0\0",Nk=-1,Z8=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],X8=["_approximateExtent"],Ok,gm,rp,ap,Vb,ip,Bb,q8=(function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var a,i=!1;mm(e)?(a=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,a=e),a=a||["x","y"];for(var n={},o=[],s={},l=!1,u={},c=0;c=t)){var a=this._store,i=a.getProvider();this._updateOrdinalMeta();var n=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===er;if(l&&!i.pure)for(var u=[],c=e;c0},r.prototype.ensureUniqueItemVisual=function(e,t){var a=this._itemVisuals,i=a[e];i||(i=a[e]={});var n=i[t];return n==null&&(n=this.getVisual(t),z(n)?n=n.slice():ep(n)&&(n=O({},n)),i[t]=n),n},r.prototype.setItemVisual=function(e,t,a){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,ep(t)?O(i,t):i[t]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){ep(e)?O(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,a){this._itemLayouts[e]=a?O(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var a=this.hostModel&&this.hostModel.seriesIndex;xf(a,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){T(this._graphicEls,function(a,i){a&&e&&e.call(t,a,i)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:No(this.dimensions,this._getDimInfo,this),this.hostModel)),Vb(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var a=this[e];$(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=a.apply(this,arguments);return t.apply(this,[i].concat(Ih(arguments)))})},r.internalField=(function(){Ok=function(e){var t=e._invertedIndicesMap;T(t,function(a,i){var n=e._dimInfos[i],o=n.ordinalMeta,s=e._store;if(o){a=t[i]=new W8(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[t]=l}}})(),r})(),we=q8;function Ri(r,e){Mu(r)||(r=Eu(r)),e=e||{};var t=e.coordDimensions||[],a=e.dimensionsDefine||r.dimensionsDefine||[],i=q(),n=[],o=$8(r,t,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&zb(o),l=a===r.dimensionsDefine,u=l?Ob(r):Nb(a),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=q(c),p=new Q_(o),h=0;h0&&(a.name=i+(n-1)),n++,e.set(i,n)}}function $8(r,e,t,a){var i=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,a||0);return T(e,function(n){var o;et(n)&&(o=n.dimsDef)&&(i=Math.max(i,o.length))}),i}function K8(r,e,t){if(t||e.hasKey(r)){for(var a=0;e.hasKey(r+a);)a++;r+=a}return e.set(r,!0),r}var J8=(function(){function r(e){this.coordSysDims=[],this.axisMap=q(),this.categoryAxisMap=q(),this.coordSysName=e}return r})();function zk(r){var e=r.get("coordinateSystem"),t=new J8(e),a=Q8[e];if(a)return a(r,t,t.axisMap,t.categoryAxisMap),t}var Q8={cartesian2d:function(r,e,t,a){var i=r.getReferringComponents("xAxis",Yt).models[0],n=r.getReferringComponents("yAxis",Yt).models[0];e.coordSysDims=["x","y"],t.set("x",i),t.set("y",n),Ou(i)&&(a.set("x",i),e.firstCategoryDimIndex=0),Ou(n)&&(a.set("y",n),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,a){var i=r.getReferringComponents("singleAxis",Yt).models[0];e.coordSysDims=["single"],t.set("single",i),Ou(i)&&(a.set("single",i),e.firstCategoryDimIndex=0)},polar:function(r,e,t,a){var i=r.getReferringComponents("polar",Yt).models[0],n=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",n),t.set("angle",o),Ou(n)&&(a.set("radius",n),e.firstCategoryDimIndex=0),Ou(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,a){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,a){var i=r.ecModel,n=i.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=n.dimensions.slice();T(n.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];t.set(c,u),Ou(u)&&(a.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(r,e,t,a){var i=r.getReferringComponents("matrix",Yt).models[0];e.coordSysDims=["x","y"];var n=i.getDimensionModel("x"),o=i.getDimensionModel("y");t.set("x",n),t.set("y",o),a.set("x",n),a.set("y",o)}};function Ou(r){return r.get("type")==="category"}function Vk(r,e,t){t=t||{};var a=t.byIndex,i=t.stackedCoordDimension,n,o,s;tZ(e)?n=e:(o=e.schema,n=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,p;if(T(n,function(y,x){W(y)&&(n[x]=y={name:y}),l&&!y.isExtraCoord&&(!a&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!a&&!u&&(a=!0),c){f="__\0ecstackresult_"+r.id,p="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,d=c.type,v=0;T(n,function(y){y.coordDim===h&&v++});var m={name:f,coordDim:h,coordDimIndex:v,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length},g={name:p,coordDim:p,coordDimIndex:v+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(p,d),g.storeDimIndex=s.ensureCalculationDimension(f,d)),o.appendCalculationDimension(m),o.appendCalculationDimension(g)):(n.push(m),n.push(g))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:p,stackResultDimension:f}}function tZ(r){return!mm(r.schema)}function Ca(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function ym(r,e){return Ca(r,e)?r.getCalculationInfo("stackResultDimension"):e}function eZ(r,e){var t=r.get("coordinateSystem"),a=Fn.get(t),i;return e&&e.coordSysDims&&(i=V(e.coordSysDims,function(n){var o={name:n},s=e.axisMap.get(n);if(s){var l=s.get("type");o.type=hl(l)}return o})),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),i}function rZ(r,e,t){var a,i;return t&&T(r,function(n,o){var s=n.coordDim,l=t.categoryAxisMap.get(s);l&&(a==null&&(a=o),n.ordinalMeta=l.getOrdinalMeta(),e&&(n.createInvertedIndices=!0)),n.otherDims.itemName!=null&&(i=!0)}),!i&&a!=null&&(r[a].otherDims.itemName=0),a}function aZ(r,e,t){t=t||{};var a=e.getSourceManager(),i,n=!1;r?(n=!0,i=Eu(r)):(i=a.getSource(),n=i.sourceFormat===er);var o=zk(e),s=eZ(e,o),l=t.useEncodeDefaulter,u=$(l)?l:l?ut(Av,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!n},f=Ri(i,c),p=rZ(f.dimensions,t.createInvertedIndices,o),h=n?null:a.getSharedDataStore(f),d=Vk(e,{schema:f,store:h}),v=new we(f,e);v.setCalculationInfo(d);var m=p!=null&&iZ(i)?function(g,y,x,_){return _===p?x:this.defaultDimValueGetter(g,y,x,_)}:null;return v.hasItemOption=!1,v.initData(n?i:h,null,m),v}function iZ(r){if(r.sourceFormat===er){var e=nZ(r.data||[]);return!z(bi(e))}}function nZ(r){for(var e=0;ei&&(o=n.interval=i);var s=n.intervalPrecision=Oo(o),l=n.niceTickExtent=[oe(Math.ceil(r[0]/o)*o,s),oe(Math.floor(r[1]/o)*o,s)];return oZ(l,r),n}function xm(r){var e=Math.pow(10,yd(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,oe(t*e)}function Oo(r){return kr(r)+2}function Bk(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function oZ(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),Bk(r,0,e),Bk(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function zu(r,e){return r>=e[0]&&r<=e[1]}var Gk=(function(){function r(){this.normalize=Uk,this.scale=Fk}return r.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=Z(e.normalize,e),this.scale=Z(e.scale,e)):(this.normalize=Uk,this.scale=Fk)},r})();function Uk(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function Fk(r,e){return r*(e[1]-e[0])+e[0]}function op(r,e,t){var a=Math.log(r);return[Math.log(t?e[0]:Math.max(0,e[0]))/a,Math.log(t?e[1]:Math.max(0,e[1]))/a]}var Wk=(function(){function r(e){this._calculator=new Gk,this._setting=e||{},this._extent=[1/0,-1/0];var t=me();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]t[1]?e[1]:t[1])},r.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},r.prototype._innerSetExtent=function(e,t){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(t)||(a[1]=t),this._brkCtx&&this._brkCtx.update(a)},r.prototype.setBreaksFromOption=function(e){var t=me();t&&this._innerSetBreak(t.parseAxisBreakOption(e,Z(this.parse,this)))},r.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r})();xo(Wk);var ri=Wk;var sZ=0,lZ=(function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++sZ,this._onCollect=e.onCollect}return r.createByAxisModel=function(e){var t=e.option,a=t.data,i=a&&V(a,uZ);return new r({categories:i,needCollect:!i,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,a=this._needCollect;if(!W(e)&&!a)return e;if(a&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var i=this._getOrCreateMap();return t=i.get(e),t==null&&(a?(t=this.categories.length,this.categories[t]=e,i.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=q(this.categories))},r})();function uZ(r){return et(r)&&r.value!=null?r.value:r+""}var zo=lZ;var Yk=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;a.type="ordinal";var i=a.getSetting("ordinalMeta");return i||(i=new zo({})),z(i)&&(i=new zo({categories:V(i,function(n){return et(n)?n.value:n})})),a._ordinalMeta=i,a._extent=a.getSetting("extent")||[0,i.categories.length-1],a}return e.prototype.parse=function(t){return t==null?NaN:W(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return zu(t,this._extent)&&t>=0&&t=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(ri);ri.registerClass(Yk);var Xn=Yk;var Vo=oe,Zk=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return zu(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Oo(t)},e.prototype.getTicks=function(t){t=t||{};var a=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,s=me(),l=[];if(!a)return l;if(t.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]=0&&(f=Vo(f+p*a,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var h=l.length?l[l.length-1].value:n[1];return i[1]>h&&(t.expandToNicedExtent?l.push({value:Vo(h+a,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(t.pruneByBreak,l,this._brkCtx.breaks,function(d){return d.value},this._interval,this._extent),t.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(t){for(var a=this.getTicks({expandToNicedExtent:!0}),i=[],n=this.getExtent(),o=1;on[0]&&d0&&(n=n===null?s:Math.min(n,s))}t[a]=n}}return t}function Yb(r){var e=fZ(r),t=[];return T(r,function(a){var i=a.coordinateSystem,n=i.getBaseAxis(),o=n.getExtent(),s;if(n.type==="category")s=n.getBandWidth();else if(n.type==="value"||n.type==="time"){var l=n.dim+"_"+n.index,u=e[l],c=Math.abs(o[1]-o[0]),f=n.scale.getExtent(),p=Math.abs(f[1]-f[0]);s=u?c/p*u:c}else{var h=a.getData();s=Math.abs(o[1]-o[0])/h.count()}var d=j(a.get("barWidth"),s),v=j(a.get("barMaxWidth"),s),m=j(a.get("barMinWidth")||(Jk(a)?.5:1),s),g=a.get("barGap"),y=a.get("barCategoryGap"),x=a.get("defaultBarGap");t.push({bandWidth:s,barWidth:d,barMaxWidth:v,barMinWidth:m,barGap:g,barCategoryGap:y,defaultBarGap:x,axisKey:Gb(n),stackId:Hb(a)})}),jk(t)}function jk(r){var e={};T(r,function(a,i){var n=a.axisKey,o=a.bandWidth,s=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:a.defaultBarGap||0,stacks:{}},l=s.stacks;e[n]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=a.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=a.barMaxWidth;f&&(l[u].maxWidth=f);var p=a.barMinWidth;p&&(l[u].minWidth=p);var h=a.barGap;h!=null&&(s.gap=h);var d=a.barCategoryGap;d!=null&&(s.categoryGap=d)});var t={};return T(e,function(a,i){t[i]={};var n=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=gt(n).length;s=Math.max(35-l*4,15)+"%"}var u=j(s,o),c=j(a.gap,1),f=a.remainedWidth,p=a.autoWidthCount,h=(f-u)/(p+(p-1)*c);h=Math.max(h,0),T(n,function(g){var y=g.maxWidth,x=g.minWidth;if(g.width){var _=g.width;y&&(_=Math.min(_,y)),x&&(_=Math.max(_,x)),g.width=_,f-=_+c*_,p--}else{var _=h;y&&y<_&&(_=Math.min(y,f)),x&&x>_&&(_=x),_!==h&&(g.width=_,f-=_+c*_,p--)}}),h=(f-u)/(p+(p-1)*c),h=Math.max(h,0);var d=0,v;T(n,function(g,y){g.width||(g.width=h),v=g,d+=g.width*(1+c)}),v&&(d-=v.width*c);var m=-d/2;T(n,function(g,y){t[i][y]=t[i][y]||{bandWidth:o,offset:m,width:g.width},m+=g.width*(1+c)})}),t}function $k(r,e,t){if(r&&e){var a=r[Gb(e)];return a!=null&&t!=null?a[Hb(t)]:a}}function _m(r,e){var t=Wb(r,e),a=Yb(t);T(t,function(i){var n=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=Hb(i),u=a[Gb(s)][l],c=u.offset,f=u.width;n.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function bm(r){return{seriesType:r,plan:Ta(),reset:function(e){if(Kk(e)){var t=e.getData(),a=e.coordinateSystem,i=a.getBaseAxis(),n=a.getOtherAxis(i),o=t.getDimensionIndex(t.mapDimension(n.dim)),s=t.getDimensionIndex(t.mapDimension(i.dim)),l=e.get("showBackground",!0),u=t.mapDimension(n.dim),c=t.getCalculationInfo("stackResultDimension"),f=Ca(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),p=n.isHorizontal(),h=pZ(i,n),d=Jk(e),v=e.get("barMinHeight")||0,m=c&&t.getDimensionIndex(c),g=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(x,_){for(var b=x.count,S=d&&Ur(b*3),w=d&&l&&Ur(b*3),D=d&&Ur(b),C=a.master.getRect(),M=p?C.width:C.height,E,L=_.getStore(),A=0;(E=x.next())!=null;){var P=L.get(f?m:o,E),R=L.get(s,E),k=h,B=void 0;f&&(B=+P-L.get(o,E));var U=void 0,F=void 0,H=void 0,G=void 0;if(p){var Y=a.dataToPoint([P,R]);if(f){var rt=a.dataToPoint([B,R]);k=rt[0]}U=k,F=Y[1]+y,H=Y[0]-k,G=g,Math.abs(H)0?t:1:t))}var hZ=function(r,e,t,a){for(;t>>1;r[i][1]i&&(this._approxInterval=i);var o=Sm.length,s=Math.min(hZ(Sm,this._approxInterval,0,o),o-1);this._interval=Sm[s][1],this._intervalPrecision=Oo(this._interval),this._minLevelUnit=Sm[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return yt(t)?t:+Fa(t)},e.prototype.contain=function(t){return zu(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e})(pa),Sm=[["second",uv],["minute",cv],["hour",Su],["quarter-day",Su*6],["half-day",Su*12],["day",Sa*1.2],["half-week",Sa*3.5],["week",Sa*7],["month",Sa*31],["quarter",Sa*95],["half-year",b_/2],["year",b_]];function e2(r,e,t,a){return fv(new Date(e),r,a).getTime()===fv(new Date(t),r,a).getTime()}function dZ(r,e){return r/=Sa,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function vZ(r){var e=30*Sa;return r/=e,r>6?6:r>3?3:r>2?2:1}function mZ(r){return r/=Su,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Qk(r,e){return r/=e?cv:uv,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function gZ(r){return xd(r,!0)}function yZ(r,e,t){var a=Math.max(0,lt(sa,e)-1);return fv(new Date(r),sa[a],t).getTime()}function xZ(r,e){var t=new Date(0);t[r](1);var a=t.getTime();t[r](1+e);var i=t.getTime()-a;return function(n,o){return Math.max(0,Math.round((o-n)/i))}}function _Z(r,e,t,a,i,n){var o=1e4,s=rI,l=0;function u(A,P,R,k,B,U,F){for(var H=xZ(B,A),G=P,Y=new Date(G);Go));)if(Y[B](Y[k]()+A),G=Y.getTime(),n){var rt=n.calcNiceTickMultiple(G,H);rt>0&&(Y[B](Y[k]()+rt*A),G=Y.getTime())}F.push({value:G,notAdd:!0})}function c(A,P,R){var k=[],B=!P.length;if(!e2(wu(A),a[0],a[1],t)){B&&(P=[{value:yZ(a[0],A,t)},{value:a[1]}]);for(var U=0;U=a[0]&&F<=a[1]&&u(G,F,H,Y,rt,st,k),A==="year"&&R.length>1&&U===0&&R.unshift({value:R[0].value-G})}}for(var U=0;U=a[0]&&_<=a[1]&&h++)}var b=i/e;if(h>b*1.5&&d>b/1.5||(f.push(y),h>b||r===s[v]))break}p=[]}}}for(var S=At(V(f,function(A){return At(A,function(P){return P.value>=a[0]&&P.value<=a[1]&&!P.notAdd})}),function(A){return A.length>0}),w=[],D=S.length-1,v=0;v0;)n*=10;var s=[Zb(SZ(a[0]/n)*n),Zb(bZ(a[1]/n)*n)];this._interval=n,this._intervalPrecision=Oo(n),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){r.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=Dm(t)/Dm(this.base),r.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=Dm(t)/Dm(this.base),r.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=r.prototype.scale.call(this,t),Tm(this.base,t)},e.prototype.setBreaksFromOption=function(t){var a=me();if(a){var i=a.logarithmicParseBreaksFromOption(t,this.base,Z(this.parse,this)),n=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(n),this._innerSetBreak(o)}},e.type="log",e})(pa);function Cm(r,e){return Zb(r,kr(e))}ri.registerClass(r2);var a2=r2;var wZ=(function(){function r(e,t,a){this._prepareParams(e,t,a)}return r.prototype._prepareParams=function(e,t,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var p=this._determinedMin,h=this._determinedMax;return p!=null&&(s=p,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[DZ[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var a=TZ[e];this[a]=t},r.prototype.freeze=function(){this.frozen=!0},r})();var TZ={min:"_determinedMin",max:"_determinedMax"},DZ={min:"_dataMin",max:"_dataMax"};function Em(r,e,t){var a=r.rawExtentInfo;return a||(a=new wZ(r,e,t),r.rawExtentInfo=a,a)}function Mm(r,e){return e==null?null:Me(e)?NaN:r.parse(e)}function Xb(r,e){var t=r.type,a=Em(r,e,r.getExtent()).calculate();r.setBlank(a.isBlank);var i=a.min,n=a.max,o=e.ecModel;if(o&&t==="time"){var s=Wb("bar",o),l=!1;if(T(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=Yb(s),c=CZ(i,n,e,u);i=c.min,n=c.max}}return{extent:[i,n],fixMin:a.minFixed,fixMax:a.maxFixed}}function CZ(r,e,t,a){var i=t.axis.getExtent(),n=Math.abs(i[1]-i[0]),o=$k(a,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;T(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;T(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/n,p=c/f-c;return e+=p*(l/u),r-=p*(s/u),{min:r,max:e}}function fn(r,e){var t=e,a=Xb(r,t),i=a.extent,n=t.get("splitNumber");r instanceof a2&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(qb(t)),r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:n,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Bo(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Xn({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new wm({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(ri.getClass(e)||pa)}}function i2(r){var e=r.scale.getExtent(),t=e[0],a=e[1];return!(t>0&&a>0||t<0&&a<0)}function Uo(r){var e=r.getLabelModel().get("formatter");if(r.type==="time"){var t=aI(e);return function(i,n){return r.scale.getFormattedLabel(i,n,t)}}else{if(W(e))return function(i){var n=r.scale.getLabel(i),o=e.replace("{value}",n!=null?n:"");return o};if($(e)){if(r.type==="category")return function(i,n){return e(Vu(r,i),i.value-r.scale.getExtent()[0],null)};var a=me();return function(i,n){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,i.break)),e(Vu(r,i),n,o)}}else return function(i){return r.scale.getLabel(i)}}}function Vu(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function Am(r){var e=r.get("interval");return e==null?"auto":e}function Lm(r){return r.type==="category"&&Am(r.getLabelModel())===0}function Bu(r,e){var t={};return T(r.mapDimensionsAll(e),function(a){t[ym(r,a)]=!0}),gt(t)}function n2(r,e,t){e&&T(Bu(e,t),function(a){var i=e.getApproximateExtent(a);i[0]r[1]&&(r[1]=i[1])})}function Fo(r){return r==="middle"||r==="center"}function dl(r){return r.getShallow("show")}function qb(r){var e=r.get("breaks",!0);if(e!=null)return!me()||!MZ(r.axis)?void 0:e}function MZ(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var pn=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r})();var EZ=1e-8;function o2(r,e){return Math.abs(r-e)i&&(a=o,i=l)}if(a)return LZ(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var a=this._rect;if(a&&!t)return a;var i=[1/0,1/0],n=[-1/0,-1/0],o=this.geometries;return T(o,function(s){s.type==="polygon"?l2(s.exterior,i,n,t):T(s.points,function(l){l2(l,i,n,t)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(n[0])&&isFinite(n[1])||(i[0]=i[1]=n[0]=n[1]=0),a=new at(i[0],i[1],n[0]-i[0],n[1]-i[1]),t||(this._rect=a),a},e.prototype.contain=function(t){var a=this.getBoundingRect(),i=this.geometries;if(!a.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=n,i=s,n=l,a.push([s/t,l/t])}return a}function Qb(r,e){return r=IZ(r),V(At(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,i=t.geometry,n=[];switch(i.type){case"Polygon":var o=i.coordinates;n.push(new $b(o[0],o.slice(1)));break;case"MultiPolygon":T(i.coordinates,function(l){l[0]&&n.push(new $b(l[0],l.slice(1)))});break;case"LineString":n.push(new Kb([i.coordinates]));break;case"MultiLineString":n.push(new Kb(i.coordinates))}var s=new Pm(a[e||"name"],n,a.cp);return s.properties=a,s})}var PZ=ot(),sp=ot(),ha={estimate:1,determine:2};function Uu(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function p2(r,e){var t=V(e,function(a){return r.scale.parse(a)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function h2(r,e){var t=r.getLabelModel().get("customValues");if(t){var a=Uo(r),i=r.scale.getExtent(),n=p2(r,t),o=At(n,function(s){return s>=i[0]&&s<=i[1]});return{labels:V(o,function(s){var l={value:s};return{formattedLabel:a(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?kZ(r,e):NZ(r)}function d2(r,e,t){var a=r.getTickModel().get("customValues");if(a){var i=r.scale.getExtent(),n=p2(r,a);return{ticks:At(n,function(o){return o>=i[0]&&o<=i[1]})}}return r.type==="category"?RZ(r,e):{ticks:V(r.scale.getTicks(t),function(o){return o.value})}}function kZ(r,e){var t=r.getLabelModel(),a=v2(r,t,e);return!t.get("show")||r.scale.isBlank()?{labels:[]}:a}function v2(r,e,t){var a=zZ(r),i=Am(e),n=t.kind===ha.estimate;if(!n){var o=g2(a,i);if(o)return o}var s,l;$(i)?s=b2(r,i):(l=i==="auto"?VZ(r,t):i,s=_2(r,l));var u={labels:s,labelCategoryInterval:l};return n?t.out.noPxChangeTryDetermine.push(function(){return tS(a,i,u),!0}):tS(a,i,u),u}function RZ(r,e){var t=OZ(r),a=Am(e),i=g2(t,a);if(i)return i;var n,o;if((!e.get("show")||r.scale.isBlank())&&(n=[]),$(a))n=b2(r,a,!0);else if(a==="auto"){var s=v2(r,r.getLabelModel(),Uu(ha.determine));o=s.labelCategoryInterval,n=V(s.labels,function(l){return l.tickValue})}else o=a,n=_2(r,o,!0);return tS(t,a,{ticks:n,tickCategoryInterval:o})}function NZ(r){var e=r.scale.getTicks(),t=Uo(r);return{labels:V(e,function(a,i){return{formattedLabel:t(a,i),rawLabel:r.scale.getLabel(a),tickValue:a.value,time:a.time,break:a.break}})}}var OZ=m2("axisTick"),zZ=m2("axisLabel");function m2(r){return function(t){return sp(t)[r]||(sp(t)[r]={list:[]})}}function g2(r,e){for(var t=0;tc&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],p=r.dataToCoord(f+1)-r.dataToCoord(f),h=Math.abs(p*Math.cos(n)),d=Math.abs(p*Math.sin(n)),v=0,m=0;f<=s[1];f+=u){var g=0,y=0,x=go(i({value:f}),a.font,"center","top");g=x.width*1.3,y=x.height*1.3,v=Math.max(v,g,7),m=Math.max(m,y,7)}var _=v/h,b=m/d;isNaN(_)&&(_=1/0),isNaN(b)&&(b=1/0);var S=Math.max(0,Math.floor(Math.min(_,b)));if(t===ha.estimate)return e.out.noPxChangeTryDetermine.push(Z(BZ,null,r,S,l)),S;var w=x2(r,S,l);return w!=null?w:S}function BZ(r,e,t){return x2(r,e,t)==null}function x2(r,e,t){var a=PZ(r.model),i=r.getExtent(),n=a.lastAutoInterval,o=a.lastTickCount;if(n!=null&&o!=null&&Math.abs(n-e)<=1&&Math.abs(o-t)<=1&&n>e&&a.axisExtent0===i[0]&&a.axisExtent1===i[1])return n;a.lastTickCount=t,a.lastAutoInterval=e,a.axisExtent0=i[0],a.axisExtent1=i[1]}function UZ(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function _2(r,e,t){var a=Uo(r),i=r.scale,n=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=n[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=Lm(r),p=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;p&&u!==n[0]&&v(n[0]);for(var d=u;d<=n[1];d+=l)v(d);h&&d-l!==n[1]&&v(n[1]);function v(m){var g={value:m};s.push(t?m:{formattedLabel:a(g),rawLabel:i.getLabel(g),tickValue:m,time:void 0,break:void 0})}return s}function b2(r,e,t){var a=r.scale,i=Uo(r),n=[];return T(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&n.push(t?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),n}var S2=[0,1],FZ=(function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=a&&e<=i},r.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return gd(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(a=a.slice(),w2(a,i.count())),zt(e,S2,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(a=a.slice(),w2(a,i.count()));var n=zt(e,a,S2,t);return this.scale.scale(n)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),a=d2(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=a.ticks,n=V(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return HZ(this,n,o,e.clamp),n},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var a=this.scale.getMinorTicks(t),i=V(a,function(n){return V(n,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(e){return e=e||Uu(ha.determine),h2(this,e).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/a},r.prototype.calculateCategoryInterval=function(e){return e=e||Uu(ha.determine),y2(this,e)},r})();function w2(r,e){var t=r[1]-r[0],a=e,i=t/a/2;r[0]+=i,r[1]-=i}function HZ(r,e,t,a){var i=e.length;if(!r.onBand||t||!i)return;var n=r.getExtent(),o,s;if(i===1)e[0].coord=n[0],e[0].onBand=!0,o=e[1]={coord:n[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;T(e,function(h){h.coord-=u/2,h.onBand=!0});var c=r.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=n[0]>n[1];p(e[0].coord,n[0])&&(a?e[0].coord=n[0]:e.shift()),a&&p(n[0],e[0].coord)&&e.unshift({coord:n[0],onBand:!0}),p(n[1],o.coord)&&(a?o.coord=n[1]:e.pop()),a&&p(o.coord,n[1])&&e.push({coord:n[1],onBand:!0});function p(h,d){return h=oe(h),d=oe(d),f?h>d:hi&&(i+=lp);var h=Math.atan2(s,o);if(h<0&&(h+=lp),h>=a&&h<=i||h+lp>=a&&h+lp<=i)return l[0]=c,l[1]=f,u-t;var d=t*Math.cos(a)+r,v=t*Math.sin(a)+e,m=t*Math.cos(i)+r,g=t*Math.sin(i)+e,y=(d-o)*(d-o)+(v-s)*(v-s),x=(m-o)*(m-o)+(g-s)*(g-s);return y0){e=e/180*Math.PI,Oi.fromArray(r[0]),ge.fromArray(r[1]),ze.fromArray(r[2]),pt.sub(dn,Oi,ge),pt.sub(hn,ze,ge);var t=dn.len(),a=hn.len();if(!(t<.001||a<.001)){dn.scale(1/t),hn.scale(1/a);var i=dn.dot(hn),n=Math.cos(e);if(n1&&pt.copy(Fr,ze),Fr.toArray(r[1])}}}}function D2(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Oi.fromArray(r[0]),ge.fromArray(r[1]),ze.fromArray(r[2]),pt.sub(dn,ge,Oi),pt.sub(hn,ze,ge);var a=dn.len(),i=hn.len();if(!(a<.001||i<.001)){dn.scale(1/a),hn.scale(1/i);var n=dn.dot(e),o=Math.cos(t);if(n=l)pt.copy(Fr,ze);else{Fr.scaleAndAdd(hn,s/Math.tan(Math.PI/2-c));var f=ze.x!==ge.x?(Fr.x-ge.x)/(ze.x-ge.x):(Fr.y-ge.y)/(ze.y-ge.y);if(isNaN(f))return;f<0?pt.copy(Fr,ge):f>1&&pt.copy(Fr,ze)}Fr.toArray(r[1])}}}}function eS(r,e,t,a){var i=t==="normal",n=i?r:r.ensureState(t);n.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),n.shape=n.shape||{},o>0&&(n.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();i?r.useStyle(s):n.style=s}function qZ(r,e){var t=e.smooth,a=e.points;if(a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var i=Oa(a[0],a[1]),n=Oa(a[1],a[2]);if(!i||!n){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(i,n)*t,s=ql([],a[1],a[0],o/i),l=ql([],a[1],a[2],o/n),u=ql([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var c=1;c0&&i&&S(-f/n,0,n);var m=r[0],g=r[n-1],y,x;_(),y<0&&w(-y,.8),x<0&&w(x,.8),_(),b(y,x,1),b(x,y,-1),_(),y<0&&D(-y),x<0&&D(x);function _(){y=m.rect[o]-t,x=a-g.rect[o]-g.rect[s]}function b(C,M,E){if(C<0){var L=Math.min(M,-C);if(L>0){S(L*E,0,n);var A=L+C;A<0&&w(-A*E,1)}else w(-C*E,1)}}function S(C,M,E){C!==0&&(c=!0);for(var L=M;L0)for(var A=0;A0;A--){var B=E[A-1]*k;S(-B,A,n)}}}function D(C){var M=C<0?-1:1;C=Math.abs(C);for(var E=Math.ceil(C/(n-1)),L=0;L0?S(E,0,L+1):S(-E,n-L-1,n),C-=E,C<=0)return}return c}function I2(r){for(var e=0;e=0&&a.attr(n.oldLayoutSelect),lt(p,"emphasis")>=0&&a.attr(n.oldLayoutEmphasis)),wt(a,u,t,l)}else if(a.attr(u),!Bn(a).valueAnimation){var f=Q(a.style.opacity,1);a.style.opacity=0,Vt(a,{style:{opacity:f}},t,l)}if(n.oldLayout=u,a.states.select){var h=n.oldLayoutSelect={};zm(h,u,Vm),zm(h,a.states.select,Vm)}if(a.states.emphasis){var d=n.oldLayoutEmphasis={};zm(d,u,Vm),zm(d,a.states.emphasis,Vm)}av(a,l,c,t,t)}if(i&&!i.ignore&&!i.invisible){var n=JZ(i),o=n.oldLayout,v={points:i.shape.points};o?(i.attr({shape:o}),wt(i,{shape:v},t)):(i.setShape(v),i.style.strokePercent=0,Vt(i,{style:{strokePercent:1}},t)),n.oldLayout=v}},r})(),k2=QZ;var sS=ot();function lS(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var i=sS(t).labelManager;i||(i=sS(t).labelManager=new k2),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var i=sS(t).labelManager;a.updatedSeries.forEach(function(n){i.addLabelsOfSeries(t.getViewOfSeriesModel(n))}),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()})}var uS=Math.sin,cS=Math.cos,R2=Math.PI,ml=Math.PI*2,t7=180/R2,e7=(function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,a,i,n,o){this._add("C",e,t,a,i,n,o)},r.prototype.quadraticCurveTo=function(e,t,a,i){this._add("Q",e,t,a,i)},r.prototype.arc=function(e,t,a,i,n,o){this.ellipse(e,t,a,a,0,i,n,o)},r.prototype.ellipse=function(e,t,a,i,n,o,s,l){var u=s-o,c=!l,f=Math.abs(u),p=qi(f-ml)||(c?u>=ml:-u>=ml),h=u>0?u%ml:u%ml+ml,d=!1;p?d=!0:qi(f)?d=!1:d=h>=R2==!!c;var v=e+a*cS(o),m=t+i*uS(o);this._start&&this._add("M",v,m);var g=Math.round(n*t7);if(p){var y=1/this._p,x=(c?1:-1)*(ml-y);this._add("A",a,i,g,1,+c,e+a*cS(o+x),t+i*uS(o+x)),y>.01&&this._add("A",a,i,g,0,+c,v,m)}else{var _=e+a*cS(s),b=t+i*uS(s);this._add("A",a,i,g,+d,+c,_,b)}},r.prototype.rect=function(e,t,a,i){this._add("M",e,t),this._add("l",a,0),this._add("l",0,i),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,a,i,n,o,s,l,u){for(var c=[],f=this._p,p=1;p"}function s7(r){return""}function dp(r,e){e=e||{};var t=e.newline?` +`:"";function a(i){var n=i.children,o=i.tag,s=i.attrs,l=i.text;return o7(o,s)+(o!=="style"?We(l):l||"")+(n?""+t+V(n,function(u){return a(u)}).join(t)+t:"")+s7(o)}return a(r)}function V2(r,e,t){t=t||{};var a=t.newline?` +`:"",i=" {"+a,n=a+"}",o=V(gt(r),function(l){return l+i+V(gt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+n}).join(a),s=V(gt(e),function(l){return"@keyframes "+l+i+V(gt(e[l]),function(u){return u+i+V(gt(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(a)+n}).join(a)+n}).join(a);return!o&&!s?"":[""].join(a)}function vp(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function vS(r,e,t,a){return Ve("svg","root",{width:r,height:e,xmlns:N2,"xmlns:xlink":hS,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var l7=0;function Fm(){return l7++}var B2={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},gl="transform-origin";function u7(r,e,t){var a=O({},r.shape);O(a,e),r.buildPath(t,a);var i=new Bm;return i.reset(id(r)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function c7(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[gl]=t+"px "+a+"px")}var f7={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function F2(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function p7(r,e,t){var a=r.shape.paths,i={},n,o;if(T(a,function(l){var u=vp(t.zrId);u.animation=!0,mp(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,p=gt(c),h=p.length;if(h){o=p[h-1];var d=c[o];for(var v in d){var m=d[v];i[v]=i[v]||{d:""},i[v].d+=m.d||""}for(var g in f){var y=f[g].animation;y.indexOf(o)>=0&&(n=y)}}}),!!n){e.d=!1;var s=F2(i,t);return n.replace(o,s)}}function U2(r){return W(r)?B2[r]?"cubic-bezier("+B2[r]+")":tu(r)?r:"":""}function mp(r,e,t,a){var i=r.animators,n=i.length,o=[];if(r instanceof Co){var s=p7(r,e,t);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u0}).length){var Kt=F2(w,t);return Kt+" "+y[0]+" both"}}for(var m in l){var s=v(l[m]);s&&o.push(s)}if(o.length){var g=t.zrId+"-cls-"+Fm();t.cssNodes["."+g]={animation:o.join(",")},e.class=g}}function G2(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};H2(a,e,t,!0)}else{var i=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},n=i.fill;if(!n){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(n=rf(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var a={cursor:"pointer"};n&&(a.fill=n),i.stroke&&(a.stroke=i.stroke),u&&(a["stroke-width"]=u),H2(a,e,t,!0)}}function H2(r,e,t,a){var i=JSON.stringify(r),n=t.cssStyleCache[i];n||(n=t.zrId+"-cls-"+Fm(),t.cssStyleCache[i]=n,t.cssNodes["."+n+(a?":hover":"")]=r),e.class=e.class?e.class+" "+n:n}var gp=Math.round;function X2(r){return r&&W(r.src)}function q2(r){return r&&$(r.toDataURL)}function mS(r,e,t,a){pS(function(i,n){var o=i==="fill"||i==="stroke";o&&ad(n)?_S(e,r,i,a):o&&af(n)?bS(t,r,i,a):r[i]=n,o&&a.ssr&&n==="none"&&(r["pointer-events"]="visible")},e,t,!1),x7(t,r,a)}function gS(r,e){var t=LE(e);t&&(t.each(function(a,i){a!=null&&(r[(dS+i).toLowerCase()]=a+"")}),e.isSilent()&&(r[dS+"silent"]="true"))}function W2(r){return qi(r[0]-1)&&qi(r[1])&&qi(r[2])&&qi(r[3]-1)}function h7(r){return qi(r[4])&&qi(r[5])}function yS(r,e,t){if(e&&!(h7(e)&&W2(e))){var a=t?10:1e4;r.transform=W2(e)?"translate("+gp(e[4]*a)/a+" "+gp(e[5]*a)/a+")":iE(e)}}function Y2(r,e,t){for(var a=r.points,i=[],n=0;nn?(d=t[l+1]==null?null:t[l+1].elm,J2(r,d,t,i,l)):Gm(r,e,a,n))}function Wu(r,e){var t=e.elm=r.elm,a=r.children,i=e.children;r!==e&&(Wm(r,e),MS(e.text)?vn(a)&&vn(i)?a!==i&&T7(t,a,i):vn(i)?(vn(r.text)&&Hm(t,""),J2(t,null,i,0,i.length-1)):vn(a)?Gm(t,a,0,a.length-1):vn(r.text)&&Hm(t,""):r.text!==e.text&&(vn(a)&&Gm(t,a,0,a.length-1),Hm(t,e.text)))}function ES(r,e){if(yp(r,e))Wu(r,e);else{var t=r.elm,a=DS(t);xp(e),a!==null&&(Ho(a,e.elm,CS(t)),Gm(a,[r],0,0))}return e}var D7=0,C7=(function(){function r(e,t,a){if(this.type="svg",this.refreshHover=Q2("refreshHover"),this.configLayer=Q2("configLayer"),this.storage=t,this._opts=a=O({},a),this.root=e,this._id="zr"+D7++,this._oldVNode=vS(a.width,a.height),e&&!a.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=Um("svg");Wm(null,this._oldVNode),i.appendChild(n),e.appendChild(i)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",ES(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return xS(e,vp(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._width,i=this._height,n=vp(this._id);n.animation=e.animation,n.willUpdate=e.willUpdate,n.compress=e.compress,n.emphasis=e.emphasis,n.ssr=this._opts.ssr;var o=[],s=this._bgVNode=M7(a,i,this._backgroundColor,n);s&&o.push(s);var l=e.compress?null:this._mainVNode=Ve("g","main",{},[]);this._paintList(t,n,l?l.children:o),l&&o.push(l);var u=V(gt(n.defs),function(p){return n.defs[p]});if(u.length&&o.push(Ve("defs","defs",{},u)),e.animation){var c=V2(n.cssNodes,n.cssAnims,{newline:!0});if(c){var f=Ve("style","stl",{},[],c);o.push(f)}}return vS(a,i,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},dp(this.renderToVNode({animation:Q(e.cssAnimation,!0),emphasis:Q(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Q(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,a){for(var i=e.length,n=[],o=0,s,l,u=0,c=0;c=0&&!(p&&l&&p[v]===l[v]);v--);for(var m=d-1;m>v;m--)o--,s=n[o-1];for(var g=v+1;g=s)}}for(var f=this.__startIndex;f15)break}}P.prevElClipPaths&&g.restore()};if(y)if(y.length===0)D=m.__endIndex;else for(var M=h.dpr,E=0;E0&&e>i[0]){for(l=0;le);l++);s=a[i[l]]}if(i.splice(l+1,0,e),a[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var a=this._zlevelList,i=0;i0?Zm:0),this._needsManuallyCompositing),c.__builtin__||ps("ZLevel "+u+" has been used by unkown layer "+c.id),c!==n&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),n=c),i.__dirty&Ye&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,p){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,T(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?dt(a[e],t,!0):a[e]=t;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill=N.color.neutral00,u.style.lineWidth=2),a},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e})(Nt),iR=k7;function Vi(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var i=Gn(r,e,t[0]);return i!=null?i+"":null}else if(a){for(var n=[],o=0;o=0&&a.push(e[n])}return a.join(" ")}var R7=(function(r){I(e,r);function e(t,a,i,n){var o=r.call(this)||this;return o.updateData(t,a,i,n),o}return e.prototype._createSymbol=function(t,a,i,n,o,s){this.removeAll();var l=jt(t,-1,-1,2,2,null,s);l.attr({z2:Q(o,100),culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),l.drift=N7,this._symbolType=t,this.add(l)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Tr(this.childAt(0))},e.prototype.downplay=function(){Dr(this.childAt(0))},e.prototype.setZ=function(t,a){var i=this.childAt(0);i.zlevel=t,i.z=a},e.prototype.setDraggable=function(t,a){var i=this.childAt(0);i.draggable=t,i.cursor=!a&&t?"move":i.cursor},e.prototype.updateData=function(t,a,i,n){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=e.getSymbolZ2(t,a),c=o!==this._symbolType,f=n&&n.disableAnimation;if(c){var p=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,u,p)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(d):wt(h,d,s,a),Re(h)}if(this._updateCommon(t,a,l,i,n),c){var h=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Vt(h,d,s,a)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,i,n,o){var s=this.childAt(0),l=t.hostModel,u,c,f,p,h,d,v,m,g;if(n&&(u=n.emphasisItemStyle,c=n.blurItemStyle,f=n.selectItemStyle,p=n.focus,h=n.blurScope,v=n.labelStatesModels,m=n.hoverScale,g=n.cursorStyle,d=n.emphasisDisabled),!n||t.hasItemOption){var y=n&&n.itemModel?n.itemModel:t.getItemModel(a),x=y.getModel("emphasis");u=x.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),p=x.get("focus"),h=x.get("blurScope"),d=x.get("disabled"),v=qt(y),m=x.getShallow("scale"),g=y.getShallow("cursor")}var _=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(_||0)*Math.PI/180||0);var b=Da(t.getItemVisual(a,"symbolOffset"),i);b&&(s.x=b[0],s.y=b[1]),g&&s.attr("cursor",g);var S=t.getItemVisual(a,"style"),w=S.fill;if(s instanceof se){var D=s.style;s.useStyle(O({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},S))}else s.__isEmptyBrush?s.useStyle(O({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(a,"liftZ"),M=this._z2;C!=null?M==null&&(this._z2=s.z2,s.z2+=C):M!=null&&(s.z2=M,this._z2=null);var E=o&&o.useNameLabel;$t(s,v,{labelFetcher:l,labelDataIndex:a,defaultText:L,inheritColor:w,defaultOpacity:S.opacity});function L(R){return E?t.getName(R):Vi(t,R)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var A=s.ensureState("emphasis");A.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var P=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;A.scaleX=this._sizeX*P,A.scaleY=this._sizeY*P,this.setSymbolScale(1),Rt(this,p,h,d)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,i){var n=this.childAt(0),o=nt(this).dataIndex,s=i&&i.animation;if(this.silent=n.silent=!0,i&&i.fadeLabel){var l=n.getTextContent();l&&Xa(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){n.removeTextContent()}})}else n.removeTextContent();Xa(n,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return Pi(t.getItemVisual(a,"symbolSize"))},e.getSymbolZ2=function(t,a){return t.getItemVisual(a,"z2")},e})(K);function N7(r,e){this.parent.drift(r,e)}var jn=R7;function IS(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function nR(r){return r!=null&&!et(r)&&(r={isIgnore:r}),r||{}}function oR(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:qt(e),cursorStyle:e.get("cursor")}}var O7=(function(){function r(e){this.group=new K,this._SymbolCtor=e||jn}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=nR(t);var a=this.group,i=e.hostModel,n=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=oR(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};n||a.removeAll(),e.diff(n).add(function(f){var p=c(f);if(IS(e,p,f,t)){var h=new o(e,f,l,u);h.setPosition(p),e.setItemGraphicEl(f,h),a.add(h)}}).update(function(f,p){var h=n.getItemGraphicEl(p),d=c(f);if(!IS(e,d,f,t)){a.remove(h);return}var v=e.getItemVisual(f,"symbol")||"circle",m=h&&h.getSymbolType&&h.getSymbolType();if(!h||m&&m!==v)a.remove(h),h=new o(e,f,l,u),h.setPosition(d);else{h.updateData(e,f,l,u);var g={x:d[0],y:d[1]};s?h.attr(g):wt(h,g,i)}a.add(h),e.setItemGraphicEl(f,h)}).remove(function(f){var p=n.getItemGraphicEl(f);p&&p.fadeOut(function(){a.remove(p)},i)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,i){var n=e._getSymbolPoint(i);a.setPosition(n),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=oR(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=nR(a);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0?t=a[0]:a[1]<0&&(t=a[1]),t}function jm(r,e,t,a){var i=NaN;r.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(i)&&(i=r.valueStart);var n=r.baseDataOffset,o=[];return o[n]=t.get(r.baseDim,a),o[1-n]=i,e.dataToPoint(o)}function V7(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,i){t.push({cmd:"=",idx:i,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function PS(r,e,t,a,i,n,o,s){for(var l=V7(r,e),u=[],c=[],f=[],p=[],h=[],d=[],v=[],m=qm(i,e,o),g=r.getLayout("points")||[],y=e.getLayout("points")||[],x=0;x=i||v<0)break;if(xl(g,y)){if(l){v+=n;continue}break}if(v===t)r[n>0?"moveTo":"lineTo"](g,y),f=g,p=y;else{var x=g-u,_=y-c;if(x*x+_*_<.5){v+=n;continue}if(o>0){for(var b=v+n,S=e[b*2],w=e[b*2+1];S===g&&w===y&&m=a||xl(S,w))h=g,d=y;else{M=S-u,E=w-c;var P=g-u,R=S-g,k=y-c,B=w-y,U=void 0,F=void 0;if(s==="x"){U=Math.abs(P),F=Math.abs(R);var H=M>0?1:-1;h=g-H*U*o,d=y,L=g+H*F*o,A=y}else if(s==="y"){U=Math.abs(k),F=Math.abs(B);var G=E>0?1:-1;h=g,d=y-G*U*o,L=g,A=y+G*F*o}else U=Math.sqrt(P*P+k*k),F=Math.sqrt(R*R+B*B),C=F/(F+U),h=g-M*o*(1-C),d=y-E*o*(1-C),L=g+M*o*C,A=y+E*o*C,L=Go(L,Wo(S,g)),A=Go(A,Wo(w,y)),L=Wo(L,Go(S,g)),A=Wo(A,Go(w,y)),M=L-g,E=A-y,h=g-M*U/F,d=y-E*U/F,h=Go(h,Wo(u,g)),d=Go(d,Wo(c,y)),h=Wo(h,Go(u,g)),d=Wo(d,Go(c,y)),M=g-h,E=y-d,L=g+M*F/U,A=y+E*F/U}r.bezierCurveTo(f,p,h,d,g,y),f=L,p=A}else r.lineTo(g,y)}u=g,c=y,v+=n}return m}var sR=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),lR=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:N.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new sR},e.prototype.buildPath=function(t,a){var i=a.points,n=0,o=i.length/2;if(a.connectNulls){for(;o>0&&xl(i[o*2-2],i[o*2-1]);o--);for(;n=0){var _=u?(d-l)*x+l:(h-s)*x+s;return u?[t,_]:[_,t]}s=h,l=d;break;case o.C:h=n[f++],d=n[f++],v=n[f++],m=n[f++],g=n[f++],y=n[f++];var b=u?Ss(s,h,v,g,t,c):Ss(l,d,m,y,t,c);if(b>0)for(var S=0;S=0){var _=u?Ee(l,d,m,y,w):Ee(s,h,v,g,w);return u?[t,_]:[_,t]}}s=g,l=y;break}}},e})(ft);var B7=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(sR),$m=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new B7},e.prototype.buildPath=function(t,a){var i=a.points,n=a.stackedOnPoints,o=0,s=i.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&xl(i[s*2-2],i[s*2-1]);s--);for(;oe){n?t.push(o(n,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),n=l}return t}function H7(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.type==="cartesian2d"){for(var i,n,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){n=a[o];break}}if(n){var l=e.getAxis(i),u=V(n.stops,function(x){return{coord:l.toGlobalCoord(l.dataToCoord(x.value)),color:x.color}}),c=u.length,f=n.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var p=F7(u,i==="x"?t.getWidth():t.getHeight()),h=p.length;if(!h&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var d=10,v=p[0].coord-d,m=p[h-1].coord+d,g=m-v;if(g<.001)return"transparent";T(p,function(x){x.offset=(x.coord-v)/g}),p.push({offset:h?p[h-1].offset:.5,color:f[1]||"transparent"}),p.unshift({offset:h?p[0].offset:.5,color:f[0]||"transparent"});var y=new Za(0,0,0,0,p,!0);return y[i]=v,y[i+"2"]=m,y}}}function G7(r,e,t){var a=r.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=t.getAxesByScale("ordinal")[0];if(n&&!(i&&W7(n,e))){var o=e.mapDimension(n.dim),s={};return T(n.getViewLabels(),function(l){var u=n.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function W7(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.scale.count();isNaN(a)&&(a=0);for(var i=e.count(),n=Math.max(1,Math.round(i/5)),o=0;oa)return!1;return!0}function Y7(r,e){return isNaN(r)||isNaN(e)}function Z7(r){for(var e=r.length/2;e>0&&Y7(r[e*2-2],r[e*2-1]);e--);return e-1}function hR(r,e){return[r[e*2],r[e*2+1]]}function X7(r,e,t){for(var a=r.length/2,i=t==="x"?0:1,n,o,s=0,l=-1,u=0;u=e||n>=e&&o<=e){l=u;break}s=u,n=o}return{range:[s,l],t:(e-n)/(o-n)}}function dR(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var F=d.getState("emphasis").style;F.lineWidth=+d.style.lineWidth+1}nt(d).seriesIndex=t.seriesIndex,Rt(d,k,B,U);var H=pR(t.get("smooth")),G=t.get("smoothMonotone");if(d.setShape({smooth:H,smoothMonotone:G,connectNulls:w}),v){var Y=s.getCalculationInfo("stackedOnSeries"),rt=0;v.useStyle(J(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),Y&&(rt=pR(Y.get("smooth"))),v.setShape({smooth:H,stackedOnSmooth:rt,smoothMonotone:G,connectNulls:w}),te(v,t,"areaStyle"),nt(v).seriesIndex=t.seriesIndex,Rt(v,k,B,U)}var st=this._changePolyState;s.eachItemGraphicEl(function(mt){mt&&(mt.onHoverStateChange=st)}),this._polyline.onHoverStateChange=st,this._data=s,this._coordSys=n,this._stackedOnPoints=b,this._points=c,this._step=M,this._valueOrigin=x,t.get("triggerLineEvent")&&(this.packEventData(t,d),v&&this.packEventData(t,v))},e.prototype.packEventData=function(t,a){nt(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,i,n){var o=t.getData(),s=Ga(o,n);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var p=t.get("zlevel")||0,h=t.get("z")||0;u=new jn(o,s),u.x=c,u.y=f,u.setZ(p,h);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=p,d.z=h,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Pt.prototype.highlight.call(this,t,a,i,n)},e.prototype.downplay=function(t,a,i,n){var o=t.getData(),s=Ga(o,n);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Pt.prototype.downplay.call(this,t,a,i,n)},e.prototype._changePolyState=function(t){var a=this._polygon;Ws(this._polyline,t),a&&Ws(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new lR({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new $m({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,a,i){var n,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(n=s.isHorizontal(),o=!1):a.type==="polar"&&(n=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");$(c)&&(c=c(null));var f=u.get("animationDelay")||0,p=$(f)?f(null):f;t.eachItemGraphicEl(function(h,d){var v=h;if(v){var m=[h.x,h.y],g=void 0,y=void 0,x=void 0;if(i)if(o){var _=i,b=a.pointToCoord(m);n?(g=_.startAngle,y=_.endAngle,x=-b[1]/180*Math.PI):(g=_.r0,y=_.r,x=b[0])}else{var S=i;n?(g=S.x,y=S.x+S.width,x=h.x):(g=S.y+S.height,y=S.y,x=h.y)}var w=y===g?0:(x-g)/(y-g);l&&(w=1-w);var D=$(f)?f(d):c*w+p,C=v.getSymbolPath(),M=C.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:D}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,i){var n=t.getModel("endLabel");if(dR(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Dt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=Z7(l);c>=0&&($t(s,qt(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:c,defaultText:function(f,p,h){return h!=null?Xm(o,h):Vi(o,f)},enableTextSetter:!0},q7(n,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,i,n,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&n.originalX==null&&(n.originalX=u.x,n.originalY=u.y);var f=i.getLayout("points"),p=i.hostModel,h=p.get("connectNulls"),d=s.get("precision"),v=s.get("distance")||0,m=l.getBaseAxis(),g=m.isHorizontal(),y=m.inverse,x=a.shape,_=y?g?x.x:x.y+x.height:g?x.x+x.width:x.y,b=(g?v:0)*(y?-1:1),S=(g?0:-v)*(y?-1:1),w=g?"x":"y",D=X7(f,_,w),C=D.range,M=C[1]-C[0],E=void 0;if(M>=1){if(M>1&&!h){var L=hR(f,C[0]);u.attr({x:L[0]+b,y:L[1]+S}),o&&(E=p.getRawValue(C[0]))}else{var L=c.getPointOn(_,w);L&&u.attr({x:L[0]+b,y:L[1]+S});var A=p.getRawValue(C[0]),P=p.getRawValue(C[1]);o&&(E=wd(i,d,A,P,D.t))}n.lastFrameIndex=C[0]}else{var R=t===1||n.lastFrameIndex>0?C[0]:0,L=hR(f,R);o&&(E=p.getRawValue(R)),u.attr({x:L[0]+b,y:L[1]+S})}if(o){var k=Bn(u);typeof k.setLabelText=="function"&&k.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(t,a,i,n,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,p=PS(this._data,t,this._stackedOnPoints,a,this._coordSys,i,this._valueOrigin,s),h=p.current,d=p.stackedOnCurrent,v=p.next,m=p.stackedOnNext;if(o&&(d=Yo(p.stackedOnCurrent,p.current,i,o,l),h=Yo(p.current,null,i,o,l),m=Yo(p.stackedOnNext,p.next,i,o,l),v=Yo(p.next,null,i,o,l)),fR(h,v)>3e3||c&&fR(d,m)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:m}));return}u.shape.__points=p.current,u.shape.points=h;var g={shape:{points:v}};p.current!==h&&(g.shape.__points=p.next),u.stopAnimation(),wt(u,g,f),c&&(c.setShape({points:h,stackedOnPoints:d}),c.stopAnimation(),wt(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],x=p.status,_=0;_e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&n){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=a.getDevicePixelRatio(),p=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/p);if(isFinite(h)&&h>1){n==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/h)):n==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/h));var d=void 0;W(n)?d=$7[n]:$(n)&&(d=n),d&&e.setData(i.downSample(i.mapDimension(u.dim),1/h,d,K7))}}}}}function zS(r){r.registerChartView(vR),r.registerSeriesModel(iR),r.registerLayout(Bi("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,_p("line"))}var mR=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return lr(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,a,i){var n=this.coordinateSystem;if(n&&n.clampData){var o=n.clampData(t),s=n.dataToPoint(o);if(i)T(n.getAxes(),function(p,h){if(p.type==="category"&&a!=null){var d=p.getTicksCoords(),v=p.getTickModel().get("alignWithLabel"),m=o[h],g=a[h]==="x1"||a[h]==="y1";if(g&&!v&&(m+=1),d.length<2)return;if(d.length===2){s[h]=p.toGlobalCoord(p.getExtent()[g?1:0]);return}for(var y=void 0,x=void 0,_=1,b=0;bm){x=(S+y)/2;break}b===1&&(_=w-d[0].tickValue)}x==null&&(y?y&&(x=d[d.length-1].coord):x=d[0].coord),s[h]=p.toGlobalCoord(x)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=n.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e})(Nt);Nt.registerClass(mR);var Yu=mR;var J7=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return lr(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,i){return i.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Ar(Yu.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:N.color.primary,borderWidth:2}},realtimeSort:!1}),e})(Yu),gR=J7;var Q7=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),tX=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new Q7},e.prototype.buildPath=function(t,a){var i=a.cx,n=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,c=a.startAngle,f=a.endAngle,p=a.clockwise,h=Math.PI*2,d=p?f-cMath.PI/2&&cs)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,a){for(var i=a.scale,n=i.getExtent(),o=Math.max(0,n[0]),s=Math.min(n[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,i,n){if(this._isOrderChangedWithinSameData(t,a,i)){var o=this._dataSort(t,i,a);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,i){var n=a.baseAxis,o=this._dataSort(t,n,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(n){oa(n,t,nt(n).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e})(Pt),_R={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var i=r.x+r.width,n=r.y+r.height,o=VS(e.x,r.x),s=BS(e.x+e.width,i),l=VS(e.y,r.y),u=BS(e.y+e.height,n),c=si?s:o,e.y=f&&l>n?u:l,e.width=c?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}var i=BS(e.r,r.r),n=VS(e.r0,r.r0);e.r=i,e.r0=n;var o=i-n<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},bR={cartesian2d:function(r,e,t,a,i,n,o,s,l){var u=new ht({shape:O({},a),z2:1});if(u.__dataIndex=t,u.name="item",n){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(r,e,t,a,i,n,o,s,l){var u=!i&&l?Zu:De,c=new u({shape:a,z2:1});c.name="item";var f=AR(i);if(c.calculateTextPosition=yR(f,{isRoundCap:u===Zu}),n){var p=c.shape,h=i?"r":"endAngle",d={};p[h]=i?a.r0:a.startAngle,d[h]=a[h],(s?wt:Vt)(c,{shape:d},n)}return c}};function aX(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function SR(r,e,t,a,i,n,o,s){var l,u;n?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?wt:Vt)(t,{shape:l},e,i,null);var c=e?r.baseAxis.model:null;(o?wt:Vt)(t,{shape:u},c,i)}function wR(r,e){for(var t=0;t0?1:-1,o=a.height>0?1:-1;return{x:a.x+n*i/2,y:a.y+o*i/2,width:a.width-n*i,height:a.height-o*i}},polar:function(r,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function oX(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function AR(r){return(function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}})(r)}function DR(r,e,t,a,i,n,o,s){var l=e.getItemVisual(t,"style");if(s){if(!n.get("roundCap")){var c=r.shape,f=Gr(a.getModel("itemStyle"),c,!0);O(c,f),r.setShape(c)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var p=a.getShallow("cursor");p&&r.attr("cursor",p);var h=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=qt(a);$t(r,d,{labelFetcher:n,labelDataIndex:t,defaultText:Vi(n.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var v=r.getTextContent();if(s&&v){var m=a.get(["label","position"]);r.textConfig.inside=m==="middle"?!0:null,xR(r,m==="outside"?h:m,AR(o),a.get(["label","rotate"]))}rv(v,d,n.getRawValue(t),function(y){return Xm(e,y)});var g=a.getModel(["emphasis"]);Rt(r,g.get("focus"),g.get("blurScope"),g.get("disabled")),te(r,a),oX(i)&&(r.style.fill="none",r.style.stroke="none",T(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function sX(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),n=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,i,n)}var lX=(function(){function r(){}return r})(),CR=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new lX},e.prototype.buildPath=function(t,a){for(var i=a.points,n=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?t:null},30,!1);function uX(r,e,t){for(var a=r.baseDimIdx,i=1-a,n=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=n.length/3;c=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function LR(r,e,t){if(Ma(t,"cartesian2d")){var a=e,i=t.getArea();return{x:r?a.x:i.x,y:r?i.y:a.y,width:r?a.width:i.width,height:r?i.height:a.height}}else{var i=t.getArea(),n=e;return{cx:i.cx,cy:i.cy,r0:r?i.r0:n.r0,r:r?i.r:n.r,startAngle:r?n.startAngle:0,endAngle:r?n.endAngle:Math.PI*2}}}function cX(r,e,t){var a=r.type==="polar"?De:ht;return new a({shape:LR(e,t,r),silent:!0,z2:0})}var IR=rX;function US(r){r.registerChartView(IR),r.registerSeriesModel(gR),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(_m,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,bm("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,_p("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var PR=Math.PI*2,tg=Math.PI/180;function FS(r,e,t){e.eachSeriesByType(r,function(a){var i=a.getData(),n=i.mapDimension("value"),o=Cv(a,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,p=-a.get("startAngle")*tg,h=a.get("endAngle"),d=a.get("padAngle")*tg;h=h==="auto"?p-PR:-h*tg;var v=a.get("minAngle")*tg,m=v+d,g=0;i.each(n,function(B){!isNaN(B)&&g++});var y=i.getSum(n),x=Math.PI/(y||g)*2,_=a.get("clockwise"),b=a.get("roseType"),S=a.get("stillShowZeroSum"),w=i.getDataExtent(n);w[0]=0;var D=_?1:-1,C=[p,h],M=D*d/2;Us(C,!_),p=C[0],h=C[1];var E=HS(a);E.startAngle=p,E.endAngle=h,E.clockwise=_,E.cx=s,E.cy=l,E.r=u,E.r0=c;var L=Math.abs(h-p),A=L,P=0,R=p;if(i.setLayout({viewRect:f,r:u}),i.each(n,function(B,U){var F;if(isNaN(B)){i.setItemLayout(U,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:s,cy:l,r0:c,r:b?NaN:u});return}b!=="area"?F=y===0&&S?x:B*x:F=L/g,FF?(G=R+D*F/2,Y=G):(G=R+M,Y=H-M),i.setItemLayout(U,{angle:F,startAngle:G,endAngle:Y,clockwise:_,cx:s,cy:l,r0:c,r:b?zt(B,w,[c,u]):u}),R=H}),At?g:m,b=Math.abs(x.label.y-t);if(b>=_.maxY){var S=x.label.x-e-x.len2*i,w=a+x.len,D=Math.abs(S)r.unconstrainedWidth?null:p:null;a.setStyle("width",h)}OR(n,a)}}}function OR(r,e){RR.rect=r,nS(RR,e,hX)}var hX={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},RR={};function GS(r){return r.position==="center"}function WS(r){var e=r.getData(),t=[],a,i,n=!1,o=(r.get("minShowLabelAngle")||0)*fX,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,p=s.height;function h(S){S.ignore=!0}function d(S){if(!S.ignore)return!0;for(var w in S.states)if(S.states[w].ignore===!1)return!0;return!1}e.each(function(S){var w=e.getItemGraphicEl(S),D=w.shape,C=w.getTextContent(),M=w.getTextGuideLine(),E=e.getItemModel(S),L=E.getModel("label"),A=L.get("position")||E.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),k=j(L.get("edgeDistance"),u),B=L.get("bleedMargin");B==null&&(B=Math.min(u,p)>200?10:2);var U=E.getModel("labelLine"),F=U.get("length");F=j(F,u);var H=U.get("length2");if(H=j(H,u),Math.abs(D.endAngle-D.startAngle)0?"right":"left":Y>0?"left":"right"}var Qt=Math.PI,ue=0,$e=L.get("rotate");if(yt($e))ue=$e*(Qt/180);else if(A==="center")ue=0;else if($e==="radial"||$e===!0){var ma=Y<0?-G+Qt:-G;ue=ma}else if($e==="tangential"&&A!=="outside"&&A!=="outer"){var Xr=Math.atan2(Y,rt);Xr<0&&(Xr=Qt*2+Xr);var us=rt>0;us&&(Xr=Qt+Xr),ue=Xr-Qt}if(n=!!ue,C.x=st,C.y=mt,C.rotation=ue,C.setStyle({verticalAlign:"middle"}),Et){C.setStyle({align:Kt});var e0=C.states.select;e0&&(e0.x+=C.x,e0.y+=C.y)}else{var Ul=new at(0,0,0,0);OR(Ul,C),t.push({label:C,labelLine:M,position:A,len:F,len2:H,minTurnAngle:U.get("minTurnAngle"),maxSurfaceAngle:U.get("maxSurfaceAngle"),surfaceNormal:new pt(Y,rt),linePoints:Ht,textAlign:Kt,labelDistance:P,labelAlignTo:R,edgeDistance:k,bleedMargin:B,rect:Ul,unconstrainedWidth:Ul.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:Et})}}),!n&&r.get("avoidLabelOverlap")&&pX(t,a,i,l,u,p,c,f);for(var v=0;v0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=n.r0}},e.type="pie",e})(Pt),zR=vX;function Aa(r,e,t){e=z(e)&&{coordDimensions:e}||O({encodeDefine:r.getEncode()},e);var a=r.getSource(),i=Ri(a,e).dimensions,n=new we(i,r);return n.initData(a,t),n}var mX=(function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r})(),ai=mX;var gX=ot(),VR=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ai(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Aa(this,{coordDimensions:["value"],encodeDefaulter:ut(Cu,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),i=gX(a),n=i.seats;if(!n){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),n=i.seats=RE(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=n[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){ba(t,"labelLine",["show"]);var a=t.labelLine,i=t.emphasis.labelLine;a.show=a.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e})(Nt);fI({fullType:VR.type,getCoord2:function(r){return r.getShallow("center")}});var BR=VR;function YS(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(i){var n=a.mapDimension("value"),o=a.get(n,i);return!(yt(o)&&!isNaN(o)&&o<0)})}}}function ZS(r){r.registerChartView(zR),r.registerSeriesModel(BR),em("pie",r.registerAction),r.registerLayout(ut(FS,"pie")),r.registerProcessor(Ea("pie")),r.registerProcessor(YS("pie"))}var yX=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return lr(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,a,i){return i.point(a.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:N.color.primary}},universalTransition:{divideShape:"clone"}},e})(Nt),UR=yX;var FR=4,xX=(function(){function r(){}return r})(),_X=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new xX},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var i=a.points,n=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&n[0]=0;u--){var c=u*2,f=n[c]-s/2,p=n[c+1]-l/2;if(t>=f&&a>=p&&t<=f+s&&a<=p+l)return u}return-1},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();if(t=i[0],a=i[1],n.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,i=a.points,n=a.size,o=n[0],s=n[1],l=1/0,u=1/0,c=-1/0,f=-1/0,p=0;p=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),HR=bX;var SX=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,i){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=Bi("").reset(t,a,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var a=t.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,a){var i=this._symbolDraw,n=a.pipelineContext,o=n.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new HR:new mn,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e})(Pt),GR=SX;var XS={left:0,right:0,top:0,bottom:0},bp=["25%","25%"],wX=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,a){var i=la(t.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&t.outerBounds&&mr(t.outerBounds,i)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&mr(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:XS,outerBoundsContain:"all",outerBoundsClampWidth:bp[0],outerBoundsClampHeight:bp[1],backgroundColor:N.color.transparent,borderWidth:1,borderColor:N.color.neutral30},e})(St),WR=wX;var eg=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Yt).models[0]},e.type="cartesian2dAxis",e})(St);Jt(eg,pn);var YR={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:N.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:N.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:N.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[N.color.backgroundTint,N.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:N.color.neutral00,borderColor:N.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},TX=dt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},YR),qS=dt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:N.color.axisMinorSplitLine,width:1}}},YR),DX=dt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},qS),CX=J({logBase:10},qS),rg={category:TX,value:qS,time:DX,log:CX};var ZR={value:1,category:1,time:1,log:1};var jS=null;function XR(r){jS||(jS=r)}function $n(){return jS}function Ui(r,e,t,a){T(ZR,function(i,n){var o=dt(dt({},rg[n],!0),a,!0),s=(function(l){I(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+n,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var p=Eo(this),h=p?la(c):{},d=f.getTheme();dt(c,d.get(n+"Axis")),dt(c,this.getDefaultOption()),c.type=qR(c),p&&mr(c,h,p)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=zo.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=$n();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+n,u.defaultOption=o,u})(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",qR)}function qR(r){return r.type||(r.data?"category":"value")}var MX=(function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return V(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),At(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r})(),jR=MX;var ag=["x","y"];function $R(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var EX=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=ag,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!$R(t)||!$R(a))){var i=t.getExtent(),n=a.getExtent(),o=this.dataToPoint([i[0],n[0]]),s=this.dataToPoint([i[1],n[1]]),l=i[1]-i[0],u=n[1]-n[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,p=o[0]-i[0]*c,h=o[1]-n[0]*f,d=this._transform=[c,0,0,f,p,h];this._invTransform=Fe([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),i=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,a){var i=this.dataToPoint(t),n=this.dataToPoint(a),o=this.getArea(),s=new at(i[0],i[1],n[0]-i[0],n[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,i){i=i||[];var n=t[0],o=t[1];if(this._transform&&n!=null&&isFinite(n)&&o!=null&&isFinite(o))return ce(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(n,a)),i[1]=l.toGlobalCoord(l.dataToCoord(o,a)),i},e.prototype.clampData=function(t,a){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),s=n.getExtent(),l=i.parse(t[0]),u=n.parse(t[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(t,a,i){if(i=i||[],this._invTransform)return ce(i,t,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return i[0]=n.coordToData(n.toLocalCoord(t[0]),a),i[1]=o.coordToData(o.toLocalCoord(t[1]),a),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var a=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),n=Math.min(a[0],a[1])-t,o=Math.min(i[0],i[1])-t,s=Math.max(a[0],a[1])-n+t,l=Math.max(i[0],i[1])-o+t;return new at(n,o,s,l)},e})(jR),KR=EX;var AX=(function(r){I(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.index=0,s.type=n||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e})(ur),ig=AX;var Xu="expandAxisBreak",$S="collapseAxisBreak",KS="toggleAxisBreak",JS="axisbreakchanged",LX={type:Xu,event:JS,update:"update",refineEvent:QS},IX={type:$S,event:JS,update:"update",refineEvent:QS},PX={type:KS,event:JS,update:"update",refineEvent:QS};function QS(r,e,t,a){var i=[];return T(r,function(n){i=i.concat(n.eventBreaks)}),{eventContent:{breaks:i}}}function JR(r){r.registerAction(LX,e),r.registerAction(IX,e),r.registerAction(PX,e);function e(t,a){var i=[],n=ji(a,t);function o(s,l){T(n[s],function(u){var c=u.updateAxisBreaks(t);T(c.breaks,function(f){var p;i.push(J((p={},p[l]=u.componentIndex,p),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Zo=Math.PI,kX=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],RX=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],bl=ot(),eN=ot(),ew=(function(){function r(e){this.recordMap={},this.resolveAxisNameOverlap=e}return r.prototype.ensureRecord=function(e){var t=e.axis.dim,a=e.componentIndex,i=this.recordMap,n=i[t]||(i[t]=[]);return n[a]||(n[a]={ready:{}})},r})();function NX(r,e,t,a){var i=t.axis,n=e.ensureRecord(t),o=[],s,l=iw(r.axisName)&&Fo(r.nameLocation);T(a,function(d){var v=zi(d);if(!(!v||v.label.ignore)){o.push(v);var m=n.transGroup;l&&(m.transform?Fe(Sp,m.transform):uo(Sp),v.transform&&fr(Sp,Sp,v.transform),at.copy(ng,v.localRect),ng.applyTransform(Sp),s?s.union(ng):at.copy(s=new at(0,0,0,0),ng))}});var u=Math.abs(n.dirVec.x)>.1?"x":"y",c=n.transGroup[u];if(o.sort(function(d,v){return Math.abs(d.label[u]-c)-Math.abs(v.label[u]-c)}),l&&s){var f=i.getExtent(),p=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-p;s.union(new at(p,0,h,1))}n.stOccupiedRect=s,n.labelInfoList=o}var Sp=fe(),ng=new at(0,0,0,0),rw=function(r,e,t,a,i,n){if(Fo(r.nameLocation)){var o=n.stOccupiedRect;o&&rN(L2({},o,n.transGroup.transform),a,i)}else aw(n.labelInfoList,n.dirVec,a,i)};function rN(r,e,t){var a=new pt;Gu(r,e,a,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&cp(e,a)}function aw(r,e,t,a){for(var i=pt.dot(a,e)>=0,n=0,o=r.length;n0?"top":"bottom",n="center"):Is(i-Zo)?(o=a>0?"bottom":"top",n="center"):(o="middle",i>0&&i0?"right":"left":n=a>0?"left":"right"),{rotation:i,textAlign:n,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r})(),OX=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],zX={axisLine:function(r,e,t,a,i,n,o){if(0)var s;var l=a.get(["axisLine","show"]);if(l==="auto"&&(l=!0,r.raw.axisLineAutoShow!=null&&(l=!!r.raw.axisLineAutoShow)),!!l){var u=a.axis.getExtent(),c=n.transform,f=[u[0],0],p=[u[1],0],h=f[0]>p[0];c&&(ce(f,f,c),ce(p,p,c));var d=O({lineCap:"round"},a.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(a.get(["axisLine","breakLine"])&&a.axis.scale.hasBreaks())$n().buildAxisBreakLine(a,i,n,v);else{var m=new le(O({shape:{x1:f[0],y1:f[1],x2:p[0],y2:p[1]}},v));On(m.shape,m.style.lineWidth),m.anid="line",i.add(m)}var g=a.get(["axisLine","symbol"]);if(g!=null){var y=a.get(["axisLine","symbolSize"]);W(g)&&(g=[g,g]),(W(y)||yt(y))&&(y=[y,y]);var x=Da(a.get(["axisLine","symbolOffset"])||0,y),_=y[0],b=y[1];T([{rotate:r.rotation+Math.PI/2,offset:x[0],r:0},{rotate:r.rotation-Math.PI/2,offset:x[1],r:Math.sqrt((f[0]-p[0])*(f[0]-p[0])+(f[1]-p[1])*(f[1]-p[1]))}],function(S,w){if(g[w]!=="none"&&g[w]!=null){var D=jt(g[w],-_/2,-b/2,_,b,d.stroke,!0),C=S.r+S.offset,M=h?p:f;D.attr({rotation:S.rotate,x:M[0]+C*Math.cos(r.rotation),y:M[1]-C*Math.sin(r.rotation),silent:!0,z2:11}),i.add(D)}})}}},axisTickLabelEstimate:function(r,e,t,a,i,n,o,s){if(0)var l;var u=tN(e,i,s);u&&QR(r,e,t,a,i,n,o,ha.estimate)},axisTickLabelDetermine:function(r,e,t,a,i,n,o,s){if(0)var l;var u=tN(e,i,s);u&&QR(r,e,t,a,i,n,o,ha.determine);var c=FX(r,i,n,a);UX(r,e.labelLayoutList,c),HX(r,i,n,a,r.tickDirection)},axisName:function(r,e,t,a,i,n,o,s){var l=t.ensureRecord(a);if(0)var u;e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var c=r.axisName;if(iw(c)){var f=r.nameLocation,p=r.nameDirection,h=a.getModel("nameTextStyle"),d=a.get("nameGap")||0,v=a.axis.getExtent(),m=a.axis.inverse?-1:1,g=new pt(0,0),y=new pt(0,0);f==="start"?(g.x=v[0]-m*d,y.x=-m):f==="end"?(g.x=v[1]+m*d,y.x=m):(g.x=(v[0]+v[1])/2,g.y=r.labelOffset+p*d,y.y=p);var x=fe();y.transform(Sr(x,x,r.rotation));var _=a.get("nameRotate");_!=null&&(_=_*Zo/180);var b,S;Fo(f)?b=_l.innerTextLayout(r.rotation,_!=null?_:r.rotation,p):(b=VX(r.rotation,f,_||0,v),S=r.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(b.rotation)),!isFinite(S)&&(S=null)));var w=h.getFont(),D=a.get("nameTruncate",!0)||{},C=D.ellipsis,M=de(r.raw.nameTruncateMaxWidth,D.maxWidth,S),E=s.nameMarginLevel||0,L=new Dt({x:g.x,y:g.y,rotation:b.rotation,silent:_l.isLabelSilent(a),style:Gt(h,{text:c,font:w,overflow:"truncate",width:M,ellipsis:C,fill:h.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:h.get("align")||b.textAlign,verticalAlign:h.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(Er({el:L,componentModel:a,itemName:c}),L.__fullText=c,L.anid="name",a.get("triggerEvent")){var A=_l.makeAxisEventDataBase(a);A.targetType="axisName",A.name=c,nt(L).eventData=A}n.add(L),L.updateTransform(),e.nameEl=L;var P=l.nameLayout=zi({label:L,priority:L.z2,defaultAttr:{ignore:L.ignore},marginDefault:Fo(f)?kX[E]:RX[E]});if(l.nameLocation=f,i.add(L),L.decomposeTransform(),r.shouldNameMoveOverlap&&P){var R=t.ensureRecord(a);t.resolveAxisNameOverlap(r,t,a,P,y,R)}}}};function QR(r,e,t,a,i,n,o,s){iN(e)||GX(r,e,i,s,a,o);var l=e.labelLayoutList;WX(r,a,l,n),XX(a,r.rotation,l);var u=r.optionHideOverlap;BX(a,l,u),u&&Om(At(l,function(c){return c&&!c.label.ignore})),NX(r,t,a,l)}function VX(r,e,t,a){var i=vx(t-r),n,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return Is(i-Zo/2)?(o=l?"bottom":"top",n="center"):Is(i-Zo*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",iZo/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}function BX(r,e,t){if(Lm(r.axis))return;function a(s,l,u){var c=zi(e[l]),f=zi(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){wp(c.label);return}if(f.suggestIgnore){wp(f.label);return}var p=.1;if(!t){var h=[0,0,0,0];c=fp({marginForce:h},c),f=fp({marginForce:h},f)}Gu(c,f,null,{touchThreshold:p})&&wp(s?f.label:c.label)}}var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]),o=e.length;a(i,0,1),a(n,o-1,o-2)}function UX(r,e,t){r.showMinorTicks||T(e,function(a){if(a&&a.label.ignore)for(var i=0;ic[0]&&isFinite(v)&&isFinite(c[0]);)d=xm(d),v=c[1]-d*s;else{var g=r.getTicks().length-1;g>s&&(d=xm(d));var y=d*s;m=Math.ceil(c[1]/d)*d,v=oe(m-y),v<0&&c[0]>=0?(v=0,m=oe(y)):m>0&&c[1]<=0&&(m=0,v=-oe(y))}var x=(n[0].value-o[0].value)/l,_=(n[s].value-o[s].value)/l;if(i.setExtent.call(r,v+d*x,m+d*_),i.setInterval.call(r,d),(x||_)&&i.setNiceExtent.call(r,v+d,m-d),0)var b}var lN=[[3,1],[0,2]],jX=(function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ag,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=gt(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var p=+l[f],h=o[p],d=h.model,v=h.scale;np(v)&&d.get("alignTicks")&&d.get("interval")==null?c.push(h):(fn(v,d),np(v)&&(s=h))}c.length&&(s||(s=c.pop(),fn(s.scale,s.model)),T(c,function(m){og(m.scale,m.model,s.scale)}))}}i(a.x),i(a.y);var n={};T(a.x,function(o){uN(a,"y",o,n)}),T(a.y,function(o){uN(a,"x",o,n)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var i=Zt(e,t),n=this._rect=Bt(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(sw(o,n),!a){var u=KX(n,s,o,l,t),c=void 0;if(l)lw?(lw(this._axesList,n),sw(o,n)):c=pN(n.clone(),"axisLabel",null,n,o,u,i);else{var f=JX(e,n,i),p=f.outerBoundsRect,h=f.parsedOuterBoundsContain,d=f.outerBoundsClamp;p&&(c=pN(p,h,d,n,o,u,i))}dN(n,o,ha.determine,null,c,i)}T(this._coordsList,function(v){v.calcAffineTransform()})},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}et(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,n=this._coordsList;i0})==null;return qa(a,s,!0,!0,t),sw(i,a),l;function u(p){T(i[bt[p]],function(h){if(dl(h.model)){var d=n.ensureRecord(h.model),v=d.labelInfoList;if(v)for(var m=0;m0&&!Me(h)&&h>1e-4&&(p/=h),p}}function KX(r,e,t,a,i){var n=new ew(QX);return T(t,function(o){return T(o,function(s){if(dl(s.model)){var l=!a;s.axisBuilder=oN(r,e,s.model,i,n,l)}})}),n}function dN(r,e,t,a,i,n){var o=t===ha.determine;T(e,function(u){return T(u,function(c){dl(c.model)&&(sN(c.axisBuilder,r,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[bt[1-u]]=r[be[u]]<=n.refContainer[be[u]]*.5?0:1-u===1?2:1}T(e,function(u,c){return T(u,function(f){dl(f.model)&&((a==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function JX(r,e,t){var a,i=r.get("outerBoundsMode",!0);i==="same"?a=e.clone():(i==null||i==="auto")&&(a=Bt(r.get("outerBounds",!0)||XS,t.refContainer));var n=r.get("outerBoundsContain",!0),o;n==null||n==="auto"||lt(["all","axisLabel"],n)<0?o="all":o=n;var s=[ou(Q(r.get("outerBoundsClampWidth",!0),bp[0]),e.width),ou(Q(r.get("outerBoundsClampHeight",!0),bp[1]),e.height)];return{outerBoundsRect:a,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var QX=function(r,e,t,a,i,n){var o=t.axis.dim==="x"?"y":"x";rw(r,e,t,a,i,n),Fo(r.nameLocation)||T(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&aw(s.labelInfoList,s.dirVec,a,i)})},vN=jX;function mN(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return t9(t,r,e),t.seriesInvolved&&r9(t,r),t}function t9(r,e,t){var a=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),n=i.get("link",!0)||[],o=[];T(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=qu(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",a);if(T(s.getAxes(),ut(v,!1,null)),s.getTooltipAxes&&a&&f.get("show")){var p=f.get("trigger")==="axis",h=f.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(f.get(["axisPointer","axis"]));(p||h)&&T(d.baseAxes,ut(v,h?"cross":!0,p)),h&&T(d.otherAxes,ut(v,"cross",!1))}function v(m,g,y){var x=y.model.getModel("axisPointer",i),_=x.get("show");if(!(!_||_==="auto"&&!m&&!cw(x))){g==null&&(g=x.get("triggerTooltip")),x=m?e9(y,f,i,e,m,g):x;var b=x.get("snap"),S=x.get("triggerEmphasis"),w=qu(y.model),D=g||b||y.type==="category",C=r.axesInfo[w]={key:w,axis:y,coordSys:s,axisPointerModel:x,triggerTooltip:g,triggerEmphasis:S,involveSeries:D,snap:b,useHandle:cw(x),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||D;var M=a9(n,y);if(M!=null){var E=o[M]||(o[M]={axesInfo:{}});E.axesInfo[w]=C,E.mapper=n[M].mapper,C.linkGroup=E}}}})}function e9(r,e,t,a,i,n){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};T(s,function(p){l[p]=tt(o.get(p))}),l.snap=r.type!=="category"&&!!n,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c!=null?c:!0,!n){var f=l.lineStyle=o.get("crossStyle");f&&J(u,f.textStyle)}}return r.model.getModel("axisPointer",new Mt(l,t,a))}function r9(r,e){e.eachSeries(function(t){var a=t.coordinateSystem,i=t.get(["tooltip","trigger"],!0),n=t.get(["tooltip","show"],!0);!a||!a.model||i==="none"||i===!1||i==="item"||n===!1||t.get(["axisPointer","show"],!0)===!1||T(r.coordSysAxesInfo[qu(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function a9(r,e){for(var t=e.model,a=e.dim,i=0;i=0||r===e}function gN(r){var e=sg(r);if(e){var t=e.axisPointerModel,a=e.axis.scale,i=t.option,n=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=cw(t);n==null&&(i.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var l9=ot();function dw(r,e,t,a){if(r instanceof ig){var i=r.scale.type;if(i!=="category"&&i!=="ordinal")return t}var n=r.model,o=n.get("jitter"),s=n.get("jitterOverlap"),l=n.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?DN(t,o,u,a):u9(r,e,t,a,o,l):t}function DN(r,e,t,a){if(t===null)return r+(Math.random()-.5)*e;var i=t-a*2,n=Math.min(Math.max(0,e),i);return r+(Math.random()-.5)*n}function u9(r,e,t,a,i,n){var o=l9(r);o.items||(o.items=[]);var s=o.items,l=wN(s,e,t,a,i,n,1),u=wN(s,e,t,a,i,n,-1),c=Math.abs(l-t)i/2||f&&p>f/2-a?DN(t,i,f,a):(s.push({fixedCoord:e,floatCoord:c,r:a}),c)}function wN(r,e,t,a,i,n,o){for(var s=t,l=0;li/2)return Number.MAX_VALUE;if(o===1&&d>s||o===-1&&d0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var v=l;d.color!=null&&(v=J({color:d.color},l));var m=dt(tt(d),{boundaryGap:t,splitNumber:a,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:v,triggerEvent:p},!1);if(W(c)){var g=m.name;m.name=c.replace("{value}",g!=null?g:"")}else $(c)&&(m.name=c(m.name,m));var y=new Mt(m,null,this.ecModel);return Jt(y,pn.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:N.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:dt({lineStyle:{color:N.color.neutral20}},Dp.axisLine),axisLabel:fg(Dp.axisLabel,!1),axisTick:fg(Dp.axisTick,!1),splitLine:fg(Dp.splitLine,!0),splitArea:fg(Dp.splitArea,!0),indicator:[]},e})(St),LN=p9;var h9=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group;n.removeAll(),this._buildAxes(t,i),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t,a){var i=t.coordinateSystem,n=i.getIndicatorAxes(),o=V(n,function(s){var l=s.model.get("showName")?s.name:"",u=new yr(s.model,a,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});T(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes();if(!i.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),p=l.get("color"),h=u.get("color"),d=z(p)?p:[p],v=z(h)?h:[h],m=[],g=[];function y(R,k,B){var U=B%k.length;return R[U]=R[U]||[],U}if(n==="circle")for(var x=i[0].getTicksCoords(),_=a.cx,b=a.cy,S=0;S3?1.4:o>1?1.2:1.1,c=n>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(n),p=(n>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:p,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(Sw(this._zr,"globalPan")||Cp(t))){var a=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,a,i,n,o){t._checkPointer(n,o.originX,o.originY)&&(Kr(n.event),n.__ecRoamConsumed=!0,VN(t,a,i,n,o))},e})(Ue);function Cp(r){return r.__ecRoamConsumed}var y9=ot();function dg(r){var e=y9(r);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function Mp(r,e,t,a){for(var i=dg(r),n=i.roam,o=n[e]=n[e]||[],s=0;s=4&&(c={x:parseFloat(p[0]||0),y:parseFloat(p[1]||0),width:parseFloat(p[2]),height:parseFloat(p[3])})}if(c&&s!=null&&l!=null&&(f=Cw(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var h=i;i=new K,i.add(h),h.scaleX=h.scaleY=f.scale,h.x=f.x,h.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new ht({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:n}},r.prototype._parseNode=function(e,t,a,i,n,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!n){var c=Tw[s];if(c&&it(Tw,s)){l=c.call(this,e,t);var f=e.getAttribute("name");if(f){var p={name:f,namedFrom:null,svgNodeTagLower:s,el:l};a.push(p),s==="g"&&(u=p)}else i&&a.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var h=GN[s];if(h&&it(GN,s)){var d=h.call(this,e),v=e.getAttribute("id");v&&(this._defs[v]=d)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,a,u,n,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},r.prototype._parseText=function(e,t){var a=new In({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});ii(t,a),La(e,a,this._defsUsePending,!1,!1),S9(a,t);var i=a.style,n=i.fontSize;n&&n<9&&(i.fontSize=9,a.scaleX*=n/9,a.scaleY*=n/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=a.getBoundingRect();return this._textX+=s.width,t.add(a),a},r.internalField=(function(){Tw={g:function(e,t){var a=new K;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new ht;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(e,t){var a=new Or;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,t){var a=new le;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(e,t){var a=new Cf;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(e,t){var a=e.getAttribute("points"),i;a&&(i=ZN(a));var n=new ye({shape:{points:i||[]},silent:!0});return ii(t,n),La(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var a=e.getAttribute("points"),i;a&&(i=ZN(a));var n=new he({shape:{points:i||[]},silent:!0});return ii(t,n),La(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var a=new se;return ii(t,a),La(e,a,this._defsUsePending,!1,!1),a.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),a.silent=!0,a},text:function(e,t){var a=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(n),this._textY=parseFloat(i)+parseFloat(o);var s=new K;return ii(t,s),La(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var a=e.getAttribute("x"),i=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),i!=null&&(this._textY=parseFloat(i));var n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new K;return ii(t,s),La(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(e,t){var a=e.getAttribute("d")||"",i=Gd(a);return ii(t,i),La(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}})(),r})(),GN={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),i=parseInt(r.getAttribute("y2")||"0",10),n=new Za(e,t,a,i);return WN(r,n),YN(r,n),n},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),i=new Xd(e,t,a);return WN(r,i),YN(r,i),i}};function WN(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function YN(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var a=t.getAttribute("offset"),i=void 0;a&&a.indexOf("%")>0?i=parseInt(a,10)/100:a?i=parseFloat(a):i=0;var n={};jN(t,n,n);var o=n.stopColor||t.getAttribute("stop-color")||"#000000",s=n.stopOpacity||t.getAttribute("stop-opacity");if(s){var l=Ze(o),u=l&&l[3];u&&(l[3]*=Mn(s),o=Jr(l,"rgba"))}e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function ii(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),J(e.__inheritedStyle,r.__inheritedStyle))}function ZN(r){for(var e=_g(r),t=[],a=0;a0;n-=2){var o=a[n],s=a[n-1],l=_g(o);switch(i=i||fe(),s){case"translate":pr(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Kl(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Sr(i,i,-parseFloat(l[0])*Dw,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Dw);fr(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*Dw);fr(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var qN=/([^\s:;]+)\s*:\s*([^:;]+)/g;function jN(r,e,t){var a=r.getAttribute("style");if(a){qN.lastIndex=0;for(var i;(i=qN.exec(a))!=null;){var n=i[1],o=it(yg,n)?yg[n]:null;o&&(e[o]=i[2]);var s=it(xg,n)?xg[n]:null;s&&(t[s]=i[2])}}}function E9(r,e,t){for(var a=0;a0,y={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:p};l.resourceType==="geoJSON"?this._buildGeoJSON(y):l.resourceType==="geoSVG"&&this._buildSVG(y),this._updateController(e,m,t,a),this._updateMapSelectHandler(e,u,a,i)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=q(),a=q(),i=this._regionsGroup,n=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(h,d){return d&&(h=d(h)),h&&[h[0]*n.scaleX+n.x,h[1]*n.scaleY+n.y]}function f(h){for(var d=[],v=!u&&l&&l.project,m=0;m=0)&&(p=i);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;$t(e,qt(a),{labelFetcher:p,labelDataIndex:f,defaultText:t},h);var d=e.getTextContent();if(d&&(sO(d).ignore=d.ignore,e.textConfig&&o)){var v=e.getBoundingRect().clone();e.textConfig.layoutRect=v,e.textConfig.position=[(o[0]-v.x)/v.width*100+"%",(o[1]-v.y)/v.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function aO(r,e,t,a,i,n){r.data?r.data.setItemGraphicEl(n,e):nt(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:a&&a.option||{}}}function iO(r,e,t,a,i){r.data||Er({el:e,componentModel:i,itemName:t,itemTooltipOption:a.get("tooltip")})}function nO(r,e,t,a,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var n=a.getModel("emphasis"),o=n.get("focus");return Rt(e,o,n.get("blurScope"),n.get("disabled")),r.isGeo&&iL(e,i,t),o}function oO(r,e,t){var a=[],i;function n(){i=[]}function o(){i.length&&(a.push(i),i=[])}var s=e({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),T(r,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill=N.color.neutral00,i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:N.color.tertiary},itemStyle:{borderWidth:.5,borderColor:N.color.border,areaColor:N.color.background},emphasis:{label:{show:!0,color:N.color.primary},itemStyle:{areaColor:N.color.highlight}},select:{label:{show:!0,color:N.color.primary},itemStyle:{color:N.color.highlight}},nameProperty:"name"},e})(Nt),uO=H9;function G9(r,e){var t={};return T(r,function(a){a.each(a.mapDimension("value"),function(i,n){var o="ec-"+a.getName(n);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),r[0].map(r[0].mapDimension("value"),function(a,i){for(var n="ec-"+r[0].getName(i),o=0,s=1/0,l=-1/0,u=t[n].length,c=0;c1?(x.width=y,x.height=y/v):(x.height=y,x.width=y*v),x.y=g[1]-x.height/2,x.x=g[0]-x.width/2;else{var _=r.getBoxLayoutParams();_.aspect=v,x=Bt(_,d),x=Mv(r,x,v)}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function Z9(r,e){T(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var X9=(function(){function r(){this.dimensions=Rw}return r.prototype.create=function(e,t){var a=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Nw(l+s,l,O({nameMap:o.get("nameMap"),api:t,ecModel:e},i(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=dO,u.resize(o,t)}),e.eachSeries(function(o){ln({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Yt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var n={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),T(n,function(o,s){var l=V(o,function(c){return c.get("nameMap")}),u=new Nw(s,s,O({nameMap:Yl(l),api:t,ecModel:e},i(o[0])));u.zoomLimit=de.apply(null,V(o,function(c){return c.get("scaleLimit")})),a.push(u),u.resize=dO,u.resize(o[0],t),T(o,function(c){c.coordinateSystem=u,Z9(u,c)})}),a},r.prototype.getFilledRegions=function(e,t,a,i){for(var n=(e||[]).slice(),o=q(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function yO(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,i=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){J9(r);var n=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(r.hierNode.prelim=i.hierNode.prelim+e(r,i),r.hierNode.modifier=r.hierNode.prelim-n):r.hierNode.prelim=n}else i&&(r.hierNode.prelim=i.hierNode.prelim+e(r,i));r.parentNode.hierNode.defaultAncestor=Q9(r,i,r.parentNode.hierNode.defaultAncestor||a[0],e)}function xO(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Bw(r){return arguments.length?r:rq}function Tl(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function J9(r){for(var e=r.children,t=e.length,a=0,i=0;--t>=0;){var n=e[t];n.hierNode.prelim+=a,n.hierNode.modifier+=a,i+=n.hierNode.change,a+=n.hierNode.shift+i}}function Q9(r,e,t,a){if(e){for(var i=r,n=r,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=zw(s),n=Vw(n),s&&n;){i=zw(i),o=Vw(o),i.hierNode.ancestor=r;var p=s.hierNode.prelim+f-n.hierNode.prelim-u+a(s,n);p>0&&(eq(tq(s,r,t),r,p),u+=p,l+=p),f+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!zw(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),n&&!Vw(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-c,t=r)}return t}function zw(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Vw(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function tq(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function eq(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function rq(r,e){return r.parentNode===e.parentNode?1:2}var aq=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),iq=(function(r){I(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:N.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new aq},e.prototype.buildPath=function(t,a){var i=a.childPoints,n=i.length,o=a.parentPoint,s=i[0],l=i[n-1];if(n===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,p=j(a.forkPosition,1),h=[];h[c]=o[c],h[f]=o[f]+(l[f]-o[f])*p,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(s[0],s[1]),h[c]=s[c],t.lineTo(h[0],h[1]),h[c]=l[c],t.lineTo(h[0],h[1]),t.lineTo(l[0],l[1]);for(var d=1;dy.x,b||(_=_-Math.PI));var w=b?"left":"right",D=s.getModel("label"),C=D.get("rotate"),M=C*(Math.PI/180),E=m.getTextContent();E&&(m.setTextConfig({position:D.get("position")||w,rotation:C==null?-_:M,origin:"center"}),E.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),A=L==="relative"?Dn(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;A&&(nt(t).focus=A),oq(i,o,c,t,d,h,v,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===Gs||Ws(t.__edge,P)}})}function oq(r,e,t,a,i,n,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),p=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),v=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(v||(v=a.__edge=new Xs({shape:Uw(c,f,p,i,i)})),wt(v,{shape:Uw(c,f,p,n,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,g=[],y=0;yt&&(t=i.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,i=a.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var a=t.getData().tree.root,i=r.targetNode;if(W(i)&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var n=r.targetNodeId;if(n!=null&&(i=a.getNodeById(n)))return{node:i}}}function Hw(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function $u(r,e){var t=Hw(r);return lt(t,e)>=0}function jo(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var gq=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},i=t.leaves||{},n=new Mt(i,this,this.ecModel),o=ju.createTree(a,this,s);function s(f){f.wrapMethod("getItemModel",function(p,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(p.parentModel=n),p})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var p=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=p&&p.collapsed!=null?!p.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,i){for(var n=this.getData().tree,o=n.root.children[0],s=n.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return re("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=jo(i,this),a.collapsed=!i.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:N.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e})(Nt),MO=gq;function EO(r,e,t){for(var a=[r],i=[],n;n=a.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s=0;n--)t.push(i[n])}}function Ww(r,e){r.eachSeriesByType("tree",function(t){yq(t,e)})}function yq(r,e){var t=Zt(r,e).refContainer,a=Bt(r.getBoxLayoutParams(),t);r.layoutInfo=a;var i=r.get("layout"),n=0,o=0,s=null;i==="radial"?(n=2*Math.PI,o=Math.min(a.height,a.width)/2,s=Bw(function(_,b){return(_.parentNode===b.parentNode?1:2)/_.depth})):(n=a.width,o=a.height,s=Bw());var l=r.getData().tree.root,u=l.children[0];if(u){gO(l),EO(u,yO,s),l.hierNode.modifier=-u.hierNode.prelim,Ku(u,xO);var c=u,f=u,p=u;Ku(u,function(_){var b=_.getLayout().x;bf.getLayout().x&&(f=_),_.depth>p.depth&&(p=_)});var h=c===f?1:s(c,f)/2,d=h-c.getLayout().x,v=0,m=0,g=0,y=0;if(i==="radial")v=n/(f.getLayout().x+h+d),m=o/(p.depth-1||1),Ku(u,function(_){g=(_.getLayout().x+d)*v,y=(_.depth-1)*m;var b=Tl(g,y);_.setLayout({x:b.x,y:b.y,rawX:g,rawY:y},!0)});else{var x=r.getOrient();x==="RL"||x==="LR"?(m=o/(f.getLayout().x+h+d),v=n/(p.depth-1||1),Ku(u,function(_){y=(_.getLayout().x+d)*m,g=x==="LR"?(_.depth-1)*v:n-(_.depth-1)*v,_.setLayout({x:g,y},!0)})):(x==="TB"||x==="BT")&&(v=n/(f.getLayout().x+h+d),m=o/(p.depth-1||1),Ku(u,function(_){g=(_.getLayout().x+d)*v,y=x==="TB"?(_.depth-1)*m:o-(_.depth-1)*m,_.setLayout({x:g,y},!0)}))}}}function Yw(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(i){var n=i.getModel(),o=n.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");O(s,o)})})}function AO(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=e.dataIndex,n=a.getData().tree,o=n.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=i.coordinateSystem,o=Xo(n,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function Zw(r){r.registerChartView(DO),r.registerSeriesModel(MO),r.registerLayout(Ww),r.registerVisual(Yw),AO(r)}var LO=["treemapZoomToNode","treemapRender","treemapMove"];function IO(r){for(var e=0;e1;)n=n.parentNode;var o=Of(r.ecModel,n.name||n.dataIndex+"",a);i.setVisual("decal",o)})}var xq=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var i={name:t.name,children:t.data};PO(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},s=new Mt({itemStyle:o},this,a);n=t.levels=_q(n,a);var l=V(n||[],function(f){return new Mt(f,s,a)},this),u=ju.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(p,h){var d=u.getNodeByDataIndex(h),v=d?l[d.depth]:null;return p.parentModel=v||s,p})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return re("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=jo(i,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},O(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=q(),this._idIndexMapCount=0);var i=a.get(t);return i==null&&a.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){kp(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:N.size.l,top:N.size.xxxl,right:N.size.l,bottom:N.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:N.size.m,emptyItemWidth:25,itemStyle:{color:N.color.backgroundShade,textStyle:{color:N.color.secondary}},emphasis:{itemStyle:{color:N.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:N.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:N.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e})(Nt);function PO(r){var e=0;T(r.children,function(a){PO(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}function _q(r,e){var t=Ft(e.get("color")),a=Ft(e.get(["aria","decal","decals"]));if(t){r=r||[];var i,n;T(r,function(s){var l=new Mt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(n=!0)});var o=r[0]||(r[0]={});return i||(o.color=t.slice()),!n&&a&&(o.decal=a.slice()),r}}var kO=xq;var bq=8,RO=8,Xw=5,Sq=(function(){function r(e){this.group=new K,e.add(this.group)}return r.prototype.render=function(e,t,a,i){var n=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!n.get("show")||!a)){var s=n.getModel("itemStyle"),l=n.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=Zt(e,t).refContainer,p={left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},h={emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]},d=Bt(p,f);this._prepare(a,h,u),this._renderContent(e,h,d,s,l,u,c,i),Mo(o,p,f)}},r.prototype._prepare=function(e,t,a){for(var i=e;i;i=i.parentNode){var n=ve(i.getModel().get("name"),""),o=a.getTextRect(n),s=Math.max(o.width+bq*2,t.emptyItemWidth);t.totalWidth+=s+RO,t.renderList.push({node:i,text:n,width:s})}},r.prototype._renderContent=function(e,t,a,i,n,o,s,l){for(var u=0,c=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),p=t.totalWidth,h=t.renderList,d=n.getModel("itemStyle").getItemStyle(),v=h.length-1;v>=0;v--){var m=h[v],g=m.node,y=m.width,x=m.text;p>a.width&&(p-=y-c,y=c,x=null);var _=new ye({shape:{points:wq(u,0,y,f,v===h.length-1,v===0)},style:J(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Dt({style:Gt(o,{text:x})}),textConfig:{position:"inside"},z2:Pn*1e4,onclick:ut(l,g)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=Gt(s,{text:x}),_.ensureState("emphasis").style=d,Rt(_,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(_),Tq(_,e,g),u+=y+RO}},r.prototype.remove=function(){this.group.removeAll()},r})();function wq(r,e,t,a,i,n){var o=[[i?r:r-Xw,e],[r+t,e],[r+t,e+a],[i?r:r-Xw,e+a]];return!n&&o.splice(2,0,[r+t+Xw,e+a/2]),!i&&o.push([r,e+a/2]),o}function Tq(r,e,t){nt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&jo(t,e)}}var NO=Sq;var Dq=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,i,n){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:i,easing:n}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,n=this._storage.length;iVO||Math.abs(t.dy)>VO)){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var a=t.originX,i=t.originY,n=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new at(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=n,u){var p=u.min||0,h=u.max||1/0;f=Math.max(Math.min(h,f),p)}var d=f/c.zoom;c.zoom=f;var v=this.seriesModel.layoutInfo;a-=v.x,i-=v.y;var m=fe();pr(m,m,[-a,-i]),Kl(m,m,[d,d]),pr(m,m,[a,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(i){if(a._state==="ready"){var n=a.seriesModel.get("nodeClick",!0);if(n){var o=a.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(n==="zoomToNode")a._zoomToNode(o);else if(n==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&al(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,i){var n=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new NO(this.group))).render(t,a,i.node,function(o){n._state!=="animating"&&($u(t.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Rp(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e})(Pt);function Rp(){return{nodeGroup:[],background:[],content:[]}}function Iq(r,e,t,a,i,n,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),p=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var h=c.width,d=c.height,v=c.borderWidth,m=c.invisible,g=o.getRawIndex(),y=s&&s.getRawIndex(),x=o.viewChildren,_=c.upperHeight,b=x&&x.length,S=p.getModel("itemStyle"),w=p.getModel(["emphasis","itemStyle"]),D=p.getModel(["blur","itemStyle"]),C=p.getModel(["select","itemStyle"]),M=S.get("borderRadius")||0,E=mt("nodeGroup",qw);if(!E)return;if(l.add(E),E.x=c.x||0,E.y=c.y||0,E.markRedraw(),Dg(E).nodeWidth=h,Dg(E).nodeHeight=d,c.isAboveViewRoot)return E;var L=mt("background",zO,u,Eq);L&&H(E,L,b&&c.upperLabelHeight);var A=p.getModel("emphasis"),P=A.get("focus"),R=A.get("blurScope"),k=A.get("disabled"),B=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Do(E)&&Rn(E,!1),L&&(Rn(L,!k),f.setItemGraphicEl(o.dataIndex,L),Vd(L,B,R));else{var U=mt("content",zO,u,Aq);U&&G(E,U),L.disableMorphing=!0,L&&Do(L)&&Rn(L,!1),Rn(E,!k),f.setItemGraphicEl(o.dataIndex,E);var F=p.getShallow("cursor");F&&U.attr("cursor",F),Vd(E,B,R)}return E;function H(Et,vt,It){var ct=nt(vt);if(ct.dataIndex=o.dataIndex,ct.seriesIndex=r.seriesIndex,vt.setShape({x:0,y:0,width:h,height:d,r:M}),m)Y(vt);else{vt.invisible=!1;var Ct=o.getVisual("style"),ae=Ct.stroke,Wt=FO(S);Wt.fill=ae;var Qt=Dl(w);Qt.fill=w.get("borderColor");var ue=Dl(D);ue.fill=D.get("borderColor");var $e=Dl(C);if($e.fill=C.get("borderColor"),It){var ma=h-2*v;rt(vt,ae,Ct.opacity,{x:v,y:0,width:ma,height:_})}else vt.removeTextContent();vt.setStyle(Wt),vt.ensureState("emphasis").style=Qt,vt.ensureState("blur").style=ue,vt.ensureState("select").style=$e,wi(vt)}Et.add(vt)}function G(Et,vt){var It=nt(vt);It.dataIndex=o.dataIndex,It.seriesIndex=r.seriesIndex;var ct=Math.max(h-2*v,0),Ct=Math.max(d-2*v,0);if(vt.culling=!0,vt.setShape({x:v,y:v,width:ct,height:Ct,r:M}),m)Y(vt);else{vt.invisible=!1;var ae=o.getVisual("style"),Wt=ae.fill,Qt=FO(S);Qt.fill=Wt,Qt.decal=ae.decal;var ue=Dl(w),$e=Dl(D),ma=Dl(C);rt(vt,Wt,ae.opacity,null),vt.setStyle(Qt),vt.ensureState("emphasis").style=ue,vt.ensureState("blur").style=$e,vt.ensureState("select").style=ma,wi(vt)}Et.add(vt)}function Y(Et){!Et.invisible&&n.push(Et)}function rt(Et,vt,It,ct){var Ct=p.getModel(ct?UO:BO),ae=ve(p.get("name"),null),Wt=Ct.getShallow("show");$t(Et,qt(p,ct?UO:BO),{defaultText:Wt?ae:null,inheritColor:vt,defaultOpacity:It,labelFetcher:r,labelDataIndex:o.dataIndex});var Qt=Et.getTextContent();if(Qt){var ue=Qt.style,$e=so(ue.padding||0);ct&&(Et.setTextConfig({layoutRect:ct}),Qt.disableLabelLayout=!0),Qt.beforeUpdate=function(){var Xr=Math.max((ct?ct.width:Et.shape.width)-$e[1]-$e[3],0),us=Math.max((ct?ct.height:Et.shape.height)-$e[0]-$e[2],0);(ue.width!==Xr||ue.height!==us)&&Qt.setStyle({width:Xr,height:us})},ue.truncateMinChar=2,ue.lineOverflow="truncate",st(ue,ct,c);var ma=Qt.getState("emphasis");st(ma?ma.style:null,ct,c)}}function st(Et,vt,It){var ct=Et?Et.text:null;if(!vt&&It.isLeafRoot&&ct!=null){var Ct=r.get("drillDownIcon",!0);Et.text=Ct?Ct+" "+ct:ct}}function mt(Et,vt,It,ct){var Ct=y!=null&&t[Et][y],ae=i[Et];return Ct?(t[Et][y]=null,Ht(ae,Ct)):m||(Ct=new vt,Ct instanceof ke&&(Ct.z2=Pq(It,ct)),Kt(ae,Ct)),e[Et][g]=Ct}function Ht(Et,vt){var It=Et[g]={};vt instanceof qw?(It.oldX=vt.x,It.oldY=vt.y):It.oldShape=O({},vt.shape)}function Kt(Et,vt){var It=Et[g]={},ct=o.parentNode,Ct=vt instanceof K;if(ct&&(!a||a.direction==="drillDown")){var ae=0,Wt=0,Qt=i.background[ct.getRawIndex()];!a&&Qt&&Qt.oldShape&&(ae=Qt.oldShape.width,Wt=Qt.oldShape.height),Ct?(It.oldX=0,It.oldY=Wt):It.oldShape={x:ae,y:Wt,width:0,height:0}}It.fadein=!Ct}}function Pq(r,e){return r*Mq+e}var HO=Lq;var zp=T,kq=et,Eg=-1,Jw=(function(){function r(e){var t=e.mappingMethod,a=e.type,i=this.option=tt(e);this.type=a,this.mappingMethod=t,this._normalizeData=Oq[t];var n=r.visualHandlers[a];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(jw(i),Rq(i)):t==="category"?i.categories?Nq(i):jw(i,!0):(ee(t!=="linear"||i.dataExtent),jw(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return Z(this._normalizeData,this)},r.listVisualTypes=function(){return gt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){et(e)?T(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var i,n=z(e)?[]:et(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);i?n=l:n[s]=l}),n},r.retrieveVisuals=function(e){var t={},a;return e&&zp(r.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(z(e))e=e.slice();else if(kq(e)){var t=[];zp(e,function(a,i){t.push(i)}),e=t}else return[];return e.sort(function(a,i){return i==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var i,n=1/0,o=0,s=t.length;o=0;n--)a[n]==null&&(delete t[e[n]],e.pop())}function jw(r,e){var t=r.visual,a=[];et(t)?zp(t,function(n){a.push(n)}):t!=null&&a.push(t);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(r.type)&&(a[1]=a[0]),WO(r,a)}function Cg(r){return{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("color",r(t("color"),i))},_normalizedToVisual:$w([0,1])}}function GO(r){var e=this.option.visual;return e[Math.round(zt(r,[0,1],[0,e.length-1],!0))]||{}}function Np(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function Op(r){var e=this.option.visual;return e[this.option.loop&&r!==Eg?r%e.length:r]}function Cl(){return this.option.visual[0]}function $w(r){return{linear:function(e){return zt(e,r,this.option.visual,!0)},category:Op,piecewise:function(e,t){var a=Kw.call(this,t);return a==null&&(a=zt(e,r,this.option.visual,!0)),a},fixed:Cl}}function Kw(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=Jw.findPieceIndex(r,t),i=t[a];if(i&&i.visual)return i.visual[this.type]}}function WO(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=V(e,function(t){var a=Ze(t);return a||[0,0,0,1]})),e}var Oq={linear:function(r){return zt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Jw.findPieceIndex(r,e,!0);if(t!=null)return zt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e==null?Eg:e},fixed:ie};function Mg(r,e,t){return r?e<=t:e=t.length||v===t[v.depth]){var g=Fq(i,l,v,m,d,a);qO(v,g,t,a)}})}}}function Vq(r,e,t){var a=O({},e),i=t.designatedVisualItemStyle;return T(["color","colorAlpha","colorSaturation"],function(n){i[n]=e[n];var o=r.get(n);i[n]=null,o!=null&&(a[n]=o)}),a}function YO(r){var e=Qw(r,"color");if(e){var t=Qw(r,"colorAlpha"),a=Qw(r,"colorSaturation");return a&&(e=Ua(e,null,null,a)),t&&(e=ws(e,t)),e}}function Bq(r,e){return e!=null?Ua(e,null,null,r):null}function Qw(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function Uq(r,e,t,a,i,n){if(!(!n||!n.length)){var o=tT(e,"color")||i.color!=null&&i.color!=="none"&&(tT(e,"colorAlpha")||tT(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var p=new Le(f);return ZO(p).drColorMappingBy=c,p}}}function tT(r,e){var t=r.get(e);return z(t)&&t.length?{name:e,range:t}:null}function Fq(r,e,t,a,i,n){var o=O({},e);if(i){var s=i.type,l=s==="color"&&ZO(i).drColorMappingBy,u=l==="index"?a:l==="id"?n.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Vp=Math.max,Ag=Math.min,jO=de,eT=T,KO=["itemStyle","borderWidth"],Hq=["itemStyle","gapWidth"],Gq=["upperLabel","show"],Wq=["upperLabel","height"],JO={seriesType:"treemap",reset:function(r,e,t,a){var i=r.option,n=Zt(r,t).refContainer,o=Bt(r.getBoxLayoutParams(),n),s=i.size||[],l=j(jO(o.width,s[0]),n.width),u=j(jO(o.height,s[1]),n.height),c=a&&a.type,f=["treemapZoomToNode","treemapRootToNode"],p=Jn(a,f,r),h=c==="treemapRender"||c==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),v=Hw(d);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?$q(r,p,d,l,u):h?[h.width,h.height]:[l,u],g=i.sort;g&&g!=="asc"&&g!=="desc"&&(g="desc");var y={squareRatio:i.squareRatio,sort:g,leafDepth:i.leafDepth};d.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};d.setLayout(x),QO(d,y,!1,0),x=d.getLayout(),eT(v,function(b,S){var w=(v[S+1]||d).getValue();b.setLayout(O({dataExtent:[w,w],borderWidth:0,upperHeight:0},x))})}var _=r.getData().tree.root;_.setLayout(Kq(o,h,p),!0),r.setLayoutInfo(o),tz(_,new at(-o.x,-o.y,t.getWidth(),t.getHeight()),v,d,0)}};function QO(r,e,t,a){var i,n;if(!r.isRemoved()){var o=r.getLayout();i=o.width,n=o.height;var s=r.getModel(),l=s.get(KO),u=s.get(Hq)/2,c=ez(s),f=Math.max(l,c),p=l-u,h=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=Vp(i-2*p,0),n=Vp(n-p-h,0);var d=i*n,v=Yq(r,s,d,e,t,a);if(v.length){var m={x:p,y:h,width:i,height:n},g=Ag(i,n),y=1/0,x=[];x.area=0;for(var _=0,b=v.length;_=0;l--){var u=i[a==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function jq(r,e,t){for(var a=0,i=1/0,n=0,o=void 0,s=r.length;na&&(a=o));var l=r.area*r.area,u=e*e*t;return l?Vp(u*a/l,l/(u*i)):1/0}function $O(r,e,t,a,i){var n=e===t.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=t[s[n]],c=e?r.area/e:0;(i||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,p=r.length;fdx&&(u=dx),n=s}ua&&(a=e);var n=a%2?a+2:a+3;i=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=_[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var D=-Math.atan2(_[1],_[0]);f[0].8?"left":p[0]<-.8?"right":"center",v=p[1]>.8?"top":p[1]<-.8?"bottom":"middle";break;case"start":n.x=-p[0]*g+c[0],n.y=-p[1]*y+c[1],d=p[0]>.8?"right":p[0]<-.8?"left":"center",v=p[1]>.8?"bottom":p[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=g*w+c[0],n.y=c[1]+C,d=_[0]<0?"right":"left",n.originX=-g*w,n.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=S[0],n.y=S[1]+C,d="center",n.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-g*w+f[0],n.y=f[1]+C,d=_[0]>=0?"right":"left",n.originX=g*w,n.originY=-C;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||v,align:n.__align||d})}},e})(K),ec=ij;var nj=(function(){function r(e){this.group=new K,this._LineCtor=e||ec}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,i=a.group,n=a._lineData;a._lineData=e,n||i.removeAll();var o=hz(e);e.diff(n).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(n,e,l,s,o)}).remove(function(s){i.remove(n.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=hz(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!oj(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function hz(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:qt(e)}}function dz(r){return isNaN(r[0])||isNaN(r[1])}function yT(r){return r&&!dz(r[0])&&!dz(r[1])}var rc=nj;var xT=[],_T=[],bT=[],ac=Pe,ST=Cn,vz=Math.abs;function mz(r,e,t){for(var a=r[0],i=r[1],n=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){xT[0]=ac(a[0],i[0],n[0],c),xT[1]=ac(a[1],i[1],n[1],c);var f=vz(ST(xT,e)-l);f=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Fp(r,e){var t=[],a=ho,i=[[],[],[]],n=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[jr(u[0]),jr(u[1])],u[2]&&u.__original.push(jr(u[2])));var p=u.__original;if(u[2]!=null){if(Je(i[0],p[0]),Je(i[1],p[2]),Je(i[2],p[1]),c&&c!=="none"){var h=El(s.node1),d=mz(i,p[0],h*e);a(i[0][0],i[1][0],i[2][0],d,t),i[0][0]=t[3],i[1][0]=t[4],a(i[0][1],i[1][1],i[2][1],d,t),i[0][1]=t[3],i[1][1]=t[4]}if(f&&f!=="none"){var h=El(s.node2),d=mz(i,p[1],h*e);a(i[0][0],i[1][0],i[2][0],d,t),i[1][0]=t[1],i[2][0]=t[2],a(i[0][1],i[1][1],i[2][1],d,t),i[1][1]=t[1],i[2][1]=t[2]}Je(u[0],i[0]),Je(u[1],i[2]),Je(u[2],i[1])}else{if(Je(n[0],p[0]),Je(n[1],p[1]),vi(o,n[1],n[0]),Na(o,o),c&&c!=="none"){var h=El(s.node1);Zc(n[0],n[0],o,h*e)}if(f&&f!=="none"){var h=El(s.node2);Zc(n[1],n[1],o,-h*e)}Je(u[0],n[0]),Je(u[1],n[1])}})}var gz=ot();function yz(r){if(r)return gz(r).bridge}function wT(r,e){r&&(gz(r).bridge=e)}function xz(r){return r.type==="view"}var sj=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var i=new mn,n=new rc,o=this.group,s=new K;this._controller=new va(a.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(n.group),o.add(s),this._symbolDraw=i,this._lineDraw=n,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(t,a,i){var n=this,o=t.coordinateSystem,s=!1;this._model=t,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(xz(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):wt(this._mainGroup,f,t)}Fp(t.getGraph(),Ml(t));var p=t.getData();u.updateData(p);var h=t.getEdgeData();c.updateData(h),this._updateNodeAndLinkScale(),this._updateController(null,t,i),clearTimeout(this._layoutTimeout);var d=t.forceLayout,v=t.get(["force","layoutAnimation"]);d&&(s=!0,this._startForceLayoutIteration(d,i,v));var m=t.get("layout");p.graph.eachNode(function(_){var b=_.dataIndex,S=_.getGraphicEl(),w=_.getModel();if(S){S.off("drag").off("dragend");var D=w.get("draggable");D&&S.on("drag",function(M){switch(m){case"force":d.warmUp(),!n._layouting&&n._startForceLayoutIteration(d,i,v),d.setFixed(b),p.setItemLayout(b,[S.x,S.y]);break;case"circular":p.setItemLayout(b,[S.x,S.y]),_.setLayout({fixed:!0},!0),Qu(t,"symbolSize",_,[M.offsetX,M.offsetY]),n.updateLayout(t);break;default:p.setItemLayout(b,[S.x,S.y]),Up(t.getGraph(),t),n.updateLayout(t);break}}).on("dragend",function(){d&&d.setUnfixed(b)}),S.setDraggable(D,!!w.get("cursor"));var C=w.get(["emphasis","focus"]);C==="adjacency"&&(nt(S).focus=_.getAdjacentDataIndices())}}),p.graph.eachEdge(function(_){var b=_.getGraphicEl(),S=_.getModel().get(["emphasis","focus"]);b&&S==="adjacency"&&(nt(b).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=p.getLayout("cx"),x=p.getLayout("cy");p.graph.eachNode(function(_){cT(_,g,y,x)}),this._firstRender=!1,s||this._renderThumbnail(t,i,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a,i){var n=this,o=!1;(function s(){t.step(function(l){n.updateLayout(n._model),(l||!o)&&(o=!0,n._renderThumbnail(n._model,a,n._symbolDraw,n._lineDraw)),(n._layouting=!l)&&(i?n._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(t,a,i){var n=this._controller,o=this._controllerHost,s=a.coordinateSystem;if(!xz(s)){n.disable();return}n.enable(a.get("roam"),{api:i,zInfo:{component:a},triggerInfo:{roamTrigger:a.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!t||t.contain(u,c)}}}),o.zoomLimit=a.get("scaleLimit"),o.zoom=s.getZoom(),n.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:a.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(t,a,i){this._active&&(Ap(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(t,a,i){this._active&&(Lp(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),Fp(t.getGraph(),Ml(t)),this._lineDraw.updateLayout(),a.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),i=Ml(t);a.eachItemGraphicEl(function(n,o){n&&n.setSymbolScale(i)})},e.prototype.updateLayout=function(t){this._active&&(Fp(t.getGraph(),Ml(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var t=this._model,a=t.coordinateSystem;if(a.type==="view"){var i=yz(t);if(i)return{bridge:i,coordSys:a}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(t.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(t,a,i,n){var o=this._getThumbnailInfo();if(o){var s=new K,l=i.group.children(),u=n.group.children(),c=new K,f=new K;s.add(f),s.add(c);for(var p=0;p=0&&e.call(t,a[n],n)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,i=a.length,n=0;n=0&&a[n].node1.dataIndex>=0&&a[n].node2.dataIndex>=0&&e.call(t,a[n],n)},r.prototype.breadthFirstTraverse=function(e,t,a,i){if(t instanceof Al||(t=this._nodesMap[ic(t)]),!!t){for(var n=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var n=0,o=i.length;n=0&&!e.hasKey(d)&&(e.set(d,!0),o.push(h.node1))}for(l=0;l=0&&!e.hasKey(x)&&(e.set(x,!0),s.push(y.node2))}}}return{edge:e.keys(),node:t.keys()}},r})(),bz=(function(){function r(e,t,a){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=a==null?-1:a}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.edgeData.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=q(),t=q();e.set(this.dataIndex,!0);for(var a=[this.node1],i=[this.node2],n=0;n=0&&!e.hasKey(f)&&(e.set(f,!0),a.push(c.node1))}for(n=0;n=0&&!e.hasKey(v)&&(e.set(v,!0),i.push(d.node2))}return{edge:e.keys(),node:t.keys()}},r})();function Sz(r,e){return{getValue:function(t){var a=this[r][e];return a.getStore().get(a.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,a){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}Jt(Al,Sz("hostGraph","data"));Jt(bz,Sz("hostGraph","edgeData"));var wz=lj;function Ll(r,e,t,a,i){for(var n=new wz(a),o=0;o "+p)),u++)}var h=t.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar"||h==="matrix")d=lr(r,t);else{var v=Fn.get(h),m=v?v.dimensions||[]:[];lt(m,"value")<0&&m.concat(["value"]);var g=Ri(r,{coordDimensions:m,encodeDefine:t.getEncode()}).dimensions;d=new we(g,t),d.initData(r)}var y=new we(["value"],t);return y.initData(l,s),i&&i(d,y),Tg({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var uj=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function i(){return a._categoriesData}this.legendVisualProvider=new ai(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),ba(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i){iz(this);var s=Ll(n,i,this,!0,l);return T(s.edges,function(u){nz(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(d){var v=o._categoriesModels,m=d.getShallow("category"),g=v[m];return g&&(g.parentModel=d.parentModel,d.parentModel=g),d});var f=Mt.prototype.getModel;function p(d,v){var m=f.call(this,d,v);return m.resolveParentPath=h,m}c.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=p,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var v=d.slice();return d[0]==="label"?v[0]="edgeLabel":d[1]==="label"&&(v[1]="edgeLabel"),v}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,i){if(i==="edge"){var n=this.getData(),o=this.getDataParams(t,i),s=n.graph.getEdgeByIndex(t),l=n.getName(s.node1.dataIndex),u=n.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),re("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=qv({series:this,dataIndex:t,multipleSeries:a});return f},e.prototype._updateCategoriesData=function(){var t=V(this.option.categories||[],function(i){return i.value!=null?i:O({value:0},i)}),a=new we(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(i){return a.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:N.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:N.color.primary}}},e})(Nt),Tz=uj;function TT(r){r.registerChartView(_z),r.registerSeriesModel(Tz),r.registerProcessor(aT),r.registerVisual(iT),r.registerVisual(nT),r.registerLayout(lT),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,fT),r.registerLayout(pT),r.registerCoordinateSystem("graphView",{dimensions:Ia.dimensions,create:hT}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ie),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ie),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",query:e},function(i){var n=a.getViewOfSeriesModel(i);n&&(e.dx!=null&&e.dy!=null&&n.updateViewOnPan(i,a,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&n.updateViewOnZoom(i,a,e));var o=i.coordinateSystem,s=Xo(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var cj=(function(r){I(e,r);function e(t,a,i){var n=r.call(this)||this;nt(n).dataType="node",n.z2=2;var o=new Dt;return n.setTextContent(o),n.updateData(t,a,i,!0),n}return e.prototype.updateData=function(t,a,i,n){var o=this,s=t.graph.getNodeByIndex(a),l=t.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=t.getItemLayout(a),p=O(Gr(u.getModel("itemStyle"),f,!0),f),h=this;if(isNaN(p.startAngle)){h.setShape(p);return}n?h.setShape(p):wt(h,{shape:p},l,a);var d=O(Gr(u.getModel("itemStyle"),f,!0),f);o.setShape(d),o.useStyle(t.getItemVisual(a,"style")),te(o,u),this._updateLabel(l,u,s),t.setItemGraphicEl(a,h),te(h,u,"itemStyle");var v=c.get("focus");Rt(this,v==="adjacency"?s.getAdjacentDataIndices():v,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(t,a,i){var n=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=a.getModel("label");n.ignore=!c.get("show");var f=qt(a),p=i.getVisual("style");$t(n,f,{labelFetcher:{getFormattedLabel:function(y,x,_,b,S,w){return t.getFormattedLabel(y,x,"node",b,Te(S,f.normal&&f.normal.get("formatter"),a.get("name")),w)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:p.fill,defaultOpacity:p.opacity,defaultOutsidePosition:"startArc"});var h=c.get("position")||"outside",d=c.get("distance")||0,v;h==="outside"?v=o.r+d:v=(o.r+o.r0)/2,this.textConfig={inside:h!=="outside"};var m=h!=="outside"?c.get("align")||"center":l>0?"left":"right",g=h!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";n.attr({x:l*v+o.cx,y:u*v+o.cy,rotation:0,style:{align:m,verticalAlign:g}})},e})(De),DT=cj;var Cz=(function(r){I(e,r);function e(t,a,i,n){var o=r.call(this)||this;return nt(o).dataType="edge",o.updateData(t,a,i,n,!0),o}return e.prototype.buildPath=function(t,a){t.moveTo(a.s1[0],a.s1[1]);var i=.7,n=a.clockwise;t.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!n),t.bezierCurveTo((a.cx-a.s2[0])*i+a.s2[0],(a.cy-a.s2[1])*i+a.s2[1],(a.cx-a.t1[0])*i+a.t1[0],(a.cy-a.t1[1])*i+a.t1[1],a.t1[0],a.t1[1]),t.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!n),t.bezierCurveTo((a.cx-a.t2[0])*i+a.t2[0],(a.cy-a.t2[1])*i+a.t2[1],(a.cx-a.s1[0])*i+a.s1[0],(a.cy-a.s1[1])*i+a.s1[1],a.s1[0],a.s1[1]),t.closePath()},e.prototype.updateData=function(t,a,i,n,o){var s=t.hostModel,l=a.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),f=a.getItemModel(l.dataIndex),p=f.getModel("lineStyle"),h=f.getModel("emphasis"),d=h.get("focus"),v=O(Gr(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(v.sStartAngle)||isNaN(v.tStartAngle)){m.setShape(v);return}o?(m.setShape(v),Dz(m,l,t,p)):(Re(m),Dz(m,l,t,p),wt(m,{shape:v},s,i)),Rt(this,d==="adjacency"?l.getAdjacentDataIndices():d,h.get("blurScope"),h.get("disabled")),te(m,f,"lineStyle"),a.setItemGraphicEl(l.dataIndex,m)},e})(ft);function Dz(r,e,t,a){var i=e.node1,n=e.node2,o=r.style;r.setStyle(a.getLineStyle());var s=a.get("color");switch(s){case"source":o.fill=t.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=t.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"gradient":var l=t.getItemVisual(i.dataIndex,"style").fill,u=t.getItemVisual(n.dataIndex,"style").fill;if(W(l)&&W(u)){var c=r.shape,f=(c.s1[0]+c.s2[0])/2,p=(c.s1[1]+c.s2[1])/2,h=(c.t1[0]+c.t2[0])/2,d=(c.t1[1]+c.t2[1])/2;o.fill=new Za(f,p,h,d,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var fj=Math.PI/180,pj=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){},e.prototype.render=function(t,a,i){var n=t.getData(),o=this._data,s=this.group,l=-t.get("startAngle")*fj;if(n.diff(o).add(function(c){var f=n.getItemLayout(c);if(f){var p=new DT(n,c,l);nt(p).dataIndex=c,s.add(p)}}).update(function(c,f){var p=o.getItemGraphicEl(f),h=n.getItemLayout(c);if(!h){p&&oa(p,t,f);return}p?p.updateData(n,c,l):p=new DT(n,c,l),s.add(p)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&oa(f,t,c)}).execute(),!o){var u=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=j(u[0],i.getWidth()),this.group.originY=j(u[1],i.getHeight()),Vt(this.group,{scaleX:1,scaleY:1},t)}this._data=n,this.renderEdges(t,l)},e.prototype.renderEdges=function(t,a){var i=t.getData(),n=t.getEdgeData(),o=this._edgeData,s=this.group;n.diff(o).add(function(l){var u=new Cz(i,n,l,a);nt(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,n,l,a),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&oa(u,t,l)}).execute(),this._edgeData=n},e.prototype.dispose=function(){},e.type="chord",e})(Pt),Mz=pj;var hj=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new ai(Z(this.getData,this),Z(this.getRawData,this))},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},e.prototype.getInitialData=function(t,a){var i=t.edges||t.links||[],n=t.data||t.nodes||[];if(n&&i){var o=Ll(n,i,this,!0,s);return o.data}function s(l,u){var c=Mt.prototype.getModel;function f(h,d){var v=c.call(this,h,d);return v.resolveParentPath=p,v}u.wrapMethod("getItemModel",function(h){return h.resolveParentPath=p,h.getModel=f,h});function p(h){if(h&&(h[0]==="label"||h[1]==="label")){var d=h.slice();return h[0]==="label"?d[0]="edgeLabel":h[1]==="label"&&(d[1]="edgeLabel"),d}return h}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,i){var n=this.getDataParams(t,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(t),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),re("nameValue",{name:c.join(" > "),value:n.value,noValue:n.value==null})}return re("nameValue",{name:n.name,value:n.value,noValue:n.value==null})},e.prototype.getDataParams=function(t,a){var i=r.prototype.getDataParams.call(this,t,a);if(a==="node"){var n=this.getData(),o=this.getGraph().getNodeByIndex(t);if(i.name==null&&(i.name=n.getName(t)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e})(Nt),Ez=hj;var CT=Math.PI/180;function MT(r,e){r.eachSeriesByType("chord",function(t){dj(t,e)})}function dj(r,e){var t=r.getData(),a=t.graph,i=r.getEdgeData(),n=i.count();if(n){var o=Cv(r,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((r.get("padAngle")||0)*CT,0),p=Math.max((r.get("minAngle")||0)*CT,0),h=-r.get("startAngle")*CT,d=h+Math.PI*2,v=r.get("clockwise"),m=v?1:-1,g=[h,d];Us(g,!v);var y=g[0],x=g[1],_=x-y,b=t.getSum("value")===0&&i.getSum("value")===0,S=[],w=0;a.eachEdge(function(F){var H=b?1:F.getValue("value");b&&(H>0||p)&&(w+=2);var G=F.node1.dataIndex,Y=F.node2.dataIndex;S[G]=(S[G]||0)+H,S[Y]=(S[Y]||0)+H});var D=0;if(a.eachNode(function(F){var H=F.getValue("value");isNaN(H)||(S[F.dataIndex]=Math.max(H,S[F.dataIndex]||0)),!b&&(S[F.dataIndex]>0||p)&&w++,D+=S[F.dataIndex]||0}),!(w===0||D===0)){f*w>=Math.abs(_)&&(f=Math.max(0,(Math.abs(_)-p*w)/w)),(f+p)*w>=Math.abs(_)&&(p=(Math.abs(_)-f*w)/w);var C=(_-f*w*m)/D,M=0,E=0,L=0,A=1/0;a.eachNode(function(F){var H=S[F.dataIndex]||0,G=C*(D?H:1)*m;Math.abs(G)E){var R=M/E;a.eachNode(function(F){var H=F.getLayout().angle;Math.abs(H)>=p?F.setLayout({angle:H*R,ratio:R},!0):F.setLayout({angle:p,ratio:p===0?1:H/p},!0)})}else a.eachNode(function(F){if(!P){var H=F.getLayout().angle,G=Math.min(H/L,1),Y=G*M;H-Yp&&p>0){var G=P?1:Math.min(H/L,1),Y=H-p,rt=Math.min(Y,Math.min(k,M*G));k-=rt,F.setLayout({angle:H-rt,ratio:(H-rt)/H},!0)}else p>0&&F.setLayout({angle:p,ratio:H===0?1:p/H},!0)}});var B=y,U=[];a.eachNode(function(F){var H=Math.max(F.getLayout().angle,p);F.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:B,endAngle:B+H*m,clockwise:v},!0),U[F.dataIndex]=B,B+=(H+f)*m}),a.eachEdge(function(F){var H=b?1:F.getValue("value"),G=C*(D?H:1)*m,Y=F.node1.dataIndex,rt=U[Y]||0,st=Math.abs((F.node1.getLayout().ratio||1)*G),mt=rt+st*m,Ht=[s+c*Math.cos(rt),l+c*Math.sin(rt)],Kt=[s+c*Math.cos(mt),l+c*Math.sin(mt)],Et=F.node2.dataIndex,vt=U[Et]||0,It=Math.abs((F.node2.getLayout().ratio||1)*G),ct=vt+It*m,Ct=[s+c*Math.cos(vt),l+c*Math.sin(vt)],ae=[s+c*Math.cos(ct),l+c*Math.sin(ct)];F.setLayout({s1:Ht,s2:Kt,sStartAngle:rt,sEndAngle:mt,t1:Ct,t2:ae,tStartAngle:vt,tEndAngle:ct,cx:s,cy:l,r:c,value:H,clockwise:v}),U[Y]=mt,U[Et]=ct})}}}function ET(r){r.registerChartView(Mz),r.registerSeriesModel(Ez),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,MT),r.registerProcessor(Ea("chord"))}var vj=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),mj=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new vj},e.prototype.buildPath=function(t,a){var i=Math.cos,n=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-i(l)*s*(s>=o/3?1:2),c=a.y-n(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(a.x+i(l)*s,a.y+n(l)*s),t.lineTo(a.x+i(a.angle)*o,a.y+n(a.angle)*o),t.lineTo(a.x-i(l)*s,a.y-n(l)*s),t.lineTo(u,c)},e})(ft),Az=mj;function gj(r,e){var t=r.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i),o=j(t[0],e.getWidth()),s=j(t[1],e.getHeight()),l=j(r.get("radius"),n/2);return{cx:o,cy:s,r:l}}function Rg(r,e){var t=r==null?"":r+"";return e&&(W(e)?t=e.replace("{value}",t):$(e)&&(t=e(r))),t}var yj=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=gj(t,i);this._renderMain(t,a,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,i,n,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),p=f.get("roundCap"),h=p?Zu:De,d=f.get("show"),v=f.getModel("lineStyle"),m=v.get("width"),g=[u,c];Us(g,!l),u=g[0],c=g[1];for(var y=c-u,x=u,_=[],b=0;d&&b=C&&(M===0?0:n[M-1][0])Math.PI/2&&(st+=Math.PI)):rt==="tangential"?st=-D-Math.PI/2:yt(rt)&&(st=rt*Math.PI/180),st===0?f.add(new Dt({style:Gt(x,{text:F,x:G,y:Y,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:H}),silent:!0})):f.add(new Dt({style:Gt(x,{text:F,x:G,y:Y,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:G,originY:Y,rotation:st}))}if(y.get("show")&&k!==_){var B=y.get("distance");B=B?B+c:c;for(var mt=0;mt<=b;mt++){P=Math.cos(D),R=Math.sin(D);var Ht=new le({shape:{x1:P*(d-B)+p,y1:R*(d-B)+h,x2:P*(d-w-B)+p,y2:R*(d-w-B)+h},silent:!0,style:L});L.stroke==="auto"&&Ht.setStyle({stroke:n((k+mt/b)/_)}),f.add(Ht),D+=M}D-=M}else D+=C}},e.prototype._renderPointer=function(t,a,i,n,o,s,l,u,c){var f=this.group,p=this._data,h=this._progressEls,d=[],v=t.get(["pointer","show"]),m=t.getModel("progress"),g=m.get("show"),y=t.getData(),x=y.mapDimension("value"),_=+t.get("min"),b=+t.get("max"),S=[_,b],w=[s,l];function D(M,E){var L=y.getItemModel(M),A=L.getModel("pointer"),P=j(A.get("width"),o.r),R=j(A.get("length"),o.r),k=t.get(["pointer","icon"]),B=A.get("offsetCenter"),U=j(B[0],o.r),F=j(B[1],o.r),H=A.get("keepAspect"),G;return k?G=jt(k,U-P/2,F-R,P,R,null,H):G=new Az({shape:{angle:-Math.PI/2,width:P,r:R,x:U,y:F}}),G.rotation=-(E+Math.PI/2),G.x=o.cx,G.y=o.cy,G}function C(M,E){var L=m.get("roundCap"),A=L?Zu:De,P=m.get("overlap"),R=P?m.get("width"):c/y.count(),k=P?o.r-R:o.r-(M+1)*R,B=P?o.r:o.r-M*R,U=new A({shape:{startAngle:s,endAngle:E,cx:o.cx,cy:o.cy,clockwise:u,r0:k,r:B}});return P&&(U.z2=zt(y.get(x,M),[_,b],[100,0],!0)),U}(g||v)&&(y.diff(p).add(function(M){var E=y.get(x,M);if(v){var L=D(M,s);Vt(L,{rotation:-((isNaN(+E)?w[0]:zt(E,S,w,!0))+Math.PI/2)},t),f.add(L),y.setItemGraphicEl(M,L)}if(g){var A=C(M,s),P=m.get("clip");Vt(A,{shape:{endAngle:zt(E,S,w,P)}},t),f.add(A),xf(t.seriesIndex,y.dataType,M,A),d[M]=A}}).update(function(M,E){var L=y.get(x,M);if(v){var A=p.getItemGraphicEl(E),P=A?A.rotation:s,R=D(M,P);R.rotation=P,wt(R,{rotation:-((isNaN(+L)?w[0]:zt(L,S,w,!0))+Math.PI/2)},t),f.add(R),y.setItemGraphicEl(M,R)}if(g){var k=h[E],B=k?k.shape.endAngle:s,U=C(M,B),F=m.get("clip");wt(U,{shape:{endAngle:zt(L,S,w,F)}},t),f.add(U),xf(t.seriesIndex,y.dataType,M,U),d[M]=U}}).execute(),y.each(function(M){var E=y.getItemModel(M),L=E.getModel("emphasis"),A=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(v){var k=y.getItemGraphicEl(M),B=y.getItemVisual(M,"style"),U=B.fill;if(k instanceof se){var F=k.style;k.useStyle(O({image:F.image,x:F.x,y:F.y,width:F.width,height:F.height},B))}else k.useStyle(B),k.type!=="pointer"&&k.setColor(U);k.setStyle(E.getModel(["pointer","itemStyle"]).getItemStyle()),k.style.fill==="auto"&&k.setStyle("fill",n(zt(y.get(x,M),S,[0,1],!0))),k.z2EmphasisLift=0,te(k,E),Rt(k,A,P,R)}if(g){var H=d[M];H.useStyle(y.getItemVisual(M,"style")),H.setStyle(E.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,te(H,E),Rt(H,A,P,R)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,a){var i=t.getModel("anchor"),n=i.get("show");if(n){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=jt(s,a.cx-o/2+j(l[0],a.r),a.cy-o/2+j(l[1],a.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,a,i,n,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),p=new K,h=[],d=[],v=t.isAnimationEnabled(),m=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(g){h[g]=new Dt({silent:!0}),d[g]=new Dt({silent:!0})}).update(function(g,y){h[g]=s._titleEls[y],d[g]=s._detailEls[y]}).execute(),l.each(function(g){var y=l.getItemModel(g),x=l.get(u,g),_=new K,b=n(zt(x,[c,f],[0,1],!0)),S=y.getModel("title");if(S.get("show")){var w=S.get("offsetCenter"),D=o.cx+j(w[0],o.r),C=o.cy+j(w[1],o.r),M=h[g];M.attr({z2:m?0:2,style:Gt(S,{x:D,y:C,text:l.getName(g),align:"center",verticalAlign:"middle"},{inheritColor:b})}),_.add(M)}var E=y.getModel("detail");if(E.get("show")){var L=E.get("offsetCenter"),A=o.cx+j(L[0],o.r),P=o.cy+j(L[1],o.r),R=j(E.get("width"),o.r),k=j(E.get("height"),o.r),B=t.get(["progress","show"])?l.getItemVisual(g,"style").fill:b,M=d[g],U=E.get("formatter");M.attr({z2:m?0:2,style:Gt(E,{x:A,y:P,text:Rg(x,U),width:isNaN(R)?null:R,height:isNaN(k)?null:k,align:"center",verticalAlign:"middle"},{inheritColor:B})}),rv(M,{normal:E},x,function(H){return Rg(H,U)}),v&&av(M,g,l,t,{getFormattedLabel:function(H,G,Y,rt,st,mt){return Rg(mt?mt.interpolatedValue:x,U)}}),_.add(M)}p.add(_)}),this.group.add(p),this._titleEls=h,this._detailEls=d},e.type="gauge",e})(Pt),Lz=yj;var xj=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return Aa(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,N.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:N.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:N.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:N.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:N.color.neutral00,borderWidth:0,borderColor:N.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:N.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:N.color.transparent,borderWidth:0,borderColor:N.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:N.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e})(Nt),Iz=xj;function AT(r){r.registerChartView(Lz),r.registerSeriesModel(Iz)}var _j=["itemStyle","opacity"],bj=(function(r){I(e,r);function e(t,a){var i=r.call(this)||this,n=i,o=new he,s=new Dt;return n.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,a,!0),i}return e.prototype.updateData=function(t,a,i){var n=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),c=s.get(_j);c=c==null?1:c,i||Re(n),n.useStyle(t.getItemVisual(a,"style")),n.style.lineJoin="round",i?(n.setShape({points:l.points}),n.style.opacity=0,Vt(n,{style:{opacity:c}},o,a)):wt(n,{style:{opacity:c},shape:{points:l.points}},o,a),te(n,s),this._updateLabel(t,a),Rt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),c=u.label,f=t.getItemVisual(a,"style"),p=f.fill;$t(o,qt(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:f.opacity,defaultText:t.getName(a)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var h=l.getModel("label"),d=h.get("color"),v=d==="inherit"?p:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:v,outsideFill:v});var m=c.linePoints;n.setShape({points:m}),i.textGuideLineConfig={anchor:m?new pt(m[0][0],m[0][1]):null},wt(o,{style:{x:c.x,y:c.y}},s,a),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),Fu(i,Hu(l),{stroke:p})},e})(ye),Sj=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this._data,s=this.group;n.diff(o).add(function(l){var u=new bj(n,l);n.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(n,l),s.add(c),n.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);oa(u,t,l)}).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e})(Pt),Pz=Sj;var wj=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ai(Z(this.getData,this),Z(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return Aa(this,{coordDimensions:["value"],encodeDefaulter:ut(Cu,this)})},e.prototype._defaultLabelLine=function(t){ba(t,"labelLine",["show"]);var a=t.labelLine,i=t.emphasis.labelLine;a.show=a.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),i=r.prototype.getDataParams.call(this,t),n=a.mapDimension("value"),o=a.getSum(n);return i.percent=o?+(a.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:N.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:N.color.primary}}},e})(Nt),kz=wj;function Tj(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),i=[],n=e==="ascending",o=0,s=r.count();ozj)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!RT(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function RT(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var Uz=Vj;var Uj=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var a=this.option;t&&dt(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var i=t.get("parallelIndex");return i!=null&&a.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){T(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],i=At(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);T(i,function(n){t.push("dim"+n.get("dim")),a.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e})(St),Fz=Uj;var Fj=(function(r){I(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.type=n||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e})(ur),Hz=Fj;function Yr(r,e,t,a,i,n){r=r||0;var o=t[1]-t[0];if(i!=null&&(i=nc(i,[0,o])),n!=null&&(n=Math.max(n,i!=null?i:0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=nc(s,[0,o]),i=n=nc(s,[i,n]),a=0}e[0]=nc(e[0],t),e[1]=nc(e[1],t);var l=NT(e,a);e[a]+=r;var u=i||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[a]=nc(e[a],c);var f;return f=NT(e,a),i!=null&&(f.sign!==l.sign||f.spann&&(e[1-a]=e[a]+f.sign*n),e}function NT(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function nc(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var OT=T,Yz=Math.min,Zz=Math.max,Gz=Math.floor,Hj=Math.ceil,Wz=oe,Gj=Math.PI,Wj=(function(){function r(e,t,a){this.type="parallel",this._axesMap=q(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var i=e.dimensions,n=e.parallelAxisIndex;OT(i,function(o,s){var l=n[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new Hz(o,Bo(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),a=t.axisBase,i=t.layoutBase,n=t.pixelDimIndex,o=e[1-n],s=e[n];return o>=a&&o<=a+t.axisLength&&s>=i&&s<=i+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(e.contains(a,t)){var i=a.getData();OT(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(i,i.mapDimension(n)),fn(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){var a=Zt(e,t).refContainer;this._rect=Bt(e.getBoxLayoutParams(),a),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],i=["width","height"],n=e.get("layout"),o=n==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,c=Ng(e.get("axisExpandWidth"),l),f=Ng(e.get("axisExpandCount")||0,[0,u]),p=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,h=e.get("axisExpandWindow"),d;if(h)d=Ng(h[1]-h[0],l),h[1]=h[0]+d;else{d=Ng(c*(f-1),l);var v=e.get("axisExpandCenter")||Gz(u/2);h=[c*v-d/2],h[1]=h[0]+d}var m=(s-d)/(u-f);m<3&&(m=0);var g=[Gz(Wz(h[0]/c,1))+1,Hj(Wz(h[1]/c,1))-1],y=m/c*h[0];return{layout:n,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[i[1-o]],axisExpandable:p,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:h,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,i=this._makeLayoutInfo(),n=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),OT(a,function(o,s){var l=(i.axisExpandable?Zj:Yj)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:Gj/2,vertical:0},f=[u[n].x+e.x,u[n].y+e.y],p=c[n],h=fe();Sr(h,h,p),pr(h,h,f),this._axesLayout[o]={position:f,rotation:p,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,a,i){a==null&&(a=0),i==null&&(i=e.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];T(o,function(m){s.push(e.mapDimension(m)),l.push(n.get(m).model)});for(var u=this.hasAxisBrushed(),c=a;cn*(1-f[0])?(u="jump",l=s-n*(1-f[2])):(l=s-n*f[1])>=0&&(l=s-n*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?Yr(l,i,o,"all"):u="none";else{var h=i[1]-i[0],d=o[1]*s/h;i=[Zz(0,d-h/2)],i[1]=Yz(o[1],i[0]+h),i[0]=i[1]-h}return{axisExpandWindow:i,behavior:u}},r})();function Ng(r,e){return Yz(Zz(r,e[0]),e[1])}function Yj(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function Zj(r,e){var t=e.layoutLength,a=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,c;return r=0;i--)Xe(a[i])},e.prototype.getActiveState=function(t){var a=this.activeIntervals;if(!a.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(a.length===1){var i=a[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=a.length;nKj}function sV(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function lV(r,e,t,a){var i=new K;return i.add(new ht({name:"main",style:ZT(t),silent:!0,draggable:!0,cursor:"move",drift:ut(Jz,r,e,i,["n","s","w","e"]),ondragend:ut(Pl,e,{isEnd:!0})})),T(a,function(n){i.add(new ht({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ut(Jz,r,e,i,n),ondragend:ut(Pl,e,{isEnd:!0})}))}),i}function uV(r,e,t,a){var i=a.brushStyle.lineWidth||0,n=oc(i,Jj),o=t[0][0],s=t[1][0],l=o-i/2,u=s-i/2,c=t[0][1],f=t[1][1],p=c-n+i/2,h=f-n+i/2,d=c-o,v=f-s,m=d+i,g=v+i;Qn(r,e,"main",o,s,d,v),a.transformable&&(Qn(r,e,"w",l,u,n,g),Qn(r,e,"e",p,u,n,g),Qn(r,e,"n",l,u,m,n),Qn(r,e,"s",l,h,m,n),Qn(r,e,"nw",l,u,n,n),Qn(r,e,"ne",p,u,n,n),Qn(r,e,"sw",l,h,n,n),Qn(r,e,"se",p,h,n,n))}function BT(r,e){var t=e.__brushOption,a=t.transformable,i=e.childAt(0);i.useStyle(ZT(t)),i.attr({silent:!a,cursor:a?"move":"default"}),T([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=e.childOfName(n.join("")),s=n.length===1?UT(r,n[0]):n$(r,n);o&&o.attr({silent:!a,invisible:!a,cursor:a?t$[s]+"-resize":null})})}function Qn(r,e,t,a,i,n,o){var s=e.childOfName(t);s&&s.setShape(s$(XT(r,e,[[a,i],[a+n,i+o]])))}function ZT(r){return J({strokeNoScale:!0},r.brushStyle)}function cV(r,e,t,a){var i=[Hp(r,t),Hp(e,a)],n=[oc(r,t),oc(e,a)];return[[i[0],n[0]],[i[1],n[1]]]}function i$(r){return Ci(r.group)}function UT(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},i=Ks(t[e],i$(r));return a[i]}function n$(r,e){var t=[UT(r,e[0]),UT(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function Jz(r,e,t,a,i,n){var o=t.__brushOption,s=r.toRectRange(o.range),l=fV(e,i,n);T(a,function(u){var c=Qj[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(cV(s[0][0],s[1][0],s[0][1],s[1][1])),GT(e,t),Pl(e,{isEnd:!1})}function o$(r,e,t,a){var i=e.__brushOption.range,n=fV(r,t,a);T(i,function(o){o[0]+=n[0],o[1]+=n[1]}),GT(r,e),Pl(r,{isEnd:!1})}function fV(r,e,t){var a=r.group,i=a.transformCoordToLocal(e,t),n=a.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function XT(r,e,t){var a=oV(r,e);return a&&a!==Il?a.clipPath(t,r._transform):tt(t)}function s$(r){var e=Hp(r[0][0],r[1][0]),t=Hp(r[0][1],r[1][1]),a=oc(r[0][0],r[1][0]),i=oc(r[0][1],r[1][1]);return{x:e,y:t,width:a-e,height:i-t}}function l$(r,e,t){if(!(!r._brushType||c$(r,e.offsetX,e.offsetY))){var a=r._zr,i=r._covers,n=YT(r,e,t);if(!r._dragging)for(var o=0;oa.getWidth()||t<0||t>a.getHeight()}var Og={lineX:eV(0),lineY:eV(1),rect:{createCover:function(r,e){function t(a){return a}return lV({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=sV(r);return cV(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,a){uV(r,e,t,a)},updateCommon:BT,contain:HT},polygon:{createCover:function(r,e){var t=new K;return t.add(new he({name:"main",style:ZT(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new ye({name:"main",draggable:!0,drift:ut(o$,r,e),ondragend:ut(Pl,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,a){e.childAt(0).setShape({points:XT(r,e,t)})},updateCommon:BT,contain:HT}};function eV(r){return{createCover:function(e,t){return lV({toRectRange:function(a){var i=[a,[0,100]];return r&&i.reverse(),i},fromRectRange:function(a){return a[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=sV(e),a=Hp(t[0][r],t[1][r]),i=oc(t[0][r],t[1][r]);return[a,i]},updateCoverShape:function(e,t,a,i){var n,o=oV(e,t);if(o!==Il&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(r);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,n];r&&l.reverse(),uV(e,t,l,i)},updateCommon:BT,contain:HT}}var sc=r$;function zg(r){return r=qT(r),function(e){return c_(e,r)}}function Vg(r,e){return r=qT(r),function(t){var a=e!=null?e:t,i=a?r.width:r.height,n=a?r.x:r.y;return[n,n+(i||0)]}}function Bg(r,e,t){var a=qT(r);return function(i,n){return a.contain(n[0],n[1])&&!pg(i,e,t)}}function qT(r){return at.create(r)}var f$=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){r.prototype.init.apply(this,arguments),(this._brushController=new sc(a.getZr())).on("brush",Z(this._onBrush,this))},e.prototype.render=function(t,a,i,n){if(!p$(t,a,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new K,this.group.add(this._axisGroup),!!t.get("show")){var s=d$(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,p=l.getAxisLayout(f),h=O({strokeContainThreshold:c},p),d=new yr(t,i,h);d.build(),this._axisGroup.add(d.group),this._refreshBrushController(h,u,t,s,c,i),zn(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,a,i,n,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=at.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:zg(f),isTargetByCursor:Bg(f,s,n),getLinearBrushOtherExtent:Vg(f,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(h$(i))},e.prototype._onBrush=function(t){var a=t.areas,i=this.axisModel,n=i.axis,o=V(a,function(s){return[n.coordToData(s.range[0],!0),n.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e})(Ot);function p$(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function h$(r){var e=r.axis;return V(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function d$(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var dV=f$;var v$={type:"axisAreaSelect",event:"axisAreaSelected"};function vV(r){r.registerAction(v$,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var m$={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Gp(r){r.registerComponentView(Uz),r.registerComponentModel(Fz),r.registerCoordinateSystem("parallel",qz),r.registerPreprocessor(kT),r.registerComponentModel(zT),r.registerComponentView(dV),Ui(r,"parallel",zT,m$),vV(r)}function jT(r){Tt(Gp),r.registerChartView(zz),r.registerSeriesModel(Vz),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Bz)}var g$=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r})(),y$=(function(r){I(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new g$},e.prototype.buildPath=function(t,a){var i=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+i,a.y2),t.bezierCurveTo(a.cpx2+i,a.cpy2,a.cpx1+i,a.cpy1,a.x1+i,a.y1)):(t.lineTo(a.x2,a.y2+i),t.bezierCurveTo(a.cpx2,a.cpy2+i,a.cpx1,a.cpy1+i,a.x1,a.y1+i)),t.closePath()},e.prototype.highlight=function(){Tr(this)},e.prototype.downplay=function(){Dr(this)},e})(ft),x$=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new K,t._focusAdjacencyDisabled=!1,t}return e.prototype.init=function(t,a){this._controller=new va(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,a,i){var n=this,o=t.getGraph(),s=this._mainGroup,l=t.layoutInfo,u=l.width,c=l.height,f=t.getData(),p=t.getData("edge"),h=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(t,i),vg(t,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(d){var v=new y$,m=nt(v);m.dataIndex=d.dataIndex,m.seriesIndex=t.seriesIndex,m.dataType="edge";var g=d.getModel(),y=g.getModel("lineStyle"),x=y.get("curveness"),_=d.node1.getLayout(),b=d.node1.getModel(),S=b.get("localX"),w=b.get("localY"),D=d.node2.getLayout(),C=d.node2.getModel(),M=C.get("localX"),E=C.get("localY"),L=d.getLayout(),A,P,R,k,B,U,F,H;v.shape.extent=Math.max(1,L.dy),v.shape.orient=h,h==="vertical"?(A=(S!=null?S*u:_.x)+L.sy,P=(w!=null?w*c:_.y)+_.dy,R=(M!=null?M*u:D.x)+L.ty,k=E!=null?E*c:D.y,B=A,U=P*(1-x)+k*x,F=R,H=P*x+k*(1-x)):(A=(S!=null?S*u:_.x)+_.dx,P=(w!=null?w*c:_.y)+L.sy,R=M!=null?M*u:D.x,k=(E!=null?E*c:D.y)+L.ty,B=A*(1-x)+R*x,U=P,F=A*x+R*(1-x),H=k),v.setShape({x1:A,y1:P,x2:R,y2:k,cpx1:B,cpy1:U,cpx2:F,cpy2:H}),v.useStyle(y.getItemStyle()),mV(v.style,h,d);var G=""+g.get("value"),Y=qt(g,"edgeLabel");$t(v,Y,{labelFetcher:{getFormattedLabel:function(mt,Ht,Kt,Et,vt,It){return t.getFormattedLabel(mt,Ht,"edge",Et,Te(vt,Y.normal&&Y.normal.get("formatter"),G),It)}},labelDataIndex:d.dataIndex,defaultText:G}),v.setTextConfig({position:"inside"});var rt=g.getModel("emphasis");te(v,g,"lineStyle",function(mt){var Ht=mt.getItemStyle();return mV(Ht,h,d),Ht}),s.add(v),p.setItemGraphicEl(d.dataIndex,v);var st=rt.get("focus");Rt(v,st==="adjacency"?d.getAdjacentDataIndices():st==="trajectory"?d.getTrajectoryDataIndices():st,rt.get("blurScope"),rt.get("disabled"))}),o.eachNode(function(d){var v=d.getLayout(),m=d.getModel(),g=m.get("localX"),y=m.get("localY"),x=m.getModel("emphasis"),_=m.get(["itemStyle","borderRadius"])||0,b=new ht({shape:{x:g!=null?g*u:v.x,y:y!=null?y*c:v.y,width:v.dx,height:v.dy,r:_},style:m.getModel("itemStyle").getItemStyle(),z2:10});$t(b,qt(m),{labelFetcher:{getFormattedLabel:function(w,D){return t.getFormattedLabel(w,D,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),te(b,m),s.add(b),f.setItemGraphicEl(d.dataIndex,b),nt(b).dataType="node";var S=x.get("focus");Rt(b,S==="adjacency"?d.getAdjacentDataIndices():S==="trajectory"?d.getTrajectoryDataIndices():S,x.get("blurScope"),x.get("disabled"))}),f.eachItemGraphicEl(function(d,v){var m=f.getItemModel(v);m.get("draggable")&&(d.drift=function(g,y){n._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(v),localX:this.shape.x/u,localY:this.shape.y/c})},d.ondragend=function(){n._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(_$(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(t,a){var i=t.layoutInfo,n=i.width,o=i.height,s=t.coordinateSystem=new Ia(null,{api:a,ecModel:t.ecModel});s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(0,0,n,o),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e})(Pt);function mV(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var a=t.node1.getVisual("color"),i=t.node2.getVisual("color");W(a)&&W(i)&&(r.fill=new Za(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:i,offset:1}]))}}function _$(r,e,t){var a=new ht({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Vt(a,{shape:{width:r.width+20}},e,t),a}var gV=x$;var b$=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Mt(o[l],this,a));var u=Ll(n,i,this,!0,c);return u.data;function c(f,p){f.wrapMethod("getItemModel",function(h,d){var v=h.parentModel,m=v.getData().getItemLayout(d);if(m){var g=m.depth,y=v.levelModels[g];y&&(h.parentModel=y)}return h}),p.wrapMethod("getItemModel",function(h,d){var v=h.parentModel,m=v.getGraph().getEdgeByIndex(d),g=m.node1.getLayout();if(g){var y=g.depth,x=v.levelModels[y];x&&(h.parentModel=x)}return h})}},e.prototype.setNodePosition=function(t,a){var i=this.option.data||this.option.nodes,n=i[t];n.localX=a[0],n.localY=a[1]},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,i){function n(h){return isNaN(h)||h==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return re("nameValue",{name:u,value:l,noValue:n(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,p=this.getDataParams(t,i).data.name;return re("nameValue",{name:p!=null?p+"":null,value:f,noValue:n(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var i=r.prototype.getDataParams.call(this,t,a);if(i.value==null&&a==="node"){var n=this.getGraph().getNodeByIndex(t),o=n.getLayout().value;i.value=o}return i},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:N.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:N.color.primary}},animationEasing:"linear",animationDuration:1e3},e})(Nt),yV=b$;function KT(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),i=t.get("nodeGap"),n=Zt(t,e).refContainer,o=Bt(t.getBoxLayoutParams(),n);t.layoutInfo=o;var s=o.width,l=o.height,u=t.getGraph(),c=u.nodes,f=u.edges;w$(c);var p=At(c,function(m){return m.getLayout().value===0}),h=p.length!==0?0:t.get("layoutIterations"),d=t.get("orient"),v=t.get("nodeAlign");S$(c,f,a,i,s,l,h,d,v)})}function S$(r,e,t,a,i,n,o,s,l){T$(r,e,t,i,n,s,l),E$(r,e,n,i,a,o,s),z$(r,s)}function w$(r){T(r,function(e){var t=$o(e.outEdges,Ug),a=$o(e.inEdges,Ug),i=e.getValue()||0,n=Math.max(t,a,i);e.setLayout({value:n},!0)})}function T$(r,e,t,a,i,n,o){for(var s=[],l=[],u=[],c=[],f=0,p=0;p=0;g&&m.depth>h&&(h=m.depth),v.setLayout({depth:g?m.depth:f},!0),n==="vertical"?v.setLayout({dy:t},!0):v.setLayout({dx:t},!0);for(var y=0;yf-1?h:f-1;o&&o!=="left"&&D$(r,o,n,w);var D=n==="vertical"?(i-t)/w:(a-t)/w;M$(r,D,n)}function xV(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function D$(r,e,t,a){if(e==="right"){for(var i=[],n=r,o=0;n.length;){for(var s=0;s0;n--)l*=.99,I$(s,l,o),$T(s,i,t,a,o),O$(s,l,o),$T(s,i,t,a,o)}function A$(r,e){var t=[],a=e==="vertical"?"y":"x",i=vf(r,function(n){return n.getLayout()[a]});return i.keys.sort(function(n,o){return n-o}),T(i.keys,function(n){t.push(i.buckets.get(n))}),t}function L$(r,e,t,a,i,n){var o=1/0;T(r,function(s){var l=s.length,u=0;T(s,function(f){u+=f.getLayout().value});var c=n==="vertical"?(a-(l-1)*i)/u:(t-(l-1)*i)/u;c0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[n]+l.getLayout()[p]+e;var d=i==="vertical"?a:t;if(u=c-e-d,u>0){s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var h=f-2;h>=0;--h)l=o[h],u=l.getLayout()[n]+l.getLayout()[p]+e-c,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[n]}})}function I$(r,e,t){T(r.slice().reverse(),function(a){T(a,function(i){if(i.outEdges.length){var n=$o(i.outEdges,P$,t)/$o(i.outEdges,Ug);if(isNaN(n)){var o=i.outEdges.length;n=o?$o(i.outEdges,k$,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-Ko(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-Ko(i,t))*e;i.setLayout({y:l},!0)}}})})}function P$(r,e){return Ko(r.node2,e)*r.getValue()}function k$(r,e){return Ko(r.node2,e)}function R$(r,e){return Ko(r.node1,e)*r.getValue()}function N$(r,e){return Ko(r.node1,e)}function Ko(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Ug(r){return r.getValue()}function $o(r,e,t){for(var a=0,i=r.length,n=-1;++no&&(o=l)}),T(a,function(s){var l=new Le({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&T(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function QT(r){r.registerChartView(gV),r.registerSeriesModel(yV),r.registerLayout(KT),r.registerVisual(JT),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){var n=i.coordinateSystem,o=Xo(n,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var Fg=(function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var a,i=t.getComponent("xAxis",this.get("xAxisIndex")),n=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=n.get("type"),l;o==="category"?(e.layout="horizontal",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],p=u[1-c],h=[i,n],d=h[c].get("type"),v=h[1-c].get("type"),m=e.data;if(m&&l){var g=[];T(m,function(_,b){var S;z(_)?(S=_.slice(),_.unshift(b)):z(_.value)?(S=O({},_),S.value=S.value.slice(),_.value.unshift(b)):S=_,g.push(S)}),e.data=g}var y=this.defaultValueDimensions,x=[{name:f,type:hl(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:p,type:hl(v),dimsDef:y.slice()}];return Aa(this,{coordDimensions:x,dimensionsCount:y.length+1,encodeDefaulter:ut(Av,x,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r})();var _V=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:N.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:N.color.shadow}},animationDuration:800},e})(Nt);Jt(_V,Fg,!0);var bV=_V;var V$=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;n.diff(s).add(function(u){if(n.hasValue(u)){var c=n.getItemLayout(u),f=SV(c,n,u,l,!0);n.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!n.hasValue(u)){o.remove(f);return}var p=n.getItemLayout(u);f?(Re(f),wV(p,f,n,u)):f=SV(p,n,u,l),o.add(f),n.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=n},e.prototype.remove=function(t){var a=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(n){n&&a.remove(n)})},e.type="boxplot",e})(Pt),B$=(function(){function r(){}return r})(),U$=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new B$},e.prototype.buildPath=function(t,a){var i=a.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();nv){var _=[g,x];a.push(_)}}}return{boxData:t,outliers:a}}var DV={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Ae){var a="";Ut(a)}var i=e1(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function r1(r){r.registerSeriesModel(bV),r.registerChartView(TV),r.registerLayout(t1),r.registerTransform(DV)}var Y$=["itemStyle","borderColor"],Z$=["itemStyle","borderColor0"],X$=["itemStyle","borderColorDoji"],q$=["itemStyle","color"],j$=["itemStyle","color0"];function Hg(r,e){return e.get(r>0?q$:j$)}function Gg(r,e){return e.get(r===0?X$:r>0?Y$:Z$)}var $$={seriesType:"candlestick",plan:Ta(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(a,i){for(var n;(n=a.next())!=null;){var o=i.getItemModel(n),s=i.getItemLayout(n).sign,l=o.getItemStyle();l.fill=Hg(s,o),l.stroke=Gg(s,o)||l.fill;var u=i.ensureUniqueItemVisual(n,"style");O(u,l)}}}}}},CV=$$;var K$=["color","borderColor"],J$=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){zr(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),i=this._data,n=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||n.removeAll(),a.diff(i).add(function(c){if(a.hasValue(c)){var f=a.getItemLayout(c);if(s&&MV(u,f))return;var p=a1(f,c,!0);Vt(p,{shape:{points:f.ends}},t,c),i1(p,a,c,o),n.add(p),a.setItemGraphicEl(c,p)}}).update(function(c,f){var p=i.getItemGraphicEl(f);if(!a.hasValue(c)){n.remove(p);return}var h=a.getItemLayout(c);if(s&&MV(u,h)){n.remove(p);return}p?(wt(p,{shape:{points:h.ends}},t,c),Re(p)):p=a1(h,c),i1(p,a,c,o),n.add(p),a.setItemGraphicEl(c,p)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&n.remove(f)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),EV(t,this.group);var a=t.get("clip",!0)?gn(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var i=a.getData(),n=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=a1(s,o);i1(l,i,o,n),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){EV(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e})(Pt),Q$=(function(){function r(){}return r})(),tK=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new Q$},e.prototype.buildPath=function(t,a){var i=a.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e})(ft);function a1(r,e,t){var a=r.ends;return new tK({shape:{points:t?eK(a,r):a},z2:100})}function MV(r,e){for(var t=!0,a=0;ab?E[n]:M[n],ends:P,brushRect:F(S,w,x)})}function B(G,Y){var rt=[];return rt[i]=Y,rt[n]=G,isNaN(Y)||isNaN(G)?[NaN,NaN]:e.dataToPoint(rt)}function U(G,Y,rt){var st=Y.slice(),mt=Y.slice();st[i]=Lf(st[i]+a/2,1,!1),mt[i]=Lf(mt[i]-a/2,1,!0),rt?G.push(st,mt):G.push(mt,st)}function F(G,Y,rt){var st=B(G,rt),mt=B(Y,rt);return st[i]-=a/2,mt[i]-=a/2,{x:st[0],y:st[1],width:n?a:mt[0]-st[0],height:n?mt[1]-st[1]:a}}function H(G){return G[i]=Lf(G[i],1),G}}function d(v,m){for(var g=Ur(v.count*4),y=0,x,_=[],b=[],S,w=m.getStore(),D=!!r.get(["itemStyle","borderColorDoji"]);(S=v.next())!=null;){var C=w.get(s,S),M=w.get(u,S),E=w.get(c,S),L=w.get(f,S),A=w.get(p,S);if(isNaN(C)||isNaN(L)||isNaN(A)){g[y++]=NaN,y+=3;continue}g[y++]=PV(w,S,M,E,c,D),_[i]=C,_[n]=L,x=e.dataToPoint(_,null,b),g[y++]=x?x[0]:NaN,g[y++]=x?x[1]:NaN,_[n]=A,x=e.dataToPoint(_,null,b),g[y++]=x?x[1]:NaN}m.setLayout("largePoints",g)}}};function PV(r,e,t,a,i,n){var o;return t>a?o=-1:t0?r.get(i,e-1)<=a?1:-1:1,o}function iK(r,e){var t=r.getBaseAxis(),a,i=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),n=j(Q(r.get("barMaxWidth"),i),i),o=j(Q(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?j(s,i):Math.max(Math.min(i/2,n),o)}var kV=aK;function l1(r){r.registerChartView(AV),r.registerSeriesModel(IV),r.registerPreprocessor(s1),r.registerVisual(CV),r.registerLayout(kV)}function RV(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var nK=(function(r){I(e,r);function e(t,a){var i=r.call(this)||this,n=new jn(t,a),o=new K;return i.add(n),i.add(o),i.updateData(t,a),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,i=t.color,n=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(n)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){n.stopAnimation();var p=void 0;$(f)?p=f(i):p=f,n.__t>0&&(p=-s*n.__t),this._animateSymbol(n,s,p,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,i,n,o){if(a>0){t.__t=0;var s=this,l=t.animate("",n).when(o?a*2:a,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(t)});n||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Oa(t.__p1,t.__cp1)+Oa(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,i){this.childAt(0).updateData(t,a,i),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Pe,c=Qc;s[0]=u(a[0],n[0],i[0],o),s[1]=u(a[1],n[1],i[1],o);var f=t.__t<1?c(a[0],n[0],i[0],o):c(i[0],n[0],a[0],1-o),p=t.__t<1?c(a[1],n[1],i[1],o):c(i[1],n[1],a[1],1-o);t.rotation=-Math.atan2(p,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(n[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;la);l++);l=Math.min(l-1,o-2)}var c=(a-n[l])/(n[l+1]-n[l]),f=i[l],p=i[l+1];t.x=f[0]*(1-c)+c*p[0],t.y=f[1]*(1-c)+c*p[1];var h=t.__t<1?p[0]-f[0]:f[0]-p[0],d=t.__t<1?p[1]-f[1]:f[1]-p[1];t.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e})(Wg),VV=cK;var fK=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),pK=(function(r){I(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:N.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new fK},e.prototype.buildPath=function(t,a){var i=a.segs,n=a.curveness,o;if(a.polyline)for(o=this._off;o0){t.moveTo(i[o++],i[o++]);for(var l=1;l0){var h=(u+f)/2-(c-p)*n,d=(c+p)/2-(f-u)*n;t.quadraticCurveTo(h,d,f,p)}else t.lineTo(f,p)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var i=this.shape,n=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var f=n[u++],p=n[u++],h=1;h0){var m=(f+d)/2-(p-v)*o,g=(p+v)/2-(d-f)*o;if(Ld(f,p,m,g,d,v,s,t,a))return l}else if(en(f,p,d,v,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();if(t=i[0],a=i[1],n.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,i=a.segs,n=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),BV=hK;var dK={seriesType:"lines",plan:Ta(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(i,n){var o=[];if(a){var s=void 0,l=i.end-i.start;if(t){for(var u=0,c=i.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(n);var f=t.get("clip",!0)&&gn(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,i){var n=t.getData(),o=this._updateLineDraw(n,t);o.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,i){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=Zg.reset(t,a,i);s.progress&&s.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,a){var i=this._lineDraw,n=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!i||n!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new BV:new rc(o?n?VV:Yg:n?Wg:ec),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),i=a.painter.getType()==="svg";!i&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e})(Pt),UV=vK;var mK=typeof Uint32Array=="undefined"?Array:Uint32Array,gK=typeof Float64Array=="undefined"?Array:Float64Array;function FV(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=V(e,function(t){var a=[t[0].coord,t[1].coord],i={coords:a};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),Yl([i,t[0],t[1]])}))}var yK=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],FV(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(FV(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Dn(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Dn(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),i=a.option instanceof Array?a.option:a.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[t*2],n=this._flatCoordsOffset[t*2+1],o=0;oi}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,a){if(0)var i;var n=new we(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;n.hasItemOption=!0;var c=o.value;if(c!=null)return c instanceof Array?c[u]:c}),n},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=n.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),re("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e})(Nt),HV=yK;function Xg(r){return r instanceof Array||(r=[r,r]),r}var xK={seriesType:"lines",reset:function(r){var e=Xg(r.get("symbol")),t=Xg(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function i(n,o){var s=n.getItemModel(o),l=Xg(s.getShallow("symbol",!0)),u=Xg(s.getShallow("symbolSize",!0));l[0]&&n.setItemVisual(o,"fromSymbol",l[0]),l[1]&&n.setItemVisual(o,"toSymbol",l[1]),u[0]&&n.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&n.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?i:null}}},GV=xK;function c1(r){r.registerChartView(UV),r.registerSeriesModel(HV),r.registerLayout(Zg),r.registerVisual(GV)}var _K=256,bK=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Ke.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,i,n,o){var s=this._getBrush(),l=this._getGradient(n,"inRange"),u=this._getGradient(n,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,p=f.getContext("2d"),h=e.length;f.width=t,f.height=a;for(var d=0;d0){var L=o(x)?l:u;x>0&&(x=x*M+D),b[S++]=L[E],b[S++]=L[E+1],b[S++]=L[E+2],b[S++]=L[E+3]*x*256}else S+=4}return p.putImageData(_,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Ke.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var i=e.getContext("2d");return i.clearRect(0,0,a,a),i.shadowOffsetX=a,i.shadowBlur=this.blurSize,i.shadowColor=N.color.neutral99,i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,i=a[t]||(a[t]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i},r})(),WV=bK;function SK(r,e,t){var a=r[1]-r[0];e=V(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var i=e.length,n=0;return function(o){var s;for(s=n;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s=e[0]&&a<=e[1]}}function YV(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var TK=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(n=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(t,i,0,t.getData().count()):YV(o)&&this._renderOnGeo(o,t,n,i)},e.prototype.incrementalPrepareRender=function(t,a,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,i,n){var o=a.coordinateSystem;o&&(YV(o)?this.render(a,i,n):(this._progressiveEls=[],this._renderOnGridLike(a,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){zr(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,a,i,n,o){var s=t.coordinateSystem,l=Ma(s,"cartesian2d"),u=Ma(s,"matrix"),c,f,p,h;if(l){var d=s.getAxis("x"),v=s.getAxis("y");c=d.getBandWidth()+.5,f=v.getBandWidth()+.5,p=d.scale.getExtent(),h=v.scale.getExtent()}for(var m=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),x=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),S=qt(t),w=t.getModel("emphasis"),D=w.get("focus"),C=w.get("blurScope"),M=w.get("disabled"),E=l||u?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],L=i;Lp[1]||kh[1])continue;var B=s.dataToPoint([R,k]);A=new ht({shape:{x:B[0]-c/2,y:B[1]-f/2,width:c,height:f},style:P})}else if(u){var U=s.dataToLayout([g.get(E[0],L),g.get(E[1],L)]).rect;if(Me(U.x))continue;A=new ht({z2:1,shape:U,style:P})}else{if(isNaN(g.get(E[1],L)))continue;var F=s.dataToLayout([g.get(E[0],L)]),U=F.contentRect||F.rect;if(Me(U.x)||Me(U.y))continue;A=new ht({z2:1,shape:U,style:P})}if(g.hasItemOption){var H=g.getItemModel(L),G=H.getModel("emphasis");y=G.getModel("itemStyle").getItemStyle(),x=H.getModel(["blur","itemStyle"]).getItemStyle(),_=H.getModel(["select","itemStyle"]).getItemStyle(),b=H.get(["itemStyle","borderRadius"]),D=G.get("focus"),C=G.get("blurScope"),M=G.get("disabled"),S=qt(H)}A.shape.r=b;var Y=t.getRawValue(L),rt="-";Y&&Y[2]!=null&&(rt=Y[2]+""),$t(A,S,{labelFetcher:t,labelDataIndex:L,defaultOpacity:P.opacity,defaultText:rt}),A.ensureState("emphasis").style=y,A.ensureState("blur").style=x,A.ensureState("select").style=_,Rt(A,D,C,M),A.incremental=o,o&&(A.states.emphasis.hoverLayer=!0),m.add(A),g.setItemGraphicEl(L,A),this._progressiveEls&&this._progressiveEls.push(A)}},e.prototype._renderOnGeo=function(t,a,i,n){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new WV;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var p=Math.max(c.x,0),h=Math.max(c.y,0),d=Math.min(c.width+c.x,n.getWidth()),v=Math.min(c.height+c.y,n.getHeight()),m=d-p,g=v-h,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],x=l.mapArray(y,function(w,D,C){var M=t.dataToPoint([w,D]);return M[0]-=p,M[1]-=h,M.push(C),M}),_=i.getExtent(),b=i.type==="visualMap.continuous"?wK(_,i.option.range):SK(_,i.getPieceList(),i.option.selected);u.update(x,m,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var S=new se({style:{width:m,height:g,x:p,y:h,image:u.canvas},silent:!0});this.group.add(S)},e.type="heatmap",e})(Pt),ZV=TK;var DK=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return lr(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Fn.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:N.color.primary}}},e})(Nt),XV=DK;function f1(r){r.registerChartView(ZV),r.registerSeriesModel(XV)}var CK=["itemStyle","borderWidth"],qV=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],p1=new Or,MK=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),p={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:qV[+c],categoryDim:qV[1-+c]};o.diff(s).add(function(d){if(o.hasValue(d)){var v=$V(o,d),m=jV(o,d,v,p),g=KV(o,p,m);o.setItemGraphicEl(d,g),n.add(g),QV(g,p,m)}}).update(function(d,v){var m=s.getItemGraphicEl(v);if(!o.hasValue(d)){n.remove(m);return}var g=$V(o,d),y=jV(o,d,g,p),x=oB(o,y);m&&x!==m.__pictorialShapeStr&&(n.remove(m),o.setItemGraphicEl(d,null),m=null),m?RK(m,p,y):m=KV(o,p,y,!0),o.setItemGraphicEl(d,m),m.__pictorialSymbolMeta=y,n.add(m),QV(m,p,y)}).remove(function(d){var v=s.getItemGraphicEl(d);v&&JV(s,d,v.__pictorialSymbolMeta.animationModel,v)}).execute();var h=t.get("clip",!0)?gn(t.coordinateSystem,!1,t):null;return h?n.setClipPath(h):n.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,a){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(o){JV(n,nt(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e})(Pt);function jV(r,e,t,a){var i=r.getItemLayout(e),n=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),p={dataIndex:e,layout:i,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};EK(t,n,i,a,p),AK(r,e,i,n,o,p.boundingLength,p.pxSign,c,a,p),LK(t,p.symbolScale,u,a,p);var h=p.symbolSize,d=Da(t.get("symbolOffset"),h);return IK(t,h,i,n,o,d,s,p.valueLineWidth,p.boundingLength,p.repeatCutLength,a,p),p}function EK(r,e,t,a,i){var n=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[n.wh]<=0),c;if(z(o)){var f=[h1(s,o[0])-l,h1(s,o[1])-l];f[1]=0?1:-1:c>0?1:-1}function h1(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function AK(r,e,t,a,i,n,o,s,l,u){var c=l.valueDim,f=l.categoryDim,p=Math.abs(t[f.wh]),h=r.getItemVisual(e,"symbolSize"),d;z(h)?d=h.slice():h==null?d=["100%","100%"]:d=[h,h],d[f.index]=j(d[f.index],p),d[c.index]=j(d[c.index],a?p:Math.abs(n)),u.symbolSize=d;var v=u.symbolScale=[d[0]/s,d[1]/s];v[c.index]*=(l.isHorizontal?-1:1)*o}function LK(r,e,t,a,i){var n=r.get(CK)||0;n&&(p1.attr({scaleX:e[0],scaleY:e[1],rotation:t}),p1.updateTransform(),n/=p1.getLineScale(),n*=e[a.valueDim.index]),i.valueLineWidth=n||0}function IK(r,e,t,a,i,n,o,s,l,u,c,f){var p=c.categoryDim,h=c.valueDim,d=f.pxSign,v=Math.max(e[h.index]+s,0),m=v;if(a){var g=Math.abs(l),y=de(r.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1));var _=j(y,e[h.index]),b=Math.max(v+_*2,0),S=x?0:_*2,w=pf(a),D=w?a:tB((g+S)/b),C=g-D*v;_=C/2/(x?D:Math.max(D-1,1)),b=v+_*2,S=x?0:_*2,!w&&a!=="fixed"&&(D=u?tB((Math.abs(u)+S)/b):0),m=D*b-S,f.repeatTimes=D,f.symbolMargin=_}var M=d*(m/2),E=f.pathPosition=[];E[p.index]=t[p.wh]/2,E[h.index]=o==="start"?M:o==="end"?l-M:l/2,n&&(E[0]+=n[0],E[1]+=n[1]);var L=f.bundlePosition=[];L[p.index]=t[p.xy],L[h.index]=t[h.xy];var A=f.barRectShape=O({},t);A[h.wh]=d*Math.max(Math.abs(t[h.wh]),Math.abs(E[h.index]+M)),A[p.wh]=t[p.wh];var P=f.clipShape={};P[p.xy]=-t[p.xy],P[p.wh]=c.ecSize[p.wh],P[h.xy]=0,P[h.wh]=t[h.wh]}function eB(r){var e=r.symbolPatternSize,t=jt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function rB(r,e,t,a){var i=r.__pictorialBundle,n=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=n[e.valueDim.index]+o+t.symbolMargin*2;for(d1(r,function(v){v.__pictorialAnimationIndex=c,v.__pictorialRepeatTimes=u,c0:g<0)&&(y=u-1-v),m[l.index]=f*(y-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function aB(r,e,t,a){var i=r.__pictorialBundle,n=r.__pictorialMainPath;n?lc(n,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,a):(n=r.__pictorialMainPath=eB(t),i.add(n),lc(n,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,a))}function iB(r,e,t){var a=O({},e.barRectShape),i=r.__pictorialBarRect;i?lc(i,null,{shape:a},e,t):(i=r.__pictorialBarRect=new ht({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,r.add(i))}function nB(r,e,t,a){if(t.symbolClip){var i=r.__pictorialClipPath,n=O({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)wt(i,{shape:n},s,l);else{n[o.wh]=0,i=new ht({shape:n}),r.__pictorialBundle.setClipPath(i),r.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],_t[a?"updateProps":"initProps"](i,{shape:u},s,l)}}}function $V(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=PK,t.isAnimationEnabled=kK,t}function PK(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function kK(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function KV(r,e,t,a){var i=new K,n=new K;return i.add(n),i.__pictorialBundle=n,n.x=t.bundlePosition[0],n.y=t.bundlePosition[1],t.symbolRepeat?rB(i,e,t):aB(i,e,t),iB(i,t,a),nB(i,e,t,a),i.__pictorialShapeStr=oB(r,t),i.__pictorialSymbolMeta=t,i}function RK(r,e,t){var a=t.animationModel,i=t.dataIndex,n=r.__pictorialBundle;wt(n,{x:t.bundlePosition[0],y:t.bundlePosition[1]},a,i),t.symbolRepeat?rB(r,e,t,!0):aB(r,e,t,!0),iB(r,t,!0),nB(r,e,t,!0)}function JV(r,e,t,a){var i=a.__pictorialBarRect;i&&i.removeTextContent();var n=[];d1(a,function(o){n.push(o)}),a.__pictorialMainPath&&n.push(a.__pictorialMainPath),a.__pictorialClipPath&&(t=null),T(n,function(o){Xa(o,{scaleX:0,scaleY:0},t,e,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(e,null)}function oB(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function d1(r,e,t){T(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&e.call(t,a)})}function lc(r,e,t,a,i,n){e&&r.attr(e),a.symbolClip&&!i?t&&r.attr(t):t&&_t[i?"updateProps":"initProps"](r,t,a.animationModel,a.dataIndex,n)}function QV(r,e,t){var a=t.dataIndex,i=t.itemModel,n=i.getModel("emphasis"),o=n.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=n.get("focus"),f=n.get("blurScope"),p=n.get("scale");d1(r,function(v){if(v instanceof se){var m=v.style;v.useStyle(O({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},t.style))}else v.useStyle(t.style);var g=v.ensureState("emphasis");g.style=o,p&&(g.scaleX=v.scaleX*1.1,g.scaleY=v.scaleY*1.1),v.ensureState("blur").style=s,v.ensureState("select").style=l,u&&(v.cursor=u),v.z2=t.z2});var h=e.valueDim.posDesc[+(t.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,$t(d,qt(i),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:Vi(e.seriesModel.getData(),a),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:h}),Rt(r,c,f,n.get("disabled"))}function tB(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var sB=MK;var NK=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Ar(Yu.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:N.color.primary}}}),e})(Yu),lB=NK;function v1(r){r.registerChartView(sB),r.registerSeriesModel(lB),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(_m,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,bm("pictorialBar"))}var OK=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=n.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function p(m){return m.name}var h=new gr(this._layersSeries||[],l,p,p),d=[];h.add(Z(v,this,"add")).update(Z(v,this,"update")).remove(Z(v,this,"remove")).execute();function v(m,g,y){var x=o._layers;if(m==="remove"){s.remove(x[g]);return}for(var _=[],b=[],S,w=l[g].indices,D=0;Dn&&(n=s),a.push(s)}for(var u=0;un&&(n=f)}return{y0:i,max:n}}function y1(r){r.registerChartView(uB),r.registerSeriesModel(cB),r.registerLayout(g1),r.registerProcessor(Ea("themeRiver"))}var UK=2,FK=4,HK=(function(r){I(e,r);function e(t,a,i,n){var o=r.call(this)||this;o.z2=UK,o.textConfig={inside:!0},nt(o).seriesIndex=a.seriesIndex;var s=new Dt({z2:FK,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,i,n),o}return e.prototype.updateData=function(t,a,i,n,o){this.node=a,a.piece=this,i=i||this._seriesModel,n=n||this._ecModel;var s=this;nt(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),c=a.getLayout(),f=O({},c);f.label=null;var p=a.getVisual("style");p.lineJoin="bevel";var h=a.getVisual("decal");h&&(p.decal=ki(h,o));var d=Gr(l.getModel("itemStyle"),f,!0);O(f,d),T(qe,function(y){var x=s.ensureState(y),_=l.getModel([y,"itemStyle"]);x.style=_.getItemStyle();var b=Gr(_,f);b&&(x.shape=b)}),t?(s.setShape(f),s.shape.r=c.r0,Vt(s,{shape:{r:c.r}},i,a.dataIndex)):(wt(s,{shape:f},i),Re(s)),s.useStyle(p),this._updateLabel(i);var v=l.getShallow("cursor");v&&s.attr("cursor",v),this._seriesModel=i||this._seriesModel,this._ecModel=n||this._ecModel;var m=u.get("focus"),g=m==="relative"?Dn(a.getAncestorsIndices(),a.getDescendantIndices()):m==="ancestor"?a.getAncestorsIndices():m==="descendant"?a.getDescendantIndices():m;Rt(this,g,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,i=this.node.getModel(),n=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,p=f.getTextContent(),h=this.node.dataIndex,d=n.get("minAngle")/180*Math.PI,v=n.get("show")&&!(d!=null&&Math.abs(s)P&&!Is(k-P)&&k0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,t,a,i):(o.virtualPiece=new x1(y,t,a,i),c.add(o.virtualPiece)),x.piece.off("click"),o.virtualPiece.on("click",function(_){o._rootToNode(x.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(o){if(!i&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";al(u,c)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:qg,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var i=a.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="sunburst",e})(Pt),dB=WK;var YK=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var i={name:t.name,children:t.data};vB(i);var n=this._levelModels=V(t.levels||[],function(l){return new Mt(l,this,a)},this),o=ju.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),p=n[f.depth];return p&&(u.parentModel=p),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=jo(i,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){kp(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e})(Nt);function vB(r){var e=0;T(r.children,function(a){vB(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}var mB=YK;var gB=Math.PI/180;function _1(r,e,t){e.eachSeriesByType(r,function(a){var i=a.get("center"),n=a.get("radius");z(n)||(n=[0,n]),z(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=j(i[0],o),c=j(i[1],s),f=j(n[0],l/2),p=j(n[1],l/2),h=-a.get("startAngle")*gB,d=a.get("minAngle")*gB,v=a.getData().tree.root,m=a.getViewRoot(),g=m.depth,y=a.get("sort");y!=null&&yB(m,y);var x=0;T(m.children,function(k){!isNaN(k.getValue())&&x++});var _=m.getValue(),b=Math.PI/(_||x)*2,S=m.depth>0,w=m.height-(S?-1:1),D=(p-f)/(w||1),C=a.get("clockwise"),M=a.get("stillShowZeroSum"),E=C?1:-1,L=function(k,B){if(k){var U=B;if(k!==v){var F=k.getValue(),H=_===0&&M?b:F*b;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&W(s)&&(s=jh(s,(a.depth-1)/(n-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var i=a.getData(),n=i.tree;n.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,n.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");O(u,l)})})}function S1(r){r.registerChartView(dB),r.registerSeriesModel(mB),r.registerLayout(ut(_1,"sunburst")),r.registerProcessor(ut(Ea,"sunburst")),r.registerVisual(b1),hB(r)}var w1={color:"fill",borderColor:"stroke"},xB={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},yn=ot(),XK=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return lr(null,this)},e.prototype.getDataParams=function(t,a,i){var n=r.prototype.getDataParams.call(this,t,a);return i&&(n.info=yn(i).info),n},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e})(Nt),_B=XK;function qK(r,e){return e=e||[0,0],V(["x","y"],function(t,a){var i=this.getAxis(t),n=e[a],o=r[a]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}function T1(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Z(qK,r)}}}function jK(r,e){return e=e||[0,0],V([0,1],function(t){var a=e[t],i=r[t]/2,n=[],o=[];return n[t]=a-i,o[t]=a+i,n[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function D1(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:Z(jK,r)}}}function $K(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,i=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-i)-t.dataToCoord(a+i))}function C1(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Z($K,r)}}}function KK(r,e){return e=e||[0,0],V(["Radius","Angle"],function(t,a){var i="get"+t+"Axis",n=this[i](),o=e[a],s=r[a]/2,l=n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(o-s)-n.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function M1(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(i){var n=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=r.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s},size:Z(KK,r)}}}function E1(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,i){return r.dataToPoint(a,i)},layout:function(a,i){return r.dataToLayout(a,i)}}}}function A1(r){var e=r.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t,a){return r.dataToPoint(t,a)},layout:function(t,a){return r.dataToLayout(t,a)}}}}function jg(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||it(r,"text")))}function $g(r,e,t){var a=r,i,n,o;if(e==="text")o=a;else{o={},it(a,"text")&&(o.text=a.text),it(a,"rich")&&(o.rich=a.rich),it(a,"textFill")&&(o.fill=a.textFill),it(a,"textStroke")&&(o.stroke=a.textStroke),it(a,"fontFamily")&&(o.fontFamily=a.fontFamily),it(a,"fontSize")&&(o.fontSize=a.fontSize),it(a,"fontStyle")&&(o.fontStyle=a.fontStyle),it(a,"fontWeight")&&(o.fontWeight=a.fontWeight),n={type:"text",style:o,silent:!0},i={};var s=it(a,"textPosition");t?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),it(a,"textPosition")&&(i.position=a.textPosition),it(a,"textOffset")&&(i.offset=a.textOffset),it(a,"textRotation")&&(i.rotation=a.textRotation),it(a,"textDistance")&&(i.distance=a.textDistance)}return bB(o,r),T(o.rich,function(l){bB(l,l)}),{textConfig:i,textContent:n}}function bB(r,e){e&&(e.font=e.textFont||e.font,it(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),it(e,"textAlign")&&(r.align=e.textAlign),it(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),it(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),it(e,"textWidth")&&(r.width=e.textWidth),it(e,"textHeight")&&(r.height=e.textHeight),it(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),it(e,"textPadding")&&(r.padding=e.textPadding),it(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),it(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),it(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),it(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),it(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),it(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),it(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function L1(r,e,t){var a=r;a.textPosition=a.textPosition||t.position||"inside",t.offset!=null&&(a.textOffset=t.offset),t.rotation!=null&&(a.textRotation=t.rotation),t.distance!=null&&(a.textDistance=t.distance);var i=a.textPosition.indexOf("inside")>=0,n=r.fill||N.color.neutral99;SB(a,e);var o=a.textFill==null;return i?o&&(a.textFill=t.insideFill||N.color.neutral00,!a.textStroke&&t.insideStroke&&(a.textStroke=t.insideStroke),!a.textStroke&&(a.textStroke=n),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||t.outsideFill||N.color.neutral00),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,T(e.rich,function(s){SB(s,s)}),a}function SB(r,e){e&&(it(e,"fill")&&(r.textFill=e.fill),it(e,"stroke")&&(r.textStroke=e.fill),it(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),it(e,"font")&&(r.font=e.font),it(e,"fontStyle")&&(r.fontStyle=e.fontStyle),it(e,"fontWeight")&&(r.fontWeight=e.fontWeight),it(e,"fontSize")&&(r.fontSize=e.fontSize),it(e,"fontFamily")&&(r.fontFamily=e.fontFamily),it(e,"align")&&(r.textAlign=e.align),it(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),it(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),it(e,"width")&&(r.textWidth=e.width),it(e,"height")&&(r.textHeight=e.height),it(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),it(e,"padding")&&(r.textPadding=e.padding),it(e,"borderColor")&&(r.textBorderColor=e.borderColor),it(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),it(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),it(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),it(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),it(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),it(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),it(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),it(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),it(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),it(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var DB={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},wB=gt(DB),fNt=cr(_a,function(r,e){return r[e]=1,r},{}),pNt=_a.join(", "),Yp=["","style","shape","extra"],uc=ot();function P1(r,e,t,a,i){var n=r+"Animation",o=on(r,a,i)||{},s=uc(e).userDuring;return o.duration>0&&(o.during=s?Z(rJ,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),O(o,t[n]),o}function cc(r,e,t,a){a=a||{};var i=a.dataIndex,n=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=uc(r),u=e.style;l.userDuring=e.during;var c={},f={};if(iJ(r,e,f),r.type==="compound")for(var p=r.shape.paths,h=e.shape.paths,d=0;d0&&r.animateFrom(m,g)}else QK(r,e,i||0,t,c);k1(r,e),u?r.dirty():r.markRedraw()}function k1(r,e){for(var t=uc(r).leaveToProps,a=0;a0&&r.animateFrom(i,n)}}function tJ(r,e){it(e,"silent")&&(r.silent=e.silent),it(e,"ignore")&&(r.ignore=e.ignore),r instanceof ke&&it(e,"invisible")&&(r.invisible=e.invisible),r instanceof ft&&it(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var xn={},eJ={setTransform:function(r,e){return xn.el[r]=e,this},getTransform:function(r){return xn.el[r]},setShape:function(r,e){var t=xn.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=xn.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=xn.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=xn.el.style;if(e)return e[r]},setExtra:function(r,e){var t=xn.el.extra||(xn.el.extra={});return t[r]=e,this},getExtra:function(r){var e=xn.el.extra;if(e)return e[r]}};function rJ(){var r=this,e=r.el;if(e){var t=uc(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}xn.el=e,a(eJ)}}function TB(r,e,t,a){var i=t[r];if(i){var n=e[r],o;if(n){var s=t.transition,l=i.transition;if(l)if(!o&&(o=a[r]={}),Jo(l))O(o,n);else for(var u=Ft(l),c=0;c=0){!o&&(o=a[r]={});for(var h=gt(n),c=0;c=0)){var p=r.getAnimationStyleProps(),h=p?p.style:null;if(h){!n&&(n=a.style={});for(var d=gt(t),u=0;u=0?e.getStore().get(U,k):void 0}var F=e.get(B.name,k),H=B&&B.ordinalMeta;return H?H.categories[F]:F}function w(R,k){k==null&&(k=c);var B=e.getItemVisual(k,"style"),U=B&&B.fill,F=B&&B.opacity,H=x(k,Qo).getItemStyle();U!=null&&(H.fill=U),F!=null&&(H.opacity=F);var G={inheritColor:W(U)?U:N.color.neutral99},Y=_(k,Qo),rt=Gt(Y,null,G,!1,!0);rt.text=Y.getShallow("show")?Q(r.getFormattedLabel(k,Qo),Vi(e,k)):null;var st=If(Y,G,!1);return M(R,H),H=L1(H,rt,st),R&&C(H,R),H.legacy=!0,H}function D(R,k){k==null&&(k=c);var B=x(k,to).getItemStyle(),U=_(k,to),F=Gt(U,null,null,!0,!0);F.text=U.getShallow("show")?Te(r.getFormattedLabel(k,to),r.getFormattedLabel(k,Qo),Vi(e,k)):null;var H=If(U,null,!0);return M(R,B),B=L1(B,F,H),R&&C(B,R),B.legacy=!0,B}function C(R,k){for(var B in k)it(k,B)&&(R[B]=k[B])}function M(R,k){R&&(R.textFill&&(k.textFill=R.textFill),R.textPosition&&(k.textPosition=R.textPosition))}function E(R,k){if(k==null&&(k=c),it(w1,R)){var B=e.getItemVisual(k,"style");return B?B[w1[R]]:null}if(it(xB,R))return e.getItemVisual(k,R)}function L(R){if(o.type==="cartesian2d"){var k=o.getBaseAxis();return qk(J({axis:k},R))}}function A(){return t.getCurrentSeriesIndices()}function P(R){return _u(R,t)}}function vJ(r){var e={};return T(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var i=a.coordDim,n=e[i]=e[i]||[];n[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function O1(r,e,t,a,i,n,o){if(!a){n.remove(e);return}var s=G1(r,e,t,a,i,n);return s&&o.setItemGraphicEl(t,s),s&&Rt(s,a.focus,a.blurScope,a.emphasisDisabled),s}function G1(r,e,t,a,i,n){var o=-1,s=e;e&&kB(e,a,i)&&(o=lt(n.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=F1(a),s&&fJ(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),oi.normal.cfg=oi.normal.conOpt=oi.emphasis.cfg=oi.emphasis.conOpt=oi.blur.cfg=oi.blur.conOpt=oi.select.cfg=oi.select.conOpt=null,oi.isLegacy=!1,gJ(u,t,a,i,l,oi),mJ(u,t,a,i,l),H1(r,u,t,a,oi,i,l),it(a,"info")&&(yn(u).info=a.info);for(var c=0;c=0?n.replaceAt(u,o):n.add(u),u}function kB(r,e,t){var a=yn(r),i=e.type,n=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==a.customGraphicType||i==="path"&&SJ(n)&&RB(n)!==a.customPathData||i==="image"&&it(o,"image")&&o.image!==a.customImagePath}function mJ(r,e,t,a,i){var n=t.clipPath;if(n===!1)r&&r.getClipPath()&&r.removeClipPath();else if(n){var o=r.getClipPath();o&&kB(o,n,a)&&(o=null),o||(o=F1(n),r.setClipPath(o)),H1(null,o,e,n,null,a,i)}}function gJ(r,e,t,a,i,n){if(!(r.isGroup||r.type==="compoundPath")){EB(t,null,n),EB(t,to,n);var o=n.normal.conOpt,s=n.emphasis.conOpt,l=n.blur.conOpt,u=n.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=n.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=F1(o),r.setTextContent(c)),H1(null,c,e,o,null,a,i);for(var f=o&&o.style,p=0;p=c;h--){var d=e.childAt(h);xJ(e,d,i)}}}function xJ(r,e,t){e&&fc(e,yn(r).option,t)}function _J(r){new gr(r.oldChildren,r.newChildren,AB,AB,r).add(LB).update(LB).remove(bJ).execute()}function AB(r,e){var t=r&&r.name;return t!=null?t:uJ+e}function LB(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,i=e!=null?t.oldChildren[e]:null;G1(t.api,i,t.dataIndex,a,t.seriesModel,t.group)}function bJ(r){var e=this.context,t=e.oldChildren[r];t&&fc(t,yn(t).option,e.seriesModel)}function RB(r){return r&&(r.pathData||r.d)}function SJ(r){return r&&(it(r,"pathData")||it(r,"d"))}function Y1(r){r.registerChartView(IB),r.registerSeriesModel(_B)}var kl=ot(),NB=tt,Z1=Z,wJ=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,a,i){var n=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=a,!(!i&&this._lastValue===n&&this._lastStatus===o)){this._lastValue=n,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,n,e,t,a);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new K,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),a.getZr().add(s);else{var p=ut(OB,t,f);this.updatePointerEl(s,u,p),this.updateLabelEl(s,u,p,t)}VB(s,t,!0),this._renderHandle(n)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var a=t.get("animation"),i=e.axis,n=i.type==="category",o=t.get("snap");if(!o&&!n)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(n&&i.getBandWidth()>s)return!0;if(o){var l=sg(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(e,t,a,i,n){},r.prototype.createPointerEl=function(e,t,a,i){var n=t.pointer;if(n){var o=kl(e).pointerEl=new _t[n.type](NB(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,a,i){if(t.label){var n=kl(e).labelEl=new Dt(NB(t.label));e.add(n),zB(n,i)}},r.prototype.updatePointerEl=function(e,t,a){var i=kl(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),a(i,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,a,i){var n=kl(e).labelEl;n&&(n.setStyle(t.label.style),a(n,{x:t.label.x,y:t.label.y}),zB(n,i))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,a=this._api.getZr(),i=this._handle,n=t.getModel("handle"),o=t.get("status");if(!n.get("show")||!o||o==="hide"){i&&a.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Vn(n.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Kr(u.event)},onmousedown:Z1(this._onHandleDragMove,this,0,0),drift:Z1(this._onHandleDragMove,this),ondragend:Z1(this._onHandleDragEnd,this)}),a.add(i)),VB(i,t,!1),i.setStyle(n.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=n.get("size");z(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Qa(this,"_doDispatchAxisPointer",n.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){OB(this._axisPointerModel,!t&&this._moveAnimation,this._handle,X1(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var a=this._handle;if(a){this._dragging=!0;var i=this.updateHandleTransform(X1(a),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,a.stopAnimation(),a.attr(X1(i)),kl(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),a=this._group,i=this._handle;t&&a&&(this._lastGraphicKey=null,a&&t.remove(a),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Wn(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,a){return a=a||0,{x:e[a],y:e[1-a],width:t[a],height:t[1-a]}},r})();function OB(r,e,t,a){BB(kl(t).lastProp,a)||(kl(t).lastProp=a,e?wt(t,a,r):(t.stopAnimation(),t.attr(a)))}function BB(r,e){if(et(r)&&et(e)){var t=!0;return T(e,function(a,i){t=t&&BB(r[i],a)}),!!t}else return r===e}function zB(r,e){r[e.get(["label","show"])?"show":"hide"]()}function X1(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function VB(r,e,t){var a=e.get("z"),i=e.get("zlevel");r&&r.traverse(function(n){n.type!=="group"&&(a!=null&&(n.z=a),i!=null&&(n.zlevel=i),n.silent=t)})}var hc=wJ;function dc(r){var e=r.get("type"),t=r.getModel(e+"Style"),a;return e==="line"?(a=t.getLineStyle(),a.fill=null):e==="shadow"&&(a=t.getAreaStyle(),a.stroke=null),a}function q1(r,e,t,a,i){var n=t.get("value"),o=j1(n,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=sn(s.get("padding")||0),u=s.getFont(),c=go(o,u),f=i.position,p=c.width+l[1]+l[3],h=c.height+l[0]+l[2],d=i.align;d==="right"&&(f[0]-=p),d==="center"&&(f[0]-=p/2);var v=i.verticalAlign;v==="bottom"&&(f[1]-=h),v==="middle"&&(f[1]-=h/2),TJ(f,p,h,a);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:Gt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function TJ(r,e,t,a){var i=a.getWidth(),n=a.getHeight();r[0]=Math.min(r[0]+e,i)-e,r[1]=Math.min(r[1]+t,n)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function j1(r,e,t,a,i){r=e.scale.parse(r);var n=e.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:Vu(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};T(a,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),W(o)?n=o.replace("{value}",n):$(o)&&(n=o(s))}return n}function Zp(r,e,t){var a=fe();return Sr(a,a,t.rotation),pr(a,a,t.position),vr([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],a)}function Qg(r,e,t,a,i,n){var o=yr.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),q1(e,a,i,n,{position:Zp(a.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function vc(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function ty(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function $1(r,e,t,a,i,n){return{cx:r,cy:e,r0:t,r:a,startAngle:i,endAngle:n,clockwise:!0}}var DJ=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis,l=s.grid,u=n.get("type"),c=UB(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var p=dc(n),h=CJ[u](s,f,c);h.style=p,t.graphicKey=h.type,t.pointer=h}var d=Tp(l.getRect(),i);Qg(a,t,d,i,n,o)},e.prototype.getHandleTransform=function(t,a,i){var n=Tp(a.axis.grid.getRect(),a,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Zp(a.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,i,n){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=UB(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=a[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var p=(u[1]+u[0])/2,h=[p,p];h[c]=f[c];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:h,tooltipOption:d[c]}},e})(hc);function UB(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var CJ={line:function(r,e,t){var a=vc([e,t[0]],[e,t[1]],FB(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=Math.max(1,r.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:ty([e-a/2,t[0]],[a,i],FB(r))}}};function FB(r){return r.dim==="x"?0:1}var HB=DJ;var MJ=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:N.color.border,width:1,type:"dashed"},shadowStyle:{color:N.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:N.color.neutral00,padding:[5,7,5,7],backgroundColor:N.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:N.color.accent40,throttle:40}},e})(St),GB=MJ;var eo=ot(),EJ=T;function ry(r,e,t){if(!Lt.node){var a=e.getZr();eo(a).records||(eo(a).records={}),AJ(a,e);var i=eo(a).records[r]||(eo(a).records[r]={});i.handler=t}}function AJ(r,e){if(eo(r).initialized)return;eo(r).initialized=!0,t("click",ut(WB,"click")),t("mousemove",ut(WB,"mousemove")),t("globalout",IJ);function t(a,i){r.on(a,function(n){var o=PJ(e);EJ(eo(r).records,function(s){s&&i(s,n,o.dispatchAction)}),LJ(o.pendings,e)})}}function LJ(r,e){var t=r.showTip.length,a=r.hideTip.length,i;t?i=r.showTip[t-1]:a&&(i=r.hideTip[a-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function IJ(r,e,t){r.handler("leave",null,t)}function WB(r,e,t,a){e.handler(r,t,a)}function PJ(r){var e={showTip:[],hideTip:[]},t=function(a){var i=e[a.type];i?i.push(a):(a.dispatchAction=t,r.dispatchAction(a))};return{dispatchAction:t,pendings:e}}function Xp(r,e){if(!Lt.node){var t=e.getZr(),a=(eo(t).records||{})[r];a&&(eo(t).records[r]=null)}}var kJ=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=a.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";ry("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,a){Xp("axisPointer",a)},e.prototype.dispose=function(t,a){Xp("axisPointer",a)},e.type="axisPointer",e})(Ot),ZB=kJ;function qp(r,e){var t=[],a=r.seriesIndex,i;if(a==null||!(i=e.getSeriesByIndex(a)))return{point:[]};var n=i.getData(),o=Ga(n,r);if(o==null||o<0||z(o))return{point:[]};var s=n.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,p=u.dim,h=f==="x"||f==="radius"?1:0,d=n.mapDimension(p),v=[];v[h]=n.get(d,o),v[1-h]=n.get(n.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(v)||[]}else t=l.dataToPoint(n.getValues(V(l.dimensions,function(g){return n.mapDimension(g)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),t=[m.x+m.width/2,m.y+m.height/2]}return{point:t,el:s}}var XB=ot();function K1(r,e,t){var a=r.currTrigger,i=[r.x,r.y],n=r,o=r.dispatchAction||Z(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){ay(i)&&(i=qp({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=ay(i),u=n.axesInfo,c=s.axesInfo,f=a==="leave"||ay(i),p={},h={},d={list:[],map:{}},v={showPointer:ut(NJ,h),showTooltip:ut(OJ,d)};T(s.coordSysMap,function(g,y){var x=l||g.containPoint(i);T(s.coordSysAxesInfo[y],function(_,b){var S=_.axis,w=UJ(u,_);if(!f&&x&&(!u||w)){var D=w&&w.value;D==null&&!l&&(D=S.pointToData(i)),D!=null&&qB(_,D,v,!1,p)}})});var m={};return T(c,function(g,y){var x=g.linkGroup;x&&!h[y]&&T(x.axesInfo,function(_,b){var S=h[b];if(_!==g&&S){var w=S.value;x.mapper&&(w=g.axis.scale.parse(x.mapper(w,jB(_),jB(g)))),m[g.key]=w}})}),T(m,function(g,y){qB(c[y],g,v,!0,p)}),zJ(h,c,p),VJ(d,i,r,o),BJ(c,o,t),p}}function qB(r,e,t,a,i){var n=r.axis;if(!(n.scale.isBlank()||!n.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=RJ(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&O(i,s[0]),!a&&r.snap&&n.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function RJ(r,e){var t=e.axis,a=t.dim,i=r,n=[],o=Number.MAX_VALUE,s=-1;return T(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(a),f,p;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(c,r,t);p=h.dataIndices,f=h.nestestValue}else{if(p=l.indicesOfNearest(a,c[0],r,t.type==="category"?.5:null),!p.length)return;f=l.getData().get(c[0],p[0])}if(!(f==null||!isFinite(f))){var d=r-f,v=Math.abs(d);v<=o&&((v=0&&s<0)&&(o=v,s=d,i=f,n.length=0),T(p,function(m){n.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:n,snapToValue:i}}function NJ(r,e,t,a){r[e.key]={value:t,payloadBatch:a}}function OJ(r,e,t,a){var i=t.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=qu(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function zJ(r,e,t){var a=t.axesInfo=[];T(e,function(i,n){var o=i.axisPointerModel.option,s=r[n];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function VJ(r,e,t,a){if(ay(e)||!r.list.length){a({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function BJ(r,e,t){var a=t.getZr(),i="axisPointerLastHighlights",n=XB(a)[i]||{},o=XB(a)[i]={};T(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&T(f.seriesDataIndices,function(p){var h=p.seriesIndex+" | "+p.dataIndex;o[h]=p})});var s=[],l=[];T(n,function(u,c){!o[c]&&l.push(u)}),T(o,function(u,c){!n[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function UJ(r,e){for(var t=0;t<(r||[]).length;t++){var a=r[t];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function jB(r){var e=r.axis.model,t={},a=t.axisDim=r.axis.dim;return t.axisIndex=t[a+"AxisIndex"]=e.componentIndex,t.axisName=t[a+"AxisName"]=e.name,t.axisId=t[a+"AxisId"]=e.id,t}function ay(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Fi(r){da.registerAxisPointerClass("CartesianAxisPointer",HB),r.registerComponentModel(GB),r.registerComponentView(ZB),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!z(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=mN(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},K1)}function J1(r){Tt(cg),Tt(Fi)}var FJ=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(a),p=n.get("type");if(p&&p!=="none"){var h=dc(n),d=GJ[p](s,l,f,c);d.style=h,t.graphicKey=d.type,t.pointer=d}var v=n.get(["label","margin"]),m=HJ(a,i,n,l,v);q1(t,i,n,o,m)},e})(hc);function HJ(r,e,t,a,i){var n=e.axis,o=n.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,c,f;if(n.dim==="radius"){var p=fe();Sr(p,p,s),pr(p,p,[a.cx,a.cy]),u=vr([o,-i],p);var h=e.getModel("axisLabel").get("rotate")||0,d=yr.innerTextLayout(s,h*Math.PI/180,-1);c=d.textAlign,f=d.textVerticalAlign}else{var v=l[1];u=a.coordToPoint([v+i,o]);var m=a.cx,g=a.cy;c=Math.abs(u[0]-m)/v<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-g)/v<.3?"middle":u[1]>g?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var GJ={line:function(r,e,t,a){return r.dim==="angle"?{type:"Line",shape:vc(e.coordToPoint([a[0],t]),e.coordToPoint([a[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,a){var i=Math.max(1,r.getBandWidth()),n=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:$1(e.cx,e.cy,a[0],a[1],(-t-i/2)*n,(-t+i/2)*n)}:{type:"Sector",shape:$1(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},$B=FJ;var WJ=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var a,i=this.ecModel;return i.eachComponent(t,function(n){n.getCoordSysModel()===this&&(a=n)},this),a},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e})(St),KB=WJ;var Q1=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Yt).models[0]},e.type="polarAxis",e})(St);Jt(Q1,pn);var JB=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e})(Q1);var QB=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e})(Q1);var tD=(function(r){I(e,r);function e(t,a){return r.call(this,"radius",t,a)||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e})(ur);tD.prototype.dataToRadius=ur.prototype.dataToCoord;tD.prototype.radiusToData=ur.prototype.coordToData;var tU=tD;var YJ=ot(),eD=(function(r){I(e,r);function e(t,a){return r.call(this,"angle",t,a||[0,360])||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,a=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=n[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=go(s==null?"":s+"",a.getFont(),"center","top"),f=Math.max(c.height,7),p=f/u;isNaN(p)&&(p=1/0);var h=Math.max(0,Math.floor(p)),d=YJ(t.model),v=d.lastAutoInterval,m=d.lastTickCount;return v!=null&&m!=null&&Math.abs(v-h)<=1&&Math.abs(m-o)<=1&&v>h?h=v:(d.lastTickCount=o,d.lastAutoInterval=h),h},e})(ur);eD.prototype.dataToAngle=ur.prototype.dataToCoord;eD.prototype.angleToData=ur.prototype.coordToData;var eU=eD;var rD=["radius","angle"],ZJ=(function(){function r(e){this.dimensions=rD,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new tU,this._angleAxis=new eU,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],a=this._angleAxis,i=this._radiusAxis;return a.scale.type===e&&t.push(a),i.scale.type===e&&t.push(i),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t,a){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],a)},r.prototype.pointToData=function(e,t,a){a=a||[];var i=this.pointToCoord(e);return a[0]=this._radiusAxis.radiusToData(i[0],t),a[1]=this._angleAxis.angleToData(i[1],t),a},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,i=this.getAngleAxis(),n=i.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+a*a);t/=l,a/=l;for(var u=Math.atan2(-a,t)/Math.PI*180,c=us;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e,t){t=t||[];var a=e[0],i=e[1]/180*Math.PI;return t[0]=Math.cos(i)*a+this.cx,t[1]=-Math.sin(i)*a+this.cy,t},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),a=t.getExtent().slice();a[0]>a[1]&&a.reverse();var i=e.getExtent(),n=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,p=this.r,h=this.r0;return p!==h&&f-o<=p*p&&f+o>=h*h},x:this.cx-a[1],y:this.cy-a[1],width:a[1]*2,height:a[1]*2}},r.prototype.convertToPixel=function(e,t,a){var i=rU(t);return i===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var i=rU(t);return i===this?this.pointToData(a):null},r})();function rU(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var aU=ZJ;function XJ(r,e,t){var a=e.get("center"),i=Zt(e,t).refContainer;r.cx=j(a[0],i.width)+i.x,r.cy=j(a[1],i.height)+i.y;var n=r.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:z(s)||(s=[0,s]);var l=[j(s[0],o),j(s[1],o)];n.inverse?n.setExtent(l[1],l[0]):n.setExtent(l[0],l[1])}function qJ(r,e){var t=this,a=t.getAngleAxis(),i=t.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();T(Bu(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),T(Bu(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),fn(a.scale,a.model),fn(i.scale,i.model),a.type==="category"&&!a.onBand){var n=a.getExtent(),o=360/a.scale.count();a.inverse?n[1]+=o:n[1]-=o,a.setExtent(n[0],n[1])}}function jJ(r){return r.mainType==="angleAxis"}function iU(r,e){var t;if(r.type=e.get("type"),r.scale=Bo(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),jJ(e)){r.inverse=r.inverse!==e.get("clockwise");var a=e.get("startAngle"),i=(t=e.get("endAngle"))!==null&&t!==void 0?t:a+(r.inverse?-360:360);r.setExtent(a,i)}e.axis=r,r.model=e}var $J={dimensions:rD,create:function(r,e){var t=[];return r.eachComponent("polar",function(a,i){var n=new aU(i+"");n.update=qJ;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");iU(o,l),iU(s,u),XJ(n,a,e),t.push(n),a.coordinateSystem=n,n.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var i=a.getReferringComponents("polar",Yt).models[0];a.coordinateSystem=i.coordinateSystem}}),t}},nU=$J;var KJ=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function iy(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var a=r.coordToPoint([e[0],t]),i=r.coordToPoint([e[1],t]);return{x1:a[0],y1:a[1],x2:i[0],y2:i[1]}}function ny(r){var e=r.getRadiusAxis();return e.inverse?0:1}function oU(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var JJ=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,a){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=V(i.getViewLabels(),function(c){c=tt(c);var f=i.scale,p=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(p),c});oU(u),oU(s),T(KJ,function(c){t.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&QJ[c](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e})(da),QJ={axisLine:function(r,e,t,a,i,n){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=ny(t),f=c?0:1,p,h=Math.abs(u[1]-u[0])===360?"Circle":"Arc";n[f]===0?p=new _t[h]({shape:{cx:t.cx,cy:t.cy,r:n[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):p=new Zs({shape:{cx:t.cx,cy:t.cy,r:n[c],r0:n[f]},style:o.getLineStyle(),z2:1,silent:!0}),p.style.fill=null,r.add(p)},axisTick:function(r,e,t,a,i,n){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[ny(t)],u=V(a,function(c){return new le({shape:iy(t,[l,l+s],c.coord)})});r.add(Mr(u,{style:J(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,a,i,n){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[ny(t)],c=[],f=0;fg?"left":"right",_=Math.abs(m[1]-y)/v<.3?"middle":m[1]>y?"top":"bottom";if(s&&s[d]){var b=s[d];et(b)&&b.textStyle&&(h=new Mt(b.textStyle,l,l.ecModel))}var S=new Dt({silent:yr.isLabelSilent(e),style:Gt(h,{x:m[0],y:m[1],fill:h.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:x,verticalAlign:_})});if(r.add(S),Er({el:S,componentModel:e,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return S.isTruncated},value:f.rawLabel,tickIndex:p}}),c){var w=yr.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=f.rawLabel,nt(S).eventData=w}},this)},splitLine:function(r,e,t,a,i,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f=0?"p":"n",R=C;b&&(a[c][A]||(a[c][A]={p:C,n:C}),R=a[c][A][P]);var k=void 0,B=void 0,U=void 0,F=void 0;if(d.dim==="radius"){var H=d.dataToCoord(L)-C,G=l.dataToCoord(A);Math.abs(H)=F})}}})}function nQ(r){var e={};T(r,function(a,i){var n=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=cU(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},p=f.stacks;e[l]=f;var h=uU(a);p[h]||f.autoWidthCount++,p[h]=p[h]||{width:0,maxWidth:0};var d=j(a.get("barWidth"),c),v=j(a.get("barMaxWidth"),c),m=a.get("barGap"),g=a.get("barCategoryGap");d&&!p[h].width&&(d=Math.min(f.remainedWidth,d),p[h].width=d,f.remainedWidth-=d),v&&(p[h].maxWidth=v),m!=null&&(f.gap=m),g!=null&&(f.categoryGap=g)});var t={};return T(e,function(a,i){t[i]={};var n=a.stacks,o=a.bandWidth,s=j(a.categoryGap,o),l=j(a.gap,1),u=a.remainedWidth,c=a.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),T(n,function(v,m){var g=v.maxWidth;g&&g=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e,t,a){a=a||[];var i=this.getAxis();return a[0]=i.coordToData(i.toLocalCoord(e[i.orient==="horizontal"?0:1])),a},r.prototype.dataToPoint=function(e,t,a){var i=this.getAxis(),n=this.getRect();a=a||[];var o=i.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[o]=i.toGlobalCoord(i.dataToCoord(+e)),a[1-o]=o===0?n.y+n.height/2:n.x+n.width/2,a},r.prototype.convertToPixel=function(e,t,a){var i=mU(t);return i===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var i=mU(t);return i===this?this.pointToData(a):null},r})();function mU(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var gU=hQ;function dQ(r,e){var t=[];return r.eachComponent("singleAxis",function(a,i){var n=new gU(a,r,e);n.name="single_"+i,n.resize(a,e),a.coordinateSystem=n,t.push(n)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=a.getReferringComponents("singleAxis",Yt).models[0];a.coordinateSystem=i&&i.coordinateSystem}}),t}var vQ={create:dQ,dimensions:iD},yU=vQ;var xU=["x","y"],mQ=["width","height"],gQ=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis,l=s.coordinateSystem,u=nD(l,1-sy(s)),c=l.dataToPoint(a)[0],f=n.get("type");if(f&&f!=="none"){var p=dc(n),h=yQ[f](s,c,u);h.style=p,t.graphicKey=h.type,t.pointer=h}var d=jp(i);Qg(a,t,d,i,n,o)},e.prototype.getHandleTransform=function(t,a,i){var n=jp(a,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Zp(a.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,i,n){var o=i.axis,s=o.coordinateSystem,l=sy(o),u=nD(s,l),c=[t.x,t.y];c[l]+=a[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=nD(s,1-l),p=(f[1]+f[0])/2,h=[p,p];return h[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e})(hc),yQ={line:function(r,e,t){var a=vc([e,t[0]],[e,t[1]],sy(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:ty([e-a/2,t[0]],[a,i],sy(r))}}};function sy(r){return r.isHorizontal()?0:1}function nD(r,e){var t=r.getRect();return[t[xU[e]],t[xU[e]]+t[mQ[e]]]}var _U=gQ;var xQ=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e})(Ot);function oD(r){Tt(Fi),da.registerAxisPointerClass("SingleAxisPointer",_U),r.registerComponentView(xQ),r.registerComponentView(hU),r.registerComponentModel(oy),Ui(r,"single",oy,oy.defaultOption),r.registerCoordinateSystem("single",yU)}var _Q=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a,i){var n=la(t);r.prototype.init.apply(this,arguments),bU(t,n)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),bU(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:N.color.axisLine,width:1,type:"solid"}},itemStyle:{color:N.color.neutral00,borderWidth:1,borderColor:N.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:N.size.s,color:N.color.secondary},monthLabel:{show:!0,position:"start",margin:N.size.s,align:"center",formatter:null,color:N.color.secondary},yearLabel:{show:!0,position:null,margin:N.size.xl,formatter:null,color:N.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e})(St);function bU(r,e){var t=r.cellSize,a;z(t)?a=t:a=r.cellSize=[t,t],a.length===1&&(a[1]=a[0]);var i=V([0,1],function(n){return dI(e,n)&&(a[n]="auto"),a[n]!=null&&a[n]!=="auto"});mr(r,e,{type:"box",ignoreSize:i})}var SU=_Q;var bQ=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(t,s,n),this._renderLines(t,s,l,n),this._renderYearText(t,s,l,n),this._renderMonthText(t,u,l,n),this._renderWeekText(t,u,s,l,n)},e.prototype._renderDayRect=function(t,a,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=n.getCellWidth(),l=n.getCellHeight(),u=a.start.time;u<=a.end.time;u=n.getNextNDay(u,1).time){var c=n.dataToCalendarLayout([u],!1).tl,f=new ht({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},e.prototype._renderLines=function(t,a,i,n){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=a.start,p=0;f.time<=a.end.time;p++){d(f.formatedDate),p===0&&(f=s.getDateInfo(a.start.y+"-"+a.start.m));var h=f.date;h.setMonth(h.getMonth()+1),f=s.getDateInfo(h)}d(s.getNextNDay(a.end.time,1).formatedDate);function d(v){o._firstDayOfMonth.push(s.getDateInfo(v)),o._firstDayPoints.push(s.dataToCalendarLayout([v],!1).tl);var m=o._getLinePointsOfOneWeek(t,v,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,n)},e.prototype._getEdgesPoints=function(t,a,i){var n=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return n[0][o]=n[0][o]-a/2,n[1][o]=n[1][o]+a/2,n},e.prototype._drawSplitline=function(t,a,i){var n=new he({z2:20,shape:{points:t},style:a});i.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,a,i){for(var n=t.coordinateSystem,o=n.getDateInfo(a),s=[],l=0;l<7;l++){var u=n.getNextNDay(o.time,l),c=n.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,a){return W(t)&&t?uI(t,a):$(t)?t(a):a.nameMap},e.prototype._yearTextPositionControl=function(t,a,i,n,o){var s=a[0],l=a[1],u=["center","bottom"];n==="bottom"?(l+=o,u=["center","top"]):n==="left"?s-=o:n==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(n==="left"||n==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,a,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,p=i==="horizontal"?0:1,h={top:[c,u[p][1]],bottom:[c,u[1-p][1]],left:[u[1-p][0],f],right:[u[p][0],f]},d=a.start.y;+a.end.y>+a.start.y&&(d=d+"-"+a.end.y);var v=o.get("formatter"),m={start:a.start.y,end:a.end.y,nameMap:d},g=this._formatterLabel(v,m),y=new Dt({z2:30,style:Gt(o,{text:g}),silent:o.get("silent")});y.attr(this._yearTextPositionControl(y,h[l],i,l,s)),n.add(y)}},e.prototype._monthTextPositionControl=function(t,a,i,n,o){var s="left",l="top",u=t[0],c=t[1];return i==="horizontal"?(c=c+o,a&&(s="center"),n==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),n==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,a,i,n){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||W(s))&&(s&&(a=Pf(s)||a),s=a.get(["time","monthAbbr"])||[]);var p=u==="start"?0:1,h=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=c==="center",v=o.get("silent"),m=0;m=n.start.time&&i.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],a;t[0].time>t[1].time&&(a=!0,t.reverse());var i=Math.floor(t[1].time/sD)-Math.floor(t[0].time/sD)+1,n=new Date(t[0].time),o=n.getDate(),s=t[1].date.getDate();n.setDate(o+i-1);var l=n.getDate();if(l!==s)for(var u=n.getTime()-t[1].time>0?1:-1;(l=n.getDate())!==s&&(n.getTime()-t[1].time)*u>0;)i-=u,n.setDate(l-u);var c=Math.floor((i+t[0].day+6)/7),f=a?-c+1:c-1;return a&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:c,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,a){var i=this._getRangeInfo(a);if(e>i.weeks||e===0&&ti.lweek)return null;var n=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+n),this.getDateInfo(o)},r.create=function(e,t){var a=[];return e.eachComponent("calendar",function(i){var n=new r(i,e,t);a.push(n),i.coordinateSystem=n}),e.eachComponent(function(i,n){ln({targetModel:n,coordSysType:"calendar",coordSysProvider:wv})}),a},r.dimensions=["time","value"],r})();function lD(r){var e=r.calendarModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}var TU=SQ;function uD(r){r.registerComponentModel(SU),r.registerComponentView(wU),r.registerCoordinateSystem("calendar",TU)}var Hi={level:1,leaf:2,nonLeaf:3},Gi={none:0,all:1,body:2,corner:3};function cD(r,e,t){var a=e[bt[t]].getCell(r);return!a&&yt(r)&&r<0&&(a=e[bt[1-t]].getUnitLayoutInfo(t,Math.round(r))),a}function ly(r){var e=r||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function uy(r,e,t,a,i){DU(r[0],e,i,t,a,0),DU(r[1],e,i,t,a,1)}function DU(r,e,t,a,i,n){r[0]=1/0,r[1]=-1/0;var o=a[n],s=z(o)?o:[o],l=s.length,u=!!t;if(l>=1?(CU(r,e,s,u,i,n,0),l>1&&CU(r,e,s,u,i,n,l-1)):r[0]=r[1]=NaN,u){var c=-i[bt[1-n]].getLocatorCount(n),f=i[bt[n]].getLocatorCount(n)-1;t===Gi.body?c=_e(0,c):t===Gi.corner&&(f=wr(-1,f)),f=e[0]&&r[0]<=e[1]}function pD(r,e){r.id.set(e[0][0],e[1][0]),r.span.set(e[0][1]-r.id.x+1,e[1][1]-r.id.y+1)}function EU(r,e){r[0][0]=e[0][0],r[0][1]=e[0][1],r[1][0]=e[1][0],r[1][1]=e[1][1]}function hD(r,e,t,a){var i=cD(e[a][0],t,a),n=cD(e[a][1],t,a);r[bt[a]]=r[be[a]]=NaN,i&&n&&(r[bt[a]]=i.xy,r[be[a]]=n.xy+n.wh-i.xy)}function mc(r,e,t,a){return r[bt[e]]=t,r[bt[1-e]]=a,r}function DQ(r){return r&&(r.type===Hi.leaf||r.type===Hi.nonLeaf)?r:null}function Rl(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var dD=(function(){function r(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=t,this._uniqueValueGen=CQ(e);var a=t.get("data",!0);a!=null&&!z(a)&&(a=[]),a?this._initByDimModelData(a):this._initBySeriesData()}return r.prototype._initByDimModelData=function(e){var t=this,a=t._cells,i=t._levels,n=[],o=0;t._leavesCount=s(e,0,0),l();return;function s(u,c,f){var p=0;return u&&T(u,function(h,d){var v=!1,m;W(h)?m={value:h}:et(h)?(m=h,h.value!=null&&!W(h.value)&&(v=!0,m={value:null})):(m={value:null},h!=null&&(v=!0));var g={type:Hi.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new pt,span:mc(new pt,t.dimIdx,1,1),option:m,xy:NaN,wh:NaN,dim:t,rect:Rl()};o++,(n[c]||(n[c]=[])).push(g),i[f]||(i[f]={type:Hi.level,xy:NaN,wh:NaN,option:null,id:new pt,dim:t});var y=s(m.children,c,f+1),x=Math.max(1,y);g.span[bt[t.dimIdx]]=x,p+=x,c+=x}),p}function l(){for(var u=[];a.length=1,x=t[bt[a]],_=n.getLocatorCount(a)-1,b=new Si;for(o.resetLayoutIterator(b,a);b.next();)S(b.item);for(n.resetLayoutIterator(b,a);b.next();)S(b.item);function S(w){Me(w.wh)&&(w.wh=g),w.xy=x,w.id[bt[a]]===_&&!y&&(w.wh=t[bt[a]]+t[be[a]]-w.xy),x+=w.wh}}function zU(r,e){for(var t=e[bt[r]].resetCellIterator();t.next();){var a=t.item;dy(a.rect,r,a.id,a.span,e),dy(a.rect,1-r,a.id,a.span,e),a.type===Hi.nonLeaf&&(a.xy=a.rect[bt[r]],a.wh=a.rect[be[r]])}}function VU(r,e){r.travelExistingCells(function(t){var a=t.span;if(a){var i=t.spanRect,n=t.id;dy(i,0,n,a,e),dy(i,1,n,a,e)}})}function dy(r,e,t,a,i){r[be[e]]=0;var n=t[bt[e]],o=n<0?i[bt[1-e]]:i[bt[e]],s=o.getUnitLayoutInfo(e,t[bt[e]]);if(r[bt[e]]=s.xy,r[be[e]]=s.wh,a[bt[e]]>1){var l=o.getUnitLayoutInfo(e,t[bt[e]]+a[bt[e]]-1);r[be[e]]=l.xy+l.wh-s.xy}}function BQ(r,e,t){var a=ou(r,t[be[e]]);return SD(a,t[be[e]])}function SD(r,e){return Math.max(Math.min(r,Q(e,1/0)),0)}function bD(r){var e=r.matrixModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}var xr={inBody:1,inCorner:2,outside:3},_n={x:null,y:null,point:[]};function BU(r,e,t,a,i){var n=t[bt[e]],o=t[bt[1-e]],s=n.getUnitLayoutInfo(e,n.getLocatorCount(e)-1),l=n.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,f=r.point[e]=a[e];if(!l&&!c){r[bt[e]]=xr.outside;return}if(i===Gi.body){l?(r[bt[e]]=xr.inBody,f=wr(s.xy+s.wh,_e(l.xy,f)),r.point[e]=f):r[bt[e]]=xr.outside;return}else if(i===Gi.corner){c?(r[bt[e]]=xr.inCorner,f=wr(c.xy+c.wh,_e(u.xy,f)),r.point[e]=f):r[bt[e]]=xr.outside;return}var p=l?l.xy:c?c.xy+c.wh:NaN,h=u?u.xy:p,d=s?s.xy+s.wh:p;if(fd){if(!i){r[bt[e]]=xr.outside;return}f=d}r.point[e]=f,r[bt[e]]=p<=f&&f<=d?xr.inBody:h<=f&&f<=p?xr.inCorner:xr.outside}function UU(r,e,t,a){var i=1-t;if(r[bt[t]]!==xr.outside)for(a[bt[t]].resetCellIterator(_D);_D.next();){var n=_D.item;if(HU(r.point[t],n.rect,t)&&HU(r.point[i],n.rect,i)){e[t]=n.ordinal,e[i]=n.id[bt[i]];return}}}function FU(r,e,t,a){if(r[bt[t]]!==xr.outside){var i=r[bt[t]]===xr.inCorner?a[bt[1-t]]:a[bt[t]];for(i.resetLayoutIterator(hy,t);hy.next();)if(UQ(r.point[t],hy.item)){e[t]=hy.item.id[bt[t]];return}}}function UQ(r,e){return e.xy<=r&&r<=e.xy+e.wh}function HU(r,e,t){return e[bt[t]]<=r&&r<=e[bt[t]]+e[be[t]]}var GU=VQ;function wD(r){r.registerComponentModel(PU),r.registerComponentView(NU),r.registerCoordinateSystem("matrix",GU)}function FQ(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function WU(r,e){var t;return T(e,function(a){r[a]!=null&&r[a]!=="auto"&&(t=!0)}),t}function HQ(r,e,t){var a=O({},t),i=r[e],n=t.$action||"merge";if(n==="merge")if(i){if(0)var o;dt(i,a,!0),mr(i,a,{ignoreSize:!0}),O_(t,i),vy(t,i),vy(t,i,"shape"),vy(t,i,"style"),vy(t,i,"extra"),t.clipPath=i.clipPath}else r[e]=a;else n==="replace"?r[e]=a:n==="remove"&&i&&(r[e]=null)}var YU=["transition","enterFrom","leaveTo"],GQ=YU.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function vy(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var a=t?YU:GQ,i=0;i=0;c--){var f=i[c],p=ve(f.id,null),h=p!=null?o.get(p):null;if(h){var d=h.parent,g=si(d),y=d===n?{width:s,height:l}:{width:g.width,height:g.height},x={},_=Mo(h,f,y,null,{hv:f.hv,boundingMode:f.bounding},x);if(!si(h).isNew&&_){for(var b=f.transition,S={},w=0;w=0)?S[D]=C:h[D]=C}wt(h,S,t,0)}else h.attr(x)}}},e.prototype._clear=function(){var t=this,a=this._elMap;a.each(function(i){my(i,si(i).option,a,t._lastGraphicModel)}),this._elMap=q()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e})(Ot);function TD(r){var e=it(XU,r)?XU[r]:gu(r),t=new e({});return si(t).type=r,t}function qU(r,e,t,a){var i=TD(t);return e.add(i),a.set(r,i),si(i).id=r,si(i).isNew=!0,i}function my(r,e,t,a){var i=r&&r.parent;i&&(r.type==="group"&&r.traverse(function(n){my(n,e,t,a)}),fc(r,e,a),t.removeKey(si(r).id))}function jU(r,e,t,a){r.isGroup||T([["cursor",ke.prototype.cursor],["zlevel",a||0],["z",t||0],["z2",0]],function(i){var n=i[0];it(e,n)?r[n]=Q(e[n],i[1]):r[n]==null&&(r[n]=i[1])}),T(gt(e),function(i){if(i.indexOf("on")===0){var n=e[i];r[i]=$(n)?n:null}}),it(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function YQ(r){return r=O({},r),T(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(R_),function(e){delete r[e]}),r}function ZQ(r,e,t){var a=nt(r).eventData;!r.silent&&!r.ignore&&!a&&(a=nt(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),a&&(a.info=t.info)}function DD(r){r.registerComponentModel(ZU),r.registerComponentView($U),r.registerPreprocessor(function(e){var t=e.graphic;z(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var CD=["x","y","radius","angle","single"],XQ=["cartesian2d","polar","singleAxis"];function KU(r){var e=r.get("coordinateSystem");return lt(XQ,e)>=0}function li(r){return r+"Axis"}function JU(r,e){var t=q(),a=[],i=q();r.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var n;do n=!1,r.eachComponent("dataZoom",o);while(n);function o(c){!i.get(c.uid)&&l(c)&&(s(c),n=!0)}function s(c){i.set(c.uid,!0),a.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(p,h){var d=t.get(p);d&&d[h]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,p){(t.get(f)||t.set(f,[]))[p]=!0})}return a}function gy(r){var e=r.ecModel,t={infoList:[],infoMap:q()};return r.eachTargetAxis(function(a,i){var n=e.getComponent(li(a),i);if(n){var o=n.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(n)}}}),t}var MD=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r})(),qQ=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,a,i){var n=QU(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this._doInit(n)},e.prototype.mergeOption=function(t){var a=QU(t);dt(this.option,t,!0),dt(this.settledOption,a,!0),this._doInit(a)},e.prototype._doInit=function(t){var a=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;T([["start","startValue"],["end","endValue"]],function(n,o){this._rangePropMode[o]==="value"&&(a[n[0]]=i[n[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),a=this._targetAxisInfoMap=q(),i=this._fillSpecifiedTargetAxis(a);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(n){n.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var a=!1;return T(CD,function(i){var n=this.getReferringComponents(li(i),jE);if(n.specified){a=!0;var o=new MD;T(n.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),a},e.prototype._fillAutoTargetAxisByOrient=function(t,a){var i=this.ecModel,n=!0;if(n){var o=a==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(n){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===a}});l(s,"single")}function l(u,c){var f=u[0];if(f){var p=new MD;if(p.add(f.componentIndex),t.set(c,p),n=!1,c==="x"||c==="y"){var h=f.getReferringComponents("grid",Yt).models[0];h&&T(u,function(d){f.componentIndex!==d.componentIndex&&h===d.getReferringComponents("grid",Yt).models[0]&&p.add(d.componentIndex)})}}}n&&T(CD,function(u){if(n){var c=i.findComponents({mainType:li(u),filter:function(p){return p.get("type",!0)==="category"}});if(c[0]){var f=new MD;f.add(c[0].componentIndex),t.set(u,f),n=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(a){!t&&(t=a)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var a=this._rangePropMode,i=this.get("rangeMode");T([["start","startValue"],["end","endValue"]],function(n,o){var s=t[n[0]]!=null,l=t[n[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":i?a[o]=i[o]:s&&(a[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(a,i){t==null&&(t=this.ecModel.getComponent(li(a),i))},this),t},e.prototype.eachTargetAxis=function(t,a){this._targetAxisInfoMap.each(function(i,n){T(i.indexList,function(o){t.call(a,n,o)})})},e.prototype.getAxisProxy=function(t,a){var i=this.getAxisModel(t,a);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,a){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[a])return this.ecModel.getComponent(li(t),a)},e.prototype.setRawRange=function(t){var a=this.option,i=this.settledOption;T([["start","startValue"],["end","endValue"]],function(n){(t[n[0]]!=null||t[n[1]]!=null)&&(a[n[0]]=i[n[0]]=t[n[0]],a[n[1]]=i[n[1]]=t[n[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var a=this.option;T(["start","startValue","end","endValue"],function(i){a[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,a){if(t==null&&a==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,a).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var a,i=this._targetAxisInfoMap.keys(),n=0;no[1];if(x&&!_&&!b)return!0;x&&(m=!0),_&&(d=!0),b&&(v=!0)}return m&&d&&v})}else _c(c,function(h){if(n==="empty")l.setData(u=u.map(h,function(v){return s(v)?v:NaN}));else{var d={};d[h]=o,u.selectRange(d)}});_c(c,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,a=this._dataExtent;_c(["min","max"],function(i){var n=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?n=zt(a[0]+o,a,[0,100],!0):n!=null&&(o=zt(n,[0,100],a,!0)-a[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,a=this._valueWindow;if(t){var i=gd(a,[0,500]);i=Math.min(i,20);var n=e.axis.scale.rawExtentInfo;t[0]!==0&&n.setDeterminedMinMax("min",+a[0].toFixed(i)),t[1]!==100&&n.setDeterminedMinMax("max",+a[1].toFixed(i)),n.freeze()}},r})();function QQ(r,e,t){var a=[1/0,-1/0];_c(t,function(o){n2(a,o.getData(),e)});var i=r.getAxisModel(),n=Em(i.axis.scale,i,a).calculate();return[n.min,n.max]}var aF=JQ;var ttt={getTargetSeries:function(r){function e(i){r.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(o,s){var l=r.getComponent(li(o),s);i(o,s,l,n)})})}e(function(i,n,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,n,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new aF(i,n,s,r),t.push(o.__dzAxisProxy))});var a=q();return T(t,function(i){T(i.getTargetSeriesModels(),function(n){a.set(n.uid,n)})}),a},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(a,i){t.getAxisProxy(a,i).reset(t)}),t.eachTargetAxis(function(a,i){t.getAxisProxy(a,i).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var a=t.findRepresentativeAxisProxy();if(a){var i=a.getDataPercentWindow(),n=a.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}})}},iF=ttt;function ED(r){r.registerAction("dataZoom",function(e,t){var a=JU(t,e);T(a,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var nF=!1;function Nl(r){nF||(nF=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,iF),ED(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function oF(r){r.registerComponentModel(tF),r.registerComponentView(eF),Nl(r)}var ar=(function(){function r(){}return r})();var sF={};function rs(r,e){sF[r]=e}function yy(r){return sF[r]}var rtt=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;T(this.option.feature,function(a,i){var n=yy(i);n&&(n.getDefaultOption&&(n.defaultOption=n.getDefaultOption(t)),dt(a,n.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:N.color.border,borderRadius:0,borderWidth:0,padding:N.size.m,itemSize:15,itemGap:N.size.s,showTitle:!0,iconStyle:{borderColor:N.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:N.color.accent50}},tooltip:{show:!1,position:"bottom"}},e})(St),lF=rtt;function xy(r,e){var t=sn(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var i=new ht({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1});return i}var itt=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i,n){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),f=[];T(u,function(y,x){f.push(x)}),new gr(this._featureNames||[],f).add(p).update(p).remove(ut(p,null)).execute(),this._featureNames=f;function p(y,x){var _=f[y],b=f[x],S=u[_],w=new Mt(S,t,t.ecModel),D;if(n&&n.newTitle!=null&&n.featureName===_&&(S.title=n.newTitle),_&&!b){if(ntt(_))D={onclick:w.option.onclick,featureName:_};else{var C=yy(_);if(!C)return;D=new C}c[_]=D}else if(D=c[b],!D)return;D.uid=$a("toolbox-feature"),D.model=w,D.ecModel=a,D.api=i;var M=D instanceof ar;if(!_&&b){M&&D.dispose&&D.dispose(a,i);return}if(!w.get("show")||M&&D.unusable){M&&D.remove&&D.remove(a,i);return}h(w,D,_),w.setIconStatus=function(E,L){var A=this.option,P=this.iconPaths;A.iconStatus=A.iconStatus||{},A.iconStatus[E]=L,P[E]&&(L==="emphasis"?Tr:Dr)(P[E])},D instanceof ar&&D.render&&D.render(w,a,i,n)}function h(y,x,_){var b=y.getModel("iconStyle"),S=y.getModel(["emphasis","iconStyle"]),w=x instanceof ar&&x.getIcons?x.getIcons():y.get("icon"),D=y.get("title")||{},C,M;W(w)?(C={},C[_]=w):C=w,W(D)?(M={},M[_]=D):M=D;var E=y.iconPaths={};T(C,function(L,A){var P=Vn(L,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(b.getItemStyle());var R=P.ensureState("emphasis");R.style=S.getItemStyle();var k=new Dt({style:{text:M[A],align:S.get("textAlign"),borderRadius:S.get("textBorderRadius"),padding:S.get("textPadding"),fill:null,font:_u({fontStyle:S.get("textFontStyle"),fontFamily:S.get("textFontFamily"),fontSize:S.get("textFontSize"),fontWeight:S.get("textFontWeight")},a)},ignore:!0});P.setTextContent(k),Er({el:P,componentModel:t,itemName:A,formatterParamsExtra:{title:M[A]}}),P.__title=M[A],P.on("mouseover",function(){var B=S.getItemStyle(),U=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";k.setStyle({fill:S.get("textFill")||B.fill||B.stroke||N.color.neutral99,backgroundColor:S.get("textBackgroundColor")}),P.setTextConfig({position:S.get("textPosition")||U}),k.ignore=!t.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){y.get(["iconStatus",A])!=="emphasis"&&i.leaveEmphasis(this),k.hide()}),(y.get(["iconStatus",A])==="emphasis"?Tr:Dr)(P),o.add(P),P.on("click",Z(x.onclick,x,a,i,A)),E[A]=P})}var d=Zt(t,i).refContainer,v=t.getBoxLayoutParams(),m=t.get("padding"),g=Bt(v,d,m);Ai(t.get("orient"),o,t.get("itemGap"),g.width,g.height),Mo(o,v,d,m),o.add(xy(o.getBoundingRect(),t)),l||o.eachChild(function(y){var x=y.__title,_=y.ensureState("emphasis"),b=_.textConfig||(_.textConfig={}),S=y.getTextContent(),w=S&&S.ensureState("emphasis");if(w&&!$(w)&&x){var D=w.style||(w.style={}),C=go(x,Dt.makeFont(D)),M=y.x+o.x,E=y.y+o.y+s,L=!1;E+C.height>i.getHeight()&&(b.position="top",L=!0);var A=L?-5-C.height:s+10;M+C.width/2>i.getWidth()?(b.position=["100%",A],D.align="right"):M-C.width/2<0&&(b.position=[0,A],D.align="left")}})},e.prototype.updateView=function(t,a,i,n){T(this._features,function(o){o instanceof ar&&o.updateView&&o.updateView(o.model,a,i,n)})},e.prototype.remove=function(t,a){T(this._features,function(i){i instanceof ar&&i.remove&&i.remove(t,a)}),this.group.removeAll()},e.prototype.dispose=function(t,a){T(this._features,function(i){i instanceof ar&&i.dispose&&i.dispose(t,a)})},e.type="toolbox",e})(Ot);function ntt(r){return r.indexOf("my")===0}var uF=itt;var ott=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||N.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Lt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=n+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var p=l.split(","),h=p[0].indexOf("base64")>-1,d=o?decodeURIComponent(p[1]):p[1];h&&(d=window.atob(d));var v=n+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=d.length,g=new Uint8Array(m);m--;)g[m]=d.charCodeAt(m);var y=new Blob([g]);window.navigator.msSaveOrOpenBlob(y,v)}else{var x=document.createElement("iframe");document.body.appendChild(x);var _=x.contentWindow,b=_.document;b.open("image/svg+xml","replace"),b.write(d),b.close(),_.focus(),b.execCommand("SaveAs",!0,v),document.body.removeChild(x)}}else{var S=i.get("lang"),w='',D=window.open();D.document.write(w),D.document.title=n}},e.getDefaultOption=function(t){var a={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:N.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e})(ar),cF=ott;var fF="__ec_magicType_stack__";var stt=[["line","bar"],["stack"]],ltt=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,a=t.get("icon"),i={};return T(t.get("type"),function(n){a[n]&&(i[n]=a[n])}),i},e.getDefaultOption=function(t){var a={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},e.prototype.onclick=function(t,a,i){var n=this.model,o=n.get(["seriesIndex",i]);if(pF[i]){var s={series:[]},l=function(f){var p=f.subType,h=f.id,d=pF[i](p,h,f,n);d&&(J(d,f.option),s.series.push(d));var v=f.coordinateSystem;if(v&&v.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=v.getAxesByScale("ordinal")[0];if(m){var g=m.dim,y=g+"Axis",x=f.getReferringComponents(y,Yt).models[0],_=x.componentIndex;s[y]=s[y]||[];for(var b=0;b<=_;b++)s[y][_]=s[y][_]||{};s[y][_].boundaryGap=i==="bar"}}};T(stt,function(f){lt(f,i)>=0&&T(f,function(p){n.setIconStatus(p,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=dt({stack:n.option.title.tiled,tiled:n.option.title.stack},n.option.title),n.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),a.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e})(ar),pF={line:function(r,e,t,a){if(r==="bar")return dt({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,e,t,a){if(r==="line")return dt({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,e,t,a){var i=t.get("stack")===fF;if(r==="line"||r==="bar")return a.setIconStatus("stack",i?"normal":"emphasis"),dt({id:e,stack:i?"":fF},a.get(["option","stack"])||{},!0)}};Br({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var hF=ltt;var by=new Array(60).join("-"),bc=" ";function utt(r){var e={},t=[],a=[];return r.eachRawSeries(function(i){var n=i.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:a}}function ctt(r){var e=[];return T(r,function(t,a){var i=t.categoryAxis,n=t.valueAxis,o=n.dim,s=[" "].concat(V(t.series,function(h){return h.name})),l=[i.model.getCategories()];T(t.series,function(h){var d=h.getRawData();l.push(h.getRawData().mapArray(d.mapDimension(o),function(v){return v}))});for(var u=[s.join(bc)],c=0;c=0)return!0}var AD=new RegExp("["+bc+"]+","g");function dtt(r){for(var e=r.split(/\n+/g),t=_y(e.shift()).split(AD),a=[],i=V(t,function(l){return{name:l,data:[]}}),n=0;n=0;n--){var o=t[n];if(o[i])break}if(n<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function yF(r){var e=LD(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return vF(t,function(i,n){for(var o=e.length-1;o>=0;o--)if(i=e[o][n],i){a[n]=i;break}}),a}function xF(r){mF(r).snapshots=null}function _F(r){return LD(r).length}function LD(r){var e=mF(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var xtt=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){xF(t),a.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var a={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return a},e})(ar);Br({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var SF=xtt;var _tt=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],btt=(function(){function r(e,t,a){var i=this;this._targetInfoList=[];var n=wF(t,e);T(Stt,function(o,s){(!a||!a.include||lt(a.include,s)>=0)&&o(n,i._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(a,i,n){if((a.coordRanges||(a.coordRanges=[])).push(i),!a.coordRange){a.coordRange=i;var o=ID[a.brushType](0,n,i);a.__rangeOffset={offset:MF[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,a){T(e,function(i){var n=this.findTargetInfo(i,t);n&&n!==!0&&T(n.coordSyses,function(o){var s=ID[i.brushType](1,o,i.range,!0);a(i,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){T(e,function(a){var i=this.findTargetInfo(a,t);if(a.range=a.range||[],i&&i!==!0){a.panelId=i.panelId;var n=ID[a.brushType](0,i.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?MF[a.brushType](n.values,o.offset,wtt(n.xyMinMax,o.xyMinMax)):n.values}},this)},r.prototype.makePanelOpts=function(e,t){return V(this._targetInfoList,function(a){var i=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:t?t(a):null,clipPath:zg(i),isTargetByCursor:Bg(i,e,a.coordSysModel),getLinearBrushOtherExtent:Vg(i)}})},r.prototype.controlSeries=function(e,t,a){var i=this.findTargetInfo(e,a);return i===!0||i&<(i.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var a=this._targetInfoList,i=wF(t,e),n=0;nr[1]&&r.reverse(),r}function wF(r,e){return ji(r,e,{includeMainTypes:_tt})}var Stt={grid:function(r,e){var t=r.xAxisModels,a=r.yAxisModels,i=r.gridModels,n=q(),o={},s={};!t&&!a&&!i||(T(t,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),T(a,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),T(i,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,c=[];T(u.getCartesians(),function(f,p){(lt(t,f.getAxis("x").model)>=0||lt(a,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:DF.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){T(r.geoModels,function(t){var a=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:a,coordSyses:[a],getPanelRect:DF.geo})})}},TF=[function(r,e){var t=r.xAxisModel,a=r.yAxisModel,i=r.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&a&&(i=a.axis.grid.model),i&&i===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],DF={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Ci(r)),e}},ID={lineX:ut(CF,0),lineY:ut(CF,1),rect:function(r,e,t,a){var i=r?e.pointToData([t[0][0],t[1][0]],a):e.dataToPoint([t[0][0],t[1][0]],a),n=r?e.pointToData([t[0][1],t[1][1]],a):e.dataToPoint([t[0][1],t[1][1]],a),o=[PD([i[0],n[0]]),PD([i[1],n[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,a){var i=[[1/0,-1/0],[1/0,-1/0]],n=V(t,function(o){var s=r?e.pointToData(o,a):e.dataToPoint(o,a);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:n,xyMinMax:i}}};function CF(r,e,t,a){var i=t.getAxis(["x","y"][r]),n=PD(V([0,1],function(s){return e?i.coordToData(i.toLocalCoord(a[s]),!0):i.toGlobalCoord(i.dataToCoord(a[s]))})),o=[];return o[r]=n,o[1-r]=[NaN,NaN],{values:n,xyMinMax:o}}var MF={lineX:ut(EF,0),lineY:ut(EF,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return V(r,function(a,i){return[a[0]-t[0]*e[i][0],a[1]-t[1]*e[i][1]]})}};function EF(r,e,t,a){return[e[0]-a[r]*t[0],e[1]-a[r]*t[1]]}function wtt(r,e){var t=AF(r),a=AF(e),i=[t[0]/a[0],t[1]/a[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function AF(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Jp=btt;var kD=T,Ttt=ZE("toolbox-dataZoom_");var Dtt=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i,n){this._brushController||(this._brushController=new sc(i.getZr()),this._brushController.on("brush",Z(this._onBrush,this)).mount()),Ett(t,a,this,n,i),Mtt(t,a)},e.prototype.onclick=function(t,a,i){Ctt[i].call(this)},e.prototype.remove=function(t,a){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,a){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var a=t.areas;if(!t.isEnd||!a.length)return;var i={},n=this.ecModel;this._brushController.updateCovers([]);var o=new Jp(RD(this.model),n,{include:["grid"]});o.matchOutputRanges(a,n,function(u,c,f){if(f.type==="cartesian2d"){var p=u.brushType;p==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[p],f,c)}}),gF(n,i),this._dispatchZoomAction(i);function s(u,c,f){var p=c.getAxis(u),h=p.model,d=l(u,h,n),v=d.findRepresentativeAxisProxy(h).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(f=Yr(0,f.slice(),p.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),d&&(i[d.id]={dataZoomId:d.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var p;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var d=h.getAxisModel(u,c.componentIndex);d&&(p=h)}),p}},e.prototype._dispatchZoomAction=function(t){var a=[];kD(t,function(i,n){a.push(tt(i))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},e.getDefaultOption=function(t){var a={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:N.color.backgroundTint}};return a},e})(ar),Ctt={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(yF(this.ecModel))}};function RD(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Mtt(r,e){r.setIconStatus("back",_F(e)>1?"emphasis":"normal")}function Ett(r,e,t,a,i){var n=t._isZoomActive;a&&a.type==="takeGlobalCursor"&&(n=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),t._isZoomActive=n,r.setIconStatus("zoom",n?"emphasis":"normal");var o=new Jp(RD(r),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(n&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}SI("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var a=e.getModel(t),i=[],n=RD(a),o=ji(r,n);kD(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),kD(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,p={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:Ttt+u+f};p[c]=f,i.push(p)}return i});var LF=Dtt;function ND(r){r.registerComponentModel(lF),r.registerComponentView(uF),rs("saveAsImage",cF),rs("magicType",hF),rs("dataView",dF),rs("dataZoom",LF),rs("restore",SF),Tt(oF)}var Att=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:N.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:N.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:N.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:N.color.tertiary,fontSize:14}},e})(St),IF=Att;function Sy(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function PF(r){if(Lt.domSupported){for(var e=document.documentElement.style,t=0,a=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=n==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=n==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,p=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),h=Math.round(((p-Math.SQRT2*i)/2+Math.SQRT2*i-(p-f)/2)*100)/100;s+=";"+n+":-"+h+"px";var d=e+" solid "+i+"px;",v=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+a+";"];return'
'}function Rtt(r,e,t){var a="cubic-bezier(0.23,1,0.32,1)",i="",n="";return t&&(i=" "+r/2+"s "+a,n="opacity"+i+",visibility"+i),e||(i=" "+r+"s "+a,n+=(n.length?",":"")+(Lt.transformSupported?""+VD+i:",left"+i+",top"+i)),Ltt+":"+n}function NF(r,e,t){var a=r.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Lt.transformSupported)return t?"top:"+i+";left:"+a+";":[["top",i],["left",a]];var n=Lt.transform3dSupported,o="translate"+(n?"3d":"")+"("+a+","+i+(n?",0":"")+")";return t?"top:0;left:0;"+VD+":"+o+";":[["top",0],["left",0],[OD,o]]}function Ntt(r){var e=[],t=r.get("fontSize"),a=r.getTextColor();a&&e.push("color:"+a),e.push("font:"+r.getFont());var i=Q(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+i+"px");var n=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return n&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+n),T(["decoration","align"],function(u){var c=r.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function Ott(r,e,t,a){var i=[],n=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),c=r.get("shadowOffsetY"),f=r.getModel("textStyle"),p=Zv(r,"html"),h=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+h),e&&n>0&&i.push(Rtt(n,t,a)),o&&i.push("background-color:"+o),T(["width","color","radius"],function(d){var v="border-"+d,m=yv(v),g=r.get(m);g!=null&&i.push(v+":"+g+(d==="color"?"":"px"))}),i.push(Ntt(f)),p!=null&&i.push("padding:"+sn(p).join("px ")+"px"),i.join(";")+";"}function OF(r,e,t,a,i){var n=e&&e.painter;if(t){var o=n&&n.getViewportRoot();o&&TM(r,o,t,a,i)}else{r[0]=a,r[1]=i;var s=n&&n.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var ztt=(function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Lt.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=e.getZr(),n=t.appendTo,o=n&&(W(n)?document.querySelector(n):no(n)?n:$(n)&&n(e.getDom()));OF(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(a),this._api=e,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();$r(c,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),a=RF(t,"position"),i=t.style;i.position!=="absolute"&&a!=="absolute"&&(i.position="relative")}var n=e.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,i=a.style,n=this._styleCoord;a.innerHTML?i.cssText=Itt+Ott(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+NF(n[0],n[1],!0)+("border-color:"+Mi(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,a,i,n){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(W(n)&&a.get("trigger")==="item"&&!Sy(a)&&(s=ktt(a,i,n)),W(e))o.innerHTML=e+s;else if(e){o.innerHTML="",z(e)||(e=[e]);for(var l=0;l=0?this._tryShow(n,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,a=this._ecModel,i=this._api,n=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&n!=="none"&&n!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(t,a,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,a,i,n){if(!(n.from===this.uid||Lt.node||!i.getDom())){var o=FF(n,i);this._ticket="";var s=n.dataByCoordSys,l=Wtt(n,a,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:n.position,positionDefault:"bottom"},o)}else if(n.tooltip&&n.x!=null&&n.y!=null){var c=Btt;c.x=n.x,c.y=n.y,c.update(),nt(c).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:c},o)}else if(s)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:s,tooltipOption:n.tooltipOption},o);else if(n.seriesIndex!=null){if(this._manuallyAxisShowTip(t,a,i,n))return;var f=qp(n,a),p=f.point[0],h=f.point[1];p!=null&&h!=null&&this._tryShow({offsetX:p,offsetY:h,target:f.el,position:n.position,positionDefault:"bottom"},o)}else n.x!=null&&n.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},o))}},e.prototype.manuallyHideTip=function(t,a,i,n){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide(FF(n,i))},e.prototype._manuallyAxisShowTip=function(t,a,i,n){var o=n.seriesIndex,s=n.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var c=u.getData(),f=Qp([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:n.position}),!0}}},e.prototype._tryShow=function(t,a){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){var s=nt(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Ii(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(nt(c).dataIndex!=null?l=c:nt(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(t,l,a):u?this._showComponentItemTooltip(t,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},e.prototype._showOrMove=function(t,a){var i=t.get("showDelay");a=Z(a,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(a,i):a()},e.prototype._showAxisTooltip=function(t,a){var i=this._ecModel,n=this._tooltipModel,o=[a.offsetX,a.offsetY],s=Qp([a.tooltipOption],n),l=this._renderMode,u=[],c=re("section",{blocks:[],noHeader:!0}),f=[],p=new Xv;T(t,function(y){T(y.dataByAxis,function(x){var _=i.getComponent(x.axisDim+"Axis",x.axisIndex),b=x.value;if(!(!_||b==null)){var S=j1(b,_.axis,i,x.seriesDataIndices,x.valueLabelOpt),w=re("section",{header:S,noHeader:!Be(S),sortBlocks:!0,blocks:[]});c.blocks.push(w),T(x.seriesDataIndices,function(D){var C=i.getSeriesByIndex(D.seriesIndex),M=D.dataIndexInside,E=C.getDataParams(M);if(!(E.dataIndex<0)){E.axisDim=x.axisDim,E.axisIndex=x.axisIndex,E.axisType=x.axisType,E.axisId=x.axisId,E.axisValue=Vu(_.axis,{value:b}),E.axisValueLabel=S,E.marker=p.makeTooltipMarker("item",Mi(E.color),l);var L=$_(C.formatTooltip(M,!0,null)),A=L.frag;if(A){var P=Qp([C],n).get("valueFormatter");w.blocks.push(P?O({valueFormatter:P},A):A)}L.text&&f.push(L.text),u.push(E)}})}})}),c.blocks.reverse(),f.reverse();var h=a.position,d=s.get("order"),v=ab(c,p,l,d,i.get("useUTC"),s.get("textStyle"));v&&f.unshift(v);var m=l==="richText"?` + +`:"
",g=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],h,null,p)})},e.prototype._showSeriesItemTooltip=function(t,a,i){var n=this._ecModel,o=nt(a),s=o.seriesIndex,l=n.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,p=u.getData(f),h=this._renderMode,d=t.positionDefault,v=Qp([p.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),m=v.get("trigger");if(!(m!=null&&m!=="item")){var g=u.getDataParams(c,f),y=new Xv;g.marker=y.makeTooltipMarker("item",Mi(g.color),h);var x=$_(u.formatTooltip(c,!1,f)),_=v.get("order"),b=v.get("valueFormatter"),S=x.frag,w=S?ab(b?O({valueFormatter:b},S):S,y,h,_,n.get("useUTC"),v.get("textStyle")):x.text,D="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,w,g,D,t.offsetX,t.offsetY,t.position,t.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:p.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,i){var n=this._renderMode==="html",o=nt(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(W(l)){var c=l;l={content:c,formatter:c},u=!0}u&&n&&l.content&&(l=tt(l),l.content=We(l.content));var f=[l],p=this._ecModel.getComponent(o.componentMainType,o.componentIndex);p&&f.push(p),f.push({formatter:l.content});var h=t.positionDefault,d=Qp(f,this._tooltipModel,h?{position:h}:null),v=d.get("content"),m=Math.random()+"",g=new Xv;this._showOrMove(d,function(){var y=tt(d.get("formatterParams")||{});this._showTooltipContent(d,v,y,m,t.offsetX,t.offsetY,t.position,a,g)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,i,n,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var p=t.get("formatter");l=l||t.get("position");var h=a,d=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),v=d.color;if(p)if(W(p)){var m=t.ecModel.get("useUTC"),g=z(i)?i[0]:i,y=g&&g.axisType&&g.axisType.indexOf("time")>=0;h=p,y&&(h=el(g.axisValue,h,m)),h=_v(h,i,!0)}else if($(p)){var x=Z(function(_,b){_===this._ticket&&(f.setContent(b,c,t,v,l),this._updatePosition(t,l,o,s,f,i,u))},this);this._ticket=n,h=p(i,n,x)}else h=p;f.setContent(h,c,t,v,l),f.show(t,v),this._updatePosition(t,l,o,s,f,i,u)}},e.prototype._getNearestPoint=function(t,a,i,n,o){if(i==="axis"||z(a))return{color:n||o};if(!z(a))return{color:n||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,i,n,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();a=a||t.get("position");var f=o.getSize(),p=t.get("align"),h=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),$(a)&&(a=a([i,n],s,o.el,d,{viewSize:[u,c],contentSize:f.slice()})),z(a))i=j(a[0],u),n=j(a[1],c);else if(et(a)){var v=a;v.width=f[0],v.height=f[1];var m=Bt(v,{width:u,height:c});i=m.x,n=m.y,p=null,h=null}else if(W(a)&&l){var g=Gtt(a,d,f,t.get("borderWidth"));i=g[0],n=g[1]}else{var g=Ftt(i,n,o,u,c,p?null:20,h?null:20);i=g[0],n=g[1]}if(p&&(i-=HF(p)?f[0]/2:p==="right"?f[0]:0),h&&(n-=HF(h)?f[1]/2:h==="bottom"?f[1]:0),Sy(t)){var g=Htt(i,n,o,u,c);i=g[0],n=g[1]}o.moveTo(i,n)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var i=this._lastDataByCoordSys,n=this._cbParamsList,o=!!i&&i.length===t.length;return o&&T(i,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&T(u,function(p,h){var d=f[h]||{},v=p.seriesDataIndices||[],m=d.seriesDataIndices||[];o=o&&p.value===d.value&&p.axisType===d.axisType&&p.axisId===d.axisId&&v.length===m.length,o&&T(v,function(g,y){var x=m[y];o=o&&g.seriesIndex===x.seriesIndex&&g.dataIndex===x.dataIndex}),n&&T(p.seriesDataIndices,function(g){var y=g.seriesIndex,x=a[y],_=n[y];x&&_&&_.data!==x.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,a){Lt.node||!a.getDom()||(Wn(this,"_updatePosition"),this._tooltipContent.dispose(),Xp("itemTooltip",a))},e.type="tooltip",e})(Ot);function Qp(r,e,t){var a=e.ecModel,i;t?(i=new Mt(t,a,a),i=new Mt(e.option,i,a)):i=e;for(var n=r.length-1;n>=0;n--){var o=r[n];o&&(o instanceof Mt&&(o=o.get("tooltip",!0)),W(o)&&(o={formatter:o}),o&&(i=new Mt(o,i,a)))}return i}function FF(r,e){return r.dispatchAction||Z(e.dispatchAction,e)}function Ftt(r,e,t,a,i,n,o){var s=t.getSize(),l=s[0],u=s[1];return n!=null&&(r+l+n+2>a?r-=l+n:r+=n),o!=null&&(e+u+o>i?e-=u+o:e+=o),[r,e]}function Htt(r,e,t,a,i){var n=t.getSize(),o=n[0],s=n[1];return r=Math.min(r+o,a)-o,e=Math.min(e+s,i)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function Gtt(r,e,t,a){var i=t[0],n=t[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-n/2;break;case"top":s=e.x+u/2-i/2,l=e.y-n-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-n/2;break;case"right":s=e.x+u+o,l=e.y+c/2-n/2}return[s,l]}function HF(r){return r==="center"||r==="middle"}function Wtt(r,e,t){var a=df(r).queryOptionMap,i=a.keys()[0];if(!(!i||i==="series")){var n=$i(e,i,a.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=n.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=nt(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}var GF=Utt;function BD(r){Tt(Fi),r.registerComponentModel(IF),r.registerComponentView(GF),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ie),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ie)}var Ytt=["rect","polygon","keep","clear"];function UD(r,e){var t=Ft(r?r.brush:[]);if(t.length){var a=[];T(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=r&&r.toolbox;z(i)&&(i=i[0]),i||(i={feature:{}},r.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),Ztt(s),e&&!s.length&&s.push.apply(s,Ytt)}}function Ztt(r){var e={};T(r,function(t){e[t]=1}),r.length=0,T(e,function(t,a){r.push(a)})}var WF=T;function YF(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function th(r,e,t){var a={};return WF(e,function(n){var o=a[n]=i();WF(r[n],function(s,l){if(Le.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new Le(u),l==="opacity"&&(u=tt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Le(u))}})}),a;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function wy(r,e,t){var a;T(t,function(i){e.hasOwnProperty(i)&&YF(e[i])&&(a=!0)}),a&&T(t,function(i){e.hasOwnProperty(i)&&YF(e[i])?r[i]=tt(e[i]):delete r[i]})}function ZF(r,e,t,a,i,n){var o={};T(r,function(f){var p=Le.prepareVisualTypes(e[f]);o[f]=p});var s;function l(f){return qf(t,s,f)}function u(f,p){cb(t,s,f,p)}n==null?t.each(c):t.each([n],c);function c(f,p){s=n==null?f:p;var h=t.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var d=a.call(i,f),v=e[d],m=o[d],g=0,y=m.length;ge[0][1]&&(e[0][1]=n[0]),n[1]e[1][1]&&(e[1][1]=n[1])}return e&&QF(e)}};function QF(r){return new at(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Ktt=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new sc(a.getZr())).on("brush",Z(this._onBrush,this)).mount()},e.prototype.render=function(t,a,i,n){this.model=t,this._updateController(t,a,i,n)},e.prototype.updateTransform=function(t,a,i,n){GD(a),this._updateController(t,a,i,n)},e.prototype.updateVisual=function(t,a,i,n){this.updateTransform(t,a,i,n)},e.prototype.updateView=function(t,a,i,n){this._updateController(t,a,i,n)},e.prototype._updateController=function(t,a,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:tt(i),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:tt(i),$from:a})},e.type="brush",e})(Ot),tH=Ktt;var Jtt=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var i=this.option;!a&&wy(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=V(t,function(a){return eH(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=eH(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:N.color.backgroundTint,borderColor:N.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:N.color.disabled},e})(St);function eH(r,e){return dt({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Mt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var rH=Jtt;var Qtt=["rect","polygon","lineX","lineY","keep","clear"],tet=(function(r){I(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i){var n,o,s;a.eachComponent({mainType:"brush"},function(l){n=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=n,this._brushMode=o,T(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===n)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,i){this.render(t,a,i)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),i={};return T(t.get("type",!0),function(n){a[n]&&(i[n]=a[n])}),i},e.prototype.onclick=function(t,a,i){var n=this._brushType,o=this._brushMode;i==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?n:n===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:Qtt.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e})(ar),aH=tet;function YD(r){r.registerComponentView(tH),r.registerComponentModel(rH),r.registerPreprocessor(UD),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,WD),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ie),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ie),rs("brush",aH)}var eet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:N.size.m,backgroundColor:N.color.transparent,borderColor:N.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:N.color.primary},subtextStyle:{fontSize:12,color:N.color.quaternary}},e})(St),ret=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){if(this.group.removeAll(),!!t.get("show")){var n=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Q(t.get("textBaseline"),t.get("textVerticalAlign")),c=new Dt({style:Gt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),p=t.get("subtext"),h=new Dt({style:Gt(s,{text:p,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),v=t.get("sublink"),m=t.get("triggerEvent",!0);c.silent=!d&&!m,h.silent=!v&&!m,d&&c.on("click",function(){al(d,"_"+t.get("target"))}),v&&h.on("click",function(){al(v,"_"+t.get("subtarget"))}),nt(c).eventData=nt(h).eventData=m?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(c),p&&n.add(h);var g=n.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var x=Zt(t,i),_=Bt(y,x.refContainer,t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),n.x=_.x,n.y=_.y,n.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),h.setStyle(b),g=n.getBoundingRect();var S=_.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var D=new ht({shape:{x:g.x-S[3],y:g.y-S[0],width:g.width+S[1]+S[3],height:g.height+S[0]+S[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});n.add(D)}},e.type="title",e})(Ot);function ZD(r){r.registerComponentModel(eet),r.registerComponentView(ret)}var aet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var a=this._data.count();this.option.loop?t=(t%a+a)%a:(t>=a&&(t=a-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,a=t.data||[],i=t.axisType,n=this._names=[],o;i==="category"?(o=[],T(a,function(u,c){var f=ve(bi(u),""),p;et(u)?(p=tt(u),p.value=c):p=c,o.push(p),n.push(f)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new we([{name:"value",type:s}],this);l.initData(o,n)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:N.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:N.color.secondary},data:[]},e})(St),XD=aet;var iH=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Ar(XD.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:N.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:N.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:N.color.tertiary},itemStyle:{color:N.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:N.color.accent50,borderColor:N.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:N.color.accent50,borderColor:N.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:N.color.accent60},itemStyle:{color:N.color.accent60,borderColor:N.color.accent60},controlStyle:{color:N.color.accent70,borderColor:N.color.accent70}},progress:{lineStyle:{color:N.color.accent30},itemStyle:{color:N.color.accent40}},data:[]}),e})(XD);Jt(iH,cl.prototype);var nH=iH;var iet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e})(Ot),oH=iet;var net=(function(r){I(e,r);function e(t,a,i,n){var o=r.call(this,t,a,i)||this;return o.type=n||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e})(ur),sH=net;var qD=Math.PI,lH=ot(),oet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.api=a},e.prototype.render=function(t,a,i){if(this.model=t,this.api=i,this.ecModel=a,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(n,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return re("nameValue",{noName:!0,value:c})},T(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](n,o,l,t)},this),this._renderAxisLabel(n,s,l,t),this._position(n,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,a){var i=t.get(["label","position"]),n=t.get("orient"),o=uet(t,a),s;i==null||i==="auto"?s=n==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:qD/2},f=n==="vertical"?o.height:o.width,p=t.getModel("controlStyle"),h=p.get("show",!0),d=h?p.get("itemSize"):0,v=h?p.get("itemGap"):0,m=d+v,g=t.get(["label","rotate"])||0;g=g*qD/180;var y,x,_,b=p.get("position",!0),S=h&&p.get("showPlayBtn",!0),w=h&&p.get("showPrevBtn",!0),D=h&&p.get("showNextBtn",!0),C=0,M=f;b==="left"||b==="bottom"?(S&&(y=[0,0],C+=m),w&&(x=[C,0],C+=m),D&&(_=[M-d,0],M-=m)):(S&&(y=[M-d,0],M-=m),w&&(x=[0,0],C+=m),D&&(_=[M-d,0],M-=m));var E=[C,M];return t.get("inverse")&&E.reverse(),{viewRect:o,mainLength:f,orient:n,rotation:c[n],labelRotation:g,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[n],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[n],playPosition:y,prevBtnPosition:x,nextBtnPosition:_,axisExtent:E,controlSize:d,controlGap:v}},e.prototype._position=function(t,a){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=fe(),l=o.x,u=o.y+o.height;pr(s,s,[-l,-u]),Sr(s,s,-qD/2),pr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=y(o),f=y(i.getBoundingRect()),p=y(n.getBoundingRect()),h=[i.x,i.y],d=[n.x,n.y];d[0]=h[0]=c[0][0];var v=t.labelPosOpt;if(v==null||W(v)){var m=v==="+"?0:1;x(h,f,c,1,m),x(d,p,c,1,1-m)}else{var m=v>=0?0:1;x(h,f,c,1,m),d[1]=h[1]+v}i.setPosition(h),n.setPosition(d),i.rotation=n.rotation=t.rotation,g(i),g(n);function g(_){_.originX=c[0][0]-_.x,_.originY=c[1][0]-_.y}function y(_){return[[_.x,_.x+_.width],[_.y,_.y+_.height]]}function x(_,b,S,w,D){_[w]+=S[w][D]-b[w][D]}},e.prototype._createAxis=function(t,a){var i=a.getData(),n=a.get("axisType"),o=set(a,n);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new sH("value",o,t.axisExtent,n);return l.model=a,l},e.prototype._createGroup=function(t){var a=this[t]=new K;return this.group.add(a),a},e.prototype._renderAxisLine=function(t,a,i,n){var o=i.getExtent();if(n.get(["lineStyle","show"])){var s=new le({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:O({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new le({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:J({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},e.prototype._renderAxisTick=function(t,a,i,n){var o=this,s=n.getData(),l=i.scale.getTicks();this._tickSymbols=[],T(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),p=f.getModel("itemStyle"),h=f.getModel(["emphasis","itemStyle"]),d=f.getModel(["progress","itemStyle"]),v={x:c,y:0,onclick:Z(o._changeTimeline,o,u.value)},m=uH(f,p,a,v);m.ensureState("emphasis").style=h.getItemStyle(),m.ensureState("progress").style=d.getItemStyle(),an(m);var g=nt(m);f.get("tooltip")?(g.dataIndex=u.value,g.dataModel=n):g.dataIndex=g.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(t,a,i,n){var o=this,s=i.getLabelModel();if(s.get("show")){var l=n.getData(),u=i.getViewLabels();this._tickLabels=[],T(u,function(c){var f=c.tickValue,p=l.getItemModel(f),h=p.getModel("label"),d=p.getModel(["emphasis","label"]),v=p.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),g=new Dt({x:m,y:0,rotation:t.labelRotation-t.rotation,onclick:Z(o._changeTimeline,o,f),silent:!1,style:Gt(h,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});g.ensureState("emphasis").style=Gt(d),g.ensureState("progress").style=Gt(v),a.add(g),an(g),lH(g).dataIndex=f,o._tickLabels.push(g)})}},e.prototype._renderControl=function(t,a,i,n){var o=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),c=n.getPlayState(),f=n.get("inverse",!0);p(t.nextBtnPosition,"next",Z(this._changeTimeline,this,f?"-":"+")),p(t.prevBtnPosition,"prev",Z(this._changeTimeline,this,f?"+":"-")),p(t.playPosition,c?"stop":"play",Z(this._handlePlayClick,this,!c),!0);function p(h,d,v,m){if(h){var g=hr(Q(n.get(["controlStyle",d+"BtnSize"]),o),o),y=[0,-g/2,g,g],x=cet(n,d+"Icon",y,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:v});x.ensureState("emphasis").style=u,a.add(x),an(x)}}},e.prototype._renderCurrentPointer=function(t,a,i,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=Z(u._handlePointerDrag,u),f.ondragend=Z(u._handlePointerDragend,u),cH(f,u._progressLine,s,i,n,!0)},onUpdate:function(f){cH(f,u._progressLine,s,i,n)}};this._currentPointer=uH(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,a,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,a){var i=this._toAxisCoord(t)[0],n=this._axis,o=Xe(n.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(s[o]=+s[o].toFixed(d)),[s,h]}var Ey={min:ut(My,"min"),max:ut(My,"max"),average:ut(My,"average"),median:ut(My,"median")};function is(r,e){if(e){var t=r.getData(),a=r.coordinateSystem,i=a&&a.dimensions;if(!het(e)&&!z(e.coord)&&z(i)){var n=JD(e,t,a,r);if(e=tt(e),e.type&&Ey[e.type]&&n.baseAxis&&n.valueAxis){var o=lt(i,n.baseAxis.dim),s=lt(i,n.valueAxis.dim),l=Ey[e.type](t,n.valueAxis.dim,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!z(i)){e.coord=[];var u=r.getBaseAxis();if(u&&e.type&&Ey[e.type]){var c=a.getOtherAxis(u);c&&(e.value=rh(t,t.mapDimension(c.dim),e.type))}}else for(var f=e.coord,p=0;p<2;p++)Ey[f[p]]&&(f[p]=rh(t,t.mapDimension(i[p]),f[p]));return e}}function JD(r,e,t,a){var i={};return r.valueIndex!=null||r.valueDim!=null?(i.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,i.valueAxis=t.getAxis(det(a,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function det(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function ns(r,e){return r&&r.containData&&e.coord&&!KD(e)?r.containData(e.coord):!0}function mH(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!KD(e)&&!KD(t)?r.containZone(e.coord,t.coord):!0}function Ay(r,e){return r?function(t,a,i,n){var o=n<2?t.coord&&t.coord[n]:t.value;return Ja(o,e[n])}:function(t,a,i,n){return Ja(t.value,e[n])}}function rh(r,e,t){if(t==="average"){var a=0,i=0;return r.each(e,function(n,o){isNaN(n)||(a+=n,i++)}),a/i}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var tC=ot(),vet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=q()},e.prototype.render=function(t,a,i){var n=this,o=this.markerGroupMap;o.each(function(s){tC(s).keep=!1}),a.eachSeries(function(s){var l=Ir.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,a,i)}),o.each(function(s){!tC(s).keep&&n.group.remove(s.group)}),met(a,o,this.type)},e.prototype.markKeep=function(t){tC(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var i=this;T(t,function(n){var o=Ir.getMarkerModelFromSeries(n,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?Od(l):Tf(l))})}})},e.type="marker",e})(Ot);function met(r,e,t){r.eachSeries(function(a){var i=Ir.getMarkerModelFromSeries(a,t),n=e.get(a.id);if(i&&n&&n.group){var o=ja(i),s=o.z,l=o.zlevel;Js(n.group,s,l)}})}var Sc=vet;function gH(r,e,t){var a=e.coordinateSystem,i=t.getWidth(),n=t.getHeight(),o=a&&a.getArea&&a.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,f=u?o?o.height:0:n,p=u&&o?o.x:0,h=u&&o?o.y:0,d,v=j(l.get("x"),c)+p,m=j(l.get("y"),f)+h;if(!isNaN(v)&&!isNaN(m))d=[v,m];else if(e.getMarkerPosition)d=e.getMarkerPosition(r.getValues(r.dimensions,s));else if(a){var g=r.get(a.dimensions[0],s),y=r.get(a.dimensions[1],s);d=a.dataToPoint([g,y])}isNaN(v)||(d[0]=v),isNaN(m)||(d[1]=m),r.setItemLayout(s,d)})}var get=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,i){a.eachSeries(function(n){var o=Ir.getMarkerModelFromSeries(n,"markPoint");o&&(gH(o.getData(),n,i),this.markerGroupMap.get(n.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new mn),f=yet(o,t,a);a.setData(f),gH(a.getData(),t,n),f.each(function(p){var h=f.getItemModel(p),d=h.getShallow("symbol"),v=h.getShallow("symbolSize"),m=h.getShallow("symbolRotate"),g=h.getShallow("symbolOffset"),y=h.getShallow("symbolKeepAspect");if($(d)||$(v)||$(m)||$(g)){var x=a.getRawValue(p),_=a.getDataParams(p);$(d)&&(d=d(x,_)),$(v)&&(v=v(x,_)),$(m)&&(m=m(x,_)),$(g)&&(g=g(x,_))}var b=h.getModel("itemStyle").getItemStyle(),S=h.get("z2"),w=cn(l,"color");b.fill||(b.fill=w),f.setItemVisual(p,{z2:Q(S,0),symbol:d,symbolSize:v,symbolRotate:m,symbolOffset:g,symbolKeepAspect:y,style:b})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(p){p.traverse(function(h){nt(h).dataModel=a})}),this.markKeep(c),c.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e})(Sc);function yet(r,e,t){var a;r?a=V(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return O(O({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new we(a,t),n=V(t.get("data"),ut(is,e));r&&(n=At(n,ut(ns,r)));var o=Ay(!!r,a);return i.initData(n,null,o),i}var yH=get;function eC(r){r.registerComponentModel(vH),r.registerComponentView(yH),r.registerPreprocessor(function(e){zl(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var xet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,i){return new e(t,a,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e})(Ir),xH=xet;var Ly=ot(),_et=function(r,e,t,a){var i=r.getData(),n;if(z(a))n=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=de(a.yAxis,a.xAxis);else{var u=JD(a,i,e,r);s=u.valueAxis;var c=ym(i,u.valueDataDim);l=rh(i,c,o)}var f=s.dim==="x"?0:1,p=1-f,h=tt(a),d={coord:[]};h.type=null,h.coord=[],h.coord[p]=-1/0,d.coord[p]=1/0;var v=t.get("precision");v>=0&&yt(l)&&(l=+l.toFixed(Math.min(v,20))),h.coord[f]=d.coord[f]=l,n=[h,d,{type:o,valueIndex:a.valueIndex,value:l}]}else n=[]}var m=[is(r,n[0]),is(r,n[1]),O({},n[2])];return m[2].type=m[2].type||null,dt(m[2],m[0]),dt(m[2],m[1]),m};function Iy(r){return!isNaN(r)&&!isFinite(r)}function _H(r,e,t,a){var i=1-r,n=a.dimensions[r];return Iy(e[i])&&Iy(t[i])&&e[r]===t[r]&&a.getAxis(n).containData(e[r])}function bet(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(_H(1,t,a,r)||_H(0,t,a,r)))return!0}return ns(r,e[0])&&ns(r,e[1])}function rC(r,e,t,a,i){var n=a.coordinateSystem,o=r.getItemModel(e),s,l=j(o.get("x"),i.getWidth()),u=j(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=n.dimensions,f=r.get(c[0],e),p=r.get(c[1],e);s=n.dataToPoint([f,p])}if(Ma(n,"cartesian2d")){var h=n.getAxis("x"),d=n.getAxis("y"),c=n.dimensions;Iy(r.get(c[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):Iy(r.get(c[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var wet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,i){a.eachSeries(function(n){var o=Ir.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=Ly(o).from,u=Ly(o).to;l.each(function(c){rC(l,c,!0,n,i),rC(u,c,!1,n,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(n.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new rc);this.group.add(c.group);var f=Tet(o,t,a),p=f.from,h=f.to,d=f.line;Ly(a).from=p,Ly(a).to=h,a.setData(d);var v=a.get("symbol"),m=a.get("symbolSize"),g=a.get("symbolRotate"),y=a.get("symbolOffset");z(v)||(v=[v,v]),z(m)||(m=[m,m]),z(g)||(g=[g,g]),z(y)||(y=[y,y]),f.from.each(function(_){x(p,_,!0),x(h,_,!1)}),d.each(function(_){var b=d.getItemModel(_),S=b.getModel("lineStyle").getLineStyle();d.setItemLayout(_,[p.getItemLayout(_),h.getItemLayout(_)]);var w=b.get("z2");S.stroke==null&&(S.stroke=p.getItemVisual(_,"style").fill),d.setItemVisual(_,{z2:Q(w,0),fromSymbolKeepAspect:p.getItemVisual(_,"symbolKeepAspect"),fromSymbolOffset:p.getItemVisual(_,"symbolOffset"),fromSymbolRotate:p.getItemVisual(_,"symbolRotate"),fromSymbolSize:p.getItemVisual(_,"symbolSize"),fromSymbol:p.getItemVisual(_,"symbol"),toSymbolKeepAspect:h.getItemVisual(_,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(_,"symbolOffset"),toSymbolRotate:h.getItemVisual(_,"symbolRotate"),toSymbolSize:h.getItemVisual(_,"symbolSize"),toSymbol:h.getItemVisual(_,"symbol"),style:S})}),c.updateData(d),f.line.eachItemGraphicEl(function(_){nt(_).dataModel=a,_.traverse(function(b){nt(b).dataModel=a})});function x(_,b,S){var w=_.getItemModel(b);rC(_,b,S,t,n);var D=w.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=cn(l,"color")),_.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Q(w.get("symbolOffset",!0),y[S?0:1]),symbolRotate:Q(w.get("symbolRotate",!0),g[S?0:1]),symbolSize:Q(w.get("symbolSize"),m[S?0:1]),symbol:Q(w.get("symbol",!0),v[S?0:1]),style:D})}this.markKeep(c),c.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e})(Sc);function Tet(r,e,t){var a;r?a=V(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return O(O({},c),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new we(a,t),n=new we(a,t),o=new we([],t),s=V(t.get("data"),ut(_et,e,r,t));r&&(s=At(s,ut(bet,r)));var l=Ay(!!r,a);return i.initData(V(s,function(u){return u[0]}),null,l),n.initData(V(s,function(u){return u[1]}),null,l),o.initData(V(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}var bH=wet;function aC(r){r.registerComponentModel(xH),r.registerComponentView(bH),r.registerPreprocessor(function(e){zl(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Det=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,i){return new e(t,a,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e})(Ir),SH=Det;var Py=ot(),Cet=function(r,e,t,a){var i=a[0],n=a[1];if(!(!i||!n)){var o=is(r,i),s=is(r,n),l=o.coord,u=s.coord;l[0]=de(l[0],-1/0),l[1]=de(l[1],-1/0),u[0]=de(u[0],1/0),u[1]=de(u[1],1/0);var c=Yl([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function ky(r){return!isNaN(r)&&!isFinite(r)}function wH(r,e,t,a){var i=1-r;return ky(e[i])&&ky(t[i])}function Met(r,e){var t=e.coord[0],a=e.coord[1],i={coord:t,x:e.x0,y:e.y0},n={coord:a,x:e.x1,y:e.y1};return Ma(r,"cartesian2d")?t&&a&&(wH(1,t,a,r)||wH(0,t,a,r))?!0:mH(r,i,n):ns(r,i)||ns(r,n)}function TH(r,e,t,a,i){var n=a.coordinateSystem,o=r.getItemModel(e),s,l=j(o.get(t[0]),i.getWidth()),u=j(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),p=n.clampData(c),h=n.clampData(f),d=[];t[0]==="x0"?d[0]=p[0]>h[0]?f[0]:c[0]:d[0]=p[0]>h[0]?c[0]:f[0],t[1]==="y0"?d[1]=p[1]>h[1]?f[1]:c[1]:d[1]=p[1]>h[1]?c[1]:f[1],s=a.getMarkerPosition(d,t,!0)}else{var v=r.get(t[0],e),m=r.get(t[1],e),g=[v,m];n.clampData&&n.clampData(g,g),s=n.dataToPoint(g,!0)}if(Ma(n,"cartesian2d")){var y=n.getAxis("x"),x=n.getAxis("y"),v=r.get(t[0],e),m=r.get(t[1],e);ky(v)?s[0]=y.toGlobalCoord(y.getExtent()[t[0]==="x0"?0:1]):ky(m)&&(s[1]=x.toGlobalCoord(x.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var DH=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Eet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,i){a.eachSeries(function(n){var o=Ir.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=V(DH,function(f){return TH(s,l,f,n,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new K});this.group.add(c.group),this.markKeep(c);var f=Aet(o,t,a);a.setData(f),f.each(function(p){var h=V(DH,function(M){return TH(f,p,M,t,n)}),d=o.getAxis("x").scale,v=o.getAxis("y").scale,m=d.getExtent(),g=v.getExtent(),y=[d.parse(f.get("x0",p)),d.parse(f.get("x1",p))],x=[v.parse(f.get("y0",p)),v.parse(f.get("y1",p))];Xe(y),Xe(x);var _=!(m[0]>y[1]||m[1]x[1]||g[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:N.size.m,align:"auto",backgroundColor:N.color.transparent,borderColor:N.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:N.color.disabled,inactiveBorderColor:N.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:N.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:N.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:N.color.tertiary,borderWidth:1,borderColor:N.color.border},emphasis:{selectorLabel:{show:!0,color:N.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e})(St),ah=Iet;var wc=ut,nC=T,Ry=K,Pet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Ry),this.group.add(this._selectorGroup=new Ry),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,a,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,a,i,l,s,u);var c=Zt(t,i).refContainer,f=t.getBoxLayoutParams(),p=t.get("padding"),h=Bt(f,c,p),d=this.layoutInner(t,o,h,n,l,u),v=Bt(J({width:d.width,height:d.height},f),c,p);this.group.x=v.x-d.x,this.group.y=v.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=xy(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,a,i,n,o,s,l){var u=this.getContentGroup(),c=q(),f=a.get("selectedMode"),p=a.get("triggerEvent"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),nC(a.getData(),function(d,v){var m=this,g=d.get("name");if(!this.newlineDisabled&&(g===""||g===` +`)){var y=new Ry;y.newline=!0,u.add(y);return}var x=i.getSeriesByName(g)[0];if(!c.get(g))if(x){var _=x.getData(),b=_.getVisual("legendLineStyle")||{},S=_.getVisual("legendIcon"),w=_.getVisual("style"),D=this._createItem(x,g,v,d,a,t,b,w,S,f,n);D.on("click",wc(MH,g,null,n,h)).on("mouseover",wc(oC,x.name,null,n,h)).on("mouseout",wc(sC,x.name,null,n,h)),i.ssr&&D.eachChild(function(C){var M=nt(C);M.seriesIndex=x.seriesIndex,M.dataIndex=v,M.ssrType="legend"}),p&&D.eachChild(function(C){m.packEventData(C,a,x,v,g)}),c.set(g,!0)}else i.eachRawSeries(function(C){var M=this;if(!c.get(g)&&C.legendVisualProvider){var E=C.legendVisualProvider;if(!E.containName(g))return;var L=E.indexOfName(g),A=E.getItemVisual(L,"style"),P=E.getItemVisual(L,"legendIcon"),R=Ze(A.fill);R&&R[3]===0&&(R[3]=.2,A=O(O({},A),{fill:Jr(R,"rgba")}));var k=this._createItem(C,g,v,d,a,t,{},A,P,f,n);k.on("click",wc(MH,null,g,n,h)).on("mouseover",wc(oC,null,g,n,h)).on("mouseout",wc(sC,null,g,n,h)),i.ssr&&k.eachChild(function(B){var U=nt(B);U.seriesIndex=C.seriesIndex,U.dataIndex=v,U.ssrType="legend"}),p&&k.eachChild(function(B){M.packEventData(B,a,C,v,g)}),c.set(g,!0)}},this)},this),o&&this._createSelector(o,a,n,s,l)},e.prototype.packEventData=function(t,a,i,n,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:n,value:o,seriesIndex:i.seriesIndex};nt(t).eventData=s},e.prototype._createSelector=function(t,a,i,n,o){var s=this.getSelectorGroup();nC(t,function(u){var c=u.type,f=new Dt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(f);var p=a.getModel("selectorLabel"),h=a.getModel(["emphasis","selectorLabel"]);$t(f,{normal:p,emphasis:h},{defaultText:u.title}),an(f)})},e.prototype._createItem=function(t,a,i,n,o,s,l,u,c,f,p){var h=t.visualDrawType,d=o.get("itemWidth"),v=o.get("itemHeight"),m=o.isSelected(a),g=n.get("symbolRotate"),y=n.get("symbolKeepAspect"),x=n.get("icon");c=x||c||"roundRect";var _=ket(c,n,l,u,h,m,p),b=new Ry,S=n.getModel("textStyle");if($(t.getLegendIcon)&&(!x||x==="inherit"))b.add(t.getLegendIcon({itemWidth:d,itemHeight:v,icon:c,iconRotate:g,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}));else{var w=x==="inherit"&&t.getData().getVisual("symbol")?g==="inherit"?t.getData().getVisual("symbolRotate"):g:0;b.add(Ret({itemWidth:d,itemHeight:v,icon:c,iconRotate:w,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}))}var D=s==="left"?d+5:-5,C=s,M=o.get("formatter"),E=a;W(M)&&M?E=M.replace("{name}",a!=null?a:""):$(M)&&(E=M(a));var L=m?S.getTextColor():n.get("inactiveColor");b.add(new Dt({style:Gt(S,{text:E,x:D,y:v/2,fill:L,align:C,verticalAlign:"middle"},{inheritColor:L})}));var A=new ht({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=n.getModel("tooltip");return P.get("show")&&Er({el:A,componentModel:o,itemName:a,itemTooltipOption:P.option}),b.add(A),b.eachChild(function(R){R.silent=!0}),A.silent=!f,this.getContentGroup().add(b),an(b),b.__legendDataIndex=i,b},e.prototype.layoutInner=function(t,a,i,n,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ai(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Ai("horizontal",u,t.get("selectorItemGap",!0));var p=u.getBoundingRect(),h=[-p.x,-p.y],d=t.get("selectorButtonGap",!0),v=t.getOrient().index,m=v===0?"width":"height",g=v===0?"height":"width",y=v===0?"y":"x";s==="end"?h[v]+=c[m]+d:f[v]+=p[m]+d,h[1-v]+=c[g]/2-p[g]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var x={x:0,y:0};return x[m]=c[m]+d+p[m],x[g]=Math.max(c[g],p[g]),x[y]=Math.min(0,p[y]+h[1-v]),x}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e})(Ot);function ket(r,e,t,a,i,n,o){function s(m,g){m.lineWidth==="auto"&&(m.lineWidth=g.lineWidth>0?2:0),nC(m,function(y,x){m[x]==="inherit"&&(m[x]=g[x])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?a.decal:ki(f,o),u.fill==="inherit"&&(u.fill=a[i]),u.stroke==="inherit"&&(u.stroke=a[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?a:t).opacity),s(u,a);var p=e.getModel("lineStyle"),h=p.getLineStyle();if(s(h,t),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),h.stroke==="auto"&&(h.stroke=a.fill),!n){var d=e.get("inactiveBorderWidth"),v=u[c];u.lineWidth=d==="auto"?a.lineWidth>0&&v?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),h.stroke=p.get("inactiveColor"),h.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function Ret(r){var e=r.icon||"roundRect",t=jt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=N.color.neutral00,t.style.lineWidth=2),t}function MH(r,e,t,a){sC(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r!=null?r:e}),oC(r,e,t,a)}function EH(r){for(var e=r.getZr().storage.getDisplayList(),t,a=0,i=e.length;ai[o],m=[-h.x,-h.y];a||(m[n]=c[u]);var g=[0,0],y=[-d.x,-d.y],x=Q(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(v){var _=t.get("pageButtonPosition",!0);_==="end"?y[n]+=i[o]-d[o]:g[n]+=d[o]+x}y[1-n]+=h[s]/2-d[s]/2,c.setPosition(m),f.setPosition(g),p.setPosition(y);var b={x:0,y:0};if(b[o]=v?i[o]:h[o],b[s]=Math.max(h[s],d[s]),b[l]=Math.min(0,d[l]+y[1-n]),f.__rectSize=i[o],v){var S={x:0,y:0};S[o]=Math.max(i[o]-d[o]-x,0),S[s]=b[s],f.setClipPath(new ht({shape:S})),f.__rectSize=S[o]}else p.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&wt(c,{x:w.contentPosition[0],y:w.contentPosition[1]},v?t:null),this._updatePageInfoView(t,w),b},e.prototype._pageGo=function(t,a,i){var n=this._getPageInfo(a)[t];n!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:a.id})},e.prototype._updatePageInfoView=function(t,a){var i=this._controllerGroup;T(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",p=a[f]!=null,h=i.childOfName(c);h&&(h.setStyle("fill",p?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=p?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;n&&o&&n.setStyle("text",W(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,s=uC[o],l=cC[o],u=this._findTargetItemIndex(a),c=i.children(),f=c[u],p=c.length,h=p?1:0,d={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var v=_(f);d.contentPosition[o]=-v.s;for(var m=u+1,g=v,y=v,x=null;m<=p;++m)x=_(c[m]),(!x&&y.e>g.s+n||x&&!b(x,g.s))&&(y.i>g.i?g=y:g=x,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),y=x;for(var m=u-1,g=v,y=v,x=null;m>=-1;--m)x=_(c[m]),(!x||!b(y,x.s))&&g.i=w&&S.s<=w+n}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var a,i=this.getContentGroup(),n;return i.eachChild(function(o,s){var l=o.__legendDataIndex;n==null&&l!=null&&(n=s),l===t&&(a=s)}),a!=null?a:n},e.type="legend.scroll",e})(Ny),RH=Oet;function fC(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(a)})})}function NH(r){Tt(Oy),r.registerComponentModel(PH),r.registerComponentView(RH),fC(r)}function pC(r){Tt(Oy),Tt(NH)}var zet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Ar(es.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(es),OH=zet;var hC=ot();function zH(r,e,t){hC(r).coordSysRecordMap.each(function(a){var i=a.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function VH(r,e){for(var t=hC(r).coordSysRecordMap,a=t.keys(),i=0;in[i+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function UH(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=hC(t),i=a.coordSysRecordMap||(a.coordSysRecordMap=q());i.each(function(n){n.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=gy(n);T(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,Vet(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=q());c.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),i.each(function(n){var o=n.controller,s,l=n.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){BH(i,n);return}var c=Fet(l,n,t);o.enable(c.controlType,c.opt),Qa(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Get=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,a,i){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),zH(i,t,{pan:Z(dC.pan,this),zoom:Z(dC.zoom,this),scrollMove:Z(dC.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){VH(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(xc),dC={zoom:function(r,e,t,a){var i=this.range,n=i.slice(),o=r.axisModels[0];if(o){var s=vC[e](null,[a.originX,a.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/a.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Yr(0,n,[0,100],0,c.minSpan,c.maxSpan),this.range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:FH(function(r,e,t,a,i,n){var o=vC[a]([n.oldX,n.oldY],[n.newX,n.newY],e,i,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:FH(function(r,e,t,a,i,n){var o=vC[a]([0,0],[n.scrollDelta,n.scrollDelta],e,i,t);return o.signal*(r[1]-r[0])*n.scrollDelta})};function FH(r){return function(e,t,a,i){var n=this.range,o=n.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,a,i);if(Yr(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var vC={grid:function(r,e,t,a,i){var n=t.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],n.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(r,e,t,a,i){var n=t.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(r,e,t,a,i){var n=t.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}},HH=Get;function nh(r){Nl(r),r.registerComponentModel(OH),r.registerComponentView(HH),UH(r)}var Wet=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Ar(es.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:N.color.accent10,borderRadius:0,backgroundColor:N.color.transparent,dataBackground:{lineStyle:{color:N.color.accent30,width:.5},areaStyle:{color:N.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:N.color.accent40,width:.5},areaStyle:{color:N.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:N.color.neutral00,borderColor:N.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:N.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:N.color.tertiary},brushSelect:!0,brushStyle:{color:N.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:N.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e})(es),GH=Wet;var oh=ht,Yet=1,mC=30,Zet=7,sh="horizontal",WH="vertical",Xet=5,qet=["line","bar","candlestick","scatter"],jet={easing:"cubicOut",duration:100,delay:0},$et=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,a){this.api=a,this._onBrush=Z(this._onBrush,this),this._onBrushEnd=Z(this._onBrushEnd,this)},e.prototype.render=function(t,a,i,n){if(r.prototype.render.apply(this,arguments),Qa(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!n||n.type!=="dataZoom"||n.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Wn(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new K;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,i=t.get("brushSelect"),n=i?Zet:0,o=Zt(t,a).refContainer,s=this._findCoordRect(),l=t.get("defaultLocationEdgeGap",!0)||0,u=this._orient===sh?{right:o.width-s.x-s.width,top:o.height-mC-l-n,width:s.width,height:mC}:{right:l,top:s.y,width:mC,height:s.height},c=la(t.option);T(["right","top","width","height"],function(p){c[p]==="ph"&&(c[p]=u[p])});var f=Bt(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===WH&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,a=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===sh&&!o?{scaleY:l?1:-1,scaleX:1}:i===sh&&o?{scaleY:l?1:-1,scaleX:-1}:i===WH&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,i=this._displayables.sliderGroup,n=t.get("brushSelect");i.add(new oh({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new oh({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:Z(this._onClickPanel,this)}),s=this.api.getZr();n?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,i=this._shadowSize||[],n=t.series,o=n.getRawData(),s=n.getShadowDim&&n.getShadowDim(),l=s&&o.getDimensionInfo(s)?n.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==i[0]||a[1]!==i[1]){var f=o.getDataExtent(t.thisDim),p=o.getDataExtent(l),h=(p[1]-p[0])*.3;p=[p[0]-h,p[1]+h];var d=[0,a[1]],v=[0,a[0]],m=[[a[0],0],[0,0]],g=[],y=v[1]/Math.max(1,o.count()-1),x=a[0]/(f[1]-f[0]),_=t.thisAxis.type==="time",b=-y,S=Math.round(o.count()/a[0]),w;o.each([t.thisDim,l],function(L,A,P){if(S>0&&P%S){_||(b+=y);return}b=_?(+L-f[0])*x:b+y;var R=A==null||isNaN(A)||A==="",k=R?0:zt(A,p,d,!0);R&&!w&&P?(m.push([m[m.length-1][0],0]),g.push([g[g.length-1][0],0])):!R&&w&&(m.push([b,0]),g.push([b,0])),R||(m.push([b,k]),g.push([b,k])),w=R}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var D=this.dataZoomModel;function C(L){var A=D.getModel(L?"selectedDataBackground":"dataBackground"),P=new K,R=new ye({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),k=new he({shape:{points:c},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(R),P.add(k),P}for(var M=0;M<3;M++){var E=C(M===1);this._displayables.sliderGroup.add(E),this._displayables.dataShadowSegs.push(E)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();T(l,function(u){if(!i&&!(a!==!0&<(qet,u.get("type"))<0)){var c=n.getComponent(li(o),s).axis,f=Ket(o),p,h=u.coordinateSystem;f!=null&&h.getOtherAxis&&(p=h.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var d=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:d,otherDim:f,otherAxisInverse:p}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,a=this._displayables,i=a.handles=[null,null],n=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),p=a.filler=new oh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(p),o.add(new oh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Yet,fill:N.color.transparent}})),T([0,1],function(x){var _=l.get("handleIcon");!jf[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_);var b=jt(_,-1,0,2,2,null,!0);b.attr({cursor:Jet(this._orient),draggable:!0,drift:Z(this._onDragMove,this,x),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1),z2:5});var S=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=j(w,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),an(b);var D=l.get("handleColor");D!=null&&(b.style.fill=D),o.add(i[x]=b);var C=l.getModel("textStyle"),M=l.get("handleLabel")||{},E=M.show||!1;t.add(n[x]=new Dt({silent:!0,invisible:!E,style:Gt(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var h=p;if(f){var d=j(l.get("moveHandleSize"),s[1]),v=a.moveHandle=new ht({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),m=d*.8,g=a.moveHandleIcon=jt(l.get("moveHandleIcon"),-m/2,-m/2,m,m,N.color.neutral00,!0);g.silent=!0,g.y=s[1]+d/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(d,10));h=a.moveZone=new ht({invisible:!0,shape:{y:s[1]-y,height:d+y}}),h.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),o.add(v),o.add(g),o.add(h)}h.attr({draggable:!0,cursor:"default",drift:Z(this._onDragMove,this,"all"),ondragstart:Z(this._showDataInfo,this,!0),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[zt(t[0],[0,100],a,!0),zt(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Yr(a,n,o,i.get("zoomLock")?"all":t,s.minSpan!=null?zt(s.minSpan,l,o,!0):null,s.maxSpan!=null?zt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Xe([zt(n[0],o,l,!0),zt(n[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var a=this._displayables,i=this._handleEnds,n=Xe(i.slice()),o=this._size;T([0,1],function(h){var d=a.handles[h],v=this._handleHeight;d.attr({scaleX:v/2,scaleY:v/2,x:i[h]+(h?-1:1),y:o[1]/2-v/2})},this),a.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]});var s={x:n[0],width:n[1]-n[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,n[0],n[1],o[0]],c=0;ca[0]||i[1]<0||i[1]>a[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,i=t.offsetY;this._brushStart=new pt(a,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var i=a.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Yr(0,l,o,0,u.minSpan!=null?zt(u.minSpan,s,o,!0):null,u.maxSpan!=null?zt(u.maxSpan,s,o,!0):null),this._range=Xe([zt(l[0],o,s,!0),zt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Kr(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var i=this._displayables,n=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new oh({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,a),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?jet:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=gy(this.dataZoomModel).infoList;if(!t&&a.length){var i=a[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var n=this.api.getWidth(),o=this.api.getHeight();t={x:n*.2,y:o*.2,width:n*.6,height:o*.6}}return t},e.type="dataZoom.slider",e})(xc);function Ket(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function Jet(r){return r==="vertical"?"ns-resize":"ew-resize"}var YH=$et;function lh(r){r.registerComponentModel(GH),r.registerComponentView(YH),Nl(r)}function gC(r){Tt(nh),Tt(lh)}var Qet={get:function(r,e,t){var a=tt((trt[r]||{})[e]);return t&&z(a)?a[a.length-1]:a}},trt={color:{active:["#006edd","#e0ffff"],inactive:[N.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},zy=Qet;var ZH=Le.mapVisual,ert=Le.eachVisual,rrt=z,XH=T,art=Xe,irt=zt,nrt=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,a){var i=this.option;!a&&wy(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=Z(t,this),this.controllerVisuals=th(this.option.controller,a,t),this.targetVisuals=th(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesId,a=this.option.seriesIndex;a==null&&t==null&&(a="all");var i=$i(this.ecModel,"series",{index:a,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return V(i,function(n){return n.componentIndex})},e.prototype.eachTargetSeries=function(t,a){T(this.getTargetSeriesIndices(),function(i){var n=this.ecModel.getSeriesByIndex(i);n&&t.call(a,n)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(i){i===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,i){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;i=i||["<",">"],z(t)&&(t=t.slice(),u=!0);var c=a?t:u?[f(t[0]),f(t[1])]:f(t);if(W(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if($(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+c[1]:t[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(p){return p===s[0]?"min":p===s[1]?"max":(+p).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=art([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var i=t.dimensions,n=i.length-1;n>=0;n--){var o=i[n],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,a=this.option,i={inRange:a.inRange,outOfRange:a.outOfRange},n=a.target||(a.target={}),o=a.controller||(a.controller={});dt(n,i),dt(o,i);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),c.call(this,o);function l(f){rrt(a.color)&&!f.inRange&&(f.inRange={color:a.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,p,h){var d=f[p],v=f[h];d&&!v&&(v=f[h]={},XH(d,function(m,g){if(Le.isValidType(g)){var y=zy.get(g,"inactive",s);y!=null&&(v[g]=y,g==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function c(f){var p=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,h=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),v=this.getItemSymbol(),m=v||"roundRect";XH(this.stateList,function(g){var y=this.itemSize,x=f[g];x||(x=f[g]={color:s?d:[d]}),x.symbol==null&&(x.symbol=p&&tt(p)||(s?m:[m])),x.symbolSize==null&&(x.symbolSize=h&&tt(h)||(s?y[0]:[y[0],y[0]])),x.symbol=ZH(x.symbol,function(S){return S==="none"?m:S});var _=x.symbolSize;if(_!=null){var b=-1/0;ert(_,function(S){S>b&&(b=S)}),x.symbolSize=ZH(_,function(S){return irt(S,[0,b],[0,y[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:N.color.transparent,borderColor:N.color.borderTint,contentColor:N.color.theme[0],inactiveColor:N.color.disabled,borderWidth:0,padding:N.size.m,textGap:10,precision:0,textStyle:{color:N.color.secondary}},e})(St),Tc=nrt;var qH=[20,140],ort=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=qH[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=qH[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):z(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),T(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=Xe((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]=i[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&n.push(l)},this),a.push({seriesId:i.id,dataIndex:n})},this),a},e.prototype.getVisualMeta=function(t){var a=jH(this,"outOfRange",this.getExtent()),i=jH(this,"inRange",this.option.range.slice()),n=[];function o(h,d){n.push({value:h,color:t(h,d)})}for(var s=0,l=0,u=i.length,c=a.length;lt[1])break;n.push({color:this.getControllerVisual(l,"color",a),offset:s/i})}return n.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),n},e.prototype._createBarPoints=function(t,a){var i=this.visualMapModel.itemSize;return[[i[0]-a[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,i=this.visualMapModel.get("inverse");return new K(a==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,a){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=n.itemSize,u=n.getExtent(),c=this._applyTransform("left",i.mainGroup);lrt([0,1],function(f){var p=o[f];p.setStyle("fill",a.handlesColor[f]),p.y=t[f];var h=bn(t[f],[0,l[1]],u,!0),d=this.getControllerVisual(h,"symbolSize");p.scaleX=p.scaleY=d/l[0],p.x=l[0]-d/2;var v=vr(i.handleLabelPoints[f],Ci(p,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-d)/2:(l[0]-d)/-2;v[1]+=m}s[f].setStyle({x:v[0],y:v[1],text:n.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,a,i,n){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var p={convertOpacityToAlpha:!0},h=this.getControllerVisual(t,"color",p),d=this.getControllerVisual(t,"symbolSize"),v=bn(t,s,u,!0),m=l[0]-d/2,g={x:f.x,y:f.y};f.y=v,f.x=m;var y=vr(c.indicatorLabelPoint,Ci(f,this.group)),x=c.indicatorLabel;x.attr("invisible",!1);var _=this._applyTransform("left",c.mainGroup),b=this._orient,S=b==="horizontal";x.setStyle({text:(i||"")+o.formatValueText(a),verticalAlign:S?_:"middle",align:S?"center":_});var w={x:m,y:v,style:{fill:h}},D={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};f.x=g.x,f.y=g.y,f.animateTo(w,C),x.animateTo(D,C)}else f.attr(w),x.attr(D);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var E=0;Eo[1]&&(f[1]=1/0),a&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var p=this._hoverLinkDataIndices,h=[];(a||eG(i))&&(h=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var d=qE(p,h);this._dispatchHighDown("downplay",Dc(d[0],i)),this._dispatchHighDown("highlight",Dc(d[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(Ii(t.target,function(l){var u=nt(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var i=this.ecModel.getSeriesByIndex(a.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(i)){var o=i.getData(a.dataType),s=o.getStore().get(n.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var i=0;i=0&&(n.dimension=o,a.push(n))}}),r.getData().setVisual("visualMeta",a)}}];function hrt(r,e,t,a){for(var i=e.targetVisuals[a],n=Le.prepareVisualTypes(i),o={color:cn(r.getData(),"color")},s=0,l=n.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(iG,nG),T(oG,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(xC))}function ch(r){r.registerComponentModel($H),r.registerComponentView(aG),uh(r)}var drt=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],vrt[this._mode].call(this,this._pieceList),this._resetSelected(t,a);var n=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=tt(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=V(this._pieceList,function(l){return l=tt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},i=Le.listVisualTypes(),n=this.isCategory();T(t.pieces,function(s){T(i,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),T(a,function(s,l){var u=!1;T(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&T(this.stateList,function(c){(t[c]||(t[c]={}))[l]=zy.get(l,c==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,a){var i=this.option,n=this._pieceList,o=(a?i:t).selected||{};if(i.selected=o,T(n,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;T(n,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=tt(t)},e.prototype.getValueState=function(t){var a=Le.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[],i=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Le.findPieceIndex(l,i);c===t&&o.push(u)},this),a.push({seriesId:n.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var i=t.interval||[];a=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return a},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var a=[],i=["",""],n=this;function o(c,f){var p=n.getRepresentValue({interval:c});f||(f=n.getValueState(p));var h=t(p,f);c[0]===-1/0?i[0]=h:c[1]===1/0?i[1]=h:a.push({value:c[0],color:h},{value:c[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return T(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:a,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=Ar(Tc.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e})(Tc),vrt={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var n=(a[1]-a[0])/i;+n.toFixed(t)!==n&&t<5;)t++;e.precision=t,n=+n.toFixed(t),e.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","\u2265"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function uG(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var cG=drt;var mrt=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var a=this.visualMapModel,i=a.get("textGap"),n=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,c=de(a.get("showLabel",!0),!u),f=!a.get("selectedMode");u&&this._renderEndsText(t,u[0],s,c,o),T(l.viewPieceList,function(p){var h=p.piece,d=new K;d.onclick=Z(this._onItemClick,this,h),this._enableHoverLink(d,p.indexInModelPieceList);var v=a.getRepresentValue(h);if(this._createItemSymbol(d,v,[0,0,s[0],s[1]],f),c){var m=this.visualMapModel.getValueState(v),g=n.get("align")||o;d.add(new Dt({style:Gt(n,{x:g==="right"?-i:s[0]+i,y:s[1]/2,text:h.text,verticalAlign:n.get("verticalAlign")||"middle",align:g,opacity:Q(n.get("opacity"),m==="outOfRange"?.5:1)}),silent:f}))}t.add(d)},this),u&&this._renderEndsText(t,u[1],s,c,o),Ai(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var i=this;t.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Dc(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return By(t,this.api,t.itemSize);var i=a.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,a,i,n,o){if(a){var s=new K,l=this.visualMapModel.textStyleModel;s.add(new Dt({style:Gt(l,{x:n?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:a})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=V(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return(n==="horizontal"?o:!o)?a.reverse():i&&(i=i.slice().reverse()),{viewPieceList:a,endsText:i}},e.prototype._createItemSymbol=function(t,a,i,n){var o=jt(this.getControllerVisual(a,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(a,"color"));o.silent=n,t.add(o)},e.prototype._onItemClick=function(t){var a=this.visualMapModel,i=a.option,n=i.selectedMode;if(n){var o=tt(i.selected),s=a.getSelectedMapKey(t);n==="single"||n===!0?(o[s]=!0,T(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e})(Vy),fG=mrt;function fh(r){r.registerComponentModel(cG),r.registerComponentView(fG),uh(r)}function _C(r){Tt(ch),Tt(fh)}var pG=(function(){function r(e){this._thumbnailModel=e}return r.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},r.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:f_(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(e,t){var a=t.getViewOfComponentModel(this._thumbnailModel);a&&a.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},r})();var hG=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.optionUpdated=function(t,a){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new pG(this);if(this._target=null,this.ecModel.eachSeries(function(i){wT(i,null)}),this.shouldShow()){var a=this.getTarget();wT(a.baseMapProvider,t)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?t.subType!=="graph"&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:N.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:N.color.neutral30,borderColor:N.color.neutral40,opacity:.3},z:10},e})(St);var mG=(function(r){I(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){if(this._api=i,this._model=t,this._coordSys||(this._coordSys=new Ia),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var n=this.group;n.removeAll();var o=t.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=a.get("backgroundColor")||N.color.neutral00);var l=Zt(t,i).refContainer,u=Bt(Dv(t,!0),l),c=s.lineWidth||0,f=this._contentRect=qa(u.clone(),c/2,!0,!0),p=new K;n.add(p),p.setClipPath(new ht({shape:f.plain()}));var h=this._targetGroup=new K;p.add(h);var d=u.plain();d.r=o.getShallow("borderRadius",!0),n.add(this._bgRect=new ht({style:s,shape:d,silent:!1,cursor:"grab"}));var v=t.getModel("windowStyle"),m=v.getShallow("borderRadius",!0);p.add(this._windowRect=new ht({shape:{x:0,y:0,width:0,height:0,r:m},style:v.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),vG(t,this)},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),vG(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var a=this._targetGroup,i=this._coordSys,n=this._contentRect;if(a.removeAll(),!!t){var o=t.group,s=o.getBoundingRect();a.add(o),this._bgRect.z2=t.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=Bt({left:"center",top:"center",aspect:s.width/s.height},n);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var a=this._bridgeRendered;a&&a.renderVersion===t.renderVersion&&(a.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var a=Fe([],t.targetTrans),i=fr([],this._coordSys.transform,a);this._transThisToTarget=Fe([],i);var n=t.viewportRect;n?n=n.clone():n=new at(0,0,this._api.getWidth(),this._api.getHeight()),n.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(J({r:s},n))}},e.prototype._resetRoamController=function(t){var a=this,i=this._api,n=this._roamController;if(n||(n=this._roamController=new va(i.getZr())),!t||!this._isEnabled()){n.disable();return}n.enable(t,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return a._contentRect.contain(s,l)}}}),n.off("pan").off("zoom").on("pan",Z(this._onPan,this)).on("zoom",Z(this._onZoom,this))},e.prototype._onPan=function(t){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var i=ce([],[t.oldX,t.oldY],a),n=ce([],[t.oldX-t.dx,t.oldY-t.dy],a);this._api.dispatchAction(dG(this._model.getTarget().baseMapProvider,{dx:n[0]-i[0],dy:n[1]-i[1]}))}},e.prototype._onZoom=function(t){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var i=ce([],[t.originX,t.originY],a);this._api.dispatchAction(dG(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:i[0],originY:i[1]}))}},e.prototype._isEnabled=function(){var t=this._model;if(!t||!t.shouldShow())return!1;var a=t.getTarget().baseMapProvider;return!!a},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e})(Ot);function dG(r,e){var t=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",a={type:t};return a[r.mainType+"Id"]=r.id,O(a,e),a}function vG(r,e){var t=ja(r);Js(e.group,t.z,t.zlevel)}function bC(r){r.registerComponentModel(hG),r.registerComponentView(mG)}var grt={label:{enabled:!0},decal:{show:!1}},gG=ot(),yrt={};function SC(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=tt(grt);dt(a.label,r.getLocaleModel().get("aria"),!1),dt(t.option,a,!1),i(),n();function i(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=q();r.eachSeries(function(p){if(!p.isColorBySeries()){var h=f.get(p.type);h||(h={},f.set(p.type,h)),gG(p).scope=h}}),r.eachRawSeries(function(p){if(r.isSeriesFiltered(p))return;if($(p.enableAriaDecal)){p.enableAriaDecal();return}var h=p.getData();if(p.isColorBySeries()){var y=Of(p.ecModel,p.name,yrt,r.getSeriesCount()),x=h.getVisual("decal");h.setVisual("decal",_(x,y))}else{var d=p.getRawData(),v={},m=gG(p).scope;h.each(function(b){var S=h.getRawIndex(b);v[S]=b});var g=d.count();d.each(function(b){var S=v[b],w=d.getName(b)||b+"",D=Of(p.ecModel,w,m,g),C=h.getItemVisual(S,"decal");h.setItemVisual(S,"decal",_(C,D))})}function _(b,S){var w=b?O(O({},S),b):S;return w.dirty=!0,w}})}}function n(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=J(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var p=r.getSeriesCount(),h=f.get(["data","maxCount"])||10,d=f.get(["series","maxCount"])||10,v=Math.min(p,d),m;if(!(p<1)){var g=s();if(g){var y=f.get(["general","withTitle"]);m=o(y,{title:g})}else m=f.get(["general","withoutTitle"]);var x=[],_=p>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(_,{seriesCount:p}),r.eachSeries(function(D,C){if(C1?f.get(["series","multiple",L]):f.get(["series","single",L]),M=o(M,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var A=D.getData();if(A.count()>h){var P=f.get(["data","partialData"]);M+=o(P,{displayCnt:h})}else M+=f.get(["data","allData"]);for(var R=f.get(["data","separator","middle"]),k=f.get(["data","separator","end"]),B=f.get(["data","excludeDimensionId"]),U=[],F=0;F":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},xrt=(function(){function r(e){var t=this._condVal=W(e)?new RegExp(e):_M(e)?e:null;if(t==null){var a="";Ut(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return W(t)?this._condVal.test(e):yt(t)?this._condVal.test(e+""):!1},r})(),_rt=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),brt=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&a.push(i),i=[A,P]}function c(A,P,R,k){Mc(A,R)&&Mc(P,k)||i.push(A,P,R,k,R,k)}function f(A,P,R,k,B,U){var F=Math.abs(P-A),H=Math.tan(F/4)*4/3,G=PD:E2&&a.push(i),a}function EC(r,e,t,a,i,n,o,s,l,u){if(Mc(r,t)&&Mc(e,a)&&Mc(i,o)&&Mc(n,s)){l.push(o,s);return}var c=2/u,f=c*c,p=o-r,h=s-e,d=Math.sqrt(p*p+h*h);p/=d,h/=d;var v=t-r,m=a-e,g=i-o,y=n-s,x=v*v+m*m,_=g*g+y*y;if(x=0&&D=0){l.push(o,s);return}var C=[],M=[];Va(r,t,i,o,.5,C),Va(e,a,n,s,.5,M),EC(C[0],M[0],C[1],M[1],C[2],M[2],C[3],M[3],l,u),EC(C[4],M[4],C[5],M[5],C[6],M[6],C[7],M[7],l,u)}function TG(r,e){var t=Uy(r),a=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),f=EG([l,u],c?0:1,e),p=(c?s:u)/f.length,h=0;hi,o=EG([a,i],n?0:1,e),s=n?"width":"height",l=n?"height":"width",u=n?"x":"y",c=n?"y":"x",f=r[s]/o.length,p=0;p1?null:new pt(v*l+r,v*u+e)}function Prt(r,e,t){var a=new pt;pt.sub(a,t,e),a.normalize();var i=new pt;pt.sub(i,r,e);var n=i.dot(a);return n}function Ec(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function krt(r,e,t){for(var a=r.length,i=[],n=0;no?(u.x=c.x=s+n/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+n),krt(e,u,c)}function Fy(r,e,t,a){if(t===1)a.push(e);else{var i=Math.floor(t/2),n=r(e);Fy(r,n[0],i,a),Fy(r,n[1],t-i,a)}return a}function Rrt(r,e){for(var t=[],a=0;a0)for(var b=a/t,S=-a/2;S<=a/2;S+=b){for(var w=Math.sin(S),D=Math.cos(S),C=0,x=0;x0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Gy(r){var e=1/0,t=1/0,a=-1/0,i=-1/0,n=V(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),a=Math.max(c,a),i=Math.max(f,i),[c,f]}),o=V(n,function(s,l){return{cp:s,z:Hrt(s[0],s[1],e,t,a,i),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function NG(r){return AG(r.path,r.count)}function AC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function OG(r,e,t){var a=[];function i(b){for(var S=0;S=0;i--)if(!t[i].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var n=l.length,u=Math.ceil(n/2);t[i].many=l.slice(u,n),t[s].many=l.slice(0,u),s++}return t}var Grt={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;VG(r)&&(u=r,c=e),VG(e)&&(u=e,c=r);function f(g,y,x,_,b){var S=g.many,w=g.one;if(S.length===1&&!b){var D=y?S[0]:w,C=y?w:S[0];if(hh(D))f({many:[D],one:C},!0,x,_,!0);else{var M=s?J({delay:s(x,_)},l):l;Wy(D,C,M),n(D,C,D,C,M)}}else for(var E=J({dividePath:Grt[t],individualDelay:s&&function(B,U,F,H){return s(B+x,_)}},l),L=y?OG(S,w,E):zG(w,S,E),A=L.fromIndividuals,P=L.toIndividuals,R=A.length,k=0;ke.length,h=u?BG(c,u):BG(p?e:r,[p?r:e]),d=0,v=0;vXG))for(var n=a.getIndices(),o=0;o0&&S.group.traverse(function(D){D instanceof ft&&!D.animators.length&&D.animateFrom({style:{opacity:0}},w)})})}function WG(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function YG(r){return z(r)?r.sort().join(","):r}function ss(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function $rt(r,e){var t=q(),a=q(),i=q();T(r.oldSeries,function(o,s){var l=r.oldDataGroupIds[s],u=r.oldData[s],c=WG(o),f=YG(c);a.set(f,{dataGroupId:l,data:u}),z(c)&&T(c,function(p){i.set(p,{key:f,dataGroupId:l,data:u})})});function n(o){t.get(o)&&UE("Duplicated seriesKey in universalTransition "+o)}return T(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=WG(o),c=YG(u),f=a.get(c);if(f)t.set(c,{oldSeries:[{dataGroupId:f.dataGroupId,divide:ss(f.data),data:f.data}],newSeries:[{dataGroupId:s,divide:ss(l),data:l}]});else if(z(u)){var p=[];T(u,function(v){var m=a.get(v);m.data&&p.push({dataGroupId:m.dataGroupId,divide:ss(m.data),data:m.data})}),p.length&&t.set(c,{oldSeries:p,newSeries:[{dataGroupId:s,data:l,divide:ss(l)}]})}else{var h=i.get(u);if(h){var d=t.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:ss(h.data)}],newSeries:[]},t.set(h.key,d)),d.newSeries.push({dataGroupId:s,data:l,divide:ss(l)})}}}}),t}function ZG(r,e){for(var t=0;t=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:ss(e.oldData[s]),groupIdDim:o.dimension})}),T(Ft(r.to),function(o){var s=ZG(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();n.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:ss(l),groupIdDim:o.dimension})}}),i.length>0&&n.length>0&&qG(i,n,a)}function PC(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){T(Ft(a.seriesTransition),function(i){T(Ft(i.to),function(n){for(var o=a.updatedSeries,s=0;so.vmin?t+=o.vmin-a+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:t+=e-a,a=o.vmax,i=!1;break}t+=o.vmin-a+o.gapReal,a=o.vmax}return i&&(t+=e-a),t},r.prototype.unelapse=function(e){for(var t=jG,a=$G,i=!0,n=0,o=0;ol?n=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):n=a+e-t,a=s.vmax,i=!1;break}t=u,a=s.vmax}return i&&(n=a+e-t),n},r})();function Qrt(){return new Jrt}var jG=0,$G=0;function tat(r,e){var t=0,a={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},n={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};T(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(t+=l.val);var u=NC(s,e);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,p=u.vmax-u.vmin;if(!(c&&f))if(c||f){var h=c?"S":"E";n[h][l.type].has=!0,n[h][l.type].span=p,n[h][l.type].inExtFrac=p/(s.vmax-s.vmin),n[h][l.type].val=l.val}else a[l.type].span+=p,a[l.type].val+=l.val}});var o=t*(0+(e[1]-e[0])+(a.tpAbs.val-a.tpAbs.span)+(n.S.tpAbs.has?(n.S.tpAbs.val-n.S.tpAbs.span)*n.S.tpAbs.inExtFrac:0)+(n.E.tpAbs.has?(n.E.tpAbs.val-n.E.tpAbs.span)*n.E.tpAbs.inExtFrac:0)-a.tpPrct.span-(n.S.tpPrct.has?n.S.tpPrct.span*n.S.tpPrct.inExtFrac:0)-(n.E.tpPrct.has?n.E.tpPrct.span*n.E.tpPrct.inExtFrac:0))/(1-a.tpPrct.val-(n.S.tpPrct.has?n.S.tpPrct.val*n.S.tpPrct.inExtFrac:0)-(n.E.tpPrct.has?n.E.tpPrct.val*n.E.tpPrct.inExtFrac:0));T(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=t!==0?Math.max(o,0)*l.val/t:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function eat(r,e,t,a,i,n){r!=="no"&&T(t,function(o){var s=NC(o,n);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=a(u),f=i*3/4;c>s.vmin-f&&ce[0]&&t=0&&o<1-1e-5}T(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:tt(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(W(o.gap)){var u=Be(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c,"Percent gap")||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=e(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),t&&t.noNegative&&T(["vmin","vmax"],function(h){s[h]<0&&(s[h]=0)}),s.vmin>s.vmax){var p=s.vmax;s.vmax=s.vmin,s.vmin=p}a.push(s)}}),a.sort(function(o,s){return o.vmin-s.vmin});var n=-1/0;return T(a,function(o,s){n>o.vmin&&(a[s]=null),n=o.vmax}),{breaks:a.filter(function(o){return!!o})}}function OC(r,e){return RC(e)===RC(r)}function RC(r){return r.start+"_\0_"+r.end}function aat(r,e,t){var a=[];T(r,function(n,o){var s=e(n);s&&s.type==="vmin"&&a.push([o])}),T(r,function(n,o){var s=e(n);if(s&&s.type==="vmax"){var l=di(a,function(u){return OC(e(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return T(a,function(n){n.length===2&&i.push(t?n:[r[n[0]],r[n[1]]])}),i}function iat(r,e,t,a){var i,n;if(r.break){var o=r.break.parsedBreak,s=di(t,function(f){return OC(f.breakOption,r.break.parsedBreak.breakOption)}),l=a(Math.pow(e,o.vmin),s.vmin),u=a(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?oe(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},n=s[r.break.type]}return{brkRoundingCriterion:n,vBreak:i}}function nat(r,e,t){var a={noNegative:!0},i=kC(r,t,a),n=kC(r,t,a),o=Math.log(e);return n.breaks=V(n.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:n}}var oat={vmin:"start",vmax:"end"};function sat(r,e){return e&&(r=r||{},r.break={type:oat[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),r}function KG(){eI({createScaleBreakContext:Qrt,pruneTicksByBreak:eat,addBreaksToTicks:rat,parseAxisBreakOption:kC,identifyAxisBreak:OC,serializeAxisBreakIdentifier:RC,retrieveAxisBreakPairs:aat,getTicksLogTransformBreak:iat,logarithmicParseBreaksFromOption:nat,makeAxisLabelFormatterParamBreak:sat})}var JG=ot();function lat(r,e){var t=di(r,function(a){return me().identifyAxisBreak(a.parsedBreak.breakOption,e.breakOption)});return t||r.push(t={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),t}function uat(r){T(r,function(e){return e.shouldRemove=!0})}function cat(r){for(var e=r.length-1;e>=0;e--)r[e].shouldRemove&&r.splice(e,1)}function fat(r,e,t,a,i){var n=t.axis;if(n.scale.isBlank()||!me())return;var o=me().retrieveAxisBreakPairs(n.scale.getTicks({breakTicks:"only_break"}),function(C){return C.break},!1);if(!o.length)return;var s=t.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var f=s.get("expandOnClick"),p=s.get("zigzagZ"),h=s.getModel("itemStyle"),d=h.getItemStyle(),v=d.stroke,m=d.lineWidth,g=d.lineDash,y=d.fill,x=new K({ignoreModelZ:!0}),_=n.isHorizontal(),b=JG(e).visualList||(JG(e).visualList=[]);uat(b);for(var S=function(C){var M=o[C][0].break.parsedBreak,E=[];E[0]=n.toGlobalCoord(n.dataToCoord(M.vmin,!0)),E[1]=n.toGlobalCoord(n.dataToCoord(M.vmax,!0)),E[1]=U;Ht&&(rt=U);var Kt=[],Et=[];Kt[k]=E,Et[k]=L,!mt&&!Ht&&(Kt[k]+=Y?-l:l,Et[k]-=Y?l:-l),Kt[B]=rt,Et[B]=rt,H.push(Kt),G.push(Et);var vt=void 0;if(sty[1]&&y.reverse(),{coordPair:y,brkId:me().serializeAxisBreakIdentifier(g.breakOption)}});l.sort(function(m,g){return m.coordPair[0]-g.coordPair[0]});for(var u=o[0],c=null,f=0;f=0?l[0].width:l[1].width),p=(f+c.x)/2-u.x,h=Math.min(p,p-c.x),d=Math.max(p,p-c.x),v=d<0?d:h>0?h:0;s=(p-v)/c.x}var m=new pt,g=new pt;pt.scale(m,a,-s),pt.scale(g,a,1-s),cp(t[0],m),cp(t[1],g)}function dat(r,e){var t={breaks:[]};return T(e.breaks,function(a){if(a){var i=di(r.get("breaks",!0),function(s){return me().identifyAxisBreak(s,a)});if(i){var n=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=n===Xu?!0:n===$S?!1:n===KS?!i.isExpanded:i.isExpanded,t.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),t}function QG(){XR({adjustBreakLabelPair:hat,buildAxisBreakLine:pat,rectCoordBuildBreakAxis:fat,updateModelAxisBreak:dat})}function zC(r){JR(r),KG(),QG()}function VC(){hN(vat)}function vat(r,e){T(r,function(t){if(!t.model.get(["axisLabel","inside"])){var a=mat(t);if(a){var i=t.isHorizontal()?"height":"width",n=t.model.get(["axisLabel","margin"]);e[i]-=a[i]+n,t.position==="top"?e.y+=a.height+n:t.position==="left"&&(e.x+=a.width+n)}}})}function mat(r){var e=r.model,t=r.scale;if(!e.get(["axisLabel","show"])||t.isBlank())return;var a,i,n=t.getExtent();t instanceof Xn?i=t.count():(a=t.getTicks(),i=a.length);var o=r.getLabelModel(),s=Uo(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;ci?i:a).getTime()-t.getTime(),s=Math.floor(o/(1e3*60*60*24))+1;return Math.max(1,s)}function _at(r,e){let t=[],a=new Date(r);for(;a<=e;){let i=a.getFullYear(),n=String(a.getMonth()+1).padStart(2,"0"),o=String(a.getDate()).padStart(2,"0");t.push(`${i}-${n}-${o}`),a.setDate(a.getDate()+1)}return t}function BC(r,e,t,a,i,n){let o=_at(t,a),s=new Map;o.forEach(d=>{s.set(d,{date:d,duration:0,count:0})}),r.forEach(d=>{if(e==="\u5176\u4ED6"?n?g0(d,n)===null:!d.tag:d.tag&&d.tag===e){let m=d.date;if(s.has(m)){let g=s.get(m);g.duration+=yat(d),g.count+=1}}});let l=Array.from(s.values()),u=l.reduce((d,v)=>d+v.duration,0),c=xat(t,a),f=u/c,p=null,h=0;return l.forEach(d=>{d.duration>h&&(h=d.duration,p=d)}),{dailyData:l,totalDuration:u,avgDuration:f,maxDay:p,actualDays:c}}function e5(r){let e=Math.floor(r/60),t=Math.round(r%60);return e>0?`${e}\u5C0F\u65F6${t>0?`${t}\u5206\u949F`:""}`:`${t}\u5206\u949F`}function t5(r,e){r=r.replace("#","");let t=parseInt(r.substring(0,2),16),a=parseInt(r.substring(2,4),16),i=parseInt(r.substring(4,6),16);return`rgba(${t}, ${a}, ${i}, ${e})`}function r5(){let r=getComputedStyle(document.body);return{textColor:r.getPropertyValue("--text-normal").trim()||"#000",mutedColor:r.getPropertyValue("--text-muted").trim()||"#666",borderColor:r.getPropertyValue("--background-modifier-border").trim()||"#e0e0e0",backgroundColor:r.getPropertyValue("--background-primary").trim()||"#fff",fontFamily:r.getPropertyValue("--font-interface").trim()||r.getPropertyValue("--font-text").trim()||"sans-serif"}}function a5(r){let e=null,t=()=>{e!==null&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{e=null,r()})},a=new MutationObserver(o=>{o.some(s=>s.type==="attributes")&&t()});[document.documentElement,document.body].filter(o=>!!o).forEach(o=>{a.observe(o,{attributes:!0,attributeFilter:["class","style","data-theme","theme"]})});let i=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>t();return typeof i.addEventListener=="function"?i.addEventListener("change",n):i.addListener(n),()=>{e!==null&&cancelAnimationFrame(e),a.disconnect(),typeof i.removeEventListener=="function"?i.removeEventListener("change",n):i.removeListener(n)}}function i5(r){var a;let e=r;(a=e.__albusChartObserverCleanup)==null||a.call(e),e.__albusChartObserverCleanup=void 0;let t=Zn(r);t==null||t.resize(),r.style.visibility="visible",r.style.opacity="1"}function n5(r,e){let t=r;return t.__albusChartObserverCleanup=e,e}function o5(r,e,t,a){i5(r);let i=Zn(r);i||(i=Mb(r));let n=e.map(h=>{let d=new Date(h.date);return`${d.getMonth()+1}/${d.getDate()}`}),o=e.map(h=>(h.duration/60).toFixed(1)),s=(a/60).toFixed(1),l=()=>{let{textColor:h,mutedColor:d,borderColor:v,backgroundColor:m,fontFamily:g}=r5();return{backgroundColor:"transparent",textStyle:{color:h,fontFamily:g},tooltip:{trigger:"axis",formatter:function(y){let _=y[0].dataIndex,b=e[_],S=e5(b.duration);return` +
+
${n[_]}
+
${S}
+
\u65E5\u7A0B\u65F6\u957F
+
+ `},backgroundColor:m,borderColor:v,textStyle:{color:h,fontFamily:g},extraCssText:` + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); + border-radius: 8px; + border: 1px solid ${v}; + `},grid:{left:"3%",right:"4%",bottom:"10%",top:"15%",containLabel:!0},xAxis:{type:"category",data:n,axisLine:{lineStyle:{color:v}},axisLabel:{color:h,fontSize:11,fontFamily:g,interval:Math.ceil(n.length/10)},axisTick:{alignWithLabel:!0,lineStyle:{color:v}}},yAxis:{type:"value",name:"\u5C0F\u65F6",nameTextStyle:{color:h,fontSize:11,fontFamily:g},axisLine:{show:!0,lineStyle:{color:v}},axisLabel:{color:h,fontSize:11,fontFamily:g,formatter:"{value}h"},splitLine:{lineStyle:{color:v,type:"dashed",opacity:.5}},axisTick:{lineStyle:{color:v}}},series:[{id:"stats-line-series",name:"\u65E5\u7A0B\u65F6\u957F",type:"line",data:o,smooth:!0,symbol:"circle",symbolSize:8,lineStyle:{color:t,width:3},itemStyle:{color:t,borderColor:t,borderWidth:2},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:t5(t,.4)},{offset:1,color:t5(t,.1)}]}},emphasis:{focus:"series",itemStyle:{borderWidth:3,shadowBlur:10,shadowColor:t}},animationDuration:500,animationDurationUpdate:320,animationEasing:"cubicOut",animationEasingUpdate:"cubicOut",universalTransition:!0},{id:"stats-avg-series",name:"\u5E73\u5747\u503C",type:"line",data:Array(n.length).fill(s),lineStyle:{color:t,width:1,type:"dashed",opacity:.7},symbol:"none",silent:!0,tooltip:{show:!1},animation:!1}]}},u=()=>{i.setOption(l(),!0),i.resize()};u();let c=new ResizeObserver(()=>{i&&i.resize()});c.observe(r);let f=a5(()=>{Zn(r)===i&&u()}),p=()=>{c.disconnect(),f()};return n5(r,p),()=>{let h=r;h.__albusChartObserverCleanup===p&&(h.__albusChartObserverCleanup=void 0),p(),Zn(r)===i&&i.dispose()}}function s5(r,e,t=""){i5(r);let a=Zn(r);a||(a=Mb(r));let i=e.map(f=>({name:f.name,value:f.value,itemStyle:f.color?{color:f.color}:void 0})),n=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],o=()=>{let{textColor:f,mutedColor:p,borderColor:h,backgroundColor:d,fontFamily:v}=r5();return{title:t?{text:t,left:"center",top:10,textStyle:{fontSize:14,fontWeight:"normal",color:f,fontFamily:v}}:void 0,tooltip:{trigger:"item",confine:!0,backgroundColor:d,borderColor:h,textStyle:{color:f,fontFamily:v},formatter:m=>{let g=e5(m.value);return` +
+
${m.name}
+
${g}
+
${m.percent.toFixed(1)}%
+
+ `},extraCssText:` + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); + border-radius: 8px; + border: 1px solid ${h}; + `},legend:{orient:"horizontal",top:10,left:"center",itemWidth:10,itemHeight:10,itemGap:12,textStyle:{fontSize:11,color:f,fontFamily:v},formatter:m=>m.length>8?m.slice(0,8)+"...":m},series:[{id:"stats-pie-series",type:"pie",radius:["45%","72%"],center:["50%","55%"],avoidLabelOverlap:!0,itemStyle:{borderRadius:6},label:{show:!1},emphasis:{scale:!0,scaleSize:8,label:{show:!1},itemStyle:{shadowBlur:12,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.25)"}},labelLine:{show:!1},data:i,animationDurationUpdate:320,animationEasingUpdate:"cubicOut",universalTransition:!0}],color:n,animation:!0,animationDuration:400,animationDurationUpdate:320,animationEasing:"cubicOut",animationEasingUpdate:"cubicOut"}},s=()=>{a.setOption(o(),!0),a.resize()};s();let l=new ResizeObserver(()=>{a&&a.resize()});l.observe(r);let u=a5(()=>{Zn(r)===a&&s()}),c=()=>{l.disconnect(),u()};return n5(r,c),()=>{let f=r;f.__albusChartObserverCleanup===c&&(f.__albusChartObserverCleanup=void 0),c(),Zn(r)===a&&a.dispose()}}var Zy=class{constructor(e,t,a){this.container=null;this.contentContainer=null;this.statsBodyEl=null;this.leftColumnEl=null;this.rightColumnEl=null;this.chartContainerEl=null;this.chartHeaderEl=null;this.chartCanvasEl=null;this.noChartEl=null;this.viewMode="week";this.tasks=[];this.selectedTag=null;this.chartCleanup=null;this.chartType="line";this.app=e,this.plugin=t,this.currentDate=a}setTasks(e){this.tasks=e}getViewMode(){return this.viewMode}setViewMode(e){this.viewMode=e}getCurrentDate(){return this.currentDate}setCurrentDate(e){this.currentDate=e}renderHeader(e,t){let a=["day","week","month","year"],i={day:"\u65E5",week:"\u5468",month:"\u6708",year:"\u5E74"},n={day:"calendar-1",week:"calendar-minus-2",month:"calendar-days",year:"calendar-range"},o=e.createDiv({cls:"albus-super-daily-notes-planner-mode-group"});a.forEach(d=>{let v=o.createEl("button",{cls:`albus-super-daily-notes-view-mode-btn ${this.viewMode===d?"albus-super-daily-notes-active":""}`});(0,Wi.setIcon)(v,n[d]),v.createSpan({text:i[d]}),v.addEventListener("click",()=>{this.viewMode!==d&&(this.viewMode=d,this.selectedTag=null,this.chartType="line",t())})});let s=e.createDiv({cls:"albus-super-daily-notes-planner-navigation albus-super-daily-notes-planner-navigation-centered"}),l=s.createEl("button");(0,Wi.setIcon)(l,"chevron-left"),l.addEventListener("click",()=>{this.navigatePrevious(),t()}),s.createEl("button",{text:this.getViewTitle()}).addEventListener("click",()=>{new ka(this.app,this.currentDate,d=>{this.currentDate=d,t()}).open()});let c=s.createEl("button");(0,Wi.setIcon)(c,"chevron-right"),c.addEventListener("click",()=>{this.navigateNext(),t()});let f=e.createDiv({cls:"albus-super-daily-notes-planner-actions"}),p={day:"\u4ECA\u5929",week:"\u672C\u5468",month:"\u672C\u6708",year:"\u4ECA\u5E74"};f.createEl("button",{text:p[this.viewMode]}).addEventListener("click",()=>{this.currentDate=new Date,t()})}renderContent(e){this.container=e,this.ensureLayout(e),!(!this.leftColumnEl||!this.rightColumnEl)&&(this.viewMode==="day"?this.renderDayStatsView(this.leftColumnEl,this.rightColumnEl):this.renderStatsView(this.leftColumnEl,this.rightColumnEl))}ensureLayout(e){var t;((t=this.contentContainer)==null?void 0:t.parentElement)===e&&this.leftColumnEl&&this.rightColumnEl||(e.empty(),this.contentContainer=e.createDiv({cls:"albus-super-daily-notes-stats-view"}),this.statsBodyEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-stats-modal-content"}),this.leftColumnEl=this.statsBodyEl.createDiv({cls:"albus-super-daily-notes-stats-left-column"}),this.rightColumnEl=this.statsBodyEl.createDiv({cls:"albus-super-daily-notes-stats-right-column"}),this.chartContainerEl=this.rightColumnEl.createDiv({cls:"albus-super-daily-notes-stats-chart-container"}),this.chartHeaderEl=this.chartContainerEl.createDiv({cls:"albus-super-daily-notes-stats-chart-header"}),this.chartCanvasEl=this.chartContainerEl.createDiv({cls:"albus-super-daily-notes-stats-chart-canvas"}),this.noChartEl=this.rightColumnEl.createDiv({cls:"albus-super-daily-notes-stats-no-chart"}))}renderDayStatsView(e,t){e.empty();let a=new Date(this.currentDate);a.setHours(0,0,0,0);let i=new Date(this.currentDate);i.setHours(23,59,59,999);let n=this.tasks.filter(v=>{let m=new Date(v.date);return v.completed&&m>=a&&m<=i}),o=y0(n,this.plugin.settings.customTags),s=x0(a,i,this.viewMode),l=e.createDiv({cls:"albus-super-daily-notes-stats-summary-row"}),u=l.createDiv({cls:"albus-super-daily-notes-stats-summary-card-small"}),c=u.createDiv({cls:"albus-super-daily-notes-stats-summary-icon-small"});(0,Wi.setIcon)(c,"clock");let f=u.createDiv({cls:"albus-super-daily-notes-stats-summary-info-small"});f.createEl("div",{cls:"albus-super-daily-notes-stats-summary-value-small",text:fs(o.totalDuration)}),f.createEl("div",{cls:"albus-super-daily-notes-stats-summary-label-small",text:"\u603B\u65F6\u957F"});let p=l.createDiv({cls:"albus-super-daily-notes-stats-summary-card-small"}),h=p.createDiv({cls:"albus-super-daily-notes-stats-summary-icon-small"});(0,Wi.setIcon)(h,"clipboard-list");let d=p.createDiv({cls:"albus-super-daily-notes-stats-summary-info-small"});if(d.createEl("div",{cls:"albus-super-daily-notes-stats-summary-value-small",text:`${n.length}`}),d.createEl("div",{cls:"albus-super-daily-notes-stats-summary-label-small",text:"\u5DF2\u5B8C\u6210\u4EFB\u52A1"}),o.sortedTagNames.length>0){let v=e.createDiv({cls:"albus-super-daily-notes-stats-distribution-container"}),m=v.createDiv({cls:"albus-super-daily-notes-stats-distribution-header"});m.createEl("h4",{text:"\u6807\u7B7E\u5206\u5E03"}),m.createEl("span",{cls:"albus-super-daily-notes-stats-distribution-count",text:`${o.sortedTagNames.length} \u4E2A\u6807\u7B7E`});let g=v.createDiv({cls:"albus-super-daily-notes-stats-tag-grid"});o.sortedTagNames.forEach(y=>{let x=o.tagStats[y],_=Math.round(x.duration/o.totalDuration*100),b=g.createDiv({cls:"albus-super-daily-notes-stats-tag-card"});b.style.borderLeftColor=x.color;let S=b.createDiv({cls:"albus-super-daily-notes-stats-tag-watermark"});S.textContent=`${_}%`,S.style.color=x.color;let w=b.createDiv({cls:"albus-super-daily-notes-stats-tag-header"}),D=w.createDiv({cls:"albus-super-daily-notes-stats-tag-color"});D.style.backgroundColor=x.color;let C=w.createEl("span",{cls:"albus-super-daily-notes-stats-tag-name",text:this.plugin.settings.showOnlyLeafTag&&x.name.split("/").pop()||x.name});C.style.color=x.color;let M=b.createDiv({cls:"albus-super-daily-notes-stats-tag-stats"});M.createEl("div",{cls:"albus-super-daily-notes-stats-tag-duration",text:fs(x.duration)}),M.createEl("div",{cls:"albus-super-daily-notes-stats-tag-count",text:`${x.count} \u4E2A\u65E5\u7A0B`})})}else e.createDiv({cls:"albus-super-daily-notes-stats-no-data",text:"\u6682\u65E0\u6570\u636E"});if(o.sortedTagNames.length>0){let v=o.sortedTagNames.map(m=>{let g=o.tagStats[m];return{name:this.plugin.settings.showOnlyLeafTag&&m.split("/").pop()||m,value:g.duration,color:g.color}});this.renderPieChartPanel(t,"\u65F6\u95F4\u5206\u5E03",v,!1)}else this.renderNoChartPanel(t,"\u6682\u65E0\u6570\u636E")}getViewTitle(){switch(this.viewMode){case"day":return`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708${this.currentDate.getDate()}\u65E5`;case"week":let e=this.getWeekNumber(this.currentDate);return`${this.currentDate.getFullYear()}\u5E74\u7B2C${e}\u5468`;case"month":return`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708`;case"year":return`${this.currentDate.getFullYear()}\u5E74`;default:return""}}getWeekNumber(e){let t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),a=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-a);let i=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-i.getTime())/864e5+1)/7)}navigatePrevious(){let e=new Date(this.currentDate);switch(this.viewMode){case"day":e.setDate(e.getDate()-1);break;case"week":e.setDate(e.getDate()-7);break;case"month":e.setMonth(e.getMonth()-1);break;case"year":e.setFullYear(e.getFullYear()-1);break}this.currentDate=e}navigateNext(){let e=new Date(this.currentDate);switch(this.viewMode){case"day":e.setDate(e.getDate()+1);break;case"week":e.setDate(e.getDate()+7);break;case"month":e.setMonth(e.getMonth()+1);break;case"year":e.setFullYear(e.getFullYear()+1);break}this.currentDate=e}renderStatsView(e,t){var p;e.empty();let a,i;switch(this.viewMode){case"day":a=new Date(this.currentDate),a.setHours(0,0,0,0),i=new Date(this.currentDate),i.setHours(23,59,59,999);break;case"week":a=fi(this.currentDate),i=new Date(a),i.setDate(a.getDate()+6),i.setHours(23,59,59,999);break;case"month":a=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),1),i=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()+1,0),i.setHours(23,59,59,999);break;case"year":a=new Date(this.currentDate.getFullYear(),0,1),i=new Date(this.currentDate.getFullYear(),11,31),i.setHours(23,59,59,999);break;default:a=this.currentDate,i=this.currentDate}let n=this.tasks.filter(h=>{let d=new Date(h.date);return h.completed&&d>=a&&d<=i}),o=y0(n,this.plugin.settings.customTags),s=x0(a,i,this.viewMode);o.sortedTagNames.length>0&&!this.selectedTag&&(this.selectedTag=o.sortedTagNames[0]);let l=e.createDiv({cls:"albus-super-daily-notes-stats-summary-row"}),u=l.createDiv({cls:"albus-super-daily-notes-stats-summary-card-small"}),c=u.createDiv({cls:"albus-super-daily-notes-stats-summary-icon-small"});(0,Wi.setIcon)(c,"clock");let f=u.createDiv({cls:"albus-super-daily-notes-stats-summary-info-small"});if(f.createEl("div",{cls:"albus-super-daily-notes-stats-summary-value-small",text:fs(o.totalDuration)}),f.createEl("div",{cls:"albus-super-daily-notes-stats-summary-label-small",text:"\u603B\u65F6\u957F"}),this.selectedTag){let h=BC(n,this.selectedTag,a,i,this.viewMode,this.plugin.settings.customTags),d=l.createDiv({cls:"albus-super-daily-notes-stats-summary-card-small"}),v=d.createDiv({cls:"albus-super-daily-notes-stats-summary-icon-small"});(0,Wi.setIcon)(v,"bar-chart-3");let m=d.createDiv({cls:"albus-super-daily-notes-stats-summary-info-small"});if(m.createEl("div",{cls:"albus-super-daily-notes-stats-summary-value-small",text:fs(h.avgDuration)}),m.createEl("div",{cls:"albus-super-daily-notes-stats-summary-label-small",text:"\u65E5\u5747\u65F6\u957F"}),h.maxDay&&h.maxDay.duration>0){let g=l.createDiv({cls:"albus-super-daily-notes-stats-summary-card-small"}),y=g.createDiv({cls:"albus-super-daily-notes-stats-summary-icon-small"});(0,Wi.setIcon)(y,"flame");let x=g.createDiv({cls:"albus-super-daily-notes-stats-summary-info-small"}),_=new Date(h.maxDay.date);x.createEl("div",{cls:"albus-super-daily-notes-stats-summary-value-small",text:`${_.getMonth()+1}/${_.getDate()}`}),x.createEl("div",{cls:"albus-super-daily-notes-stats-summary-label-small",text:"\u6700\u4E13\u6CE8\u65E5"})}}if(o.sortedTagNames.length>0){let h=e.createDiv({cls:"albus-super-daily-notes-stats-distribution-container"}),d=h.createDiv({cls:"albus-super-daily-notes-stats-distribution-header"});d.createEl("h4",{text:"\u6807\u7B7E\u5206\u5E03"}),d.createEl("span",{cls:"albus-super-daily-notes-stats-distribution-count",text:`${o.sortedTagNames.length} \u4E2A\u6807\u7B7E`});let v=h.createDiv({cls:"albus-super-daily-notes-stats-tag-grid"});o.sortedTagNames.forEach(m=>{let g=o.tagStats[m],y=Math.round(g.duration/o.totalDuration*100),x=v.createDiv({cls:"albus-super-daily-notes-stats-tag-card"});x.style.borderLeftColor=g.color,m===this.selectedTag&&(x.addClass("albus-super-daily-notes-active"),x.style.outlineColor=g.color),x.style.cursor="pointer",x.addEventListener("click",()=>{this.selectedTag=m,this.container&&this.renderContent(this.container)});let _=x.createDiv({cls:"albus-super-daily-notes-stats-tag-watermark"});_.textContent=`${y}%`,_.style.color=g.color;let b=x.createDiv({cls:"albus-super-daily-notes-stats-tag-header"}),S=b.createDiv({cls:"albus-super-daily-notes-stats-tag-color"});S.style.backgroundColor=g.color;let w=b.createEl("span",{cls:"albus-super-daily-notes-stats-tag-name",text:this.plugin.settings.showOnlyLeafTag&&g.name.split("/").pop()||g.name});w.style.color=g.color;let D=x.createDiv({cls:"albus-super-daily-notes-stats-tag-stats"});D.createEl("div",{cls:"albus-super-daily-notes-stats-tag-duration",text:fs(g.duration)}),D.createEl("div",{cls:"albus-super-daily-notes-stats-tag-count",text:`${g.count} \u4E2A\u65E5\u7A0B`})})}else e.createDiv({cls:"albus-super-daily-notes-stats-no-data",text:"\u6682\u65E0\u6570\u636E"});if(o.sortedTagNames.length>0){let h=this.selectedTag&&((p=o.tagStats[this.selectedTag])==null?void 0:p.color)||"#5470c6",d="\u65F6\u95F4\u5206\u5E03";if(this.chartType==="line"&&this.selectedTag&&(d=this.plugin.settings.showOnlyLeafTag?this.selectedTag.split("/").pop()||this.selectedTag:this.selectedTag),this.chartType==="pie"){let v=o.sortedTagNames.map(m=>{let g=o.tagStats[m];return{name:this.plugin.settings.showOnlyLeafTag&&m.split("/").pop()||m,value:g.duration,color:g.color}});this.renderPieChartPanel(t,d,v,!0)}else if(this.selectedTag){let v=BC(n,this.selectedTag,a,i,this.viewMode,this.plugin.settings.customTags);this.renderLineChartPanel(t,d,h,v.dailyData,v.avgDuration)}else{this.chartType="pie";let v=o.sortedTagNames.map(m=>{let g=o.tagStats[m];return{name:this.plugin.settings.showOnlyLeafTag&&m.split("/").pop()||m,value:g.duration,color:g.color}});this.renderPieChartPanel(t,"\u65F6\u95F4\u5206\u5E03",v,!0)}}else this.renderNoChartPanel(t,"\u6682\u65E0\u6570\u636E")}renderPieChartPanel(e,t,a,i){if(!(!this.chartContainerEl||!this.chartHeaderEl||!this.chartCanvasEl||!this.noChartEl)){if(e.appendChild(this.chartContainerEl),e.appendChild(this.noChartEl),this.chartContainerEl.style.display="flex",this.noChartEl.style.display="none",this.chartHeaderEl.empty(),this.chartHeaderEl.createEl("h3",{text:t}),i){let n=this.chartHeaderEl.createEl("button",{cls:"albus-super-daily-notes-view-mode-btn"});(0,Wi.setIcon)(n,this.chartType==="line"?"pie-chart":"trending-up"),n.addEventListener("click",()=>{this.chartType=this.chartType==="line"?"pie":"line",this.container&&this.renderContent(this.container)})}this.chartCleanup=s5(this.chartCanvasEl,a)}}renderLineChartPanel(e,t,a,i,n){if(!this.chartContainerEl||!this.chartHeaderEl||!this.chartCanvasEl||!this.noChartEl)return;e.appendChild(this.chartContainerEl),e.appendChild(this.noChartEl),this.chartContainerEl.style.display="flex",this.noChartEl.style.display="none",this.chartHeaderEl.empty(),this.chartHeaderEl.createEl("h3",{text:t});let o=this.chartHeaderEl.createEl("button",{cls:"albus-super-daily-notes-view-mode-btn"});(0,Wi.setIcon)(o,this.chartType==="line"?"pie-chart":"trending-up"),o.addEventListener("click",()=>{this.chartType=this.chartType==="line"?"pie":"line",this.container&&this.renderContent(this.container)}),this.chartCleanup=o5(this.chartCanvasEl,i,a,n)}renderNoChartPanel(e,t){!this.chartContainerEl||!this.noChartEl||(e.appendChild(this.chartContainerEl),e.appendChild(this.noChartEl),this.chartContainerEl.style.display="none",this.noChartEl.style.display="flex",this.noChartEl.empty(),this.noChartEl.createEl("p",{text:t}),this.chartCleanup&&(this.chartCleanup(),this.chartCleanup=null))}cleanup(){this.chartCleanup&&(this.chartCleanup(),this.chartCleanup=null)}};var dh=require("obsidian");var ls=require("obsidian");var Xy=class extends ls.Modal{constructor(t,a,i,n,o=!1,s,l){super(t);this.editor=null;this.descriptionSetting=null;this.endDateSetting=null;this.submitBtn=null;if(this.customTags=i,this.onSubmit=n,this.showOnlyLeafTag=o,a)this.isEditMode=!0,this.event={...a},this.event.endDate||(this.event.endDate=this.event.date);else{this.isEditMode=!1;let u=s||new Date().toISOString().split("T")[0],c=l||u;this.event={id:"",date:u,endDate:c,description:"",completed:!1}}}renderDescriptionEditor(t){this.descriptionSetting=new ls.Setting(t).setName("\u63CF\u8FF0"),this.descriptionSetting.settingEl.addClass("albus-super-daily-notes-inline-editor-setting"),this.descriptionSetting.settingEl.addClass("albus-super-daily-notes-inline-editor-setting-single-line");let a=this.descriptionSetting.controlEl.createDiv({cls:"albus-super-daily-notes-inline-editor-field"});this.editor=new Pa(this.app,a,{value:this.event.description,placeholder:"\u8F93\u5165\u4E8B\u9879\u63CF\u8FF0...",singleLineAutoGrow:!0,onChange:i=>{this.event.description=i,this.validateForm()}}),window.setTimeout(()=>{var i;return(i=this.editor)==null?void 0:i.focus()},30)}validateForm(){let t=this.event.description.trim().length>0,a=new Date(this.event.date),i=new Date(this.event.endDate||this.event.date),n=!Number.isNaN(a.getTime())&&!Number.isNaN(i.getTime())&&i>=a;this.descriptionSetting&&(t?(this.descriptionSetting.settingEl.removeClass("albus-super-daily-notes-has-error"),this.descriptionSetting.setDesc("")):(this.descriptionSetting.settingEl.addClass("albus-super-daily-notes-has-error"),this.descriptionSetting.setDesc("\u8BF7\u8F93\u5165\u4E8B\u9879\u63CF\u8FF0"))),this.endDateSetting&&(n?(this.endDateSetting.settingEl.removeClass("albus-super-daily-notes-has-error"),this.endDateSetting.setDesc("")):(this.endDateSetting.settingEl.addClass("albus-super-daily-notes-has-error"),this.endDateSetting.setDesc("\u7ED3\u675F\u65E5\u671F\u4E0D\u80FD\u65E9\u4E8E\u5F00\u59CB\u65E5\u671F")));let o=t&&n;return this.submitBtn&&(this.submitBtn.disabled=!o,this.submitBtn.toggleClass("albus-super-daily-notes-disabled",!o)),o}onOpen(){let{contentEl:t}=this;t.empty(),this.modalEl.addClass("albus-super-daily-notes-item-editor-modal-shell"),t.addClass("albus-super-daily-notes-item-editor-modal"),new ls.Setting(t).setName("\u5F00\u59CB\u65E5\u671F").addText(n=>(n.setValue(this.event.date||"").onChange(o=>{this.event.date=o||new Date().toISOString().split("T")[0],this.validateForm()}),n.inputEl.type="date",n)),this.endDateSetting=new ls.Setting(t).setName("\u7ED3\u675F\u65E5\u671F").addText(n=>(n.setValue(this.event.endDate||this.event.date).onChange(o=>{this.event.endDate=o||this.event.date,this.validateForm()}),n.inputEl.type="date",n)),this.customTags.length>0&&new ls.Setting(t).setName("\u6807\u7B7E").addDropdown(n=>(n.addOption("","\u65E0\u6807\u7B7E"),this.customTags.forEach(o=>{let s=this.showOnlyLeafTag&&o.name.includes("/")&&o.name.split("/").pop()||o.name;n.addOption(o.name,s)}),n.setValue(this.event.tag||"").onChange(o=>{this.event.tag=o||void 0}),n)),this.renderDescriptionEditor(t),new ls.Setting(t).setName("\u72B6\u6001").addToggle(n=>(n.setValue(this.event.completed).onChange(o=>{this.event.completed=o}),n));let a=t.createDiv({cls:"albus-super-daily-notes-modal-button-container"});a.createEl("button",{text:"\u53D6\u6D88"}).addEventListener("click",()=>{this.close()}),this.isEditMode&&a.createEl("button",{text:"\u5220\u9664",cls:"mod-warning"}).addEventListener("click",async()=>{await this.onSubmit(null),this.close()}),this.submitBtn=a.createEl("button",{text:this.isEditMode?"\u4FDD\u5B58":"\u521B\u5EFA",cls:"mod-cta"}),this.validateForm(),this.submitBtn.addEventListener("click",async()=>{var n,o;if(this.validateForm()){this.event.description=(o=(n=this.editor)==null?void 0:n.value)!=null?o:this.event.description,this.event.endDate=this.event.endDate||this.event.date;let s=this.event.endDate===this.event.date?void 0:this.event.endDate;this.isEditMode||(this.event.id=h0(this.event.date,this.event.description,s)),await this.onSubmit({...this.event,endDate:s}),this.close()}})}onClose(){var a;(a=this.editor)==null||a.destroy(),this.editor=null;let{contentEl:t}=this;t.empty()}};var qy=class{constructor(e,t,a,i){this.container=null;this.contentContainer=null;this.events=[];this.scrollPosition=0;this.ganttScrollTop=0;this.ganttScrollLeft=0;this.eventsViewMode="gantt";this.highlightEventKey=null;this.ganttDragState={isDragging:!1,startDay:0,currentDay:0,headerCells:[],mouseMoveHandler:null,mouseUpHandler:null,previewEl:null};this.ganttBarDragState={isDragging:!1,event:null,mode:"resize-right",startX:0,dayWidth:0,originalStartDay:1,originalEndDay:1,currentStartDay:1,currentEndDay:1,daysInMonth:31,year:2024,month:0,barEl:null,barArea:null,isStartInMonth:!0,isEndInMonth:!0,mouseMoveHandler:null,mouseUpHandler:null};this.app=e,this.plugin=t,this.currentDate=a,this.callbacks=i}sortEventsForGantt(e){return[...e].sort((t,a)=>t.completed!==a.completed?t.completed?1:-1:t.date.localeCompare(a.date))}getEventDisplayColor(e){let t=Dh;if(e.tag){let a=this.plugin.settings.customTags.find(i=>i.name===e.tag);a!=null&&a.color&&(t=a.color)}return e.completed&&this.plugin.settings.grayOutCompleted?"#E0E0E0":t}updateGanttRowAppearance(e,t){let a=e.querySelector(".albus-super-daily-notes-gantt-label-text"),i=e.querySelector(".albus-super-daily-notes-gantt-bar"),n=e.querySelector(".albus-super-daily-notes-event-checkbox-small");n&&(n.checked=t.completed),a==null||a.toggleClass("albus-super-daily-notes-completed",t.completed),i&&(i.toggleClass("albus-super-daily-notes-gantt-bar-completed",t.completed),i.style.backgroundColor=this.getEventDisplayColor(t))}animateGanttRowReorder(e,t){let a=new Map,i=Array.from(e.querySelectorAll(".albus-super-daily-notes-gantt-row[data-event-id]")),n=this.sortEventsForGantt(t),o=new Map(i.map(l=>[l.dataset.eventId||"",l])),s=e.querySelector(".albus-super-daily-notes-gantt-row-placeholder");i.forEach(l=>{a.set(l,l.getBoundingClientRect().top)}),n.forEach(l=>{let u=o.get(l.id);u&&(s?e.insertBefore(u,s):e.appendChild(u))}),i.forEach(l=>{let u=a.get(l);if(u===void 0)return;let c=l.getBoundingClientRect().top,f=u-c;f!==0&&(l.addClass("albus-super-daily-notes-gantt-row-reordering"),l.getAnimations().forEach(p=>p.cancel()),l.animate([{transform:`translateY(${f}px)`},{transform:"translateY(0px)"}],{duration:260,easing:"cubic-bezier(0.22, 1, 0.36, 1)",fill:"none"}).finished.finally(()=>{l.removeClass("albus-super-daily-notes-gantt-row-reordering"),l.style.transform=""}))})}setEvents(e){this.events=e}getCurrentDate(){return this.currentDate}setCurrentDate(e){this.currentDate=e}getEventsViewMode(){return this.eventsViewMode}renderHeader(e,t){let a=e.createDiv({cls:"albus-super-daily-notes-planner-navigation albus-super-daily-notes-planner-navigation-centered"}),i=a.createEl("button");(0,dh.setIcon)(i,"chevron-left"),i.addEventListener("click",()=>{this.navigatePrevious(),t()}),a.createEl("button",{text:this.getViewTitle()}).addEventListener("click",()=>{new ka(this.app,this.currentDate,u=>{this.currentDate=u,t()}).open()});let o=a.createEl("button");(0,dh.setIcon)(o,"chevron-right"),o.addEventListener("click",()=>{this.navigateNext(),t()}),e.createDiv({cls:"albus-super-daily-notes-planner-actions"}).createEl("button",{text:"\u672C\u6708"}).addEventListener("click",()=>{this.currentDate=new Date,t()})}renderContent(e,t){this.container=e,this.renderGanttView(e,t)}getViewTitle(){return`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708`}navigatePrevious(){let e=new Date(this.currentDate);e.setMonth(e.getMonth()-1),this.currentDate=e}navigateNext(){let e=new Date(this.currentDate);e.setMonth(e.getMonth()+1),this.currentDate=e}renderGanttView(e,t){let a=e.createDiv({cls:"albus-super-daily-notes-gantt-view"});this.contentContainer=a,a.addEventListener("scroll",()=>{this.ganttScrollTop=a.scrollTop,this.ganttScrollLeft=a.scrollLeft}),this.ganttDragState.headerCells=[];let i=this.currentDate.getFullYear(),n=this.currentDate.getMonth(),o=new Date(i,n+1,0).getDate(),s=new Date;s.setHours(0,0,0,0);let l=new Date(i,n,1);l.setHours(0,0,0,0);let u=new Date(i,n,o);u.setHours(0,0,0,0);let c=this.events.filter(_=>{let b=new Date(_.date);b.setHours(0,0,0,0);let S=_.endDate?new Date(_.endDate):b;return S.setHours(0,0,0,0),S>=l&&b<=u}),f=this.sortEventsForGantt(c),p=a.createDiv({cls:"albus-super-daily-notes-gantt-header-row"});p.createDiv({cls:"albus-super-daily-notes-gantt-label-cell albus-super-daily-notes-gantt-header-label"});let h=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],d=[];for(let _=1;_<=o;_++){let b=new Date(i,n,_),S=b.getDay()===0||b.getDay()===6,w=b.getTime()===s.getTime(),D=ne(b),C=p.createDiv({cls:`albus-super-daily-notes-gantt-day-header ${S?"albus-super-daily-notes-gantt-weekend":""} ${w?"albus-super-daily-notes-gantt-today":""}`});C.createDiv({cls:"albus-super-daily-notes-gantt-day-number",text:_.toString()}),C.createDiv({cls:"albus-super-daily-notes-gantt-day-weekday",text:h[b.getDay()]}),C.dataset.day=_.toString(),this.ganttDragState.headerCells.push(C),S&&d.push(_),C.addEventListener("mousedown",M=>{M.button===0&&(M.preventDefault(),this.startGanttHeaderDrag(_,D,t))}),C.addEventListener("contextmenu",M=>{M.preventDefault(),this.callbacks.openDailyNote(b)})}let v=a.createDiv({cls:"albus-super-daily-notes-gantt-body"});for(let _ of d){let b=v.createDiv({cls:"albus-super-daily-notes-gantt-weekend-stripe"}),S=(_-1)/o,w=1/o;b.style.left=`calc(160px + ${S} * (100% - 160px))`,b.style.width=`calc(${w} * (100% - 160px))`}f.length>0&&f.forEach(_=>{let b=v.createDiv({cls:"albus-super-daily-notes-gantt-row"});b.dataset.eventId=_.id,this.highlightEventKey&&this.highlightEventKey===`${_.date}|${_.description}`&&(b.addClass("albus-super-daily-notes-gantt-row-highlight"),this.highlightEventKey=null);let S=b.createDiv({cls:"albus-super-daily-notes-gantt-label-cell"}),w=S.createEl("input",{type:"checkbox",cls:"albus-super-daily-notes-event-checkbox-small"});if(w.checked=_.completed,w.addEventListener("click",async H=>{H.stopPropagation();let G=_.completed;_.completed=!_.completed,this.updateGanttRowAppearance(b,_),this.animateGanttRowReorder(v,c);try{await this.plugin.taskService.toggleEventStatus(_)}catch(Y){_.completed=G,this.updateGanttRowAppearance(b,_),this.animateGanttRowReorder(v,c),new dh.Notice("\u4E8B\u9879\u72B6\u6001\u66F4\u65B0\u5931\u8D25")}}),_.tag){let H=this.plugin.settings.customTags.find(G=>G.name===_.tag);if(H){let G=S.createDiv({cls:"albus-super-daily-notes-gantt-tag-dot"});G.style.backgroundColor=H.color}}let D=S.createSpan({cls:`albus-super-daily-notes-gantt-label-text ${_.completed?"albus-super-daily-notes-completed":""}`,text:_.description});S.addEventListener("click",()=>{this.openEventModal(_,void 0,t)});let C=b.createDiv({cls:"albus-super-daily-notes-gantt-bar-area"}),M=new Date(_.date);M.setHours(0,0,0,0);let E=_.endDate?new Date(_.endDate):M;E.setHours(0,0,0,0);let L=this.getEventDisplayColor(_),A=M.getFullYear()===i&&M.getMonth()===n?M.getDate():1,P=E.getFullYear()===i&&E.getMonth()===n?E.getDate():o,R=(A-1)/o*100,k=(P-A+1)/o*100,B=A>=(M.getMonth()===n?M.getDate():0),U=P<=(E.getMonth()===n?E.getDate():o+1),F=C.createDiv({cls:`albus-super-daily-notes-gantt-bar ${B?"albus-super-daily-notes-gantt-bar-start":""} ${U?"albus-super-daily-notes-gantt-bar-end":""} ${_.completed?"albus-super-daily-notes-gantt-bar-completed":""}`});F.style.backgroundColor=L,F.style.left=`calc(${R}% + ${B?3:0}px)`,F.style.width=`calc(${k}% - ${(B?3:0)+(U?3:0)}px)`,F.addEventListener("mousedown",H=>{if(H.button!==0||H.target.classList.contains("albus-super-daily-notes-gantt-bar-handle"))return;H.preventDefault(),H.stopPropagation();let Y=!1,rt=H.clientX,st=H.clientY,mt=Kt=>{(Math.abs(Kt.clientX-rt)>5||Math.abs(Kt.clientY-st)>5)&&(Y=!0,document.removeEventListener("mousemove",mt),document.removeEventListener("mouseup",Ht))},Ht=()=>{document.removeEventListener("mousemove",mt),document.removeEventListener("mouseup",Ht),Y||this.openEventModal(_,void 0,t)};document.addEventListener("mousemove",mt),document.addEventListener("mouseup",Ht)}),B&&F.createDiv({cls:"albus-super-daily-notes-gantt-bar-handle albus-super-daily-notes-gantt-bar-handle-left"}).addEventListener("mousedown",G=>{G.preventDefault(),G.stopPropagation(),this.startGanttBarDrag(G,_,"resize-left",C,F,A,P,B,U,o,i,n,t)}),U&&F.createDiv({cls:"albus-super-daily-notes-gantt-bar-handle albus-super-daily-notes-gantt-bar-handle-right"}).addEventListener("mousedown",G=>{G.preventDefault(),G.stopPropagation(),this.startGanttBarDrag(G,_,"resize-right",C,F,A,P,B,U,o,i,n,t)})});let m=3,g=36,y=52;requestAnimationFrame(()=>{let _=a.clientHeight,b=y+f.length*g,S=Math.floor((_-b)/g),w=Math.max(m,S);for(let D=0;D0){let _=a.createDiv({cls:"albus-super-daily-notes-gantt-today-line"});requestAnimationFrame(()=>{let b=this.ganttDragState.headerCells[x-1];if(b){let S=a.getBoundingClientRect(),w=b.getBoundingClientRect(),D=w.left-S.left+w.width/2+a.scrollLeft;_.style.left=`${D}px`}})}}openEventModal(e=null,t,a,i){new Xy(this.app,e,this.plugin.settings.customTags,async o=>{o?e?await this.plugin.taskService.updateEvent(o,e):(await this.plugin.taskService.createEvent(o),this.highlightEventKey=`${o.date}|${o.description}`):e&&await this.plugin.taskService.deleteEvent(e),a&&a()},this.plugin.settings.showOnlyLeafTag,t,i).open()}startGanttHeaderDrag(e,t,a){let i=this.ganttDragState;i.isDragging=!0,i.startDay=e,i.currentDay=e,this.createGanttDragPreview(),this.updateGanttHeaderSelection(),i.mouseMoveHandler=n=>{if(!i.isDragging)return;let o=n.target.closest(".albus-super-daily-notes-gantt-day-header");if(o&&o.dataset.day){let s=parseInt(o.dataset.day);s!==i.currentDay&&(i.currentDay=s,this.updateGanttHeaderSelection())}},i.mouseUpHandler=n=>{if(!i.isDragging)return;i.isDragging=!1,this.clearGanttHeaderSelection(),i.mouseMoveHandler&&document.removeEventListener("mousemove",i.mouseMoveHandler),i.mouseUpHandler&&document.removeEventListener("mouseup",i.mouseUpHandler),i.mouseMoveHandler=null,i.mouseUpHandler=null;let o=Math.min(i.startDay,i.currentDay),s=Math.max(i.startDay,i.currentDay),l=this.currentDate.getFullYear(),u=this.currentDate.getMonth(),c=ne(new Date(l,u,o));if(o===s)this.openEventModal(null,c,a);else{let f=ne(new Date(l,u,s));this.openEventModal(null,c,a,f)}},document.addEventListener("mousemove",i.mouseMoveHandler),document.addEventListener("mouseup",i.mouseUpHandler)}createGanttDragPreview(){let e=this.ganttDragState;if(e.previewEl&&(e.previewEl.remove(),e.previewEl=null),e.headerCells.length===0)return;let t=e.headerCells[0].parentElement;if(!t)return;let a=document.createElement("div");a.className="albus-super-daily-notes-gantt-drag-preview",t.appendChild(a),e.previewEl=a}updateGanttHeaderSelection(){let e=this.ganttDragState,t=Math.min(e.startDay,e.currentDay),a=Math.max(e.startDay,e.currentDay);e.headerCells.forEach(i=>{let n=parseInt(i.dataset.day||"0");n>=t&&n<=a?i.classList.add("albus-super-daily-notes-gantt-header-selected"):i.classList.remove("albus-super-daily-notes-gantt-header-selected")}),this.updateGanttDragPreviewPosition(t,a)}updateGanttDragPreviewPosition(e,t){let a=this.ganttDragState;if(!a.previewEl)return;let i=a.headerCells[e-1],n=a.headerCells[t-1];if(!i||!n)return;let o=a.previewEl.parentElement;if(!o)return;let s=o.getBoundingClientRect(),l=i.getBoundingClientRect(),u=n.getBoundingClientRect(),c=l.left-s.left,f=u.right-l.left;a.previewEl.style.left=`${c}px`,a.previewEl.style.width=`${f}px`}clearGanttHeaderSelection(){let e=this.ganttDragState;e.headerCells.forEach(t=>{t.classList.remove("albus-super-daily-notes-gantt-header-selected")}),e.previewEl&&(e.previewEl.remove(),e.previewEl=null)}startGanttBarDrag(e,t,a,i,n,o,s,l,u,c,f,p,h){let d=this.ganttBarDragState;d.isDragging=!0,d.event=t,d.mode=a,d.startX=e.clientX,d.dayWidth=i.getBoundingClientRect().width/c,d.originalStartDay=o,d.originalEndDay=s,d.currentStartDay=o,d.currentEndDay=s,d.daysInMonth=c,d.year=f,d.month=p,d.barEl=n,d.barArea=i,d.isStartInMonth=l,d.isEndInMonth=u;let v=!1;d.mouseMoveHandler=m=>{if(!d.isDragging)return;let g=m.clientX-d.startX;if(!v&&Math.abs(g)>5&&(v=!0,n.classList.add("albus-super-daily-notes-gantt-bar-dragging")),!v)return;let y=Math.round(g/d.dayWidth);if(d.mode==="resize-left"){let x=Math.max(1,Math.min(d.originalStartDay+y,d.currentEndDay));d.currentStartDay=x}else{let x=Math.max(d.currentStartDay,Math.min(d.originalEndDay+y,d.daysInMonth));d.currentEndDay=x}this.updateGanttBarPosition()},d.mouseUpHandler=async m=>{if(!d.isDragging)return;if(d.isDragging=!1,d.barEl&&d.barEl.classList.remove("albus-super-daily-notes-gantt-bar-dragging"),d.mouseMoveHandler&&document.removeEventListener("mousemove",d.mouseMoveHandler),d.mouseUpHandler&&document.removeEventListener("mouseup",d.mouseUpHandler),d.mouseMoveHandler=null,d.mouseUpHandler=null,!v){this.openEventModal(t,void 0,h);return}if(d.currentStartDay===d.originalStartDay&&d.currentEndDay===d.originalEndDay)return;let g={...t},y=ne(new Date(d.year,d.month,d.currentStartDay)),x=ne(new Date(d.year,d.month,d.currentEndDay)),_={...t,date:d.isStartInMonth?y:t.date,endDate:d.isEndInMonth?x:t.endDate};_.date===_.endDate&&(_.endDate=void 0),this.saveScrollPosition(),await this.plugin.taskService.updateEvent(_,g),this.restoreScrollPosition(),h()},document.addEventListener("mousemove",d.mouseMoveHandler),document.addEventListener("mouseup",d.mouseUpHandler)}updateGanttBarPosition(){let e=this.ganttBarDragState;if(!e.barEl)return;let t=(e.currentStartDay-1)/e.daysInMonth*100,a=(e.currentEndDay-e.currentStartDay+1)/e.daysInMonth*100,i=e.isStartInMonth,n=e.isEndInMonth;e.barEl.style.left=`calc(${t}% + ${i?3:0}px)`,e.barEl.style.width=`calc(${a}% - ${(i?3:0)+(n?3:0)}px)`}async toggleEventStatus(e,t){await this.plugin.taskService.toggleEventStatus(e),t()}updateAllEventElementsAppearance(e){this.contentContainer&&this.contentContainer.querySelectorAll(`[data-event-id="${e.id}"]`).forEach(a=>{this.updateEventElementAppearance(a,e)})}updateEventElementAppearance(e,t){t.completed?e.classList.add("albus-super-daily-notes-completed"):e.classList.remove("albus-super-daily-notes-completed");let a="var(--background-secondary)";if(t.tag){let n=this.plugin.settings.customTags.find(o=>o.name===t.tag);n&&n.color&&(a=n.color)}t.completed&&this.plugin.settings.grayOutCompleted&&(a="#E0E0E0"),e.style.backgroundColor=a,e.style.setProperty("--event-tag-color",a);let i=e.querySelector('input[type="checkbox"]');i&&(i.checked=t.completed)}saveScrollPosition(){this.contentContainer&&(this.scrollPosition=this.contentContainer.scrollTop)}restoreScrollPosition(){this.contentContainer&&this.scrollPosition!==void 0&&requestAnimationFrame(()=>{this.contentContainer&&(this.contentContainer.scrollTop=this.scrollPosition)})}cleanup(){let e=this.ganttDragState;e.mouseMoveHandler&&document.removeEventListener("mousemove",e.mouseMoveHandler),e.mouseUpHandler&&document.removeEventListener("mouseup",e.mouseUpHandler),e.previewEl&&e.previewEl.remove(),e.isDragging=!1,e.headerCells=[],e.mouseMoveHandler=null,e.mouseUpHandler=null,e.previewEl=null}};var UC=require("obsidian");var jy=class{constructor(e,t,a,i){this.habits=[];this.selectedHabit=null;this.completedLookup=new Set;this.app=e,this.plugin=t,this.currentDate=a,this.callbacks=i,this.plugin.settings.habitItems.length>0&&(this.selectedHabit=this.plugin.settings.habitItems[0].name)}setHabits(e){this.habits=e}getCurrentDate(){return this.currentDate}setCurrentDate(e){this.currentDate=e}cleanup(){}rebuildLookup(){if(this.completedLookup.clear(),!!this.selectedHabit)for(let e of this.habits)e.habitName===this.selectedHabit&&e.completed&&this.completedLookup.add(e.date)}renderHeader(e,t){let a=this.plugin.settings.habitItems,i=e.createDiv({cls:"albus-super-daily-notes-planner-mode-group albus-super-daily-notes-planner-mode-group-scrollable"});a.forEach(f=>{i.createEl("button",{text:f.name,cls:`albus-super-daily-notes-view-mode-btn ${this.selectedHabit===f.name?"albus-super-daily-notes-active":""}`}).addEventListener("click",()=>{this.selectedHabit=f.name,t()})});let n=e.createDiv({cls:"albus-super-daily-notes-planner-navigation albus-super-daily-notes-planner-navigation-centered"}),o=n.createEl("button");(0,UC.setIcon)(o,"chevron-left"),o.addEventListener("click",()=>{this.currentDate=new Date(this.currentDate.getFullYear()-1,0,1),t()}),n.createEl("button",{text:`${this.currentDate.getFullYear()}\u5E74`}).addEventListener("click",()=>{new ka(this.app,this.currentDate,f=>{this.currentDate=f,t()}).open()});let l=n.createEl("button");(0,UC.setIcon)(l,"chevron-right"),l.addEventListener("click",()=>{this.currentDate=new Date(this.currentDate.getFullYear()+1,0,1),t()}),e.createDiv({cls:"albus-super-daily-notes-planner-actions"}).createEl("button",{text:"\u4ECA\u5E74"}).addEventListener("click",()=>{this.currentDate=new Date,t()})}renderContent(e,t){e.empty();let a=this.plugin.settings.habitItems;if(a.length===0){e.createDiv({cls:"albus-super-daily-notes-habit-empty",text:"\u8BF7\u5728\u8BBE\u7F6E\u4E2D\u6DFB\u52A0\u6253\u5361\u9879\u76EE"});return}(!this.selectedHabit||!a.find(n=>n.name===this.selectedHabit))&&(this.selectedHabit=a[0].name),this.rebuildLookup();let i=e.createDiv({cls:"albus-super-daily-notes-habit-view"});this.renderYearSummary(i),this.renderYearCalendar(i,t)}renderYearSummary(e){if(!this.selectedHabit)return;let t=this.currentDate.getFullYear(),a=new Date,n=t===a.getFullYear()?Math.floor((a.getTime()-new Date(t,0,1).getTime())/864e5)+1:this.isLeapYear(t)?366:365,o=this.completedLookup.size,s=this.calculateStreak(),l=n>0?Math.round(o/n*100):0,u=e.createDiv({cls:"albus-super-daily-notes-habit-year-summary"}),c=(f,p)=>{let h=u.createDiv({cls:"albus-super-daily-notes-habit-stat"});h.createDiv({cls:"albus-super-daily-notes-habit-stat-value",text:f}),h.createDiv({cls:"albus-super-daily-notes-habit-stat-label",text:p})};c(`${o}`,"\u5DF2\u6253\u5361\u5929\u6570"),c(`${l}%`,"\u5B8C\u6210\u7387"),c(`${s}`,"\u6700\u957F\u8FDE\u7EED\u6253\u5361\u5929\u6570")}renderYearCalendar(e,t){let a=this.currentDate.getFullYear(),i=new Date,n=ne(i),o=i.getTime(),s=e.createDiv({cls:"albus-super-daily-notes-habit-year-grid"});for(let l=0;l<12;l++)this.renderMonth(s,a,l,n,o,t)}renderMonth(e,t,a,i,n,o){let s=e.createDiv({cls:"albus-super-daily-notes-habit-month"}),l=new Date,u=t===l.getFullYear()&&a===l.getMonth();s.createDiv({cls:`albus-super-daily-notes-habit-month-label${u?" is-current":""}`,text:`${a+1}\u6708`});let c=s.createDiv({cls:"albus-super-daily-notes-habit-wkheader"});for(let v of["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u65E5"])c.createDiv({cls:"albus-super-daily-notes-habit-wkday",text:v});let f=s.createDiv({cls:"albus-super-daily-notes-habit-days"}),p=new Date(t,a+1,0).getDate(),h=this.getMondayBasedDay(new Date(t,a,1)),d=String(a+1).padStart(2,"0");for(let v=0;vn,y=m===i,x=this.completedLookup.has(m),_=f.createDiv({cls:"albus-super-daily-notes-habit-day"+(x?" is-done":"")+(y?" is-today":"")+(g?" is-future":"")});_.setText(String(v)),_.dataset.day=String(v)}this.selectedHabit&&(f.addEventListener("click",async v=>{let m=v.target.closest(".albus-super-daily-notes-habit-day:not(.is-empty):not(.is-future)");m!=null&&m.dataset.day&&(await this.plugin.taskService.toggleHabit(new Date(t,a,Number(m.dataset.day)),this.selectedHabit),o())}),f.addEventListener("contextmenu",v=>{let m=v.target.closest(".albus-super-daily-notes-habit-day:not(.is-empty):not(.is-future)");m!=null&&m.dataset.day&&(v.preventDefault(),this.callbacks.openDailyNote(new Date(t,a,Number(m.dataset.day))))}))}getMondayBasedDay(e){let t=e.getDay();return t===0?6:t-1}calculateStreak(){if(this.completedLookup.size===0)return 0;let e=Array.from(this.completedLookup).sort(),t=1,a=1;for(let i=1;it&&(t=a)):a=1}return t}isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}};var Zr=require("obsidian");var $y=require("obsidian");var vh=class extends $y.Modal{constructor(t,a,i,n,o){super(t);this.inlineEditor=null;this.editedContent="";this.entry=a,this.component=new $y.Component,this.taskService=i,this.onSaved=o!=null?o:null,this.editedContent=a.content}onOpen(){this.component.load(),this.modalEl.addClass("albus-super-daily-notes-journal-modal"),this.openEditor()}async openEditor(){let{contentEl:t}=this;t.empty(),t.createDiv({cls:"albus-super-daily-notes-journal-modal-header"}).createEl("h3",{text:this.getDateLabel(),cls:"albus-super-daily-notes-journal-modal-title"});let i=t.createDiv({cls:"albus-super-daily-notes-journal-modal-editor-container"}),n=new Date(this.entry.date),o=await this.taskService.getOrCreateDailyNoteFile(n);this.inlineEditor=new Pa(this.app,i,{value:this.editedContent,file:o,placeholder:"\u5199\u70B9\u4EC0\u4E48...",onChange:s=>{this.editedContent=s}}),setTimeout(()=>{var s;return(s=this.inlineEditor)==null?void 0:s.focus()},50)}getDateLabel(){let t=new Date(this.entry.date);return`${t.getFullYear()}\u5E74${t.getMonth()+1}\u6708${t.getDate()}\u65E5`}async onClose(){if(this.editedContent!==this.entry.content){let t=new Date(this.entry.date);await this.taskService.saveJournal(t,this.editedContent)}this.inlineEditor&&(this.inlineEditor.destroy(),this.inlineEditor=null),this.component.unload(),this.contentEl.empty(),this.onSaved&&this.onSaved()}};var Ky=class{constructor(e,t,a,i){this.viewMode="day";this.monthJournals=[];this.dayJournal=null;this.onThisDayJournals=[];this.journalDateMap=new Map;this.renderComponent=new Zr.Component;this.todayEditor=null;this.todayEditorContent="";this.todayEditMode=!1;this.app=e,this.plugin=t,this.currentDate=a,this.callbacks=i}getCurrentDate(){return this.currentDate}setCurrentDate(e){this.currentDate=e}getViewMode(){return this.viewMode}setMonthJournals(e){this.monthJournals=e,this.journalDateMap.clear();for(let t of e)this.journalDateMap.set(t.date,t)}setDayJournal(e){this.dayJournal=e}setOnThisDayJournals(e){this.onThisDayJournals=e}cleanup(){this.destroyTodayEditor(),this.renderComponent.unload()}async destroyTodayEditor(){this.todayEditor&&(this.dayJournal&&this.todayEditorContent!==this.dayJournal.content?await this.plugin.taskService.saveJournal(this.currentDate,this.todayEditorContent):!this.dayJournal&&this.todayEditorContent.trim().length>0&&await this.plugin.taskService.saveJournal(this.currentDate,this.todayEditorContent),this.todayEditor.destroy(),this.todayEditor=null)}renderHeader(e,t){let a=[{id:"day",label:"\u65E5"},{id:"month",label:"\u6708"}],i={day:"calendar-1",month:"calendar-days"},n=e.createDiv({cls:"albus-super-daily-notes-planner-mode-group"});a.forEach(({id:p,label:h})=>{let d=n.createEl("button",{cls:`albus-super-daily-notes-view-mode-btn ${this.viewMode===p?"albus-super-daily-notes-active":""}`});(0,Zr.setIcon)(d,i[p]),d.createSpan({text:h}),d.addEventListener("click",()=>{this.viewMode=p,t()})});let o=e.createDiv({cls:"albus-super-daily-notes-planner-navigation albus-super-daily-notes-planner-navigation-centered"}),s=o.createEl("button");(0,Zr.setIcon)(s,"chevron-left"),s.addEventListener("click",()=>{this.navigatePrev(),t()}),o.createEl("button",{text:this.getViewTitle()}).addEventListener("click",()=>{new ka(this.app,this.currentDate,p=>{this.currentDate=p,t()}).open()});let u=o.createEl("button");(0,Zr.setIcon)(u,"chevron-right"),u.addEventListener("click",()=>{this.navigateNext(),t()}),e.createDiv({cls:"albus-super-daily-notes-planner-actions"}).createEl("button",{text:this.viewMode==="month"?"\u672C\u6708":"\u4ECA\u5929"}).addEventListener("click",()=>{this.currentDate=new Date,t()})}renderContent(e,t){this.destroyTodayEditor(),this.renderComponent.unload(),this.renderComponent=new Zr.Component,this.renderComponent.load(),requestAnimationFrame(()=>{switch(this.viewMode){case"month":this.renderMonthView(e,t);break;case"day":this.renderDayView(e,t);break}})}getViewTitle(){return this.viewMode==="month"?`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708`:`${this.currentDate.getFullYear()}\u5E74${this.currentDate.getMonth()+1}\u6708${this.currentDate.getDate()}\u65E5`}navigatePrev(){if(this.viewMode==="month"){let e=new Date(this.currentDate);e.setMonth(e.getMonth()-1),this.currentDate=e}else{let e=new Date(this.currentDate);e.setDate(e.getDate()-1),this.currentDate=e}}navigateNext(){if(this.viewMode==="month"){let e=new Date(this.currentDate);e.setMonth(e.getMonth()+1),this.currentDate=e}else{let e=new Date(this.currentDate);e.setDate(e.getDate()+1),this.currentDate=e}}renderMonthView(e,t){let a=Gl(this.currentDate),i=e.createDiv({cls:"albus-super-daily-notes-journal-month-view"}),n=i.createDiv({cls:"albus-super-daily-notes-month-header"});["\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D","\u5468\u65E5"].forEach(s=>{n.createDiv({cls:"albus-super-daily-notes-month-day-header",text:s})});let o=[];for(let s=0;s{let l=i.createDiv({cls:"albus-super-daily-notes-journal-month-week"});s.forEach(u=>{var y;let c=gh(u,this.currentDate),f=u.toDateString()===new Date().toDateString(),p=ne(u),h=this.journalDateMap.get(p),d=(y=h==null?void 0:h.hasContent)!=null?y:!1,v=h&&h.images.length>0,m=l.createDiv({cls:"albus-super-daily-notes-journal-month-day"+(c?" is-current-month":" is-other-month")+(f?" is-today":"")+(d?" has-journal":"")});if(m.createDiv({cls:"albus-super-daily-notes-journal-day-header"}).createEl("span",{cls:"albus-super-daily-notes-journal-day-number"+(f?" is-today-number":""),text:u.getDate().toString()}),v&&c)this.renderCellBackground(m,h.images[0]),m.addClass("has-bg-image");else if(d&&c){let x=m.createDiv({cls:"albus-super-daily-notes-journal-day-preview"}),_=h.content.replace(/!\[\[.*?\]\]/g,"").replace(/!\[.*?\]\(.*?\)/g,"").trim();Zr.MarkdownRenderer.render(this.app,_.substring(0,300),x,"",this.renderComponent)}else if(c&&!d){let x=m.createDiv({cls:"albus-super-daily-notes-journal-day-placeholder"});(0,Zr.setIcon)(x,"plus")}c&&(m.addEventListener("click",()=>{let x=d&&h?h:{date:p,content:"",images:[],hasContent:!1};new vh(this.app,x,this.plugin.taskService,this.plugin.settings.journalTitle,()=>t()).open()}),m.addEventListener("contextmenu",x=>{x.preventDefault(),this.callbacks.openDailyNote(u)}))})})}renderCellBackground(e,t){let a=this.app.metadataCache.getFirstLinkpathDest(t,"");if(a&&a instanceof Zr.TFile){let i=this.app.vault.getResourcePath(a);e.style.backgroundImage=`url('${i}')`}}renderDayView(e,t){let a=e.createDiv({cls:"albus-super-daily-notes-journal-day-view"}),i=ne(this.currentDate),n=a.createDiv({cls:"albus-super-daily-notes-journal-today-section"});this.renderTodayCard(n,i,t);let o=this.onThisDayJournals.filter(l=>l.date!==i),s=a.createDiv({cls:"albus-super-daily-notes-journal-history-section"});if(s.createDiv({cls:"albus-super-daily-notes-journal-section-title",text:"\u5386\u53F2\u4E0A\u7684\u4ECA\u5929"}),o.length>0){let l=s.createDiv({cls:"albus-super-daily-notes-journal-history-grid"});for(let u of o)this.renderHistoryCard(l,u,t)}else s.createDiv({cls:"albus-super-daily-notes-journal-history-empty-text",text:"\u6682\u65E0\u5185\u5BB9"})}renderTodayCard(e,t,a){var u;let i=e.createDiv({cls:"albus-super-daily-notes-journal-card"}),n=i.createDiv({cls:"albus-super-daily-notes-journal-card-header"});n.createDiv({cls:"albus-super-daily-notes-journal-card-title",text:this.currentDate.getFullYear()+"\u5E74"});let o=n.createEl("button",{cls:"albus-super-daily-notes-view-mode-btn"});(0,Zr.setIcon)(o,this.todayEditMode?"book-open":"pencil");let s=i.createDiv({cls:"albus-super-daily-notes-journal-card-content"}),l=this.dayJournal;this.todayEditorContent=(u=l==null?void 0:l.content)!=null?u:"",this.todayEditMode?this.initTodayEditor(s,t):l!=null&&l.hasContent?Zr.MarkdownRenderer.render(this.app,l.content,s,"",this.renderComponent):s.createDiv({cls:"albus-super-daily-notes-journal-card-empty-area",text:"\u6682\u65E0\u5185\u5BB9"}),o.addEventListener("click",async()=>{this.todayEditMode?(await this.destroyTodayEditor(),this.todayEditMode=!1):this.todayEditMode=!0,a()}),i.addEventListener("contextmenu",c=>{c.preventDefault(),this.callbacks.openDailyNote(new Date(t+"T00:00:00"))})}async initTodayEditor(e,t){let a=new Date(t+"T00:00:00"),i=await this.plugin.taskService.getOrCreateDailyNoteFile(a);this.todayEditor=new Pa(this.app,e,{value:this.todayEditorContent,file:i,placeholder:"\u5199\u70B9\u4EC0\u4E48...",onChange:n=>{this.todayEditorContent=n}}),setTimeout(()=>{var n;return(n=this.todayEditor)==null?void 0:n.focus()},50)}renderHistoryCard(e,t,a){let i=e.createDiv({cls:"albus-super-daily-notes-journal-card"});if(i.createDiv({cls:"albus-super-daily-notes-journal-card-header"}).createDiv({cls:"albus-super-daily-notes-journal-card-title",text:`${t.date.substring(0,4)}\u5E74`}),t.hasContent){let o=i.createDiv({cls:"albus-super-daily-notes-journal-card-content"});Zr.MarkdownRenderer.render(this.app,t.content,o,"",this.renderComponent)}else i.createDiv({cls:"albus-super-daily-notes-journal-card-empty-area",text:"\u6682\u65E0\u5185\u5BB9"});i.addEventListener("click",()=>{new vh(this.app,t,this.plugin.taskService,this.plugin.settings.journalTitle,()=>a()).open()}),i.addEventListener("contextmenu",o=>{o.preventDefault(),this.callbacks.openDailyNote(new Date(t.date+"T00:00:00"))})}};var FC=class{constructor(){this.positions=new Map}save(e,t){t&&this.positions.set(e,t.scrollTop)}restore(e,t){if(t){let a=this.positions.get(e);a!==void 0&&requestAnimationFrame(()=>{t.scrollTop=a})}}get(e){return this.positions.get(e)||0}},HC=class{constructor(){this.pendingUpdates=[];this.isScheduled=!1;this.rafId=null}scheduleUpdate(e){this.pendingUpdates.push(e),this.isScheduled||(this.isScheduled=!0,this.rafId=requestAnimationFrame(()=>this.flush()))}scheduleIdleUpdate(e){"requestIdleCallback"in window?window.requestIdleCallback(e,{timeout:100}):setTimeout(e,0)}flush(){let e=this.pendingUpdates;this.pendingUpdates=[],this.isScheduled=!1,this.rafId=null;for(let t of e)t()}cancel(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.pendingUpdates=[],this.isScheduled=!1}},GC=new FC,l5=new HC;var Lc="albus-super-daily-notes-view",Jy=class extends Vl.ItemView{constructor(t,a){super(t);this.currentDate=new Date;this.mainTab="schedule";this.tasks=[];this.events=[];this.habitRecords=[];this.journalEntries=[];this.dayJournal=null;this.onThisDayJournals=[];this.container=null;this.tabBar=null;this.headerContainer=null;this.contentContainer=null;this.scheduleHeaderEl=null;this.statsHeaderEl=null;this.eventsHeaderEl=null;this.habitsHeaderEl=null;this.journalHeaderEl=null;this.scheduleContentEl=null;this.statsContentEl=null;this.eventsContentEl=null;this.habitsContentEl=null;this.journalContentEl=null;this.isRendering=!1;this.currentLoadOperation=null;this.timeIndicatorInterval=null;this.viewsInitialized={schedule:!1,stats:!1,events:!1,habits:!1,journal:!1};this.scheduleView=null;this.statsView=null;this.eventsView=null;this.habitView=null;this.journalView=null;this.plugin=a}getViewType(){return Lc}getDisplayText(){return"Super Daily Notes"}getIcon(){return"calendar-clock"}async onOpen(){let t=this.containerEl.children[1];t.empty(),this.container=t.createDiv({cls:"albus-super-daily-notes-container"}),this.createLayoutStructure(),this.initializeSubViews(),await this.loadAndRender(!1),this.startTimeIndicatorUpdate()}async onClose(){var t,a,i,n,o;this.stopTimeIndicatorUpdate(),this.currentLoadOperation&&(this.currentLoadOperation.cancelled=!0),l5.cancel(),(t=this.scheduleView)==null||t.cleanup(),(a=this.statsView)==null||a.cleanup(),(i=this.eventsView)==null||i.cleanup(),(n=this.habitView)==null||n.cleanup(),(o=this.journalView)==null||o.cleanup()}createLayoutStructure(){if(!this.container)return;let t=this.container.createDiv({cls:"albus-super-daily-notes-planner-shell"});this.tabBar=t.createDiv({cls:"albus-super-daily-notes-planner-main-tabs"}),this.renderMainTabs();let a=t.createDiv({cls:"albus-super-daily-notes-planner-workspace"});this.headerContainer=a.createDiv({cls:"albus-super-daily-notes-planner-header"}),this.scheduleHeaderEl=this.headerContainer.createDiv({cls:"albus-super-daily-notes-subview-header albus-super-daily-notes-schedule-header"}),this.statsHeaderEl=this.headerContainer.createDiv({cls:"albus-super-daily-notes-subview-header albus-super-daily-notes-stats-header"}),this.eventsHeaderEl=this.headerContainer.createDiv({cls:"albus-super-daily-notes-subview-header albus-super-daily-notes-events-header"}),this.habitsHeaderEl=this.headerContainer.createDiv({cls:"albus-super-daily-notes-subview-header albus-super-daily-notes-habits-header"}),this.journalHeaderEl=this.headerContainer.createDiv({cls:"albus-super-daily-notes-subview-header albus-super-daily-notes-journal-header"}),this.contentContainer=a.createDiv({cls:"albus-super-daily-notes-planner-content"}),this.scheduleContentEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-subview-content albus-super-daily-notes-schedule-content"}),this.statsContentEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-subview-content albus-super-daily-notes-stats-content"}),this.eventsContentEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-subview-content albus-super-daily-notes-events-content"}),this.habitsContentEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-subview-content albus-super-daily-notes-habits-content"}),this.journalContentEl=this.contentContainer.createDiv({cls:"albus-super-daily-notes-subview-content albus-super-daily-notes-journal-content"}),this.updateSubViewVisibility()}updateSubViewVisibility(){this.scheduleHeaderEl&&(this.scheduleHeaderEl.style.display=this.mainTab==="schedule"?"flex":"none"),this.statsHeaderEl&&(this.statsHeaderEl.style.display=this.mainTab==="stats"?"flex":"none"),this.eventsHeaderEl&&(this.eventsHeaderEl.style.display=this.mainTab==="events"?"flex":"none"),this.habitsHeaderEl&&(this.habitsHeaderEl.style.display=this.mainTab==="habits"?"flex":"none"),this.journalHeaderEl&&(this.journalHeaderEl.style.display=this.mainTab==="journal"?"flex":"none"),this.scheduleContentEl&&(this.scheduleContentEl.style.display=this.mainTab==="schedule"?"block":"none"),this.statsContentEl&&(this.statsContentEl.style.display=this.mainTab==="stats"?"block":"none"),this.eventsContentEl&&(this.eventsContentEl.style.display=this.mainTab==="events"?"block":"none"),this.habitsContentEl&&(this.habitsContentEl.style.display=this.mainTab==="habits"?"block":"none"),this.journalContentEl&&(this.journalContentEl.style.display=this.mainTab==="journal"?"block":"none")}initializeSubViews(){let t={openDailyNote:a=>this.openDailyNote(a)};this.scheduleView=new Ch(this.app,this.plugin,this.currentDate,t),this.scheduleView.requestAutoScroll(),this.statsView=new Zy(this.app,this.plugin,this.currentDate),this.eventsView=new qy(this.app,this.plugin,this.currentDate,t),this.habitView=new jy(this.app,this.plugin,this.currentDate,t),this.journalView=new Ky(this.app,this.plugin,this.currentDate,t)}validateMainTab(){let t=this.plugin.settings;(this.mainTab==="stats"&&!t.statsEnabled||this.mainTab==="events"&&!t.eventsEnabled||this.mainTab==="habits"&&!t.habitsEnabled||this.mainTab==="journal"&&!t.journalEnabled)&&(this.mainTab="schedule")}async loadAndRender(t=!0){if(this.currentLoadOperation&&(this.currentLoadOperation.cancelled=!0),this.isRendering)return;this.isRendering=!0;let a={cancelled:!1};this.currentLoadOperation=a;try{if(!this.container||(this.validateMainTab(),this.tabBar&&(this.tabBar.empty(),this.renderMainTabs()),t&&this.saveCurrentViewScrollPosition(),this.updateSubViewVisibility(),this.updateCurrentHeader(),await Promise.race([this.loadData(a),new Promise((i,n)=>setTimeout(()=>n(new Error("\u52A0\u8F7D\u8D85\u65F6")),1e4))]),a.cancelled))return;await this.renderCurrentContent(),t&&this.restoreCurrentViewScrollPosition(),this.scheduleBackgroundPreload()}catch(i){a.cancelled||(console.error("Failed to load data:",i),this.showErrorState(i instanceof Error?i.message:"\u52A0\u8F7D\u5931\u8D25"))}finally{this.isRendering=!1,this.currentLoadOperation===a&&(this.currentLoadOperation=null)}}saveCurrentViewScrollPosition(){let t=this.getCurrentContentContainer();t&&GC.save(`content-${this.mainTab}`,t)}restoreCurrentViewScrollPosition(){let t=this.getCurrentContentContainer();t&&GC.restore(`content-${this.mainTab}`,t)}getCurrentContentContainer(){switch(this.mainTab){case"schedule":return this.scheduleContentEl;case"stats":return this.statsContentEl;case"events":return this.eventsContentEl;case"habits":return this.habitsContentEl;case"journal":return this.journalContentEl}}scheduleBackgroundPreload(){if("requestIdleCallback"in window){let t=this.plugin.settings;window.requestIdleCallback(()=>{!this.viewsInitialized.schedule&&this.mainTab!=="schedule"&&this.preloadScheduleView(),t.statsEnabled&&!this.viewsInitialized.stats&&this.mainTab!=="stats"&&this.preloadStatsView(),t.eventsEnabled&&!this.viewsInitialized.events&&this.mainTab!=="events"&&this.preloadEventsView(),t.habitsEnabled&&!this.viewsInitialized.habits&&this.mainTab!=="habits"&&this.preloadHabitView(),t.journalEnabled&&!this.viewsInitialized.journal&&this.mainTab!=="journal"&&this.preloadJournalView()},{timeout:2e3})}}async preloadScheduleView(){if(!(this.viewsInitialized.schedule||!this.scheduleView||!this.scheduleContentEl))try{let t=this.plugin.taskService,a=this.scheduleView.getViewMode(),i=this.scheduleView.getCurrentDate(),n=[];switch(a){case"week":n=await t.loadWeekTasks(fi(i));break;case"month":n=await t.loadMonthTasks(i);break}this.scheduleView.setTasks(n),this.scheduleView.renderContent(this.scheduleContentEl,()=>this.loadAndRender(!0)),this.viewsInitialized.schedule=!0}catch(t){}}async preloadStatsView(){if(!(this.viewsInitialized.stats||!this.statsView||!this.statsContentEl))try{let t=this.plugin.taskService,a=this.statsView.getViewMode(),i=this.statsView.getCurrentDate(),n=[];switch(a){case"day":let o=await t.loadMonthTasks(i),s=ne(i);n=o.filter(l=>l.date===s);break;case"week":n=await t.loadWeekTasks(fi(i));break;case"month":n=await t.loadMonthTasks(i);break;case"year":n=await t.loadYearTasks(i.getFullYear());break}this.statsView.setTasks(n),this.statsView.renderContent(this.statsContentEl),this.viewsInitialized.stats=!0}catch(t){}}async preloadEventsView(){if(!(this.viewsInitialized.events||!this.eventsView||!this.eventsContentEl))try{let t=this.plugin.taskService,a=this.eventsView.getCurrentDate(),i=await t.loadMonthEvents(a);this.eventsView.setEvents(i),this.eventsView.renderContent(this.eventsContentEl,()=>this.loadAndRender(!0)),this.viewsInitialized.events=!0}catch(t){}}async preloadHabitView(){if(!(this.viewsInitialized.habits||!this.habitView||!this.habitsContentEl))try{let t=this.plugin.taskService,a=this.habitView.getCurrentDate(),i=await t.loadYearHabits(a.getFullYear());this.habitView.setHabits(i),this.habitView.renderContent(this.habitsContentEl,()=>this.loadAndRender(!0)),this.viewsInitialized.habits=!0}catch(t){}}async preloadJournalView(){if(!(this.viewsInitialized.journal||!this.journalView||!this.journalContentEl))try{let t=this.plugin.taskService,a=this.journalView.getCurrentDate();if(this.journalView.getViewMode()==="month"){let n=await t.loadMonthJournals(a);this.journalView.setMonthJournals(n)}else{let[n,o]=await Promise.all([t.loadDayJournal(a),t.loadOnThisDayJournals(a)]);this.journalView.setDayJournal(n),this.journalView.setOnThisDayJournals(o)}this.journalView.renderContent(this.journalContentEl,()=>this.loadAndRender(!0)),this.viewsInitialized.journal=!0}catch(t){}}renderMainTabs(){if(!this.tabBar)return;let t=[{id:"schedule",label:"\u65E5\u7A0B\u7BA1\u7406",icon:"calendar-fold"},{id:"stats",label:"\u65E5\u7A0B\u7EDF\u8BA1",icon:"chart-column"},{id:"events",label:"\u4E8B\u9879\u7BA1\u7406",icon:"chart-no-axes-gantt"},{id:"habits",label:"\u4E60\u60EF\u6253\u5361",icon:"calendar-check"},{id:"journal",label:"\u65E5\u5FD7\u7BA1\u7406",icon:"notebook-pen"}],a=this.plugin.settings;t.filter(({id:n})=>n==="stats"?a.statsEnabled:n==="events"?a.eventsEnabled:n==="habits"?a.habitsEnabled:n==="journal"?a.journalEnabled:!0).forEach(({id:n,label:o,icon:s})=>{let l=this.tabBar.createEl("button",{cls:`albus-super-daily-notes-planner-main-tab ${this.mainTab===n?"albus-super-daily-notes-active":""}`,attr:{"aria-label":o}});l.dataset.tab=n,(0,Vl.setIcon)(l,s),l.addEventListener("click",()=>{var u;if(this.mainTab!==n){this.saveCurrentViewScrollPosition();let c=this.mainTab;this.mainTab=n,n==="schedule"&&((u=this.scheduleView)==null?void 0:u.getViewMode())==="week"&&this.scheduleView.requestAutoScroll(),this.updateSubViewVisibility(),this.updateTabBarState(),this.viewsInitialized[n]&&this.restoreCurrentViewScrollPosition(),this.loadAndRender(!0)}})})}updateTabBarState(){if(!this.tabBar)return;this.tabBar.querySelectorAll(".albus-super-daily-notes-planner-main-tab").forEach(a=>{let i=a;i.dataset.tab===this.mainTab?i.classList.add("albus-super-daily-notes-active"):i.classList.remove("albus-super-daily-notes-active")})}updateCurrentHeader(){var a,i,n,o,s;let t=this.getCurrentHeaderContainer();if(t)switch(t.empty(),this.mainTab){case"schedule":(a=this.scheduleView)==null||a.renderHeader(t,()=>{this.viewsInitialized.schedule=!1,this.loadAndRender(!0)});break;case"stats":(i=this.statsView)==null||i.renderHeader(t,()=>{this.viewsInitialized.stats=!1,this.loadAndRender(!0)});break;case"events":(n=this.eventsView)==null||n.renderHeader(t,()=>{this.viewsInitialized.events=!1,this.loadAndRender(!0)});break;case"habits":(o=this.habitView)==null||o.renderHeader(t,()=>{this.viewsInitialized.habits=!1,this.loadAndRender(!0)});break;case"journal":(s=this.journalView)==null||s.renderHeader(t,()=>{this.viewsInitialized.journal=!1,this.loadAndRender(!0)});break}}getCurrentHeaderContainer(){switch(this.mainTab){case"schedule":return this.scheduleHeaderEl;case"stats":return this.statsHeaderEl;case"events":return this.eventsHeaderEl;case"habits":return this.habitsHeaderEl;case"journal":return this.journalHeaderEl}}async loadData(t){let a=this.plugin.taskService;if(!(t&&t.cancelled))switch(this.syncDatesFromSubViews(),this.mainTab){case"schedule":await this.loadScheduleData(a);break;case"stats":await this.loadStatsData(a);break;case"events":await this.loadEventsData(a);break;case"habits":await this.loadHabitsData(a);break;case"journal":await this.loadJournalData(a);break}}syncDatesFromSubViews(){switch(this.mainTab){case"schedule":this.scheduleView&&(this.currentDate=this.scheduleView.getCurrentDate());break;case"stats":this.statsView&&(this.currentDate=this.statsView.getCurrentDate());break;case"events":this.eventsView&&(this.currentDate=this.eventsView.getCurrentDate());break;case"habits":this.habitView&&(this.currentDate=this.habitView.getCurrentDate());break;case"journal":this.journalView&&(this.currentDate=this.journalView.getCurrentDate());break}}async loadScheduleData(t){if(!this.scheduleView)return;switch(this.scheduleView.getViewMode()){case"week":this.tasks=await t.loadWeekTasks(fi(this.currentDate));break;case"month":this.tasks=await t.loadMonthTasks(this.currentDate);break}this.scheduleView.setTasks(this.tasks)}async loadStatsData(t){if(!this.statsView)return;switch(this.statsView.getViewMode()){case"day":let i=await t.loadMonthTasks(this.currentDate),n=ne(this.currentDate);this.tasks=i.filter(s=>s.date===n);break;case"week":let o=fi(this.currentDate);this.tasks=await t.loadWeekTasks(o);break;case"month":this.tasks=await t.loadMonthTasks(this.currentDate);break;case"year":this.tasks=await t.loadYearTasks(this.currentDate.getFullYear());break}this.statsView.setTasks(this.tasks)}async loadEventsData(t){this.eventsView&&(this.events=await t.loadMonthEvents(this.currentDate),this.eventsView.setEvents(this.events))}async loadHabitsData(t){this.habitView&&(this.habitRecords=await t.loadYearHabits(this.currentDate.getFullYear()),this.habitView.setHabits(this.habitRecords))}async loadJournalData(t){if(!this.journalView)return;if(this.journalView.getViewMode()==="month")this.journalEntries=await t.loadMonthJournals(this.currentDate),this.journalView.setMonthJournals(this.journalEntries);else{let[i,n]=await Promise.all([t.loadDayJournal(this.currentDate),t.loadOnThisDayJournals(this.currentDate)]);this.dayJournal=i,this.onThisDayJournals=n,this.journalView.setDayJournal(this.dayJournal),this.journalView.setOnThisDayJournals(this.onThisDayJournals)}}async renderCurrentContent(){var a,i,n;let t=this.getCurrentContentContainer();if(t)switch(this.mainTab!=="stats"&&t.empty(),this.mainTab){case"schedule":(a=this.scheduleView)==null||a.renderContent(t,()=>{this.viewsInitialized.schedule=!1,this.loadAndRender(!0)}),this.viewsInitialized.schedule=!0;break;case"stats":await new Promise(o=>{requestAnimationFrame(()=>{var s;(s=this.statsView)==null||s.renderContent(t),this.viewsInitialized.stats=!0,o()})});break;case"events":(i=this.eventsView)==null||i.renderContent(t,()=>{this.viewsInitialized.events=!1,this.loadAndRender(!0)}),this.viewsInitialized.events=!0;break;case"habits":await new Promise(o=>{requestAnimationFrame(()=>{var s;(s=this.habitView)==null||s.renderContent(t,()=>{this.viewsInitialized.habits=!1,this.loadAndRender(!0)}),this.viewsInitialized.habits=!0,o()})});break;case"journal":(n=this.journalView)==null||n.renderContent(t,()=>{this.viewsInitialized.journal=!1,this.loadAndRender(!0)}),this.viewsInitialized.journal=!0;break}}showErrorState(t){if(!this.contentContainer)return;this.contentContainer.empty();let a=this.contentContainer.createDiv({cls:"albus-super-daily-notes-planner-error"}),i=a.createDiv({cls:"albus-super-daily-notes-planner-error-icon"});(0,Vl.setIcon)(i,"alert-triangle"),a.createDiv({cls:"albus-super-daily-notes-planner-error-text",text:t}),a.createEl("button",{text:"\u91CD\u8BD5",cls:"mod-cta"}).addEventListener("click",()=>{this.isRendering=!1,this.loadAndRender(!1)})}startTimeIndicatorUpdate(){this.timeIndicatorInterval=window.setInterval(()=>{var t;(t=this.scheduleView)==null||t.updateTimeIndicator()},1e3)}stopTimeIndicatorUpdate(){this.timeIndicatorInterval!==null&&(window.clearInterval(this.timeIndicatorInterval),this.timeIndicatorInterval=null)}async openDailyNote(t){let a=this.plugin.taskService.getDailyNoteFile(t);if(a)await this.app.workspace.getLeaf(!1).openFile(a);else{let i=ne(t);if(await this.confirmCreateDailyNote(i)){let o=window.moment(t),s=await(0,u5.createDailyNote)(o);s&&await this.app.workspace.getLeaf(!1).openFile(s)}}}async confirmCreateDailyNote(t){return new Promise(a=>{let i=new Vl.Modal(this.app);i.titleEl.setText("\u521B\u5EFA\u65E5\u8BB0"),i.contentEl.createEl("p",{text:`\u65E5\u671F ${t} \u7684\u65E5\u8BB0\u6587\u4EF6\u4E0D\u5B58\u5728\uFF0C\u662F\u5426\u521B\u5EFA\uFF1F`});let n=i.contentEl.createDiv({cls:"albus-super-daily-notes-modal-button-container"});n.createEl("button",{text:"\u53D6\u6D88"}).addEventListener("click",()=>{i.close(),a(!1)}),n.createEl("button",{text:"\u521B\u5EFA",cls:"mod-cta"}).addEventListener("click",()=>{i.close(),a(!0)}),i.open()})}};var x5=require("obsidian");var ro=require("obsidian"),c5=r=>{let{contentEl:e,plugin:t}=r,a=new ro.SettingGroup(e);a.addSetting(o=>{o.setName("\u65E5\u7A0B\u7EDF\u8BA1").setDesc("\u542F\u7528\u65E5\u7A0B\u7EDF\u8BA1\u6A21\u5757.").addToggle(s=>s.setValue(t.settings.statsEnabled).onChange(async l=>{t.settings.statsEnabled=l,await t.saveSettings()}))}),a.addSetting(o=>{o.setName("\u4E8B\u9879\u7BA1\u7406").setDesc("\u542F\u7528\u4E8B\u9879\u7BA1\u7406\u6A21\u5757.").addToggle(s=>s.setValue(t.settings.eventsEnabled).onChange(async l=>{t.settings.eventsEnabled=l,await t.saveSettings()}))}),a.addSetting(o=>{o.setName("\u4E60\u60EF\u6253\u5361").setDesc("\u542F\u7528\u4E60\u60EF\u6253\u5361\u6A21\u5757.").addToggle(s=>s.setValue(t.settings.habitsEnabled).onChange(async l=>{t.settings.habitsEnabled=l,await t.saveSettings(),r.display()}))}),a.addSetting(o=>{o.setName("\u65E5\u5FD7\u7BA1\u7406").setDesc("\u542F\u7528\u65E5\u5FD7\u7BA1\u7406\u6A21\u5757.").addToggle(s=>s.setValue(t.settings.journalEnabled).onChange(async l=>{t.settings.journalEnabled=l,await t.saveSettings(),r.display()}))}),new ro.Setting(e).setName("\u7BA1\u7406\u5668").setHeading();let i=new ro.SettingGroup(e);i.addSetting(o=>{o.setName("\u65E5\u7A0B\u6807\u9898").setDesc('\u65F6\u95F4\u8F74\u5C06\u4ECE\u65E5\u8BB0\u6587\u4EF6\u4E2D\u7684\u6B64\u6807\u9898\u4E0B\u8BFB\u53D6\u65E5\u7A0B\u8BB0\u5F55. \u5982\u679C\u4E3A\u7A7A, \u5219\u4F7F\u7528\u9ED8\u8BA4\u503C "# \u65E5\u7A0B".').addText(s=>s.setPlaceholder("# \u65E5\u7A0B").setValue(t.settings.scheduleTitle).onChange(async l=>{t.settings.scheduleTitle=l||"# \u65E5\u7A0B",await t.saveSettings()}))}),t.settings.habitsEnabled&&i.addSetting(o=>{o.setName("\u6253\u5361\u6807\u9898").setDesc('\u6253\u5361\u6570\u636E\u5C06\u4ECE\u65E5\u8BB0\u6587\u4EF6\u4E2D\u7684\u6B64\u6807\u9898\u4E0B\u8BFB\u53D6. \u5982\u679C\u4E3A\u7A7A, \u5219\u4F7F\u7528\u9ED8\u8BA4\u503C "# \u6253\u5361".').addText(s=>s.setPlaceholder("# \u6253\u5361").setValue(t.settings.habitTitle).onChange(async l=>{t.settings.habitTitle=l||"# \u6253\u5361",await t.saveSettings()}))}),t.settings.journalEnabled&&i.addSetting(o=>{o.setName("\u65E5\u5FD7\u6807\u9898").setDesc('\u65E5\u5FD7\u5185\u5BB9\u5C06\u4ECE\u65E5\u8BB0\u6587\u4EF6\u4E2D\u7684\u6B64\u6807\u9898\u4E0B\u8BFB\u53D6. \u5982\u679C\u4E3A\u7A7A, \u5219\u4F7F\u7528\u9ED8\u8BA4\u503C "# \u65E5\u5FD7".').addText(s=>s.setPlaceholder("# \u65E5\u5FD7").setValue(t.settings.journalTitle).onChange(async l=>{t.settings.journalTitle=l||"# \u65E5\u5FD7",await t.saveSettings()}))}),i.addSetting(o=>{o.setName("\u6BCF\u65E5\u8D77\u59CB\u65F6\u95F4(\u5C0F\u65F6)").setDesc("\u65F6\u95F4\u8F74\u5C06\u4ECE\u8BE5\u5C0F\u65F6\u5F00\u59CB\u663E\u793A\u4E00\u5929\u7684\u65E5\u7A0B, \u9ED8\u8BA4\u4E3A 8:00. \u8BF7\u8F93\u5165 0-23 \u4E4B\u95F4\u7684\u6574\u6570.").addText(s=>s.setPlaceholder("8").setValue(String(t.settings.dayStartHour)).onChange(async l=>{let u=parseInt(l);!isNaN(u)&&u>=0&&u<=23&&(t.settings.dayStartHour=u,await t.saveSettings())}))}),i.addSetting(o=>{o.setName("\u7070\u8272\u5316\u5DF2\u5B8C\u6210\u65E5\u7A0B").setDesc("\u5F00\u542F\u540E, \u5DF2\u5B8C\u6210\u7684\u65E5\u7A0B\u5C06\u663E\u793A\u4E3A\u7070\u8272; \u5173\u95ED\u540E, \u5DF2\u5B8C\u6210\u65E5\u7A0B\u5C06\u4FDD\u6301\u539F\u6709\u7684\u5F69\u8272\u6837\u5F0F.").addToggle(s=>s.setValue(t.settings.grayOutCompleted).onChange(async l=>{t.settings.grayOutCompleted=l,await t.saveSettings()}))}),i.addSetting(o=>{o.setName("\u62D6\u62FD\u5BF9\u9F50\u6A21\u5F0F").setDesc("\u7CBE\u786E\u6A21\u5F0F: \u53EF\u4EE5\u7CBE\u786E\u62D6\u62FD\u5230\u6BCF 1 \u5206\u949F. \u6574\u70B9\u6A21\u5F0F: \u4EE5 5 \u5206\u949F\u4E3A\u6700\u5C0F\u5355\u4F4D, \u8D77\u70B9\u5BF9\u9F50\u5230\u6574\u70B9\u6216\u534A\u70B9.").addDropdown(s=>s.addOption("precise","\u7CBE\u786E\u6A21\u5F0F").addOption("round","\u6574\u70B9\u6A21\u5F0F").setValue(t.settings.dragSnapMode).onChange(async l=>{t.settings.dragSnapMode=l,await t.saveSettings()}))}),i.addSetting(o=>{o.setName("\u53EA\u663E\u793A\u6700\u5E95\u5C42\u6807\u7B7E").setDesc("\u5F00\u542F\u540E, \u5C42\u7EA7\u6807\u7B7E(\u5982#\u65E5\u7A0B/\u5DE5\u4F5C)\u5C06\u53EA\u663E\u793A\u6700\u5E95\u5C42\u7684\u6807\u7B7E\u540D\u79F0(\u5DE5\u4F5C); \u5173\u95ED\u540E\u663E\u793A\u5B8C\u6574\u6807\u7B7E.").addToggle(s=>s.setValue(t.settings.showOnlyLeafTag).onChange(async l=>{t.settings.showOnlyLeafTag=l,await t.saveSettings()}))}),i.addSetting(o=>{o.setName("\u5361\u7247\u6837\u5F0F").setDesc("\u5168\u5F69\u6837\u5F0F: \u5361\u7247\u80CC\u666F\u4F7F\u7528\u6807\u7B7E\u989C\u8272. \u7B80\u7EA6\u6837\u5F0F: \u5361\u7247\u80CC\u666F\u7EDF\u4E00, \u6807\u7B7E\u989C\u8272\u663E\u793A\u5728\u5DE6\u4FA7\u8FB9\u6846.").addDropdown(s=>s.addOption("colorful","\u5168\u5F69\u6837\u5F0F").addOption("minimal","\u7B80\u7EA6\u6837\u5F0F").setValue(t.settings.cardStyle).onChange(async l=>{t.settings.cardStyle=l,await t.saveSettings()}))}),new ro.Setting(e).setName("\u6807\u7B7E").setHeading();let n=new ro.SettingGroup(e);if(t.settings.customTags.length===0&&n.addSetting(o=>{o.setName("\u8FD8\u6CA1\u6709\u6DFB\u52A0\u4EFB\u4F55\u6807\u7B7E").setDesc("\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u5F00\u59CB\u521B\u5EFA")}),t.settings.customTags.forEach((o,s)=>{n.addSetting(l=>{l.settingEl.addClass("albus-super-daily-notes-setting-list-row"),l.setName(`\u6807\u7B7E ${s+1}`).addText(u=>u.setPlaceholder("\u6807\u7B7E\u540D\u79F0").setValue(o.name).onChange(async c=>{t.settings.customTags[s].name=c,await t.saveSettings()})).addColorPicker(u=>u.setValue(o.color).onChange(async c=>{t.settings.customTags[s].color=c,await t.saveSettings()})),l.addExtraButton(u=>u.setIcon("trash").setTooltip("\u5220\u9664\u6807\u7B7E").onClick(async()=>{t.settings.customTags.splice(s,1),await t.saveSettings(),r.display()}))})}),n.addSetting(o=>{o.settingEl.addClass("albus-super-daily-notes-item-add-setting"),o.controlEl.addClass("albus-super-daily-notes-item-add-container"),o.addButton(s=>s.setButtonText("\u6DFB\u52A0\u65B0\u6807\u7B7E").setClass("albus-super-daily-notes-item-add-btn").onClick(async()=>{t.settings.customTags.push({name:"\u65B0\u6807\u7B7E",color:"#CCCCCC"}),await t.saveSettings(),r.display()}))}),t.settings.habitsEnabled){new ro.Setting(e).setName("\u6253\u5361").setHeading();let o=new ro.SettingGroup(e);t.settings.habitItems.length===0&&o.addSetting(s=>{s.setName("\u8FD8\u6CA1\u6709\u6DFB\u52A0\u4EFB\u4F55\u6253\u5361\u9879\u76EE").setDesc("\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u5F00\u59CB\u521B\u5EFA")}),t.settings.habitItems.forEach((s,l)=>{o.addSetting(u=>{u.settingEl.addClass("albus-super-daily-notes-setting-list-row"),u.setName(`\u6253\u5361\u9879 ${l+1}`).addText(c=>c.setPlaceholder("\u540D\u79F0").setValue(s.name).onChange(async f=>{t.settings.habitItems[l].name=f,await t.saveSettings()})),u.addExtraButton(c=>c.setIcon("trash").setTooltip("\u5220\u9664\u6253\u5361\u9879").onClick(async()=>{t.settings.habitItems.splice(l,1),await t.saveSettings(),r.display()}))})}),o.addSetting(s=>{s.settingEl.addClass("albus-super-daily-notes-item-add-setting"),s.controlEl.addClass("albus-super-daily-notes-item-add-container"),s.addButton(l=>l.setButtonText("\u6DFB\u52A0\u65B0\u6253\u5361\u9879").setClass("albus-super-daily-notes-item-add-btn").onClick(async()=>{t.settings.habitItems.push({name:"\u65B0\u4E60\u60EF"}),await t.saveSettings(),r.display()}))})}};var f5=require("obsidian");var ir=require("obsidian");var Ic=class Ic extends ir.Component{constructor(t,a){super();this.timerInterval=null;this.isDragging=!1;this.hasDragged=!1;this.dragStartPos={x:0,y:0};this.dragOffset={x:0,y:0};this.isMenuOpen=!1;this.audioContext=null;this.mouseMoveHandler=null;this.mouseUpHandler=null;this.clickOutsideHandler=null;this.resizeHandler=null;this.activeMenuMode=null;this.radialEditorWrapper=null;this.radialEditor=null;this.contextInputEl=null;this.contextMenu=null;this.shouldPlayContextCloseSound=!1;this.suppressNextBallClick=!1;if(!a.isLicensed())throw new Error("FloatingTimer requires a valid license");this.app=t,this.plugin=a,this.state={isActive:!1,isPaused:!1,currentTag:"",segments:[],description:""},this.initAudioContext(),this.createFloatingBall()}initAudioContext(){(typeof AudioContext!="undefined"||typeof window.webkitAudioContext!="undefined")&&(this.audioContext=new(window.AudioContext||window.webkitAudioContext))}playSound(t){if(!(!this.plugin.settings.floatingTimerAudioEnabled||!this.audioContext))try{this.audioContext.state==="suspended"&&this.audioContext.resume();let a=this.audioContext.createOscillator(),i=this.audioContext.createGain(),n=.3;switch(a.connect(i),i.connect(this.audioContext.destination),t){case"start":a.type="sine",a.frequency.setValueAtTime(523.25,this.audioContext.currentTime),a.frequency.setValueAtTime(659.25,this.audioContext.currentTime+.1),a.frequency.setValueAtTime(783.99,this.audioContext.currentTime+.2),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.1),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.2),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.5),a.start(),a.stop(this.audioContext.currentTime+.5);break;case"pause":a.type="sine",a.frequency.setValueAtTime(783.99,this.audioContext.currentTime),a.frequency.setValueAtTime(659.25,this.audioContext.currentTime+.1),a.frequency.setValueAtTime(523.25,this.audioContext.currentTime+.2),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.1),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.2),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.5),a.start(),a.stop(this.audioContext.currentTime+.5);break;case"reset":a.type="triangle",a.frequency.setValueAtTime(292,this.audioContext.currentTime),a.frequency.setValueAtTime(323.25,this.audioContext.currentTime+.15),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime+.15),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.4),a.start(),a.stop(this.audioContext.currentTime+.4);break;case"complete":a.type="sine",a.frequency.setValueAtTime(523.25,this.audioContext.currentTime),a.frequency.setValueAtTime(659.25,this.audioContext.currentTime+.1),a.frequency.setValueAtTime(783.99,this.audioContext.currentTime+.2),a.frequency.setValueAtTime(1046.5,this.audioContext.currentTime+.3),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.1),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.2),i.gain.setValueAtTime(.4*n,this.audioContext.currentTime+.3),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.8),a.start(),a.stop(this.audioContext.currentTime+.8);break;case"click":a.type="sine",a.frequency.setValueAtTime(659.25,this.audioContext.currentTime),a.frequency.setValueAtTime(783.99,this.audioContext.currentTime+.08),i.gain.setValueAtTime(.35*n,this.audioContext.currentTime),i.gain.setValueAtTime(.35*n,this.audioContext.currentTime+.08),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.25),a.start(),a.stop(this.audioContext.currentTime+.25);break;case"open":a.type="sine",a.frequency.setValueAtTime(523.25,this.audioContext.currentTime),a.frequency.setValueAtTime(659.25,this.audioContext.currentTime+.1),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime+.1),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.3),a.start(),a.stop(this.audioContext.currentTime+.3);break;case"close":a.type="sine",a.frequency.setValueAtTime(659.25,this.audioContext.currentTime),a.frequency.setValueAtTime(523.25,this.audioContext.currentTime+.1),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime),i.gain.setValueAtTime(.3*n,this.audioContext.currentTime+.1),i.gain.exponentialRampToValueAtTime(.01,this.audioContext.currentTime+.3),a.start(),a.stop(this.audioContext.currentTime+.3);break}}catch(a){console.error("\u64AD\u653E\u97F3\u6548\u5931\u8D25:",a)}}onload(){}onunload(){this.stopTimer(),this.destroyRadialEditor(),this.mouseMoveHandler&&document.removeEventListener("mousemove",this.mouseMoveHandler),this.mouseUpHandler&&document.removeEventListener("mouseup",this.mouseUpHandler),this.clickOutsideHandler&&document.removeEventListener("click",this.clickOutsideHandler),this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.contextMenu&&(this.shouldPlayContextCloseSound=!1,this.contextMenu.hide(),this.contextMenu=null),this.containerEl&&this.containerEl.parentNode&&this.containerEl.remove(),this.audioContext&&this.audioContext.state!=="closed"&&this.audioContext.close()}createFloatingBall(){this.containerEl=document.body.createDiv({cls:"albus-super-daily-notes-floating-timer-container"});let t=this.containerEl.createDiv({cls:"albus-super-daily-notes-floating-timer-main-area"});this.ballEl=t.createDiv({cls:"albus-super-daily-notes-floating-timer-display"});let a=this.ballEl.createDiv({cls:"albus-super-daily-notes-floating-timer-text"});a.textContent="00:00";let i=this.ballEl.createDiv({cls:"albus-super-daily-notes-floating-timer-tag"});i.textContent="\u672A\u5F00\u59CB",this.ballEl.createDiv({cls:"albus-super-daily-notes-floating-timer-start-time"}),t.addEventListener("mousedown",this.onBallMouseDown.bind(this)),this.mouseMoveHandler=this.onDocumentMouseMove.bind(this),this.mouseUpHandler=this.onDocumentMouseUp.bind(this),this.ballEl.addEventListener("click",this.onBallClick.bind(this)),this.ballEl.addEventListener("contextmenu",this.onBallRightClick.bind(this)),this.createPermanentControls(t),this.createMenu(),this.setInitialPosition(),this.resizeHandler=this.onWindowResize.bind(this),this.resizeHandler&&window.addEventListener("resize",this.resizeHandler)}onWindowResize(){if(!this.containerEl)return;let t=this.containerEl.getBoundingClientRect(),a=this.containerEl.classList.contains("albus-super-daily-notes-snapped-right"),i=this.containerEl.classList.contains("albus-super-daily-notes-snapped-bottom");if(a||i)return;let n=!1,o=t.left,s=t.top;t.right>window.innerWidth&&(o=Math.max(0,window.innerWidth-t.width),n=!0),t.bottom>window.innerHeight&&(s=Math.max(0,window.innerHeight-t.height),n=!0),n&&(this.containerEl.style.left=`${o}px`,this.containerEl.style.top=`${s}px`,this.savePosition())}setInitialPosition(){let t=this.plugin.settings.floatingTimerPosition;if(t){let a=window.innerWidth-80,i=window.innerHeight-80,n=Math.max(0,Math.min(t.x,a)),o=Math.max(0,Math.min(t.y,i));this.containerEl.style.left=`${n}px`,this.containerEl.style.top=`${o}px`,this.containerEl.style.right="auto",this.containerEl.style.bottom="auto",requestAnimationFrame(()=>this.snapToEdgeIfNeeded())}else this.containerEl.style.right="20px",this.containerEl.style.bottom="20px",requestAnimationFrame(()=>this.snapToEdgeIfNeeded())}onBallMouseDown(t){if(t.button===0&&this.isMenuOpen&&this.activeMenuMode==="context"){t.preventDefault(),t.stopPropagation(),this.suppressNextBallClick=!0,this.closeMenu({playSound:!0});return}if(t.target.closest(".albus-super-daily-notes-floating-timer-control-btn"))return;t.preventDefault(),this.isDragging=!0,this.hasDragged=!1,this.dragStartPos.x=t.clientX,this.dragStartPos.y=t.clientY;let i=this.containerEl.getBoundingClientRect();this.dragOffset.x=t.clientX-i.left,this.dragOffset.y=t.clientY-i.top,this.ballEl.style.cursor="grabbing",this.mouseMoveHandler&&document.addEventListener("mousemove",this.mouseMoveHandler),this.mouseUpHandler&&document.addEventListener("mouseup",this.mouseUpHandler)}onDocumentMouseMove(t){if(!this.isDragging)return;let a=Math.abs(t.clientX-this.dragStartPos.x),i=Math.abs(t.clientY-this.dragStartPos.y);if((a>5||i>5)&&(this.hasDragged||this.expandFromEdge(),this.hasDragged=!0),!this.hasDragged)return;let n=t.clientX-this.dragOffset.x,o=t.clientY-this.dragOffset.y,s=window.innerWidth-80,l=window.innerHeight-80,u=Math.max(0,Math.min(n,s)),c=Math.max(0,Math.min(o,l));this.containerEl.style.left=`${u}px`,this.containerEl.style.top=`${c}px`,this.containerEl.style.right="auto",this.containerEl.style.bottom="auto",this.checkEdgeProximity(u,c)}checkEdgeProximity(t,a){let i=this.containerEl.getBoundingClientRect(),n=Ic.SNAP_THRESHOLD;this.containerEl.classList.remove("albus-super-daily-notes-near-edge");let o=t{s.stopPropagation(),this.toggleTimer()}),(0,ir.setIcon)(i,"play");let n=a.createDiv({cls:"albus-super-daily-notes-floating-timer-control-btn albus-super-daily-notes-floating-timer-control-reset"});n.addEventListener("click",s=>{s.stopPropagation(),this.resetTimer()}),(0,ir.setIcon)(n,"rotate-ccw");let o=a.createDiv({cls:"albus-super-daily-notes-floating-timer-control-btn albus-super-daily-notes-floating-timer-control-complete"});o.addEventListener("click",s=>{s.stopPropagation(),this.completeTimer()}),(0,ir.setIcon)(o,"check")}createMenu(){this.menuEl=this.containerEl.createDiv({cls:"albus-super-daily-notes-floating-timer-menu"}),this.menuEl.style.display="none";let t=this.menuEl.createDiv({cls:"albus-super-daily-notes-floating-timer-input-container"});this.radialEditorWrapper=t.createDiv({cls:"albus-super-daily-notes-floating-timer-input"}),this.radialEditorWrapper.addEventListener("mousedown",n=>n.stopPropagation()),this.radialEditorWrapper.addEventListener("click",n=>n.stopPropagation()),this.menuEl.createDiv({cls:"albus-super-daily-notes-floating-timer-confirm-container"}).createEl("button",{cls:"albus-super-daily-notes-floating-timer-confirm-btn",text:"\u786E\u8BA4"}).addEventListener("click",n=>{n.stopPropagation(),this.closeMenu({playSound:!0})}),this.clickOutsideHandler||(this.clickOutsideHandler=n=>{this.isMenuOpen&&this.activeMenuMode==="radial"&&!this.containerEl.contains(n.target)&&this.closeMenu({playSound:!0})},document.addEventListener("click",this.clickOutsideHandler))}openMenu(){var u;if(!this.menuEl)return;this.isMenuOpen=!0;let t=this.containerEl.getBoundingClientRect(),a=(u=this.plugin.settings.floatingTimerExpandRadius)!=null?u:140,i=t.left,n=window.innerWidth-t.right,o=t.top,s=window.innerHeight-t.bottom;Math.min(i,n,o,s)i.remove()),this.menuEl.style.left="",this.menuEl.style.right="",this.menuEl.style.top="",this.menuEl.style.bottom="",this.menuEl.style.transform="",this.menuEl.style.marginLeft="",this.menuEl.style.marginRight="",this.menuEl.style.marginTop="",this.menuEl.style.marginBottom="",this.setRadialMenuOpenState(!0),this.createTagButtons(),this.destroyRadialEditor(),this.radialEditorWrapper&&(this.radialEditor=new Pa(this.app,this.radialEditorWrapper,{value:this.state.description||"",singleLineAutoGrow:!0,onChange:i=>{this.state.description=i}})),(a=this.radialEditor)==null||a.focus()}openContextMenu(){let t=new ir.Menu;this.contextMenu&&(this.shouldPlayContextCloseSound=!1,this.contextMenu.hide()),this.contextMenu=t,this.shouldPlayContextCloseSound=!0;let a=t.dom;a&&a.addClass("albus-super-daily-notes-timer-menu");let i=this.plugin.settings.customTags||[];t.addItem(u=>{let c=u.dom,f=document.createElement("div");f.className="albus-super-daily-notes-menu-input-container";let p=document.createElement("input");p.type="text",p.value=this.state.description||"",p.placeholder="\u8F93\u5165\u65E5\u7A0B\u63CF\u8FF0...",p.className="albus-super-daily-notes-menu-input",this.contextInputEl=p,p.addEventListener("mousedown",h=>h.stopPropagation()),p.addEventListener("click",h=>h.stopPropagation()),p.addEventListener("keydown",h=>{if(h.key==="Enter"||h.key==="Escape"){h.preventDefault(),h.stopPropagation(),this.closeMenu({playSound:!0});return}h.stopPropagation()}),p.addEventListener("input",h=>{this.state.description=h.target.value,this.syncDescriptionInputs()}),f.appendChild(p),c&&(c.addClass("albus-super-daily-notes-menu-input-item"),c.empty(),c.appendChild(f)),u.setTitle("")}),t.addSeparator(),i.forEach(u=>{t.addItem(c=>{c.setTitle(this.getTagDisplayName(u.name)).setIcon("tag").onClick(()=>{this.selectTag(u.name,!1),this.closeMenu({playSound:!0})}),u.name===this.state.currentTag&&c.setChecked(!0)})});let n=this.containerEl.getBoundingClientRect(),o=n.left+n.width/2,s=n.top+n.height/2,l=new MouseEvent("contextmenu",{clientX:o,clientY:s,bubbles:!0,cancelable:!0,view:window});t.showAtMouseEvent(l),t.onHide(()=>{if(this.contextMenu!==t)return;let u=this.shouldPlayContextCloseSound;this.contextMenu=null,this.contextInputEl=null,this.shouldPlayContextCloseSound=!1,this.isMenuOpen=!1,this.activeMenuMode=null,this.setRadialMenuOpenState(!1),u&&this.playSound("close")})}closeMenu(t){var a,i;if(this.isMenuOpen){if(this.activeMenuMode==="context"){this.shouldPlayContextCloseSound=(a=t==null?void 0:t.playSound)!=null?a:!0,(i=this.contextMenu)==null||i.hide();return}this.menuEl&&(t!=null&&t.playSound&&this.playSound("close"),this.isMenuOpen=!1,this.activeMenuMode=null,this.destroyRadialEditor(),this.menuEl.classList.add("albus-super-daily-notes-closing"),setTimeout(()=>{this.isMenuOpen||(this.setRadialMenuOpenState(!1),this.containerEl.classList.remove("albus-super-daily-notes-menu-open"),this.menuEl.classList.remove("albus-super-daily-notes-closing"))},300))}}destroyRadialEditor(){this.radialEditor&&(this.radialEditor.destroy(),this.radialEditor=null)}createTagButtons(){let t=this.plugin.settings.customTags||[],a=t.length;t.forEach((i,n)=>{let o=this.menuEl.createDiv({cls:"albus-super-daily-notes-floating-timer-btn albus-super-daily-notes-floating-timer-btn-tag",attr:{"aria-label":this.getTagDisplayName(i.name)}});o.style.setProperty("--task-color",i.color),o.style.backgroundColor=i.color;let s=o.createDiv({cls:"albus-super-daily-notes-floating-timer-btn-icon"}),l=this.getTagDisplayName(i.name);s.textContent=l.charAt(0);let u=this.calculateButtonPosition(n,a);o.style.setProperty("--x",`${u.x}px`),o.style.setProperty("--y",`${u.y}px`),o.style.setProperty("--delay",`${n*.05}s`),i.name===this.state.currentTag&&o.classList.add("albus-super-daily-notes-selected"),o.addEventListener("click",c=>{c.stopPropagation(),this.selectTag(i.name),this.menuEl.querySelectorAll(".albus-super-daily-notes-floating-timer-btn-tag").forEach(p=>p.classList.remove("albus-super-daily-notes-selected")),o.classList.add("albus-super-daily-notes-selected")})})}setRadialMenuOpenState(t){this.menuEl&&(this.containerEl.classList.toggle("albus-super-daily-notes-menu-open",t),this.menuEl.style.display=t?"block":"none")}syncDescriptionInputs(){this.contextInputEl&&this.contextInputEl.value!==this.state.description&&(this.contextInputEl.value=this.state.description)}clearDescriptionInputs(){this.destroyRadialEditor(),this.contextInputEl&&(this.contextInputEl.value="")}calculateButtonPosition(t,a){var o;let i=(o=this.plugin.settings.floatingTimerExpandRadius)!=null?o:140,n=t/a*Math.PI*2-Math.PI/2;return{x:Math.cos(n)*i,y:Math.sin(n)*i}}updateExpandRadius(t){this.isMenuOpen&&(this.closeMenu(),setTimeout(()=>{this.openMenu()},350))}toggleTimer(){if(!this.state.currentTag){new ir.Notice("\u8BF7\u5148\u9009\u62E9\u4E00\u4E2A\u65E5\u7A0B\u6807\u7B7E"),this.playSound("click");return}if(!this.state.isActive)this.state.isActive=!0,this.state.isPaused=!1,this.state.segments.push({startTime:new Date,endTime:null}),this.ballEl.classList.add("albus-super-daily-notes-timing"),this.startTimer(),this.playSound("start"),new ir.Notice(this.state.segments.length===1?"\u5F00\u59CB\u8BA1\u65F6":"\u7EE7\u7EED\u8BA1\u65F6");else{let t=this.state.segments[this.state.segments.length-1];t&&!t.endTime&&(t.endTime=new Date),this.state.isActive=!1,this.state.isPaused=!0,this.ballEl.classList.remove("albus-super-daily-notes-timing"),this.stopTimer(),this.playSound("pause"),new ir.Notice("\u5DF2\u6682\u505C")}this.updateBallDisplay(),this.updateControlButtons()}resetTimer(){this.stopTimer(),this.state.isActive=!1,this.state.isPaused=!1,this.state.segments=[],this.state.description="",this.ballEl.classList.remove("albus-super-daily-notes-timing"),this.clearDescriptionInputs(),this.playSound("reset"),this.updateBallDisplay(),this.updateControlButtons(),new ir.Notice("\u8BA1\u65F6\u5668\u5DF2\u91CD\u7F6E")}updateControlButtons(){let t=this.containerEl.querySelector(".albus-super-daily-notes-floating-timer-control-start");t&&(this.state.isActive?((0,ir.setIcon)(t,"pause"),t.setAttribute("aria-label","\u6682\u505C")):((0,ir.setIcon)(t,"play"),t.setAttribute("aria-label","\u5F00\u59CB")))}async completeTimer(){if(this.state.segments.length===0||!this.state.currentTag){new ir.Notice("\u6CA1\u6709\u6B63\u5728\u8FDB\u884C\u7684\u8BA1\u65F6"),this.playSound("click");return}this.stopTimer(),this.playSound("complete");let t=this.state.segments[this.state.segments.length-1];t&&!t.endTime&&(t.endTime=new Date),await this.logTimerSegments(this.state.segments),this.state.isActive=!1,this.state.isPaused=!1,this.state.segments=[],this.state.description="",this.ballEl.classList.remove("albus-super-daily-notes-timing"),this.clearDescriptionInputs(),this.updateBallDisplay(),this.updateControlButtons()}startTimer(){this.stopTimer(),this.timerInterval=window.setInterval(()=>{this.updateBallDisplay()},1e3)}stopTimer(){this.timerInterval&&(window.clearInterval(this.timerInterval),this.timerInterval=null)}selectTag(t,a=!0){this.state.currentTag=t,a&&this.playSound("click"),this.syncDescriptionInputs(),this.updateBallDisplay()}updateBallDisplay(){var n;let t=this.ballEl.querySelector(".albus-super-daily-notes-floating-timer-text"),a=this.ballEl.querySelector(".albus-super-daily-notes-floating-timer-tag"),i=this.ballEl.querySelector(".albus-super-daily-notes-floating-timer-start-time");if(t&&(t.textContent=this.formatTime(this.getTotalElapsedSeconds())),a&&(this.state.currentTag?a.textContent=this.getTagDisplayName(this.state.currentTag):a.textContent="\u672A\u5F00\u59CB"),i)if(this.state.segments.length>0){let o=this.state.segments[0].startTime;i.textContent=this.formatTimeToHHMM(o)+" \u5F00\u59CB"}else i.textContent="";if(this.state.currentTag){let o=(n=this.plugin.settings.customTags)==null?void 0:n.find(s=>s.name===this.state.currentTag);o&&(this.ballEl.style.backgroundColor=o.color)}else this.ballEl.style.backgroundColor="";this.state.isActive?this.ballEl.classList.add("albus-super-daily-notes-active"):this.ballEl.classList.remove("albus-super-daily-notes-active")}getTotalElapsedSeconds(){var i;let t=new Date,a=0;for(let n of this.state.segments){let o=(i=n.endTime)!=null?i:t;a+=Math.floor((o.getTime()-n.startTime.getTime())/1e3)}return Math.max(0,a)}formatTime(t){let a=Math.floor(t/60),i=t%60;return`${a.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}formatTimeToHHMM(t){let a=t.getHours().toString().padStart(2,"0"),i=t.getMinutes().toString().padStart(2,"0");return`${a}:${i}`}getTagDisplayName(t){return t?t.includes("/")&&t.split("/").pop()||t:""}async logTimerSegments(t){var a;try{let i=this.state.description.trim()||"(\u81EA\u52A8\u8BA1\u65F6)",n=this.plugin.taskService;for(let l of t){let u=l.startTime,c=(a=l.endTime)!=null?a:new Date;await this.logSingleSegment(n,u,c,i)}let o=t.length,s=this.getTagDisplayName(this.state.currentTag);o===1?new ir.Notice(`"${s}" \u8BA1\u65F6\u5DF2\u8BB0\u5F55`):new ir.Notice(`"${s}" \u8BA1\u65F6\u5DF2\u8BB0\u5F55 (${o} \u4E2A\u65F6\u95F4\u6BB5)`)}catch(i){console.error("\u8BB0\u5F55\u8BA1\u65F6\u5931\u8D25:",i),new ir.Notice("\u8BB0\u5F55\u8BA1\u65F6\u5931\u8D25")}}async logSingleSegment(t,a,i,n){let o=this.formatTimeToHHMM(a),s=this.formatTimeToHHMM(i),l=a.toDateString(),u=i.toDateString();if(l!==u){let p={id:"",date:this.formatDateStr(a),startTime:o,endTime:"23:59",tag:this.state.currentTag,description:n,completed:!0};await t.createTask(p,!0);let d={id:"",date:this.formatDateStr(i),startTime:"00:00",endTime:s,tag:this.state.currentTag,description:n,completed:!0};await t.createTask(d,!0)}else{let p={id:"",date:this.formatDateStr(i),startTime:o,endTime:s,tag:this.state.currentTag,description:n,completed:!0};await t.createTask(p,!0)}}formatDateStr(t){let a=t.getFullYear(),i=(t.getMonth()+1).toString().padStart(2,"0"),n=t.getDate().toString().padStart(2,"0");return`${a}-${i}-${n}`}};Ic.SNAP_THRESHOLD=50,Ic.SNAP_OFFSET=8;var Pc=Ic;var p5=r=>{let{contentEl:e,plugin:t,app:a}=r,i=new f5.SettingGroup(e);i.addSetting(n=>{n.setName("\u542F\u7528\u60AC\u6D6E\u8BA1\u65F6\u5668").setDesc("\u5F00\u542F\u540E, \u5728 Obsidian \u9875\u9762\u4E0A\u663E\u793A\u4E00\u4E2A\u53EF\u62D6\u52A8\u7684\u60AC\u6D6E\u8BA1\u65F6\u5668.").addToggle(o=>{var s;return o.setValue((s=t.settings.floatingTimerEnabled)!=null?s:!0).onChange(async l=>{t.settings.floatingTimerEnabled=l,await t.saveSettings(),l&&!t.floatingTimer&&t.isLicensed()?(t.floatingTimer=new Pc(a,t),t.floatingTimer&&t.floatingTimer.load()):!l&&t.floatingTimer&&(t.floatingTimer.unload(),t.floatingTimer=null)})})}),i.addSetting(n=>{n.setName("\u542F\u7528\u97F3\u6548").setDesc("\u5F00\u542F\u540E, \u8BA1\u65F6\u5668\u64CD\u4F5C\u65F6\u4F1A\u64AD\u653E\u97F3\u6548\u53CD\u9988.").addToggle(o=>{var s;return o.setValue((s=t.settings.floatingTimerAudioEnabled)!=null?s:!0).onChange(async l=>{t.settings.floatingTimerAudioEnabled=l,await t.saveSettings()})})}),i.addSetting(n=>{n.setName("\u83DC\u5355\u5C55\u5F00\u534A\u5F84").setDesc("\u8BBE\u7F6E\u65E5\u7A0B\u7C7B\u578B\u6807\u7B7E\u5728\u83DC\u5355\u5C55\u5F00\u65F6\u7684\u73AF\u7ED5\u534A\u5F84(px).").addSlider(o=>{var s;return o.setLimits(100,200,10).setValue((s=t.settings.floatingTimerExpandRadius)!=null?s:140).setDynamicTooltip().onChange(async l=>{t.settings.floatingTimerExpandRadius=l,await t.saveSettings(),t.floatingTimer&&t.floatingTimer.updateExpandRadius(l)})})})};var ui=require("obsidian");var m5=r0(require("crypto")),bat=`-----BEGIN PUBLIC KEY----- +MCowBQYDK2VwAyEAbWHAulS5oJLUSzerNJru7xBj1RdYozSvpJWAZ02RyUA= +-----END PUBLIC KEY-----`,h5="SDN-";function d5(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");for(;e.length%4;)e+="=";return Buffer.from(e,"base64")}function v5(r){let e=r.match(/^(\d+)\./);return e?parseInt(e[1],10):0}function Bl(r,e){try{if(!r)return{payload:null,error:"invalid"};if(!r.startsWith(h5))return{payload:null,error:"invalid"};let t=r.slice(h5.length),a=t.indexOf(".");if(a===-1)return{payload:null,error:"invalid"};let i=t.slice(0,a),n=t.slice(a+1),o=d5(i),s=d5(n);if(!m5.verify(null,o,bat,s))return{payload:null,error:"invalid"};let u=JSON.parse(o.toString("utf-8"));if(!u.id||!u.plan||!u.iat)return{payload:null,error:"invalid"};if(u.plan==="version"&&e&&u.ver){let c=v5(u.ver);if(v5(e)>c)return{payload:null,error:"version-mismatch",detail:u.ver}}return{payload:u}}catch(t){return{payload:null,error:"invalid"}}}function Sat(r,e){return r==="version-mismatch"?`\u6FC0\u6D3B\u5931\u8D25: \u6FC0\u6D3B\u7801\u5DF2\u8FC7\u671F, \u5F53\u524D\u6FC0\u6D3B\u7801\u4EC5\u9650 ${e!=null?e:""} \u7248\u672C\u4F7F\u7528`:"\u6FC0\u6D3B\u5931\u8D25: \u6FC0\u6D3B\u7801\u65E0\u6548"}function g5(r){let{plugin:e,contentEl:t}=r,a=e.settings.license,i=Bl(a.key,"1.0.1"),n=!!i.payload,o=new ui.SettingGroup(t);if(n){let s=i.payload,l=s.plan==="version"?`\u7248\u672C\u6388\u6743 (v${s.ver})`:"\u6C38\u4E45\u6388\u6743";o.addSetting(c=>{c.setName("\u6388\u6743\u72B6\u6001").setDesc("\u751F\u6548\u4E2D")}),o.addSetting(c=>{c.setName("\u6388\u6743\u7C7B\u578B").setDesc(l)}),o.addSetting(c=>{c.setName("\u6388\u6743\u65F6\u95F4").setDesc(s.iat)}),o.addSetting(c=>{c.addButton(f=>f.setButtonText("\u53D6\u6D88\u6FC0\u6D3B").setWarning().onClick(async()=>{e.settings.license.key="",await e.saveSettings(!1),new ui.Notice("\u5DF2\u53D6\u6D88\u6FC0\u6D3B, \u8BF7\u91CD\u542F Obsidian \u4F7F\u66F4\u6539\u751F\u6548"),r.display()}))}),new ui.Setting(t).setName("\u66F4\u591A").setHeading();let u=new ui.SettingGroup(t);s.plan==="lifetime"&&u.addSetting(c=>{c.setName("\u4F1A\u5458\u7FA4").setDesc("QQ \u7FA4\u53F7: 1098270852")}),u.addSetting(c=>{c.setName("\u5B98\u7F51").addButton(f=>f.setButtonText("\u524D\u5F80").onClick(()=>window.open("https://albusguo.github.io/super-daily-notes")))})}else{let s=a.key;o.addSetting(u=>{u.setName("\u6FC0\u6D3B\u7801").addText(c=>{c.setPlaceholder("SDN-...").setValue(s).onChange(f=>{s=f}),c.inputEl.style.width="100%",c.inputEl.style.fontFamily="var(--font-monospace)",c.inputEl.style.fontSize="12px"})}),o.addSetting(u=>{u.addButton(c=>c.setButtonText("\u6FC0\u6D3B").setCta().onClick(async()=>{let f=s.trim();if(!f){new ui.Notice("\u8BF7\u8F93\u5165\u6FC0\u6D3B\u7801");return}let p=Bl(f,"1.0.1");p.payload?(e.settings.license.key=f,await e.saveSettings(!1),e.enablePluginStyles(),await e.initializeFeatures(),new ui.Notice("\u6FC0\u6D3B\u6210\u529F!"),r.display()):new ui.Notice(Sat(p.error,p.detail))}))}),new ui.Setting(t).setName("\u66F4\u591A").setHeading();let l=new ui.SettingGroup(t);l.addSetting(u=>{u.setName("\u6C38\u4E45\u4E70\u65AD").setDesc("\u4E00\u6B65\u5230\u4F4D, \u5168\u529F\u80FD\u7EC8\u8EAB\u5347\u7EA7").addButton(c=>c.setButtonText("\u524D\u5F80\u8D2D\u4E70").onClick(()=>window.open("https://pay.ldxp.cn/item/u0ngqc")))}),l.addSetting(u=>{u.setName("\u5927\u7248\u672C\u4E70\u65AD").setDesc("\u5F53\u524D\u7248\u672C\u5168\u529F\u80FD, \u8F7B\u91CF\u8D77\u6B65\u65E0\u8D1F\u62C5").addButton(c=>c.setButtonText("\u524D\u5F80\u8D2D\u4E70").onClick(()=>window.open("https://pay.ldxp.cn/item/8ryfk3")))}),l.addSetting(u=>{u.setName("\u5B98\u7F51").addButton(c=>c.setButtonText("\u524D\u5F80").onClick(()=>window.open("https://albusguo.github.io/super-daily-notes")))})}}var y5={key:"license",name:"\u6388\u6743",render:g5},wat=[{key:"basic",name:"\u901A\u7528",render:c5},{key:"timer",name:"\u60AC\u6D6E\u8BA1\u65F6\u5668",render:p5}],Qy=class extends x5.PluginSettingTab{constructor(e,t){super(e,t),this.plugin=t,this.app=e}display(){let{containerEl:e}=this;e.empty(),e.addClass("albus-super-daily-notes-settings");let t=!!Bl(this.plugin.settings.license.key,"1.0.1").payload,a=t?[y5,...wat]:[y5];t||(this.plugin.settings.settingsTab="license");let i=e.createDiv({cls:"albus-super-daily-notes-planner-settings-tabs"});for(let o of a){let s=i.createDiv({cls:"albus-super-daily-notes-planner-settings-tab"+(this.plugin.settings.settingsTab===o.key?" is-active":"")});s.setText(o.name),s.addEventListener("click",()=>{this.plugin.settings.settingsTab=o.key,this.plugin.saveSettings(!1),this.display()})}this.contentEl=e.createDiv({cls:"albus-super-daily-notes-planner-settings-content"});let n=a.find(o=>o.key===this.plugin.settings.settingsTab);n&&n.render(this)}};var t0=class extends _5.Plugin{constructor(){super(...arguments);this.floatingTimer=null;this.featuresInitialized=!1}async onload(){await this.loadSettings(),this.addSettingTab(new Qy(this.app,this)),this.isLicensed()&&await this.initializeFeatures()}isLicensed(){return!!Bl(this.settings.license.key,"1.0.1").payload}async initializeFeatures(){var t;this.featuresInitialized||this.isLicensed()&&(this.featuresInitialized=!0,this.enablePluginStyles(),this.taskService=new Hc(this.app,this.settings,()=>this.saveSettings()),this.registerView(Lc,a=>new Jy(a,this)),this.addRibbonIcon("calendar-clock","Super Daily Notes",()=>{this.activateView()}),this.addCommand({id:"open-super-daily-notes",name:"\u6253\u5F00 Super Daily Notes",callback:()=>{this.activateView()}}),((t=this.settings.floatingTimerEnabled)==null||t)&&this.app.workspace.onLayoutReady(()=>{this.floatingTimer=new Pc(this.app,this),this.floatingTimer.load()}))}enablePluginStyles(){document.body.addClass("super-daily-notes-active")}onunload(){this.floatingTimer&&(this.floatingTimer.unload(),this.floatingTimer=null),document.body.removeClass("super-daily-notes-active")}async loadSettings(){this.settings=Object.assign({},ZC,await this.loadData())}async saveSettings(t=!0){if(await this.saveData(this.settings),!t||!this.isLicensed())return;this.taskService=new Hc(this.app,this.settings,()=>this.saveSettings()),this.app.workspace.getLeavesOfType(Lc).forEach(i=>{let n=i.view;n&&"loadAndRender"in n&&n.loadAndRender()})}async activateView(){let{workspace:t}=this.app,a=null,i=t.getLeavesOfType(Lc);i.length>0?a=i[0]:(a=t.getLeaf("tab"),a&&await a.setViewState({type:Lc,active:!0})),a&&t.revealLeaf(a)}}; +/*! Bundled license information: + +tslib/tslib.es6.js: +tslib/tslib.es6.js: + (*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** *) + +zrender/lib/zrender.js: + (*! + * ZRender, a high performance 2d drawing library. + * + * Copyright (c) 2013, Baidu Inc. + * All rights reserved. + * + * LICENSE + * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt + *) +*/ diff --git a/.obsidian/plugins/albus-super-daily-notes/manifest.json b/.obsidian/plugins/albus-super-daily-notes/manifest.json new file mode 100644 index 0000000..ae884c8 --- /dev/null +++ b/.obsidian/plugins/albus-super-daily-notes/manifest.json @@ -0,0 +1 @@ +{"id":"albus-super-daily-notes","name":"Super Daily Notes","version":"1.0.1","minAppVersion":"1.11.0","description":"A plugin for managing daily notes with schedule, events, habits, journal, statistics, and floating timer views in Obsidian.","author":"Albus","authorUrl":"https://github.com/AlbusGuo","isDesktopOnly":true} \ No newline at end of file diff --git a/.obsidian/plugins/albus-super-daily-notes/styles.css b/.obsidian/plugins/albus-super-daily-notes/styles.css new file mode 100644 index 0000000..6eef21b --- /dev/null +++ b/.obsidian/plugins/albus-super-daily-notes/styles.css @@ -0,0 +1 @@ +body.super-daily-notes-active .albus-super-daily-notes-datepicker-modal.modal{width:360px;max-width:90vw}body.super-daily-notes-active .albus-super-daily-notes-modal,body.super-daily-notes-active .albus-super-daily-notes-datepicker{background:var(--background-primary);border-radius:8px;padding:12px;box-shadow:0 20px 40px #00000040;border:1px solid var(--background-modifier-border);width:fit-content;max-width:400px;margin:auto}body.super-daily-notes-active .albus-super-daily-notes-modal h2,body.super-daily-notes-active .albus-super-daily-notes-datepicker h2{margin:0 0 12px;font-size:1.2rem;font-weight:700;color:var(--text-normal);text-align:center}body.super-daily-notes-active .albus-super-daily-notes-modal-button-container{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}body.super-daily-notes-active .albus-super-daily-notes-modal-button-container button{padding:10px 20px;border:1px solid var(--background-modifier-border);border-radius:8px;cursor:pointer;font-size:14px;font-weight:600;transition:none!important}body.super-daily-notes-active .albus-super-daily-notes-modal-button-container button.mod-cta{background:var(--interactive-accent);color:#fff}body.super-daily-notes-active .albus-super-daily-notes-modal-button-container button.mod-warning{background:#f44336;color:#fff}body.super-daily-notes-active .albus-super-daily-notes-modal-button-container button:hover{opacity:.9}body.super-daily-notes-active .albus-super-daily-notes-setting-item.has-error .setting-item-info{color:var(--text-error)}body.super-daily-notes-active .albus-super-daily-notes-setting-item.has-error input[type=text]{border-color:var(--text-error);box-shadow:0 0 0 1px var(--text-error)}body.super-daily-notes-active .albus-super-daily-notes-setting-item .albus-super-daily-notes-error-message{position:absolute;top:100%;left:0;right:0;color:var(--text-error);font-size:12px;margin-top:4px;z-index:1;animation:slideDown .2s ease-out;pointer-events:none}body.super-daily-notes-active .albus-super-daily-notes-setting-item.has-error .setting-item-description{color:var(--text-error)!important}body.super-daily-notes-active .albus-super-daily-notes-date-error{display:block;color:var(--text-error);font-size:12px;margin-top:4px;animation:slideDown .2s ease-out}body.super-daily-notes-active button.albus-super-daily-notes-disabled{opacity:.5;cursor:not-allowed;pointer-events:none}body.super-daily-notes-active .albus-super-daily-notes-item-editor-modal-shell{width:min(560px,calc(100vw - 32px));max-width:min(560px,calc(100vw - 32px));border-radius:12px}body.super-daily-notes-active .albus-super-daily-notes-item-editor-modal{display:flex;flex-direction:column;gap:8px;padding:12px}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-field{width:min(220px,100%);min-height:42px;border:1px solid var(--background-modifier-border);border-radius:var(--input-radius);background:var(--background-primary);overflow:hidden}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting{align-items:flex-start;gap:12px}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting-single-line{align-items:center}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting .setting-item-info{padding-right:0;flex:0 0 72px}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting-single-line .setting-item-info{flex:0 0 96px;align-self:center}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting-single-line .setting-item-name,body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting-single-line .setting-item-description{white-space:nowrap}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting .setting-item-control{flex:0 1 320px;width:auto;margin-left:auto;justify-content:flex-end}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting-single-line .setting-item-control{align-self:center;flex:0 1 220px}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-field .cm-editor{min-height:42px;background:transparent}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-field .cm-gutters{display:none!important}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-field .cm-scroller{min-height:42px;font-family:var(--font-text);line-height:20px;background:transparent}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-field .cm-content,body.super-daily-notes-active .albus-super-daily-notes-inline-editor-field .cm-line{text-align:left;direction:ltr;writing-mode:horizontal-tb}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-field-single-line{width:min(220px,100%);min-height:42px}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting .albus-super-daily-notes-inline-editor-field-single-line{width:min(220px,100%)}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-field-single-line .cm-activeLine,body.super-daily-notes-active .albus-super-daily-notes-inline-editor-field-single-line .cm-focused .cm-activeLine,body.super-daily-notes-active .albus-super-daily-notes-inline-editor-field-single-line .cm-line{background:transparent!important}@media(max-width:720px){body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting{flex-direction:column;gap:8px}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting .setting-item-info,body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting .setting-item-control{flex:1 1 auto;width:100%;margin-left:0}body.super-daily-notes-active .albus-super-daily-notes-inline-editor-setting .setting-item-control{justify-content:stretch}}body.super-daily-notes-active .albus-super-daily-notes-datepicker-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--background-modifier-border)}body.super-daily-notes-active .albus-super-daily-notes-datepicker-header button{padding:4px 8px;border:1px solid var(--background-modifier-border);border-radius:4px;background:var(--background-primary);cursor:pointer;color:var(--text-muted);transition:none;font-weight:500;box-shadow:none!important}body.super-daily-notes-active .albus-super-daily-notes-datepicker-header button:hover{background:var(--background-modifier-hover);color:var(--text-normal);transition:none}body.super-daily-notes-active .albus-super-daily-notes-datepicker-title{font-weight:600;cursor:pointer;padding:4px 8px;border-radius:4px;transition:none;color:var(--text-normal);background:transparent}body.super-daily-notes-active .albus-super-daily-notes-datepicker-title:hover{background-color:var(--background-modifier-hover);color:var(--text-normal);transition:none}body.super-daily-notes-active .albus-super-daily-notes-datepicker-unified-grid{display:grid;grid-template-columns:40px repeat(7,40px);gap:2px;justify-content:center}body.super-daily-notes-active .albus-super-daily-notes-week-number-header{text-align:center;font-size:12px;font-weight:500;color:var(--text-muted);padding:6px;border-radius:4px;background:transparent}body.super-daily-notes-active .albus-super-daily-notes-weekday{text-align:center;font-size:12px;font-weight:500;color:var(--text-muted);padding:6px;border-radius:4px;background:transparent;transition:none!important}body.super-daily-notes-active .albus-super-daily-notes-week-number{background:transparent;border:none;cursor:pointer;text-align:center;font-size:11px;font-weight:500;transition:none;color:var(--text-faint);padding:4px;display:flex;align-items:center;justify-content:center;width:40px;height:30px;box-shadow:none!important}body.super-daily-notes-active .albus-super-daily-notes-week-number:hover{background:var(--background-modifier-hover);color:var(--interactive-accent);font-weight:600;border-radius:4px}body.super-daily-notes-active .albus-super-daily-notes-datepicker-day{padding:4px;border-radius:4px;background:transparent;border:1px solid var(--background-modifier-border);cursor:pointer;text-align:center;font-size:13px;font-weight:500;transition:none;color:var(--text-faint);opacity:.4;display:flex;align-items:center;justify-content:center;width:40px;height:30px;box-shadow:none!important}body.super-daily-notes-active .albus-super-daily-notes-datepicker-day.albus-super-daily-notes-current-month{color:var(--text-normal);background:transparent;opacity:1}body.super-daily-notes-active .albus-super-daily-notes-datepicker-day.albus-super-daily-notes-today{background:var(--interactive-accent);color:var(--text-on-accent);font-weight:600;border-color:var(--interactive-accent);box-shadow:none!important}body.super-daily-notes-active .albus-super-daily-notes-datepicker-day:hover{background:var(--background-modifier-hover);transition:none}body.super-daily-notes-active .albus-super-daily-notes-datepicker-months{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:10px;justify-items:center}body.super-daily-notes-active .albus-super-daily-notes-datepicker-month{padding:16px;border:1px solid var(--background-modifier-border);border-radius:8px;background:var(--background-primary);cursor:pointer;text-align:center;transition:none!important;font-size:14px;font-weight:600;color:var(--text-normal);box-shadow:none!important;width:100%}body.super-daily-notes-active .albus-super-daily-notes-datepicker-month:hover{background:var(--background-modifier-hover);border-color:var(--interactive-accent)}body.super-daily-notes-active .albus-super-daily-notes-datepicker-years{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;justify-items:center}body.super-daily-notes-active .albus-super-daily-notes-datepicker-year{padding:20px;border:2px solid var(--background-modifier-border);border-radius:16px;background:var(--background-primary);cursor:pointer;text-align:center;transition:none!important;font-size:14px;font-weight:600;color:var(--text-normal);box-shadow:0 4px 8px #0000001a}body.super-daily-notes-active .albus-super-daily-notes-datepicker-year.albus-super-daily-notes-selected{background:var(--interactive-accent);color:var(--text-on-accent);border-color:var(--interactive-accent);font-weight:700;box-shadow:0 6px 12px rgba(var(--interactive-accent-rgb),.4)}body.super-daily-notes-active .albus-super-daily-notes-datepicker-year:hover{background:var(--background-modifier-hover);border-color:var(--interactive-accent);box-shadow:0 8px 16px #00000026}body.super-daily-notes-active .albus-super-daily-notes-datepicker-year-input{padding:10px 16px;border:2px solid var(--background-modifier-border);border-radius:12px;background:var(--background-primary);font-size:14px;font-weight:700;color:var(--text-normal);text-align:center;width:100px;transition:none!important;box-shadow:0 2px 6px #00000014}body.super-daily-notes-active .albus-super-daily-notes-datepicker-year-input:focus{outline:none;border-color:var(--interactive-accent);box-shadow:0 4px 12px rgba(var(--interactive-accent-rgb),.3)}body.super-daily-notes-active .albus-super-daily-notes-task-description-textarea{width:100%;min-height:60px;max-height:200px;padding:8px 12px;border:1px solid var(--background-modifier-border);border-radius:6px;background:var(--background-primary);color:var(--text-normal);font-size:14px;font-family:var(--font-interface);line-height:1.5;resize:none;overflow-y:auto;transition:border-color .2s ease}body.super-daily-notes-active .albus-super-daily-notes-task-description-textarea:focus{outline:none;border-color:var(--interactive-accent)}body.super-daily-notes-active .albus-super-daily-notes-task-description-textarea::placeholder{color:var(--text-muted)}@keyframes slideDown{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}body.super-daily-notes-active .albus-super-daily-notes-view-mode-selector{display:flex;background-color:var(--background-primary);border-radius:10px;padding:4px;box-shadow:inset 0 1px 3px #0000001a}body.super-daily-notes-active .albus-super-daily-notes-view-mode-selector button{padding:8px 16px;border:none;border-radius:8px;background-color:transparent;color:var(--text-muted);cursor:pointer;font-size:14px;font-weight:500;transition:background-color .3s ease,color .3s ease,box-shadow .3s ease,transform .3s ease}body.super-daily-notes-active .albus-super-daily-notes-view-mode-selector button:not(.albus-super-daily-notes-active):hover{background-color:var(--background-modifier-hover);transform:translateY(-1px)}body.super-daily-notes-active .albus-super-daily-notes-view-mode-selector button.albus-super-daily-notes-active{background-color:var(--interactive-accent);color:var(--text-on-accent);box-shadow:0 2px 8px rgba(var(--interactive-accent-rgb),.3)}body.super-daily-notes-active .albus-super-daily-notes-task-item{display:flex;gap:12px;padding:12px;margin-bottom:8px;background:var(--background-primary-alt);border-radius:8px;border:1px solid var(--background-modifier-border);transition:box-shadow .3s ease,transform .3s ease}body.super-daily-notes-active .albus-super-daily-notes-task-item:hover{box-shadow:0 4px 12px #0000001a;transform:translateY(-2px)}body.super-daily-notes-active .albus-super-daily-notes-container{--albus-super-daily-notes-hairline: color-mix(in srgb, var(--background-modifier-border) 68%, transparent);--albus-super-daily-notes-header-shadow: 0 2px 5px -6px rgba(0, 0, 0, .12);padding:0;border-radius:0;background:var(--background-primary);box-sizing:border-box;height:100%;display:flex;flex-direction:column;animation:fadeIn .3s ease-out;border:none}body.super-daily-notes-active .albus-super-daily-notes-planner-shell{display:flex;flex:1;min-height:0;min-width:0;background:var(--background-primary)}body.super-daily-notes-active .albus-super-daily-notes-planner-workspace{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--background-primary)}body.super-daily-notes-active .albus-super-daily-notes-planner-error{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;gap:16px;padding:40px 20px}body.super-daily-notes-active .albus-super-daily-notes-planner-error-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;opacity:.5}body.super-daily-notes-active .albus-super-daily-notes-planner-error-icon svg{width:40px;height:40px;stroke-width:1.75}body.super-daily-notes-active .albus-super-daily-notes-planner-error-text{font-size:14px;color:var(--text-muted);text-align:center}body.super-daily-notes-active .albus-super-daily-notes-planner-error button{margin-top:8px}body.super-daily-notes-active .albus-super-daily-notes-planner-header{display:flex;align-items:center;justify-content:center;margin-bottom:0;flex-shrink:0;gap:8px;padding:10px 16px;background:var(--background-primary);border-radius:0;box-shadow:none;border-bottom:1px solid var(--albus-super-daily-notes-hairline);position:sticky;top:0;z-index:6;overflow-x:auto;overflow-y:hidden}body.super-daily-notes-active .albus-super-daily-notes-subview-header{display:flex;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;gap:10px;padding:0;min-height:36px;position:relative}body.super-daily-notes-active .albus-super-daily-notes-planner-mode-group{display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--albus-super-daily-notes-hairline);border-radius:14px;background:var(--background-primary);flex-shrink:0}body.super-daily-notes-active .albus-super-daily-notes-planner-mode-group-scrollable{max-width:min(42%,420px);overflow-x:auto;scrollbar-width:none}body.super-daily-notes-active .albus-super-daily-notes-planner-mode-group-scrollable::-webkit-scrollbar{display:none}body.super-daily-notes-active .albus-super-daily-notes-subview-content{height:100%;overflow:auto}body.super-daily-notes-active .albus-super-daily-notes-planner-navigation-centered{position:absolute;left:50%;transform:translate(-50%)}body.super-daily-notes-active .albus-super-daily-notes-planner-main-tabs{display:flex;flex-direction:column;align-items:center;gap:10px;width:64px;padding:14px 10px;background:var(--background-primary);border-right:1px solid var(--albus-super-daily-notes-hairline);margin-bottom:0;flex-shrink:0}body.super-daily-notes-active .albus-super-daily-notes-planner-main-tab{width:40px;height:40px;padding:0;border:none!important;background:transparent!important;color:var(--icon-color)!important;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease!important;border-radius:10px;box-shadow:none!important;display:inline-flex;align-items:center;justify-content:center}body.super-daily-notes-active .albus-super-daily-notes-planner-main-tab:not(.albus-super-daily-notes-active):hover{background:var(--background-modifier-hover)!important;color:var(--icon-color)!important}body.super-daily-notes-active .albus-super-daily-notes-planner-main-tab.albus-super-daily-notes-active,body.super-daily-notes-active .albus-super-daily-notes-planner-main-tab.albus-super-daily-notes-active:hover{background:var(--interactive-accent)!important;color:var(--text-on-accent)!important}body.super-daily-notes-active .albus-super-daily-notes-planner-main-tab svg{width:18px;height:18px;stroke-width:1.85;color:currentColor;stroke:currentColor}body.super-daily-notes-active .albus-super-daily-notes-planner-sub-header{display:flex;justify-content:space-between;align-items:center;gap:12px}body.super-daily-notes-active .albus-super-daily-notes-planner-content{flex:1;overflow-y:auto;border:none;border-radius:0;background:var(--background-primary);box-shadow:none;padding:0;container-type:inline-size;min-width:0}body.super-daily-notes-active .albus-super-daily-notes-planner-navigation,body.super-daily-notes-active .albus-super-daily-notes-planner-actions{display:flex;align-items:center;gap:8px}body.super-daily-notes-active .albus-super-daily-notes-planner-navigation button,body.super-daily-notes-active .albus-super-daily-notes-planner-actions button,body.super-daily-notes-active .albus-super-daily-notes-view-mode-btn{height:32px;padding:0 12px;border:none;border-radius:8px;background:var(--background-primary)!important;cursor:pointer;font-size:13px;font-weight:500;font-family:var(--font-interface);line-height:1;transition:background-color .15s ease,border-color .15s ease,color .15s ease!important;color:var(--text-normal);box-shadow:none!important;display:inline-flex;align-items:center;justify-content:center;gap:6px}body.super-daily-notes-active .albus-super-daily-notes-planner-navigation button:not(.mod-cta):hover,body.super-daily-notes-active .albus-super-daily-notes-planner-actions button:not(.mod-cta):hover,body.super-daily-notes-active .albus-super-daily-notes-view-mode-btn:not(.albus-super-daily-notes-active):hover{background:var(--background-modifier-hover)!important;color:var(--text-normal)}body.super-daily-notes-active .albus-super-daily-notes-planner-actions{margin-left:auto}body.super-daily-notes-active .albus-super-daily-notes-view-mode-btn:not(.albus-super-daily-notes-active){color:var(--icon-color)}body.super-daily-notes-active .albus-super-daily-notes-view-mode-btn.albus-super-daily-notes-active{background:var(--interactive-accent)!important;color:var(--text-on-accent)!important;outline:none;box-shadow:none}body.super-daily-notes-active .albus-super-daily-notes-view-mode-btn.albus-super-daily-notes-active:hover{background:var(--interactive-accent)!important;color:var(--text-on-accent)!important}body.super-daily-notes-active .albus-super-daily-notes-planner-actions button.mod-cta{background:var(--background-primary)!important;color:var(--text-normal)!important;outline:none}body.super-daily-notes-active .albus-super-daily-notes-planner-actions button.mod-cta:hover{background:var(--background-modifier-hover)!important}body.super-daily-notes-active .albus-super-daily-notes-subview-header>.albus-super-daily-notes-view-mode-btn:first-of-type{margin-left:0}body.super-daily-notes-active .albus-super-daily-notes-planner-navigation{padding:2px;border:1px solid var(--albus-super-daily-notes-hairline);border-radius:14px;background:var(--background-primary);gap:4px}body.super-daily-notes-active .albus-super-daily-notes-planner-navigation button{min-width:32px;padding:0 10px;border-color:transparent}body.super-daily-notes-active .albus-super-daily-notes-planner-navigation button svg,body.super-daily-notes-active .albus-super-daily-notes-planner-actions button svg,body.super-daily-notes-active .albus-super-daily-notes-view-mode-btn svg{width:15px;height:15px;stroke-width:1.8;color:inherit!important;stroke:currentColor!important;fill:none!important}body.super-daily-notes-active .albus-super-daily-notes-planner-main-tab svg *,body.super-daily-notes-active .albus-super-daily-notes-planner-navigation button svg *,body.super-daily-notes-active .albus-super-daily-notes-planner-actions button svg *,body.super-daily-notes-active .albus-super-daily-notes-view-mode-btn svg *{stroke:currentColor!important;fill:none}body.super-daily-notes-active .albus-super-daily-notes-planner-navigation-centered{position:absolute;left:50%;transform:translate(-50%);max-width:min(50%,520px)}body.super-daily-notes-active .albus-super-daily-notes-planner-navigation-centered button:nth-child(2){min-width:136px;color:var(--text-normal);font-weight:500;font-size:13px;border-color:transparent;background:var(--background-primary)!important}body.super-daily-notes-active .albus-super-daily-notes-planner-actions{margin-left:auto;padding-left:0;border-left:none}body.super-daily-notes-active .albus-super-daily-notes-planner-actions button{background:var(--background-primary)!important;border-radius:14px;padding:0 14px;border:1px solid var(--albus-super-daily-notes-hairline)!important;outline:none!important;box-shadow:none!important}@media(max-width:900px){body.super-daily-notes-active .albus-super-daily-notes-planner-main-tabs{overflow-y:auto}body.super-daily-notes-active .albus-super-daily-notes-planner-header{padding:10px 12px}body.super-daily-notes-active .albus-super-daily-notes-subview-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:10px;row-gap:8px;width:100%;padding-right:12px}body.super-daily-notes-active .albus-super-daily-notes-planner-navigation-centered{position:static;left:auto;transform:none;max-width:none;grid-column:1 / -1;justify-self:center;margin:0 auto}body.super-daily-notes-active .albus-super-daily-notes-planner-actions{margin-left:0;justify-self:end}}body.super-daily-notes-active .albus-super-daily-notes-timeline-current-time{position:absolute;left:0;right:0;z-index:10;pointer-events:none;transition:top .5s ease}body.super-daily-notes-active .albus-super-daily-notes-timeline-current-time-line{height:2px;background-color:var(--interactive-accent);position:absolute;left:0;right:0;z-index:10}body.super-daily-notes-active .albus-super-daily-notes-timeline-current-time-label{position:absolute;left:55px;top:-12px;background-color:var(--interactive-accent);color:var(--text-on-accent);padding:4px 8px;border-radius:12px;font-size:12px;font-weight:600;z-index:11;box-shadow:0 2px 8px rgba(var(--interactive-accent-rgb),.4)}body.super-daily-notes-active .albus-super-daily-notes-task-checkbox{position:absolute;top:6px;right:6px;z-index:5}body.super-daily-notes-active .albus-super-daily-notes-task-checkbox input[type=checkbox]{margin:0;width:14px;height:14px;cursor:pointer;border-radius:3px;transition:background-color .2s ease,border-color .2s ease}body.super-daily-notes-active .albus-super-daily-notes-task-checkbox input[type=checkbox]:checked{background-color:var(--interactive-accent);border-color:var(--interactive-accent)}body.super-daily-notes-active .albus-super-daily-notes-timeline-task{position:absolute;left:4px;right:4px;border-radius:6px;padding:0;cursor:pointer;box-shadow:0 1px 3px #00000014;transition:box-shadow .3s ease,opacity .15s ease;display:flex;align-items:flex-start;gap:6px;overflow:hidden;z-index:3;border:1px solid var(--background-modifier-border);border-left:4px solid var(--task-bg-color, var(--interactive-accent));user-select:none;background:var(--background-modifier-form-field)}body.super-daily-notes-active .albus-super-daily-notes-timeline-task.albus-super-daily-notes-minimal-style{background:var(--background-secondary-alt)!important;border-left:4px solid var(--task-bg-color, var(--interactive-accent));border-right:1px solid var(--background-modifier-hover);border-top:1px solid var(--background-modifier-hover);border-bottom:1px solid var(--background-modifier-hover)}body.super-daily-notes-active .albus-super-daily-notes-timeline-task:hover{box-shadow:0 0 15px 3px var(--task-bg-color, var(--interactive-accent)),0 4px 12px #0000004d!important;z-index:100!important;transition:box-shadow .2s cubic-bezier(.175,.885,.32,1.275),z-index 0s}body.super-daily-notes-active .albus-super-daily-notes-timeline-task.albus-super-daily-notes-dragging{opacity:.7;box-shadow:0 8px 24px #00000040;cursor:move!important;transition:none;z-index:100}body.super-daily-notes-active .albus-super-daily-notes-task-resize-handle{position:absolute;left:0;right:0;height:8px;cursor:ns-resize;z-index:10;opacity:0;transition:opacity .2s ease}body.super-daily-notes-active .albus-super-daily-notes-task-resize-top{top:0}body.super-daily-notes-active .albus-super-daily-notes-task-resize-bottom{bottom:0}body.super-daily-notes-active .albus-super-daily-notes-timeline-task:hover .albus-super-daily-notes-task-resize-handle{opacity:1}body.super-daily-notes-active .albus-super-daily-notes-task-resize-handle:hover{background:rgba(var(--interactive-accent-rgb),.3)}body.super-daily-notes-active .albus-super-daily-notes-task-resize-handle:active{background:rgba(var(--interactive-accent-rgb),.5)}body.super-daily-notes-active .albus-super-daily-notes-task-drag-preview{position:absolute;left:0;right:0;border-radius:8px;border:2px dashed var(--interactive-accent);background:rgba(var(--interactive-accent-rgb),.2);pointer-events:none;z-index:50;transition:none}body.super-daily-notes-active .albus-super-daily-notes-task-drag-time-label{position:absolute;left:50%;transform:translate(-50%);font-size:12px;font-weight:600;padding:2px 8px;border-radius:4px;background:var(--interactive-accent);color:var(--text-on-accent);white-space:nowrap;box-shadow:0 2px 4px #0003}body.super-daily-notes-active .albus-super-daily-notes-task-drag-time-start{top:-20px}body.super-daily-notes-active .albus-super-daily-notes-task-drag-time-end{bottom:-20px}body.super-daily-notes-active .albus-super-daily-notes-timeline-task.albus-super-daily-notes-completed{opacity:.6}body.super-daily-notes-active .albus-super-daily-notes-timeline-task.albus-super-daily-notes-completed .albus-super-daily-notes-task-description{text-decoration:line-through}body.super-daily-notes-active .albus-super-daily-notes-task-tags-container{display:flex;align-items:center;gap:4px;flex-shrink:0}body.super-daily-notes-active .albus-super-daily-notes-task-tag{font-size:12px;font-weight:700;padding:4px 8px;border-radius:6px;background-color:#0000001a;color:var(--text-normal);text-shadow:0 1px 2px rgba(0,0,0,.5);flex-shrink:0;box-shadow:0 1px 3px #0000001a}body.super-daily-notes-active .albus-super-daily-notes-task-content{flex:1;min-width:0}body.super-daily-notes-active .albus-super-daily-notes-task-description{font-size:14px;font-weight:600;margin-bottom:4px;color:var(--text-normal);text-shadow:0 1px 2px rgba(0,0,0,.5);line-height:1.4}body.super-daily-notes-active .albus-super-daily-notes-task-time{font-size:12px;color:var(--text-normal);font-weight:500;opacity:.8}body.super-daily-notes-active .albus-super-daily-notes-week-view-container{display:flex;flex-direction:column;min-height:100%;background:var(--background-primary);padding:0}body.super-daily-notes-active .albus-super-daily-notes-week-header{display:grid;grid-template-columns:50px repeat(7,1fr);background-color:var(--background-primary);border-bottom:1px solid var(--albus-super-daily-notes-hairline);position:sticky;top:0;z-index:10;box-shadow:0 -20px 0 0 var(--background-primary),var(--albus-super-daily-notes-header-shadow);padding:0}body.super-daily-notes-active .albus-super-daily-notes-week-time-label{padding:12px;background-color:var(--background-primary);text-align:center;font-weight:600;color:var(--text-muted);position:relative;z-index:1;border:none!important;border-right:1px solid var(--albus-super-daily-notes-hairline)}body.super-daily-notes-active .albus-super-daily-notes-week-day-header{text-align:center;padding:10px;background-color:var(--background-primary);border-radius:0;transition:background-color .2s ease;cursor:default;border-right:1px solid var(--albus-super-daily-notes-hairline);border-left:none;position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:8px}body.super-daily-notes-active .albus-super-daily-notes-week-day-header:last-child{border-right:none}body.super-daily-notes-active .albus-super-daily-notes-week-day-header.albus-super-daily-notes-today{background-color:var(--interactive-accent);color:var(--text-on-accent)}body.super-daily-notes-active .albus-super-daily-notes-week-day-name{font-weight:500;margin-bottom:0;color:var(--text-muted);font-size:14px}body.super-daily-notes-active .albus-super-daily-notes-week-day-header.albus-super-daily-notes-today .albus-super-daily-notes-week-day-name{color:var(--text-on-accent)}body.super-daily-notes-active .albus-super-daily-notes-week-day-date{font-size:14px;font-weight:500;color:var(--text-normal)}body.super-daily-notes-active .albus-super-daily-notes-week-day-header.albus-super-daily-notes-today .albus-super-daily-notes-week-day-date{color:var(--text-on-accent)}body.super-daily-notes-active .albus-super-daily-notes-week-content-wrapper{display:flex;flex:1;min-width:0;position:relative;z-index:1}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-labels{width:50px;background:transparent;flex-shrink:0;position:relative;box-shadow:2px 0 4px #0000000d;min-width:50px}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-label{position:absolute;display:flex;align-items:flex-start;justify-content:flex-end;padding-right:6px;font-size:12px;color:var(--text-muted);box-sizing:border-box;width:100%;background-color:transparent;transition:color .3s ease}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-label.albus-super-daily-notes-full-hour{font-weight:600;border-right:1px solid var(--background-modifier-border);background-color:transparent}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-label.albus-super-daily-notes-half-hour{display:none}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-content{position:relative;flex:1;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));background:var(--background-primary);min-width:0;margin-right:0}body.super-daily-notes-active .albus-super-daily-notes-week-day-column{position:relative;min-width:0;border-right:1px solid var(--background-modifier-border);padding:0 4px}body.super-daily-notes-active .albus-super-daily-notes-week-day-column:last-child{border-right:none}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-gridline{position:absolute;left:0;right:0;height:1px;background:var(--background-modifier-border);border:none;z-index:1;pointer-events:none}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-gridline.albus-super-daily-notes-full-hour{background:var(--background-modifier-border-hover);height:1px}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-gridline.albus-super-daily-notes-half-hour{opacity:1;height:0;background:none;border-top:1px dashed var(--background-modifier-border)}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-task{position:absolute;left:4px;right:4px;border-radius:6px;padding:6px 8px;cursor:pointer;box-shadow:0 1px 3px #00000014;transition:box-shadow .2s ease,opacity .2s ease;display:flex;flex-direction:column;gap:3px;overflow:hidden;z-index:3;font-size:12px;border:none;border-left:4px solid var(--task-bg-color, var(--interactive-accent));background:var(--background-modifier-form-field)}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-task.albus-super-daily-notes-minimal-style{background:var(--background-secondary-alt)!important;border-left:8px solid var(--task-bg-color, var(--interactive-accent));border-right:none;border-top:none;border-bottom:none}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-task:hover{box-shadow:0 0 15px 3px var(--task-bg-color, var(--interactive-accent)),0 4px 12px #0000004d!important;z-index:100!important;transition:box-shadow .2s cubic-bezier(.175,.885,.32,1.275),z-index 0s}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-task.albus-super-daily-notes-completed{opacity:.6}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-task.albus-super-daily-notes-completed .albus-super-daily-notes-task-description{text-decoration:line-through}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-current-time{position:absolute;left:0;right:0;z-index:1;pointer-events:none}body.super-daily-notes-active .albus-super-daily-notes-month-header{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;margin-bottom:0;text-align:center;font-weight:600;background:var(--background-primary);position:sticky;top:0;z-index:10;border-bottom:1px solid var(--albus-super-daily-notes-hairline);width:100%;box-shadow:var(--albus-super-daily-notes-header-shadow)}body.super-daily-notes-active .albus-super-daily-notes-month-day-header{padding:12px 8px;background-color:var(--background-primary);color:var(--text-muted);transition:background-color .2s ease;font-size:14px;min-height:44px;display:flex;align-items:center;justify-content:center}body.super-daily-notes-active .albus-super-daily-notes-month-day-header:hover{background-color:var(--background-modifier-hover)}body.super-daily-notes-active .albus-super-daily-notes-schedule-month-view{display:flex;flex-direction:column}body.super-daily-notes-active .albus-super-daily-notes-schedule-month-week{display:grid;grid-template-columns:repeat(7,1fr);border-bottom:1px solid var(--albus-super-daily-notes-hairline);height:120px}body.super-daily-notes-active .albus-super-daily-notes-schedule-month-day{border-right:1px solid var(--albus-super-daily-notes-hairline);padding:4px;display:flex;flex-direction:column;gap:2px;cursor:pointer;overflow:hidden;transition:background .1s ease;position:relative}body.super-daily-notes-active .albus-super-daily-notes-schedule-month-day:last-child{border-right:none}body.super-daily-notes-active .albus-super-daily-notes-schedule-month-day:hover{background:var(--background-modifier-hover)}body.super-daily-notes-active .albus-super-daily-notes-schedule-month-day.is-other-month{opacity:.35;cursor:default}body.super-daily-notes-active .albus-super-daily-notes-schedule-month-day.has-tasks{border-left:3px solid var(--interactive-accent)}body.super-daily-notes-active .albus-super-daily-notes-schedule-day-header{display:flex;align-items:center;gap:4px}body.super-daily-notes-active .albus-super-daily-notes-schedule-day-number{font-size:12px;font-weight:500;color:var(--text-muted);line-height:1;cursor:pointer}body.super-daily-notes-active .albus-super-daily-notes-schedule-day-number.is-today-number{background:var(--interactive-accent);color:var(--text-on-accent);border-radius:50%;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;font-weight:700}body.super-daily-notes-active .albus-super-daily-notes-schedule-day-tasks{flex:1;min-height:0;display:flex;flex-direction:column;gap:2px;overflow-y:auto}body.super-daily-notes-active .albus-super-daily-notes-schedule-month-task{display:flex;align-items:center;gap:4px;padding:1px 2px;border-radius:3px;cursor:pointer;font-size:10px;line-height:1.3;transition:background .1s ease}body.super-daily-notes-active .albus-super-daily-notes-schedule-month-task:hover{background:var(--background-modifier-hover)}body.super-daily-notes-active .albus-super-daily-notes-schedule-month-task.is-completed{opacity:.5}body.super-daily-notes-active .albus-super-daily-notes-schedule-month-task.is-completed .albus-super-daily-notes-schedule-task-desc{text-decoration:line-through}body.super-daily-notes-active .albus-super-daily-notes-schedule-task-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}body.super-daily-notes-active .albus-super-daily-notes-schedule-task-time{color:var(--text-muted);flex-shrink:0;font-variant-numeric:tabular-nums}body.super-daily-notes-active .albus-super-daily-notes-schedule-task-desc{color:var(--text-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.super-daily-notes-active .albus-super-daily-notes-year-view{height:100%;overflow-y:auto;padding:16px;background:linear-gradient(to bottom,var(--background-primary) 0%,var(--background-secondary) 100%)}body.super-daily-notes-active .albus-super-daily-notes-year-view h3{text-align:center;margin-bottom:20px;color:var(--text-normal);font-size:1.5rem;font-weight:700}body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-container{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}body.super-daily-notes-active .albus-super-daily-notes-year-month-heatmap{border-radius:12px;padding:16px;background:var(--background-primary);box-shadow:0 4px 12px #00000014;transition:box-shadow .3s ease,transform .3s ease}body.super-daily-notes-active .albus-super-daily-notes-year-month-heatmap:hover{box-shadow:0 6px 16px #0000001f;transform:translateY(-2px)}body.super-daily-notes-active .albus-super-daily-notes-year-month-heatmap h4{margin:0 0 12px;font-size:16px;color:var(--text-normal);text-align:center;font-weight:700}body.super-daily-notes-active .albus-super-daily-notes-year-month-days{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-day{aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:11px;border-radius:4px;cursor:pointer;transition:transform .3s ease,box-shadow .3s ease;box-shadow:0 1px 2px #0000000d}body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-day:hover{transform:scale(1.2);z-index:1;box-shadow:0 4px 8px #00000026}body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-day.albus-super-daily-notes-today{border:2px solid var(--interactive-accent);box-shadow:0 0 0 2px rgba(var(--interactive-accent-rgb),.2);animation:year-heatmap-pulse 2s infinite}body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-legend{display:flex;align-items:center;justify-content:center;margin-top:20px;gap:12px}body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-legend-items{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-legend-item{display:flex;align-items:center;gap:8px;padding:6px 12px;background:var(--background-primary-alt);border-radius:8px;box-shadow:0 2px 4px #0000001a}body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-legend-color{width:20px;height:20px;border-radius:4px;border:1px solid rgba(0,0,0,.1)}body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-legend-label{font-size:13px;font-weight:600;color:var(--text-normal)}body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-gradient{width:120px;height:16px;background:linear-gradient(to right,#fff,#061);border-radius:8px;box-shadow:0 2px 4px #0000001a}@media(max-width:768px){body.super-daily-notes-active .albus-super-daily-notes-week-header{grid-template-columns:40px repeat(7,1fr)}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-labels{width:40px}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-content,body.super-daily-notes-active .albus-super-daily-notes-month-header{grid-template-columns:repeat(7,1fr)}body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-container{grid-template-columns:repeat(3,1fr)}}@media(max-width:480px){body.super-daily-notes-active .albus-super-daily-notes-year-heatmap-container{grid-template-columns:1fr}body.super-daily-notes-active .albus-super-daily-notes-week-header{grid-template-columns:30px repeat(7,1fr);gap:2px}body.super-daily-notes-active .albus-super-daily-notes-week-timeline-labels{width:30px}body.super-daily-notes-active .albus-super-daily-notes-week-day-header{padding:6px}body.super-daily-notes-active .albus-super-daily-notes-week-day-date{font-size:14px}}@container (max-width: 750px){body.super-daily-notes-active .albus-super-daily-notes-view-mode-selector{display:none!important}body.super-daily-notes-active .albus-super-daily-notes-container{height:90vh}body.super-daily-notes-active .albus-super-daily-notes-planner-navigation{display:none}body.super-daily-notes-active .albus-super-daily-notes-planner-actions{align-self:center}}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes year-heatmap-pulse{0%{transform:scale(1)}50%{transform:scale(1.05)}to{transform:scale(1)}}@keyframes scaleIn{0%{opacity:0;transform:scale(.9) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}body.super-daily-notes-active .albus-super-daily-notes-stats-view{display:flex;flex-direction:column;height:100%;background:var(--background-primary);overflow:hidden}body.super-daily-notes-active .albus-super-daily-notes-stats-modal,body.super-daily-notes-active .albus-super-daily-notes-stats-modal .modal-content{padding:0}body.super-daily-notes-active .albus-super-daily-notes-stats-modal-wide{max-width:90vw!important;width:1400px!important;height:80vh!important}body.super-daily-notes-active .albus-super-daily-notes-stats-modal-header{display:flex;justify-content:center;align-items:center;padding:14px 18px;border-bottom:1px solid var(--albus-super-daily-notes-hairline)}body.super-daily-notes-active .albus-super-daily-notes-stats-modal-header-content{display:flex;align-items:center;gap:20px}body.super-daily-notes-active .albus-super-daily-notes-stats-modal-header h2{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-normal)}body.super-daily-notes-active .albus-super-daily-notes-stats-nav-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:8px;background:var(--background-modifier-hover);color:var(--text-normal);cursor:pointer;transition:background .2s ease,color .2s ease,transform .2s ease}body.super-daily-notes-active .albus-super-daily-notes-stats-nav-btn:hover{background:var(--background-modifier-active-hover);color:var(--interactive-accent)}body.super-daily-notes-active .albus-super-daily-notes-stats-nav-btn:active{transform:scale(.95)}body.super-daily-notes-active .albus-super-daily-notes-stats-nav-btn svg{width:16px;height:16px}body.super-daily-notes-active .albus-super-daily-notes-stats-modal-content{padding:16px;overflow-y:auto;overflow-x:hidden;display:flex;gap:16px;height:90%}body.super-daily-notes-active .albus-super-daily-notes-stats-left-column{flex:0 0 400px;display:flex;flex-direction:column;gap:16px;overflow-y:auto;overflow-x:hidden}body.super-daily-notes-active .albus-super-daily-notes-stats-right-column{flex:1;min-width:0;display:flex;flex-direction:column}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-row{display:flex;gap:10px;flex-shrink:0}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-card-small{flex:1;display:flex;align-items:center;gap:10px;padding:12px 14px;background-color:var(--background-primary);border-radius:10px;border:1px solid var(--background-modifier-border);transition:box-shadow .2s ease}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-card-small:hover{box-shadow:0 4px 12px #0000001a}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-icon-small{display:flex;align-items:center;justify-content:center;width:36px;height:36px;background-color:var(--background-primary);border-radius:8px;flex-shrink:0;color:var(--interactive-accent)}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-icon-small svg{width:20px;height:20px}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-info-small{display:flex;flex-direction:column;flex:1;min-width:0}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-value-small{font-size:.95rem;font-weight:700;color:var(--text-normal);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-label-small{font-size:10px;color:var(--text-muted);font-weight:500}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-card{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--interactive-accent);border-radius:10px;color:#fff;margin-bottom:16px;box-shadow:0 2px 8px #0000001a}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-icon{display:flex;align-items:center;justify-content:center;width:36px;height:36px;background-color:#fff3;border-radius:50%;flex-shrink:0}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-icon svg{width:20px;height:20px}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-info{display:flex;flex-direction:column;flex:1}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-label{font-size:11px;opacity:.9;margin-bottom:2px}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-duration{font-size:1.1rem;font-weight:700;margin-bottom:2px}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-range{font-size:11px;opacity:.85;font-weight:500}body.super-daily-notes-active .albus-super-daily-notes-stats-distribution-container{background-color:var(--background-primary);border-radius:10px;padding:14px;border:1px solid var(--background-modifier-border);overflow:hidden;height:100%!important}body.super-daily-notes-active .albus-super-daily-notes-stats-distribution-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--albus-super-daily-notes-hairline)}body.super-daily-notes-active .albus-super-daily-notes-stats-distribution-header h4{margin:0;font-size:.9rem;font-weight:600;color:var(--text-normal)}body.super-daily-notes-active .albus-super-daily-notes-stats-distribution-count{font-size:11px;color:var(--text-muted);background-color:var(--background-primary-alt);padding:3px 8px;border-radius:5px;font-weight:500}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;max-height:450px;overflow-y:auto;overflow-x:hidden;padding:2px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-grid::-webkit-scrollbar{width:5px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-grid::-webkit-scrollbar-track{background:var(--background-primary-alt);border-radius:3px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-grid::-webkit-scrollbar-thumb{background:var(--background-modifier-border);border-radius:3px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-grid::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-card{padding:10px 12px;background-color:var(--background-primary-alt);border-radius:8px;border:1px solid var(--background-modifier-border);border-left-width:3px;transition:background-color .2s ease,box-shadow .2s ease;display:flex;flex-direction:column;gap:8px;min-height:80px;position:relative;overflow:hidden}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-card:hover{background-color:var(--background-modifier-hover);box-shadow:0 4px 12px #0000001a}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-card.albus-super-daily-notes-active{outline:2px solid var(--interactive-accent);outline-offset:-2px;box-shadow:none}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-watermark{position:absolute;top:20%;right:8px;transform:translateY(-50%);font-size:18px;font-weight:900;opacity:1;pointer-events:none;user-select:none;line-height:1}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-header{display:flex;align-items:center;gap:6px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-color{width:12px;height:12px;border-radius:3px;flex-shrink:0;box-shadow:0 1px 3px #00000026}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-name{font-weight:700;font-size:13px;color:var(--text-normal)}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-stats{display:flex;flex-direction:column;gap:4px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-duration{font-weight:700;font-size:13px;color:var(--text-normal)}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-count{font-size:11px;color:var(--text-faint);font-weight:500}body.super-daily-notes-active .albus-super-daily-notes-stats-no-data{text-align:center;padding:40px 20px;color:var(--text-muted);font-size:14px}@media(max-width:768px){body.super-daily-notes-active .albus-super-daily-notes-stats-modal-content{padding:16px;max-height:60vh}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-card{padding:16px;gap:12px}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-icon{width:40px;height:40px}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-icon svg{width:24px;height:24px}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-duration{font-size:1.3rem}body.super-daily-notes-active .albus-super-daily-notes-stats-distribution-container{padding:16px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;max-height:350px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-card{padding:10px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-duration{font-size:12px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-watermark{font-size:35px}}@media(max-width:480px){body.super-daily-notes-active .albus-super-daily-notes-stats-modal-header{padding:16px}body.super-daily-notes-active .albus-super-daily-notes-stats-modal-header h2{font-size:1.1rem}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-duration{font-size:1.2rem}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-grid{grid-template-columns:repeat(auto-fill,minmax(100px,1fr));max-height:300px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-watermark{font-size:30px}body.super-daily-notes-active .albus-super-daily-notes-stats-modal-content{flex-direction:column}body.super-daily-notes-active .albus-super-daily-notes-stats-left-column{flex:1}body.super-daily-notes-active .albus-super-daily-notes-stats-right-column{flex:1;min-height:300px}}body.super-daily-notes-active .albus-super-daily-notes-stats-chart-container{background-color:var(--background-primary);border-radius:10px;padding:14px;border:1px solid var(--background-modifier-border);flex:1;display:flex;flex-direction:column;min-height:400px;overflow:hidden;height:100%!important}body.super-daily-notes-active .albus-super-daily-notes-stats-chart-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--albus-super-daily-notes-hairline)}body.super-daily-notes-active .albus-super-daily-notes-stats-chart-header .albus-super-daily-notes-view-mode-btn{border:1px solid var(--albus-super-daily-notes-hairline)!important;background:var(--background-primary)!important;box-shadow:none!important}body.super-daily-notes-active .albus-super-daily-notes-stats-chart-header h3{margin:0;font-size:.95rem;font-weight:600}body.super-daily-notes-active .albus-super-daily-notes-stats-chart-range{font-size:11px;color:var(--text-muted);background-color:var(--background-primary-alt);padding:3px 8px;border-radius:5px;font-weight:500}body.super-daily-notes-active .albus-super-daily-notes-stats-chart-canvas{flex:1;width:100%;min-height:300px}body.super-daily-notes-active .albus-super-daily-notes-stats-no-chart{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;color:var(--text-muted);text-align:center;gap:12px;padding:40px 20px;background-color:var(--background-primary);border-radius:10px;border:1px solid var(--background-modifier-border)}body.super-daily-notes-active .albus-super-daily-notes-stats-no-chart p{margin:0;font-size:14px}@media(max-width:1200px){body.super-daily-notes-active .albus-super-daily-notes-stats-left-column{flex:0 0 350px}}@media(max-width:1024px){body.super-daily-notes-active .albus-super-daily-notes-stats-modal-content{flex-direction:column}body.super-daily-notes-active .albus-super-daily-notes-stats-left-column,body.super-daily-notes-active .albus-super-daily-notes-stats-right-column{flex:1;width:100%}body.super-daily-notes-active .albus-super-daily-notes-stats-chart-container{min-height:350px}}@media(max-width:768px){body.super-daily-notes-active .albus-super-daily-notes-stats-summary-row{flex-direction:column}body.super-daily-notes-active .albus-super-daily-notes-stats-chart-container{min-height:300px}body.super-daily-notes-active .albus-super-daily-notes-stats-tag-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}}body.super-daily-notes-active .albus-super-daily-notes-stats-day-summary{flex-direction:row;gap:16px;margin-bottom:8px}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-card-day{flex:1;display:flex;align-items:center;gap:14px;padding:18px 20px;background:linear-gradient(135deg,var(--background-primary-alt) 0%,var(--background-modifier-hover) 100%);border-radius:14px;border:1px solid var(--background-modifier-border);transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease;min-width:0}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-card-day:hover{transform:translateY(-2px);box-shadow:0 6px 20px #0000001f;border-color:var(--interactive-accent-hover)}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-icon-day{display:flex;align-items:center;justify-content:center;width:52px;height:52px;background:linear-gradient(135deg,var(--interactive-accent) 0%,var(--interactive-accent-hover) 100%);border-radius:12px;flex-shrink:0;color:#fff;box-shadow:0 4px 12px rgba(var(--interactive-accent-rgb),.3)}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-icon-day svg{width:28px;height:28px}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-info-day{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-value-day{font-size:1.35rem;font-weight:700;color:var(--text-normal);line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-label-day{font-size:12px;color:var(--text-muted);font-weight:500;letter-spacing:.02em}body.super-daily-notes-active .albus-super-daily-notes-stats-top-task-name{font-size:1.1rem;font-weight:600}@media(max-width:600px){body.super-daily-notes-active .albus-super-daily-notes-stats-day-summary{flex-direction:column}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-card-day{padding:14px 16px}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-icon-day{width:44px;height:44px}body.super-daily-notes-active .albus-super-daily-notes-stats-summary-value-day{font-size:1.15rem}}body.super-daily-notes-active .albus-super-daily-notes-gantt-view{padding:0;overflow:auto;height:100%;position:relative;display:flex;flex-direction:column}body.super-daily-notes-active .albus-super-daily-notes-gantt-body{flex:1;position:relative}body.super-daily-notes-active .albus-super-daily-notes-gantt-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;color:var(--text-muted);font-size:14px;gap:8px}body.super-daily-notes-active .albus-super-daily-notes-gantt-empty-hint{font-size:12px;opacity:.7}body.super-daily-notes-active .albus-super-daily-notes-gantt-header-row{display:flex;position:sticky;top:0;z-index:5;background:var(--background-primary);border-bottom:1px solid var(--albus-super-daily-notes-hairline);box-shadow:var(--albus-super-daily-notes-header-shadow)}body.super-daily-notes-active .albus-super-daily-notes-gantt-header-label{font-weight:600;font-size:11px;color:var(--text-muted);display:flex;align-items:center;justify-content:center}body.super-daily-notes-active .albus-super-daily-notes-gantt-day-header{flex:1;min-width:24px;text-align:center;font-size:11px;font-weight:500;padding:6px 0 4px;color:var(--text-normal);user-select:none;cursor:pointer;border-left:none;border-right:none;display:flex;flex-direction:column;align-items:center;gap:1px;background:var(--background-primary)}body.super-daily-notes-active .albus-super-daily-notes-gantt-day-number{line-height:1.2}body.super-daily-notes-active .albus-super-daily-notes-gantt-day-weekday{font-size:9px;color:var(--text-faint);font-weight:400;line-height:1}body.super-daily-notes-active .albus-super-daily-notes-gantt-day-header:hover{background:var(--background-modifier-hover)}body.super-daily-notes-active .albus-super-daily-notes-gantt-day-header.albus-super-daily-notes-gantt-weekend{color:var(--text-muted)}body.super-daily-notes-active .albus-super-daily-notes-gantt-day-header.albus-super-daily-notes-gantt-today{color:var(--text-accent);font-weight:700;border-radius:0}body.super-daily-notes-active .albus-super-daily-notes-gantt-day-header.albus-super-daily-notes-gantt-header-selected{background:rgba(var(--interactive-accent-rgb),.25);color:var(--text-accent);font-weight:600}body.super-daily-notes-active .albus-super-daily-notes-gantt-day-header.albus-super-daily-notes-gantt-today.albus-super-daily-notes-gantt-header-selected{background:rgba(var(--interactive-accent-rgb),.25);color:var(--text-accent)}body.super-daily-notes-active .albus-super-daily-notes-gantt-drag-preview{position:absolute;height:100%;top:0;border:2px dashed var(--interactive-accent);background:rgba(var(--interactive-accent-rgb),.12);border-radius:6px;z-index:10;pointer-events:none;box-sizing:border-box}body.super-daily-notes-active .albus-super-daily-notes-gantt-row{display:flex;border-bottom:1px solid var(--background-modifier-border);min-height:36px;transition:background .1s ease,transform .22s cubic-bezier(.22,1,.36,1);position:relative}body.super-daily-notes-active .albus-super-daily-notes-gantt-row.albus-super-daily-notes-gantt-row-reordering{z-index:2;will-change:transform}body.super-daily-notes-active .albus-super-daily-notes-gantt-row:hover{background:var(--background-modifier-hover)}body.super-daily-notes-active .albus-super-daily-notes-gantt-row-highlight{position:relative}body.super-daily-notes-active .albus-super-daily-notes-gantt-row-highlight:before{content:"";position:absolute;inset:0;background-color:var(--interactive-accent);animation:gantt-row-highlight-fade 3s ease-out forwards;pointer-events:none;z-index:0}body.super-daily-notes-active .albus-super-daily-notes-gantt-row-highlight>*{position:relative;z-index:1}body.super-daily-notes-active .albus-super-daily-notes-gantt-label-cell{width:160px;min-width:160px;max-width:160px;padding:4px 8px;display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-normal);border-right:1px solid var(--albus-super-daily-notes-hairline);cursor:pointer;overflow:hidden;background:var(--background-primary);position:sticky;left:0;z-index:3}body.super-daily-notes-active .albus-super-daily-notes-gantt-label-cell:hover{background:var(--background-modifier-hover)}body.super-daily-notes-active .albus-super-daily-notes-gantt-tag-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}body.super-daily-notes-active .albus-super-daily-notes-gantt-label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}body.super-daily-notes-active .albus-super-daily-notes-gantt-label-text.albus-super-daily-notes-completed{text-decoration:line-through;opacity:.6}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar-area{flex:1;position:relative;min-height:36px;overflow:visible}body.super-daily-notes-active .albus-super-daily-notes-gantt-row-placeholder .albus-super-daily-notes-gantt-label-cell{cursor:default;background:var(--background-primary)}body.super-daily-notes-active .albus-super-daily-notes-gantt-row-placeholder .albus-super-daily-notes-gantt-label-cell:hover{background:var(--background-primary)}body.super-daily-notes-active .albus-super-daily-notes-gantt-gridline{position:absolute;top:0;bottom:0;width:0;border-left:1px dashed var(--background-modifier-border);opacity:.35;z-index:0;pointer-events:none}body.super-daily-notes-active .albus-super-daily-notes-gantt-weekend-stripe{position:absolute;top:0;bottom:0;background:var(--background-secondary);z-index:0;pointer-events:none}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar{position:absolute;top:50%;transform:translateY(-50%);height:20px;border-radius:0;z-index:2;pointer-events:auto;cursor:pointer;transition:filter .15s}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar:hover{filter:brightness(1.1)}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar.albus-super-daily-notes-gantt-bar-dragging{opacity:.7;transition:none}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar-handle{position:absolute;top:-3px;bottom:-3px;width:10px;cursor:ew-resize;z-index:3;opacity:0;transition:opacity .2s ease;border-radius:3px;background:var(--background-primary);border:1px solid var(--background-modifier-border);box-shadow:0 1px 3px #0000001f;display:flex;align-items:center;justify-content:center}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar-handle:after{content:"";width:4px;height:10px;background-image:radial-gradient(circle,var(--text-muted) 1px,transparent 1px);background-size:4px 4px;background-position:center;opacity:.7}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar:hover .albus-super-daily-notes-gantt-bar-handle{opacity:1}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar-handle:hover{background:var(--background-primary-alt);border-color:var(--interactive-accent);box-shadow:0 0 0 2px rgba(var(--interactive-accent-rgb),.2),0 1px 3px #00000026}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar-handle:hover:after{opacity:1}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar-handle-left{left:-5px}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar-handle-right{right:-5px}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar.albus-super-daily-notes-gantt-bar-start{border-radius:10px 0 0 10px}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar.albus-super-daily-notes-gantt-bar-end{border-radius:0 10px 10px 0}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar.albus-super-daily-notes-gantt-bar-start.albus-super-daily-notes-gantt-bar-end{border-radius:4px}body.super-daily-notes-active .albus-super-daily-notes-gantt-bar.albus-super-daily-notes-gantt-bar-completed{opacity:.5}body.super-daily-notes-active .albus-super-daily-notes-gantt-row:hover .albus-super-daily-notes-gantt-bar{box-shadow:0 1px 4px #0003}body.super-daily-notes-active .albus-super-daily-notes-gantt-today-line{position:absolute;top:0;bottom:0;width:2px;background:var(--interactive-accent);z-index:4;pointer-events:none}body.super-daily-notes-active .albus-super-daily-notes-gantt-today-line:before{content:"";position:absolute;top:-2px;left:-5px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:8px solid var(--interactive-accent);background:none;border-radius:0;box-shadow:none;width:0;height:0}@media(max-width:800px){body.super-daily-notes-active .albus-super-daily-notes-gantt-label-cell{width:100px;min-width:100px;max-width:100px;font-size:11px}body.super-daily-notes-active .albus-super-daily-notes-gantt-day-header{min-width:18px}}@keyframes gantt-row-highlight-fade{0%{opacity:.18}70%{opacity:.18}to{opacity:0}}body.super-daily-notes-active .albus-super-daily-notes-habit-view{padding:10px 14px 16px;display:flex;flex-direction:column;gap:10px}body.super-daily-notes-active .albus-super-daily-notes-habit-empty{display:flex;align-items:center;justify-content:center;padding:60px 20px;color:var(--text-muted);font-size:14px}body.super-daily-notes-active .albus-super-daily-notes-habit-year-summary{display:flex;justify-content:center;gap:36px;padding:8px 0 4px}body.super-daily-notes-active .albus-super-daily-notes-habit-stat{display:flex;flex-direction:column;align-items:center;gap:2px}body.super-daily-notes-active .albus-super-daily-notes-habit-stat-value{font-size:22px;font-weight:700;color:var(--text-normal);line-height:1;font-variant-numeric:tabular-nums}body.super-daily-notes-active .albus-super-daily-notes-habit-stat-label{font-size:11px;color:var(--text-muted)}body.super-daily-notes-active .albus-super-daily-notes-habit-year-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px 12px}@container (max-width: 1200px){body.super-daily-notes-active .albus-super-daily-notes-habit-year-grid{grid-template-columns:repeat(4,1fr)}}@container (max-width: 560px){body.super-daily-notes-active .albus-super-daily-notes-habit-year-grid{grid-template-columns:repeat(3,1fr)}}body.super-daily-notes-active .albus-super-daily-notes-habit-month{display:flex;flex-direction:column;gap:2px}body.super-daily-notes-active .albus-super-daily-notes-habit-month-label{font-size:11px;font-weight:600;color:var(--text-muted);text-align:center;padding:2px 0;line-height:1}body.super-daily-notes-active .albus-super-daily-notes-habit-month-label.is-current{color:var(--interactive-accent);font-weight:700}body.super-daily-notes-active .albus-super-daily-notes-habit-wkheader{display:grid;grid-template-columns:repeat(7,1fr);gap:1px}body.super-daily-notes-active .albus-super-daily-notes-habit-wkday{font-size:9px;color:var(--text-faint);text-align:center;line-height:1;padding:1px 0}body.super-daily-notes-active .albus-super-daily-notes-habit-days{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}body.super-daily-notes-active .albus-super-daily-notes-habit-day{aspect-ratio:1;border-radius:3px;display:flex;align-items:center;justify-content:center;font-size:9px;color:var(--text-faint);background:var(--background-secondary);cursor:pointer;user-select:none;font-variant-numeric:tabular-nums;transition:background .1s ease;position:relative}body.super-daily-notes-active .albus-super-daily-notes-habit-day:hover:not(.is-future):not(.is-empty):not(.is-done){background:var(--background-modifier-hover)}body.super-daily-notes-active .albus-super-daily-notes-habit-day.is-empty{cursor:default;background:transparent}body.super-daily-notes-active .albus-super-daily-notes-habit-day.is-done{background:var(--interactive-accent);color:var(--text-on-accent);font-weight:600}body.super-daily-notes-active .albus-super-daily-notes-habit-day.is-today:after{content:"";position:absolute;bottom:1px;left:50%;transform:translate(-50%);width:3px;height:3px;border-radius:50%;background:var(--interactive-accent)}body.super-daily-notes-active .albus-super-daily-notes-habit-day.is-today.is-done:after{background:var(--text-on-accent)}body.super-daily-notes-active .albus-super-daily-notes-habit-day.is-future{opacity:.2;cursor:default}body.super-daily-notes-active .albus-super-daily-notes-journal-month-view{display:flex;flex-direction:column}body.super-daily-notes-active .albus-super-daily-notes-journal-month-week{display:grid;grid-template-columns:repeat(7,1fr);border-bottom:1px solid var(--albus-super-daily-notes-hairline);height:120px}body.super-daily-notes-active .albus-super-daily-notes-journal-month-day{border-right:1px solid var(--albus-super-daily-notes-hairline);padding:4px;display:flex;flex-direction:column;gap:2px;cursor:pointer;overflow:hidden;transition:background .1s ease;position:relative}body.super-daily-notes-active .albus-super-daily-notes-journal-month-day:last-child{border-right:none}body.super-daily-notes-active .albus-super-daily-notes-journal-month-day:hover{background:var(--background-modifier-hover)}body.super-daily-notes-active .albus-super-daily-notes-journal-month-day.is-other-month{opacity:.35;cursor:default}body.super-daily-notes-active .albus-super-daily-notes-journal-month-day.has-journal{border-left:3px solid var(--interactive-accent)}body.super-daily-notes-active .albus-super-daily-notes-journal-day-number.is-today-number{background:var(--interactive-accent);color:var(--text-on-accent);border-radius:50%;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;font-weight:700}body.super-daily-notes-active .albus-super-daily-notes-journal-day-header{display:flex;align-items:center;gap:4px}body.super-daily-notes-active .albus-super-daily-notes-journal-day-number{font-size:12px;font-weight:500;color:var(--text-muted);line-height:1}body.super-daily-notes-active .albus-super-daily-notes-journal-month-day.has-bg-image{background-size:cover;background-position:center;background-repeat:no-repeat}body.super-daily-notes-active .albus-super-daily-notes-journal-month-day.has-bg-image .albus-super-daily-notes-journal-day-header{position:relative;z-index:1}body.super-daily-notes-active .albus-super-daily-notes-journal-month-day.has-bg-image .albus-super-daily-notes-journal-day-number{background:#00000073;color:#fff;border-radius:4px;padding:1px 4px}body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview{flex:1;min-height:0;font-size:10px;color:var(--text-muted);line-height:1.3;overflow-y:auto;word-break:break-word}body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview p,body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview ul,body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview ol,body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview li,body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview blockquote,body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview h1,body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview h2,body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview h3,body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview h4,body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview h5,body.super-daily-notes-active .albus-super-daily-notes-journal-day-preview h6{display:inline;margin:0;padding:0;font-size:inherit;font-weight:inherit}body.super-daily-notes-active .albus-super-daily-notes-journal-day-placeholder{flex:1;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease;color:var(--text-faint)}body.super-daily-notes-active .albus-super-daily-notes-journal-day-placeholder svg{width:18px;height:18px}body.super-daily-notes-active .albus-super-daily-notes-journal-month-day.is-current-month:hover .albus-super-daily-notes-journal-day-placeholder{opacity:1}body.super-daily-notes-active .albus-super-daily-notes-journal-day-view{padding:16px;display:flex;flex-direction:row;gap:16px;height:100%;box-sizing:border-box;background:var(--background-primary);overflow:hidden}body.super-daily-notes-active .albus-super-daily-notes-journal-section-title{font-size:.9rem;font-weight:600;color:var(--text-normal);padding-bottom:8px;margin-bottom:12px;border-bottom:1px solid var(--albus-super-daily-notes-hairline);flex-shrink:0;display:none}body.super-daily-notes-active .albus-super-daily-notes-journal-today-section{flex:7;min-width:0;display:flex;flex-direction:column;overflow:hidden}body.super-daily-notes-active .albus-super-daily-notes-journal-today-section>.albus-super-daily-notes-journal-card{flex:1;min-height:0;display:flex;flex-direction:column}body.super-daily-notes-active .albus-super-daily-notes-journal-today-section>.albus-super-daily-notes-journal-card .albus-super-daily-notes-journal-card-content{flex:1;min-height:0;max-height:none}body.super-daily-notes-active .albus-super-daily-notes-journal-today-section>.albus-super-daily-notes-journal-card .albus-super-daily-notes-journal-card-empty-area{flex:1}body.super-daily-notes-active .albus-super-daily-notes-journal-history-section{flex:3;min-width:0;display:flex;flex-direction:column;overflow:hidden}body.super-daily-notes-active .albus-super-daily-notes-journal-history-section .albus-super-daily-notes-journal-card{cursor:pointer}body.super-daily-notes-active .albus-super-daily-notes-journal-history-grid{display:flex;flex-direction:column;gap:10px;overflow-y:auto;flex:1;min-height:0}body.super-daily-notes-active .albus-super-daily-notes-journal-history-empty-text{flex:1;display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:13px}body.super-daily-notes-active .albus-super-daily-notes-journal-card{background-color:var(--background-primary);border-radius:10px;padding:14px 16px;transition:box-shadow .2s ease;border:1px solid var(--background-modifier-border)}body.super-daily-notes-active .albus-super-daily-notes-journal-card:hover{box-shadow:0 4px 12px #0000001a}body.super-daily-notes-active .albus-super-daily-notes-journal-card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid var(--albus-super-daily-notes-hairline)}body.super-daily-notes-active .albus-super-daily-notes-journal-card-header>.albus-super-daily-notes-view-mode-btn{width:32px;min-width:32px;padding:0;border:1px solid var(--albus-super-daily-notes-hairline)!important;border-radius:8px;background:var(--background-primary)!important;color:var(--icon-color)}body.super-daily-notes-active .albus-super-daily-notes-journal-card-header>.albus-super-daily-notes-view-mode-btn:hover{background:var(--background-modifier-hover)!important;border-color:var(--background-modifier-border-hover)!important;color:var(--icon-color)}body.super-daily-notes-active .albus-super-daily-notes-journal-card-header>.albus-super-daily-notes-view-mode-btn svg{color:currentColor}body.super-daily-notes-active .albus-super-daily-notes-journal-card-title{font-size:.9rem;font-weight:600;color:var(--text-normal)}body.super-daily-notes-active .albus-super-daily-notes-journal-card-content{line-height:1.5;max-height:200px;overflow-y:auto}body.super-daily-notes-active .albus-super-daily-notes-journal-card-content img{max-width:100%;border-radius:4px;margin:4px 0}body.super-daily-notes-active .albus-super-daily-notes-journal-card-empty-area{display:flex;align-items:center;justify-content:center;padding:24px 0;color:var(--text-muted);font-size:13px}body.super-daily-notes-active .albus-super-daily-notes-journal-modal.modal{max-width:min(80vw,960px);width:100%;height:85vh;max-height:85vh;overflow:hidden}body.super-daily-notes-active .albus-super-daily-notes-journal-modal .modal-content{height:100%;display:flex;flex-direction:column;overflow:hidden}body.super-daily-notes-active .albus-super-daily-notes-journal-modal-content{line-height:1.6;flex:1;min-height:0;overflow-y:auto}body.super-daily-notes-active .albus-super-daily-notes-journal-modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;flex-shrink:0;padding:8px 0}body.super-daily-notes-active .albus-super-daily-notes-journal-modal-title{margin:0;font-size:18px;font-weight:600}body.super-daily-notes-active .albus-super-daily-notes-journal-modal-edit-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--background-modifier-border);border-radius:8px;background:var(--background-primary);cursor:pointer;color:var(--text-muted);transition:color .15s ease,background-color .15s ease,border-color .15s ease}body.super-daily-notes-active .albus-super-daily-notes-journal-modal-edit-btn:hover{background:var(--background-modifier-hover);border-color:var(--background-modifier-border-hover);color:var(--interactive-accent)}body.super-daily-notes-active .albus-super-daily-notes-journal-modal-content img{max-width:100%;border-radius:4px;margin:8px 0}body.super-daily-notes-active .albus-super-daily-notes-journal-modal-empty{color:var(--text-faint);font-style:italic;padding:20px 0}body.super-daily-notes-active .albus-super-daily-notes-journal-modal-editor-container{flex:1;min-height:0;overflow-y:auto;border:1px solid var(--background-modifier-border);border-radius:6px;padding:4px}body.super-daily-notes-active .albus-super-daily-notes-journal-modal-editor-container .markdown-source-view,body.super-daily-notes-active .albus-super-daily-notes-journal-modal-editor-container .cm-editor,body.super-daily-notes-active .albus-super-daily-notes-journal-today-section .albus-super-daily-notes-journal-card-content .markdown-source-view,body.super-daily-notes-active .albus-super-daily-notes-journal-today-section .albus-super-daily-notes-journal-card-content .cm-editor{height:100%}body.super-daily-notes-active .albus-super-daily-notes-journal-today-section .albus-super-daily-notes-journal-card-content{max-height:none}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container{position:fixed;z-index:10000;transition:transform .2s ease;overflow:visible!important;will-change:transform}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-dragging{cursor:grabbing}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-near-edge .albus-super-daily-notes-floating-timer-main-area{box-shadow:0 0 15px rgba(var(--interactive-accent-rgb),.5);transform:scale(.95)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped .albus-super-daily-notes-floating-timer-main-area{transition:border-radius .3s cubic-bezier(.4,0,.2,1),padding .3s cubic-bezier(.4,0,.2,1),box-shadow .3s ease,transform .3s ease}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped .albus-super-daily-notes-floating-timer-display{transition:border-radius .3s cubic-bezier(.4,0,.2,1),padding .3s cubic-bezier(.4,0,.2,1),min-width .3s cubic-bezier(.4,0,.2,1),transform .3s ease,box-shadow .3s ease}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-left .albus-super-daily-notes-floating-timer-main-area{border-radius:0 12px 12px 0;padding:6px 4px 6px 0}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-left .albus-super-daily-notes-floating-timer-display{border-radius:0 6px 6px 0;padding:8px 6px 8px 4px;min-width:24px;writing-mode:vertical-rl;text-orientation:mixed}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-left .albus-super-daily-notes-floating-timer-display.albus-super-daily-notes-timing:before{top:-200%;left:-200%;width:500%;height:500%}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-left .albus-super-daily-notes-floating-timer-text{font-size:12px;letter-spacing:2px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-left .albus-super-daily-notes-floating-timer-tag,body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-left .albus-super-daily-notes-floating-timer-start-time{display:none}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-left .albus-super-daily-notes-floating-timer-permanent-controls{flex-direction:column;gap:2px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-left .albus-super-daily-notes-floating-timer-control-btn{width:20px;height:20px;min-width:20px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-left .albus-super-daily-notes-floating-timer-control-btn svg{width:10px;height:10px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-right .albus-super-daily-notes-floating-timer-main-area{border-radius:12px 0 0 12px;padding:6px 0 6px 4px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-right .albus-super-daily-notes-floating-timer-display{border-radius:6px 0 0 6px;padding:8px 4px 8px 6px;min-width:24px;writing-mode:vertical-rl;text-orientation:mixed}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-right .albus-super-daily-notes-floating-timer-display.albus-super-daily-notes-timing:before{top:-200%;left:-200%;width:500%;height:500%}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-right .albus-super-daily-notes-floating-timer-text{font-size:12px;letter-spacing:2px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-right .albus-super-daily-notes-floating-timer-tag,body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-right .albus-super-daily-notes-floating-timer-start-time{display:none}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-right .albus-super-daily-notes-floating-timer-permanent-controls{flex-direction:column;gap:2px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-right .albus-super-daily-notes-floating-timer-control-btn{width:20px;height:20px;min-width:20px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-right .albus-super-daily-notes-floating-timer-control-btn svg{width:10px;height:10px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-top .albus-super-daily-notes-floating-timer-main-area{border-radius:0 0 12px 12px;padding:0 6px 4px;flex-direction:row;align-items:center}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-top .albus-super-daily-notes-floating-timer-display{border-radius:0 0 6px 6px;padding:2px 12px 4px;min-width:auto;flex-direction:row;gap:8px;overflow:hidden!important}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-top .albus-super-daily-notes-floating-timer-display.albus-super-daily-notes-timing:before{top:-200%;left:-200%;width:500%;height:500%}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-top .albus-super-daily-notes-floating-timer-text{font-size:12px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-top .albus-super-daily-notes-floating-timer-tag{margin-top:0;font-size:9px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-top .albus-super-daily-notes-floating-timer-start-time{display:none}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-top .albus-super-daily-notes-floating-timer-permanent-controls{flex-direction:row;gap:2px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-top .albus-super-daily-notes-floating-timer-control-btn{width:20px;height:20px;min-width:20px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-top .albus-super-daily-notes-floating-timer-control-btn svg{width:10px;height:10px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-bottom .albus-super-daily-notes-floating-timer-main-area{border-radius:12px 12px 0 0;padding:4px 6px 0;flex-direction:row;align-items:center}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-bottom .albus-super-daily-notes-floating-timer-display{border-radius:6px 6px 0 0;padding:4px 12px 2px;min-width:auto;flex-direction:row;gap:8px;overflow:hidden!important}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-bottom .albus-super-daily-notes-floating-timer-display.albus-super-daily-notes-timing:before{top:-200%;left:-200%;width:500%;height:500%}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-bottom .albus-super-daily-notes-floating-timer-text{font-size:12px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-bottom .albus-super-daily-notes-floating-timer-tag{margin-top:0;font-size:9px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-bottom .albus-super-daily-notes-floating-timer-start-time{display:none}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-bottom .albus-super-daily-notes-floating-timer-permanent-controls{flex-direction:row;gap:2px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-bottom .albus-super-daily-notes-floating-timer-control-btn{width:20px;height:20px;min-width:20px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped-bottom .albus-super-daily-notes-floating-timer-control-btn svg{width:10px;height:10px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-snapped:hover .albus-super-daily-notes-floating-timer-main-area{transform:scale(1.05)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-main-area{background:var(--background-primary);border-radius:12px;box-shadow:0 2px 12px #0000001a;padding:8px;display:flex;flex-direction:column;gap:6px;cursor:grab;transition:border-radius .6s cubic-bezier(.4,0,.2,1),padding .6s cubic-bezier(.4,0,.2,1),box-shadow .3s ease,transform .3s ease;border:1px solid var(--background-modifier-border);position:relative;overflow:visible!important}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-display.albus-super-daily-notes-timing{position:relative;overflow:hidden;background:transparent;will-change:transform}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-display.albus-super-daily-notes-timing:before{content:"";position:absolute;top:-100%;left:-100%;width:300%;height:300%;background:conic-gradient(from 0deg,#ff0080,#ff8c00,#40e0d0,#4169e1,#9370db,#ff1493,#ff0080 360deg);animation:rotateGradient 3s linear infinite;z-index:0}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-display.albus-super-daily-notes-timing:after{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(var(--interactive-accent-rgb),.9),rgba(var(--interactive-accent-rgb),.7));border-radius:inherit;z-index:0}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-main-area:hover{box-shadow:0 3px 15px #00000026}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-dragging .albus-super-daily-notes-floating-timer-main-area{cursor:grabbing;box-shadow:0 8px 30px #00000040}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-display{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px 16px;background:linear-gradient(135deg,var(--interactive-accent),var(--interactive-accent-hover));border-radius:8px;cursor:pointer;transition:border-radius .6s cubic-bezier(.4,0,.2,1),padding .6s cubic-bezier(.4,0,.2,1),min-width .6s cubic-bezier(.4,0,.2,1),transform .3s ease,box-shadow .3s ease;user-select:none;position:relative;min-width:80px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-display:hover{transform:scale(1.02);box-shadow:0 4px 15px #00000026}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-display.albus-super-daily-notes-active{animation:breathing 2s ease-in-out infinite}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-text{font-size:16px;font-weight:700;color:#fff;line-height:1;letter-spacing:.5px;position:relative;z-index:10}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-tag{font-size:10px;color:#ffffffe6;margin-top:4px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;position:relative;z-index:10}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-start-time{font-size:9px;color:#fff9;margin-top:2px;text-align:center;white-space:nowrap;position:relative;z-index:10;line-height:1;min-height:0}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-start-time:empty{display:none}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-menu{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:350px;height:350px;pointer-events:none}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-menu-open .albus-super-daily-notes-floating-timer-display,body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-menu-open .albus-super-daily-notes-floating-timer-text,body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-menu-open .albus-super-daily-notes-floating-timer-tag,body.super-daily-notes-active .albus-super-daily-notes-floating-timer-container.albus-super-daily-notes-menu-open .albus-super-daily-notes-floating-timer-control-btn{z-index:-1}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-menu.albus-super-daily-notes-opening .albus-super-daily-notes-floating-timer-btn,body.super-daily-notes-active .albus-super-daily-notes-floating-timer-menu.albus-super-daily-notes-closing .albus-super-daily-notes-floating-timer-btn{transition:transform .3s cubic-bezier(.175,.885,.32,1.275),opacity .3s cubic-bezier(.175,.885,.32,1.275)!important}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input-container{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%);width:auto;min-width:100px;pointer-events:auto;z-index:100;display:flex;align-items:center;justify-content:center;height:65px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input{width:100px;height:65px;border:1px solid var(--background-modifier-border);border-radius:6px;background:var(--background-secondary);outline:none;transition:background .2s ease,border-color .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease;box-shadow:none;overflow:hidden}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input .cm-editor{height:100%}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input .cm-gutters{display:none!important}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input .cm-scroller{height:65px;overflow-y:auto!important;padding:8px 10px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input .cm-content,body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input .cm-line{color:var(--text-normal);padding:0}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input .cm-cursor,body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input .cm-dropCursor{border-left-color:var(--interactive-accent)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input:hover{background:var(--interactive-hover);border-color:var(--interactive-accent)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input:focus-within{background:var(--background-primary);border-color:var(--interactive-accent);box-shadow:0 0 0 1px rgba(var(--interactive-accent-rgb),.22)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-confirm-container{position:absolute;top:60%;left:50%;transform:translate(-50%,-50%);pointer-events:auto;z-index:100;display:flex;align-items:center;justify-content:center}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-confirm-btn{min-width:60px;padding:6px 16px;border:1px solid var(--background-modifier-border);border-radius:6px;background:var(--background-secondary);color:#3b82f6;font-size:13px;font-weight:600;text-align:center;cursor:pointer;outline:none;transition:background .2s ease,border-color .2s ease,color .2s ease,transform .2s ease;box-shadow:none}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-confirm-btn:hover{background:var(--interactive-hover);border-color:#3b82f6;color:#2563eb}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-confirm-btn:active{transform:scale(.95)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn{position:absolute;width:50px;height:50px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;pointer-events:auto;box-shadow:0 3px 15px #0003;top:50%;left:50%;opacity:0;animation:buttonAppear .5s cubic-bezier(.175,.885,.32,1.275) forwards;animation-delay:var(--delay, 0s)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-menu.albus-super-daily-notes-closing .albus-super-daily-notes-floating-timer-btn{animation:buttonDisappear .3s cubic-bezier(.175,.885,.32,1.275) forwards}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn:hover{transform:translate(calc(-50% + var(--x, 0px)),calc(-50% + var(--y, 0px))) scale(1.15)!important;box-shadow:0 5px 20px #0000004d;transition:transform .2s ease,box-shadow .2s ease}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-icon{font-size:24px;color:#fff;line-height:1}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-start{background:linear-gradient(135deg,#10b981,#059669)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-start:hover{background:linear-gradient(135deg,#059669,#047857)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-reset{background:linear-gradient(135deg,#f59e0b,#d97706)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-reset:hover{background:linear-gradient(135deg,#d97706,#b45309)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-complete{background:linear-gradient(135deg,#3b82f6,#2563eb)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-complete:hover{background:linear-gradient(135deg,#2563eb,#1d4ed8)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-permanent-controls{display:flex;gap:6px;align-items:center;justify-content:center;opacity:1;transition:opacity .2s ease;padding-top:0}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-control-btn{width:28px;height:28px;border-radius:6px;background:var(--background-secondary);border:1px solid var(--background-modifier-border);display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-muted);transition:background .2s ease,border-color .2s ease,color .2s ease,transform .2s ease;padding:0;flex-shrink:0;position:relative}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-control-btn svg{width:16px;height:16px;display:block}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-control-btn:hover{background:var(--interactive-hover);border-color:var(--interactive-accent);color:var(--interactive-accent);transform:scale(1.08)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-control-btn:active{transform:scale(.95)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-control-start{color:#3b82f6}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-control-start:hover{color:#2563eb;border-color:#3b82f6}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-control-reset{color:#f59e0b}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-control-reset:hover{color:#d97706;border-color:#f59e0b}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-control-complete{color:#10b981}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-control-complete:hover{color:#059669;border-color:#10b981}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-tag{background:var(--task-color, var(--background-secondary));border:2px solid transparent}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-tag:hover:not(.albus-super-daily-notes-selected){transform:translate(calc(-50% + var(--x, 0px)),calc(-50% + var(--y, 0px))) scale(1.15)!important;box-shadow:0 6px 20px #0000004d}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-tag.albus-super-daily-notes-selected{transform:translate(calc(-50% + var(--x, 0px)),calc(-50% + var(--y, 0px))) scale(1.2)!important;box-shadow:0 0 20px 5px var(--task-color)!important;animation:buttonAppear .5s cubic-bezier(.175,.885,.32,1.275) forwards,pulseSelected 1.5s infinite alternate;animation-delay:var(--delay, 0s),calc(var(--delay, 0s) + .5s);border:2px solid white!important;z-index:100!important}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-menu.albus-super-daily-notes-closing .albus-super-daily-notes-floating-timer-btn-tag.albus-super-daily-notes-selected{animation:none!important;transform:translate(-50%,-50%) scale(.5)!important;opacity:0!important}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-tag .albus-super-daily-notes-floating-timer-btn-icon{color:#fff;font-weight:700;font-size:18px}@media(max-width:768px){body.super-daily-notes-active .albus-super-daily-notes-floating-timer-ball{width:70px;height:70px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-text{font-size:14px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-tag{font-size:10px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-menu{width:300px;height:300px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn{width:50px;height:50px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn-icon{font-size:20px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input-container{width:140px}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-input .cm-scroller{font-size:13px}}body.super-daily-notes-active.theme-dark .albus-super-daily-notes-floating-timer-btn-tag{background:var(--background-modifier-border)}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn{will-change:transform}body.super-daily-notes-active .albus-super-daily-notes-floating-timer-btn:focus-visible{outline:2px solid var(--interactive-accent);outline-offset:2px}body.super-daily-notes-active .albus-super-daily-notes-radial-menu{position:absolute!important}body.super-daily-notes-active .albus-super-daily-notes-timer-menu{z-index:100000!important}body.super-daily-notes-active .albus-super-daily-notes-menu-input-container{padding:0;min-width:0;width:100%}body.super-daily-notes-active .albus-super-daily-notes-timer-menu .albus-super-daily-notes-menu-input-item{padding:0!important;margin:0!important;min-height:0;background:transparent!important}body.super-daily-notes-active .albus-super-daily-notes-timer-menu .albus-super-daily-notes-menu-input-item:hover{background:transparent!important}body.super-daily-notes-active .albus-super-daily-notes-menu-input{width:100%;height:28px;padding:2px;border:1px solid var(--background-modifier-border);border-radius:6px;background:var(--background-secondary);color:var(--text-normal);font-family:var(--font-text);font-size:13px;transition:border-color .15s ease,background .15s ease;box-sizing:border-box}body.super-daily-notes-active .albus-super-daily-notes-menu-input:focus{outline:none;border-color:var(--interactive-accent);background:var(--background-primary)}body.super-daily-notes-active .albus-super-daily-notes-menu-input::placeholder{color:var(--text-faint)}@keyframes rotateGradient{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes breathing{0%,to{box-shadow:0 2px 10px #0000001a,0 0 rgba(var(--interactive-accent-rgb),.4)}50%{box-shadow:0 2px 10px #0000001a,0 0 0 12px rgba(var(--interactive-accent-rgb),0)}}@keyframes buttonAppear{0%{opacity:0;transform:translate(-50%,-50%) scale(.5)}to{opacity:1;transform:translate(calc(-50% + var(--x, 0px)),calc(-50% + var(--y, 0px))) scale(1)}}@keyframes buttonDisappear{0%{opacity:1;transform:translate(calc(-50% + var(--x, 0px)),calc(-50% + var(--y, 0px))) scale(1)}to{opacity:0;transform:translate(-50%,-50%) scale(.5)}}@keyframes pulseSelected{0%{box-shadow:0 0 10px 3px var(--task-color)}to{box-shadow:0 0 25px 8px var(--task-color)}}.albus-super-daily-notes-planner-settings-tabs{display:flex;justify-content:flex-start;border-bottom:1px solid var(--background-modifier-border);overflow-x:auto;padding:0;margin:0 0 16px}.albus-super-daily-notes-planner-settings-tabs::-webkit-scrollbar{display:none}.albus-super-daily-notes-planner-settings-tab{padding:4px 8px;margin-bottom:-1px;border:1px solid transparent;border-radius:5px 5px 0 0;cursor:pointer;font-size:var(--font-ui-medium);font-weight:500;color:var(--text-muted);transition:color .1s ease;border-bottom:2px solid transparent;user-select:none}.albus-super-daily-notes-planner-settings-tab:hover{color:var(--text-normal);border-bottom-color:var(--interactive-accent)}.albus-super-daily-notes-planner-settings-tab.is-active{color:var(--text-normal);font-weight:600;border-bottom-color:var(--interactive-accent)}.albus-super-daily-notes-planner-settings-content{padding-top:0}.albus-super-daily-notes-planner-settings-content .setting-item-control{flex-wrap:wrap;gap:8px}.albus-super-daily-notes-planner-settings-content .setting-item-control>*{flex-shrink:0}.albus-super-daily-notes-setting-list-row{align-items:center}.albus-super-daily-notes-setting-list-row .setting-item-info{flex:1 1 auto;min-width:0;padding-right:12px}.albus-super-daily-notes-setting-list-row .setting-item-control{flex:none;margin-left:auto}.albus-super-daily-notes-item-add-setting{padding-top:0;margin-top:0;border-top:none}.albus-super-daily-notes-item-add-setting .setting-item-info{display:none}.albus-super-daily-notes-item-add-setting .setting-item-control{width:100%;margin-left:0}.albus-super-daily-notes-item-add-container{display:flex;gap:.75em;width:100%;margin:0;padding-top:0}.albus-super-daily-notes-item-add-btn{display:flex;align-items:center;justify-content:center;gap:.375em;background:var(--interactive-accent);color:var(--text-on-accent);border:none;border-radius:var(--radius-s);padding:.5em .75em;cursor:pointer;font-size:var(--font-ui-small);font-weight:500;transition:background .2s ease;flex:1}.albus-super-daily-notes-item-add-btn:hover{background:var(--interactive-accent-hover)}.albus-super-daily-notes-planner-settings-content .setting-group+.setting-item-heading{margin-top:1.5em}body.super-daily-notes-active .albus-super-daily-notes-planner-content{transition:opacity .15s ease-out}body.super-daily-notes-active .albus-super-daily-notes-timeline-task,body.super-daily-notes-active .albus-super-daily-notes-event-item{transition:background-color .2s ease,opacity .2s ease,transform .2s ease}body.super-daily-notes-active .albus-super-daily-notes-completed{opacity:.7}body.super-daily-notes-active .albus-super-daily-notes-planner-content input[type=checkbox]{transition:transform .15s ease}body.super-daily-notes-active .albus-super-daily-notes-planner-content input[type=checkbox]:checked{transform:scale(1.1)}body.super-daily-notes-active .albus-super-daily-notes-planner-content::-webkit-scrollbar{width:8px;height:8px}body.super-daily-notes-active .albus-super-daily-notes-planner-content::-webkit-scrollbar-thumb{background:var(--background-modifier-border);border-radius:4px}body.super-daily-notes-active .albus-super-daily-notes-planner-content::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}body.super-daily-notes-active .albus-super-daily-notes-planner-content::-webkit-scrollbar-track{background:transparent} diff --git a/.obsidian/plugins/obsidian42-brat/data.json b/.obsidian/plugins/obsidian42-brat/data.json index 1e8d9b9..78c6926 100644 --- a/.obsidian/plugins/obsidian42-brat/data.json +++ b/.obsidian/plugins/obsidian42-brat/data.json @@ -1,8 +1,13 @@ { "pluginList": [ + "AlbusGuo/obsidian-super-daily-notes", "eondrcode/obsidian-i18n" ], "pluginSubListFrozenVersion": [ + { + "repo": "AlbusGuo/obsidian-super-daily-notes", + "version": "latest" + }, { "repo": "eondrcode/obsidian-i18n", "version": "" diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index a3a3a81..69604fb 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -218,7 +218,7 @@ } } ], - "currentTab": 3 + "currentTab": 2 }, { "id": "bf1e7d1a52b4651c", @@ -266,7 +266,7 @@ "obsidian-git:Open Git source control": false } }, - "active": "f3af307553b03e79", + "active": "841e99623ecdb9f4", "lastOpenFiles": [ "Meta/🏡HOME.md", "Bases/元数据列表.base",