file_name
stringlengths 3
137
| prefix
stringlengths 0
918k
| suffix
stringlengths 0
962k
| middle
stringlengths 0
812k
|
---|---|---|---|
time-utils.ts | import cdk = require('@aws-cdk/core')
export class | {
public static convertUTC9to0(scope: cdk.Construct, dayOfWeek: string, time: string) {
const temp = time.split(':');
var hour: number = Number(temp[0]) -9;
if (hour < 0) {
hour += 24;
var tmp = dayOfWeek.split(',');
for(var i = 0; i< tmp.length; i++){
if(tmp[i] == 'MON'){
tmp[i] = 'SUN'
}else if(tmp[i] == 'TUE'){
tmp[i] = 'MON'
}else if(tmp[i] == 'WED'){
tmp[i] = 'TUE'
}else if(tmp[i] == 'THU'){
tmp[i] = 'WED'
}else if(tmp[i] == 'FRI'){
tmp[i] = 'THU'
}else if(tmp[i] == 'SAT'){
tmp[i] = 'FRI'
}else if(tmp[i] == 'SUN'){
tmp[i] = 'SAT'
}
}
dayOfWeek = tmp.join(',');
}
const minute = temp[1]
return { weekDay: dayOfWeek, hour: `${hour}`, minute: minute }
}
} | TimeUtils |
mk_lookup.py | import os
import csv
import copy
import json
DIR = os.path.dirname(__file__)
def | (*p): return os.path.normpath(os.path.join(DIR, *p))
CENSUS_DATA = rel('nst-est2019-alldata.csv')
OUT_JSON = rel('state_data.json')
def main():
state_data = copy.deepcopy(STATE_DATA)
state_name_ind = {} # { name: ind of record in STATE_DATA }
state_abbrev_ind = {} # { abbrev: ind of records in STATE_DATA }
for i, v in enumerate(state_data):
state_name_ind[v['name']] = i
state_abbrev_ind[v['abbrev']] = i
with open(CENSUS_DATA, 'r') as f:
csv_r = csv.DictReader(f)
for row in csv_r:
name = row['NAME']
population = int(row['POPESTIMATE2019'])
if name not in state_name_ind:
continue
else:
data_row_i = state_name_ind[name]
state_data[data_row_i]['population'] = population
state_json_data = {
'name_ind': state_name_ind,
'abbrev_ind': state_abbrev_ind,
'data': state_data
}
state_json_str = json.dumps(state_json_data, indent=2)
with open(OUT_JSON, 'w') as f:
json.dump(state_json_data, f, indent=2)
STATE_DATA = [
{"name": "Alabama", "abbrev": "AL"},
{"name": "Alaska", "abbrev": "AK"},
{"name": "Arizona", "abbrev": "AZ"},
{"name": "Arkansas", "abbrev": "AR"},
{"name": "California", "abbrev": "CA"},
{"name": "Colorado", "abbrev": "CO"},
{"name": "Connecticut", "abbrev": "CT"},
{"name": "Delaware", "abbrev": "DE"},
{"name": "Florida", "abbrev": "FL"},
{"name": "Georgia", "abbrev": "GA"},
{"name": "Hawaii", "abbrev": "HI"},
{"name": "Idaho", "abbrev": "ID"},
{"name": "Illinois", "abbrev": "IL"},
{"name": "Indiana", "abbrev": "IN"},
{"name": "Iowa", "abbrev": "IA"},
{"name": "Kansas", "abbrev": "KS"},
{"name": "Kentucky", "abbrev": "KY"},
{"name": "Louisiana", "abbrev": "LA"},
{"name": "Maine", "abbrev": "ME"},
{"name": "Maryland", "abbrev": "MD"},
{"name": "Massachusetts", "abbrev": "MA"},
{"name": "Michigan", "abbrev": "MI"},
{"name": "Minnesota", "abbrev": "MN"},
{"name": "Mississippi", "abbrev": "MS"},
{"name": "Missouri", "abbrev": "MO"},
{"name": "Montana", "abbrev": "MT"},
{"name": "Nebraska", "abbrev": "NE"},
{"name": "Nevada", "abbrev": "NV"},
{"name": "New Hampshire", "abbrev": "NH"},
{"name": "New Jersey", "abbrev": "NJ"},
{"name": "New Mexico", "abbrev": "NM"},
{"name": "New York", "abbrev": "NY"},
{"name": "North Carolina", "abbrev": "NC"},
{"name": "North Dakota", "abbrev": "ND"},
{"name": "Ohio", "abbrev": "OH"},
{"name": "Oklahoma", "abbrev": "OK"},
{"name": "Oregon", "abbrev": "OR"},
{"name": "Pennsylvania", "abbrev": "PA"},
{"name": "Rhode Island", "abbrev": "RI"},
{"name": "South Carolina", "abbrev": "SC"},
{"name": "South Dakota", "abbrev": "SD"},
{"name": "Tennessee", "abbrev": "TN"},
{"name": "Texas", "abbrev": "TX"},
{"name": "Utah", "abbrev": "UT"},
{"name": "Vermont", "abbrev": "VT"},
{"name": "Virginia", "abbrev": "VA"},
{"name": "Washington", "abbrev": "WA"},
{"name": "West Virginia", "abbrev": "WV"},
{"name": "Wisconsin", "abbrev": "WI"},
{"name": "Wyoming", "abbrev": "WY"},
]
if __name__ == '__main__':
main()
| rel |
test1.rs | // test1.rs
// This is a test for the following sections:
// - Variables
// - Functions
// Mary is buying apples. One apple usually costs 2 dollars, but if you buy
// more than 40 at once, each apple only costs 1! Write a function that calculates
// the price of an order of apples given the order amount. No hints this time!
// Put your function here!
fn calculate_apple_price(quantity: i32) -> i32 {
if quantity > 40 {
quantity
} else {
quantity * 2
}
}
// Don't modify this function!
#[test]
fn | () {
let price1 = calculate_apple_price(35);
let price2 = calculate_apple_price(65);
assert_eq!(70, price1);
assert_eq!(65, price2);
}
| verify_test |
GlobalStyle.tsx | import { createGlobalStyle } from "styled-components";
export const GlobalStyle = createGlobalStyle`
* {
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
&::-webkit-scrollbar {
width: 0;
}
}
body,
html {
margin: 0;
font-family: 'Inter', sans-serif;
font-size: 15px;
line-height: 22px;
}
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em, | s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
vertical-align: baseline;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
body {
line-height: 147%;
}
ol,
ul {
list-style: none;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
button {
border: none;
background: none;
cursor: pointer;
}
a {
text-decoration: none;
cursor: pointer;
}
`; | img,
ins,
kbd,
q, |
brained-creep.interface.ts | import { DecidedAction } from '../actions/action.interface';
export interface BrainedCreep {
creep: Creep;
observation: {
isHandlingEnergy: boolean;
hasFreeCapacity: boolean;
nearestActiveSource: Source | null;
nearestSpawn: StructureSpawn | null;
nearestController: StructureController | null;
nearestBuildableStructure: ConstructionSite | null;
};
orientation: {
couldHarvest: boolean;
couldStore: boolean;
couldUpgrade: boolean;
couldBuild: boolean;
spawn: StructureSpawn | null;
source: Source | null;
controller: StructureController | null;
buildableStructure: ConstructionSite | null; | };
decision: DecidedAction;
action: unknown;
} | |
lib.rs | //! Definitions for the ACPI RSDT and XSDT system tables.
//!
//! RSDT is the Root System Descriptor Table, whereas
//! XSDT is the Extended System Descriptor Table.
//! They are identical except that the XSDT uses 64-bit physical addresses
//! to point to other ACPI SDTs, while the RSDT uses 32-bit physical addresses.
//!
//! # Note about alignment
//! Technically the RSDT contains a list of 32-bit addresses (`u32`) and the XSDT has 64-bit addresses (`u64`),
//! but the ACPI tables often aren't aligned to 4-byte and 8-byte addresses.
//! This lack of alignment causes problems with Rust's slice type, which requires proper alignment.
//! Thus, we store them as slices of individual bytes (`u8`) and calculate the physical addresses
//! on demand when requested in the `RsdtXsdt::addresses()` iterator function.
#![no_std]
extern crate memory;
extern crate sdt;
extern crate acpi_table;
use core::mem::size_of;
use memory::PhysicalAddress;
use sdt::{Sdt, SDT_SIZE_IN_BYTES};
use acpi_table::{AcpiSignature, AcpiTables};
pub const RSDT_SIGNATURE: &'static [u8; 4] = b"RSDT";
pub const XSDT_SIGNATURE: &'static [u8; 4] = b"XSDT";
/// The handler for parsing RSDT/XSDT tables and adding them to the ACPI tables list.
pub fn handle(
acpi_tables: &mut AcpiTables,
signature: AcpiSignature,
length: usize,
phys_addr: PhysicalAddress
) -> Result<(), &'static str> {
// See the crate-level docs for an explanation of why this is always `u8`.
let slice_element_size = match &signature {
RSDT_SIGNATURE => size_of::<u8>(),
XSDT_SIGNATURE => size_of::<u8>(),
_ => return Err("unexpected ACPI table signature (not RSDT or XSDT)"),
};
let slice_paddr = phys_addr + SDT_SIZE_IN_BYTES; // the array of addresses starts right after the SDT header.
let num_addrs = (length - SDT_SIZE_IN_BYTES) / slice_element_size;
acpi_tables.add_table_location(signature, phys_addr, Some((slice_paddr, num_addrs)))
}
/// The Root/Extended System Descriptor Table, RSDT or XSDT.
/// This table primarily contains an array of physical addresses
/// where other ACPI SDTs can be found.
///
/// Use the `addresses()` method to obtain an [`Iterator`] over those physical addresses.
pub struct RsdtXsdt<'t>(RsdtOrXsdt<'t>);
enum RsdtOrXsdt<'t> {
/// RSDT, which contains 32-bit addresses.
Regular(Rsdt<'t>),
/// XSDT, which contains 64-bit addresses.
Extended(Xsdt<'t>),
}
type Rsdt<'t> = (&'t Sdt, &'t [u8]);
type Xsdt<'t> = (&'t Sdt, &'t [u8]);
impl<'t> RsdtXsdt<'t> {
/// Finds the RSDT or XSDT in the given `AcpiTables` and returns a reference to it. | Some(RsdtXsdt(RsdtOrXsdt::Regular((sdt, addrs))))
}
else if let (Ok(sdt), Ok(addrs)) = (acpi_tables.table::<Sdt>(&XSDT_SIGNATURE), acpi_tables.table_slice::<u8>(&XSDT_SIGNATURE)) {
Some(RsdtXsdt(RsdtOrXsdt::Extended((sdt, addrs))))
}
else {
None
}
}
/// Returns a reference to the SDT header of this RSDT or XSDT.
pub fn sdt(&self) -> &Sdt {
match &self.0 {
RsdtOrXsdt::Regular(ref r) => r.0,
RsdtOrXsdt::Extended(ref x) => x.0,
}
}
/// Returns an [`Iterator`] over the `PhysicalAddress`es of the SDT entries
/// included in this RSDT or XSDT.
pub fn addresses<'r>(&'r self) -> impl Iterator<Item = PhysicalAddress> + 'r {
let mut rsdt_iter = None;
let mut xsdt_iter = None;
match &self.0 {
RsdtOrXsdt::Regular(ref rsdt) => rsdt_iter = Some(
rsdt.1.chunks_exact(size_of::<u32>()).map(|bytes| {
let arr = [bytes[0], bytes[1], bytes[2], bytes[3]];
PhysicalAddress::new_canonical(u32::from_le_bytes(arr) as usize)
})
),
RsdtOrXsdt::Extended(ref xsdt) => xsdt_iter = Some(
xsdt.1.chunks_exact(size_of::<u64>()).map(|bytes| {
let arr = [bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7]];
PhysicalAddress::new_canonical(usize::from_le_bytes(arr))
})
),
}
rsdt_iter.into_iter().flatten().chain(xsdt_iter.into_iter().flatten())
}
} | pub fn get(acpi_tables: &'t AcpiTables) -> Option<RsdtXsdt<'t>> {
if let (Ok(sdt), Ok(addrs)) = (acpi_tables.table::<Sdt>(&RSDT_SIGNATURE), acpi_tables.table_slice::<u8>(&RSDT_SIGNATURE)) { |
lib.rs | /*!
# Background
This library provides an API server intended for use in an OS that is primarily accessible through the API.
It's intended to be the primary way to read and modify OS settings, to update services based on those settings, and more generally to learn about and change the state of the system.
The server listens to HTTP requests on a Unix-domain socket.
There is no built-in authentication - local access to the socket should be limited to processes and containers that should be able to configure the system.
Remote access should only be allowed through an authenticated control channel such as SSH or SSM.
# Design
## API
We present an HTTP interface to configurable settings and other state.
The interface is documented in [OpenAPI format](https://swagger.io/docs/specification/about/) in [openapi.yaml](../openapi.yaml).
The Settings APIs are particularly important.
You can GET settings from the `/settings` endpoint.
You can also PATCH changes to the `/settings` endpoint.
Settings are stored as a pending transaction until a commit API is called.
Pending settings can be retrieved from `/tx` to see what will change.
Upon making a `/tx/commit` POST call, the pending transaction is made live.
Upon making an `/tx/apply` POST call, an external settings applier tool is called to apply the changes to the system and restart services as necessary.
There's also `/tx/commit_and_apply` to do both, which is the most common case.
If you don't specify a transaction, the "default" transaction is used, so you usually don't have to think about it.
If you want to group changes into transactions yourself, you can add a `tx` parameter to the APIs mentioned above.
For example, if you want the name "FOO", you can `PATCH` to `/settings?tx=FOO` and `POST` to `/tx/commit_and_apply?tx=FOO`.
Requests are directed by `server::router`.
`server::controller` maps requests into our data model.
## Model
The API is driven by a data model (similar to a schema) defined in Rust.
(See the [models](../../models) directory for model definitions and more documentation.)
All input is deserialized into model types, and all output is serialized from model types, so we can be more confident that data is in the format we expect. | The data model describes system settings, services using those settings, and configuration files used by those services.
It also has a more general structure for metadata.
Metadata entries can be stored for any data field in the model.
## Data store
Data from the model is stored in a key/value data store.
Keys are dotted strings like "settings.service.abc".
This naturally implies some grouping and hierarchy of the data, corresponding to the model.
The current data store implementation maps keys to filesystem paths and stores the value in a file.
Metadata about a data key is stored in a file at the data key path + "." + the metadata key.
The default data store location is `/var/lib/bottlerocket/datastore/current`, and the filesystem format makes it fairly easy to inspect.
## Serialization and deserialization
The `datastore::serialization` module provides code to serialize Rust types into a mapping of datastore-acceptable keys (a.b.c) and values.
The `datastore::deserialization` module provides code to deserialize datastore-acceptable keys (a.b.c) and values into Rust types.
# Current limitations
* Data store locking is coarse; read requests can happen in parallel, but a write request will block everything else.
* There's no support for rolling back commits.
* There are no metrics.
* `datastore::serialization` can't handle complex types under lists; it assumes lists can be serialized as scalars.
# Example usage
You can start the API server from the `apiserver` directory with a command like:
`cargo run -- --datastore-path /tmp/bottlerocket/data --socket-path /tmp/bottlerocket/api.sock --log-level debug`
Then, from another shell, you can query or modify data.
See `../../apiclient/README.md` for client examples.
*/
#![deny(rust_2018_idioms)]
#[macro_use]
extern crate log;
pub mod datastore;
pub mod server;
pub use server::serve; | |
gulpfile.js | var gulp = require('gulp');
var watch = require('node-watch');
var combiner = require('stream-combiner2');
var os = require('os');
let cleanCSS = require('gulp-clean-css');
var execSync = require('child_process').execSync;
let fs = require('fs');
function taskError(e) {
console.error(e);
}
function sectionOutput(message) {
const time = new Date().toUTCString();
console.log('----------------------------------------------------');
console.log(`[${time}] ${message}`);
console.log('----------------------------------------------------');
}
function taskBuildLinux() {
if (os.platform() !== 'linux') {
taskError("Try this command again while you're in linux chief.");
return;
}
sectionOutput('Start Building (Linux)');
let version = 0;
let unstable = '';
const versionFile = fs.openSync('app/version', 'r');
version = fs.readFileSync(versionFile, 'UTF-8');
fs.closeSync(versionFile);
sectionOutput('Cleaning Artifacts');
execSync('rm -Rfv ./dist/', {stdio: 'inherit'});
sectionOutput('Building Package');
execSync('yarn build', {stdio: 'inherit'});
if (process.arch === 'x64') {
execSync('mv ./dist/linux-unpacked ./dist/livesplit-electron', {stdio: 'inherit'});
} else {
execSync('mv ./dist/linux-ia32-unpacked ./dist/livesplit-electron', {stdio: 'inherit'});
}
sectionOutput('Copying Icon');
execSync('cp ./app/icons/icon.png ./dist/livesplit-electron/icon.png', {stdio: 'inherit'});
sectionOutput('Compressing Package');
if (process.arch === 'x64') {
execSync(`tar czvf ./dist/livesplit-electron-${version}${unstable}-x64-linux.tar.gz -C ./dist livesplit-electron`, {stdio: 'inherit'});
} else {
execSync(`tar czvf ./dist/livesplit-electron-${version}${unstable}-x86-linux.tar.gz -C ./dist livesplit-electron`, {stdio: 'inherit'});
}
sectionOutput('Build Finished');
}
function taskBuildWindows() {
if (os.platform() !== 'win32') {
taskError("Try this command again while you're in windows chief.");
return;
}
sectionOutput('Start Building (Win32)');
let version = 0;
let unstable = '';
const versionFile = fs.openSync('app/version', 'r');
version = fs.readFileSync(versionFile, 'UTF-8');
fs.closeSync(versionFile);
sectionOutput('Cleaning Artifacts');
try {
execSync('rmdir /S /Q .\\dist', {stdio: 'inherit'});
} catch {
console.log('No dist directory to delete. Moving on...');
}
sectionOutput('Building Package');
execSync('yarn build', {stdio: 'inherit'});
if (process.arch === 'x64') {
execSync('rename .\\dist\\win-unpacked livesplit-electron', {stdio: 'inherit'});
} else {
execSync('rename .\\dist\\win-ia32-unpacked livesplit-electron', {stdio: 'inherit'});
}
sectionOutput('Compressing Package');
if (process.arch === 'x64') {
execSync(`tools\\windows\\7zip\\7za.exe a -r .\\dist\\livesplit-electron-${version}${unstable}-x64-windows.zip .\\dist\\livesplit-electron`, {stdio: 'inherit'});
} else {
execSync(`tools\\windows\\7zip\\7za.exe a -r .\\dist\\livesplit-electron-${version}${unstable}-x86-windows.zip .\\dist\\livesplit-electron`, {stdio: 'inherit'});
}
sectionOutput('Build Finished');
}
function taskBuildDarwin() {
if (os.platform() !== 'darwin') {
taskError("Try this command again while you're in macOS chief.");
return;
}
| sectionOutput('Start Building (Darwin/macOS)');
let version = 0;
let unstable = '';
const versionFile = fs.openSync('app/version', 'r');
version = fs.readFileSync(versionFile, 'UTF-8');
fs.closeSync(versionFile);
sectionOutput('Cleaning Artifacts');
execSync('rm -Rfv ./dist/', {stdio: 'inherit'});
sectionOutput('Building Package');
execSync('yarn build', {stdio: 'inherit'});
sectionOutput('Renaming Package');
execSync(`mv ./dist/*.dmg ./dist/livesplit-electron-${version}${unstable}-x64-mac.dmg`, {stdio: 'inherit'});
sectionOutput('Build Finished');
}
gulp.task('build', function(cb) {
const platform = os.platform();
if (platform === 'win32') {
taskBuildWindows();
} else if (platform === 'linux') {
taskBuildLinux();
} else if (platform === 'darwin') {
taskBuildDarwin();
} else {
console.error('Unsupported Platform');
}
cb();
});
gulp.task('build-linux', function(cb) {
taskBuildLinux();
cb();
});
gulp.task('build-windows', function(cb) {
taskBuildWindows();
cb();
});
gulp.task('build-darwin', function(cb) {
taskBuildDarwin();
cb();
}); | |
csi.ts | import Long from 'long'
import { unzip } from '@gmod/bgzf-filehandle'
import VirtualOffset, { fromBytes } from './virtualOffset'
import Chunk from './chunk'
import { longToNumber, abortBreakPoint, optimizeChunks, BaseOpts } from './util'
import IndexFile from './indexFile'
const CSI1_MAGIC = 21582659 // CSI\1
const CSI2_MAGIC = 38359875 // CSI\2
function | (num: number, bits: number) {
return num * 2 ** bits
}
function rshift(num: number, bits: number) {
return Math.floor(num / 2 ** bits)
}
export default class CSI extends IndexFile {
private maxBinNumber: number
private depth: number
private minShift: number
constructor(args: any) {
super(args)
this.maxBinNumber = 0
this.depth = 0
this.minShift = 0
}
async lineCount(refId: number): Promise<number> {
const indexData = await this.parse()
if (!indexData) {
return -1
}
const idx = indexData.indices[refId]
if (!idx) {
return -1
}
const { stats } = indexData.indices[refId]
if (stats) {
return stats.lineCount
}
return -1
}
async indexCov() {
return []
}
parseAuxData(bytes: Buffer, offset: number, auxLength: number) {
if (auxLength < 30) {
return {}
}
const data: { [key: string]: any } = {}
data.formatFlags = bytes.readInt32LE(offset)
data.coordinateType =
data.formatFlags & 0x10000 ? 'zero-based-half-open' : '1-based-closed'
data.format = (
{ 0: 'generic', 1: 'SAM', 2: 'VCF' } as {
[key: number]: string
}
)[data.formatFlags & 0xf]
if (!data.format) {
throw new Error(`invalid Tabix preset format flags ${data.formatFlags}`)
}
data.columnNumbers = {
ref: bytes.readInt32LE(offset + 4),
start: bytes.readInt32LE(offset + 8),
end: bytes.readInt32LE(offset + 12),
}
data.metaValue = bytes.readInt32LE(offset + 16)
data.metaChar = data.metaValue ? String.fromCharCode(data.metaValue) : ''
data.skipLines = bytes.readInt32LE(offset + 20)
const nameSectionLength = bytes.readInt32LE(offset + 24)
Object.assign(
data,
this._parseNameBytes(
bytes.subarray(offset + 28, offset + 28 + nameSectionLength),
),
)
return data
}
_parseNameBytes(namesBytes: Buffer) {
let currRefId = 0
let currNameStart = 0
const refIdToName = []
const refNameToId: { [key: string]: number } = {}
for (let i = 0; i < namesBytes.length; i += 1) {
if (!namesBytes[i]) {
if (currNameStart < i) {
let refName = namesBytes.toString('utf8', currNameStart, i)
refName = this.renameRefSeq(refName)
refIdToName[currRefId] = refName
refNameToId[refName] = currRefId
}
currNameStart = i + 1
currRefId += 1
}
}
return { refNameToId, refIdToName }
}
// fetch and parse the index
async _parse(opts: { signal?: AbortSignal }) {
const data: { [key: string]: any } = { csi: true, maxBlockSize: 1 << 16 }
const buffer = (await this.filehandle.readFile(opts)) as Buffer
const bytes = await unzip(buffer)
// check TBI magic numbers
if (bytes.readUInt32LE(0) === CSI1_MAGIC) {
data.csiVersion = 1
} else if (bytes.readUInt32LE(0) === CSI2_MAGIC) {
data.csiVersion = 2
} else {
throw new Error('Not a CSI file')
// TODO: do we need to support big-endian CSI files?
}
this.minShift = bytes.readInt32LE(4)
this.depth = bytes.readInt32LE(8)
this.maxBinNumber = ((1 << ((this.depth + 1) * 3)) - 1) / 7
const auxLength = bytes.readInt32LE(12)
if (auxLength) {
Object.assign(data, this.parseAuxData(bytes, 16, auxLength))
}
data.refCount = bytes.readInt32LE(16 + auxLength)
// read the indexes for each reference sequence
data.indices = new Array(data.refCount)
let currOffset = 16 + auxLength + 4
for (let i = 0; i < data.refCount; i += 1) {
await abortBreakPoint(opts.signal)
// the binning index
const binCount = bytes.readInt32LE(currOffset)
currOffset += 4
const binIndex: { [key: string]: Chunk[] } = {}
let stats // < provided by parsing a pseudo-bin, if present
for (let j = 0; j < binCount; j += 1) {
const bin = bytes.readUInt32LE(currOffset)
if (bin > this.maxBinNumber) {
// this is a fake bin that actually has stats information
// about the reference sequence in it
stats = this.parsePseudoBin(bytes, currOffset + 4)
currOffset += 4 + 8 + 4 + 16 + 16
} else {
const loffset = fromBytes(bytes, currOffset + 4)
this._findFirstData(data, loffset)
const chunkCount = bytes.readInt32LE(currOffset + 12)
currOffset += 16
const chunks = new Array(chunkCount)
for (let k = 0; k < chunkCount; k += 1) {
const u = fromBytes(bytes, currOffset)
const v = fromBytes(bytes, currOffset + 8)
currOffset += 16
// this._findFirstData(data, u)
chunks[k] = new Chunk(u, v, bin)
}
binIndex[bin] = chunks
}
}
data.indices[i] = { binIndex, stats }
}
return data
}
parsePseudoBin(bytes: Buffer, offset: number) {
const lineCount = longToNumber(
Long.fromBytesLE(
Array.prototype.slice.call(bytes, offset + 28, offset + 36),
true,
),
)
return { lineCount }
}
async blocksForRange(
refId: number,
min: number,
max: number,
opts: BaseOpts = {},
) {
if (min < 0) {
min = 0
}
const indexData = await this.parse(opts)
if (!indexData) {
return []
}
const ba = indexData.indices[refId]
if (!ba) {
return []
}
const overlappingBins = this.reg2bins(min, max) // List of bin #s that overlap min, max
const chunks: Chunk[] = []
// Find chunks in overlapping bins. Leaf bins (< 4681) are not pruned
for (const [start, end] of overlappingBins) {
for (let bin = start; bin <= end; bin++) {
if (ba.binIndex[bin]) {
const binChunks = ba.binIndex[bin]
for (let c = 0; c < binChunks.length; ++c) {
chunks.push(new Chunk(binChunks[c].minv, binChunks[c].maxv, bin))
}
}
}
}
return optimizeChunks(chunks, new VirtualOffset(0, 0))
}
/**
* calculate the list of bins that may overlap with region [beg,end) (zero-based half-open)
* @returns {Array[number]}
*/
reg2bins(beg: number, end: number) {
beg -= 1 // < convert to 1-based closed
if (beg < 1) {
beg = 1
}
if (end > 2 ** 50) {
end = 2 ** 34
} // 17 GiB ought to be enough for anybody
end -= 1
let l = 0
let t = 0
let s = this.minShift + this.depth * 3
const bins = []
for (; l <= this.depth; s -= 3, t += lshift(1, l * 3), l += 1) {
const b = t + rshift(beg, s)
const e = t + rshift(end, s)
if (e - b + bins.length > this.maxBinNumber) {
throw new Error(
`query ${beg}-${end} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`,
)
}
bins.push([b, e])
}
return bins
}
}
| lshift |
ItemsController.ts | import { Request, Response } from 'express';
import knex from '../database/connection';
class | {
async index(req: Request, res: Response) {
const items = await knex('items').select('*');
const serializedItems = items.map((item) => {
return {
id: item.id,
title: item.title,
url_image: `http://192.168.1.104:3333/uploads/${item.image}`,
};
});
return res.json(serializedItems);
}
}
export default ItemsController;
| ItemsController |
unsized6.rs | // Test `?Sized` local variables.
trait T {}
fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
let _: W; // <-- this is OK, no bindings created, no initializer.
let _: (isize, (X, isize));
//~^ ERROR the size for values of type
let y: Y;
//~^ ERROR the size for values of type
let y: (isize, (Z, usize));
//~^ ERROR the size for values of type
}
fn f2<X: ?Sized, Y: ?Sized>(x: &X) |
fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
let y: X = *x1;
//~^ ERROR the size for values of type
let y = *x2;
//~^ ERROR the size for values of type
let (y, z) = (*x3, 4);
//~^ ERROR the size for values of type
}
fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
let y: X = *x1;
//~^ ERROR the size for values of type
let y = *x2;
//~^ ERROR the size for values of type
let (y, z) = (*x3, 4);
//~^ ERROR the size for values of type
}
fn g1<X: ?Sized>(x: X) {}
//~^ ERROR the size for values of type
fn g2<X: ?Sized + T>(x: X) {}
//~^ ERROR the size for values of type
pub fn main() {
}
| {
let y: X;
//~^ ERROR the size for values of type
let y: (isize, (Y, isize));
//~^ ERROR the size for values of type
} |
index.ts | import { RegionType, CapiCredentials, ApiServiceType } from './../interface';
import { Capi } from '@tencent-sdk/capi';
import { waitResponse } from '@ygkit/request';
import utils from './utils';
import { ApiError } from '../../utils/error';
import { LayerDeployInputs } from './interface';
// timeout 2 minutes
const TIMEOUT = 2 * 60 * 1000;
export default class | {
capi: Capi;
region: RegionType;
credentials: CapiCredentials;
constructor(credentials: CapiCredentials = {}, region: RegionType = 'ap-guangzhou') {
this.region = region;
this.credentials = credentials;
this.capi = new Capi({
Region: this.region,
ServiceType: ApiServiceType.scf,
SecretId: credentials.SecretId!,
SecretKey: credentials.SecretKey!,
Token: credentials.Token,
});
}
async getLayerDetail(name: string, version: number) {
try {
const detail = await utils.getLayerDetail(this.capi, name, version);
return detail;
} catch (e) {
return null;
}
}
/** 部署层 */
async deploy(inputs: LayerDeployInputs = {}) {
const outputs = {
region: this.region,
name: inputs.name,
bucket: inputs.bucket,
object: inputs.object,
description: inputs.description,
runtimes: inputs.runtimes,
version: undefined as number | undefined,
};
const layerInputs = {
Content: {
CosBucketName: inputs.bucket,
CosObjectName: inputs.object,
},
Description: inputs.description,
Region: inputs.region,
CompatibleRuntimes: inputs.runtimes,
LayerName: inputs.name,
};
// publish layer
console.log(`Creating layer ${inputs.name}`);
const version = await utils.publishLayer(this.capi, layerInputs);
// loop for active status
try {
await waitResponse({
callback: async () => this.getLayerDetail(inputs.name!, version),
targetProp: 'Status',
targetResponse: 'Active',
failResponse: ['PublishFailed'],
timeout: TIMEOUT,
});
} catch (e) {
const detail = e.response;
if (detail) {
// if not active throw error
if (detail.Status !== 'Active') {
let errMsg = '';
if (e.message.indexOf('TIMEOUT') !== -1) {
errMsg = `Cannot create layer success in 2 minutes, status: ${detail.Status} (reqId: ${detail.RequestId})`;
} else {
errMsg = `Publish layer fail, status: ${detail.Status} (reqId: ${detail.RequestId})`;
}
throw new ApiError({
type: 'API_LAYER_GetLayerVersion',
message: errMsg,
});
}
} else {
// if can not get detail throw error
throw new ApiError({
type: 'API_LAYER_GetLayerVersion',
message: `Cannot create layer success in 2 minutes`,
});
}
}
console.log(`Created layer: ${inputs.name}, version: ${version} success`);
outputs.version = version;
return outputs;
}
/** 删除层 */
async remove(inputs: LayerDeployInputs = {}) {
try {
console.log(`Start removing layer: ${inputs.name}, version: ${inputs.version}`);
await utils.deleteLayerVersion(this.capi, inputs.name!, inputs.version!);
console.log(`Remove layer: ${inputs.name}, version: ${inputs.version} success`);
} catch (e) {
console.log(e);
}
return true;
}
}
module.exports = Layer;
| Layer |
db.go | // Copyright © 2017-2018 The IPFN Developers. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package ipfsdb
import (
"github.com/ipfn/ipfn/pkg/trie/ethdb"
cid "gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
)
// Wrap - Wraps database with IPFS storage.
func W | prefix cid.Prefix, db ethdb.Database) ethdb.Database {
return WrapURL(prefix, db, "http://localhost:5001")
}
// WrapURL - Wraps database with IPFS storage.
func WrapURL(prefix cid.Prefix, db ethdb.Database, url string) ethdb.Database {
client := newClient(prefix, url)
return &wrapDB{Database: db, client: client}
}
type wrapDB struct {
ethdb.Database
client *wrapClient
}
func (db *wrapDB) Get(key []byte) (value []byte, err error) {
if v, err := db.Database.Get(key); err == nil {
return v, nil
}
return db.client.Get(key)
}
func (db *wrapDB) Put(key []byte, value []byte) error {
if err := db.Database.Put(key, value); err != nil {
return err
}
return db.client.Put(value)
}
func (db *wrapDB) NewBatch() ethdb.Batch {
return &wrapBatch{Batch: db.Database.NewBatch(), client: db.client}
}
| rap( |
lykke.py | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import math
class lykke (Exchange):
def describe(self):
return self.deep_extend(super(lykke, self).describe(), {
'id': 'lykke',
'name': 'Lykke',
'countries': 'CH',
'version': 'v1',
'rateLimit': 200,
'has': {
'CORS': False,
'fetchOHLCV': False,
'fetchTrades': False,
'fetchOpenOrders': True,
'fetchClosedOrders': True,
'fetchOrders': True,
},
'requiredCredentials': {
'apiKey': True,
'secret': False,
},
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/34487620-3139a7b0-efe6-11e7-90f5-e520cef74451.jpg',
'api': {
'mobile': 'https://api.lykkex.com/api',
'public': 'https://hft-api.lykke.com/api',
'private': 'https://hft-api.lykke.com/api',
'test': {
'mobile': 'https://api.lykkex.com/api',
'public': 'https://hft-service-dev.lykkex.net/api',
'private': 'https://hft-service-dev.lykkex.net/api',
},
},
'www': 'https://www.lykke.com',
'doc': [
'https://hft-api.lykke.com/swagger/ui/',
'https://www.lykke.com/lykke_api',
],
'fees': 'https://www.lykke.com/trading-conditions',
},
'api': {
'mobile': {
'get': [
'AllAssetPairRates/{market}',
],
},
'public': {
'get': [
'AssetPairs',
'AssetPairs/{id}',
'IsAlive',
'OrderBooks',
'OrderBooks/{AssetPairId}',
],
},
'private': {
'get': [
'Orders',
'Orders/{id}',
'Wallets',
],
'post': [
'Orders/limit',
'Orders/market',
'Orders/{id}/Cancel',
],
},
},
'fees': {
'trading': {
'tierBased': False,
'percentage': True,
'maker': 0.0, # as of 7 Feb 2018, see https://github.com/ccxt/ccxt/issues/1863
'taker': 0.0, # https://www.lykke.com/cp/wallet-fees-and-limits
},
'funding': {
'tierBased': False,
'percentage': False,
'withdraw': {
'BTC': 0.001,
},
'deposit': {
'BTC': 0,
},
},
},
})
def fetch_balance(self, params={}):
self.load_markets()
balances = self.privateGetWallets()
result = {'info': balances}
for i in range(0, len(balances)):
balance = balances[i]
currency = balance['AssetId']
total = balance['Balance']
used = balance['Reserved']
free = total - used
result[currency] = {
'free': free,
'used': used,
'total': total,
}
return self.parse_balance(result)
def cancel_order(self, id, symbol=None, params={}):
return self.privatePostOrdersIdCancel({'id': id})
def create_order(self, symbol, type, side, amount, price=None, params={}):
self.load_markets()
market = self.market(symbol)
query = {
'AssetPairId': market['id'],
'OrderAction': self.capitalize(side),
'Volume': amount,
}
if type == 'market':
query['Asset'] = market['base'] if (side == 'buy') else market['quote']
elif type == 'limit':
query['Price'] = price
method = 'privatePostOrders' + self.capitalize(type)
result = getattr(self, method)(self.extend(query, params))
return {
'id': None,
'info': result,
}
def fetch_markets(self):
markets = self.publicGetAssetPairs()
result = []
for i in range(0, len(markets)):
market = markets[i]
id = market['Id']
base = market['BaseAssetId']
quote = market['QuotingAssetId']
base = self.common_currency_code(base)
quote = self.common_currency_code(quote)
symbol = market['Name']
precision = {
'amount': market['Accuracy'],
'price': market['InvertedAccuracy'],
}
result.append({
'id': id,
'symbol': symbol,
'base': base,
'quote': quote,
'active': True,
'info': market,
'lot': math.pow(10, -precision['amount']),
'precision': precision,
'limits': {
'amount': {
'min': math.pow(10, -precision['amount']),
'max': math.pow(10, precision['amount']),
},
'price': {
'min': math.pow(10, -precision['price']),
'max': math.pow(10, precision['price']),
},
},
})
return result
def parse_ticker(self, ticker, market=None):
timestamp = self.milliseconds()
symbol = None
if market:
symbol = market['symbol']
ticker = ticker['Result']
return {
'symbol': symbol,
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'high': None,
'low': None,
'bid': float(ticker['Rate']['Bid']),
'ask': float(ticker['Rate']['Ask']),
'vwap': None,
'open': None,
'close': None,
'first': None,
'last': None,
'change': None,
'percentage': None,
'average': None,
'baseVolume': None,
'quoteVolume': None,
'info': ticker,
}
def fetch_ticker(self, symbol, params={}):
self.load_markets()
market = self.market(symbol)
ticker = self.mobileGetAllAssetPairRatesMarket(self.extend({
'market': market['id'],
}, params))
return self.parse_ticker(ticker, market)
def parse_order_status(self, status):
if status == 'Pending':
return 'open'
elif status == 'InOrderBook':
return 'open'
elif status == 'Processing':
return 'open'
elif status == 'Matched':
return 'closed'
elif status == 'Cancelled':
return 'canceled'
elif status == 'NotEnoughFunds':
return 'NotEnoughFunds'
elif status == 'NoLiquidity':
return 'NoLiquidity'
elif status == 'UnknownAsset':
return 'UnknownAsset'
elif status == 'LeadToNegativeSpread':
return 'LeadToNegativeSpread'
return status
def parse_order(self, order, market=None):
status = self.parse_order_status(order['Status'])
symbol = None
if not market:
if 'AssetPairId' in order:
if order['AssetPairId'] in self.markets_by_id:
market = self.markets_by_id[order['AssetPairId']]
if market:
symbol = market['symbol']
timestamp = None
if 'LastMatchTime' in order:
timestamp = self.parse8601(order['LastMatchTime'])
elif 'Registered' in order:
timestamp = self.parse8601(order['Registered'])
elif 'CreatedAt' in order: | remaining = self.safe_float(order, 'RemainingVolume')
filled = amount - remaining
cost = filled * price
result = {
'info': order,
'id': order['Id'],
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'symbol': symbol,
'type': None,
'side': None,
'price': price,
'cost': cost,
'average': None,
'amount': amount,
'filled': filled,
'remaining': remaining,
'status': status,
'fee': None,
}
return result
def fetch_order(self, id, symbol=None, params={}):
response = self.privateGetOrdersId(self.extend({
'id': id,
}, params))
return self.parse_order(response)
def fetch_orders(self, symbol=None, since=None, limit=None, params={}):
response = self.privateGetOrders()
return self.parse_orders(response, None, since, limit)
def fetch_open_orders(self, symbol=None, since=None, limit=None, params={}):
response = self.privateGetOrders(self.extend({
'status': 'InOrderBook',
}, params))
return self.parse_orders(response, None, since, limit)
def fetch_closed_orders(self, symbol=None, since=None, limit=None, params={}):
response = self.privateGetOrders(self.extend({
'status': 'Matched',
}, params))
return self.parse_orders(response, None, since, limit)
def fetch_order_book(self, symbol, limit=None, params={}):
self.load_markets()
response = self.publicGetOrderBooksAssetPairId(self.extend({
'AssetPairId': self.market_id(symbol),
}, params))
orderbook = {
'timestamp': None,
'bids': [],
'asks': [],
}
timestamp = None
for i in range(0, len(response)):
side = response[i]
if side['IsBuy']:
orderbook['bids'] = self.array_concat(orderbook['bids'], side['Prices'])
else:
orderbook['asks'] = self.array_concat(orderbook['asks'], side['Prices'])
timestamp = self.parse8601(side['Timestamp'])
if not orderbook['timestamp']:
orderbook['timestamp'] = timestamp
else:
orderbook['timestamp'] = max(orderbook['timestamp'], timestamp)
if not timestamp:
timestamp = self.milliseconds()
return self.parse_order_book(orderbook, orderbook['timestamp'], 'bids', 'asks', 'Price', 'Volume')
def parse_bid_ask(self, bidask, priceKey=0, amountKey=1):
price = float(bidask[priceKey])
amount = float(bidask[amountKey])
if amount < 0:
amount = -amount
return [price, amount]
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
url = self.urls['api'][api] + '/' + self.implode_params(path, params)
query = self.omit(params, self.extract_params(path))
if api == 'public':
if query:
url += '?' + self.urlencode(query)
elif api == 'private':
if method == 'GET':
if query:
url += '?' + self.urlencode(query)
self.check_required_credentials()
headers = {
'api-key': self.apiKey,
'Accept': 'application/json',
'Content-Type': 'application/json',
}
if method == 'POST':
if params:
body = self.json(params)
return {'url': url, 'method': method, 'body': body, 'headers': headers} | timestamp = self.parse8601(order['CreatedAt'])
price = self.safe_float(order, 'Price')
amount = self.safe_float(order, 'Volume') |
crawler_test.go | package crawler
import (
"reflect"
"testing"
"time"
"github.com/meifamily/ptt-alertor/models/article"
gock "gopkg.in/h2non/gock.v1"
)
func BenchmarkCurrentPage(b *testing.B) {
for i := 0; i < b.N; i++ {
CurrentPage("lol")
}
}
func BenchmarkBuildArticles(b *testing.B) {
for i := 0; i < b.N; i++ {
BuildArticles("lol", 9697)
}
}
func Test_getYear(t *testing.T) {
type args struct {
pushTime time.Time
}
tests := []struct {
name string
args args
want int
}{
{"same", args{time.Date(0, 01, 10, 03, 01, 0, 0, time.FixedZone("CST", 8*60*60))}, 2020},
{"month before", args{time.Date(0, 12, 10, 03, 01, 0, 0, time.FixedZone("CST", 8*60*60))}, 2019},
{"tomorrow", args{time.Now().AddDate(0, 0, 1)}, 2019},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := getYear(tt.args.pushTime); got != tt.want {
t.Errorf("getYear() = %v, want %v", got, tt.want)
}
})
}
}
func Test_checkURLExist(t *testing.T) {
type args struct {
url string
}
tests := []struct {
name string
args args
want bool
}{
{"found", args{"http://dinolai.com"}, true},
{"not found", args{"http://dinolai.tw"}, false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := checkURLExist(tt.args.url); got != tt.want {
t.Errorf("checkURLExist() = %v, want %v", got, tt.want)
}
})
}
}
func Test_makeBoardURL(t *testing.T) {
type args struct {
board string
page int
}
tests := []struct {
name string
args args
want string
}{
{"no page", args{"ezsoft", -1}, "https://www.ptt.cc/bbs/ezsoft/index.html"},
{"page1", args{"ezsoft", 1}, "https://www.ptt.cc/bbs/ezsoft/index1.html"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := makeBoardURL(tt.args.board, tt.args.page); got != tt.want {
t.Errorf("makeBoardURL() = %v, want %v", got, tt.want)
}
})
}
}
func Test_makeArticleURL(t *testing.T) {
type args struct {
board string
articleCode string
}
tests := []struct {
name string
args args
want string
}{
{"M.1497363598.A.74E", args{"ezsoft", "M.1497363598.A.74E"}, "https://www.ptt.cc/bbs/ezsoft/M.1497363598.A.74E.html"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := makeArticleURL(tt.args.board, tt.args.articleCode); got != tt.want {
t.Errorf("makeArticleURL() = %v, want %v", got, tt.want)
}
})
}
}
func Test_fetchHTML(t *testing.T) {
type args struct {
reqURL string
}
tests := []struct {
name string
args args
wantErr bool
}{
{"ok", args{"https://www.ptt.cc/bbs/LoL/index.html"}, false},
{"R18", args{"https://www.ptt.cc/bbs/Gossiping/index.html"}, false},
{"not found", args{"https://www.ptt.cc/bbs/DinoLai/index.html"}, true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
_, err := fetchHTML(tt.args.reqURL)
if (err != nil) != tt.wantErr {
t.Errorf("fetchHTML() error = %v, wantErr %v", err, tt.wantErr)
return
}
})
}
}
func TestBuildArticles(t *testing.T) {
defer gock.Off()
gock.New("https://www.ptt.cc").Get("/bbs/lol/index.html").Reply(200).BodyString(dummyBody)
type args struct {
board string
page int
}
tests := []struct {
name string
args args
wantArticles article.Articles
wantErr bool
}{
{"ok", args{"lol", -1}, []article.Article{
{
ID: 1516285019,
Code: "",
Title: "[外絮] JTeam FB",
Link: "https://www.ptt.cc/bbs/LoL/M.1516285019.A.BCE.html",
Date: "1/18",
Author: "Andy7577272",
PushSum: 2,
},
}, false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
gotArticles, err := BuildArticles(tt.args.board, tt.args.page)
if (err != nil) != tt.wantErr {
t.Errorf("BuildArticles() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(gotArticles, tt.wantArticles) {
t.Errorf("BuildArticles() = %#v, want %v", gotArticles, tt.wantArticles)
return
}
if !gock.IsDone() {
t.Errorf("BuildArticles() gock status = %v, wantErr %v", gock.IsDone(), true)
}
})
}
}
func Test | testing.T) {
defer gock.Off()
gock.New("https://www.ptt.cc").Get("/bbs/TFSHS66th321/M.1498563199.A.35C.html").
Reply(200).BodyString(dummyArticle)
year := time.Now().Year()
type args struct {
board string
articleCode string
}
tests := []struct {
name string
args args
want article.Article
wantErr bool
}{
{"ok", args{"TFSHS66th321", "M.1498563199.A.35C"}, article.Article{
ID: 1498563199,
Code: "M.1498563199.A.35C",
Title: "[小葉] 公告測試",
Link: "https://www.ptt.cc/bbs/TFSHS66th321/M.1498563199.A.35C.html",
LastPushDateTime: time.Date(year, 07, 9, 13, 57, 0, 0, time.FixedZone("CST", 8*60*60)),
Board: "TFSHS66th321",
PushSum: 0,
Comments: article.Comments{
article.Comment{Tag: "→ ", UserID: "ChoDino", Content: ": 快點好嗎", DateTime: time.Date(year, 06, 30, 00, 55, 0, 0, time.FixedZone("CST", 8*60*60))},
article.Comment{Tag: "→ ", UserID: "ChoDino", Content: ": 好了~今天先做到這~預祝空軍今天賺飽飽~睡好覺@", DateTime: time.Date(year, 07, 06, 10, 22, 0, 0, time.FixedZone("CST", 8*60*60))},
article.Comment{Tag: "→ ", UserID: "ChoDino", Content: ": 好了~今天先做到這~預祝空軍今天賺飽飽~睡好覺@", DateTime: time.Date(year, 07, 06, 10, 26, 0, 0, time.FixedZone("CST", 8*60*60))},
article.Comment{Tag: "→ ", UserID: "ChoDino", Content: ": timezone testing", DateTime: time.Date(year, 07, 9, 13, 57, 0, 0, time.FixedZone("CST", 8*60*60))}},
}, false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := BuildArticle(tt.args.board, tt.args.articleCode)
if (err != nil) != tt.wantErr {
t.Errorf("BuildArticle() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("BuildArticle() = %#v, want %#v", got, tt.want)
}
})
}
}
var dummyBody = `
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>看板 LoL 文章列表 - 批踢踢實業坊</title>
</head>
<body>
<div id="topbar-container">
<div id="topbar" class="bbs-content">
<a id="logo" href="/">批踢踢實業坊</a>
<span>›</span>
<a class="board" href="/bbs/LoL/index.html"><span class="board-label">看板 </span>LoL</a>
<a class="right small" href="/about.html">關於我們</a>
<a class="right small" href="/contact.html">聯絡資訊</a>
</div>
</div>
<div id="main-container">
<div id="action-bar-container">
<div class="action-bar">
<div class="btn-group btn-group-dir">
<a class="btn selected" href="/bbs/LoL/index.html">看板</a>
<a class="btn" href="/man/LoL/index.html">精華區</a>
</div>
<div class="btn-group btn-group-paging">
<a class="btn wide" href="/bbs/LoL/index1.html">最舊</a>
<a class="btn wide" href="/bbs/LoL/index9851.html">‹ 上頁</a>
<a class="btn wide disabled">下頁 ›</a>
<a class="btn wide" href="/bbs/LoL/index.html">最新</a>
</div>
</div>
</div>
<div class="r-list-container action-bar-margin bbs-screen">
<div class="r-ent">
<div class="nrec"><span class="hl f2">2</span></div>
<div class="mark"></div>
<div class="title">
<a href="/bbs/LoL/M.1516285019.A.BCE.html">[外絮] JTeam FB</a>
</div>
<div class="meta">
<div class="date"> 1/18</div>
<div class="author">Andy7577272</div>
</div>
</div>
<div class="r-list-sep"></div>
<div class="r-ent">
<div class="nrec"><span class="hl f1">爆</span></div>
<div class="mark">M</div>
<div class="title">
<a href="/bbs/LoL/M.1512746508.A.54D.html">[公告] 伺服器狀況詢問/聊天/揪團/抱怨/多功能區</a>
</div>
<div class="meta">
<div class="date">12/08</div>
<div class="author">InnGee</div>
</div>
</div>
</div>
</div>
</body>
</html>
`
var dummyArticle = `
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>[小葉] 公告測試 - 看板 TFSHS66th321 - 批踢踢實業坊</title>
<meta name="robots" content="all">
<meta name="keywords" content="Ptt BBS 批踢踢">
<meta name="description" content="測
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.170.119.214
※ 文章網址: https://www.ptt.cc/bbs/TFSHS66th321/M.1498563199.A.35C.html
→ ChoDino: 快點好嗎 06/30 00:55
">
<meta property="og:site_name" content="Ptt 批踢踢實業坊">
<meta property="og:title" content="[小葉] 公告測試">
<meta property="og:description" content="測
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.170.119.214
※ 文章網址: https://www.ptt.cc/bbs/TFSHS66th321/M.1498563199.A.35C.html
→ ChoDino: 快點好嗎 06/30 00:55
">
<link rel="canonical" href="https://www.ptt.cc/bbs/TFSHS66th321/M.1498563199.A.35C.html">
<link rel="stylesheet" type="text/css" href="//images.ptt.cc/bbs/v2.22/bbs-common.css">
<link rel="stylesheet" type="text/css" href="//images.ptt.cc/bbs/v2.22/bbs-base.css" media="screen">
<link rel="stylesheet" type="text/css" href="//images.ptt.cc/bbs/v2.22/bbs-custom.css">
<link rel="stylesheet" type="text/css" href="//images.ptt.cc/bbs/v2.22/pushstream.css" media="screen">
<link rel="stylesheet" type="text/css" href="//images.ptt.cc/bbs/v2.22/bbs-print.css" media="print">
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div id="topbar-container">
<div id="topbar" class="bbs-content">
<a id="logo" href="/">批踢踢實業坊</a>
<span>›</span>
<a class="board" href="/bbs/TFSHS66th321/index.html"><span class="board-label">看板 </span>TFSHS66th321</a>
<a class="right small" href="/about.html">關於我們</a>
<a class="right small" href="/contact.html">聯絡資訊</a>
</div>
</div>
<div id="navigation-container">
<div id="navigation" class="bbs-content">
<a class="board" href="/bbs/TFSHS66th321/index.html">返回看板</a>
<div class="bar"></div>
<div class="share">
<span>分享</span>
<div class="fb-like" data-send="false" data-layout="button_count" data-width="90" data-show-faces="false" data-href="http://www.ptt.cc/bbs/TFSHS66th321/M.1498563199.A.35C.html"></div>
<div class="g-plusone" data-size="medium"></div>
<script type="text/javascript">
window.___gcfg = {lang: 'zh-TW'};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</div>
</div>
</div>
<div id="main-container">
<div id="main-content" class="bbs-screen bbs-content"><div class="article-metaline"><span class="article-meta-tag">作者</span><span class="article-meta-value">ChoDino ()</span></div><div class="article-metaline-right"><span class="article-meta-tag">看板</span><span class="article-meta-value">TFSHS66th321</span></div><div class="article-metaline"><span class="article-meta-tag">標題</span><span class="article-meta-value">[小葉] 公告測試</span></div><div class="article-metaline"><span class="article-meta-tag">時間</span><span class="article-meta-value">Tue Jun 27 19:33:15 2017</span></div>
測
--
<span class="f2">※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.170.119.214
</span><span class="f2">※ 文章網址: <a href="https://www.ptt.cc/bbs/TFSHS66th321/M.1498563199.A.35C.html" target="_blank" rel="nofollow">https://www.ptt.cc/bbs/TFSHS66th321/M.1498563199.A.35C.html</a>
</span><div class="push"><span class="f1 hl push-tag">→ </span><span class="f3 hl push-userid">ChoDino</span><span class="f3 push-content">: 快點好嗎</span><span class="push-ipdatetime"> 06/30 00:55
</span></div><div class="push"><span class="f1 hl push-tag">→ </span><span class="f3 hl push-userid">ChoDino</span><span class="f3 push-content">: 好了~今天先做到這~預祝空軍今天賺飽飽~睡好覺@<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="30467052">[email protected]</a></span><span class="push-ipdatetime"> 07/06 10:22
</span></div><div class="push"><span class="f1 hl push-tag">→ </span><span class="f3 hl push-userid">ChoDino</span><span class="f3 push-content">: 好了~今天先做到這~預祝空軍今天賺飽飽~睡好覺@<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c2b482a0">[email protected]</a></span><span class="push-ipdatetime"> 07/06 10:26
</span></div><div class="push"><span class="f1 hl push-tag">→ </span><span class="f3 hl push-userid">ChoDino</span><span class="f3 push-content">: timezone testing</span><span class="push-ipdatetime"> 07/09 13:57
</span></div></div>
<div id="article-polling" data-pollurl="/poll/TFSHS66th321/M.1498563199.A.35C.html?cacheKey=2117-403609369&offset=631&offset-sig=88f7d90a2437b7ecd7731bad54988cc001b5758e" data-longpollurl="/v1/longpoll?id=253ee0098f267a4184c1b6ca84911f8e8762da0a" data-offset="631"></div>
</div>
<script data-cfasync="false" src="/cdn-cgi/scripts/af2821b0/cloudflare-static/email-decode.min.js"></script><script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-32365737-1', {
cookieDomain: 'ptt.cc',
legacyCookieDomain: 'ptt.cc'
});
ga('send', 'pageview');
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//images.ptt.cc/bbs/v2.22/bbs.js"></script>
</body>
</html>
`
| BuildArticle(t * |
backup_location.go | // Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
// Code generated. DO NOT EDIT.
// Key Management Service API
//
// API for managing and performing operations with keys and vaults.
//
package keymanagement
import (
"encoding/json"
"github.com/oracle/oci-go-sdk/common"
)
| type BackupLocation interface {
}
type backuplocation struct {
JsonData []byte
Destination string `json:"destination"`
}
// UnmarshalJSON unmarshals json
func (m *backuplocation) UnmarshalJSON(data []byte) error {
m.JsonData = data
type Unmarshalerbackuplocation backuplocation
s := struct {
Model Unmarshalerbackuplocation
}{}
err := json.Unmarshal(data, &s.Model)
if err != nil {
return err
}
m.Destination = s.Model.Destination
return err
}
// UnmarshalPolymorphicJSON unmarshals polymorphic json
func (m *backuplocation) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) {
if data == nil || string(data) == "null" {
return nil, nil
}
var err error
switch m.Destination {
case "BUCKET":
mm := BackupLocationBucket{}
err = json.Unmarshal(data, &mm)
return mm, err
case "PRE_AUTHENTICATED_REQUEST_URI":
mm := BackupLocationUri{}
err = json.Unmarshal(data, &mm)
return mm, err
default:
return *m, nil
}
}
func (m backuplocation) String() string {
return common.PointerString(m)
}
// BackupLocationDestinationEnum Enum with underlying type: string
type BackupLocationDestinationEnum string
// Set of constants representing the allowable values for BackupLocationDestinationEnum
const (
BackupLocationDestinationBucket BackupLocationDestinationEnum = "BUCKET"
BackupLocationDestinationPreAuthenticatedRequestUri BackupLocationDestinationEnum = "PRE_AUTHENTICATED_REQUEST_URI"
)
var mappingBackupLocationDestination = map[string]BackupLocationDestinationEnum{
"BUCKET": BackupLocationDestinationBucket,
"PRE_AUTHENTICATED_REQUEST_URI": BackupLocationDestinationPreAuthenticatedRequestUri,
}
// GetBackupLocationDestinationEnumValues Enumerates the set of values for BackupLocationDestinationEnum
func GetBackupLocationDestinationEnumValues() []BackupLocationDestinationEnum {
values := make([]BackupLocationDestinationEnum, 0)
for _, v := range mappingBackupLocationDestination {
values = append(values, v)
}
return values
} | // BackupLocation Backup upload location |
StringObject.ts | import { ContainerObject } from './ContainerObject';
import { ExceptionType } from '../../api/ExceptionType';
import { IterableObject } from './IterableObject';
import { PyObject } from '../../api/Object';
import { getObjectUtils } from '../../api/ObjectUtils';
import { pyFunction, pyParam, pyParamArgs, pyParamKwargs } from '../../api/Decorators';
import { PropertyType } from '../../api/Native';
import { UniqueErrorCode } from '../../api/UniqueErrorCode';
function isSpace(c: string): boolean {
return c === ' ' || c === '\t' || c === '\r' || c === '\n';
}
export class | extends ContainerObject {
public readonly value: string;
public constructor(value: string) {
super();
this.value = value;
}
getCount(): number {
return this.value.length;
}
getItem(index: number | string): PyObject {
if (typeof index !== 'number') {
getObjectUtils().throwException(ExceptionType.TypeError, UniqueErrorCode.ExpectedNumericIndexer, 'index');
}
return new StringObject(this.value[index]);
}
public toBoolean(): boolean {
return this.value && this.value.length > 0;
}
public toString(): string {
return this.value;
}
public equals(to: PyObject): boolean {
if (to instanceof StringObject) {
return this.value === to.value;
}
return super.equals(to);
}
public compare(to: PyObject): number {
if (to instanceof StringObject) {
if (this.value < to.value) {
return -1;
} else if (this.value === to.value) {
return 0;
} else {
return 1;
}
}
return super.compare(to);
}
public contains(value: PyObject): boolean {
const substr = value.toString();
return this.value.indexOf(substr) >= 0;
}
@pyFunction
public capitalize(): string {
return this.value ? this.value[0].toUpperCase() + this.value.substr(1) : '';
}
@pyFunction
public center(
@pyParam('width', PropertyType.Number) width: number, //
@pyParam('fillchar', PropertyType.String, ' ') fillchar: string,
): string {
if (this.value.length >= width) {
return this.value;
}
const left = Math.floor((width - this.value.length) / 2);
return fillchar.repeat(left) + this.value + fillchar.repeat(width - left - this.value.length);
}
@pyFunction
public count(
@pyParam('sub', PropertyType.String) sub: string,
@pyParam('start', PropertyType.Number, 0) start: number,
@pyParam('end', PropertyType.Number, -1) end: number,
): number {
const from = start;
const to = (end < 0 ? this.value.length : end) - sub.length;
let count = 0;
for (let i = from; i < to; i++) {
if (this.value.substr(i, sub.length) === sub) {
count++;
}
}
return count;
}
@pyFunction
public endswith(@pyParam('sub', PropertyType.String) sub: string): boolean {
return this.value.substr(this.value.length - sub.length) === sub;
}
@pyFunction
public startswith(@pyParam('sub', PropertyType.String) sub: string): boolean {
return this.value.substr(0, sub.length) === sub;
}
@pyFunction
public find(
@pyParam('sub', PropertyType.String) sub: string,
@pyParam('start', PropertyType.Number, 0) start: number,
@pyParam('end', PropertyType.Number, -1) end: number,
): number {
if (end === -1) {
end = this.value.length;
}
end -= sub.length;
const ret = this.value.indexOf(sub, start);
if (ret < start || ret > end) {
return -1;
} else {
return ret;
}
}
@pyFunction
public format(@pyParamArgs indexed: PyObject[], @pyParamKwargs named: { [key: string]: PyObject }): string {
return StringObject.applyFormat(
this.value,
(i) => {
const v = indexed[i];
if (!v) {
getObjectUtils().throwException(ExceptionType.FunctionArgumentError, UniqueErrorCode.IndexerIsOutOfRange, i.toString());
} else {
return v;
}
},
(key) => {
const v = named[key];
if (!v) {
getObjectUtils().throwException(ExceptionType.FunctionArgumentError, UniqueErrorCode.IndexerIsOutOfRange, key);
} else {
return v;
}
},
);
}
public static applyFormat(format: string, index: (i: number) => PyObject, key: (k: string) => PyObject): string {
let ret = '';
let pos = 0;
let defaultIndex = 0;
while (pos < format.length) {
const open = format.indexOf('{', pos);
if (open < 0) {
ret += format.substr(pos);
break;
}
if (open > pos) {
ret += format.substr(pos, open - pos);
pos = open;
}
const close = format.indexOf('}', pos + 1);
if (close < 0) {
ret += format.substr(pos);
break;
}
const nextOpen = format.indexOf('{', pos + 1);
if (nextOpen >= 0 && nextOpen < close) {
ret += '{';
pos++;
continue;
}
const id = format.substr(open + 1, close - open - 1);
let obj: PyObject;
if (!id) {
obj = index(defaultIndex++);
} else if (id.match(/^[0-9]+$/)) {
obj = index(Number(id));
} else {
obj = key(id);
}
if (obj) {
ret += obj.toString();
pos = close + 1;
} else {
ret += '{';
pos++;
}
}
return ret;
}
@pyFunction
public index(
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/explicit-module-boundary-types
@pyParam('sub', PropertyType.String) sub: any,
@pyParam('start', PropertyType.Number, 0) start: number,
@pyParam('end', PropertyType.Number, -1) end: number,
): number {
if (end === -1) {
end = this.value.length;
}
end -= sub.length;
const pos = this.value.indexOf(sub, start);
if (pos >= start && pos <= end) {
return pos;
}
getObjectUtils().throwException(ExceptionType.ValueError, UniqueErrorCode.CannotFindObjectInIterator, sub);
}
@pyFunction
public isalnum(): boolean {
return /^[A-Za-z0-9]+$/.test(this.value);
}
@pyFunction
public isalpha(): boolean {
return /^[A-Za-z]+$/.test(this.value);
}
@pyFunction
public isascii(): boolean {
if (!this.value) {
return false;
}
for (let i = 0; i < this.value.length; i++) {
if (this.value.charCodeAt(i) > 127) {
return false;
}
}
return true;
}
@pyFunction
public isdecimal(): boolean {
return /^[0-9]+$/.test(this.value);
}
@pyFunction
public isidentifier(): boolean {
return /^[A-Za-z_][A-Za-z_0-9]*$/.test(this.value);
}
@pyFunction
public lower(): string {
return this.value.toLowerCase();
}
@pyFunction
public islower(): boolean {
if (!this.value) {
return false;
}
return this.value === this.value.toLowerCase();
}
@pyFunction
public isnumeric(): boolean {
return /^[0-9]+$/.test(this.value);
}
@pyFunction
public isprintable(): boolean {
if (!this.value) {
return false;
}
for (let i = 0; i < this.value.length; i++) {
if (this.value.charCodeAt(i) < 20) {
return false;
}
}
return true;
}
@pyFunction
public isspace(): boolean {
if (!this.value) {
return false;
}
for (let i = 0; i < this.value.length; i++) {
switch (this.value[i]) {
case ' ':
case '\t':
continue;
default:
return false;
}
}
return true;
}
@pyFunction
public istitle(): boolean {
if (!this.value) {
return false;
}
let waitUpper = true;
for (let i = 0; i < this.value.length; i++) {
switch (this.value[i]) {
case ' ':
case '\t':
case '\r':
case '\n':
waitUpper = true;
continue;
}
const c = this.value[i];
if (waitUpper) {
const upper = c.toUpperCase() === c;
if (!upper) {
return false;
}
waitUpper = false;
} else {
const lower = c.toLowerCase() === c;
if (!lower) {
return false;
}
}
}
return true;
}
@pyFunction
public isupper(): boolean {
for (let i = 0; i < this.value.length; i++) {
const c = this.value[i];
if (c.toUpperCase() !== c) {
return false;
}
}
return true;
}
@pyFunction
public join(@pyParam('list', PropertyType.Iterable) list: IterableObject): string {
if (list.getCount() === 0) {
return '';
}
let ret = list.getItem(0).toString();
for (let i = 1; i < list.getCount(); i++) {
ret += this.value + list.getItem(i).toString();
}
return ret;
}
private justifyAny(width: number, separator: string, left: boolean): string {
const repeat = separator.repeat(Math.max(0, width - this.value.length));
return left ? this.value + repeat : repeat + this.value;
}
@pyFunction
public ljust(@pyParam('width', PropertyType.Number) width: number, @pyParam('separator', PropertyType.String, ' ') separator: string): string {
return this.justifyAny(width, separator, true);
}
@pyFunction
public rjust(@pyParam('width', PropertyType.Number) width: number, @pyParam('separator', PropertyType.String, ' ') separator: string): string {
return this.justifyAny(width, separator, false);
}
@pyFunction
public upper(): string {
return this.value.toUpperCase();
}
private stripAny(value: string, sep: string, left: boolean) {
let ret = value;
while (ret.length > 0) {
const c = left ? ret[0] : ret[ret.length - 1];
if (sep.indexOf(c) < 0) {
break;
}
ret = left ? ret.substr(1) : ret.substr(0, ret.length - 1);
}
return ret;
}
@pyFunction
public lstrip(@pyParam('sep', PropertyType.String, ' \t\r\n') sep: string): string {
return this.stripAny(this.value, sep, true);
}
@pyFunction
public rstrip(@pyParam('sep', PropertyType.String, ' \t\r\n') sep: string): string {
return this.stripAny(this.value, sep, false);
}
@pyFunction
public strip(@pyParam('sep', PropertyType.String, ' \t\r\n') sep: string): string {
return this.stripAny(this.stripAny(this.value, sep, false), sep, true);
}
public partitionAny(part: string, left: boolean): PyObject {
const pos = left ? this.value.indexOf(part) : this.value.lastIndexOf(part);
if (pos <= 0) {
if (left) {
return getObjectUtils().createTuple([this, new StringObject(''), new StringObject('')]);
} else {
return getObjectUtils().createTuple([new StringObject(''), new StringObject(''), this]);
}
}
return getObjectUtils().createTuple([
new StringObject(this.value.substr(0, pos)),
new StringObject(part),
new StringObject(this.value.substr(pos + part.length)),
]);
}
@pyFunction
public partition(@pyParam('part', PropertyType.String) part: string): PyObject {
return this.partitionAny(part, true);
}
@pyFunction
public rpartition(@pyParam('part', PropertyType.String) part: string): PyObject {
return this.partitionAny(part, false);
}
@pyFunction
public replace(
@pyParam('from', PropertyType.String) from: string,
@pyParam('to', PropertyType.String) to: string,
@pyParam('count', PropertyType.Number, 1) count: number,
): string {
let newValue = this.value;
let replaced = 0;
for (let pos = 0; pos < newValue.length; ) {
const next = newValue.indexOf(from, pos);
if (next < 0) {
break;
}
newValue = newValue.substr(0, next) + to + newValue.substr(next + from.length);
pos = next + to.length;
replaced++;
if (replaced >= count) {
break;
}
}
return newValue;
}
@pyFunction
public rfind(
@pyParam('sub', PropertyType.String) sub: string,
@pyParam('start', PropertyType.Number, 0) start: number,
@pyParam('end', PropertyType.Number, -1) end: number,
): number {
end = (end === -1 ? this.value.length : end) - sub.length;
const newPos = this.value.lastIndexOf(sub, end);
if (newPos < 0 || newPos < start) {
return -1;
}
return newPos;
}
@pyFunction
public rindex(
@pyParam('sub', PropertyType.String) sub: string,
@pyParam('start', PropertyType.Number, 0) start: number,
@pyParam('end', PropertyType.Number, -1) end: number,
): number {
const pos = this.rfind(sub, start, end);
if (pos === -1) {
getObjectUtils().throwException(ExceptionType.ValueError, UniqueErrorCode.CannotFindObjectInIterator, sub);
}
return pos;
}
private splitAny(sep: string, maxCount: number, left: boolean): PyObject {
let last = left ? 0 : this.value.length;
const values: string[] = [];
for (let count = 0; ; count++) {
let from: number, to: number;
if (maxCount > 0 && count >= maxCount) {
from = -1;
} else {
if (sep) {
if (left) {
from = this.value.indexOf(sep, last);
} else {
from = this.value.lastIndexOf(sep, last);
}
if (from >= 0) {
to = from + sep.length;
}
} else {
if (left) {
for (from = last; from < this.value.length; from++) {
if (isSpace(this.value[from])) {
break;
}
}
if (from >= this.value.length) {
from = -1;
} else {
for (to = from; to < this.value.length; to++) {
if (!isSpace(this.value[to])) {
break;
}
}
}
} else {
for (from = last; from > 0; from--) {
if (isSpace(this.value[from - 1])) {
break;
}
}
if (from === 0) {
from = -1;
} else {
to = from;
for (; from > 0; from--) {
if (!isSpace(this.value[from - 1])) {
break;
}
}
}
}
}
}
if (from < 0) {
if (left) {
if (last < (sep ? this.value.length + 1 : this.value.length)) {
values.push(this.value.substr(last));
}
} else {
if (last > (sep ? -1 : 0)) {
values.unshift(this.value.substr(0, last));
}
}
break;
}
if (left) {
if (sep || from !== last) {
values.push(this.value.substr(last, from - last));
}
last = to;
} else {
if (sep || from !== last) {
values.unshift(this.value.substr(to, last - to));
}
last = from;
}
}
return getObjectUtils().createList(values.map((v) => new StringObject(v)));
}
@pyFunction
public split(@pyParam('sep', PropertyType.String, '') sep: string, @pyParam('maxsplit', PropertyType.Number, -1) maxsplit: number): PyObject {
return this.splitAny(sep, maxsplit, true);
}
@pyFunction
public rsplit(@pyParam('sep', PropertyType.String, '') sep: string, @pyParam('maxsplit', PropertyType.Number, -1) maxsplit: number): PyObject {
return this.splitAny(sep, maxsplit, false);
}
@pyFunction
public splitlines(): PyObject {
const ret: StringObject[] = [];
let last = 0;
for (let i = 0; ; ) {
const c = this.value[i];
if (c === '\r' || c === '\n' || i >= this.value.length) {
if (i < this.value.length || i - last > 0) {
ret.push(new StringObject(this.value.substr(last, i - last)));
}
i++;
if (i > this.value.length) {
break;
}
const n = this.value[i];
if ((c === '\r' && n === '\n') || (c === '\n' && n === '\r')) {
i++;
}
last = i;
} else {
i++;
}
}
return getObjectUtils().createList(ret);
}
@pyFunction
public swapcase(): StringObject {
const lower = this.value.toLowerCase();
const upper = this.value.toUpperCase();
let ret = '';
for (let i = 0; i < this.value.length; i++) {
const c = this.value[i];
if (c !== lower[i]) {
ret += lower[i];
} else if (ret !== upper[i]) {
ret += upper[i];
} else {
ret += c;
}
}
return new StringObject(ret);
}
@pyFunction
public title(): StringObject {
let ret = '';
let upper = true;
for (let i = 0; i < this.value.length; i++) {
const c = this.value[i];
if (c === ' ' || c === '\t' || c === '\r' || c === '\n') {
upper = true;
ret += c;
continue;
}
if (upper) {
ret += c.toUpperCase();
upper = false;
} else {
ret += c.toLowerCase();
}
}
return new StringObject(ret);
}
@pyFunction
public zfill(@pyParam('width', PropertyType.Number) width: number): string {
if (width <= this.value.length) {
return this.value;
}
let pos = 0;
if (this.value[0] === '-' || this.value[0] === '+') {
pos = 1;
}
return this.value.substr(0, pos) + '0'.repeat(width - this.value.length) + this.value.substr(pos);
}
}
| StringObject |
error.rs | use std::collections::TryReserveError;
use std::fmt::{Display, Formatter, Debug};
//use std::backtrace::Backtrace;
use anyhow::{anyhow};
use std::time::SystemTimeError;
use std::path::StripPrefixError;
use docchi_compaction::error::ComError;
use std::error::Error;
/// The error type.
///
/// This wraps anyhow::Error. You can get it from Into trait.
///
/// Maybe the source error retrieved from anyhow::Error can be used to determine the cause of the error,
/// but currently, there's no guarantees about the error format.
///
/// I deeply depend on anyhow::Error::backtrace for debugging.
pub struct NouArcError{
error : anyhow::Error,
}
impl NouArcError{
pub(crate) fn new(e : impl Error + Send + Sync + 'static) -> Self{ Self{ error : e.into() } }
}
impl Display for NouArcError{
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
Display::fmt(&self.error, f)
}
}
impl Debug for NouArcError{
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
Debug::fmt(&self.error, f)
}
}
impl Error for NouArcError{
fn source(&self) -> Option<&(dyn Error + 'static)> {
self.error.source()
}
}
impl From<ComError> for NouArcError{
fn from(e: ComError) -> Self {
Self::new(e)
}
}
impl From<SystemTimeError> for NouArcError{
fn from(e : SystemTimeError) -> Self { Self::new(e) }
}
impl From<StripPrefixError> for NouArcError{
fn from(e: StripPrefixError) -> Self {
NouArcError::new(e)
}
}
impl From<std::io::Error> for NouArcError{
fn from(e : std::io::Error) -> Self { Self::new(e) }
}
impl From<std::string::FromUtf8Error> for NouArcError{
fn from(e : std::string::FromUtf8Error) -> Self { Self::new(e) }
}
impl From<std::sync::mpsc::RecvError> for NouArcError{
fn from(e : std::sync::mpsc::RecvError) -> Self |
}
impl<T : Send + Sync + 'static> From<std::sync::mpsc::SendError<T>> for NouArcError{
fn from(e : std::sync::mpsc::SendError<T>) -> Self { Self::new(e) }
}
impl From<snap::Error> for NouArcError{
fn from(e : snap::Error) -> Self { Self::new(e) }
}
impl From<TryReserveError> for NouArcError{
fn from(e : TryReserveError) -> Self { Self::new(e) }
}
impl From<&str> for NouArcError{
fn from(e : &str) -> Self { Self{ error : anyhow!("{}", e) } }
}
impl From<String> for NouArcError{
fn from(e : String) -> Self { Self{ error : anyhow!("{}", e) } }
} | { Self::new(e) } |
main.rs | // DO NOT EDIT !
// This file was generated automatically from 'src/mako/cli/main.rs.mako' |
extern crate tokio;
#[macro_use]
extern crate clap;
extern crate yup_oauth2 as oauth2;
use std::env;
use std::io::{self, Write};
use clap::{App, SubCommand, Arg};
use google_groupsmigration1::{api, Error};
mod client;
use client::{InvalidOptionsError, CLIError, arg_from_str, writer_from_opts, parse_kv_arg,
input_file_from_opts, input_mime_from_opts, FieldCursor, FieldError, CallType, UploadProtocol,
calltype_from_str, remove_json_null_values, ComplexType, JsonType, JsonTypeInfo};
use std::default::Default;
use std::str::FromStr;
use serde_json as json;
use clap::ArgMatches;
enum DoitError {
IoError(String, io::Error),
ApiError(Error),
}
struct Engine<'n> {
opt: ArgMatches<'n>,
hub: api::GroupsMigration,
gp: Vec<&'static str>,
gpm: Vec<(&'static str, &'static str)>,
}
impl<'n> Engine<'n> {
async fn _archive_insert(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
-> Result<(), DoitError> {
let mut call = self.hub.archive().insert(opt.value_of("group-id").unwrap_or(""));
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
_ => {
let mut found = false;
for param in &self.gp {
if key == *param {
found = true;
call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset"));
break;
}
}
if !found {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v } ));
}
}
}
}
let vals = opt.values_of("mode").unwrap().collect::<Vec<&str>>();
let protocol = calltype_from_str(vals[0], ["simple"].iter().map(|&v| v.to_string()).collect(), err);
let mut input_file = input_file_from_opts(vals[1], err);
let mime_type = input_mime_from_opts(opt.value_of("mime").unwrap_or("application/octet-stream"), err);
if dry_run {
Ok(())
} else {
assert!(err.issues.len() == 0);
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
call = call.add_scope(scope);
}
let mut ostream = match writer_from_opts(opt.value_of("out")) {
Ok(mut f) => f,
Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)),
};
match match protocol {
CallType::Upload(UploadProtocol::Simple) => call.upload(input_file.unwrap(), mime_type.unwrap()).await,
CallType::Standard => unreachable!()
} {
Err(api_err) => Err(DoitError::ApiError(api_err)),
Ok((mut response, output_schema)) => {
let mut value = json::value::to_value(&output_schema).expect("serde to work");
remove_json_null_values(&mut value);
json::to_writer_pretty(&mut ostream, &value).unwrap();
ostream.flush().unwrap();
Ok(())
}
}
}
}
async fn _doit(&self, dry_run: bool) -> Result<Result<(), DoitError>, Option<InvalidOptionsError>> {
let mut err = InvalidOptionsError::new();
let mut call_result: Result<(), DoitError> = Ok(());
let mut err_opt: Option<InvalidOptionsError> = None;
match self.opt.subcommand() {
("archive", Some(opt)) => {
match opt.subcommand() {
("insert", Some(opt)) => {
call_result = self._archive_insert(opt, dry_run, &mut err).await;
},
_ => {
err.issues.push(CLIError::MissingMethodError("archive".to_string()));
writeln!(io::stderr(), "{}\n", opt.usage()).ok();
}
}
},
_ => {
err.issues.push(CLIError::MissingCommandError);
writeln!(io::stderr(), "{}\n", self.opt.usage()).ok();
}
}
if dry_run {
if err.issues.len() > 0 {
err_opt = Some(err);
}
Err(err_opt)
} else {
Ok(call_result)
}
}
// Please note that this call will fail if any part of the opt can't be handled
async fn new(opt: ArgMatches<'n>) -> Result<Engine<'n>, InvalidOptionsError> {
let (config_dir, secret) = {
let config_dir = match client::assure_config_dir_exists(opt.value_of("folder").unwrap_or("~/.google-service-cli")) {
Err(e) => return Err(InvalidOptionsError::single(e, 3)),
Ok(p) => p,
};
match client::application_secret_from_directory(&config_dir, "groupsmigration1-secret.json",
"{\"installed\":{\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_secret\":\"hCsslbCUyfehWMmbkG8vTYxG\",\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"client_email\":\"\",\"redirect_uris\":[\"urn:ietf:wg:oauth:2.0:oob\",\"oob\"],\"client_x509_cert_url\":\"\",\"client_id\":\"620010449518-9ngf7o4dhs0dka470npqvor6dc5lqb9b.apps.googleusercontent.com\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\"}}") {
Ok(secret) => (config_dir, secret),
Err(e) => return Err(InvalidOptionsError::single(e, 4))
}
};
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).persist_tokens_to_disk(format!("{}/groupsmigration1", config_dir)).build().await.unwrap();
let client = hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots());
let engine = Engine {
opt: opt,
hub: api::GroupsMigration::new(client, auth),
gp: vec!["$-xgafv", "access-token", "alt", "callback", "fields", "key", "oauth-token", "pretty-print", "quota-user", "upload-type", "upload-protocol"],
gpm: vec![
("$-xgafv", "$.xgafv"),
("access-token", "access_token"),
("oauth-token", "oauth_token"),
("pretty-print", "prettyPrint"),
("quota-user", "quotaUser"),
("upload-type", "uploadType"),
("upload-protocol", "upload_protocol"),
]
};
match engine._doit(true).await {
Err(Some(err)) => Err(err),
Err(None) => Ok(engine),
Ok(_) => unreachable!(),
}
}
async fn doit(&self) -> Result<(), DoitError> {
match self._doit(false).await {
Ok(res) => res,
Err(_) => unreachable!(),
}
}
}
#[tokio::main]
async fn main() {
let mut exit_status = 0i32;
let upload_value_names = ["mode", "file"];
let arg_data = [
("archive", "methods: 'insert'", vec![
("insert",
Some(r##"Inserts a new mail into the archive of the Google group."##),
"Details at http://byron.github.io/google-apis-rs/google_groupsmigration1_cli/archive_insert",
vec![
(Some(r##"group-id"##),
None,
Some(r##"The group ID"##),
Some(true),
Some(false)),
(Some(r##"mode"##),
Some(r##"u"##),
Some(r##"Specify the upload protocol (simple) and the file to upload"##),
Some(true),
Some(true)),
(Some(r##"v"##),
Some(r##"p"##),
Some(r##"Set various optional parameters, matching the key=value form"##),
Some(false),
Some(true)),
(Some(r##"out"##),
Some(r##"o"##),
Some(r##"Specify the file into which to write the program's output"##),
Some(false),
Some(false)),
]),
]),
];
let mut app = App::new("groupsmigration1")
.author("Sebastian Thiel <[email protected]>")
.version("2.0.5+20210318")
.about("The Groups Migration API allows domain administrators to archive emails into Google groups.")
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_groupsmigration1_cli")
.arg(Arg::with_name("url")
.long("scope")
.help("Specify the authentication a method should be executed in. Each scope requires the user to grant this application permission to use it.If unset, it defaults to the shortest scope url for a particular method.")
.multiple(true)
.takes_value(true))
.arg(Arg::with_name("folder")
.long("config-dir")
.help("A directory into which we will store our persistent data. Defaults to a user-writable directory that we will create during the first invocation.[default: ~/.google-service-cli")
.multiple(false)
.takes_value(true))
.arg(Arg::with_name("debug")
.long("debug")
.help("Debug print all errors")
.multiple(false)
.takes_value(false));
for &(main_command_name, about, ref subcommands) in arg_data.iter() {
let mut mcmd = SubCommand::with_name(main_command_name).about(about);
for &(sub_command_name, ref desc, url_info, ref args) in subcommands {
let mut scmd = SubCommand::with_name(sub_command_name);
if let &Some(desc) = desc {
scmd = scmd.about(desc);
}
scmd = scmd.after_help(url_info);
for &(ref arg_name, ref flag, ref desc, ref required, ref multi) in args {
let arg_name_str =
match (arg_name, flag) {
(&Some(an), _ ) => an,
(_ , &Some(f)) => f,
_ => unreachable!(),
};
let mut arg = Arg::with_name(arg_name_str)
.empty_values(false);
if let &Some(short_flag) = flag {
arg = arg.short(short_flag);
}
if let &Some(desc) = desc {
arg = arg.help(desc);
}
if arg_name.is_some() && flag.is_some() {
arg = arg.takes_value(true);
}
if let &Some(required) = required {
arg = arg.required(required);
}
if let &Some(multi) = multi {
arg = arg.multiple(multi);
}
if arg_name_str == "mode" {
arg = arg.number_of_values(2);
arg = arg.value_names(&upload_value_names);
scmd = scmd.arg(Arg::with_name("mime")
.short("m")
.requires("mode")
.required(false)
.help("The file's mime time, like 'application/octet-stream'")
.takes_value(true));
}
scmd = scmd.arg(arg);
}
mcmd = mcmd.subcommand(scmd);
}
app = app.subcommand(mcmd);
}
let matches = app.get_matches();
let debug = matches.is_present("debug");
match Engine::new(matches).await {
Err(err) => {
exit_status = err.exit_code;
writeln!(io::stderr(), "{}", err).ok();
},
Ok(engine) => {
if let Err(doit_err) = engine.doit().await {
exit_status = 1;
match doit_err {
DoitError::IoError(path, err) => {
writeln!(io::stderr(), "Failed to open output file '{}': {}", path, err).ok();
},
DoitError::ApiError(err) => {
if debug {
writeln!(io::stderr(), "{:#?}", err).ok();
} else {
writeln!(io::stderr(), "{}", err).ok();
}
}
}
}
}
}
std::process::exit(exit_status);
} | // DO NOT EDIT !
#![allow(unused_variables, unused_imports, dead_code, unused_mut)] |
instant.rs | use super::duration::Duration;
use crate::datastructures::common::Timestamp;
use fixed::{traits::ToFixed, types::U96F32};
use nix::sys::time::TimeSpec;
use std::{
fmt::Display,
ops::{Add, AddAssign, Sub, SubAssign},
};
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default)]
pub struct Instant {
/// Time in nanos
inner: U96F32,
}
impl Instant {
pub fn from_secs(secs: u64) -> Self {
let inner = secs.to_fixed::<U96F32>() * 1_000_000_000.to_fixed::<U96F32>();
Self { inner }
}
pub fn from_millis(millis: u64) -> Self {
let inner = millis.to_fixed::<U96F32>() * 1_000_000.to_fixed::<U96F32>();
Self { inner }
}
pub fn from_micros(micros: u64) -> Self {
let inner = micros.to_fixed::<U96F32>() * 1_000.to_fixed::<U96F32>();
Self { inner }
}
pub fn from_nanos(nanos: u64) -> Self {
let inner = nanos.to_fixed::<U96F32>();
Self { inner }
}
pub fn from_fixed_nanos<F: ToFixed>(nanos: F) -> Self {
Self {
inner: nanos.to_fixed(),
}
}
pub fn nanos(&self) -> U96F32 {
self.inner
}
pub fn sub_nanos(&self) -> u32 {
(self.inner % 1_000_000_000.to_fixed::<U96F32>()).to_num()
}
pub fn secs(&self) -> u64 {
(self.inner / 1_000_000_000.to_fixed::<U96F32>()).to_num()
}
pub fn from_timespec(spec: &TimeSpec) -> Self |
pub fn from_timestamp(ts: &Timestamp) -> Self {
Self::from_fixed_nanos(ts.seconds as i128 * 1_000_000_000i128 + ts.nanos as i128)
}
pub fn to_timestamp(&self) -> Timestamp {
Timestamp {
seconds: self.secs(),
nanos: self.sub_nanos(),
}
}
}
impl Add<Duration> for Instant {
type Output = Instant;
fn add(self, rhs: Duration) -> Self::Output {
if rhs.nanos().is_negative() {
Instant {
inner: self.nanos() - rhs.nanos().unsigned_abs(),
}
} else {
Instant {
inner: self.nanos() + rhs.nanos().unsigned_abs(),
}
}
}
}
impl AddAssign<Duration> for Instant {
fn add_assign(&mut self, rhs: Duration) {
*self = *self + rhs;
}
}
impl Sub<Duration> for Instant {
type Output = Instant;
fn sub(self, rhs: Duration) -> Self::Output {
self + -rhs
}
}
impl SubAssign<Duration> for Instant {
fn sub_assign(&mut self, rhs: Duration) {
*self = *self - rhs;
}
}
impl Sub<Instant> for Instant {
type Output = Duration;
fn sub(self, rhs: Instant) -> Self::Output {
Duration::from_fixed_nanos(self.inner) - Duration::from_fixed_nanos(rhs.inner)
}
}
impl Display for Instant {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.inner)
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn values() {
assert_eq!(
Instant::from_secs(10).nanos(),
10_000_000_000u64.to_fixed::<U96F32>()
);
assert_eq!(
Instant::from_millis(10).nanos(),
10_000_000u64.to_fixed::<U96F32>()
);
assert_eq!(
Instant::from_micros(10).nanos(),
10_000u64.to_fixed::<U96F32>()
);
assert_eq!(Instant::from_nanos(10).nanos(), 10u64.to_fixed::<U96F32>());
assert_eq!(
Instant::from_fixed_nanos(10.123f64).nanos(),
10.123f64.to_fixed::<U96F32>()
);
assert_eq!(Instant::from_secs(10).secs(), 10);
assert_eq!(Instant::from_millis(10).secs(), 0);
assert_eq!(Instant::from_millis(1001).secs(), 1);
}
}
| {
Self::from_fixed_nanos(spec.tv_sec() as i128 * 1_000_000_000i128 + spec.tv_nsec() as i128)
} |
pp_tests.rs | use super::lexer::{self, Token as LexerToken, TokenValue as LexerTokenValue};
use super::pp::{convert_lexer_token, Preprocessor, PreprocessorItem};
use super::token::{Integer, Location, PreprocessorError, Punct, Token, TokenValue};
struct NoopPreprocessor<'a> {
lexer: lexer::Lexer<'a>,
}
impl<'a> NoopPreprocessor<'a> {
pub fn new(input: &'a str) -> NoopPreprocessor {
NoopPreprocessor {
lexer: lexer::Lexer::new(input),
}
}
}
impl<'a> Iterator for NoopPreprocessor<'a> {
type Item = Result<Token, (PreprocessorError, Location)>;
fn next(&mut self) -> Option<Self::Item> {
loop {
match self.lexer.next() {
Some(Ok(LexerToken {
value: LexerTokenValue::NewLine,
..
})) => continue,
Some(Ok(token)) => return Some(Ok(convert_lexer_token(token).unwrap())),
None => return None,
Some(Err(err)) => return Some(Err(err)),
}
}
}
}
fn check_preprocessed_result(input: &str, expected: &str) {
let pp_items: Vec<PreprocessorItem> = Preprocessor::new(input).collect();
let noop_items: Vec<PreprocessorItem> = NoopPreprocessor::new(expected).collect();
assert_eq!(pp_items.len(), noop_items.len());
for (pp_item, noop_item) in pp_items.iter().zip(noop_items) {
if let (Ok(pp_tok), Ok(ref noop_tok)) = (pp_item, noop_item) {
assert_eq!(pp_tok.value, noop_tok.value);
} else {
unreachable!();
}
}
}
fn check_preprocessing_error(input: &str, expected_err: PreprocessorError) {
for item in Preprocessor::new(input) {
if let Err((err, _)) = item {
assert_eq!(err, expected_err);
return;
}
}
unreachable!();
}
#[test]
fn parse_directive() {
// Test parsing a simple directive
check_preprocessed_result("#define A B", "");
// Test parsing a simple directive with comment right after the hash
check_preprocessed_result("# /**/ \tdefine A B", "");
// Test preprocessing directive can only come after a newline
check_preprocessing_error("42 #define A B", PreprocessorError::UnexpectedHash);
// Test not an identifier after the hash
check_preprocessing_error(
"# ; A B",
PreprocessorError::UnexpectedToken(TokenValue::Punct(Punct::Semicolon)),
);
// Test a fake directive
check_preprocessing_error("#CoucouLeChat", PreprocessorError::UnknownDirective);
}
#[test]
fn parse_error() {
// Test preprocessing directive can only come after a newline
check_preprocessing_error("#error", PreprocessorError::ErrorDirective);
}
#[test]
fn parse_define() {
// Test the define name must be an identifier
check_preprocessing_error(
"#define [",
PreprocessorError::UnexpectedToken(TokenValue::Punct(Punct::LeftBracket)),
);
// Test that there must be a name before the new line
check_preprocessing_error(
"#define
A",
PreprocessorError::UnexpectedNewLine,
);
}
#[test]
fn parse_undef() {
// Test the define name must be an identifier
check_preprocessing_error(
"#undef !",
PreprocessorError::UnexpectedToken(TokenValue::Punct(Punct::Bang)),
);
// Test that there must be a name before the new line
check_preprocessing_error(
"#undef
A",
PreprocessorError::UnexpectedNewLine,
);
}
#[test]
fn argument_less_define() {
// Test a simple case
check_preprocessed_result(
"#define A B
A",
"B",
);
// Test an empty define
check_preprocessed_result(
"#define A
A something",
"something",
);
// Test a define containing a token that's itself
check_preprocessed_result(
"#define A A B C
A",
"A B C",
);
// Test a define invocation followed by () doesn't remove them
check_preprocessed_result(
"#define A foo
A()",
"foo()",
);
// Test nesting define
check_preprocessed_result(
"#define B C
#define A B
A",
"C",
);
// Test nesting with a bunch of empty tokens
check_preprocessed_result(
"#define D
#define C D D
#define B C C D D
#define A B B C C D D
A truc",
"truc",
);
// Test line continuation doesn't break the define
check_preprocessed_result(
"#define C A \\
B
C",
"A B",
);
// Test that multiline comments don't break the define
check_preprocessed_result(
"#define C A /*
*/ B
C",
"A B",
);
// Test that substitution in defines happens at invocation time
// Checks both when undefined a ident found in A and redefining it.
check_preprocessed_result(
"#define B stuff
#define C stuffy stuff
#define A B C
#undef B
#undef C
#define C :)
A",
"B :)",
);
// The first token of the define can be a ( if it has whitespace after
// the identifier
check_preprocessed_result(
"#define A ()
#define B\t(!
#define C/**/(a, b)
A B C",
"() (! (a, b)",
);
// Check that hashes are disallowed in defines
check_preprocessing_error("#define A #", PreprocessorError::UnexpectedHash);
}
#[test]
fn function_like_define() {
// Test calling a define with 1 argument
check_preprocessed_result(
"#define A(a) +a+
A(1)",
"+1+",
);
// Test calling a define with 0 arguments
check_preprocessed_result(
"#define A() foo
A()",
"foo",
);
// Test called a define with multiple arguments
check_preprocessed_result(
"#define A(a, b) b a
A(1, 2)",
"2 1",
);
// Test not calling a function-like macro just returns the identifier
check_preprocessed_result(
"#define A(a) foobar
A + B",
"A + B",
);
// Test that duplicate argument names are disallowed
check_preprocessing_error("#define A(a, a) foo", PreprocessorError::DuplicateParameter);
// Test that non ident or , are disallowed in the parameter list
check_preprocessing_error(
"#define A(%) foo",
PreprocessorError::UnexpectedToken(TokenValue::Punct(Punct::Percent)),
);
check_preprocessing_error(
"#define A(a, %) foo",
PreprocessorError::UnexpectedToken(TokenValue::Punct(Punct::Percent)),
);
// Test that starting the param list with a comma is disallowed
check_preprocessing_error(
"#define A(,a) foo",
PreprocessorError::UnexpectedToken(TokenValue::Punct(Punct::Comma)),
);
// Test that two identifier in a row is disallowed
check_preprocessing_error(
"#define A(a b) foo",
PreprocessorError::UnexpectedToken(TokenValue::Ident("b".to_string())),
);
check_preprocessing_error(
"#define A(a, b c) foo",
PreprocessorError::UnexpectedToken(TokenValue::Ident("c".to_string())),
);
// Test passing too many arguments is disallowed
check_preprocessing_error(
"#define A(a, b) foo
A(1, 2, 3)",
PreprocessorError::TooManyDefineArguments,
);
// Test passing too few arguments is disallowed
check_preprocessing_error(
"#define A(a, b) foo
A(1)",
PreprocessorError::TooFewDefineArguments,
);
// Test passing no argument to a define with one parameter.
check_preprocessed_result(
"#define A(a) foo a
A()",
"foo",
);
// Test EOF while parsing define arguments
check_preprocessing_error(
"#define A(a, b) foo
A(",
PreprocessorError::UnexpectedEndOfInput,
);
// Test unknown token while parsing define arguments
check_preprocessing_error(
"#define A(a) foo
A($)",
PreprocessorError::UnexpectedCharacter,
);
// Test #error while parsing arguments
check_preprocessing_error(
"#define A(a) foo
A(
#error
)",
PreprocessorError::ErrorDirective,
);
// Test that commas inside () are not used to split parameters
check_preprocessed_result(
"#define STUFF(a, b) a + b
STUFF((1, 2), 3)",
"(1, 2) + 3",
);
// Test that commas inside more nesting
check_preprocessed_result(
"#define STUFF(a, b) a + b
STUFF((((()1, 2))), 3)",
"(((()1, 2))) + 3",
);
// Test that a macro can be used in its own arguments
check_preprocessed_result(
"#define B(foo) (foo)
B(1 B(2))",
"(1 (2))",
);
// Test that define expansion doesn't happen while parsing define call arguments. If it
// were, the COMMA would make a third argument to A appear, which would be an error.
check_preprocessed_result(
"#define A(x, y) x + y
#define COMMA ,
A(1 COMMA 2, 3)",
"1, 2 + 3",
);
// Test that define expansion of arguments happens before giving tokens in the define
// call. If it weren't the COMMA wouldn't make a second argument to A appear, which would
// be an error.
check_preprocessed_result(
"#define A(x, y) x + y
#define COMMA ,
#define B(foo) A(foo)
B(1 COMMA 2)",
"1 + 2",
);
// Same but checking args are fully expanded by doing some weird nesting. The inner B's
// call to A will create the token that will cause the outer B to call A with two arguments
check_preprocessed_result(
"#define A(a, b) ,(a + b)
#define B(foo) A(foo)
#define COMMA ,
B(1 B(2 COMMA 3))",
",(1 + (2 + 3))",
);
// Test that the ( , and ) can come from the expansion of an argument.
check_preprocessed_result(
"#define LPAREN (
#define COMMA ,
#define RPAREN )
#define A(a, b) (a + b)
#define B(a) a
B(A LPAREN 1 COMMA 2 RPAREN)",
"(1 + 2)",
);
// Test that a define being expanded cannot be re-expanded inside an argument to an inner
// define call.
check_preprocessed_result(
"#define LPAREN (
#define COMMA ,
#define RPAREN )
#define A(a) a
#define B(a) a
#define C B(A(C))
C",
"C",
);
// Test that an error during define argument expansion gets surfaced properly.
check_preprocessing_error(
"#define A(x, y) x + y
#define COMMA ,
#define B(foo) A(1, foo)
B(2 COMMA 3)",
PreprocessorError::TooManyDefineArguments,
);
}
#[test]
fn define_redefinition() {
// Test that it is valid to redefine a define with the same tokens.
// Function-like case.
check_preprocessed_result(
"#define A(x, y) (x + y)
#define A(x, y) (x + y)",
"",
);
// Not function-like case.
check_preprocessed_result(
"#define A (x, y)
#define A (x, y)",
"",
);
// Oh no a token is different!
check_preprocessing_error(
"#define A (a, y)
#define A (x, y)",
PreprocessorError::DefineRedefined,
);
// Oh no, one has more tokens!
check_preprocessing_error(
"#define A a b
#define A a",
PreprocessorError::DefineRedefined,
);
// Oh no, one is function-like and not the other
check_preprocessing_error(
"#define A a
#define A() a",
PreprocessorError::DefineRedefined,
);
// Oh no, a parameter name is different!
check_preprocessing_error(
"#define A(b) a
#define A(c) a",
PreprocessorError::DefineRedefined,
);
// Oh no, the parameter count is different!
check_preprocessing_error(
"#define A(b, d) a
#define A(c) a",
PreprocessorError::DefineRedefined,
);
// Oh no, the parameter order is different!
check_preprocessing_error(
"#define A(b, d) a
#define A(d, b) a",
PreprocessorError::DefineRedefined,
);
}
#[test]
fn define_undef() {
// Basic test
check_preprocessed_result(
"#define A B
#undef A
A",
"A",
);
// It is ok to undef a non-existent define
check_preprocessed_result(
"#undef A
A",
"A",
);
// It is ok to undef a define twice
check_preprocessed_result(
"#define A B
#undef A
#undef A
A",
"A",
);
}
#[test]
fn parse_if() {
// Basic test of parsing and operations.
check_preprocessed_result(
"#if 0
1
#endif
#if 1
2
#endif",
"2",
);
// Check that garbage tokens are allowed if we are skipping.
check_preprocessed_result(
"#if 0
#if % ^ * )
#endif
#endif",
"",
);
// Check a couple simple expressions
check_preprocessed_result(
"#define FOO
#if defined(FOO)
A
#endif",
"A",
);
check_preprocessed_result(
"#if defined FOO
A
#endif",
"",
);
check_preprocessed_result(
"#define FOO 0
#if FOO
A
#endif",
"",
);
check_preprocessing_error(
"#define FOO FOO
#if FOO
#endif",
PreprocessorError::RecursionLimitReached,
);
// TODO test expressions?
}
#[test]
fn parse_ifdef() {
// Basic test of parsing and operations.
check_preprocessed_result(
"#define A
#ifdef B
1
#endif
#ifdef A
2
#endif",
"2",
);
// Check that extra tokens after the identifier are disallowed.
check_preprocessing_error(
"#ifdef B ;
#endif",
PreprocessorError::UnexpectedToken(TokenValue::Punct(Punct::Semicolon)),
);
// Check that the identifier is required.
check_preprocessing_error(
"#ifdef
#endif",
PreprocessorError::UnexpectedNewLine,
);
// Check that extra tokens are allowed if we are skipping.
check_preprocessed_result(
"#if 0
#ifdef B ;
#endif
#endif",
"",
);
// Check that having no identifier is allowed if we are skipping.
check_preprocessed_result(
"#if 0
#ifdef
#endif
#endif",
"",
);
}
#[test]
fn parse_ifndef() {
// Basic test of parsing and operations.
check_preprocessed_result(
"#define A
#ifndef B
1
#endif
#ifndef A
2
#endif",
"1",
);
// Check that extra tokens after the identifier are disallowed.
check_preprocessing_error(
"#ifndef B ;
#endif",
PreprocessorError::UnexpectedToken(TokenValue::Punct(Punct::Semicolon)),
);
// Check that the identifier is required.
check_preprocessing_error(
"#ifndef
#endif",
PreprocessorError::UnexpectedNewLine,
);
// Check that extra tokens are allowed if we are skipping.
check_preprocessed_result(
"#if 0
#ifndef B ;
#endif
#endif",
"",
);
// Check that having no identifier is allowed if we are skipping.
check_preprocessed_result(
"#if 0
#ifndef
#endif
#endif",
"",
);
}
#[test]
fn parse_elif() {
// Basic test of using elif
check_preprocessed_result(
"#if 1
1
#elif 1
2
#endif
#if 0
3
#elif 1
4
#elif 0
5
#endif",
"1 4",
);
// Check that #elif must appear in a block
check_preprocessing_error(
"#elif
aaa",
PreprocessorError::ElifOutsideOfBlock,
);
// Check that #elif must appear before the #else
check_preprocessing_error(
"#if 0
#else
#elif 1
#endif",
PreprocessorError::ElifAfterElse,
);
// Check that #elif must appear before the #else even when skipping
check_preprocessing_error(
"#if 0
#if 0
#else
#elif 1
#endif
#endif",
PreprocessorError::ElifAfterElse,
);
// Check that the condition isn't processed if the block is skipped.
check_preprocessed_result(
"#if 0
#if 1
#elif # !
#endif
#endif",
"",
);
// Check that the condition isn't processed if a previous segment was used.
check_preprocessed_result(
"#if !defined(FOO)
#elif # !
#endif
#if 0
#elif 1
#elif # %
#endif",
"",
);
// Check that elif isn't taken if at least one block was taken.
check_preprocessed_result(
"#if 1
A
#elif 1
B
#endif
#if 0
C
#elif 1
D
#elif 1
E
#endif",
"A D",
);
}
#[test]
fn parse_else() {
// Basic test of using else with if and elif
check_preprocessed_result(
"#if 0
1
#else
2
#endif
#if 0
3
#elif 0
4
#else
5
#endif",
"2 5",
);
// Check that #else must appear in a block
check_preprocessing_error(
"#else
aaa",
PreprocessorError::ElseOutsideOfBlock,
);
// Check that else can only appear once in a block, when skipping or not.
check_preprocessing_error(
"#if 0
#else
#else
#endif",
PreprocessorError::MoreThanOneElse,
);
check_preprocessing_error(
"#if 0
#if 0
#else
#else
#endif
#endif",
PreprocessorError::MoreThanOneElse,
);
// Check that else isn't taken if at least one block was taken.
check_preprocessed_result(
"#if 1
A
#else
B
#endif
#if 0
C
#elif 1
D
#else
E
#endif",
"A D",
);
// Check that else isn't taken if it's skipped from the outside.
check_preprocessed_result(
"#if 0
#if 0
#else
FOO
#endif
#endif",
"",
);
}
#[test]
fn parse_endif() {
// Basic test of using endif
check_preprocessed_result(
"#if 0
a
#endif
b",
"b",
);
// Check that extra tokens are disallowed.
check_preprocessing_error(
"#if 1
#endif %",
PreprocessorError::UnexpectedToken(TokenValue::Punct(Punct::Percent)),
);
// Check that extra tokens are disallowed even for an inner_skipped block.
check_preprocessing_error(
"#if 0
#endif %",
PreprocessorError::UnexpectedToken(TokenValue::Punct(Punct::Percent)),
);
// Check that extra tokens are allowed if we are skipping.
check_preprocessed_result(
"#if 0
#if 0
#endif %
#endif",
"",
);
// Check that a missing endif triggers an error, nest and unnested case.
check_preprocessing_error("#if 0", PreprocessorError::UnfinishedBlock);
check_preprocessing_error(
"#if 1
#if 0
#endif",
PreprocessorError::UnfinishedBlock,
);
// Check that endif must be well nested with ifs.
check_preprocessing_error("#endif", PreprocessorError::EndifOutsideOfBlock);
check_preprocessing_error(
"#if 1
#endif
#endif",
PreprocessorError::EndifOutsideOfBlock,
);
}
#[test]
fn skipping_behavior() {
// Check regular tokens are skipped
check_preprocessed_result(
"#if 0
a b % 1 2u
#endif",
"",
);
// Check random hash is allowed while skipping
check_preprocessed_result(
"#if 0
a # b
#endif",
"",
);
// Check that a hash at the start of the line and nothing else if valid while skipping
check_preprocessed_result(
"#if 0
#
#endif",
"",
);
// Check invalid directives are allowed while skipping
check_preprocessed_result(
"#if 0
#CestlafauteaNandi
#endif",
"",
);
// Check that defines skipped (otherwise there would be a redefinition error)
check_preprocessed_result(
"#if 0
#define A 1
#endif
#define A 2",
"",
);
// Check that undefs are skipped.
check_preprocessed_result(
"#define A 1
#if 0
#undef A
#endif
A",
"1",
);
// Check that #error is skipped.
check_preprocessed_result(
"#if 0
#error
#endif",
"",
);
// Check that #line directives are skipped.
check_preprocessed_result(
"#if 0
#line 1000
#endif
__LINE__",
"4u",
);
// Check that #version/extension/pragma are skipped.
check_preprocessed_result(
"#if 0
#version a b c
#extension 1 2 3
#pragma tic
#endif",
"",
);
}
#[test]
fn parse_line() {
// Test that #line with a uint and int is allowed.
check_preprocessed_result(
"#line 4u
#line 3
#line 0xF00",
"",
);
// Test with something other than a number after #line (including a newline)
check_preprocessing_error(
"#line !",
PreprocessorError::UnexpectedToken(TokenValue::Punct(Punct::Bang)),
);
check_preprocessing_error("#line", PreprocessorError::UnexpectedNewLine);
check_preprocessing_error(
"#line foo",
PreprocessorError::UnexpectedToken(TokenValue::Ident("foo".into())),
);
// Test that an invalid #line directive is allowed if skipping
check_preprocessed_result(
"#if 0
#line !
#endif",
"",
);
// Test that #line must have a newline after the integer (this will change when #line
// supports constant expressions)
check_preprocessing_error("#line 1 #", PreprocessorError::UnexpectedHash);
// Test that the integer must be non-negative.
// TODO enabled once #line supports parsing expressions.
// check_preprocessing_error(
// "#line -1",
// PreprocessorError::LineOverflow,
// );
// test that the integer must fit in a u32
check_preprocessing_error("#line 4294967296u", PreprocessorError::LineOverflow);
// test that the integer must fit in a u32
check_preprocessed_result("#line 4294967295u", "");
}
#[test]
fn line_define() { | check_preprocessed_result(
"__LINE__
__LINE__
__LINE__",
"1u 2u 4u",
);
// Test that __LINE__ split over multiple lines gives the first line.
check_preprocessed_result("__L\\\nINE__", "1u");
// Test that the __LINE__ define used in define gives the invocation's line
check_preprocessed_result(
"#define MY_DEFINE __LINE__
MY_DEFINE
MY\\\n_DEFINE",
"2u 3u",
);
// Test a corner case where the __LINE__ is a peeked token for function-like
// define parsing.
check_preprocessed_result(
"#define A(foo) Bleh
A __LINE__ B",
"A 2u B",
);
// Test that __LINE__ inside function like defines is the position of the closing )
check_preprocessed_result(
"#define B + __LINE__ +
#define A(X, Y) X __LINE__ Y B
A(-, -)
A(-, -
)",
"- 3u - + 3u +
- 5u - + 5u +",
);
// Test that the __LINE__ inside a define's argument get the correct value.
check_preprocessed_result(
"#define A(X) X
A(__LINE__
__LINE__)",
"2u 3u",
);
check_preprocessed_result(
"#define B(X) X
#define A(X) B(X) + __LINE__
A(__LINE__)",
"3u + 3u",
);
// Check that #line is taken into account and can modify the line number in both directions.
check_preprocessed_result(
"#line 1000
__LINE__
__LINE__
#line 0
__LINE__
__LINE__",
"1001u 1002u 1u 2u",
);
// Check that line computations are not allowed to overflow an u32
check_preprocessed_result(
"#line 4294967294
__LINE__",
"4294967295u",
);
check_preprocessing_error(
"#line 4294967295
__LINE__",
PreprocessorError::LineOverflow,
);
}
#[test]
fn parse_version() {
// Check that the #version directive is recognized and gets all the tokens until the newline
let tokens: Vec<PreprocessorItem> = Preprocessor::new("#version 1 ; (").collect();
assert_eq!(tokens.len(), 1);
match &tokens[0] {
Ok(Token {
value: TokenValue::Version(version),
..
}) => {
assert!(!version.has_comments_before);
assert!(version.is_first_directive);
assert_eq!(version.tokens.len(), 3);
assert_eq!(
version.tokens[0].value,
TokenValue::Integer(Integer {
value: 1,
signed: true,
width: 32
})
);
assert_eq!(version.tokens[1].value, TokenValue::Punct(Punct::Semicolon));
assert_eq!(version.tokens[2].value, TokenValue::Punct(Punct::LeftParen));
}
_ => {
unreachable!();
}
};
// Check that we correctly detect comments before the #version directive.
let tokens: Vec<PreprocessorItem> = Preprocessor::new("/**/#version (").collect();
assert_eq!(tokens.len(), 1);
match &tokens[0] {
Ok(Token {
value: TokenValue::Version(version),
..
}) => {
assert!(version.has_comments_before);
assert!(version.is_first_directive);
assert_eq!(version.tokens.len(), 1);
assert_eq!(version.tokens[0].value, TokenValue::Punct(Punct::LeftParen));
}
_ => {
unreachable!();
}
};
// Check that we properly detect tokens before the #version directive.
let tokens: Vec<PreprocessorItem> = Preprocessor::new("4 \n #version (").collect();
assert_eq!(tokens.len(), 2);
match &tokens[1] {
Ok(Token {
value: TokenValue::Version(version),
..
}) => {
assert!(!version.has_comments_before);
assert!(!version.is_first_directive);
assert_eq!(version.tokens.len(), 1);
assert_eq!(version.tokens[0].value, TokenValue::Punct(Punct::LeftParen));
}
_ => {
unreachable!();
}
};
// Same thing but with another preprocessor directive.
let tokens: Vec<PreprocessorItem> = Preprocessor::new("#line 1\n #version (").collect();
assert_eq!(tokens.len(), 1);
match &tokens[0] {
Ok(Token {
value: TokenValue::Version(version),
..
}) => {
assert!(!version.has_comments_before);
assert!(!version.is_first_directive);
assert_eq!(version.tokens.len(), 1);
assert_eq!(version.tokens[0].value, TokenValue::Punct(Punct::LeftParen));
}
_ => {
unreachable!();
}
};
}
#[test]
fn parse_extension() {
// Check that the #extension directive is recognized and gets all the tokens until the newline
let tokens: Vec<PreprocessorItem> =
Preprocessor::new("#extension USE_WEBGPU_INSTEAD_OF_GL : required").collect();
assert_eq!(tokens.len(), 1);
match &tokens[0] {
Ok(Token {
value: TokenValue::Extension(extension),
..
}) => {
assert!(!extension.has_non_directive_before);
assert_eq!(extension.tokens.len(), 3);
assert_eq!(
extension.tokens[0].value,
TokenValue::Ident("USE_WEBGPU_INSTEAD_OF_GL".into())
);
assert_eq!(extension.tokens[1].value, TokenValue::Punct(Punct::Colon));
assert_eq!(
extension.tokens[2].value,
TokenValue::Ident("required".into())
);
}
_ => {
unreachable!();
}
};
// Check that we correctly detect non directive tokens before the #extension
let tokens: Vec<PreprocessorItem> = Preprocessor::new("miaou\n#extension").collect();
assert_eq!(tokens.len(), 2);
match &tokens[1] {
Ok(Token {
value: TokenValue::Extension(extension),
..
}) => {
assert!(extension.has_non_directive_before);
assert_eq!(extension.tokens.len(), 0);
}
_ => {
unreachable!();
}
};
}
#[test]
fn parse_pragma() {
// Check that the #extension directive is recognized and gets all the tokens until the newline
let tokens: Vec<PreprocessorItem> = Preprocessor::new("#pragma stuff").collect();
assert_eq!(tokens.len(), 1);
match &tokens[0] {
Ok(Token {
value: TokenValue::Pragma(pragma),
..
}) => {
assert_eq!(pragma.tokens.len(), 1);
assert_eq!(pragma.tokens[0].value, TokenValue::Ident("stuff".into()));
}
_ => {
unreachable!();
}
};
}
#[test]
fn add_define() {
// Test adding multiple defines at the start.
let mut pp = Preprocessor::new("A B");
pp.add_define("A", "bat").unwrap();
pp.add_define("B", "man").unwrap();
match pp.next() {
Some(Ok(Token {
value: TokenValue::Ident(ident),
..
})) => {
assert_eq!(ident, "bat");
}
_ => {
unreachable!();
}
}
match pp.next() {
Some(Ok(Token {
value: TokenValue::Ident(ident),
..
})) => {
assert_eq!(ident, "man");
}
_ => {
unreachable!();
}
}
// Test that a multiline define works.
let mut pp = Preprocessor::new("A");
pp.add_define("A", "bat\nman").unwrap();
match pp.next() {
Some(Ok(Token {
value: TokenValue::Ident(ident),
..
})) => {
assert_eq!(ident, "bat");
}
_ => {
unreachable!();
}
}
match pp.next() {
Some(Ok(Token {
value: TokenValue::Ident(ident),
..
})) => {
assert_eq!(ident, "man");
}
_ => {
unreachable!();
}
}
// Test adding defines in the middle without overwriting.
let mut pp = Preprocessor::new("A A");
match pp.next() {
Some(Ok(Token {
value: TokenValue::Ident(ident),
..
})) => {
assert_eq!(ident, "A");
}
_ => {
unreachable!();
}
}
pp.add_define("A", "foo").unwrap();
match pp.next() {
Some(Ok(Token {
value: TokenValue::Ident(ident),
..
})) => {
assert_eq!(ident, "foo");
}
_ => {
unreachable!();
}
}
// Test adding defines in the middle with overwriting.
let mut pp = Preprocessor::new(
"#define A bat
A A",
);
match pp.next() {
Some(Ok(Token {
value: TokenValue::Ident(ident),
..
})) => {
assert_eq!(ident, "bat");
}
_ => {
unreachable!();
}
}
pp.add_define("A", "foo").unwrap();
match pp.next() {
Some(Ok(Token {
value: TokenValue::Ident(ident),
..
})) => {
assert_eq!(ident, "foo");
}
_ => {
unreachable!();
}
}
// Test a parsing error.
let mut pp = Preprocessor::new("A");
assert_eq!(
pp.add_define("A", "@").unwrap_err().0,
PreprocessorError::UnexpectedCharacter
);
} | // Test that the __LINE__ define gives the number of the line. |
model_project_list_response.go | /*
Keystone API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// ProjectListResponse struct for ProjectListResponse
type ProjectListResponse struct {
Projects *[]Project `json:"projects,omitempty"`
Links *Links `json:"links,omitempty"`
}
// NewProjectListResponse instantiates a new ProjectListResponse object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewProjectListResponse() *ProjectListResponse {
this := ProjectListResponse{}
return &this
}
// NewProjectListResponseWithDefaults instantiates a new ProjectListResponse object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewProjectListResponseWithDefaults() *ProjectListResponse {
this := ProjectListResponse{}
return &this
}
// GetProjects returns the Projects field value if set, zero value otherwise.
func (o *ProjectListResponse) GetProjects() []Project {
if o == nil || o.Projects == nil {
var ret []Project
return ret
}
return *o.Projects
}
// GetProjectsOk returns a tuple with the Projects field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectListResponse) GetProjectsOk() (*[]Project, bool) {
if o == nil || o.Projects == nil {
return nil, false
}
return o.Projects, true
}
// HasProjects returns a boolean if a field has been set.
func (o *ProjectListResponse) HasProjects() bool {
if o != nil && o.Projects != nil {
return true
}
return false
}
// SetProjects gets a reference to the given []Project and assigns it to the Projects field.
func (o *ProjectListResponse) SetProjects(v []Project) {
o.Projects = &v
}
// GetLinks returns the Links field value if set, zero value otherwise.
func (o *ProjectListResponse) GetLinks() Links {
if o == nil || o.Links == nil {
var ret Links
return ret
}
return *o.Links
}
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectListResponse) GetLinksOk() (*Links, bool) {
if o == nil || o.Links == nil {
return nil, false
}
return o.Links, true
}
// HasLinks returns a boolean if a field has been set.
func (o *ProjectListResponse) HasLinks() bool {
if o != nil && o.Links != nil |
return false
}
// SetLinks gets a reference to the given Links and assigns it to the Links field.
func (o *ProjectListResponse) SetLinks(v Links) {
o.Links = &v
}
func (o ProjectListResponse) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Projects != nil {
toSerialize["projects"] = o.Projects
}
if o.Links != nil {
toSerialize["links"] = o.Links
}
return json.Marshal(toSerialize)
}
type NullableProjectListResponse struct {
value *ProjectListResponse
isSet bool
}
func (v NullableProjectListResponse) Get() *ProjectListResponse {
return v.value
}
func (v *NullableProjectListResponse) Set(val *ProjectListResponse) {
v.value = val
v.isSet = true
}
func (v NullableProjectListResponse) IsSet() bool {
return v.isSet
}
func (v *NullableProjectListResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProjectListResponse(val *ProjectListResponse) *NullableProjectListResponse {
return &NullableProjectListResponse{value: val, isSet: true}
}
func (v NullableProjectListResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProjectListResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
| {
return true
} |
zoo.py | from kazoo.client import KazooClient
from kazoo.exceptions import NoNodeError
from kazoo.exceptions import NodeExistsError
_callback = None
_zk = None
def init_kazoo(hosts, data_path, callback, children=True):
global _zk
global _callback
_zk = KazooClient(hosts=hosts)
_zk.start()
_callback = callback
if data_path: | print("Watch Children")
if _callback:
_callback(children)
else:
@_zk.DataWatch(data_path)
def watch_node(data, stat):
print("Watch Node")
if _callback:
_callback(data, stat)
return _zk | if children:
@_zk.ChildrenWatch(data_path)
def watch_children(children): |
main.go | package main
import (
"encoding/csv"
"errors"
"os"
)
// SheetNamesTemplate define name's for new created sheets.
var SheetNamesTemplate = "Sheet %d"
func main() {
initCommandLine(os.Args)
}
// getCsvData read's data from CSV file.
func | (dataFileName string) (*csv.Reader, error) {
dataFile, err := os.Open(dataFileName)
if err != nil {
return nil, errors.New("Problem with reading data from " + dataFileName)
}
return csv.NewReader(dataFile), nil
}
| getCsvData |
conversions.py | import math
import tf
from gennav import utils as utils
from gennav.utils import RobotState, Trajectory
from gennav.utils.common import Velocity
from geometry_msgs.msg import Point, Quaternion, Transform, Twist, Vector3
from trajectory_msgs.msg import MultiDOFJointTrajectory, MultiDOFJointTrajectoryPoint
def traj_to_msg(traj):
"""Converts the trajectory planned by the planner to a publishable ROS message
Args:
traj (gennav.utils.Trajectory): Trajectory planned by the planner
Returns:
geometry_msgs/MultiDOFJointTrajectory.msg: A publishable ROS message
"""
traj_msg = MultiDOFJointTrajectory(points=[], joint_names=None, header=None)
for state, timestamp in zip(traj.path, traj.timestamps):
quaternion = tf.transformations.quaternion_from_euler(
state.orientation.roll,
state.orientation.pitch,
state.orientation.yaw,
)
velocity = Twist()
acceleration = Twist()
transforms = Transform(
translation=Point(state.position.x, state.position.y, state.position.z),
rotation=Quaternion(
quaternion[0], quaternion[1], quaternion[2], quaternion[3]
),
)
traj_point = MultiDOFJointTrajectoryPoint(
transforms=[transforms],
velocities=[velocity],
accelerations=[acceleration],
time_from_start=timestamp,
)
traj_msg.points.append(traj_point)
return traj_msg
def msg_to_traj(msg):
|
def Odom_to_RobotState(msg):
"""Converts a ROS message of type nav_msgs/Odometry.msg to an object of type gennav.utils.RobotState
Args:
msg (nav_msgs/Odometry.msg): ROS message containing the pose and velocity of the robot
Returns:
gennav.utils.RobotState: A RobotState() object which can be passed to the controller
"""
position = utils.common.Point(
x=msg.pose.pose.position.x,
y=msg.pose.pose.position.y,
z=msg.pose.pose.position.z,
)
orientation = tf.transformations.euler_from_quaternion(
[
msg.pose.pose.orientation.x,
msg.pose.pose.orientation.y,
msg.pose.pose.orientation.z,
msg.pose.pose.orientation.w,
]
)
orientation = utils.geometry.OrientationRPY(
roll=orientation[0], pitch=orientation[1], yaw=orientation[2]
)
linear_vel = utils.geometry.Vector3D(
x=msg.twist.twist.linear.x,
y=msg.twist.twist.linear.y,
z=msg.twist.twist.linear.z,
)
angular_vel = utils.geometry.Vector3D(
x=msg.twist.twist.angular.x,
y=msg.twist.twist.angular.y,
z=msg.twist.twist.angular.z,
)
velocity = Velocity(linear=linear_vel, angular=angular_vel)
state = RobotState(position=position, orientation=orientation, velocity=velocity)
return state
def Velocity_to_Twist(velocity):
"""Converts an object of type gennav.utils.common.Velocity to a ROS message (Twist) publishable on cmd_vel
Args:
velocity (gennav.utils.Velociy): Velocity to be sent to the robot
Returns:
geometry_msgs/Twist.msg: ROS message which can be sent to the robot via the cmd_vel topic
"""
linear = Vector3(x=velocity.linear.x, y=velocity.linear.y, z=velocity.linear.z)
angular = Vector3(x=velocity.angular.x, y=velocity.angular.y, z=velocity.angular.z)
msg = Twist(linear=linear, angular=angular)
return msg
def LaserScan_to_polygons(scan_data, threshold, angle_deviation=0):
"""Converts data of sensor_msgs/LaserScan ROS message type to polygons
Args:
scan_data (sensor_msgs.msg.LaserScan): Data to be converted
threshold (int):Threshold for deciding when to start a new obstacle
angle_deviation: Deviation of the zero ofthe lidar from zero of the bot(in radians)
Returns:
list[list[tuple[float, float, float]]]: Corresponding polygons
"""
obstacle_1D = [[scan_data.ranges[0]]]
current_obstacle_index = 0
for i in range(len(scan_data.ranges) - 1):
if abs(scan_data.ranges[i] - scan_data.ranges[i + 1]) > threshold:
obstacle_1D.append([])
current_obstacle_index += 1
obstacle_1D[current_obstacle_index].append(scan_data.ranges[i + 1])
obstacle_list = []
least_angle = 2 * math.pi / len(scan_data.ranges)
pt_count = 0
for i in range(len(obstacle_1D)):
for j in range(len(obstacle_1D[i])):
obstacle_1D[i][j] = (
obstacle_1D[i][j],
angle_deviation + pt_count * least_angle,
)
pt_count = pt_count + 1
point_list = []
for obstacle in obstacle_1D:
for point_rtheta in obstacle:
point = (
(point_rtheta[0] * math.cos(point_rtheta[1])),
(point_rtheta[0] * math.sin(point_rtheta[1])),
0,
)
point_list.append(point)
obstacle_list.append(point_list)
return obstacle_list
| """Converts the trajectory containing ROS message to gennav.utils.Trajectory data type
Args:
msg (geometry_msgs/MultiDOFJointTrajectory.msg): The ROS message
Returns:
gennav.utils.Trajectory : Object containing the trajectory data
"""
path = []
timestamps = []
for point in msg.points:
timestamps.append(point.time_from_start)
position = utils.common.Point(
x=point.transforms[0].translation.x,
y=point.transforms[0].translation.y,
z=point.transforms[0].translation.z,
)
rotation = tf.transformations.euler_from_quaternion(
[
point.transforms[0].rotation.x,
point.transforms[0].rotation.y,
point.transforms[0].rotation.z,
point.transforms[0].rotation.w,
]
)
rotation = utils.geometry.OrientationRPY(
roll=rotation[0], pitch=rotation[1], yaw=rotation[2]
)
linear_vel = utils.geometry.Vector3D(
x=point.velocities[0].linear.x,
y=point.velocities[0].linear.y,
z=point.velocities[0].linear.z,
)
angular_vel = utils.geometry.Vector3D(
x=point.velocities[0].angular.x,
y=point.velocities[0].angular.y,
z=point.velocities[0].linear.z,
)
velocity = Velocity(linear=linear_vel, angular=angular_vel)
state = RobotState(position=position, orientation=rotation, velocity=velocity)
path.append(state)
traj = Trajectory(path=path, timestamps=timestamps)
return traj |
cmd.py | import sys
import getpass
from boliau import cmdlib
from boliau.plugins.gspread import actionlib
def do_insert():
cmd = cmdlib.as_command(actionlib.Upsert(),
require_stdin=True)
cmd.add_argument('spreadsheet', help="spreadsheet name.")
cmd.add_argument('--email', help = "user email")
cmd.add_argument('--worksheet', help="worksheet name.", default='sheet1')
args = cmd.parse_argv() | args.password = getpass.getpass()
print cmd.call(args, stdin=sys.stdin) |
|
test_list.py | from tinypy.runtime.testing import UnitTest
class MyTest(UnitTest):
def test_lessthan(self):
assert [1, 2] < [2]
assert [1, 2] <= [2]
assert [1] < [2]
assert [1] <= [2]
assert [] < [1]
def test_greaterthan(self):
assert [2] > [1]
assert [1, 2] > [1]
assert [1, 2] >= [1]
assert [1, 2] >= [1, 2]
assert [2] > []
def test_equal(self):
assert [1] == [1]
assert [1, 2] == [1, 2]
assert [] == []
# FIXME:
# As we don't have an iterable type, there is not much point
# to define min and max.
# We shall probably remove min and max from builtins.
def | (self):
assert max(1, 2, 3) == 3
assert max(3, 1, 2) == 3
assert max(3, 1, 3) == 3
def test_min(self):
assert min(1, 2, 3) == 1
assert min(3, 1, 2) == 1
assert min(2, 1, 1) == 1
def test_slice(self):
# FIXME: support 1:2 and 1:2:1
assert [0, 1, 2, 3][1, 2] == [1]
assert [0, 1, 2, 3][1, None] == [1, 2, 3]
assert [0, 1, 2, 3][None, None] == [0, 1, 2, 3]
assert [0, 1, 2, 3][None, 1] == [0]
assert [0, 1, 2, 3][None, 2] == [0, 1]
t = MyTest()
t.run()
| test_max |
_errorhandling.py | # Copyright (C) 2015 Stefan C. Mueller
import functools
from twisted.internet import defer
def on_error_close(logger):
"""
Decorator for callback methods that implement `IProtocol`.
Any uncaught exception is logged and the connection is closed
forcefully.
Usage::
import logger
logger = logging.getLogger(__name__)
class MyProtocol(Protocol):
@on_error_close(logger.error)
def connectionMade():
...
The argument passed to `on_error_close` will be invoked with a
string message.
The motivation behind this decorator is as follows:
Due to bugs it sometimes happens that exceptions are thrown out out
callback methods in protocols. Twisted ignores them, at best they
are logged. This is always a bug, as errors should be handled in the
callback and not let to continue up the call stack. As such, the
behaviour after this occured is typically not well defined and
unpredictable.
A well made protocol implementation can handle unexpected connection
losses as they may occur at any time in a real world environment.
By closing the connection, there is a certain chance
that we enter a code path that can recover, or at least gracefully
cleanup.
In my experience, this often means that unit-tests fail with a more
useful error message. Without it, I sometimes get the case that a
unit-test (or even the final application) just blocks forever
with no information on what is going wrong.
"""
def make_wrapper(func):
@functools.wraps(func)
def wrapper(self, *args, **kwargs):
d = defer.maybeDeferred(func, self, *args, **kwargs)
def | (err):
logger("Unhandled failure in %r:%s" % (func, err. getTraceback()))
if hasattr(self, "transport"):
if hasattr(self.transport, "abortConnection"):
self.transport.abortConnection()
elif hasattr(self.transport, "loseConnection"):
self.transport.loseConnection()
d.addErrback(on_error)
return wrapper
return make_wrapper | on_error |
index.ts | export * from './validation-error'; |
||
branchSums.py | self.left = None
self.right = None
def branchSums(root, sum=0, sumsList=None):
if root is None:
return
if sumsList is None: #refer https://stackoverflow.com/a/60202340/6699913
sumsList = []
sum += root.value
if root.left is None and root.right is None:
sumsList.append(sum)
branchSums(root.left, sum, sumsList)
branchSums(root.right, sum, sumsList)
return sumsList | class BinaryTree:
def __init__(self, value):
self.value = value |
|
publickey_create_responses.go | // Code generated by go-swagger; DO NOT EDIT.
package security
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"github.com/netapp/trident/storage_drivers/ontap/api/rest/models"
)
// PublickeyCreateReader is a Reader for the PublickeyCreate structure.
type PublickeyCreateReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PublickeyCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewPublickeyCreateCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
result := NewPublickeyCreateDefault(response.Code())
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
if response.Code()/100 == 2 {
return result, nil
}
return nil, result
}
}
// NewPublickeyCreateCreated creates a PublickeyCreateCreated with default headers values
func | () *PublickeyCreateCreated {
return &PublickeyCreateCreated{}
}
/* PublickeyCreateCreated describes a response with status code 201, with default header values.
Created
*/
type PublickeyCreateCreated struct {
}
func (o *PublickeyCreateCreated) Error() string {
return fmt.Sprintf("[POST /security/authentication/publickeys][%d] publickeyCreateCreated ", 201)
}
func (o *PublickeyCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewPublickeyCreateDefault creates a PublickeyCreateDefault with default headers values
func NewPublickeyCreateDefault(code int) *PublickeyCreateDefault {
return &PublickeyCreateDefault{
_statusCode: code,
}
}
/* PublickeyCreateDefault describes a response with status code -1, with default header values.
Error
*/
type PublickeyCreateDefault struct {
_statusCode int
Payload *models.ErrorResponse
}
// Code gets the status code for the publickey create default response
func (o *PublickeyCreateDefault) Code() int {
return o._statusCode
}
func (o *PublickeyCreateDefault) Error() string {
return fmt.Sprintf("[POST /security/authentication/publickeys][%d] publickey_create default %+v", o._statusCode, o.Payload)
}
func (o *PublickeyCreateDefault) GetPayload() *models.ErrorResponse {
return o.Payload
}
func (o *PublickeyCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(models.ErrorResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
| NewPublickeyCreateCreated |
NestedGrid.js | import { Paper, Grid } from '@krowdy-ui/core'
const useStyles = makeStyles(theme => ({
paper: {
color : theme.palette.text.secondary,
padding : theme.spacing(1),
textAlign: 'center'
},
root: {
flexGrow: 1
}
}))
export default function NestedGrid() {
const classes = useStyles()
function FormRow() {
return (
<React.Fragment>
<Grid item xs={4}>
<Paper className={classes.paper}>item</Paper>
</Grid>
<Grid item xs={4}>
<Paper className={classes.paper}>item</Paper>
</Grid>
<Grid item xs={4}>
<Paper className={classes.paper}>item</Paper>
</Grid>
</React.Fragment>
)
}
return (
<div className={classes.root}>
<Grid container spacing={1}>
<Grid
container item spacing={3}
xs={12}>
<FormRow />
</Grid>
<Grid
container item spacing={3}
xs={12}>
<FormRow />
</Grid>
<Grid
container item spacing={3}
xs={12}>
<FormRow />
</Grid>
</Grid>
</div>
)
} | import React from 'react'
import { makeStyles } from '@krowdy-ui/styles' |
|
main.go | package stub
import (
"io/ioutil"
"log"
"os"
"github.com/lugu/qiloop/meta/idl"
)
// GenerateStub write a Go file containing the generated code from the
// IDL.
func GenerateStub(idlFileName, stubFileName, packageName string) | {
file, err := os.Open(idlFileName)
if err != nil {
log.Fatalf("create %s: %s", idlFileName, err)
}
input, err := ioutil.ReadAll(file)
file.Close()
if err != nil {
log.Fatalf("cannot read %s: %s", idlFileName, err)
}
output := os.Stdout
if stubFileName != "-" {
output, err = os.Create(stubFileName)
if err != nil {
log.Fatalf("create %s: %s", stubFileName, err)
}
defer output.Close()
}
pkg, err := idl.ParsePackage([]byte(input))
if err != nil {
log.Fatalf("parse %s: %s", idlFileName, err)
}
if len(pkg.Types) == 0 {
log.Fatalf("parse error: missing type")
}
err = GeneratePackage(output, packageName, pkg)
if err != nil {
log.Fatalf("generate stub: %s", err)
}
} |
|
my_class.py | import copy
class My_matrix:
def __init__(self, matrix):
self.matrix = matrix
def __str__(self):
out = f'{self.matrix_size}\n'
for row in self.matrix:
out += str(row) + '\n'
return out
def null_matrix(self):
return [[0 for i in self.range_row()] for j in self.range_col()]
def determinant(self, mul):
# TODO: В разработке...
"""
Вычисление определителя квадратной матрицы
Args:
mul(int): расчётный коэффициент (при вызове функции = 1)
Returns: определитель матрицы
"""
width = len(self.matrix)
if width == 1:
return mul * self.matrix[0][0]
else:
sign = -1
summa = 0
for row in range(width):
new_list = []
for col in range(1, width):
buffer = []
for k in range(width):
if k != row:
buffer.append(self.matrix[col][k])
new_list.append(buffer)
sign *= -1
summa += mul * self.determinant(sign * self.matrix[0][row])
return
def matrix_multiplication(self, new_matrix):
# TODO: В разработке...
output = self.null_matrix
for row_ in self.range_row():
for col_ in self.range_col():
for new_variable in range(1, len(new_matrix[0])):
output += self.matrix[row_][new_variable] * new_matrix[new_variable][col_]
return My_matrix(output())
def mul_on_num(self, number):
"""
@param number: Число, на которое умножаем исходную матрица
@return: матрица, кмноженная на число
"""
for row_ in self.range_row():
for col_ in self.range_col():
self.matrix[row_][col_] *= number
return My_matrix(self.matrix)
def transposed_matrix(self):
"""
@return: транспонировання матрица
"""
output = []
for col_ in self.range_col():
col_new = []
for row_ in self.range_row():
col_new.append(self.matrix[row_][col_])
output.append(col_new)
return My_matrix(output)
def matrix_addition(self, new_matrix):
"""
@param new_matrix: Матрица, которую прибавляем к исходной
@return: Сумма двух матриц
"""
if len(new_matrix) == self.row() and len(new_matrix) == self.col():
for row_ in self.range_row():
for col_ in self.range_col():
self.matrix[row_][col_] += new_matrix[row_][col_]
return My_matrix(self.matrix)
else:
return 'Невозможно сложить матрицы, так как их размеры не совпадают!'
def number_of_matrix_elements(self):
"""
@return:
Количество элементов в матрице
"""
s = 0
for i in self.matrix:
s += len(i)
return s
def matrix_size(self):
"""
@return:
Возвращает размер матрицы (строки, столбцы)
"""
return self.row(), self.col()
def row(self):
"""
@return:
Количество строк в матрице
"""
return len(self.matrix)
def col(self):
"""
@return:
Количество столбцов в матрице
"""
return len(self.matrix[0])
def range_row(self):
"""
@return:
range(self.line_length)
"""
return range(self.row())
def range_col(self):
"""
@return:
range(self.col)
"""
return range(self.col())
def copy(self):
"""
Глубокая копия матрицы
@return:
Возвращает глубокую копию исходной матрицы
"""
new_mat = My_matrix(list(copy.deepcopy(self.matrix)))
return new_mat
if __name__ == '__main__':
matrix = My_matrix([
[1, 3, 4, 5],
[1, 5, 7, 6],
[3, 4, 6, 7],
[8, 9, 4, 1]
])
| ||
TextHandler.ts | import { NodeHelper } from '../helpers/NodeHelper';
import { Properties } from '../Properties';
import { TranslationHighlighter } from '../highlighter/TranslationHighlighter';
import { TextService } from '../services/TextService';
import { AbstractHandler } from './AbstractHandler';
import { ElementRegistrar } from '../services/ElementRegistrar';
export class | extends AbstractHandler {
constructor(
protected properties: Properties,
protected translationHighlighter: TranslationHighlighter,
protected textService: TextService,
protected nodeRegistrar: ElementRegistrar
) {
super(properties, textService, nodeRegistrar, translationHighlighter);
}
async handle(node: Node): Promise<void> {
const inputPrefix = this.properties.config.inputPrefix;
const inputSuffix = this.properties.config.inputSuffix;
const xPath = `./descendant-or-self::text()[contains(., '${inputPrefix}') and contains(., '${inputSuffix}')]`;
const nodes = NodeHelper.evaluate(xPath, node);
const filtered: Text[] = this.filterRestricted(nodes as Text[]);
await this.handleNodes(filtered);
}
}
| TextHandler |
texts.js | const express = require('express');
const router = express.Router();
const knex = require('../../db/knex.js');
// GET api/texts | router.get('/', (req, res) => {
knex('texts')
.where( req.query.source ? { source: req.query.source } : {})
.then(texts => { res.send(texts); })
.catch(err => { console.log(err); })
});
module.exports = router; | |
main.rs | // Copyright 2018 Cargill Incorporated
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#![feature(plugin, decl_macro, custom_derive)]
#![plugin(rocket_codegen)]
extern crate rocket;
extern crate rocket_cors;
#[macro_use] extern crate rocket_contrib;
#[macro_use] extern crate serde_derive;
extern crate serde_yaml;
extern crate serde_json;
extern crate pike_db;
extern crate sawtooth_sdk;
extern crate protobuf;
extern crate uuid;
mod openapi;
mod routes;
mod guard;
mod submit;
#[cfg(test)] mod tests;
use std::env;
use rocket::http::Method;
use rocket_cors::{AllowedOrigins, AllowedHeaders};
use rocket_contrib::Json;
use routes::{agents, organizations};
use pike_db::pools;
use routes::transactions;
use sawtooth_sdk::messaging::zmq_stream::ZmqMessageConnection;
#[get("/")]
fn hello() -> &'static str {
"Hello, world!"
}
#[error(404)]
fn not_found(_: &rocket::Request) -> Json {
Json(json!({
"message": "Not Found"
}))
}
#[error(500)]
fn internal_server_error(_: &rocket::Request) -> Json {
Json(json!({
"message": "Internal Server Error"
}))
}
fn main() { | allowed_origins: allowed_origins,
allowed_methods: vec![Method::Get, Method::Post, Method::Options].into_iter().map(From::from).collect(),
allowed_headers: AllowedHeaders::some(&["Authorization", "Accept", "Content-Type"]),
allow_credentials: true,
..Default::default()
};
let database_url = if let Ok(s) = env::var("DATABASE_URL") {
s
} else {
"postgres://localhost:5432".into()
};
let validator_url = if let Ok(s) = env::var("VALIDATOR_URL") {
s
} else {
"tcp://localhost:8004".into()
};
rocket::ignite()
.mount("/", routes![
hello,
openapi::openapi_json,
openapi::openapi_yaml,
agents::get_agent,
agents::get_agents,
organizations::get_org,
organizations::get_orgs,
transactions::submit_txns,
transactions::submit_txns_wait,
transactions::get_batch_status])
.manage(pools::init_pg_pool(database_url))
.manage(ZmqMessageConnection::new(&validator_url))
.attach(options)
.catch(errors![not_found, internal_server_error])
.launch();
} | let (allowed_origins, failed_origins) = AllowedOrigins::some(&["http://localhost:9002"]);
assert!(failed_origins.is_empty());
let options = rocket_cors::Cors { |
ludec.rs | use crate::algebra::{
abstr::{Field, Scalar},
linear::{
matrix::{Inverse, Solve, Substitute},
Matrix, Vector,
},
};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use std::clone::Clone;
use crate::algebra::abstr::AbsDiffEq;
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, Clone)]
pub struct LUDec<T>
{
l: Matrix<T>,
u: Matrix<T>,
p: Matrix<T>,
}
impl<T> LUDec<T>
{
pub(super) fn new(l: Matrix<T>, u: Matrix<T>, p: Matrix<T>) -> LUDec<T>
{
return LUDec { l, u, p };
}
/// Return l Matrix of LU decomposition
pub fn l(self: Self) -> Matrix<T>
{
return self.l;
}
pub fn u(self: Self) -> Matrix<T>
{
return self.u;
}
pub fn p(self: Self) -> Matrix<T>
{
return self.p;
}
/// Return l, u, and p matrix of the LU decomposition
pub fn lup(self: Self) -> (Matrix<T>, Matrix<T>, Matrix<T>)
{
return (self.l, self.u, self.p);
}
}
impl<T> Solve<Vector<T>> for LUDec<T> where T: Field + Scalar + AbsDiffEq
{
/// Solves Ax = y
/// where A \in R^{m * n}, x \in R^n, y \in R^m
fn solve(self: &Self, rhs: &Vector<T>) -> Result<Vector<T>, ()>
{
let b_hat: Vector<T> = &self.p * rhs;
let y: Vector<T> = self.l.substitute_forward(b_hat)?;
return self.u.substitute_backward(y);
}
}
// TODO
impl<T> Inverse<T> for LUDec<T>
where T: Field + Scalar + AbsDiffEq
{
/// Inverse Matrix
///
/// PAX = LUX = I
/// X = (PA)^-1
/// X = A^-1P^-1
/// XP = A^-1
///
/// # Example
///
/// ```
/// use mathru::algebra::linear::{matrix::Inverse, Matrix};
///
/// let a: Matrix<f64> = Matrix::new(2, 2, vec![1.0, 0.0, 3.0, -7.0]);
/// let b_inv: Matrix<f64> = a.inv().unwrap();
/// ```
fn inv(self: &Self) -> Result<Matrix<T>, ()>
{
let b = Matrix::one(self.p.nrows());
let x: Matrix<T> = self.solve(&b)?;
return Ok(x);
}
}
// TODO
impl<T> Solve<Matrix<T>> for LUDec<T>
where T: Field + Scalar + AbsDiffEq
{
fn | (self: &Self, rhs: &Matrix<T>) -> Result<Matrix<T>, ()>
{
let b_hat: Matrix<T> = &self.p * rhs;
let y: Matrix<T> = self.l.substitute_forward(b_hat)?;
return self.u.substitute_backward(y);
}
}
| solve |
__init__.py | """Here we import the different task submodules/ collections"""
from invoke import Collection, task
from tasks import docker, package, sphinx, test # pylint: disable=import-self
# pylint: disable=invalid-name
# as invoke only recognizes lower case
namespace = Collection() | namespace.add_collection(test)
namespace.add_collection(docker)
namespace.add_collection(package)
namespace.add_collection(sphinx) | |
n_peekable.rs | use std::collections::VecDeque;
use std::option::Option;
use std::str::Chars;
pub struct NPeekable<'a> {
lookup: VecDeque<char>,
char_iter: Chars<'a> }
impl<'a> NPeekable<'a> {
pub fn new(s: &str) -> NPeekable {
NPeekable { lookup: VecDeque::new(), char_iter: s.chars() }
}
pub fn next(&mut self) -> Option<char> {
if self.lookup.len() > 0 {
self.lookup.pop_front() | self.char_iter.next()
}
}
pub fn peek(&mut self) -> Option<&char> {
self.n_peek(1)
}
pub fn n_peek(&mut self, n: usize) -> Option<&char> {
if n == 0 {
return None;
}
if n > self.lookup.len() {
for _ in 0..(n - self.lookup.len()) {
self.lookup.push_back(self.char_iter.next()?);
}
}
self.lookup.get(n - 1)
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn n_peekable() {
let mut char_iter = NPeekable::new("012345");
assert_eq!(char_iter.n_peek(0).is_none(), true);
assert_eq!(char_iter.peek().unwrap(), &'0');
assert_eq!(char_iter.n_peek(1).unwrap(), &'0');
assert_eq!(char_iter.n_peek(3).unwrap(), &'2');
assert_eq!(char_iter.n_peek(100).is_none(), true);
assert_eq!(char_iter.next().unwrap(), '0');
assert_eq!(char_iter.next().unwrap(), '1');
assert_eq!(char_iter.next().unwrap(), '2');
assert_eq!(char_iter.peek().unwrap(), &'3');
assert_eq!(char_iter.n_peek(2).unwrap(), &'4');
assert_eq!(char_iter.peek().unwrap(), &'3');
assert_eq!(char_iter.next().unwrap(), '3');
assert_eq!(char_iter.next().unwrap(), '4');
assert_eq!(char_iter.next().unwrap(), '5');
assert_eq!(char_iter.next().is_none(), true);
assert_eq!(char_iter.next().is_none(), true);
assert_eq!(char_iter.peek().is_none(), true);
assert_eq!(char_iter.n_peek(2).is_none(), true);
}
} | } else { |
utils.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This OhmNet code is adapted from:
# Copyright (C) 2010 Radim Rehurek <[email protected]>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
from __future__ import with_statement
import logging
import itertools
logger = logging.getLogger(__name__)
try:
from html.entities import name2codepoint as n2cp
except ImportError:
from htmlentitydefs import name2codepoint as n2cp
try:
import cPickle as _pickle
except ImportError:
import pickle as _pickle
import sys
import os
import numpy
import scipy.sparse
if sys.version_info[0] >= 3:
unicode = str
from six import iteritems
try:
from smart_open import smart_open
except ImportError:
logger.info("smart_open library not found; falling back to local-filesystem-only")
def make_closing(base, **attrs):
"""
Add support for `with Base(attrs) as fout:` to the base class if it's missing.
The base class' `close()` method will be called on context exit, to always close the file properly.
This is needed for gzip.GzipFile, bz2.BZ2File etc in older Pythons (<=2.6), which otherwise
raise "AttributeError: GzipFile instance has no attribute '__exit__'".
"""
if not hasattr(base, '__enter__'):
attrs['__enter__'] = lambda self: self
if not hasattr(base, '__exit__'):
attrs['__exit__'] = lambda self, type, value, traceback: self.close()
return type('Closing' + base.__name__, (base, object), attrs)
def smart_open(fname, mode='rb'):
_, ext = os.path.splitext(fname)
if ext == '.bz2':
from bz2 import BZ2File
return make_closing(BZ2File)(fname, mode)
if ext == '.gz':
from gzip import GzipFile
return make_closing(GzipFile)(fname, mode)
return open(fname, mode)
def any2utf8(text, errors='strict', encoding='utf8'):
"""Convert a string (unicode or bytestring in `encoding`), to bytestring in utf8."""
if isinstance(text, unicode):
return text.encode('utf8')
# do bytestring -> unicode -> utf8 full circle, to ensure valid utf8
return unicode(text, encoding, errors=errors).encode('utf8')
to_utf8 = any2utf8
def any2unicode(text, encoding='utf8', errors='strict'):
"""Convert a string (bytestring in `encoding` or unicode), to unicode."""
if isinstance(text, unicode):
return text
return unicode(text, encoding, errors=errors)
to_unicode = any2unicode
class SaveLoad(object):
"""
Objects which inherit from this class have save/load functions, which un/pickle
them to disk.
This uses pickle for de/serializing, so objects must not contain
unpicklable attributes, such as lambda functions etc.
"""
@classmethod
def load(cls, fname, mmap=None):
"""
Load a previously saved object from file (also see `save`).
If the object was saved with large arrays stored separately, you can load
these arrays via mmap (shared memory) using `mmap='r'`. Default: don't use
mmap, load large arrays as normal objects.
If the file being loaded is compressed (either '.gz' or '.bz2'), then
`mmap=None` must be set. Load will raise an `IOError` if this condition
is encountered.
"""
logger.info("loading %s object from %s" % (cls.__name__, fname))
compress, subname = SaveLoad._adapt_by_suffix(fname)
obj = unpickle(fname)
obj._load_specials(fname, mmap, compress, subname)
return obj
def _load_specials(self, fname, mmap, compress, subname):
"""
Loads any attributes that were stored specially, and gives the same
opportunity to recursively included SaveLoad instances.
"""
mmap_error = lambda x, y: IOError(
'Cannot mmap compressed object %s in file %s. ' % (x, y) +
'Use `load(fname, mmap=None)` or uncompress files manually.')
for attrib in getattr(self, '__recursive_saveloads', []):
cfname = '.'.join((fname, attrib))
logger.info("loading %s recursively from %s.* with mmap=%s" % (
attrib, cfname, mmap))
getattr(self, attrib)._load_specials(cfname, mmap, compress, subname)
for attrib in getattr(self, '__numpys', []):
logger.info("loading %s from %s with mmap=%s" % (
attrib, subname(fname, attrib), mmap))
if compress:
if mmap:
raise mmap_error(attrib, subname(fname, attrib))
val = numpy.load(subname(fname, attrib))['val']
else:
val = numpy.load(subname(fname, attrib), mmap_mode=mmap)
setattr(self, attrib, val)
for attrib in getattr(self, '__scipys', []):
logger.info("loading %s from %s with mmap=%s" % (
attrib, subname(fname, attrib), mmap))
sparse = unpickle(subname(fname, attrib))
if compress:
if mmap:
raise mmap_error(attrib, subname(fname, attrib))
with numpy.load(subname(fname, attrib, 'sparse')) as f:
sparse.data = f['data']
sparse.indptr = f['indptr']
sparse.indices = f['indices']
else:
sparse.data = numpy.load(subname(fname, attrib, 'data'), mmap_mode=mmap)
sparse.indptr = numpy.load(subname(fname, attrib, 'indptr'), mmap_mode=mmap)
sparse.indices = numpy.load(subname(fname, attrib, 'indices'), mmap_mode=mmap)
setattr(self, attrib, sparse)
for attrib in getattr(self, '__ignoreds', []):
logger.info("setting ignored attribute %s to None" % (attrib))
setattr(self, attrib, None)
@staticmethod
def _adapt_by_suffix(fname):
"""Give appropriate compress setting and filename formula"""
if fname.endswith('.gz') or fname.endswith('.bz2'):
compress = True
subname = lambda *args: '.'.join(list(args) + ['npz'])
else:
compress = False
subname = lambda *args: '.'.join(list(args) + ['npy'])
return (compress, subname)
def _smart_save(self, fname, separately=None, sep_limit=10 * 1024**2,
ignore=frozenset(), pickle_protocol=2):
"""
Save the object to file (also see `load`).
If `separately` is None, automatically detect large
numpy/scipy.sparse arrays in the object being stored, and store
them into separate files. This avoids pickle memory errors and
allows mmap'ing large arrays back on load efficiently.
You can also set `separately` manually, in which case it must be
a list of attribute names to be stored in separate files. The
automatic check is not performed in this case.
`ignore` is a set of attribute names to *not* serialize (file
handles, caches etc). On subsequent load() these attributes will
be set to None.
`pickle_protocol` defaults to 2 so the pickled object can be imported
in both Python 2 and 3.
"""
logger.info(
"saving %s object under %s, separately %s" % (
self.__class__.__name__, fname, separately))
compress, subname = SaveLoad._adapt_by_suffix(fname)
restores = self._save_specials(fname, separately, sep_limit, ignore, pickle_protocol,
compress, subname)
try:
pickle(self, fname, protocol=pickle_protocol)
finally:
# restore attribs handled specially
for obj, asides in restores:
for attrib, val in iteritems(asides):
setattr(obj, attrib, val)
def _save_specials(self, fname, separately, sep_limit, ignore, pickle_protocol, compress, subname):
"""
Save aside any attributes that need to be handled separately, including
by recursion any attributes that are themselves SaveLoad instances.
Returns a list of (obj, {attrib: value, ...}) settings that the caller
should use to restore each object's attributes that were set aside
during the default pickle().
"""
asides = {}
sparse_matrices = (scipy.sparse.csr_matrix, scipy.sparse.csc_matrix)
if separately is None:
separately = []
for attrib, val in iteritems(self.__dict__):
if isinstance(val, numpy.ndarray) and val.size >= sep_limit:
separately.append(attrib)
elif isinstance(val, sparse_matrices) and val.nnz >= sep_limit:
separately.append(attrib)
# whatever's in `separately` or `ignore` at this point won't get pickled
for attrib in separately + list(ignore):
if hasattr(self, attrib):
asides[attrib] = getattr(self, attrib)
delattr(self, attrib)
recursive_saveloads = []
restores = []
for attrib, val in iteritems(self.__dict__):
if hasattr(val, '_save_specials'): # better than 'isinstance(val, SaveLoad)' if IPython reloading
recursive_saveloads.append(attrib)
cfname = '.'.join((fname,attrib))
restores.extend(val._save_specials(cfname, None, sep_limit, ignore,
pickle_protocol, compress, subname))
try:
numpys, scipys, ignoreds = [], [], []
for attrib, val in iteritems(asides):
if isinstance(val, numpy.ndarray) and attrib not in ignore:
numpys.append(attrib)
logger.info("storing numpy array '%s' to %s" % (
attrib, subname(fname, attrib)))
if compress:
numpy.savez_compressed(subname(fname, attrib), val=numpy.ascontiguousarray(val))
else:
numpy.save(subname(fname, attrib), numpy.ascontiguousarray(val))
elif isinstance(val, (scipy.sparse.csr_matrix, scipy.sparse.csc_matrix)) and attrib not in ignore:
scipys.append(attrib)
logger.info("storing scipy.sparse array '%s' under %s" % (
attrib, subname(fname, attrib)))
if compress:
numpy.savez_compressed(subname(fname, attrib, 'sparse'),
data=val.data,
indptr=val.indptr,
indices=val.indices)
else:
numpy.save(subname(fname, attrib, 'data'), val.data)
numpy.save(subname(fname, attrib, 'indptr'), val.indptr)
numpy.save(subname(fname, attrib, 'indices'), val.indices)
data, indptr, indices = val.data, val.indptr, val.indices
val.data, val.indptr, val.indices = None, None, None
try:
# store array-less object
pickle(val, subname(fname, attrib), protocol=pickle_protocol)
finally:
val.data, val.indptr, val.indices = data, indptr, indices
else:
logger.info("not storing attribute %s" % (attrib))
ignoreds.append(attrib)
self.__dict__['__numpys'] = numpys
self.__dict__['__scipys'] = scipys
self.__dict__['__ignoreds'] = ignoreds
self.__dict__['__recursive_saveloads'] = recursive_saveloads
except:
# restore the attributes if exception-interrupted
for attrib, val in iteritems(asides):
setattr(self, attrib, val)
raise
return restores + [(self, asides)]
def save(self, fname_or_handle, separately=None, sep_limit=10 * 1024**2,
ignore=frozenset(), pickle_protocol=2):
"""
Save the object to file (also see `load`).
`fname_or_handle` is either a string specifying the file name to
save to, or an open file-like object which can be written to. If
the object is a file handle, no special array handling will be
performed; all attributes will be saved to the same file.
If `separately` is None, automatically detect large
numpy/scipy.sparse arrays in the object being stored, and store
them into separate files. This avoids pickle memory errors and
allows mmap'ing large arrays back on load efficiently.
You can also set `separately` manually, in which case it must be
a list of attribute names to be stored in separate files. The
automatic check is not performed in this case.
`ignore` is a set of attribute names to *not* serialize (file
handles, caches etc). On subsequent load() these attributes will
be set to None.
`pickle_protocol` defaults to 2 so the pickled object can be imported
in both Python 2 and 3.
"""
try:
_pickle.dump(self, fname_or_handle, protocol=pickle_protocol)
logger.info("saved %s object" % self.__class__.__name__)
except TypeError: # `fname_or_handle` does not have write attribute
self._smart_save(fname_or_handle, separately, sep_limit, ignore,
pickle_protocol=pickle_protocol)
#endclass SaveLoad
def | (obj, fname, protocol=2):
"""Pickle object `obj` to file `fname`.
`protocol` defaults to 2 so pickled objects are compatible across
Python 2.x and 3.x.
"""
with open(fname, 'wb') as fout: # 'b' for binary, needed on Windows
_pickle.dump(obj, fout, protocol=protocol)
def unpickle(fname):
"""Load pickled object from `fname`"""
with open(fname) as f:
return _pickle.loads(f.read())
def prune_vocab(vocab, min_reduce, trim_rule=None):
"""
Remove all entries from the `vocab` dictionary with count smaller than `min_reduce`.
Modifies `vocab` in place, returns the sum of all counts that were pruned.
"""
result = 0
old_len = len(vocab)
for w in list(vocab): # make a copy of dict's keys
if not keep_vocab_item(w, vocab[w], min_reduce, trim_rule): # vocab[w] <= min_reduce:
result += vocab[w]
del vocab[w]
logger.info("pruned out %i tokens with count <=%i (before %i, after %i)",
old_len - len(vocab), min_reduce, old_len, len(vocab))
return result
def qsize(queue):
"""Return the (approximate) queue size where available; -1 where not (OS X)."""
try:
return queue.qsize()
except NotImplementedError:
# OS X doesn't support qsize
return -1
RULE_DEFAULT = 0
RULE_DISCARD = 1
RULE_KEEP = 2
def keep_vocab_item(word, count, min_count, trim_rule=None):
default_res = count >= min_count
if trim_rule is None:
return default_res
else:
rule_res = trim_rule(word, count, min_count)
if rule_res == RULE_KEEP:
return True
elif rule_res == RULE_DISCARD:
return False
else:
return default_res
def chunkize_serial(iterable, chunksize, as_numpy=False):
"""
Return elements from the iterable in `chunksize`-ed lists. The last returned
element may be smaller (if length of collection is not divisible by `chunksize`).
>>> print(list(grouper(range(10), 3)))
[[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]
"""
import numpy
it = iter(iterable)
while True:
if as_numpy:
# convert each document to a 2d numpy array (~6x faster when transmitting
# chunk data over the wire, in Pyro)
wrapped_chunk = [[numpy.array(doc) for doc in itertools.islice(it, int(chunksize))]]
else:
wrapped_chunk = [list(itertools.islice(it, int(chunksize)))]
if not wrapped_chunk[0]:
break
# memory opt: wrap the chunk and then pop(), to avoid leaving behind a dangling reference
yield wrapped_chunk.pop()
grouper = chunkize_serial
class RepeatCorpusNTimes(SaveLoad):
def __init__(self, corpus, n):
"""
Repeat a `corpus` `n` times.
>>> corpus = [[(1, 0.5)], []]
>>> list(RepeatCorpusNTimes(corpus, 3)) # repeat 3 times
[[(1, 0.5)], [], [(1, 0.5)], [], [(1, 0.5)], []]
"""
self.corpus = corpus
self.n = n
def __iter__(self):
for _ in xrange(self.n):
for document in self.corpus:
yield document | pickle |
leaflet.reachability_lab_setup.js | /*
Created: 2018-06-19 by James Austin - Trafford Data Lab
Purpose: Setup script to handle the styling and behaviour for our leaflet.reachability.js plugin
Dependencies: Leaflet.js (http://www.leafletjs.com), leaflet.reachability.js (https://github.com/trafforddatalab/leaflet.reachability)
Licence: https://www.trafforddatalab.io/lab_leaflet/LICENSE.txt
Notes:
*/
function labSetupReachabilityPlugin(objExtraOptions) {
// First set up the standard options
var options = {
apiKey: '58d904a497c67e00015b45fc6862cde0265d4fd78ec660aa83220cdb',
expandButtonStyleClass: 'reachability-control-expand-button fa fa-bullseye',
expandButtonContent: '',
collapseButtonContent: '',
collapseButtonStyleClass: 'reachability-control-collapse-button fa fa-caret-up',
drawButtonContent: '',
drawButtonStyleClass: 'fa fa-pencil',
deleteButtonContent: '',
deleteButtonStyleClass: 'fa fa-trash',
distanceButtonContent: '',
distanceButtonStyleClass: 'fa fa-road',
timeButtonContent: '',
timeButtonStyleClass: 'fa fa-clock-o',
travelModeButton1Content: '',
travelModeButton1StyleClass: 'fa fa-car',
travelModeButton2Content: '',
travelModeButton2StyleClass: 'fa fa-bicycle',
travelModeButton3Content: '',
travelModeButton3StyleClass: 'fa fa-male',
travelModeButton4Content: '',
travelModeButton4StyleClass: 'fa fa-wheelchair-alt',
markerFn: labReachabilityMarker
}
// Now add any further options if supplied
if (objExtraOptions != null) {
for (var key in objExtraOptions) {
options[key] = objExtraOptions[key];
}
}
// Create and return the control
return L.control.reachability(options);
}
// Lab styling of the isolines polygons
function | (feature) {
return {
color: '#fc6721',
fillColor: '#757575',
opacity: 0.8,
fillOpacity: 0.1,
weight: 4,
dashArray: '1,6',
lineCap: 'square'
};
}
// Custom markers to appear at the origin of the isolines
function labReachabilityMarker(latLng, travelMode, measure) {
var faClass;
switch (travelMode) {
case 'driving-car':
faClass = 'fa fa-car'
break;
case 'driving-hgv':
faClass = 'fa fa-truck'
break;
case 'cycling-regular':
case 'cycling-road':
case 'cycling-mountain':
case 'cycling-electric':
faClass = 'fa fa-bicycle'
break;
case 'foot-walking':
case 'foot-hiking':
faClass = 'fa fa-male'
break;
case 'wheelchair':
faClass = 'fa fa-wheelchair-alt'
break;
default:
faClass = 'fa fa-dot-circle-o'
}
var customIcon = L.divIcon({ className: faClass + ' lab-reachability-marker', iconAnchor: [12, 12] });
return L.marker(latLng, { icon: customIcon });
}
| labStyleIsolines |
utility.py | #!/usr/bin/python
# -*- encoding=utf-8 -*-
# author: Ian
# e-mail: [email protected]
# description:
def list_to_dict(in_list):
|
def exchange_key_value(in_dict):
return dict((in_dict[i], i) for i in in_dict)
def main():
pass
if __name__ == '__main__':
main() | return dict((i, in_list[i]) for i in range(0, len(in_list))) |
pad-filter.component.ts |
import { ChangeDetectionStrategy, Component, EventEmitter, OnInit, Output } from '@angular/core';
import { MatSelectChange } from '@angular/material';
import { LoggerService } from 'app/website/shared/services/common/logger.service';
import { PadStatusList } from 'app/website/store/dashboard/stores/pads/pads.model';
export interface PadFilterChange {
search: string;
status: string;
days: string;
}
@Component({
selector: 'app-pad-filter',
templateUrl: './pad-filter.component.html',
styleUrls: ['./pad-filter.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class | implements OnInit {
constructor(
private logger: LoggerService,
) { }
// output events
@Output() filterChange = new EventEmitter<PadFilterChange>();
// search
currentSearch = '';
// status
statusList = [
{ value: '', name: 'Any pad status' },
...PadStatusList
];
currentStatus = '';
// create time
createDaysList = [
{ value: '', name: 'Created anytime' },
{ value: '1', name: 'Last day' },
{ value: '7', name: 'Last 7 days' },
{ value: '30', name: 'Last 30 days' },
{ value: '90', name: 'Last 90 days' },
{ value: '180', name: 'Last 180 days' },
{ value: '365', name: 'Last 365 days' },
];
currentCreateDays = '';
ngOnInit(): void {
}
get currentFilter(): PadFilterChange {
return {
search: this.currentSearch,
status: this.currentStatus,
days: this.currentCreateDays,
};
}
onFilterSearchChanged(event: Event) {
// this.logger.log('search chagned = ', event);
this.filterChange.next(this.currentFilter);
}
onFilterPadStatusChanged(event: MatSelectChange) {
// this.logger.log('pad status changed =', event.value, ', status =', this.currentStatus);
this.filterChange.next(this.currentFilter);
}
onFilterCreateTimeChanged(event: MatSelectChange) {
// this.logger.log('create time changed =', event.value, ', create time =', this.currentCreateTime);
this.filterChange.next(this.currentFilter);
}
}
| PadFilterComponent |
obs.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: David Stevens
import sys
import time
import json
import logging
logging.basicConfig(level=logging.INFO)
sys.path.append('../')
from obswebsocket import obsws, requests # noqa: E402
stdinput = sys.stdin.readline()
data = json.loads(stdinput)
try:
host = data['params']['host']
port = data['params']['port']
password = data['params']['password']
command = data['params']['command']
enableOverride = data['params']['enableOverride']
destinationScene = data['params']['destinationScene']
ws = obsws(host, port, password)
ws.connect()
getScenes = ws.call(requests.GetSceneList())
currentScene = getScenes.getCurrentScene()
getStreamInformation = ws.call(requests.GetStreamingStatus())
getStreamStatus = getStreamInformation.getStreaming()
print("Host:" + host)
print("Port:" + port)
print("Password:" + password)
print("Destination Scene:" + destinationScene)
print("Current Scene:" + currentScene)
print(getStreamStatus)
print("Override Status:")
print(enableOverride)
try: | # name = s['name']
# print(u"Switching to {}".format(name))
# ws.call(requests.SetCurrentScene(name))
# time.sleep(2)
print("Started Command Processing")
if command == "Start Streaming Bool":
if getStreamStatus == False:
if currentScene == destinationScene:
print("Already running on the correct scene: Starting Stream")
ws.call(requests.StartStreaming())
else:
print("Setting scene to destination and starting stream")
ws.call(requests.SetCurrentScene(destinationScene))
time.sleep(2)
ws.call(requests.StartStreaming())
else:
print("Stream already running. Command halted.")
elif command == "Stop Stream":
ws.call(requests.StopStreaming())
elif command == "Start Stream":
ws.call(requests.StartStreaming())
elif command == "Switch Scene":
if enableOverride == "True" or getStreamStatus == False:
ws.call(requests.SetCurrentScene(destinationScene))
elif enableOverride == "False":
print("Override is not enabled.")
print("End of list")
except KeyboardInterrupt:
pass
ws.disconnect()
print('{ "complete": 1 }')
except:
print('{ "complete": 1, "code": 999, "description": "Failed to execute." }') | #scenes = ws.call(requests.GetSceneList())
#for s in scenes.getScenes(): |
Errors.ts | //// { order: 3, isJavaScript: true }
// By default TypeScript doesn't provide error messaging
// inside JavaScript. Instead the tooling is focused on
// providing rich support for editors.
// Turning on errors however, is pretty easy. In a
// typical JS file, all that's required to turn on TypeScript
// error messages is adding the following comment:
// @ts-check
let myString = "123";
myString = {};
| // JS file. While still working inside JavaScript, you have
// a few tools to fix these errors.
// For some of the trickier errors, which you don't feel
// code changes should happen, you can use JSDoc annotations
// to tell TypeScript what the types should be:
/** @type {string | {}} */
let myStringOrObject = "123";
myStringOrObject = {};
// Which you can read more on here: example:jsdoc-support
// You could declare the failure unimportant, by telling
// TypeScript to ignore the next error:
let myIgnoredError = "123";
// @ts-ignore
myStringOrObject = {};
// You can use type inference via the flow of code to make
// changes to your JavaScript: example:code-flow | // This may start to add a lot of red squiggles inside your |
code_style.py | # -*- coding: UTF-8 -*-
import pycodestyle
from metrics.report_keys import CODE_STYLE
def code_style(code_path, results, ignore_codes=None):
"""
Check code style.
:param code_path: Path to the source code.
:param results: Dictionary with the results.
:param ignore_codes: List of PEP8 code to ignore.
"""
# Run style guide checker
if ignore_codes is None:
ignore_codes = ['E121', 'E123', 'E126', 'E133', 'E226', 'E241', 'E242', 'E704', 'E501', 'W']
style_guide = pycodestyle.StyleGuide(quiet=True, ignore=ignore_codes)
report = style_guide.check_files([code_path])
| results[CODE_STYLE] = 1.0 - max(min(report.total_errors / max(1.0, report.counters['physical lines']), 1.0), 0.0) | # Summarize metrics |
api.stack.d.ts | import { CfnOutput, Construct, Stack, StackProps } from "@aws-cdk/core";
export declare class | extends Stack {
readonly urlOutput: CfnOutput;
constructor(scope: Construct, id: string, props?: StackProps);
}
| ApiStack |
main.go | package main
import (
"flag"
"os" | crypto "github.com/bdc/go-crypto"
cmn "github.com/bdc/tmlibs/common"
"github.com/bdc/tmlibs/log"
priv_val "github.com/bdc/bdc/types/priv_validator"
)
func main() {
var (
addr = flag.String("addr", ":46659", "Address of client to connect to")
chainID = flag.String("chain-id", "mychain", "chain id")
privValPath = flag.String("priv", "", "priv val file path")
logger = log.NewTMLogger(
log.NewSyncWriter(os.Stdout),
).With("module", "priv_val")
)
flag.Parse()
logger.Info(
"Starting private validator",
"addr", *addr,
"chainID", *chainID,
"privPath", *privValPath,
)
privVal := priv_val.LoadPrivValidatorJSON(*privValPath)
rs := priv_val.NewRemoteSigner(
logger,
*chainID,
*addr,
privVal,
crypto.GenPrivKeyEd25519(),
)
err := rs.Start()
if err != nil {
panic(err)
}
cmn.TrapSignal(func() {
err := rs.Stop()
if err != nil {
panic(err)
}
})
} | |
generate.uml.ts | import fs from 'fs'; |
const plantuml = require('node-plantuml');
(async () => {
const uml = activeqlUml();
const gen = plantuml.generate( uml, {format: 'png'});
gen.out.pipe( fs.createWriteStream("domain.png") );
})(); |
import { activeqlUml } from './activeql-app'; |
restore_request_builder.go | package restore
import (
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
)
// RestoreRequestBuilder provides operations to call the restore method.
type RestoreRequestBuilder struct {
// Path parameters for the request
pathParameters map[string]string
// The request adapter to use to execute the requests.
requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter
// Url template to use to build the URL for the current request builder
urlTemplate string
}
// RestoreRequestBuilderPostRequestConfiguration configuration for the request such as headers, query parameters, and middleware options.
type RestoreRequestBuilderPostRequestConfiguration struct {
// Request headers
Headers map[string]string
// Request options
Options []i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestOption
}
// NewRestoreRequestBuilderInternal instantiates a new RestoreRequestBuilder and sets the default values.
func | (pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RestoreRequestBuilder) {
m := &RestoreRequestBuilder{
}
m.urlTemplate = "{+baseurl}/users/{user%2Did}/drives/{drive%2Did}/items/{driveItem%2Did}/listItem/documentSetVersions/{documentSetVersion%2Did}/microsoft.graph.restore";
urlTplParams := make(map[string]string)
for idx, item := range pathParameters {
urlTplParams[idx] = item
}
m.pathParameters = urlTplParams;
m.requestAdapter = requestAdapter;
return m
}
// NewRestoreRequestBuilder instantiates a new RestoreRequestBuilder and sets the default values.
func NewRestoreRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*RestoreRequestBuilder) {
urlParams := make(map[string]string)
urlParams["request-raw-url"] = rawUrl
return NewRestoreRequestBuilderInternal(urlParams, requestAdapter)
}
// CreatePostRequestInformation invoke action restore
func (m *RestoreRequestBuilder) CreatePostRequestInformation()(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
return m.CreatePostRequestInformationWithRequestConfiguration(nil);
}
// CreatePostRequestInformationWithRequestConfiguration invoke action restore
func (m *RestoreRequestBuilder) CreatePostRequestInformationWithRequestConfiguration(requestConfiguration *RestoreRequestBuilderPostRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformation()
requestInfo.UrlTemplate = m.urlTemplate
requestInfo.PathParameters = m.pathParameters
requestInfo.Method = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.POST
if requestConfiguration != nil {
requestInfo.AddRequestHeaders(requestConfiguration.Headers)
requestInfo.AddRequestOptions(requestConfiguration.Options)
}
return requestInfo, nil
}
// Post invoke action restore
func (m *RestoreRequestBuilder) Post()(error) {
return m.PostWithRequestConfigurationAndResponseHandler(nil, nil);
}
// PostWithRequestConfigurationAndResponseHandler invoke action restore
func (m *RestoreRequestBuilder) PostWithRequestConfigurationAndResponseHandler(requestConfiguration *RestoreRequestBuilderPostRequestConfiguration, responseHandler i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ResponseHandler)(error) {
requestInfo, err := m.CreatePostRequestInformationWithRequestConfiguration(requestConfiguration);
if err != nil {
return err
}
err = m.requestAdapter.SendNoContentAsync(requestInfo, responseHandler, nil)
if err != nil {
return err
}
return nil
}
| NewRestoreRequestBuilderInternal |
machinelearningcompute.go | package machinelearningservices
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// MachineLearningComputeClient is the these APIs allow end users to operate on Azure Machine Learning Workspace
// resources.
type MachineLearningComputeClient struct {
BaseClient
}
// NewMachineLearningComputeClient creates an instance of the MachineLearningComputeClient client.
func | (subscriptionID string) MachineLearningComputeClient {
return NewMachineLearningComputeClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewMachineLearningComputeClientWithBaseURI creates an instance of the MachineLearningComputeClient client using a
// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds,
// Azure stack).
func NewMachineLearningComputeClientWithBaseURI(baseURI string, subscriptionID string) MachineLearningComputeClient {
return MachineLearningComputeClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable
// operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet.
// Parameters:
// resourceGroupName - name of the resource group in which workspace is located.
// workspaceName - name of Azure Machine Learning workspace.
// computeName - name of the Azure Machine Learning compute.
// parameters - payload with Machine Learning compute definition.
func (client MachineLearningComputeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ComputeResource) (result MachineLearningComputeCreateOrUpdateFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workspaceName, computeName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "CreateOrUpdate", nil, "Failure preparing request")
return
}
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
return
}
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client MachineLearningComputeClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ComputeResource) (*http.Request, error) {
pathParameters := map[string]interface{}{
"computeName": autorest.Encode("path", computeName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"workspaceName": autorest.Encode("path", workspaceName),
}
const APIVersion = "2020-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client MachineLearningComputeClient) CreateOrUpdateSender(req *http.Request) (future MachineLearningComputeCreateOrUpdateFuture, err error) {
var resp *http.Response
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client MachineLearningComputeClient) CreateOrUpdateResponder(resp *http.Response) (result ComputeResource, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Delete deletes specified Machine Learning compute.
// Parameters:
// resourceGroupName - name of the resource group in which workspace is located.
// workspaceName - name of Azure Machine Learning workspace.
// computeName - name of the Azure Machine Learning compute.
// underlyingResourceAction - delete the underlying compute if 'Delete', or detach the underlying compute from
// workspace if 'Detach'.
func (client MachineLearningComputeClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction UnderlyingResourceAction) (result MachineLearningComputeDeleteFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.Delete")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName, computeName, underlyingResourceAction)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Delete", nil, "Failure preparing request")
return
}
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Delete", result.Response(), "Failure sending request")
return
}
return
}
// DeletePreparer prepares the Delete request.
func (client MachineLearningComputeClient) DeletePreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction UnderlyingResourceAction) (*http.Request, error) {
pathParameters := map[string]interface{}{
"computeName": autorest.Encode("path", computeName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"workspaceName": autorest.Encode("path", workspaceName),
}
const APIVersion = "2020-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
"underlyingResourceAction": autorest.Encode("query", underlyingResourceAction),
}
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client MachineLearningComputeClient) DeleteSender(req *http.Request) (future MachineLearningComputeDeleteFuture, err error) {
var resp *http.Response
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client MachineLearningComputeClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
autorest.ByClosing())
result.Response = resp
return
}
// Get gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use
// 'keys' nested resource to get them.
// Parameters:
// resourceGroupName - name of the resource group in which workspace is located.
// workspaceName - name of Azure Machine Learning workspace.
// computeName - name of the Azure Machine Learning compute.
func (client MachineLearningComputeClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result ComputeResource, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.Get")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName, computeName)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Get", nil, "Failure preparing request")
return
}
resp, err := client.GetSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Get", resp, "Failure responding to request")
return
}
return
}
// GetPreparer prepares the Get request.
func (client MachineLearningComputeClient) GetPreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"computeName": autorest.Encode("path", computeName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"workspaceName": autorest.Encode("path", workspaceName),
}
const APIVersion = "2020-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client MachineLearningComputeClient) GetSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client MachineLearningComputeClient) GetResponder(resp *http.Response) (result ComputeResource, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListByWorkspace gets computes in specified workspace.
// Parameters:
// resourceGroupName - name of the resource group in which workspace is located.
// workspaceName - name of Azure Machine Learning workspace.
// skiptoken - continuation token for pagination.
func (client MachineLearningComputeClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result PaginatedComputeResourcesListPage, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.ListByWorkspace")
defer func() {
sc := -1
if result.pcrl.Response.Response != nil {
sc = result.pcrl.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
result.fn = client.listByWorkspaceNextResults
req, err := client.ListByWorkspacePreparer(ctx, resourceGroupName, workspaceName, skiptoken)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListByWorkspace", nil, "Failure preparing request")
return
}
resp, err := client.ListByWorkspaceSender(req)
if err != nil {
result.pcrl.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListByWorkspace", resp, "Failure sending request")
return
}
result.pcrl, err = client.ListByWorkspaceResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListByWorkspace", resp, "Failure responding to request")
return
}
if result.pcrl.hasNextLink() && result.pcrl.IsEmpty() {
err = result.NextWithContext(ctx)
}
return
}
// ListByWorkspacePreparer prepares the ListByWorkspace request.
func (client MachineLearningComputeClient) ListByWorkspacePreparer(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"workspaceName": autorest.Encode("path", workspaceName),
}
const APIVersion = "2020-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
if len(skiptoken) > 0 {
queryParameters["$skiptoken"] = autorest.Encode("query", skiptoken)
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the
// http.Response Body if it receives an error.
func (client MachineLearningComputeClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always
// closes the http.Response Body.
func (client MachineLearningComputeClient) ListByWorkspaceResponder(resp *http.Response) (result PaginatedComputeResourcesList, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// listByWorkspaceNextResults retrieves the next set of results, if any.
func (client MachineLearningComputeClient) listByWorkspaceNextResults(ctx context.Context, lastResults PaginatedComputeResourcesList) (result PaginatedComputeResourcesList, err error) {
req, err := lastResults.paginatedComputeResourcesListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListByWorkspaceSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "listByWorkspaceNextResults", resp, "Failure sending next results request")
}
result, err = client.ListByWorkspaceResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "listByWorkspaceNextResults", resp, "Failure responding to next results request")
return
}
return
}
// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required.
func (client MachineLearningComputeClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, skiptoken string) (result PaginatedComputeResourcesListIterator, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.ListByWorkspace")
defer func() {
sc := -1
if result.Response().Response.Response != nil {
sc = result.page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
result.page, err = client.ListByWorkspace(ctx, resourceGroupName, workspaceName, skiptoken)
return
}
// ListKeys gets secrets related to Machine Learning compute (storage keys, service credentials, etc).
// Parameters:
// resourceGroupName - name of the resource group in which workspace is located.
// workspaceName - name of Azure Machine Learning workspace.
// computeName - name of the Azure Machine Learning compute.
func (client MachineLearningComputeClient) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result ComputeSecretsModel, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.ListKeys")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.ListKeysPreparer(ctx, resourceGroupName, workspaceName, computeName)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListKeys", nil, "Failure preparing request")
return
}
resp, err := client.ListKeysSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListKeys", resp, "Failure sending request")
return
}
result, err = client.ListKeysResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListKeys", resp, "Failure responding to request")
return
}
return
}
// ListKeysPreparer prepares the ListKeys request.
func (client MachineLearningComputeClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"computeName": autorest.Encode("path", computeName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"workspaceName": autorest.Encode("path", workspaceName),
}
const APIVersion = "2020-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// ListKeysSender sends the ListKeys request. The method will close the
// http.Response Body if it receives an error.
func (client MachineLearningComputeClient) ListKeysSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListKeysResponder handles the response to the ListKeys request. The method always
// closes the http.Response Body.
func (client MachineLearningComputeClient) ListKeysResponder(resp *http.Response) (result ComputeSecretsModel, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListNodes get the details (e.g IP address, port etc) of all the compute nodes in the compute.
// Parameters:
// resourceGroupName - name of the resource group in which workspace is located.
// workspaceName - name of Azure Machine Learning workspace.
// computeName - name of the Azure Machine Learning compute.
func (client MachineLearningComputeClient) ListNodes(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (result AmlComputeNodesInformation, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.ListNodes")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.ListNodesPreparer(ctx, resourceGroupName, workspaceName, computeName)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListNodes", nil, "Failure preparing request")
return
}
resp, err := client.ListNodesSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListNodes", resp, "Failure sending request")
return
}
result, err = client.ListNodesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "ListNodes", resp, "Failure responding to request")
return
}
return
}
// ListNodesPreparer prepares the ListNodes request.
func (client MachineLearningComputeClient) ListNodesPreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"computeName": autorest.Encode("path", computeName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"workspaceName": autorest.Encode("path", workspaceName),
}
const APIVersion = "2020-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// ListNodesSender sends the ListNodes request. The method will close the
// http.Response Body if it receives an error.
func (client MachineLearningComputeClient) ListNodesSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListNodesResponder handles the response to the ListNodes request. The method always
// closes the http.Response Body.
func (client MachineLearningComputeClient) ListNodesResponder(resp *http.Response) (result AmlComputeNodesInformation, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Update updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable
// operation.
// Parameters:
// resourceGroupName - name of the resource group in which workspace is located.
// workspaceName - name of Azure Machine Learning workspace.
// computeName - name of the Azure Machine Learning compute.
// parameters - additional parameters for cluster update.
func (client MachineLearningComputeClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ClusterUpdateParameters) (result MachineLearningComputeUpdateFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/MachineLearningComputeClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.UpdatePreparer(ctx, resourceGroupName, workspaceName, computeName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Update", nil, "Failure preparing request")
return
}
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeClient", "Update", result.Response(), "Failure sending request")
return
}
return
}
// UpdatePreparer prepares the Update request.
func (client MachineLearningComputeClient) UpdatePreparer(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ClusterUpdateParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"computeName": autorest.Encode("path", computeName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"workspaceName": autorest.Encode("path", workspaceName),
}
const APIVersion = "2020-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client MachineLearningComputeClient) UpdateSender(req *http.Request) (future MachineLearningComputeUpdateFuture, err error) {
var resp *http.Response
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client MachineLearningComputeClient) UpdateResponder(resp *http.Response) (result ComputeResource, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
| NewMachineLearningComputeClient |
741.js | /*! For license information please see 741.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[741],{54:(t,e,n)=>{"use strict";n.d(e,{Z:()=>Lr});var i=Object.freeze({});function r(t){return null==t}function o(t){return null!=t}function a(t){return!0===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function l(t){return null!==t&&"object"==typeof t}var u=Object.prototype.toString;function c(t){return"[object Object]"===u.call(t)}function h(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return o(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||c(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function g(t,e){for(var n=Object.create(null),i=t.split(","),r=0;r<i.length;r++)n[i[r]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}g("slot,component",!0);var v=g("key,ref,slot,slot-scope,is");function y(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function _(t,e){return m.call(t,e)}function x(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var b=/-(\w)/g,w=x((function(t){return t.replace(b,(function(t,e){return e?e.toUpperCase():""}))})),S=x((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),T=/\B([A-Z])/g,M=x((function(t){return t.replace(T,"-$1").toLowerCase()})),C=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var i=arguments.length;return i?i>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function k(t,e){e=e||0;for(var n=t.length-e,i=new Array(n);n--;)i[n]=t[n+e];return i}function A(t,e){for(var n in e)t[n]=e[n];return t}function I(t){for(var e={},n=0;n<t.length;n++)t[n]&&A(e,t[n]);return e}function D(t,e,n){}var P=function(t,e,n){return!1},O=function(t){return t};function L(t,e){if(t===e)return!0;var n=l(t),i=l(e);if(!n||!i)return!n&&!i&&String(t)===String(e);try{var r=Array.isArray(t),o=Array.isArray(e);if(r&&o)return t.length===e.length&&t.every((function(t,n){return L(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(r||o)return!1;var a=Object.keys(t),s=Object.keys(e);return a.length===s.length&&a.every((function(n){return L(t[n],e[n])}))}catch(t){return!1}}function R(t,e){for(var n=0;n<t.length;n++)if(L(t[n],e))return n;return-1}function E(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var Z="data-server-rendered",N=["component","directive","filter"],B=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],z={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:P,isReservedAttr:P,isUnknownElement:P,getTagNamespace:D,parsePlatformTagName:O,mustUseProp:P,async:!0,_lifecycleHooks:B};function F(t,e,n,i){Object.defineProperty(t,e,{value:n,enumerable:!!i,writable:!0,configurable:!0})}var W,V=new RegExp("[^"+/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/.source+".$_\\d]"),H="__proto__"in{},U="undefined"!=typeof window,G="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,X=G&&WXEnvironment.platform.toLowerCase(),Y=U&&window.navigator.userAgent.toLowerCase(),j=Y&&/msie|trident/.test(Y),$=Y&&Y.indexOf("msie 9.0")>0,q=Y&&Y.indexOf("edge/")>0,K=(Y&&Y.indexOf("android"),Y&&/iphone|ipad|ipod|ios/.test(Y)||"ios"===X),J=(Y&&/chrome\/\d+/.test(Y),Y&&/phantomjs/.test(Y),Y&&Y.match(/firefox\/(\d+)/)),Q={}.watch,tt=!1;if(U)try{var et={};Object.defineProperty(et,"passive",{get:function(){tt=!0}}),window.addEventListener("test-passive",null,et)}catch(t){}var nt=function(){return void 0===W&&(W=!U&&!G&&void 0!==n.g&&n.g.process&&"server"===n.g.process.env.VUE_ENV),W},it=U&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function rt(t){return"function"==typeof t&&/native code/.test(t.toString())}var ot,at="undefined"!=typeof Symbol&&rt(Symbol)&&"undefined"!=typeof Reflect&&rt(Reflect.ownKeys);ot="undefined"!=typeof Set&&rt(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var st=D,lt=0,ut=function(){this.id=lt++,this.subs=[]};ut.prototype.addSub=function(t){this.subs.push(t)},ut.prototype.removeSub=function(t){y(this.subs,t)},ut.prototype.depend=function(){ut.target&&ut.target.addDep(this)},ut.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e<n;e++)t[e].update()},ut.target=null;var ct=[];function ht(t){ct.push(t),ut.target=t}function pt(){ct.pop(),ut.target=ct[ct.length-1]}var dt=function(t,e,n,i,r,o,a,s){this.tag=t,this.data=e,this.children=n,this.text=i,this.elm=r,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},ft={child:{configurable:!0}};ft.child.get=function(){return this.componentInstance},Object.defineProperties(dt.prototype,ft);var gt=function(t){void 0===t&&(t="");var e=new dt;return e.text=t,e.isComment=!0,e};function vt(t){return new dt(void 0,void 0,void 0,String(t))}function yt(t){var e=new dt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var mt=Array.prototype,_t=Object.create(mt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(t){var e=mt[t];F(_t,t,(function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];var r,o=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":r=n;break;case"splice":r=n.slice(2)}return r&&a.observeArray(r),a.dep.notify(),o}))}));var xt=Object.getOwnPropertyNames(_t),bt=!0;function wt(t){bt=t}var St=function(t){this.value=t,this.dep=new ut,this.vmCount=0,F(t,"__ob__",this),Array.isArray(t)?(H?function(t,e){t.__proto__=e}(t,_t):function(t,e,n){for(var i=0,r=n.length;i<r;i++){var o=n[i];F(t,o,e[o])}}(t,_t,xt),this.observeArray(t)):this.walk(t)};function Tt(t,e){var n;if(l(t)&&!(t instanceof dt))return _(t,"__ob__")&&t.__ob__ instanceof St?n=t.__ob__:bt&&!nt()&&(Array.isArray(t)||c(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new St(t)),e&&n&&n.vmCount++,n}function Mt(t,e,n,i,r){var o=new ut,a=Object.getOwnPropertyDescriptor(t,e);if(!a||!1!==a.configurable){var s=a&&a.get,l=a&&a.set;s&&!l||2!==arguments.length||(n=t[e]);var u=!r&&Tt(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):n;return ut.target&&(o.depend(),u&&(u.dep.depend(),Array.isArray(e)&&At(e))),e},set:function(e){var i=s?s.call(t):n;e===i||e!=e&&i!=i||s&&!l||(l?l.call(t,e):n=e,u=!r&&Tt(e),o.notify())}})}}function Ct(t,e,n){if(Array.isArray(t)&&h(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(e in t&&!(e in Object.prototype))return t[e]=n,n;var i=t.__ob__;return t._isVue||i&&i.vmCount?n:i?(Mt(i.value,e,n),i.dep.notify(),n):(t[e]=n,n)}function kt(t,e){if(Array.isArray(t)&&h(e))t.splice(e,1);else{var n=t.__ob__;t._isVue||n&&n.vmCount||_(t,e)&&(delete t[e],n&&n.dep.notify())}}function At(t){for(var e=void 0,n=0,i=t.length;n<i;n++)(e=t[n])&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&At(e)}St.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Mt(t,e[n])},St.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)Tt(t[e])};var It=z.optionMergeStrategies;function Dt(t,e){if(!e)return t;for(var n,i,r,o=at?Reflect.ownKeys(e):Object.keys(e),a=0;a<o.length;a++)"__ob__"!==(n=o[a])&&(i=t[n],r=e[n],_(t,n)?i!==r&&c(i)&&c(r)&&Dt(i,r):Ct(t,n,r));return t}function Pt(t,e,n){return n?function(){var i="function"==typeof e?e.call(n,n):e,r="function"==typeof t?t.call(n,n):t;return i?Dt(i,r):r}:e?t?function(){return Dt("function"==typeof e?e.call(this,this):e,"function"==typeof t?t.call(this,this):t)}:e:t}function Ot(t,e){var n=e?t?t.concat(e):Array.isArray(e)?e:[e]:t;return n?function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(n):n}function Lt(t,e,n,i){var r=Object.create(t||null);return e?A(r,e):r}It.data=function(t,e,n){return n?Pt(t,e,n):e&&"function"!=typeof e?t:Pt(t,e)},B.forEach((function(t){It[t]=Ot})),N.forEach((function(t){It[t+"s"]=Lt})),It.watch=function(t,e,n,i){if(t===Q&&(t=void 0),e===Q&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var r={};for(var o in A(r,t),e){var a=r[o],s=e[o];a&&!Array.isArray(a)&&(a=[a]),r[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return r},It.props=It.methods=It.inject=It.computed=function(t,e,n,i){if(!t)return e;var r=Object.create(null);return A(r,t),e&&A(r,e),r},It.provide=Pt;var Rt=function(t,e){return void 0===e?t:e};function Et(t,e,n){if("function"==typeof e&&(e=e.options),function(t,e){var n=t.props;if(n){var i,r,o={};if(Array.isArray(n))for(i=n.length;i--;)"string"==typeof(r=n[i])&&(o[w(r)]={type:null});else if(c(n))for(var a in n)r=n[a],o[w(a)]=c(r)?r:{type:r};t.props=o}}(e),function(t,e){var n=t.inject;if(n){var i=t.inject={};if(Array.isArray(n))for(var r=0;r<n.length;r++)i[n[r]]={from:n[r]};else if(c(n))for(var o in n){var a=n[o];i[o]=c(a)?A({from:o},a):{from:a}}}}(e),function(t){var e=t.directives;if(e)for(var n in e){var i=e[n];"function"==typeof i&&(e[n]={bind:i,update:i})}}(e),!e._base&&(e.extends&&(t=Et(t,e.extends,n)),e.mixins))for(var i=0,r=e.mixins.length;i<r;i++)t=Et(t,e.mixins[i],n);var o,a={};for(o in t)s(o);for(o in e)_(t,o)||s(o);function s(i){var r=It[i]||Rt;a[i]=r(t[i],e[i],n,i)}return a}function Zt(t,e,n,i){if("string"==typeof n){var r=t[e];if(_(r,n))return r[n];var o=w(n);if(_(r,o))return r[o];var a=S(o);return _(r,a)?r[a]:r[n]||r[o]||r[a]}}function Nt(t,e,n,i){var r=e[t],o=!_(n,t),a=n[t],s=Ft(Boolean,r.type);if(s>-1)if(o&&!_(r,"default"))a=!1;else if(""===a||a===M(t)){var l=Ft(String,r.type);(l<0||s<l)&&(a=!0)}if(void 0===a){a=function(t,e,n){if(_(e,"default")){var i=e.default;return t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n]?t._props[n]:"function"==typeof i&&"Function"!==Bt(e.type)?i.call(t):i}}(i,r,t);var u=bt;wt(!0),Tt(a),wt(u)}return a}function Bt(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function zt(t,e){return Bt(t)===Bt(e)}function Ft(t,e){if(!Array.isArray(e))return zt(e,t)?0:-1;for(var n=0,i=e.length;n<i;n++)if(zt(e[n],t))return n;return-1}function Wt(t,e,n){ht();try{if(e)for(var i=e;i=i.$parent;){var r=i.$options.errorCaptured;if(r)for(var o=0;o<r.length;o++)try{if(!1===r[o].call(i,t,e,n))return}catch(t){Ht(t,i,"errorCaptured hook")}}Ht(t,e,n)}finally{pt()}}function Vt(t,e,n,i,r){var o;try{(o=n?t.apply(e,n):t.call(e))&&!o._isVue&&p(o)&&!o._handled&&(o.catch((function(t){return Wt(t,i,r+" (Promise/async)")})),o._handled=!0)}catch(t){Wt(t,i,r)}return o}function Ht(t,e,n){if(z.errorHandler)try{return z.errorHandler.call(null,t,e,n)}catch(e){e!==t&&Ut(e)}Ut(t)}function Ut(t,e,n){if(!U&&!G||"undefined"==typeof console)throw t;console.error(t)}var Gt,Xt=!1,Yt=[],jt=!1;function $t(){jt=!1;var t=Yt.slice(0);Yt.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&rt(Promise)){var qt=Promise.resolve();Gt=function(){qt.then($t),K&&setTimeout(D)},Xt=!0}else if(j||"undefined"==typeof MutationObserver||!rt(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Gt="undefined"!=typeof setImmediate&&rt(setImmediate)?function(){setImmediate($t)}:function(){setTimeout($t,0)};else{var Kt=1,Jt=new MutationObserver($t),Qt=document.createTextNode(String(Kt));Jt.observe(Qt,{characterData:!0}),Gt=function(){Kt=(Kt+1)%2,Qt.data=String(Kt)},Xt=!0}function te(t,e){var n;if(Yt.push((function(){if(t)try{t.call(e)}catch(t){Wt(t,e,"nextTick")}else n&&n(e)})),jt||(jt=!0,Gt()),!t&&"undefined"!=typeof Promise)return new Promise((function(t){n=t}))}var ee=new ot;function ne(t){ie(t,ee),ee.clear()}function ie(t,e){var n,i,r=Array.isArray(t);if(!(!r&&!l(t)||Object.isFrozen(t)||t instanceof dt)){if(t.__ob__){var o=t.__ob__.dep.id;if(e.has(o))return;e.add(o)}if(r)for(n=t.length;n--;)ie(t[n],e);else for(n=(i=Object.keys(t)).length;n--;)ie(t[i[n]],e)}}var re=x((function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),i="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=i?t.slice(1):t,once:n,capture:i,passive:e}}));function oe(t,e){function n(){var t=arguments,i=n.fns;if(!Array.isArray(i))return Vt(i,null,arguments,e,"v-on handler");for(var r=i.slice(),o=0;o<r.length;o++)Vt(r[o],null,t,e,"v-on handler")}return n.fns=t,n}function ae(t,e,n,i,o,s){var l,u,c,h;for(l in t)u=t[l],c=e[l],h=re(l),r(u)||(r(c)?(r(u.fns)&&(u=t[l]=oe(u,s)),a(h.once)&&(u=t[l]=o(h.name,u,h.capture)),n(h.name,u,h.capture,h.passive,h.params)):u!==c&&(c.fns=u,t[l]=c));for(l in e)r(t[l])&&i((h=re(l)).name,e[l],h.capture)}function se(t,e,n){var i;t instanceof dt&&(t=t.data.hook||(t.data.hook={}));var s=t[e];function l(){n.apply(this,arguments),y(i.fns,l)}r(s)?i=oe([l]):o(s.fns)&&a(s.merged)?(i=s).fns.push(l):i=oe([s,l]),i.merged=!0,t[e]=i}function le(t,e,n,i,r){if(o(e)){if(_(e,n))return t[n]=e[n],r||delete e[n],!0;if(_(e,i))return t[n]=e[i],r||delete e[i],!0}return!1}function ue(t){return s(t)?[vt(t)]:Array.isArray(t)?he(t):void 0}function ce(t){return o(t)&&o(t.text)&&!1===t.isComment}function he(t,e){var n,i,l,u,c=[];for(n=0;n<t.length;n++)r(i=t[n])||"boolean"==typeof i||(u=c[l=c.length-1],Array.isArray(i)?i.length>0&&(ce((i=he(i,(e||"")+"_"+n))[0])&&ce(u)&&(c[l]=vt(u.text+i[0].text),i.shift()),c.push.apply(c,i)):s(i)?ce(u)?c[l]=vt(u.text+i):""!==i&&c.push(vt(i)):ce(i)&&ce(u)?c[l]=vt(u.text+i.text):(a(t._isVList)&&o(i.tag)&&r(i.key)&&o(e)&&(i.key="__vlist"+e+"_"+n+"__"),c.push(i)));return c}function pe(t,e){if(t){for(var n=Object.create(null),i=at?Reflect.ownKeys(t):Object.keys(t),r=0;r<i.length;r++){var o=i[r];if("__ob__"!==o){for(var a=t[o].from,s=e;s;){if(s._provided&&_(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in t[o]){var l=t[o].default;n[o]="function"==typeof l?l.call(e):l}}}return n}}function de(t,e){if(!t||!t.length)return{};for(var n={},i=0,r=t.length;i<r;i++){var o=t[i],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==e&&o.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,l=n[s]||(n[s]=[]);"template"===o.tag?l.push.apply(l,o.children||[]):l.push(o)}}for(var u in n)n[u].every(fe)&&delete n[u];return n}function fe(t){return t.isComment&&!t.asyncFactory||" "===t.text}function ge(t,e,n){var r,o=Object.keys(e).length>0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&n&&n!==i&&s===n.$key&&!o&&!n.$hasNormal)return n;for(var l in r={},t)t[l]&&"$"!==l[0]&&(r[l]=ve(e,l,t[l]))}else r={};for(var u in e)u in r||(r[u]=ye(e,u));return t&&Object.isExtensible(t)&&(t._normalized=r),F(r,"$stable",a),F(r,"$key",s),F(r,"$hasNormal",o),r}function ve(t,e,n){var i=function(){var t=arguments.length?n.apply(null,arguments):n({});return(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:ue(t))&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:i,enumerable:!0,configurable:!0}),i}function ye(t,e){return function(){return t[e]}}function me(t,e){var n,i,r,a,s;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),i=0,r=t.length;i<r;i++)n[i]=e(t[i],i);else if("number"==typeof t)for(n=new Array(t),i=0;i<t;i++)n[i]=e(i+1,i);else if(l(t))if(at&&t[Symbol.iterator]){n=[];for(var u=t[Symbol.iterator](),c=u.next();!c.done;)n.push(e(c.value,n.length)),c=u.next()}else for(a=Object.keys(t),n=new Array(a.length),i=0,r=a.length;i<r;i++)s=a[i],n[i]=e(t[s],s,i);return o(n)||(n=[]),n._isVList=!0,n}function _e(t,e,n,i){var r,o=this.$scopedSlots[t];o?(n=n||{},i&&(n=A(A({},i),n)),r=o(n)||e):r=this.$slots[t]||e;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},r):r}function xe(t){return Zt(this.$options,"filters",t)||O}function be(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}function we(t,e,n,i,r){var o=z.keyCodes[e]||n;return r&&i&&!z.keyCodes[e]?be(r,i):o?be(o,t):i?M(i)!==e:void 0}function Se(t,e,n,i,r){if(n&&l(n)){var o;Array.isArray(n)&&(n=I(n));var a=function(a){if("class"===a||"style"===a||v(a))o=t;else{var s=t.attrs&&t.attrs.type;o=i||z.mustUseProp(e,s,a)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var l=w(a),u=M(a);l in o||u in o||(o[a]=n[a],r&&((t.on||(t.on={}))["update:"+a]=function(t){n[a]=t}))};for(var s in n)a(s)}return t}function Te(t,e){var n=this._staticTrees||(this._staticTrees=[]),i=n[t];return i&&!e||Ce(i=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),"__static__"+t,!1),i}function Me(t,e,n){return Ce(t,"__once__"+e+(n?"_"+n:""),!0),t}function Ce(t,e,n){if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]&&"string"!=typeof t[i]&&ke(t[i],e+"_"+i,n);else ke(t,e,n)}function ke(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function Ae(t,e){if(e&&c(e)){var n=t.on=t.on?A({},t.on):{};for(var i in e){var r=n[i],o=e[i];n[i]=r?[].concat(r,o):o}}return t}function Ie(t,e,n,i){e=e||{$stable:!n};for(var r=0;r<t.length;r++){var o=t[r];Array.isArray(o)?Ie(o,e,n):o&&(o.proxy&&(o.fn.proxy=!0),e[o.key]=o.fn)}return i&&(e.$key=i),e}function De(t,e){for(var n=0;n<e.length;n+=2){var i=e[n];"string"==typeof i&&i&&(t[e[n]]=e[n+1])}return t}function Pe(t,e){return"string"==typeof t?e+t:t}function Oe(t){t._o=Me,t._n=f,t._s=d,t._l=me,t._t=_e,t._q=L,t._i=R,t._m=Te,t._f=xe,t._k=we,t._b=Se,t._v=vt,t._e=gt,t._u=Ie,t._g=Ae,t._d=De,t._p=Pe}function Le(t,e,n,r,o){var s,l=this,u=o.options;_(r,"_uid")?(s=Object.create(r))._original=r:(s=r,r=r._original);var c=a(u._compiled),h=!c;this.data=t,this.props=e,this.children=n,this.parent=r,this.listeners=t.on||i,this.injections=pe(u.inject,r),this.slots=function(){return l.$slots||ge(t.scopedSlots,l.$slots=de(n,r)),l.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return ge(t.scopedSlots,this.slots())}}),c&&(this.$options=u,this.$slots=this.slots(),this.$scopedSlots=ge(t.scopedSlots,this.$slots)),u._scopeId?this._c=function(t,e,n,i){var o=Fe(s,t,e,n,i,h);return o&&!Array.isArray(o)&&(o.fnScopeId=u._scopeId,o.fnContext=r),o}:this._c=function(t,e,n,i){return Fe(s,t,e,n,i,h)}}function Re(t,e,n,i,r){var o=yt(t);return o.fnContext=n,o.fnOptions=i,e.slot&&((o.data||(o.data={})).slot=e.slot),o}function Ee(t,e){for(var n in e)t[w(n)]=e[n]}Oe(Le.prototype);var Ze={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;Ze.prepatch(n,n)}else(t.componentInstance=function(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},i=t.data.inlineTemplate;return o(i)&&(n.render=i.render,n.staticRenderFns=i.staticRenderFns),new t.componentOptions.Ctor(n)}(t,Ke)).$mount(e?t.elm:void 0,e)},prepatch:function(t,e){var n=e.componentOptions;!function(t,e,n,r,o){var a=r.data.scopedSlots,s=t.$scopedSlots,l=!!(a&&!a.$stable||s!==i&&!s.$stable||a&&t.$scopedSlots.$key!==a.$key),u=!!(o||t.$options._renderChildren||l);if(t.$options._parentVnode=r,t.$vnode=r,t._vnode&&(t._vnode.parent=r),t.$options._renderChildren=o,t.$attrs=r.data.attrs||i,t.$listeners=n||i,e&&t.$options.props){wt(!1);for(var c=t._props,h=t.$options._propKeys||[],p=0;p<h.length;p++){var d=h[p],f=t.$options.props;c[d]=Nt(d,f,e,t)}wt(!0),t.$options.propsData=e}n=n||i;var g=t.$options._parentListeners;t.$options._parentListeners=n,qe(t,n,g),u&&(t.$slots=de(o,r.context),t.$forceUpdate())}(e.componentInstance=t.componentInstance,n.propsData,n.listeners,e,n.children)},insert:function(t){var e,n=t.context,i=t.componentInstance;i._isMounted||(i._isMounted=!0,nn(i,"mounted")),t.data.keepAlive&&(n._isMounted?((e=i)._inactive=!1,on.push(e)):tn(i,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?en(e,!0):e.$destroy())}},Ne=Object.keys(Ze);function Be(t,e,n,s,u){if(!r(t)){var c=n.$options._base;if(l(t)&&(t=c.extend(t)),"function"==typeof t){var h;if(r(t.cid)&&void 0===(t=function(t,e){if(a(t.error)&&o(t.errorComp))return t.errorComp;if(o(t.resolved))return t.resolved;var n=He;if(n&&o(t.owners)&&-1===t.owners.indexOf(n)&&t.owners.push(n),a(t.loading)&&o(t.loadingComp))return t.loadingComp;if(n&&!o(t.owners)){var i=t.owners=[n],s=!0,u=null,c=null;n.$on("hook:destroyed",(function(){return y(i,n)}));var h=function(t){for(var e=0,n=i.length;e<n;e++)i[e].$forceUpdate();t&&(i.length=0,null!==u&&(clearTimeout(u),u=null),null!==c&&(clearTimeout(c),c=null))},d=E((function(n){t.resolved=Ue(n,e),s?i.length=0:h(!0)})),f=E((function(e){o(t.errorComp)&&(t.error=!0,h(!0))})),g=t(d,f);return l(g)&&(p(g)?r(t.resolved)&&g.then(d,f):p(g.component)&&(g.component.then(d,f),o(g.error)&&(t.errorComp=Ue(g.error,e)),o(g.loading)&&(t.loadingComp=Ue(g.loading,e),0===g.delay?t.loading=!0:u=setTimeout((function(){u=null,r(t.resolved)&&r(t.error)&&(t.loading=!0,h(!1))}),g.delay||200)),o(g.timeout)&&(c=setTimeout((function(){c=null,r(t.resolved)&&f(null)}),g.timeout)))),s=!1,t.loading?t.loadingComp:t.resolved}}(h=t,c)))return function(t,e,n,i,r){var o=gt();return o.asyncFactory=t,o.asyncMeta={data:e,context:n,children:i,tag:r},o}(h,e,n,s,u);e=e||{},Tn(t),o(e.model)&&function(t,e){var n=t.model&&t.model.prop||"value",i=t.model&&t.model.event||"input";(e.attrs||(e.attrs={}))[n]=e.model.value;var r=e.on||(e.on={}),a=r[i],s=e.model.callback;o(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(r[i]=[s].concat(a)):r[i]=s}(t.options,e);var d=function(t,e,n){var i=e.options.props;if(!r(i)){var a={},s=t.attrs,l=t.props;if(o(s)||o(l))for(var u in i){var c=M(u);le(a,l,u,c,!0)||le(a,s,u,c,!1)}return a}}(e,t);if(a(t.options.functional))return function(t,e,n,r,a){var s=t.options,l={},u=s.props;if(o(u))for(var c in u)l[c]=Nt(c,u,e||i);else o(n.attrs)&&Ee(l,n.attrs),o(n.props)&&Ee(l,n.props);var h=new Le(n,l,a,r,t),p=s.render.call(null,h._c,h);if(p instanceof dt)return Re(p,n,h.parent,s);if(Array.isArray(p)){for(var d=ue(p)||[],f=new Array(d.length),g=0;g<d.length;g++)f[g]=Re(d[g],n,h.parent,s);return f}}(t,d,e,n,s);var f=e.on;if(e.on=e.nativeOn,a(t.options.abstract)){var g=e.slot;e={},g&&(e.slot=g)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<Ne.length;n++){var i=Ne[n],r=e[i],o=Ze[i];r===o||r&&r._merged||(e[i]=r?ze(o,r):o)}}(e);var v=t.options.name||u;return new dt("vue-component-"+t.cid+(v?"-"+v:""),e,void 0,void 0,void 0,n,{Ctor:t,propsData:d,listeners:f,tag:u,children:s},h)}}}function ze(t,e){var n=function(n,i){t(n,i),e(n,i)};return n._merged=!0,n}function Fe(t,e,n,i,r,u){return(Array.isArray(n)||s(n))&&(r=i,i=n,n=void 0),a(u)&&(r=2),function(t,e,n,i,r){if(o(n)&&o(n.__ob__))return gt();if(o(n)&&o(n.is)&&(e=n.is),!e)return gt();var a,s,u;(Array.isArray(i)&&"function"==typeof i[0]&&((n=n||{}).scopedSlots={default:i[0]},i.length=0),2===r?i=ue(i):1===r&&(i=function(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}(i)),"string"==typeof e)?(s=t.$vnode&&t.$vnode.ns||z.getTagNamespace(e),a=z.isReservedTag(e)?new dt(z.parsePlatformTagName(e),n,i,void 0,void 0,t):n&&n.pre||!o(u=Zt(t.$options,"components",e))?new dt(e,n,i,void 0,void 0,t):Be(u,n,t,i,e)):a=Be(e,n,t,i);return Array.isArray(a)?a:o(a)?(o(s)&&We(a,s),o(n)&&function(t){l(t.style)&&ne(t.style),l(t.class)&&ne(t.class)}(n),a):gt()}(t,e,n,i,r)}function We(t,e,n){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,n=!0),o(t.children))for(var i=0,s=t.children.length;i<s;i++){var l=t.children[i];o(l.tag)&&(r(l.ns)||a(n)&&"svg"!==l.tag)&&We(l,e,n)}}var Ve,He=null;function Ue(t,e){return(t.__esModule||at&&"Module"===t[Symbol.toStringTag])&&(t=t.default),l(t)?e.extend(t):t}function Ge(t){return t.isComment&&t.asyncFactory}function Xe(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var n=t[e];if(o(n)&&(o(n.componentOptions)||Ge(n)))return n}}function Ye(t,e){Ve.$on(t,e)}function je(t,e){Ve.$off(t,e)}function $e(t,e){var n=Ve;return function i(){var r=e.apply(null,arguments);null!==r&&n.$off(t,i)}}function qe(t,e,n){Ve=t,ae(e,n||{},Ye,je,$e,t),Ve=void 0}var Ke=null;function Je(t){var e=Ke;return Ke=t,function(){Ke=e}}function Qe(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function tn(t,e){if(e){if(t._directInactive=!1,Qe(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)tn(t.$children[n]);nn(t,"activated")}}function en(t,e){if(!(e&&(t._directInactive=!0,Qe(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)en(t.$children[n]);nn(t,"deactivated")}}function nn(t,e){ht();var n=t.$options[e],i=e+" hook";if(n)for(var r=0,o=n.length;r<o;r++)Vt(n[r],t,null,t,i);t._hasHookEvent&&t.$emit("hook:"+e),pt()}var rn=[],on=[],an={},sn=!1,ln=!1,un=0,cn=0,hn=Date.now;if(U&&!j){var pn=window.performance;pn&&"function"==typeof pn.now&&hn()>document.createEvent("Event").timeStamp&&(hn=function(){return pn.now()})}function dn(){var t,e;for(cn=hn(),ln=!0,rn.sort((function(t,e){return t.id-e.id})),un=0;un<rn.length;un++)(t=rn[un]).before&&t.before(),e=t.id,an[e]=null,t.run();var n=on.slice(),i=rn.slice();un=rn.length=on.length=0,an={},sn=ln=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,tn(t[e],!0)}(n),function(t){for(var e=t.length;e--;){var n=t[e],i=n.vm;i._watcher===n&&i._isMounted&&!i._isDestroyed&&nn(i,"updated")}}(i),it&&z.devtools&&it.emit("flush")}var fn=0,gn=function(t,e,n,i,r){this.vm=t,r&&(t._watcher=this),t._watchers.push(this),i?(this.deep=!!i.deep,this.user=!!i.user,this.lazy=!!i.lazy,this.sync=!!i.sync,this.before=i.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++fn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ot,this.newDepIds=new ot,this.expression="","function"==typeof e?this.getter=e:(this.getter=function(t){if(!V.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=D)),this.value=this.lazy?void 0:this.get()};gn.prototype.get=function(){var t;ht(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;Wt(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ne(t),pt(),this.cleanupDeps()}return t},gn.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},gn.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},gn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(t){var e=t.id;if(null==an[e]){if(an[e]=!0,ln){for(var n=rn.length-1;n>un&&rn[n].id>t.id;)n--;rn.splice(n+1,0,t)}else rn.push(t);sn||(sn=!0,te(dn))}}(this)},gn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||l(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){Wt(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},gn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},gn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},gn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var vn={enumerable:!0,configurable:!0,get:D,set:D};function yn(t,e,n){vn.get=function(){return this[e][n]},vn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,vn)}var mn={lazy:!0};function _n(t,e,n){var i=!nt();"function"==typeof n?(vn.get=i?xn(e):bn(n),vn.set=D):(vn.get=n.get?i&&!1!==n.cache?xn(e):bn(n.get):D,vn.set=n.set||D),Object.defineProperty(t,e,vn)}function xn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),ut.target&&e.depend(),e.value}}function bn(t){return function(){return t.call(this,this)}}function wn(t,e,n,i){return c(n)&&(i=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,i)}var Sn=0;function Tn(t){var e=t.options;if(t.super){var n=Tn(t.super);if(n!==t.superOptions){t.superOptions=n;var i=function(t){var e,n=t.options,i=t.sealedOptions;for(var r in n)n[r]!==i[r]&&(e||(e={}),e[r]=n[r]);return e}(t);i&&A(t.extendOptions,i),(e=t.options=Et(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function Mn(t){this._init(t)}function Cn(t){return t&&(t.Ctor.options.name||t.tag)}function kn(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:(n=t,!("[object RegExp]"!==u.call(n))&&t.test(e));var n}function An(t,e){var n=t.cache,i=t.keys,r=t._vnode;for(var o in n){var a=n[o];if(a){var s=Cn(a.componentOptions);s&&!e(s)&&In(n,o,i,r)}}}function In(t,e,n,i){var r=t[e];!r||i&&r.tag===i.tag||r.componentInstance.$destroy(),t[e]=null,y(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=Sn++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),i=e._parentVnode;n.parent=e.parent,n._parentVnode=i;var r=i.componentOptions;n.propsData=r.propsData,n._parentListeners=r.listeners,n._renderChildren=r.children,n._componentTag=r.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Et(Tn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&qe(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,r=n&&n.context;t.$slots=de(e._renderChildren,r),t.$scopedSlots=i,t._c=function(e,n,i,r){return Fe(t,e,n,i,r,!1)},t.$createElement=function(e,n,i,r){return Fe(t,e,n,i,r,!0)};var o=n&&n.data;Mt(t,"$attrs",o&&o.attrs||i,null,!0),Mt(t,"$listeners",e._parentListeners||i,null,!0)}(e),nn(e,"beforeCreate"),function(t){var e=pe(t.$options.inject,t);e&&(wt(!1),Object.keys(e).forEach((function(n){Mt(t,n,e[n])})),wt(!0))}(e),function(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},i=t._props={},r=t.$options._propKeys=[];t.$parent&&wt(!1);var o=function(o){r.push(o);var a=Nt(o,e,n,t);Mt(i,o,a),o in t||yn(t,"_props",o)};for(var a in e)o(a);wt(!0)}(t,e.props),e.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?D:C(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;c(e=t._data="function"==typeof e?function(t,e){ht();try{return t.call(e,e)}catch(t){return Wt(t,e,"data()"),{}}finally{pt()}}(e,t):e||{})||(e={});for(var n,i=Object.keys(e),r=t.$options.props,o=(t.$options.methods,i.length);o--;){var a=i[o];r&&_(r,a)||(n=void 0,36===(n=(a+"").charCodeAt(0))||95===n)||yn(t,"_data",a)}Tt(e,!0)}(t):Tt(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),i=nt();for(var r in e){var o=e[r],a="function"==typeof o?o:o.get;i||(n[r]=new gn(t,a||D,D,mn)),r in t||_n(t,r,o)}}(t,e.computed),e.watch&&e.watch!==Q&&function(t,e){for(var n in e){var i=e[n];if(Array.isArray(i))for(var r=0;r<i.length;r++)wn(t,n,i[r]);else wn(t,n,i)}}(t,e.watch)}(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),nn(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(Mn),function(t){Object.defineProperty(t.prototype,"$data",{get:function(){return this._data}}),Object.defineProperty(t.prototype,"$props",{get:function(){return this._props}}),t.prototype.$set=Ct,t.prototype.$delete=kt,t.prototype.$watch=function(t,e,n){var i=this;if(c(e))return wn(i,t,e,n);(n=n||{}).user=!0;var r=new gn(i,t,e,n);if(n.immediate)try{e.call(i,r.value)}catch(t){Wt(t,i,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(Mn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var i=this;if(Array.isArray(t))for(var r=0,o=t.length;r<o;r++)i.$on(t[r],n);else(i._events[t]||(i._events[t]=[])).push(n),e.test(t)&&(i._hasHookEvent=!0);return i},t.prototype.$once=function(t,e){var n=this;function i(){n.$off(t,i),e.apply(n,arguments)}return i.fn=e,n.$on(t,i),n},t.prototype.$off=function(t,e){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(t)){for(var i=0,r=t.length;i<r;i++)n.$off(t[i],e);return n}var o,a=n._events[t];if(!a)return n;if(!e)return n._events[t]=null,n;for(var s=a.length;s--;)if((o=a[s])===e||o.fn===e){a.splice(s,1);break}return n},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?k(n):n;for(var i=k(arguments,1),r='event handler for "'+t+'"',o=0,a=n.length;o<a;o++)Vt(n[o],e,i,e,r)}return e}}(Mn),function(t){t.prototype._update=function(t,e){var n=this,i=n.$el,r=n._vnode,o=Je(n);n._vnode=t,n.$el=r?n.__patch__(r,t):n.__patch__(n.$el,t,e,!1),o(),i&&(i.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){nn(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||y(e.$children,t),t._watcher&&t._watcher.teardown();for(var n=t._watchers.length;n--;)t._watchers[n].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),nn(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Mn),function(t){Oe(t.prototype),t.prototype.$nextTick=function(t){return te(t,this)},t.prototype._render=function(){var t,e=this,n=e.$options,i=n.render,r=n._parentVnode;r&&(e.$scopedSlots=ge(r.data.scopedSlots,e.$slots,e.$scopedSlots)),e.$vnode=r;try{He=e,t=i.call(e._renderProxy,e.$createElement)}catch(n){Wt(n,e,"render"),t=e._vnode}finally{He=null}return Array.isArray(t)&&1===t.length&&(t=t[0]),t instanceof dt||(t=gt()),t.parent=r,t}}(Mn);var Dn=[String,RegExp,Array],Pn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Dn,exclude:Dn,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)In(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",(function(e){An(t,(function(t){return kn(e,t)}))})),this.$watch("exclude",(function(e){An(t,(function(t){return!kn(e,t)}))}))},render:function(){var t=this.$slots.default,e=Xe(t),n=e&&e.componentOptions;if(n){var i=Cn(n),r=this.include,o=this.exclude;if(r&&(!i||!kn(r,i))||o&&i&&kn(o,i))return e;var a=this.cache,s=this.keys,l=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;a[l]?(e.componentInstance=a[l].componentInstance,y(s,l),s.push(l)):(a[l]=e,s.push(l),this.max&&s.length>parseInt(this.max)&&In(a,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return z}};Object.defineProperty(t,"config",e),t.util={warn:st,extend:A,mergeOptions:Et,defineReactive:Mt},t.set=Ct,t.delete=kt,t.nextTick=te,t.observable=function(t){return Tt(t),t},t.options=Object.create(null),N.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,A(t.options.components,Pn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Et(this.options,t),this}}(t),function(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,i=n.cid,r=t._Ctor||(t._Ctor={});if(r[i])return r[i];var o=t.name||n.options.name,a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=Et(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)yn(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)_n(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,N.forEach((function(t){a[t]=n[t]})),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=A({},a.options),r[i]=a,a}}(t),function(t){N.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&c(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Mn),Object.defineProperty(Mn.prototype,"$isServer",{get:nt}),Object.defineProperty(Mn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Mn,"FunctionalRenderContext",{value:Le}),Mn.version="2.6.12";var On=g("style,class"),Ln=g("input,textarea,option,select,progress"),Rn=g("contenteditable,draggable,spellcheck"),En=g("events,caret,typing,plaintext-only"),Zn=g("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Nn="http://www.w3.org/1999/xlink",Bn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},zn=function(t){return Bn(t)?t.slice(6,t.length):""},Fn=function(t){return null==t||!1===t};function Wn(t,e){return{staticClass:Vn(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Vn(t,e){return t?e?t+" "+e:t:e||""}function Hn(t){return Array.isArray(t)?function(t){for(var e,n="",i=0,r=t.length;i<r;i++)o(e=Hn(t[i]))&&""!==e&&(n&&(n+=" "),n+=e);return n}(t):l(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var Un={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Gn=g("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Xn=g("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Yn=function(t){return Gn(t)||Xn(t)},jn=Object.create(null),$n=g("text,number,password,search,email,tel,url"),qn=Object.freeze({createElement:function(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(t,e){return document.createElementNS(Un[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),Kn={create:function(t,e){Jn(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Jn(t,!0),Jn(e))},destroy:function(t){Jn(t,!0)}};function Jn(t,e){var n=t.data.ref;if(o(n)){var i=t.context,r=t.componentInstance||t.elm,a=i.$refs;e?Array.isArray(a[n])?y(a[n],r):a[n]===r&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(r)<0&&a[n].push(r):a[n]=[r]:a[n]=r}}var Qn=new dt("",{},[]),ti=["create","activate","update","remove","destroy"];function ei(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&function(t,e){if("input"!==t.tag)return!0;var n,i=o(n=t.data)&&o(n=n.attrs)&&n.type,r=o(n=e.data)&&o(n=n.attrs)&&n.type;return i===r||$n(i)&&$n(r)}(t,e)||a(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function ni(t,e,n){var i,r,a={};for(i=e;i<=n;++i)o(r=t[i].key)&&(a[r]=i);return a}var ii={create:ri,update:ri,destroy:function(t){ri(t,Qn)}};function ri(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,i,r,o=t===Qn,a=e===Qn,s=ai(t.data.directives,t.context),l=ai(e.data.directives,e.context),u=[],c=[];for(n in l)i=s[n],r=l[n],i?(r.oldValue=i.value,r.oldArg=i.arg,li(r,"update",e,t),r.def&&r.def.componentUpdated&&c.push(r)):(li(r,"bind",e,t),r.def&&r.def.inserted&&u.push(r));if(u.length){var h=function(){for(var n=0;n<u.length;n++)li(u[n],"inserted",e,t)};o?se(e,"insert",h):h()}if(c.length&&se(e,"postpatch",(function(){for(var n=0;n<c.length;n++)li(c[n],"componentUpdated",e,t)})),!o)for(n in s)l[n]||li(s[n],"unbind",t,t,a)}(t,e)}var oi=Object.create(null);function ai(t,e){var n,i,r=Object.create(null);if(!t)return r;for(n=0;n<t.length;n++)(i=t[n]).modifiers||(i.modifiers=oi),r[si(i)]=i,i.def=Zt(e.$options,"directives",i.name);return r}function si(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function li(t,e,n,i,r){var o=t.def&&t.def[e];if(o)try{o(n.elm,t,n,i,r)}catch(i){Wt(i,n.context,"directive "+t.name+" "+e+" hook")}}var ui=[Kn,ii];function ci(t,e){var n=e.componentOptions;if(!(o(n)&&!1===n.Ctor.options.inheritAttrs||r(t.data.attrs)&&r(e.data.attrs))){var i,a,s=e.elm,l=t.data.attrs||{},u=e.data.attrs||{};for(i in o(u.__ob__)&&(u=e.data.attrs=A({},u)),u)a=u[i],l[i]!==a&&hi(s,i,a);for(i in(j||q)&&u.value!==l.value&&hi(s,"value",u.value),l)r(u[i])&&(Bn(i)?s.removeAttributeNS(Nn,zn(i)):Rn(i)||s.removeAttribute(i))}}function hi(t,e,n){t.tagName.indexOf("-")>-1?pi(t,e,n):Zn(e)?Fn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Rn(e)?t.setAttribute(e,function(t,e){return Fn(e)||"false"===e?"false":"contenteditable"===t&&En(e)?e:"true"}(e,n)):Bn(e)?Fn(n)?t.removeAttributeNS(Nn,zn(e)):t.setAttributeNS(Nn,e,n):pi(t,e,n)}function pi(t,e,n){if(Fn(n))t.removeAttribute(e);else{if(j&&!$&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var i=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",i)};t.addEventListener("input",i),t.__ieph=!0}t.setAttribute(e,n)}}var di={create:ci,update:ci};function fi(t,e){var n=e.elm,i=e.data,a=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=function(t){for(var e=t.data,n=t,i=t;o(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(e=Wn(i.data,e));for(;o(n=n.parent);)n&&n.data&&(e=Wn(e,n.data));return r=e.staticClass,a=e.class,o(r)||o(a)?Vn(r,Hn(a)):"";var r,a}(e),l=n._transitionClasses;o(l)&&(s=Vn(s,Hn(l))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var gi,vi={create:fi,update:fi};function yi(t,e,n){var i=gi;return function r(){var o=e.apply(null,arguments);null!==o&&xi(t,r,n,i)}}var mi=Xt&&!(J&&Number(J[1])<=53);function _i(t,e,n,i){if(mi){var r=cn,o=e;e=o._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=r||t.timeStamp<=0||t.target.ownerDocument!==document)return o.apply(this,arguments)}}gi.addEventListener(t,e,tt?{capture:n,passive:i}:n)}function xi(t,e,n,i){(i||gi).removeEventListener(t,e._wrapper||e,n)}function bi(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},i=t.data.on||{};gi=e.elm,function(t){if(o(t.__r)){var e=j?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}o(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),ae(n,i,_i,xi,yi,e.context),gi=void 0}}var wi,Si={create:bi,update:bi};function Ti(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,a=e.elm,s=t.data.domProps||{},l=e.data.domProps||{};for(n in o(l.__ob__)&&(l=e.data.domProps=A({},l)),s)n in l||(a[n]="");for(n in l){if(i=l[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=i;var u=r(i)?"":String(i);Mi(a,u)&&(a.value=u)}else if("innerHTML"===n&&Xn(a.tagName)&&r(a.innerHTML)){(wi=wi||document.createElement("div")).innerHTML="<svg>"+i+"</svg>";for(var c=wi.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}else if(i!==s[n])try{a[n]=i}catch(t){}}}}function Mi(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,i=t._vModifiers;if(o(i)){if(i.number)return f(n)!==f(e);if(i.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Ci={create:Ti,update:Ti},ki=x((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var i=t.split(n);i.length>1&&(e[i[0].trim()]=i[1].trim())}})),e}));function Ai(t){var e=Ii(t.style);return t.staticStyle?A(t.staticStyle,e):e}function Ii(t){return Array.isArray(t)?I(t):"string"==typeof t?ki(t):t}var Di,Pi=/^--/,Oi=/\s*!important$/,Li=function(t,e,n){if(Pi.test(e))t.style.setProperty(e,n);else if(Oi.test(n))t.style.setProperty(M(e),n.replace(Oi,""),"important");else{var i=Ei(e);if(Array.isArray(n))for(var r=0,o=n.length;r<o;r++)t.style[i]=n[r];else t.style[i]=n}},Ri=["Webkit","Moz","ms"],Ei=x((function(t){if(Di=Di||document.createElement("div").style,"filter"!==(t=w(t))&&t in Di)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<Ri.length;n++){var i=Ri[n]+e;if(i in Di)return i}}));function Zi(t,e){var n=e.data,i=t.data;if(!(r(n.staticStyle)&&r(n.style)&&r(i.staticStyle)&&r(i.style))){var a,s,l=e.elm,u=i.staticStyle,c=i.normalizedStyle||i.style||{},h=u||c,p=Ii(e.data.style)||{};e.data.normalizedStyle=o(p.__ob__)?A({},p):p;var d=function(t,e){for(var n,i={},r=t;r.componentInstance;)(r=r.componentInstance._vnode)&&r.data&&(n=Ai(r.data))&&A(i,n);(n=Ai(t.data))&&A(i,n);for(var o=t;o=o.parent;)o.data&&(n=Ai(o.data))&&A(i,n);return i}(e);for(s in h)r(d[s])&&Li(l,s,"");for(s in d)(a=d[s])!==h[s]&&Li(l,s,null==a?"":a)}}var Ni={create:Zi,update:Zi},Bi=/\s+/;function zi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Bi).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Fi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Bi).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",i=" "+e+" ";n.indexOf(i)>=0;)n=n.replace(i," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Wi(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&A(e,Vi(t.name||"v")),A(e,t),e}return"string"==typeof t?Vi(t):void 0}}var Vi=x((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Hi=U&&!$,Ui="transition",Gi="animation",Xi="transition",Yi="transitionend",ji="animation",$i="animationend";Hi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Xi="WebkitTransition",Yi="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ji="WebkitAnimation",$i="webkitAnimationEnd"));var qi=U?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Ki(t){qi((function(){qi(t)}))}function Ji(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),zi(t,e))}function Qi(t,e){t._transitionClasses&&y(t._transitionClasses,e),Fi(t,e)}function tr(t,e,n){var i=nr(t,e),r=i.type,o=i.timeout,a=i.propCount;if(!r)return n();var s=r===Ui?Yi:$i,l=0,u=function(){t.removeEventListener(s,c),n()},c=function(e){e.target===t&&++l>=a&&u()};setTimeout((function(){l<a&&u()}),o+1),t.addEventListener(s,c)}var er=/\b(transform|all)(,|$)/;function nr(t,e){var n,i=window.getComputedStyle(t),r=(i[Xi+"Delay"]||"").split(", "),o=(i[Xi+"Duration"]||"").split(", "),a=ir(r,o),s=(i[ji+"Delay"]||"").split(", "),l=(i[ji+"Duration"]||"").split(", "),u=ir(s,l),c=0,h=0;return e===Ui?a>0&&(n=Ui,c=a,h=o.length):e===Gi?u>0&&(n=Gi,c=u,h=l.length):h=(n=(c=Math.max(a,u))>0?a>u?Ui:Gi:null)?n===Ui?o.length:l.length:0,{type:n,timeout:c,propCount:h,hasTransform:n===Ui&&er.test(i[Xi+"Property"])}}function ir(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map((function(e,n){return rr(e)+rr(t[n])})))}function rr(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function or(t,e){var n=t.elm;o(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var i=Wi(t.data.transition);if(!r(i)&&!o(n._enterCb)&&1===n.nodeType){for(var a=i.css,s=i.type,u=i.enterClass,c=i.enterToClass,h=i.enterActiveClass,p=i.appearClass,d=i.appearToClass,g=i.appearActiveClass,v=i.beforeEnter,y=i.enter,m=i.afterEnter,_=i.enterCancelled,x=i.beforeAppear,b=i.appear,w=i.afterAppear,S=i.appearCancelled,T=i.duration,M=Ke,C=Ke.$vnode;C&&C.parent;)M=C.context,C=C.parent;var k=!M._isMounted||!t.isRootInsert;if(!k||b||""===b){var A=k&&p?p:u,I=k&&g?g:h,D=k&&d?d:c,P=k&&x||v,O=k&&"function"==typeof b?b:y,L=k&&w||m,R=k&&S||_,Z=f(l(T)?T.enter:T),N=!1!==a&&!$,B=lr(O),z=n._enterCb=E((function(){N&&(Qi(n,D),Qi(n,I)),z.cancelled?(N&&Qi(n,A),R&&R(n)):L&&L(n),n._enterCb=null}));t.data.show||se(t,"insert",(function(){var e=n.parentNode,i=e&&e._pending&&e._pending[t.key];i&&i.tag===t.tag&&i.elm._leaveCb&&i.elm._leaveCb(),O&&O(n,z)})),P&&P(n),N&&(Ji(n,A),Ji(n,I),Ki((function(){Qi(n,A),z.cancelled||(Ji(n,D),B||(sr(Z)?setTimeout(z,Z):tr(n,s,z)))}))),t.data.show&&(e&&e(),O&&O(n,z)),N||B||z()}}}function ar(t,e){var n=t.elm;o(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var i=Wi(t.data.transition);if(r(i)||1!==n.nodeType)return e();if(!o(n._leaveCb)){var a=i.css,s=i.type,u=i.leaveClass,c=i.leaveToClass,h=i.leaveActiveClass,p=i.beforeLeave,d=i.leave,g=i.afterLeave,v=i.leaveCancelled,y=i.delayLeave,m=i.duration,_=!1!==a&&!$,x=lr(d),b=f(l(m)?m.leave:m),w=n._leaveCb=E((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[t.key]=null),_&&(Qi(n,c),Qi(n,h)),w.cancelled?(_&&Qi(n,u),v&&v(n)):(e(),g&&g(n)),n._leaveCb=null}));y?y(S):S()}function S(){w.cancelled||(!t.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[t.key]=t),p&&p(n),_&&(Ji(n,u),Ji(n,h),Ki((function(){Qi(n,u),w.cancelled||(Ji(n,c),x||(sr(b)?setTimeout(w,b):tr(n,s,w)))}))),d&&d(n,w),_||x||w())}}function sr(t){return"number"==typeof t&&!isNaN(t)}function lr(t){if(r(t))return!1;var e=t.fns;return o(e)?lr(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function ur(t,e){!0!==e.data.show&&or(e)}var cr=function(t){var e,n,i={},l=t.modules,u=t.nodeOps;for(e=0;e<ti.length;++e)for(i[ti[e]]=[],n=0;n<l.length;++n)o(l[n][ti[e]])&&i[ti[e]].push(l[n][ti[e]]);function c(t){var e=u.parentNode(t);o(e)&&u.removeChild(e,t)}function h(t,e,n,r,s,l,c){if(o(t.elm)&&o(l)&&(t=l[c]=yt(t)),t.isRootInsert=!s,!function(t,e,n,r){var s=t.data;if(o(s)){var l=o(t.componentInstance)&&s.keepAlive;if(o(s=s.hook)&&o(s=s.init)&&s(t,!1),o(t.componentInstance))return p(t,e),d(n,t.elm,r),a(l)&&function(t,e,n,r){for(var a,s=t;s.componentInstance;)if(o(a=(s=s.componentInstance._vnode).data)&&o(a=a.transition)){for(a=0;a<i.activate.length;++a)i.activate[a](Qn,s);e.push(s);break}d(n,t.elm,r)}(t,e,n,r),!0}}(t,e,n,r)){var h=t.data,g=t.children,v=t.tag;o(v)?(t.elm=t.ns?u.createElementNS(t.ns,v):u.createElement(v,t),m(t),f(t,g,e),o(h)&&y(t,e),d(n,t.elm,r)):a(t.isComment)?(t.elm=u.createComment(t.text),d(n,t.elm,r)):(t.elm=u.createTextNode(t.text),d(n,t.elm,r))}}function p(t,e){o(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,v(t)?(y(t,e),m(t)):(Jn(t),e.push(t))}function d(t,e,n){o(t)&&(o(n)?u.parentNode(n)===t&&u.insertBefore(t,e,n):u.appendChild(t,e))}function f(t,e,n){if(Array.isArray(e))for(var i=0;i<e.length;++i)h(e[i],n,t.elm,null,!0,e,i);else s(t.text)&&u.appendChild(t.elm,u.createTextNode(String(t.text)))}function v(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return o(t.tag)}function y(t,n){for(var r=0;r<i.create.length;++r)i.create[r](Qn,t);o(e=t.data.hook)&&(o(e.create)&&e.create(Qn,t),o(e.insert)&&n.push(t))}function m(t){var e;if(o(e=t.fnScopeId))u.setStyleScope(t.elm,e);else for(var n=t;n;)o(e=n.context)&&o(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e),n=n.parent;o(e=Ke)&&e!==t.context&&e!==t.fnContext&&o(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e)}function _(t,e,n,i,r,o){for(;i<=r;++i)h(n[i],o,t,e,!1,n,i)}function x(t){var e,n,r=t.data;if(o(r))for(o(e=r.hook)&&o(e=e.destroy)&&e(t),e=0;e<i.destroy.length;++e)i.destroy[e](t);if(o(e=t.children))for(n=0;n<t.children.length;++n)x(t.children[n])}function b(t,e,n){for(;e<=n;++e){var i=t[e];o(i)&&(o(i.tag)?(w(i),x(i)):c(i.elm))}}function w(t,e){if(o(e)||o(t.data)){var n,r=i.remove.length+1;for(o(e)?e.listeners+=r:e=function(t,e){function n(){0==--n.listeners&&c(t)}return n.listeners=e,n}(t.elm,r),o(n=t.componentInstance)&&o(n=n._vnode)&&o(n.data)&&w(n,e),n=0;n<i.remove.length;++n)i.remove[n](t,e);o(n=t.data.hook)&&o(n=n.remove)?n(t,e):e()}else c(t.elm)}function S(t,e,n,i){for(var r=n;r<i;r++){var a=e[r];if(o(a)&&ei(t,a))return r}}function T(t,e,n,s,l,c){if(t!==e){o(e.elm)&&o(s)&&(e=s[l]=yt(e));var p=e.elm=t.elm;if(a(t.isAsyncPlaceholder))o(e.asyncFactory.resolved)?k(t.elm,e,n):e.isAsyncPlaceholder=!0;else if(a(e.isStatic)&&a(t.isStatic)&&e.key===t.key&&(a(e.isCloned)||a(e.isOnce)))e.componentInstance=t.componentInstance;else{var d,f=e.data;o(f)&&o(d=f.hook)&&o(d=d.prepatch)&&d(t,e);var g=t.children,y=e.children;if(o(f)&&v(e)){for(d=0;d<i.update.length;++d)i.update[d](t,e);o(d=f.hook)&&o(d=d.update)&&d(t,e)}r(e.text)?o(g)&&o(y)?g!==y&&function(t,e,n,i,a){for(var s,l,c,p=0,d=0,f=e.length-1,g=e[0],v=e[f],y=n.length-1,m=n[0],x=n[y],w=!a;p<=f&&d<=y;)r(g)?g=e[++p]:r(v)?v=e[--f]:ei(g,m)?(T(g,m,i,n,d),g=e[++p],m=n[++d]):ei(v,x)?(T(v,x,i,n,y),v=e[--f],x=n[--y]):ei(g,x)?(T(g,x,i,n,y),w&&u.insertBefore(t,g.elm,u.nextSibling(v.elm)),g=e[++p],x=n[--y]):ei(v,m)?(T(v,m,i,n,d),w&&u.insertBefore(t,v.elm,g.elm),v=e[--f],m=n[++d]):(r(s)&&(s=ni(e,p,f)),r(l=o(m.key)?s[m.key]:S(m,e,p,f))?h(m,i,t,g.elm,!1,n,d):ei(c=e[l],m)?(T(c,m,i,n,d),e[l]=void 0,w&&u.insertBefore(t,c.elm,g.elm)):h(m,i,t,g.elm,!1,n,d),m=n[++d]);p>f?_(t,r(n[y+1])?null:n[y+1].elm,n,d,y,i):d>y&&b(e,p,f)}(p,g,y,n,c):o(y)?(o(t.text)&&u.setTextContent(p,""),_(p,null,y,0,y.length-1,n)):o(g)?b(g,0,g.length-1):o(t.text)&&u.setTextContent(p,""):t.text!==e.text&&u.setTextContent(p,e.text),o(f)&&o(d=f.hook)&&o(d=d.postpatch)&&d(t,e)}}}function M(t,e,n){if(a(n)&&o(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i<e.length;++i)e[i].data.hook.insert(e[i])}var C=g("attrs,class,staticClass,staticStyle,key");function k(t,e,n,i){var r,s=e.tag,l=e.data,u=e.children;if(i=i||l&&l.pre,e.elm=t,a(e.isComment)&&o(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(o(l)&&(o(r=l.hook)&&o(r=r.init)&&r(e,!0),o(r=e.componentInstance)))return p(e,n),!0;if(o(s)){if(o(u))if(t.hasChildNodes())if(o(r=l)&&o(r=r.domProps)&&o(r=r.innerHTML)){if(r!==t.innerHTML)return!1}else{for(var c=!0,h=t.firstChild,d=0;d<u.length;d++){if(!h||!k(h,u[d],n,i)){c=!1;break}h=h.nextSibling}if(!c||h)return!1}else f(e,u,n);if(o(l)){var g=!1;for(var v in l)if(!C(v)){g=!0,y(e,n);break}!g&&l.class&&ne(l.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,n,s){if(!r(e)){var l,c=!1,p=[];if(r(t))c=!0,h(e,p);else{var d=o(t.nodeType);if(!d&&ei(t,e))T(t,e,p,null,null,s);else{if(d){if(1===t.nodeType&&t.hasAttribute(Z)&&(t.removeAttribute(Z),n=!0),a(n)&&k(t,e,p))return M(e,p,!0),t;l=t,t=new dt(u.tagName(l).toLowerCase(),{},[],void 0,l)}var f=t.elm,g=u.parentNode(f);if(h(e,p,f._leaveCb?null:g,u.nextSibling(f)),o(e.parent))for(var y=e.parent,m=v(e);y;){for(var _=0;_<i.destroy.length;++_)i.destroy[_](y);if(y.elm=e.elm,m){for(var w=0;w<i.create.length;++w)i.create[w](Qn,y);var S=y.data.hook.insert;if(S.merged)for(var C=1;C<S.fns.length;C++)S.fns[C]()}else Jn(y);y=y.parent}o(g)?b([t],0,0):o(t.tag)&&x(t)}}return M(e,p,c),e.elm}o(t)&&x(t)}}({nodeOps:qn,modules:[di,vi,Si,Ci,Ni,U?{create:ur,activate:ur,remove:function(t,e){!0!==t.data.show?ar(t,e):e()}}:{}].concat(ui)});$&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&mr(t,"input")}));var hr={inserted:function(t,e,n,i){"select"===n.tag?(i.elm&&!i.elm._vOptions?se(n,"postpatch",(function(){hr.componentUpdated(t,e,n)})):pr(t,e,n.context),t._vOptions=[].map.call(t.options,gr)):("textarea"===n.tag||$n(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",vr),t.addEventListener("compositionend",yr),t.addEventListener("change",yr),$&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){pr(t,e,n.context);var i=t._vOptions,r=t._vOptions=[].map.call(t.options,gr);r.some((function(t,e){return!L(t,i[e])}))&&(t.multiple?e.value.some((function(t){return fr(t,r)})):e.value!==e.oldValue&&fr(e.value,r))&&mr(t,"change")}}};function pr(t,e,n){dr(t,e),(j||q)&&setTimeout((function(){dr(t,e)}),0)}function dr(t,e,n){var i=e.value,r=t.multiple;if(!r||Array.isArray(i)){for(var o,a,s=0,l=t.options.length;s<l;s++)if(a=t.options[s],r)o=R(i,gr(a))>-1,a.selected!==o&&(a.selected=o);else if(L(gr(a),i))return void(t.selectedIndex!==s&&(t.selectedIndex=s));r||(t.selectedIndex=-1)}}function fr(t,e){return e.every((function(e){return!L(e,t)}))}function gr(t){return"_value"in t?t._value:t.value}function vr(t){t.target.composing=!0}function yr(t){t.target.composing&&(t.target.composing=!1,mr(t.target,"input"))}function mr(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function _r(t){return!t.componentInstance||t.data&&t.data.transition?t:_r(t.componentInstance._vnode)}var xr={model:hr,show:{bind:function(t,e,n){var i=e.value,r=(n=_r(n)).data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;i&&r?(n.data.show=!0,or(n,(function(){t.style.display=o}))):t.style.display=i?o:"none"},update:function(t,e,n){var i=e.value;!i!=!e.oldValue&&((n=_r(n)).data&&n.data.transition?(n.data.show=!0,i?or(n,(function(){t.style.display=t.__vOriginalDisplay})):ar(n,(function(){t.style.display="none"}))):t.style.display=i?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,i,r){r||(t.style.display=t.__vOriginalDisplay)}}},br={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function wr(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?wr(Xe(e.children)):t}function Sr(t){var e={},n=t.$options;for(var i in n.propsData)e[i]=t[i];var r=n._parentListeners;for(var o in r)e[w(o)]=r[o];return e}function Tr(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Mr=function(t){return t.tag||Ge(t)},Cr=function(t){return"show"===t.name},kr={name:"transition",props:br,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Mr)).length){var i=this.mode,r=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return r;var o=wr(r);if(!o)return r;if(this._leaving)return Tr(t,r);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var l=(o.data||(o.data={})).transition=Sr(this),u=this._vnode,c=wr(u);if(o.data.directives&&o.data.directives.some(Cr)&&(o.data.show=!0),c&&c.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(o,c)&&!Ge(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var h=c.data.transition=A({},l);if("out-in"===i)return this._leaving=!0,se(h,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),Tr(t,r);if("in-out"===i){if(Ge(o))return u;var p,d=function(){p()};se(l,"afterEnter",d),se(l,"enterCancelled",d),se(h,"delayLeave",(function(t){p=t}))}}return r}}},Ar=A({tag:String,moveClass:String},br);function Ir(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Dr(t){t.data.newPos=t.elm.getBoundingClientRect()}function Pr(t){var e=t.data.pos,n=t.data.newPos,i=e.left-n.left,r=e.top-n.top;if(i||r){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+i+"px,"+r+"px)",o.transitionDuration="0s"}}delete Ar.mode;var Or={Transition:kr,TransitionGroup:{props:Ar,beforeMount:function(){var t=this,e=this._update;this._update=function(n,i){var r=Je(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,r(),e.call(t,n,i)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),i=this.prevChildren=this.children,r=this.$slots.default||[],o=this.children=[],a=Sr(this),s=0;s<r.length;s++){var l=r[s];l.tag&&null!=l.key&&0!==String(l.key).indexOf("__vlist")&&(o.push(l),n[l.key]=l,(l.data||(l.data={})).transition=a)}if(i){for(var u=[],c=[],h=0;h<i.length;h++){var p=i[h];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?u.push(p):c.push(p)}this.kept=t(e,null,u),this.removed=c}return t(e,null,o)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(Ir),t.forEach(Dr),t.forEach(Pr),this._reflow=document.body.offsetHeight,t.forEach((function(t){if(t.data.moved){var n=t.elm,i=n.style;Ji(n,e),i.transform=i.WebkitTransform=i.transitionDuration="",n.addEventListener(Yi,n._moveCb=function t(i){i&&i.target!==n||i&&!/transform$/.test(i.propertyName)||(n.removeEventListener(Yi,t),n._moveCb=null,Qi(n,e))})}})))},methods:{hasMove:function(t,e){if(!Hi)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((function(t){Fi(n,t)})),zi(n,e),n.style.display="none",this.$el.appendChild(n);var i=nr(n);return this.$el.removeChild(n),this._hasMove=i.hasTransform}}}};Mn.config.mustUseProp=function(t,e,n){return"value"===n&&Ln(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Mn.config.isReservedTag=Yn,Mn.config.isReservedAttr=On,Mn.config.getTagNamespace=function(t){return Xn(t)?"svg":"math"===t?"math":void 0},Mn.config.isUnknownElement=function(t){if(!U)return!0;if(Yn(t))return!1;if(t=t.toLowerCase(),null!=jn[t])return jn[t];var e=document.createElement(t);return t.indexOf("-")>-1?jn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:jn[t]=/HTMLUnknownElement/.test(e.toString())},A(Mn.options.directives,xr),A(Mn.options.components,Or),Mn.prototype.__patch__=U?cr:D,Mn.prototype.$mount=function(t,e){return function(t,e,n){var i;return t.$el=e,t.$options.render||(t.$options.render=gt),nn(t,"beforeMount"),i=function(){t._update(t._render(),n)},new gn(t,i,D,{before:function(){t._isMounted&&!t._isDestroyed&&nn(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,nn(t,"mounted")),t}(this,t=t&&U?function(t){return"string"==typeof t?document.querySelector(t)||document.createElement("div"):t}(t):void 0,e)},U&&setTimeout((function(){z.devtools&&it&&it.emit("init",Mn)}),0);const Lr=Mn},3476:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(r[a]=!0)}for(var s=0;s<t.length;s++){var l=[].concat(t[s]);i&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},994:t=>{"use strict";function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}t.exports=function(t){var n,i,r=(i=4,function(t){if(Array.isArray(t))return t}(n=t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}}(n,i)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r[1],a=r[3];if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),u="/*# ".concat(l," */"),c=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[o].concat(c).concat([u]).join("\n")}return[o].join("\n")}},4134:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(8778),r={};const o=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,e){var n=[];i.S6(r,(function(i,r){var o=i.create(t,e);n=n.concat(o||[])})),this._coordinateSystems=n},t.prototype.update=function(t,e){i.S6(this._coordinateSystems,(function(n){n.update&&n.update(t,e)}))},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,e){r[t]=e},t.get=function(t){return r[t]},t}()},5831:(t,e,n)=>{"use strict";var i=n(8966),r=n(8778),o=n(3442),a=n(2746),s=n(3493),l=n(9312),u=n(9472);const c=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return r.UI(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),r.hX(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}();var h=n(561),p=n(213),d=["x","y"];function f(t){return"interval"===t.type||"time"===t.type}const g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=d,e}return(0,l.ZT)(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(f(t)&&f(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,c=r[0]-n[0]*l,p=r[1]-i[0]*u,d=this._transform=[l,0,0,u,c,p];this._invTransform=(0,h.U_)([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return(0,p.Ne)(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i)),n[1]=a.toGlobalCoord(a.dataToCoord(r)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){if(e=e||[],this._invTransform)return(0,p.Ne)(e,t,this._invTransform);var n=this.getAxis("x"),i=this.getAxis("y");return e[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,o=Math.max(e[0],e[1])-i;return new u.Z(n,i,r,o)},e}(c);var v=n(9199),y=n(9356),m=n(5495),_=(0,m.Yf)();function x(t,e){var n,i,o=b(t,"labels"),a=(0,s.rk)(e);return w(o,a)||(r.mf(a)?n=M(t,a):(i="auto"===a?function(t){var e=_(t).autoInterval;return null!=e?e:_(t).autoInterval=t.calculateCategoryInterval()}(t):a,n=T(t,i)),S(o,a,{labels:n,labelCategoryInterval:i}))}function b(t,e){return _(t)[e]||(_(t)[e]=[])}function w(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function S(t,e,n){return t.push({key:e,value:n}),n}function T(t,e,n){var i=(0,s.J9)(t),r=t.scale,o=r.getExtent(),a=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),c=o[0],h=r.count();0!==c&&u>1&&h/u>2&&(c=Math.round(Math.ceil(c/u)*u));var p=(0,s.WY)(t),d=a.get("showMinLabel")||p,f=a.get("showMaxLabel")||p;d&&c!==o[0]&&v(o[0]);for(var g=c;g<=o[1];g+=u)v(g);function v(t){var e={value:t};l.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return f&&g-u!==o[1]&&v(o[1]),l}function M(t,e,n){var i=t.scale,o=(0,s.J9)(t),a=[];return r.S6(i.getTicks(),(function(t){var r=i.getLabel(t),s=t.value;e(t.value,r)&&a.push(n?s:{formattedLabel:o(t),rawLabel:r,tickValue:s})})),a}var C=[0,1];function k(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}const A=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return(0,l.ZT)(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setCategorySortInfo(t)},e}(function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return(0,v.M9)(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&k(n=n.slice(),i.count()),(0,v.NU)(t,C,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&k(n=n.slice(),i.count());var r=(0,v.NU)(t,n,C,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=function(t,e){return"category"===t.type?function(t,e){var n,i,o=b(t,"ticks"),a=(0,s.rk)(e),l=w(o,a);if(l)return l;if(e.get("show")&&!t.scale.isBlank()||(n=[]),r.mf(a))n=M(t,a,!0);else if("auto"===a){var u=x(t,t.getLabelModel());i=u.labelCategoryInterval,n=r.UI(u.labels,(function(t){return t.tickValue}))}else n=T(t,i=a,!0);return S(o,a,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:r.UI(t.scale.getTicks(),(function(t){return t.value}))}}(this,e).ticks,i=(0,r.UI)(n,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawIndex(t):t),tickValue:t}}),this);return function(t,e,n,i){var o=e.length;if(t.onBand&&!n&&o){var a,s,l=t.getExtent();if(1===o)e[0].coord=l[0],a=e[1]={coord:l[0]};else{var u=e[o-1].tickValue-e[0].tickValue,c=(e[o-1].coord-e[0].coord)/u;(0,r.S6)(e,(function(t){t.coord-=c/2})),s=1+t.scale.getExtent()[1]-e[o-1].tickValue,a={coord:e[o-1].coord+c*s},e.push(a)}var h=l[0]>l[1];p(e[0].coord,l[0])&&(i?e[0].coord=l[0]:e.shift()),i&&p(l[0],e[0].coord)&&e.unshift({coord:l[0]}),p(l[1],a.coord)&&(i?a.coord=l[1]:e.pop()),i&&p(a.coord,l[1])&&e.push({coord:l[1]})}function p(t,e){return t=(0,v.NM)(t),e=(0,v.NM)(e),h?t>e:t<e}}(this,i,e.get("alignWithLabel"),t.clamp),i},t.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");t>0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return(0,r.UI)(e,(function(t){return(0,r.UI)(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return(t=this,"category"===t.type?function(t){var e=t.getLabelModel(),n=x(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=(0,s.J9)(t);return{labels:r.UI(e,(function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)).labels;var t},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=(0,s.J9)(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var l=1;a>40&&(l=Math.max(1,Math.floor(a/40)));for(var u=o[0],c=t.dataToCoord(u+1)-t.dataToCoord(u),h=Math.abs(c*Math.cos(i)),p=Math.abs(c*Math.sin(i)),d=0,f=0;u<=o[1];u+=l){var g,v,m=y.lP(n({value:u}),e.font,"center","top");g=1.3*m.width,v=1.3*m.height,d=Math.max(d,g,7),f=Math.max(f,v,7)}var x=d/h,b=f/p;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(x,b))),S=_(t.model),T=t.getExtent(),M=S.lastAutoInterval,C=S.lastTickCount;return null!=M&&null!=C&&Math.abs(M-w)<=1&&Math.abs(C-a)<=1&&M>w&&S.axisExtent0===T[0]&&S.axisExtent1===T[1]?w=M:(S.lastTickCount=a,S.lastAutoInterval=w,S.axisExtent0=T[0],S.axisExtent1=T[1]),w}(this)},t}());var I=n(4134),D=n(8395),P=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=d,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),(0,r.S6)(n.x,(function(t){(0,s.Jk)(t.scale,t.model)})),(0,r.S6)(n.y,(function(t){(0,s.Jk)(t.scale,t.model)}));var i={};(0,r.S6)(n.x,(function(t){L(n,"y",t,i)})),(0,r.S6)(n.y,(function(t){L(n,"x",t,i)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),o=!n&&t.get("containLabel"),l=(0,a.ME)(i,{width:e.getWidth(),height:e.getHeight()});this._rect=l;var u=this._axesList;function c(){(0,r.S6)(u,(function(t){var e=t.isHorizontal(),n=e?[0,l.width]:[0,l.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?l.x:l.y)}))}c(),o&&((0,r.S6)(u,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=(0,s.Do)(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);l[n]-=e[n]+i,"top"===t.position?l.y+=e.height+i:"left"===t.position&&(l.x+=e.width+i)}}})),c()),(0,r.S6)(this._coordsList,(function(t){t.calcAffineTransform()}))},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n)return n[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}(0,r.Kn)(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,o=this._coordsList;i<o.length;i++)if(o[i].getAxis("x").index===t||o[i].getAxis("y").index===e)return o[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(t){var e,n,i=t.seriesModel,o=t.xAxisModel||i&&i.getReferringComponents("xAxis",m.C6).models[0],a=t.yAxisModel||i&&i.getReferringComponents("yAxis",m.C6).models[0],s=t.gridModel,l=this._coordsList;return i?(e=i.coordinateSystem,(0,r.cq)(l,e)<0&&(e=null)):o&&a?e=this.getCartesian(o.componentIndex,a.componentIndex):o?n=this.getAxis("x",o.componentIndex):a?n=this.getAxis("y",a.componentIndex):s&&s.coordinateSystem===this&&(e=this._coordsList[0]),{cartesian:e,axis:n}},t.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},t.prototype._initCartesian=function(t,e,n){var i=this,o=this,a={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},u={x:0,y:0};if(e.eachComponent("xAxis",c("x"),this),e.eachComponent("yAxis",c("y"),this),!u.x||!u.y)return this._axesMap={},void(this._axesList=[]);function c(e){return function(n,i){if(O(n,t)){var r=n.get("position");"x"===e?"top"!==r&&"bottom"!==r&&(r=a.bottom?"top":"bottom"):"left"!==r&&"right"!==r&&(r=a.left?"right":"left"),a[r]=!0;var c=new A(e,(0,s.aG)(n),[0,0],n.get("type"),r),h="category"===c.type;c.onBand=h&&n.get("boundaryGap"),c.inverse=n.get("inverse"),n.axis=c,c.model=n,c.grid=o,c.index=i,o._axesList.push(c),l[e][i]=c,u[e]++}}}this._axesMap=l,(0,r.S6)(l.x,(function(e,n){(0,r.S6)(l.y,(function(r,o){var a="x"+n+"y"+o,s=new g(a);s.master=i,s.model=t,i._coordsMap[a]=s,i._coordsList.push(s),s.addAxis(e),s.addAxis(r)}))}))},t.prototype._updateScale=function(t,e){function n(t,e){(0,r.S6)((0,s.PY)(t,e.dim),(function(n){e.scale.unionExtentFromData(t,n)}))}(0,r.S6)(this._axesList,(function(t){if(t.scale.setExtent(1/0,-1/0),"category"===t.type){var e=t.model.get("categorySortInfo");t.scale.setCategorySortInfo(e)}})),t.eachSeries((function(t){if((0,D.Yh)(t)){var i=(0,D.Mk)(t),r=i.xAxisModel,o=i.yAxisModel;if(!O(r,e)||!O(o,e))return;var a=this.getCartesian(r.componentIndex,o.componentIndex),s=t.getData(),l=a.getAxis("x"),u=a.getAxis("y");"list"===s.type&&(n(s,l),n(s,u))}}),this)},t.prototype.getTooltipAxes=function(t){var e=[],n=[];return(0,r.S6)(this.getCartesians(),(function(i){var o=null!=t&&"auto"!==t?i.getAxis(t):i.getBaseAxis(),a=i.getOtherAxis(o);(0,r.cq)(e,o)<0&&e.push(o),(0,r.cq)(n,a)<0&&n.push(a)})),{baseAxes:e,otherAxes:n}},t.create=function(e,n){var i=[];return e.eachComponent("grid",(function(r,o){var a=new t(r,e,n);a.name="grid_"+o,a.resize(r,n,!0),r.coordinateSystem=a,i.push(a)})),e.eachSeries((function(t){if((0,D.Yh)(t)){var e=(0,D.Mk)(t),n=e.xAxisModel,i=e.yAxisModel,r=n.getCoordSysModel().coordinateSystem;t.coordinateSystem=r.getCartesian(n.componentIndex,i.componentIndex)}})),i},t.dimensions=d,t}();function O(t,e){return t.getCoordSysModel()===e}function L(t,e,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=t[e],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)R(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&R(o[u])&&!i[c(o[u])]){r=o[u];break}r&&(i[c(r)]=!0)}function c(t){return t.dim+"_"+t.index}}function R(t){return t&&"category"!==t.type&&"time"!==t.type&&(0,s.Yb)(t)}I.Z.register("cartesian2d",P);var E=n(4689),Z=n(2069),N=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,l.ZT)(e,t),e.prototype.getInitialData=function(t,e){return(0,Z.Z)(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(E.Z);E.Z.registerClass(N);const B=N;var z=n(4053),F=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,l.ZT)(e,t),e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=(0,z.ZL)(B.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:"#212121"}},realtimeSort:!1}),e}(B);E.Z.registerClass(F);var W=n(391),V=n(6454),H=n(3696),U=n(1563),G=n(106),X=n(5628),Y=n(4013),j=n(823),$=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0};const q=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return(0,l.ZT)(e,t),e.prototype.getDefaultShape=function(){return new $},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,c=e.clockwise,h=Math.cos(l),p=Math.sin(l),d=Math.cos(u),f=Math.sin(u);(c?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(h*r+n,p*r+i),t.arc(h*s+n,p*s+i,a,-Math.PI+l,l,!c)),t.arc(n,i,o,l,u,!c),t.moveTo(d*o+n,f*o+i),t.arc(d*s+n,f*s+i,a,u-2*Math.PI,u-Math.PI,!c),0!==r&&(t.arc(n,i,r,u,l,c),t.moveTo(h*r+n,f*r+i)),t.closePath()},e}(H.Path);var K=n(2916),J=n(5320),Q=n(4510),tt=["itemStyle","borderWidth"],et=["itemStyle","borderRadius"],nt=[0,0],it=Math.max,rt=Math.min,ot=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return(0,l.ZT)(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this.removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var r,o=this,a=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis();"cartesian2d"===u.type?r=c.isHorizontal():"polar"===u.type&&(r="angle"===c.dim);var h=t.isAnimationEnabled()?t:null,p=c.model,d=t.get("realtimeSort");if(d&&s.count()){if(this._isFirstFrame)return this._initSort(s,r,c,n),void(this._isFirstFrame=!1);this._onRendered=function(){o._updateSort(s,(function(t){var e=s.getItemGraphicEl(t);if(e){var n=e.shape;return(r?n.y+n.height:n.x+n.width)||0}return 0}),c,n)},n.getZr().on("rendered",this._onRendered)}var f=t.get("clip",!0)||d,g=function(t,e){var n=t.getArea&&t.getArea();if((0,J.H)(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(u,s);a.removeClipPath();var v=t.get("roundCap",!0),y=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),_=m.get("borderRadius")||0,x=[],b=this._backgroundEls,w=i&&i.isInitSort,S=i&&"changeAxisOrder"===i.type;function T(t){var e=ut[u.type](s,t),n=function(t,e,n){return new("polar"===t.type?H.Sector:H.Rect)({shape:gt(e,n,t),silent:!0,z2:0})}(u,r,e);return n.useStyle(m.getItemStyle()),"cartesian2d"===u.type&&n.setShape("r",_),x[t]=n,n}s.diff(l).add((function(e){var n=s.getItemModel(e),i=ut[u.type](s,e,n);if(y&&T(e),s.hasValue(e)){var o=!1;f&&(o=at[u.type](g,i));var l=st[u.type](t,s,e,i,r,h,c.model,!1,v);ct(l,s,e,n,i,t,r,"polar"===u.type),w?l.attr({shape:i}):d?lt(t,p,h,l,i,e,r,!1,!1):(0,H.initProps)(l,{shape:i},t,e),s.setItemGraphicEl(e,l),a.add(l),l.ignore=o}})).update((function(e,n){var i=s.getItemModel(e),o=ut[u.type](s,e,i);if(y){var M=void 0;0===b.length?M=T(n):((M=b[n]).useStyle(m.getItemStyle()),"cartesian2d"===u.type&&M.setShape("r",_),x[e]=M);var C=ut[u.type](s,e),k=gt(r,C,u);(0,H.updateProps)(M,{shape:k},h,e)}var A=l.getItemGraphicEl(n);if(!s.hasValue(e))return a.remove(A),void(A=null);var I=!1;f&&(I=at[u.type](g,o))&&a.remove(A),A||(A=st[u.type](t,s,e,o,r,h,c.model,!!A,v)),S||ct(A,s,e,i,o,t,r,"polar"===u.type),w?A.attr({shape:o}):d?lt(t,p,h,A,o,e,r,!0,S):(0,H.updateProps)(A,{shape:o},t,e,null),s.setItemGraphicEl(e,A),A.ignore=I,a.add(A)})).remove((function(e){var n=l.getItemGraphicEl(e);n&&(0,H.removeElementWithFadeOut)(n,t,e)})).execute();var M=this._backgroundGroup||(this._backgroundGroup=new V.Z);M.removeAll();for(var C=0;C<x.length;++C)M.add(x[C]);a.add(M),this._backgroundEls=x,this._data=s},e.prototype._renderLarge=function(t,e,n){this._clear(),dt(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,e){this._removeBackground(),dt(e,this.group,!0)},e.prototype._updateLargeClip=function(t){var e=t.get("clip",!0)?(0,j.lQ)(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._dataSort=function(t,e){var n=[];t.each((function(t){n.push({mappedValue:e(t),ordinalNumber:t,beforeSortIndex:null})})),n.sort((function(t,e){return e.mappedValue-t.mappedValue}));for(var i=0;i<n.length;++i)n[n[i].ordinalNumber].beforeSortIndex=i;return(0,r.UI)(n,(function(t){return{ordinalNumber:t.ordinalNumber,beforeSortIndex:t.beforeSortIndex}}))},e.prototype._isDataOrderChanged=function(t,e,n){if((n?n.length:0)!==t.count())return!0;for(var i=Number.MAX_VALUE,r=0;r<n.length;++r){var o=e(n[r].ordinalNumber);if(o>i)return!0;i=o}return!1},e.prototype._updateSort=function(t,e,n,i){var r=n.scale.getCategorySortInfo();if(this._isDataOrderChanged(t,e,r))for(var o=this._dataSort(t,e),a=n.scale.getExtent(),s=a[0];s<a[1];++s)if(!r[s]||r[s].ordinalNumber!==o[s].ordinalNumber){this.removeOnRenderedListener(i);var l={type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o};i.dispatchAction(l);break}},e.prototype._initSort=function(t,e,n,i){var r={type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:this._dataSort(t,(function(n){return parseFloat(t.get(e?"y":"x",n))||0}))};i.dispatchAction(r)},e.prototype.remove=function(t,e){this._clear(this._model),this.removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this.removeOnRenderedListener(e)},e.prototype.removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){(0,H.removeElementWithFadeOut)(e,t,(0,U.A)(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(K.Z),at={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=it(e.x,t.x),o=rt(e.x+e.width,t.x+t.width),a=it(e.y,t.y),s=rt(e.y+e.height,t.y+t.height);e.x=r,e.y=a,e.width=o-r,e.height=s-a;var l=e.width<0||e.height<0;return n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=rt(e.r,t.r),o=it(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;return n<0&&(i=e.r,e.r=e.r0,e.r0=i),a}},st={cartesian2d:function(t,e,n,i,o,a,s,l,u){var c=new H.Rect({shape:(0,r.l7)({},i),z2:1});return c.__dataIndex=n,c.name="item",a&&(c.shape[o?"height":"width"]=0),c},polar:function(t,e,n,i,o,a,s,l,u){var c=i.startAngle<i.endAngle,h=new(!o&&u?q:H.Sector)({shape:(0,r.ce)({clockwise:c},i),z2:1});if(h.name="item",a){var p=o?"r":"endAngle",d={};h.shape[p]=o?0:i.startAngle,d[p]=i[p],(l?H.updateProps:H.initProps)(h,{shape:d},a)}return h}};function lt(t,e,n,i,r,o,a,s,l){if(n||e){var u=void 0,c=void 0;a?(c={x:r.x,width:r.width},u={y:r.y,height:r.height}):(c={y:r.y,height:r.height},u={x:r.x,width:r.width}),l||(s?H.updateProps:H.initProps)(i,{shape:u},t,o,null),(s?H.updateProps:H.initProps)(i,{shape:c},e,o)}}var ut={cartesian2d:function(t,e,n){var i=t.getItemLayout(e),r=n?function(t,e){var n=t.get(tt)||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),r=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,r)}(n,i):0,o=i.width>0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function ct(t,e,n,i,o,a,s,l){var u=e.getItemVisual(n,"style");l||t.setShape("r",i.get(et)||0),t.useStyle(u);var c=i.getShallow("cursor");if(c&&t.attr("cursor",c),!l){var h=s?o.height>0?"bottom":"top":o.width>0?"left":"right",p=(0,X.k3)(i);(0,X.ni)(t,p,{labelFetcher:a,labelDataIndex:n,defaultText:(0,Q.H)(a.getData(),n),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:h});var d=t.getTextContent();(0,X.pe)(d,p,a.getRawValue(n),(function(t){return(0,Q.O)(e,t)}))}var f=i.getModel(["emphasis"]);(0,G.vF)(t,f.get("focus"),f.get("blurScope")),(0,G.WO)(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(o)&&(t.style.fill="none",t.style.stroke="none",(0,r.S6)(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var ht=function(){},pt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return(0,l.ZT)(e,t),e.prototype.getDefaultShape=function(){return new ht},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,o=0;o<n.length;o+=2)i[r]=n[o+r],t.moveTo(i[0],i[1]),t.lineTo(n[o],n[o+1])},e}(W.ZP);function dt(t,e,n){var i=t.getData(),o=[],a=i.getLayout("valueAxisHorizontal")?1:0;o[1-a]=i.getLayout("valueAxisStart");var s=i.getLayout("largeDataIndices"),l=i.getLayout("barWidth"),u=t.getModel("backgroundStyle");if(t.get("showBackground",!0)){var c=i.getLayout("largeBackgroundPoints"),h=[];h[1-a]=i.getLayout("backgroundStart");var p=new pt({shape:{points:c},incremental:!!n,silent:!0,z2:0});p.__startPoint=h,p.__baseDimIdx=a,p.__largeDataIndices=s,p.__barWidth=l,function(t,e,n){var i=e.get("borderColor")||e.get("color"),r=e.getItemStyle();t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}(p,u,i),e.add(p)}var d=new pt({shape:{points:i.getLayout("largePoints")},incremental:!!n});d.__startPoint=o,d.__baseDimIdx=a,d.__largeDataIndices=s,d.__barWidth=l,e.add(d),function(t,e,n){var i=n.getVisual("style");t.useStyle((0,r.l7)({},i)),t.style.fill=null,t.style.stroke=i.fill,t.style.lineWidth=n.getLayout("barWidth")}(d,0,i),(0,U.A)(d).seriesIndex=t.seriesIndex,t.get("silent")||(d.on("mousedown",ft),d.on("mousemove",ft))}var ft=(0,Y.P2)((function(t){var e=function(t,e,n){var i=t.__baseDimIdx,r=1-i,o=t.shape.points,a=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[r];nt[0]=e,nt[1]=n;for(var u=nt[i],c=nt[1-i],h=u-s,p=u+s,d=0,f=o.length/2;d<f;d++){var g=2*d,v=o[g+i],y=o[g+r];if(v>=h&&v<=p&&(l<=y?c>=l&&c<=y:c>=y&&c<=l))return a[d]}return-1}(this,t.offsetX,t.offsetY);(0,U.A)(this).dataIndex=e>=0?e:null}),30,!1);function gt(t,e,n){if((0,J.H)(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}K.Z.registerClass(ot),i.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},(function(e){t.sortInfo&&e.axis.setCategorySortInfo(t.sortInfo)}))})),n(5826);var vt=n(6774);i.registerLayout(i.PRIORITY.VISUAL.LAYOUT,r.WA(o.bK,"bar")),i.registerLayout(i.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,o.kY),i.registerVisual({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}}),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,(0,vt.Z)("bar"))},823:(t,e,n)=>{"use strict";n.d(e,{ID:()=>o,X0:()=>a,lQ:()=>s});var i=n(3696),r=n(9199);function o(t,e,n,r,o){var a=t.getArea(),s=a.x,l=a.y,u=a.width,c=a.height,h=n.get(["lineStyle","width"])||2;s-=h/2,l-=h/2,u+=h,c+=h,s=Math.floor(s),u=Math.round(u);var p=new i.Rect({shape:{x:s,y:l,width:u,height:c}});if(e){var d=t.getBaseAxis(),f=d.isHorizontal(),g=d.inverse;f?(g&&(p.shape.x+=u),p.shape.width=0):(g||(p.shape.y+=c),p.shape.height=0);var v="function"==typeof o?function(t){o(t,p)}:null;i.initProps(p,{shape:{width:u,height:c,x:s,y:l}},n,null,r,v)}return p}function a(t,e,n){var o=t.getArea(),a=(0,r.NM)(o.r0,1),s=(0,r.NM)(o.r,1),l=new i.Sector({shape:{cx:(0,r.NM)(t.cx,1),cy:(0,r.NM)(t.cy,1),r0:a,r:s,startAngle:o.startAngle,endAngle:o.endAngle,clockwise:o.clockwise}});return e&&("angle"===t.getBaseAxis().dim?l.shape.endAngle=o.startAngle:l.shape.r=a,i.initProps(l,{shape:{endAngle:o.endAngle,r:s}},n)),l}function s(t,e,n,i,r){return t?"polar"===t.type?a(t,e,n):"cartesian2d"===t.type?o(t,e,n,i,r):null:null}},2069:(t,e,n)=>{"use strict";n.d(e,{Z:()=>X});var i=n(8778),r=n(4708),o=n(7586),a=n(1245),s=n(7252);function l(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}const u=function(t){this.otherDims={},null!=t&&i.l7(this,t)};var c,h,p,d,f,g,v,y,m,_,x,b,w,S,T=n(5495),M=n(1563),C=n(5294),k=n(7158),A=Math.floor,I=i.Kn,D=i.UI,P="undefined",O={float:typeof Float64Array===P?Array:Float64Array,int:typeof Int32Array===P?Array:Int32Array,ordinal:Array,number:Array,time:Array},L=typeof Uint32Array===P?Array:Uint32Array,R=typeof Int32Array===P?Array:Int32Array,E=typeof Uint16Array===P?Array:Uint16Array,Z=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx","_nameRepeatCount"],N=["_extent","_approximateExtent","_rawExtent"];const B=function(){function t(t,e){this.type="list",this._count=0,this._rawCount=0,this._storage={},this._storageArr=[],this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._rawExtent={},this._extent={},this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!0,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"],this.getRawIndex=f,t=t||["x","y"];for(var n={},r=[],o={},a=0;a<t.length;a++){var c=t[a],h=i.HD(c)?new u({name:c}):c instanceof u?c:new u(c),p=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=p,h.coordDimIndex=0);var d=h.otherDims=h.otherDims||{};r.push(p),n[p]=h,h.index=a,h.createInvertedIndices&&(o[p]=[]),0===d.itemName&&(this._nameDimIdx=a,this._nameOrdinalMeta=h.ordinalMeta),0===d.itemId&&(this._idDimIdx=a,this._idOrdinalMeta=h.ordinalMeta)}this.dimensions=r,this._dimensionInfos=n,this.hostModel=e,this._dimensionsSummary=function(t){var e={},n=e.encode={},r=(0,i.kW)(),o=[],a=[],u=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};(0,i.S6)(t.dimensions,(function(e){var i,c=t.getDimensionInfo(e),h=c.coordDim;if(h){var p=c.coordDimIndex;l(n,h)[p]=e,c.isExtraCoord||(r.set(h,1),"ordinal"!==(i=c.type)&&"time"!==i&&(o[0]=e),l(u.encode,h)[p]=c.index),c.defaultTooltip&&a.push(e)}s.f7.each((function(t,e){var i=l(n,e),r=c.otherDims[e];null!=r&&!1!==r&&(i[r]=c.name)}))}));var c=[],h={};r.each((function(t,e){var i=n[e];h[e]=i[0],c=c.concat(i)})),e.dataDimsOnCoord=c,e.encodeFirstDimNotExtra=h;var p=n.label;p&&p.length&&(o=p.slice());var d=n.tooltip;return d&&d.length?a=d.slice():a.length||(a=o.slice()),n.defaultedLabel=o,n.defaultedTooltip=a,e}(this),this._invertedIndicesMap=o,this.userOutput=this._dimensionsSummary.userOutput}return t.prototype.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},t.prototype.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},t.prototype.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[e]:null},t.prototype.mapDimensionsAll=function(t){return(this._dimensionsSummary.encode[t]||[]).slice()},t.prototype.initData=function(t,e,n){var r=(0,k.Ld)(t)||i.zG(t)?new a.Pl(t,this.dimensions.length):t;this._rawData=r;var o=r.getSource().sourceFormat;this._storage={},this._indices=null,this._dontMakeIdFromName=null!=this._idDimIdx||o===s.J5||!!r.fillStorage,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=c[o],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=c.arrayRows,this._rawExtent={},this._initDataFromProvider(0,r.count()),r.pure&&(this.hasItemOption=!1)},t.prototype.getProvider=function(){return this._rawData},t.prototype.appendData=function(t){var e=this._rawData,n=this.count();e.appendData(t);var i=e.count();e.persistent||(i+=n),this._initDataFromProvider(n,i,!0)},t.prototype.appendValues=function(t,e){for(var n=this._storage,i=this.dimensions,r=i.length,o=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e?e.length:0),l=0;l<r;l++){var u=i[l];o[u]||(o[u]=b()),d(n,this._dimensionInfos[u],s,!0)}for(var c=D(i,(function(t){return o[t]})),p=this._storageArr=D(i,(function(t){return n[t]})),f=[],g=a;g<s;g++){for(var v=g-a,y=0;y<r;y++){u=i[y];var _=this._dimValueGetterArrayRows(t[v]||f,u,v,y);p[y][g]=_;var x=c[y];_<x[0]&&(x[0]=_),_>x[1]&&(x[1]=_)}e&&(this._nameList[g]=e[v],this._dontMakeIdFromName||m(this,g))}this._rawCount=this._count=s,this._extent={},h(this)},t.prototype._initDataFromProvider=function(t,e,n){if(!(t>=e)){for(var i=this._rawData,r=this._storage,o=this.dimensions,a=o.length,l=this._dimensionInfos,u=this._nameList,c=this._idList,p=this._rawExtent,f=i.getSource().sourceFormat===s.cy,g=0;g<a;g++){var v=o[g];p[v]||(p[v]=b()),d(r,l[v],e,n)}var y=this._storageArr=D(o,(function(t){return r[t]})),_=D(o,(function(t){return p[t]}));if(i.fillStorage)i.fillStorage(t,e,y,_);else for(var x=[],w=t;w<e;w++){x=i.getItem(w,x);for(var S=0;S<a;S++){v=o[S];var M=y[S],C=this._dimValueGetter(x,v,w,S);M[w]=C;var k=_[S];C<k[0]&&(k[0]=C),C>k[1]&&(k[1]=C)}if(f&&!i.pure&&x){var A=x.name;null==u[w]&&null!=A&&(u[w]=(0,T.U5)(A,null));var I=x.id;null==c[w]&&null!=I&&(c[w]=(0,T.U5)(I,null))}this._dontMakeIdFromName||m(this,w)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},h(this)}},t.prototype.count=function(){return this._count},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r<i;r++)t[r]=e[r]}else t=new n(e.buffer,0,i)}else for(t=new(n=p(this))(this.count()),r=0;r<t.length;r++)t[r]=r;return t},t.prototype.getByDimIdx=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._storageArr[t];return n?n[this.getRawIndex(e)]:NaN},t.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._storage[t];return n?n[this.getRawIndex(e)]:NaN},t.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._storage[t];return n?n[e]:NaN},t.prototype.getValues=function(t,e){var n=[];i.kJ(t)||(e=t,t=this.dimensions);for(var r=0,o=t.length;r<o;r++)n.push(this.get(t[r],e));return n},t.prototype.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this.get(e[n],t)))return!1;return!0},t.prototype.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=b();if(!e)return n;var i,r=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var o=(i=n)[0],a=i[1],s=0;s<r;s++){var l=e[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){I(t)?i.l7(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n<i;n++){var r=this.get(t,n);isNaN(r)||(e+=r)}return e},t.prototype.getMedian=function(t){var e=[];this.each(t,(function(t){isNaN(t)||e.push(t)}));var n=e.sort((function(t,e){return t-e})),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.rawIndexOf=function(t,e){var n=(t&&this._invertedIndicesMap[t])[e];return null==n||isNaN(n)?-1:n},t.prototype.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},t.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,r=this._count-1;i<=r;){var o=(i+r)/2|0;if(e[o]<t)i=o+1;else{if(!(e[o]>t))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=e-i[this.getRawIndex(l)],h=Math.abs(c);h<=n&&((h<o||h===o&&c>=0&&a<0)&&(o=h,a=c,s=0),c===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},t.prototype.getName=function(t){var e=this.getRawIndex(t),n=this._nameList[e];return null==n&&null!=this._nameDimIdx&&(n=y(this,this._nameDimIdx,this._nameOrdinalMeta,e)),null==n&&(n=""),n},t.prototype.getId=function(t){return v(this,this.getRawIndex(t))},t.prototype.each=function(t,e,n,i){var r=this;if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]);for(var o=n||i||this,a=D(_(t),this.getDimension,this),s=a.length,l=D(a,(function(t){return r._dimensionInfos[t].index})),u=this._storageArr,c=0,h=this.count();c<h;c++){var p=this.getRawIndex(c);switch(s){case 0:e.call(o,c);break;case 1:e.call(o,u[l[0]][p],c);break;case 2:e.call(o,u[l[0]][p],u[l[1]][p],c);break;default:for(var d=0,f=[];d<s;d++)f[d]=u[l[d]][p];f[d]=c,e.apply(o,f)}}}},t.prototype.filterSelf=function(t,e,n,i){var r=this;if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]);for(var o=n||i||this,a=D(_(t),this.getDimension,this),s=this.count(),l=new(p(this))(s),u=[],c=a.length,h=0,d=D(a,(function(t){return r._dimensionInfos[t].index})),v=d[0],y=this._storageArr,m=0;m<s;m++){var x=void 0,b=this.getRawIndex(m);if(0===c)x=e.call(o,m);else if(1===c){var w=y[v][b];x=e.call(o,w,m)}else{for(var S=0;S<c;S++)u[S]=y[d[S]][b];u[S]=m,x=e.apply(o,u)}x&&(l[h++]=b)}return h<s&&(this._indices=l),this._count=h,this._extent={},this.getRawIndex=this._indices?g:f,this}},t.prototype.selectRange=function(t){var e=this,n=this._count;if(n){var i=[];for(var r in t)t.hasOwnProperty(r)&&i.push(r);var o=i.length;if(o){var a=this.count(),s=new(p(this))(a),l=0,u=i[0],c=D(i,(function(t){return e._dimensionInfos[t].index})),h=t[u][0],d=t[u][1],v=this._storageArr,y=!1;if(!this._indices){var m=0;if(1===o){for(var _=v[c[0]],x=0;x<n;x++)((T=_[x])>=h&&T<=d||isNaN(T))&&(s[l++]=m),m++;y=!0}else if(2===o){_=v[c[0]];var b=v[c[1]],w=t[i[1]][0],S=t[i[1]][1];for(x=0;x<n;x++){var T=_[x],M=b[x];(T>=h&&T<=d||isNaN(T))&&(M>=w&&M<=S||isNaN(M))&&(s[l++]=m),m++}y=!0}}if(!y)if(1===o)for(x=0;x<a;x++){var C=this.getRawIndex(x);((T=v[c[0]][C])>=h&&T<=d||isNaN(T))&&(s[l++]=C)}else for(x=0;x<a;x++){for(var k=!0,A=(C=this.getRawIndex(x),0);A<o;A++){var I=i[A];((T=v[c[A]][C])<t[I][0]||T>t[I][1])&&(k=!1)}k&&(s[l++]=this.getRawIndex(x))}return l<a&&(this._indices=s),this._count=l,this._extent={},this.getRawIndex=this._indices?g:f,this}}},t.prototype.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,(function(){r.push(e&&e.apply(this,arguments))}),n),r},t.prototype.map=function(t,e,n,i){var r=n||i||this,o=D(_(t),this.getDimension,this),a=x(this,o),s=a._storage;a._indices=this._indices,a.getRawIndex=a._indices?g:f;for(var l=[],u=o.length,c=this.count(),h=[],p=a._rawExtent,d=0;d<c;d++){for(var v=0;v<u;v++)h[v]=this.get(o[v],d);h[u]=d;var y=e&&e.apply(r,h);if(null!=y){"object"!=typeof y&&(l[0]=y,y=l);for(var m=this.getRawIndex(d),b=0;b<y.length;b++){var w=o[b],S=y[b],T=p[w],M=s[w];M&&(M[m]=S),S<T[0]&&(T[0]=S),S>T[1]&&(T[1]=S)}}}return a},t.prototype.downSample=function(t,e,n,i){for(var r=x(this,[t]),o=r._storage,a=[],s=A(1/e),l=o[t],u=this.count(),c=r._rawExtent[t],h=new(p(this))(u),d=0,f=0;f<u;f+=s){s>u-f&&(s=u-f,a.length=s);for(var v=0;v<s;v++){var y=this.getRawIndex(f+v);a[v]=l[y]}var m=n(a),_=this.getRawIndex(Math.min(f+i(a,m)||0,u-1));l[_]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),h[d++]=_}return r._count=d,r._indices=h,r.getRawIndex=g,r},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=x(this,[]),a=o._storage[t],s=this.count(),l=new(p(this))(s),u=0,c=A(1/e),h=this.getRawIndex(0);l[u++]=h;for(var d=1;d<s-1;d+=c){for(var f=Math.min(d+c,s-1),v=Math.min(d+2*c,s),y=(v+f)/2,m=0,_=f;_<v;_++){var b=a[C=this.getRawIndex(_)];isNaN(b)||(m+=b)}m/=v-f;var w=d,S=Math.min(d+c,s),T=d-1,M=a[h];for(n=-1,r=w,_=w;_<S;_++){var C;b=a[C=this.getRawIndex(_)],isNaN(b)||(i=Math.abs((T-y)*(b-M)-(T-_)*(m-M)))>n&&(n=i,r=C)}l[u++]=r,h=r}return l[u++]=this.getRawIndex(s-1),o._count=u,o._indices=l,o.getRawIndex=g,o},t.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new r.Z(n,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new o.Z(t?t.getIndices():[],this.getIndices(),(function(e){return v(t,e)}),(function(t){return v(e,t)}))},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},I(t)?i.l7(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return null==i?this.getVisual(e):i},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,r=n[t];r||(r=n[t]={});var o=r[e];return null==o&&(o=this.getVisual(e),i.kJ(o)?o=o.slice():I(o)&&(o=i.l7({},o)),r[e]=o),o},t.prototype.setItemVisual=function(t,e,n){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,I(e)?i.l7(r,e):r[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){if(I(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?i.l7(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel;if(e){var i=(0,M.A)(e);i.dataIndex=t,i.dataType=this.dataType,i.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(w,e)}this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){i.S6(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){if(e||(e=new t(D(this.dimensions,this.getDimensionInfo,this),this.hostModel)),e._storage=this._storage,e._storageArr=this._storageArr,S(e,this),this._indices){var n=this._indices.constructor;if(n===Array){var i=this._indices.length;e._indices=new n(i);for(var r=0;r<i;r++)e._indices[r]=this._indices[r]}else e._indices=new n(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?g:f,e},t.prototype.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(i.tP(arguments)))})},t.internalField=function(){function e(t,e,n,i){return(0,C.yQ)(t[i],this._dimensionInfos[e])}c={arrayRows:e,objectRows:function(t,e,n,i){return(0,C.yQ)(t[e],this._dimensionInfos[e])},keyedColumns:e,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&(0,T.Co)(t)&&(this.hasItemOption=!0),(0,C.yQ)(r instanceof Array?r[i]:r,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},h=function(t){var e=t._invertedIndicesMap;i.S6(e,(function(n,i){var r=t._dimensionInfos[i].ordinalMeta;if(r){n=e[i]=new R(r.categories.length);for(var o=0;o<n.length;o++)n[o]=-1;for(o=0;o<t._count;o++)n[t.get(i,o)]=o}}))},y=function(t,e,n,i){var r,o=t._storageArr[e];return o&&(r=o[i],n&&n.categories.length&&(r=n.categories[r])),(0,T.U5)(r,null)},p=function(t){return t._rawCount>65535?L:E},d=function(t,e,n,i){var r=O[e.type],o=e.name;if(i){var a=t[o],s=a&&a.length;if(s!==n){for(var l=new r(n),u=0;u<s;u++)l[u]=a[u];t[o]=l}}else t[o]=new r(n)},f=function(t){return t},g=function(t){return t<this._count&&t>=0?this._indices[t]:-1},v=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=y(t,t._idDimIdx,t._idOrdinalMeta,e)),null==n&&(n="e\0\0"+e),n},_=function(t){return i.kJ(t)||(t=null!=t?[t]:[]),t},x=function(e,n){var r=e.dimensions,o=new t(D(r,e.getDimensionInfo,e),e.hostModel);S(o,e);for(var a,s,l=o._storage={},u=e._storage,c=o._storageArr=[],h=0;h<r.length;h++){var p=r[h];u[p]&&(i.cq(n,p)>=0?(l[p]=(s=void 0,(s=(a=u[p]).constructor)===Array?a.slice():new s(a)),o._rawExtent[p]=b(),o._extent[p]=null):l[p]=u[p],c.push(l[p]))}return o},b=function(){return[1/0,-1/0]},w=function(t){var e=(0,M.A)(t),n=(0,M.A)(this);e.seriesIndex=n.seriesIndex,e.dataIndex=n.dataIndex,e.dataType=n.dataType},S=function(t,e){i.S6(Z.concat(e.__wrappedMethods||[]),(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t.__wrappedMethods=e.__wrappedMethods,i.S6(N,(function(n){t[n]=i.d9(e[n])})),t._calculationInfo=i.l7({},e._calculationInfo)},m=function(t,e){var n=t._nameList,i=t._idList,r=t._nameDimIdx,o=t._idDimIdx,a=n[e],s=i[e];if(null==a&&null!=r&&(n[e]=a=y(t,r,t._nameOrdinalMeta,e)),null==s&&null!=o&&(i[e]=s=y(t,o,t._idOrdinalMeta,e)),null==s&&null!=a){var l=t._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),i[e]=s}}}(),t}();var z=n(6203);function F(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}var W=n(4134),V=function(t){this.coordSysDims=[],this.axisMap=(0,i.kW)(),this.categoryAxisMap=(0,i.kW)(),this.coordSysName=t},H={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",T.C6).models[0],o=t.getReferringComponents("yAxis",T.C6).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),U(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),U(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",T.C6).models[0];e.coordSysDims=["single"],n.set("single",r),U(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",T.C6).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),U(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),U(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,r){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),s=e.coordSysDims=a.dimensions.slice();(0,i.S6)(a.parallelAxisIndex,(function(t,i){var a=o.getComponent("parallelAxis",t),l=s[i];n.set(l,a),U(a)&&(r.set(l,a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=i))}))}};function U(t){return"category"===t.get("type")}var G=n(816);const X=function(t,e,n){n=n||{},(0,k.Ld)(t)||(t=(0,k.nx)(t));var r,o=e.get("coordinateSystem"),a=W.Z.get(o),l=function(t){var e=t.get("coordinateSystem"),n=new V(e),i=H[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e);l&&l.coordSysDims&&(r=i.UI(l.coordSysDims,(function(t){var e={name:t},n=l.axisMap.get(t);if(n){var i=n.get("type");e.type=function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}(i)}return e}))),r||(r=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var c,h,p=n.useEncodeDefaulter,d=function(t,e){return function(t,e,n){(0,k.Ld)(e)||(e=(0,k.nx)(e)),n=n||{},t=(t||[]).slice();for(var r=(n.dimsDef||[]).slice(),o=(0,i.kW)(),a=(0,i.kW)(),l=[],c=function(t,e,n,r){var o=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,r||0);return(0,i.S6)(e,(function(t){var e;(0,i.Kn)(t)&&(e=t.dimsDef)&&(o=Math.max(o,e.length))})),o}(e,t,r,n.dimCount),h=0;h<c;h++){var p=r[h],d=r[h]=(0,i.l7)({},(0,i.Kn)(p)?p:{name:p}),f=d.name,g=l[h]=new u;null!=f&&null==o.get(f)&&(g.name=g.displayName=f,o.set(f,h)),null!=d.type&&(g.type=d.type),null!=d.displayName&&(g.displayName=d.displayName)}var v=n.encodeDef;!v&&n.encodeDefaulter&&(v=n.encodeDefaulter(e,c));var y=(0,i.kW)(v);y.each((function(t,e){var n=(0,T.kF)(t).slice();if(1===n.length&&!(0,i.HD)(n[0])&&n[0]<0)y.set(e,!1);else{var r=y.set(e,[]);(0,i.S6)(n,(function(t,n){var a=(0,i.HD)(t)?o.get(t):t;null!=a&&a<c&&(r[n]=a,_(l[a],e,n))}))}}));var m=0;function _(t,e,n){null!=s.f7.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,a.set(e,!0))}(0,i.S6)(t,(function(t){var e,n,r,o;if((0,i.HD)(t))e=t,o={};else{e=(o=t).name;var a=o.ordinalMeta;o.ordinalMeta=null,(o=(0,i.d9)(o)).ordinalMeta=a,n=o.dimsDef,r=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null}var s=y.get(e);if(!1!==s){if(!(s=(0,T.kF)(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;m<l.length&&null!=l[m].coordDim;)m++;m<l.length&&s.push(m++)}(0,i.S6)(s,(function(t,a){var s=l[t];if(_((0,i.ce)(s,o),e,a),null==s.name&&n){var u=n[a];!(0,i.Kn)(u)&&(u={name:u}),s.name=s.displayName=u.name,s.defaultTooltip=u.defaultTooltip}r&&(0,i.ce)(s.otherDims,r)}))}}));var x=n.generateCoord,b=n.generateCoordCount,w=null!=b;b=x?b||1:0;for(var S=x||"value",M=0;M<c;M++)null==(g=l[M]=l[M]||new u).coordDim&&(g.coordDim=F(S,a,w),g.coordDimIndex=0,(!x||b<=0)&&(g.isExtraCoord=!0),b--),null==g.name&&(g.name=F(g.coordDim,o,!1)),null!=g.type||(0,z.u7)(e,M)!==z.Dq.Must&&(!g.isExtraCoord||null==g.otherDims.itemName&&null==g.otherDims.seriesName)||(g.type="ordinal");return l}((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})}(t,{coordDimensions:r,generateCoord:n.generateCoord,encodeDefaulter:i.mf(p)?p:p?i.WA(z.pY,r,e):null});l&&i.S6(d,(function(t,e){var n=t.coordDim,i=l.categoryAxisMap.get(n);i&&(null==c&&(c=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(h=!0)})),h||null==c||(d[c].otherDims.itemName=0);var f=(0,G.BM)(e,d),g=new B(d,e);g.setCalculationInfo(f);var v=null!=c&&function(t){if(t.sourceFormat===s.cy){var e=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!i.kJ((0,T.C4)(e))}}(t)?function(t,e,n,i){return i===c?n:this.defaultDimValueGetter(t,e,n,i)}:null;return g.hasItemOption=!1,g.initData(t,null,v),g}},760:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(5495);function r(){var t=(0,i.Yf)();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}},4510:(t,e,n)=>{"use strict";n.d(e,{H:()=>o,O:()=>a});var i=n(1245),r=n(8778);function o(t,e){var n=t.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r)return(0,i.hk)(t,e,n[0]);if(r){for(var o=[],a=0;a<n.length;a++)o.push((0,i.hk)(t,e,n[a]));return o.join(" ")}}function a(t,e){var n=t.mapDimensionsAll("defaultedLabel");if(!(0,r.kJ)(e))return e+"";for(var i=[],o=0;o<n.length;o++){var a=t.getDimensionInfo(n[o]);a&&i.push(e[a.index])}return i.join(" ")}},9894:(t,e,n)=>{"use strict";var i=n(8966),r=n(9312),o=n(2069),a=n(4689),s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.legendSymbol="line",n}return(0,r.ZT)(e,t),e.prototype.getInitialData=function(t){return(0,o.Z)(this.getSource(),this,{useEncodeDefaulter:!0})},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={zlevel:0,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,lineStyle:{width:"bolder"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0},e}(a.Z);a.Z.registerClass(s);var l=n(8778),u=n(3696),c=n(3111),h=n(1563),p=n(106),d=n(9199),f=n(4510),g=n(5628),v=n(6781);function y(t,e){this.parent.drift(t,e)}const m=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return(0,r.ZT)(e,t),e.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();var o=(0,c.t)(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=y,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){(0,p.fD)(this.childAt(0))},e.prototype.downplay=function(){(0,p.Mh)(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=o!==this._symbolType,c=r&&r.disableAnimation;if(l){var h=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,h)}else{(d=this.childAt(0)).silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};c?d.attr(p):u.updateProps(d,p,a,n)}if(this._updateCommon(t,n,s,i,r),l){var d=this.childAt(0);c||(p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}},d.scaleX=d.scaleY=0,d.style.opacity=0,u.initProps(d,p,a,n))}c&&this.childAt(0).stopAnimation("remove"),this._seriesModel=a},e.prototype._updateCommon=function(t,e,n,i,r){var o,a,s,u,c,h,y,m,_,x=this.childAt(0),b=t.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,u=i.focus,c=i.blurScope,h=i.symbolOffset,y=i.labelStatesModels,m=i.hoverScale,_=i.cursorStyle),!i||t.hasItemOption){var w=i&&i.itemModel?i.itemModel:t.getItemModel(e),S=w.getModel("emphasis");o=S.getModel("itemStyle").getItemStyle(),s=w.getModel(["select","itemStyle"]).getItemStyle(),a=w.getModel(["blur","itemStyle"]).getItemStyle(),u=S.get("focus"),c=S.get("blurScope"),h=w.getShallow("symbolOffset"),y=(0,g.k3)(w),m=S.getShallow("scale"),_=w.getShallow("cursor")}var T=t.getItemVisual(e,"symbolRotate");x.attr("rotation",(T||0)*Math.PI/180||0),h&&(x.x=(0,d.GM)(h[0],n[0]),x.y=(0,d.GM)(h[1],n[1])),_&&x.attr("cursor",_);var M=t.getItemVisual(e,"style"),C=M.fill;if(x instanceof v.ZP){var k=x.style;x.useStyle((0,l.l7)({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},M))}else x.__isEmptyBrush?x.useStyle((0,l.l7)({},M)):x.useStyle(M),x.style.decal=null,x.setColor(C,r&&r.symbolInnerColor),x.style.strokeNoScale=!0;var A=t.getItemVisual(e,"liftZ"),I=this._z2;null!=A?null==I&&(this._z2=x.z2,x.z2+=A):null!=I&&(x.z2=I,this._z2=null);var D=r&&r.useNameLabel;(0,g.ni)(x,y,{labelFetcher:b,labelDataIndex:e,defaultText:function(e){return D?t.getName(e):(0,f.H)(t,e)},inheritColor:C,defaultOpacity:M.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var P=x.ensureState("emphasis");if(P.style=o,x.ensureState("select").style=s,x.ensureState("blur").style=a,m){var O=Math.max(1.1,3/this._sizeY);P.scaleX=this._sizeX*O,P.scaleY=this._sizeY*O}this.setSymbolScale(1),(0,p.vF)(this,u,c)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e){var n=this.childAt(0),i=this._seriesModel,r=(0,h.A)(this).dataIndex,o=e&&e.animation;if(this.silent=n.silent=!0,e&&e.fadeLabel){var a=n.getTextContent();a&&u.removeElement(a,{style:{opacity:0}},i,{dataIndex:r,removeOpt:o,cb:function(){n.removeTextContent()}})}else n.removeTextContent();u.removeElement(n,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:r,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]},e}(u.Group);function _(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function x(t){return null==t||(0,l.Kn)(t)||(t={isIgnore:t}),t||{}}function b(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverScale:n.get("scale"),labelStatesModels:(0,g.k3)(e),cursorStyle:e.get("cursor")}}const w=function(){function t(t){this.group=new u.Group,this._SymbolCtor=t||m}return t.prototype.updateData=function(t,e){e=x(e);var n=this.group,i=t.hostModel,r=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=b(t),l={disableAnimation:a},c=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add((function(i){var r=c(i);if(_(t,r,i,e)){var a=new o(t,i,s,l);a.setPosition(r),t.setItemGraphicEl(i,a),n.add(a)}})).update((function(h,p){var d=r.getItemGraphicEl(p),f=c(h);if(_(t,f,h,e)){if(d){d.updateData(t,h,s,l);var g={x:f[0],y:f[1]};a?d.attr(g):u.updateProps(d,g,i)}else(d=new o(t,h)).setPosition(f);n.add(d),t.setItemGraphicEl(h,d)}else n.remove(d)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}))})).execute(),this._getSymbolPoint=c,this._data=t},t.prototype.isPersistent=function(){return!0},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=b(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}n=x(n);for(var r=t.start;r<t.end;r++){var o=e.getItemLayout(r);if(_(e,o,r,n)){var a=new this._SymbolCtor(e,r,this._seriesScope);a.traverse(i),a.setPosition(o),this.group.add(a),e.setItemGraphicEl(r,a)}}},t.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl((function(t){t.fadeOut((function(){e.remove(t)}))})):e.removeAll()},t}();var S=n(816);function T(t,e,n){var i=t.getBaseAxis(),r=t.getOtherAxis(i),o=function(t,e){var n=0,i=t.scale.getExtent();return"start"===e?n=i[0]:"end"===e?n=i[1]:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]),n}(r,n),a=i.dim,s=r.dim,u=e.mapDimension(s),c=e.mapDimension(a),h="x"===s||"radius"===s?1:0,p=(0,l.UI)(t.dimensions,(function(t){return e.mapDimension(t)})),d=!1,f=e.getCalculationInfo("stackResultDimension");return(0,S.M)(e,p[0])&&(d=!0,p[0]=f),(0,S.M)(e,p[1])&&(d=!0,p[1]=f),{dataDimsForPoint:p,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:u,baseDim:c,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function M(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var C="undefined"!=typeof Float32Array,k=C?Float32Array:Array;function A(t){return(0,l.kJ)(t)?C?new Float32Array(t):t:new k(t)}var I=n(5495),D=n(391),P=n(2397),O=n(3475),L=Math.min,R=Math.max;function E(t,e){return isNaN(t)||isNaN(e)}function Z(t,e,n,i,r,o,a,s,l){for(var u,c,h,p,d,f,g=n,v=0;v<i;v++){var y=e[2*g],m=e[2*g+1];if(g>=r||g<0)break;if(E(y,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](y,m),h=y,p=m;else{var _=y-u,x=m-c;if(_*_+x*x<.5){g+=o;continue}if(a>0){var b=g+o,w=e[2*b],S=e[2*b+1],T=v+1;if(l)for(;E(w,S)&&T<i;)T++,w=e[2*(b+=o)],S=e[2*b+1];var M=.5,C=0,k=0,A=void 0,I=void 0;if(T>=i||E(w,S))d=y,f=m;else{C=w-u,k=S-c;var D=y-u,P=w-y,O=m-c,Z=S-m,N=void 0,B=void 0;"x"===s?(N=Math.abs(D),B=Math.abs(P),d=y-N*a,f=m,A=y+N*a,I=m):"y"===s?(N=Math.abs(O),B=Math.abs(Z),d=y,f=m-N*a,A=y,I=m+N*a):(N=Math.sqrt(D*D+O*O),d=y-C*a*(1-(M=(B=Math.sqrt(P*P+Z*Z))/(B+N))),f=m-k*a*(1-M),I=m+k*a*M,A=L(A=y+C*a*M,R(w,y)),I=L(I,R(S,m)),A=R(A,L(w,y)),f=m-(k=(I=R(I,L(S,m)))-m)*N/B,d=L(d=y-(C=A-y)*N/B,R(u,y)),f=L(f,R(c,m)),A=y+(C=y-(d=R(d,L(u,y))))*B/N,I=m+(k=m-(f=R(f,L(c,m))))*B/N)}t.bezierCurveTo(h,p,d,f,y,m),h=A,p=I}else t.lineTo(y,m)}u=y,c=m,g+=o}return v}var N=function(){this.smooth=0,this.smoothConstraint=!0},B=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return(0,r.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new N},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&E(n[2*r-2],n[2*r-1]);r--);for(;i<r&&E(n[2*i],n[2*i+1]);i++);}for(;i<r;)i+=Z(t,n,i,r,r,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},e.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,r=this.path.data,o=P.Z.CMD,a="x"===e,s=[],l=0;l<r.length;){var u=void 0,c=void 0,h=void 0,p=void 0,d=void 0,f=void 0,g=void 0;switch(r[l++]){case o.M:n=r[l++],i=r[l++];break;case o.L:if(u=r[l++],c=r[l++],(g=a?(t-n)/(u-n):(t-i)/(c-i))<=1&&g>=0){var v=a?(c-i)*g+i:(u-n)*g+n;return a?[t,v]:[v,t]}n=u,i=c;break;case o.C:u=r[l++],c=r[l++],h=r[l++],p=r[l++],d=r[l++],f=r[l++];var y=a?(0,O.kD)(n,u,h,d,t,s):(0,O.kD)(i,c,p,f,t,s);if(y>0)for(var m=0;m<y;m++){var _=s[m];if(_<=1&&_>=0)return v=a?(0,O.af)(i,c,p,f,_):(0,O.af)(n,u,h,d,_),a?[t,v]:[v,t]}n=d,i=f}}},e}(D.ZP),z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e}(N),F=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return(0,r.ZT)(e,t),e.prototype.getDefaultShape=function(){return new z},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&E(n[2*o-2],n[2*o-1]);o--);for(;r<o&&E(n[2*r],n[2*r+1]);r++);}for(;r<o;){var s=Z(t,n,r,o,o,1,e.smooth,a,e.connectNulls);Z(t,i,r+s-1,s,o,-1,e.stackedOnSmooth,a,e.connectNulls),r+=s+1,t.closePath()}},e}(D.ZP),W=n(2916),V=n(823),H=n(5320);function U(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return;return!0}}function G(t){for(var e=1/0,n=1/0,i=-1/0,r=-1/0,o=0;o<t.length;){var a=t[o++],s=t[o++];isNaN(a)||(e=Math.min(a,e),i=Math.max(a,i)),isNaN(s)||(n=Math.min(s,n),r=Math.max(s,r))}return[[e,n],[i,r]]}function X(t,e){var n=G(t),i=n[0],r=n[1],o=G(e),a=o[0],s=o[1];return Math.max(Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]),Math.abs(r[0]-s[0]),Math.abs(r[1]-s[1]))}function Y(t){return"number"==typeof t?t:t?.5:0}function j(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,o=[],a=0,s=[],l=[],u=[];a<t.length-2;a+=2)switch(u[0]=t[a+2],u[1]=t[a+3],l[0]=t[a],l[1]=t[a+1],o.push(l[0],l[1]),n){case"end":s[r]=u[r],s[1-r]=l[1-r],o.push(s[0],s[1]);break;case"middle":var c=(l[r]+u[r])/2,h=[];s[r]=h[r]=c,s[1-r]=l[1-r],h[1-r]=u[1-r],o.push(s[0],s[1]),o.push(h[0],h[1]);break;default:s[r]=l[r],s[1-r]=u[1-r],o.push(s[0],s[1])}return o.push(t[a++],t[a++]),o}function $(t,e){return[t[2*e],t[2*e+1]]}function q(t,e,n,i){if((0,H.H)(e,"cartesian2d")){var r=i.getModel("endLabel"),o=r.get("show"),a=r.get("valueAnimation"),s=i.getData(),l={lastFrameIndex:0},u=o?function(n,i){t._endLabelOnDuring(n,i,s,l,a,r,e)}:null,c=e.getBaseAxis().isHorizontal(),h=(0,V.ID)(e,n,i,(function(){var e=t._endLabel;e&&n&&null!=l.originalX&&e.attr({x:l.originalX,y:l.originalY})}),u);if(!i.get("clip",!0)){var p=h.shape,d=Math.max(p.width,p.height);c?(p.y-=d,p.height+=2*d):(p.x-=d,p.width+=2*d)}return u&&u(1,h),h}return(0,V.X0)(e,n,i)}var K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.init=function(){var t=new u.Group,e=new w;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),c=t.getModel("areaStyle"),d=a.getLayout("points")||[],f="polar"===r.type,g=this._coordSys,v=this._symbolDraw,y=this._polyline,_=this._polygon,x=this._lineGroup,b=t.get("animation"),w=!c.isEmpty(),S=c.get("origin"),C=T(r,a,S),k=w&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),r=A(2*i),o=0;o<i;o++){var a=M(n,t,e,o);r[2*o]=a[0],r[2*o+1]=a[1]}return r}(r,a,C),I=t.get("showSymbol"),D=I&&!f&&function(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;a<r;a+=o)if(1.5*m.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return l.S6(o.getViewLabels(),(function(t){s[t.tickValue]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}(t,a,r),P=this._data;P&&P.eachItemGraphicEl((function(t,e){t.__temp&&(o.remove(t),P.setItemGraphicEl(e,null))})),I||v.remove(),o.add(x);var O,L=!f&&t.get("step");r&&r.getArea&&t.get("clip",!0)&&(null!=(O=r.getArea()).width?(O.x-=.1,O.y-=.1,O.width+=.2,O.height+=.2):O.r0&&(O.r0-=.5,O.r+=.5)),this._clipShapeForSymbol=O,y&&g.type===r.type&&L===this._step?(w&&!_?_=this._newPolygon(d,k):_&&!w&&(x.remove(_),_=this._polygon=null),f||this._initOrUpdateEndLabel(t,r),x.setClipPath(q(this,r,!1,t)),I&&v.updateData(a,{isIgnore:D,clipShape:O,disableAnimation:!0,getSymbolPoint:function(t){return[d[2*t],d[2*t+1]]}}),U(this._stackedOnPoints,k)&&U(this._points,d)||(b?this._doUpdateAnimation(a,k,r,n,L,S):(L&&(d=j(d,r,L),k&&(k=j(k,r,L))),y.setShape({points:d}),_&&_.setShape({points:d,stackedOnPoints:k})))):(I&&v.updateData(a,{isIgnore:D,clipShape:O,disableAnimation:!0,getSymbolPoint:function(t){return[d[2*t],d[2*t+1]]}}),b&&this._initSymbolLabelAnimation(a,r,O),L&&(d=j(d,r,L),k&&(k=j(k,r,L))),y=this._newPolyline(d),w&&(_=this._newPolygon(d,k)),f||this._initOrUpdateEndLabel(t,r),x.setClipPath(q(this,r,!0,t)));var R=function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,r,o=n.length-1;o>=0;o--){var a=n[o].dimension,s=t.dimensions[a],c=t.getDimensionInfo(s);if("x"===(i=c&&c.coordDim)||"y"===i){r=n[o];break}}if(r){var h=e.getAxis(i),p=l.UI(r.stops,(function(t){return{offset:0,coord:h.toGlobalCoord(h.dataToCoord(t.value)),color:t.color}})),d=p.length,f=r.outerColors.slice();d&&p[0].coord>p[d-1].coord&&(p.reverse(),f.reverse());var g=p[0].coord-10,v=p[d-1].coord+10,y=v-g;if(y<.001)return"transparent";l.S6(p,(function(t){t.offset=(t.coord-g)/y})),p.push({offset:d?p[d-1].offset:.5,color:f[1]||"transparent"}),p.unshift({offset:d?p[0].offset:.5,color:f[0]||"transparent"});var m=new u.LinearGradient(0,0,0,0,p,!0);return m[i]=g,m[i+"2"]=v,m}}}(a,r)||a.getVisual("style")[a.getVisual("drawType")],E=t.get(["emphasis","focus"]),Z=t.get(["emphasis","blurScope"]);y.useStyle(l.ce(s.getLineStyle(),{fill:"none",stroke:R,lineJoin:"bevel"})),(0,p.WO)(y,t,"lineStyle"),y.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(y.getState("emphasis").style.lineWidth=y.style.lineWidth+1),(0,h.A)(y).seriesIndex=t.seriesIndex,(0,p.vF)(y,E,Z);var N=Y(t.get("smooth")),B=t.get("smoothMonotone"),z=t.get("connectNulls");if(y.setShape({smooth:N,smoothMonotone:B,connectNulls:z}),_){var F=a.getCalculationInfo("stackedOnSeries"),W=0;_.useStyle(l.ce(c.getAreaStyle(),{fill:R,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),F&&(W=Y(F.get("smooth"))),_.setShape({smooth:N,stackedOnSmooth:W,smoothMonotone:B,connectNulls:z}),(0,p.WO)(_,t,"areaStyle"),(0,h.A)(_).seriesIndex=t.seriesIndex,(0,p.vF)(_,E,Z)}var V=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=V)})),this._polyline.onHoverStateChange=V,this._data=a,this._coordSys=r,this._stackedOnPoints=k,this._points=d,this._step=L,this._valueOrigin=S},e.prototype.dispose=function(){},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=I.gO(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;(s=new m(r,o)).x=l,s.y=u,s.setZ(t.get("zlevel"),t.get("z")),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else W.Z.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=I.gO(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else W.Z.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;(0,p.Gl)(this._polyline,t),e&&(0,p.Gl)(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new B({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new F({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");"function"==typeof l&&(l=l(null));var u=s.get("animationDelay")||0,c="function"==typeof u?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var h=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(r){var g=n,v=e.pointToCoord(h);i?(p=g.startAngle,d=g.endAngle,f=-v[1]/180*Math.PI):(p=g.r0,d=g.r,f=v[0])}else{var y=n;i?(p=y.x,d=y.x+y.width,f=t.x):(p=y.y+y.height,d=y.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var _="function"==typeof u?u(o):l*m+c,x=s.getSymbolPath(),b=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:_}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e){var n=t.getModel("endLabel");if(n.get("show")){var i=t.getData(),r=this._polyline,o=this._endLabel;o||((o=this._endLabel=new u.Text({z2:200})).ignoreClip=!0,r.setTextContent(this._endLabel),r.disableLabelAnimation=!0);var a=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(i.getLayout("points"));a>=0&&(0,g.ni)(o,(0,g.k3)(t,"endLabel"),{labelFetcher:t,labelDataIndex:a,defaultText:function(t,e,n){return n?(0,f.O)(i,n):(0,f.H)(i,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a,padding:t.get("distance")||0}}}(n,e))}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),p=o.get("precision"),d=a.getBaseAxis(),f=d.isHorizontal(),v=d.inverse,y=e.shape,m=v?f?y.x:y.y+y.height:f?y.x+y.width:y.y,_=f?"x":"y",x=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<o;u++)if(r=t[2*u+a],!isNaN(r)&&!isNaN(t[2*u+1-a]))if(0!==u){if(i<=e&&r>=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,m,_),b=x.range,w=b[1]-b[0],S=void 0;if(w>=1){if(w>1&&!h){var T=$(u,b[0]);s.attr({x:T[0],y:T[1]}),r&&(S=c.getRawValue(b[0]))}else{(T=l.getPointOn(m,_))&&s.attr({x:T[0],y:T[1]});var M=c.getRawValue(b[0]),C=c.getRawValue(b[1]);r&&(S=I.pk(n,p,M,C,x.t))}i.lastFrameIndex=b[0]}else{var k=1===t||i.lastFrameIndex>0?b[0]:0;T=$(u,k),r&&(S=c.getRawValue(k)),s.attr({x:T[0],y:T[1]})}r&&(0,g.qA)(s).setLabelText(S)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,c=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],c=[],h=[],p=[],d=[],f=[],g=[],v=T(r,e,a),y=T(o,t,s),m=t.getLayout("points")||[],_=e.getLayout("points")||[],x=0;x<l.length;x++){var b=l[x],w=!0,S=void 0,C=void 0;switch(b.cmd){case"=":S=2*b.idx,C=2*b.idx1;var k=m[S],I=m[S+1],D=_[C],P=_[C+1];(isNaN(k)||isNaN(I))&&(k=D,I=P),u.push(k,I),c.push(D,P),h.push(n[S],n[S+1]),p.push(i[C],i[C+1]),g.push(e.getRawIndex(b.idx1));break;case"+":var O=b.idx,L=v.dataDimsForPoint,R=r.dataToPoint([e.get(L[0],O),e.get(L[1],O)]);C=2*O,u.push(R[0],R[1]),c.push(_[C],_[C+1]);var E=M(v,r,e,O);h.push(E[0],E[1]),p.push(i[C],i[C+1]),g.push(e.getRawIndex(O));break;case"-":var Z=b.idx,N=t.getRawIndex(Z),B=y.dataDimsForPoint;if(S=2*Z,N!==Z){var z=o.dataToPoint([t.get(B[0],Z),t.get(B[1],Z)]),F=M(y,o,t,Z);u.push(m[S],m[S+1]),c.push(z[0],z[1]),h.push(n[S],n[S+1]),p.push(F[0],F[1]),g.push(N)}else w=!1}w&&(d.push(b),f.push(f.length))}f.sort((function(t,e){return g[t]-g[e]}));var W=u.length,V=A(W),H=A(W),U=A(W),G=A(W),X=[];for(x=0;x<f.length;x++){var Y=f[x],j=2*x,$=2*Y;V[j]=u[$],V[j+1]=u[$+1],H[j]=c[$],H[j+1]=c[$+1],U[j]=h[$],U[j+1]=h[$+1],G[j]=p[$],G[j+1]=p[$+1],X[x]=d[Y]}return{current:V,next:H,stackedOnCurrent:U,stackedOnNext:G,status:X}}(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,o),h=c.current,p=c.stackedOnCurrent,d=c.next,f=c.stackedOnNext;if(r&&(h=j(c.current,n,r),p=j(c.stackedOnCurrent,n,r),d=j(c.next,n,r),f=j(c.stackedOnNext,n,r)),X(h,d)>3e3||s&&X(p,f)>3e3)return a.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));a.shape.__points=c.current,a.shape.points=h;var g={shape:{points:d}};c.current!==h&&(g.shape.__points=c.next),a.stopAnimation(),u.updateProps(a,g,l),s&&(s.setShape({points:h,stackedOnPoints:p}),s.stopAnimation(),u.updateProps(s,{shape:{stackedOnPoints:f}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var v=[],y=c.status,m=0;m<y.length;m++)if("="===y[m].cmd){var _=t.getItemGraphicEl(y[m].idx1);_&&v.push({el:_,ptIdx:m})}a.animators&&a.animators.length&&a.animators[0].during((function(){s&&s.dirtyShape();for(var t=a.shape.__points,e=0;e<v.length;e++){var n=v[e].el,i=2*v[e].ptIdx;n.x=t[i],n.y=t[i+1],n.markRedraw()}}))},e.prototype.remove=function(t){var e=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(t,i){t.__temp&&(e.remove(t),n.setItemGraphicEl(i,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(W.Z);W.Z.registerClass(K);var J=n(760),Q=n(6774);n(5826),i.registerLayout((!0,{seriesType:"line",plan:(0,J.Z)(),reset:function(t){var e=t.getData(),n=t.coordinateSystem;t.pipelineContext;if(n){var i=(0,l.UI)(n.dimensions,(function(t){return e.mapDimension(t)})).slice(0,2),r=i.length,o=e.getCalculationInfo("stackResultDimension");(0,S.M)(e,i[0])&&(i[0]=o),(0,S.M)(e,i[1])&&(i[1]=o);var a=e.getDimensionInfo(i[0]),s=e.getDimensionInfo(i[1]),u=a&&a.index,c=s&&s.index;return r&&{progress:function(t,e){for(var i=A((t.end-t.start)*r),o=[],a=[],s=t.start,l=0;s<t.end;s++){var h=void 0;if(1===r){var p=e.getByDimIdx(u,s);h=n.dataToPoint(p,null,a)}else o[0]=e.getByDimIdx(u,s),o[1]=e.getByDimIdx(c,s),h=n.dataToPoint(o,null,a);i[l++]=h[0],i[l++]=h[1]}e.setLayout("points",i)}}}}})),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,(0,Q.Z)("line"))},4566:(t,e,n)=>{"use strict";n.d(e,{KM:()=>o,iG:()=>s,r:()=>l,np:()=>u,zm:()=>h});var i=n(4708),r=n(8778);function o(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var o=e.getComponent("tooltip"),s=e.getComponent("axisPointer"),l=s.get("link",!0)||[],u=[];(0,r.S6)(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var p=h(n.model),d=t.coordSysAxesInfo[p]={};t.coordSysMap[p]=n;var f=n.model.getModel("tooltip",o);if((0,r.S6)(n.getAxes(),(0,r.WA)(m,!1,null)),n.getTooltipAxes&&o&&f.get("show")){var g="axis"===f.get("trigger"),v="cross"===f.get(["axisPointer","type"]),y=n.getTooltipAxes(f.get(["axisPointer","axis"]));(g||v)&&(0,r.S6)(y.baseAxes,(0,r.WA)(m,!v||"cross",g)),v&&(0,r.S6)(y.otherAxes,(0,r.WA)(m,"cross",!1))}}function m(o,p,g){var v=g.model.getModel("axisPointer",s),y=v.get("show");if(y&&("auto"!==y||o||c(v))){null==p&&(p=v.get("triggerTooltip"));var m=(v=o?function(t,e,n,o,a,s){var l=e.getModel("axisPointer"),u={};(0,r.S6)(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){u[t]=(0,r.d9)(l.get(t))})),u.snap="category"!==t.type&&!!s,"cross"===l.get("type")&&(u.type="line");var c=u.label||(u.label={});if(null==c.show&&(c.show=!1),"cross"===a){var h=l.get(["label","show"]);if(c.show=null==h||h,!s){var p=u.lineStyle=l.get("crossStyle");p&&(0,r.ce)(c,p.textStyle)}}return t.model.getModel("axisPointer",new i.Z(u,n,o))}(g,f,s,e,o,p):v).get("snap"),_=h(g.model),x=p||m||"category"===g.type,b=t.axesInfo[_]={key:_,axis:g,coordSys:n,axisPointerModel:v,triggerTooltip:p,involveSeries:x,snap:m,useHandle:c(v),seriesModels:[],linkGroup:null};d[_]=b,t.seriesInvolved=t.seriesInvolved||x;var w=function(t,e){for(var n=e.model,i=e.dim,r=0;r<t.length;r++){var o=t[r]||{};if(a(o[i+"AxisId"],n.id)||a(o[i+"AxisIndex"],n.componentIndex)||a(o[i+"AxisName"],n.name))return r}}(l,g);if(null!=w){var S=u[w]||(u[w]={axesInfo:{}});S.axesInfo[_]=b,S.mapper=l[w].mapper,b.linkGroup=S}}}}))}(n,t,e),n.seriesInvolved&&function(t,e){e.eachSeries((function(e){var n=e.coordinateSystem,i=e.get(["tooltip","trigger"],!0),o=e.get(["tooltip","show"],!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==o&&!1!==e.get(["axisPointer","show"],!0)&&(0,r.S6)(t.coordSysAxesInfo[h(n.model)],(function(t){var i=t.axis;n.getAxis(i.dim)===i&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}))}(n,t),n}function a(t,e){return"all"===t||(0,r.kJ)(t)&&(0,r.cq)(t,e)>=0||t===e}function s(t){var e=l(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=c(n);null==o&&(r.status=s?"show":"hide");var u=i.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==a||a>u[1])&&(a=u[1]),a<u[0]&&(a=u[0]),r.value=a,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}function l(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[h(t)]}function u(t){var e=l(t);return e&&e.axisPointerModel}function c(t){return!!t.get(["handle","show"])}function h(t){return t.type+"||"+t.id}},8637:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(8778),r=n(3696),o=n(1563),a=n(5628),s=n(4708),l=n(9199),u=n(3111),c=n(561),h=n(213),p=n(3493),d=Math.PI,f=function(){function t(t,e){this.group=new r.Group,this.opt=e,this.axisModel=t,(0,i.ce)(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new r.Group({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!g[t]},t.prototype.add=function(t){g[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=(0,l.wW)(e-t);return(0,l.mW)(o)?(r=n>0?"top":"bottom",i="center"):(0,l.mW)(o-d)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o<d?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),g={axisLine:function(t,e,n,o){var a=e.get(["axisLine","show"]);if("auto"===a&&t.handleAutoShown&&(a=t.handleAutoShown("axisLine")),a){var s=e.axis.getExtent(),l=o.transform,c=[s[0],0],p=[s[1],0];l&&((0,h.Ne)(c,c,l),(0,h.Ne)(p,p,l));var d=(0,i.l7)({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new r.Line({subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:p[0],y2:p[1]},style:d,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});f.anid="line",n.add(f);var g=e.get(["axisLine","symbol"]),v=e.get(["axisLine","symbolSize"]),y=e.get(["axisLine","symbolOffset"])||0;if("number"==typeof y&&(y=[y,y]),null!=g){"string"==typeof g&&(g=[g,g]),"string"!=typeof v&&"number"!=typeof v||(v=[v,v]);var m=v[0],_=v[1];(0,i.S6)([{rotate:t.rotation+Math.PI/2,offset:y[0],r:0},{rotate:t.rotation-Math.PI/2,offset:y[1],r:Math.sqrt((c[0]-p[0])*(c[0]-p[0])+(c[1]-p[1])*(c[1]-p[1]))}],(function(e,i){if("none"!==g[i]&&null!=g[i]){var r=(0,u.t)(g[i],-m/2,-_/2,m,_,d.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:c[0]+o*Math.cos(t.rotation),y:c[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,l){var u=function(t,e,n,r){var o=n.axis,a=n.getModel("axisTick"),s=a.get("show");if("auto"===s&&r.handleAutoShown&&(s=r.handleAutoShown("axisTick")),s&&!o.scale.isBlank()){for(var l=a.getModel("lineStyle"),u=r.tickDirection*a.get("length"),c=_(o.getTicksCoords(),e.transform,u,(0,i.ce)(l.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<c.length;h++)t.add(c[h]);return c}}(n,l,e,t),c=function(t,e,n,l){var u=n.axis;if((0,i.Jv)(l.axisLabelShow,n.get(["axisLabel","show"]))&&!u.scale.isBlank()){var c=n.getModel("axisLabel"),h=c.get("margin"),p=u.getViewLabels(),g=((0,i.Jv)(l.labelRotate,c.get("rotate"))||0)*d/180,v=f.innerTextLayout(l.rotation,g,l.labelDirection),y=n.getCategories&&n.getCategories(!0),m=[],_=f.isLabelSilent(n),x=n.get("triggerEvent");return(0,i.S6)(p,(function(p,d){var g="ordinal"===u.scale.type?u.scale.getRawIndex(p.tickValue):p.tickValue,b=p.formattedLabel,w=p.rawLabel,S=c;if(y&&y[g]){var T=y[g];(0,i.Kn)(T)&&T.textStyle&&(S=new s.Z(T.textStyle,c,n.ecModel))}var M=S.getTextColor()||n.get(["axisLine","lineStyle","color"]),C=u.dataToCoord(g),k=new r.Text({x:C,y:l.labelOffset+l.labelDirection*h,rotation:v.rotation,silent:_,z2:10,style:(0,a.Lr)(S,{text:b,align:S.getShallow("align",!0)||v.textAlign,verticalAlign:S.getShallow("verticalAlign",!0)||S.getShallow("baseline",!0)||v.textVerticalAlign,fill:"function"==typeof M?M("category"===u.type?w:"value"===u.type?g+"":g,d):M})});if(k.anid="label_"+g,x){var A=f.makeAxisEventDataBase(n);A.targetType="axisLabel",A.value=w,(0,o.A)(k).eventData=A}e.add(k),k.updateTransform(),m.push(k),t.add(k),k.decomposeTransform()})),m}}(n,l,e,t);!function(t,e,n){if(!(0,p.WY)(t.axis)){var i=t.get(["axisLabel","showMinLabel"]),r=t.get(["axisLabel","showMaxLabel"]);n=n||[];var o=(e=e||[])[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],c=n[1],h=n[n.length-1],d=n[n.length-2];!1===i?(v(o),v(u)):y(o,a)&&(i?(v(a),v(c)):(v(o),v(u))),!1===r?(v(s),v(h)):y(l,s)&&(r?(v(l),v(d)):(v(s),v(h)))}}(e,c,u),function(t,e,n,r){var o=n.axis,a=n.getModel("minorTick");if(a.get("show")&&!o.scale.isBlank()){var s=o.getMinorTicksCoords();if(s.length)for(var l=a.getModel("lineStyle"),u=r*a.get("length"),c=(0,i.ce)(l.getLineStyle(),(0,i.ce)(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),h=0;h<s.length;h++)for(var p=_(s[h],e.transform,u,c,"minorticks_"+h),d=0;d<p.length;d++)t.add(p[d])}}(n,l,e,t.tickDirection)},axisName:function(t,e,n,s){var u=(0,i.Jv)(t.axisName,e.get("name"));if(u){var c,h,p=e.get("nameLocation"),g=t.nameDirection,v=e.getModel("nameTextStyle"),y=e.get("nameGap")||0,_=e.axis.getExtent(),x=_[0]>_[1]?-1:1,b=["start"===p?_[0]-x*y:"end"===p?_[1]+x*y:(_[0]+_[1])/2,m(p)?t.labelOffset+g*y:0],w=e.get("nameRotate");null!=w&&(w=w*d/180),m(p)?c=f.innerTextLayout(t.rotation,null!=w?w:t.rotation,g):(c=function(t,e,n,i){var r,o,a=(0,l.wW)(n-t),s=i[0]>i[1],u="start"===e&&!s||"start"!==e&&s;return(0,l.mW)(a-d/2)?(o=u?"bottom":"top",r="center"):(0,l.mW)(a-1.5*d)?(o=u?"top":"bottom",r="center"):(o="middle",r=a<1.5*d&&a>d/2?u?"left":"right":u?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,p,w||0,_),null!=(h=t.axisNameAvailableWidth)&&(h=Math.abs(h/Math.sin(c.rotation)),!isFinite(h)&&(h=null)));var S=v.getFont(),T=e.get("nameTruncate",!0)||{},M=T.ellipsis,C=(0,i.Jv)(t.nameTruncateMaxWidth,T.maxWidth,h),k=e.get("tooltip",!0),A=e.mainType,I={componentType:A,name:u,$vars:["name"]};I[A+"Index"]=e.componentIndex;var D=new r.Text({x:b[0],y:b[1],rotation:c.rotation,silent:f.isLabelSilent(e),style:(0,a.Lr)(v,{text:u,font:S,overflow:"truncate",width:C,ellipsis:M,fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:v.get("align")||c.textAlign,verticalAlign:v.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(D.tooltip=k&&k.show?(0,i.l7)({content:u,formatter:function(){return u},formatterParams:I},k):null,D.__fullText=u,D.anid="name",e.get("triggerEvent")){var P=f.makeAxisEventDataBase(e);P.targetType="axisName",P.name=u,(0,o.A)(D).eventData=P}s.add(D),D.updateTransform(),n.add(D),D.decomposeTransform()}}};function v(t){t&&(t.ignore=!0)}function y(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=c.yR([]);return c.U1(r,r,-t.rotation),n.applyTransform(c.dC([],r,t.getLocalTransform())),i.applyTransform(c.dC([],r,e.getLocalTransform())),n.intersect(i)}}function m(t){return"middle"===t||"center"===t}function _(t,e,n,i,o){for(var a=[],s=[],l=[],u=0;u<t.length;u++){var c=t[u].coord;s[0]=c,s[1]=0,l[0]=c,l[1]=n,e&&((0,h.Ne)(s,s,e),(0,h.Ne)(l,l,e));var p=new r.Line({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:i,z2:2,autoBatch:!0,silent:!0});p.anid=o+"_"+t[u].tickValue,a.push(p)}return a}const x=f},7774:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(4566),o=n(8278),a={};const s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(e,n,i,o){this.axisPointerClass&&r.iG(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},e.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},e.prototype.dispose=function(e,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var o=e.getAxisPointerClass(this.axisPointerClass);if(o){var a=r.np(t);a?(this._axisPointer||(this._axisPointer=new o)).render(t,a,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,e){a[t]=e},e.getAxisPointerClass=function(t){return t&&a[t]},e.type="axis",e}(o.Z)},5826:(t,e,n)=>{"use strict";var i=n(9312),r=n(8966),o=n(8778),a=n(3696),s=n(2822),l={show:!0,zlevel: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:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},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},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},u=o.TS({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},l),c=o.TS({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},l);const h={category:u,value:c,time:o.TS({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},c),log:o.ce({scale:!0,logBase:10},c)};var p=n(2746),d=n(1214),f={value:1,category:1,time:1,log:1};function g(t,e,n){o.S6(f,(function(r,a){var l=o.TS(o.TS({},h[a],!0),n,!0),u=function(e){function n(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=e.apply(this,n)||this;return r.type=t+"Axis."+a,r}return(0,i.ZT)(n,e),n.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,p.YD)(this),i=n?(0,p.tE)(t):{},r=e.getTheme();o.TS(t,r.get(a+"Axis")),o.TS(t,this.getDefaultOption()),t.type=v(t),n&&(0,p.dt)(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=d.Z.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+a,n.defaultOption=l,n}(e);s.Z.registerClass(u)})),s.Z.registerSubTypeDefaulter(t+"Axis",v)}function v(t){return t.type||(t.data?"category":"value")}var y=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}(),m=n(5495),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",m.C6).models[0]},e.type="cartesian2dAxis",e}(s.Z);o.jB(_,y);var x={offset:0,categorySortInfo:[]};g("x",_,x),g("y",_,x);var b=n(8637),w=n(7774),S=n(8395),T=(0,m.Yf)(),M=n(8278),C=["axisLine","axisTickLabel","axisName"],k=["splitArea","splitLine","minorSplitLine"],A=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="CartesianAxisPointer",n}return(0,i.ZT)(e,t),e.prototype.render=function(e,n,i,r){this.group.removeAll();var s=this._axisGroup;if(this._axisGroup=new a.Group,this.group.add(this._axisGroup),e.get("show")){var l=e.getCoordSysModel(),u=S.bK(l,e),c=new b.Z(e,o.l7({handleAutoShown:function(t){for(var n=l.coordinateSystem.getCartesians(),i=0;i<n.length;i++){var r=n[i].getOtherAxis(e.axis).type;if("value"===r||"log"===r)return!0}return!1}},u));o.S6(C,c.add,c),this._axisGroup.add(c.getGroup()),o.S6(k,(function(t){e.get([t,"show"])&&I[t](this,this._axisGroup,e,l)}),this),a.groupTransition(s,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)}},e.prototype.remove=function(){T(this).splitAreaColors=null},e.type="cartesianAxis",e}(w.Z),I={splitLine:function(t,e,n,i){var r=n.axis;if(!r.scale.isBlank()){var s=n.getModel("splitLine"),l=s.getModel("lineStyle"),u=l.get("color");u=o.kJ(u)?u:[u];for(var c=i.coordinateSystem.getRect(),h=r.isHorizontal(),p=0,d=r.getTicksCoords({tickModel:s}),f=[],g=[],v=l.getLineStyle(),y=0;y<d.length;y++){var m=r.toGlobalCoord(d[y].coord);h?(f[0]=m,f[1]=c.y,g[0]=m,g[1]=c.y+c.height):(f[0]=c.x,f[1]=m,g[0]=c.x+c.width,g[1]=m);var _=p++%u.length,x=d[y].tickValue;e.add(new a.Line({anid:null!=x?"line_"+d[y].tickValue:null,subPixelOptimize:!0,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},style:o.ce({stroke:u[_]},v),silent:!0}))}}},minorSplitLine:function(t,e,n,i){var r=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),s=i.coordinateSystem.getRect(),l=r.isHorizontal(),u=r.getMinorTicksCoords();if(u.length)for(var c=[],h=[],p=o.getLineStyle(),d=0;d<u.length;d++)for(var f=0;f<u[d].length;f++){var g=r.toGlobalCoord(u[d][f].coord);l?(c[0]=g,c[1]=s.y,h[0]=g,h[1]=s.y+s.height):(c[0]=s.x,c[1]=g,h[0]=s.x+s.width,h[1]=g),e.add(new a.Line({anid:"minor_line_"+u[d][f].tickValue,subPixelOptimize:!0,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]},style:p,silent:!0}))}},splitArea:function(t,e,n,i){!function(t,e,n,i){var r=n.axis;if(!r.scale.isBlank()){var s=n.getModel("splitArea"),l=s.getModel("areaStyle"),u=l.get("color"),c=i.coordinateSystem.getRect(),h=r.getTicksCoords({tickModel:s,clamp:!0});if(h.length){var p=u.length,d=T(t).splitAreaColors,f=o.kW(),g=0;if(d)for(var v=0;v<h.length;v++){var y=d.get(h[v].tickValue);if(null!=y){g=(y+(p-1)*v)%p;break}}var m=r.toGlobalCoord(h[0].coord),_=l.getAreaStyle();for(u=o.kJ(u)?u:[u],v=1;v<h.length;v++){var x=r.toGlobalCoord(h[v].coord),b=void 0,w=void 0,S=void 0,M=void 0;r.isHorizontal()?(b=m,w=c.y,S=x-b,M=c.height,m=b+S):(b=c.x,w=m,S=c.width,m=w+(M=x-w));var C=h[v-1].tickValue;null!=C&&f.set(C,g),e.add(new a.Rect({anid:null!=C?"area_"+C:null,shape:{x:b,y:w,width:S,height:M},style:o.ce({fill:u[g]},_),autoBatch:!0,silent:!0})),g=(g+1)%p}T(t).splitAreaColors=f}}}(t,e,n,i)}},D=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.type="xAxis",e}(A),P=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=D.type,e}return(0,i.ZT)(e,t),e.type="yAxis",e}(A);M.Z.registerClass(D),M.Z.registerClass(P);var O=n(3493),L=n(9820);function R(t,e){return t.get(e.uid)||t.set(e.uid,{condExtent:[1/0,-1/0]})}function E(t,e){e<t[0]&&(t[0]=e),e>t[1]&&(t[1]=e)}r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER+10,{getTargetSeries:function(t){var e=(0,o.kW)();return t.eachSeries((function(t){(0,S.Yh)(t)&&e.set(t.uid,t)})),e},overallReset:function(t,e){var n=[],i=(0,o.kW)();!function(t,e,n){t.eachSeries((function(t){if((0,S.Yh)(t)){var i=(0,S.Mk)(t),r=i.xAxisModel,o=i.yAxisModel,a=r.axis,s=o.axis,l=a.scale.rawExtentInfo,u=s.scale.rawExtentInfo,c=t.getData();l&&l.frozen||u&&u.frozen||(n.push({seriesModel:t,xAxisModel:r,yAxisModel:o}),(0,O.AH)(R(e,r).condExtent,c,a.dim),(0,O.AH)(R(e,o).condExtent,c,s.dim))}}))}(t,i,n),function(t,e){(0,o.S6)(e,(function(e){var n=e.xAxisModel,i=e.yAxisModel,r=n.axis,a=i.axis,s=R(t,n),l=R(t,i);s.rawExtentInfo=(0,L.Qw)(r.scale,n,s.condExtent),l.rawExtentInfo=(0,L.Qw)(a.scale,i,l.condExtent),s.rawExtentResult=s.rawExtentInfo.calculate(),l.rawExtentResult=l.rawExtentInfo.calculate();var u,c,h=e.seriesModel.getData(),p={},d={};function f(t,e){var n=e.condExtent,i=e.rawExtentResult;"category"===t.type&&(n[0]<i.min||i.max<n[1])&&(0,o.S6)((0,O.PY)(h,t.dim),(function(e){(0,o.RI)(p,e)||(p[e]=!0,u=t)}))}function g(t,e){var n=e.rawExtentResult;"category"===t.type||n.minFixed&&n.maxFixed||(0,o.S6)((0,O.PY)(h,t.dim),(function(t){(0,o.RI)(p,t)||(0,o.RI)(d,t)||(d[t]=!0,c=e)}))}f(r,s),f(a,l),g(r,s),g(a,l);var v=(0,o.XP)(p),y=(0,o.XP)(d),m=(0,o.UI)(y,(function(){return[1/0,-1/0]})),_=v.length,x=y.length;if(_&&x){var b=1===_?v[0]:null,w=1===x?y[0]:null,S=h.count();if(b&&w)for(var T=0;T<S;T++){var M=h.get(b,T);u.scale.isInExtentRange(M)&&E(m[0],h.get(w,T))}else for(T=0;T<S;T++)for(var C=0;C<_;C++)if(M=h.get(v[C],T),u.scale.isInExtentRange(M)){for(var k=0;k<x;k++)E(m[k],h.get(y[k],T));break}(0,o.S6)(m,(function(t,e){var n=y[e];h.setApproximateExtent(t,n);var i=c.tarExtent=c.tarExtent||[1/0,-1/0];E(i,t[0]),E(i,t[1])}))}}))}(i,n),function(t){t.each((function(t){var e=t.tarExtent;if(e){var n=t.rawExtentResult,i=t.rawExtentInfo;!n.minFixed&&e[0]>n.min&&i.modifyDataMinMax("min",e[0]),!n.maxFixed&&e[1]<n.max&&i.modifyDataMinMax("max",e[1])}}))}(i)}});const Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(s.Z);var N=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return(0,i.ZT)(e,t),e.prototype.render=function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new a.Rect({shape:t.coordinateSystem.getRect(),style:o.ce({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(M.Z);M.Z.registerClass(N),s.Z.registerClass(Z),r.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}))},5966:(t,e,n)=>{"use strict";n.d(e,{b:()=>a,l:()=>s});var i=n(2746),r=n(349),o=n(3696);function a(t,e,n){var r=e.getBoxLayoutParams(),o=e.get("padding"),a={width:n.getWidth(),height:n.getHeight()},s=(0,i.ME)(r,a,o);(0,i.BZ)(e.get("orient"),t,e.get("itemGap"),s.width,s.height),(0,i.p$)(t,r,a,o)}function s(t,e){var n=r.MY(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),new o.Rect({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}},6009:(t,e,n)=>{"use strict";var i=n(8966),r=n(9312),o=n(8778),a=n(4708),s=n(5495),l=n(2822),u=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,r.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,n=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),o.kJ(e)&&o.S6(e,(function(t,i){o.HD(t)&&(t={type:t}),e[i]=o.TS(t,function(t,e){return"all"===e?{type:"all",title:t.getLocale(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocale(["legend","selector","inverse"])}:void 0}(n,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}!e&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var e=[],n=[];t.eachRawSeries((function(i){var r,o=i.name;if(n.push(o),i.legendVisualProvider){var a=i.legendVisualProvider.getAllNames();t.isSeriesFiltered(i)||(n=n.concat(a)),a.length?e=e.concat(a):r=!0}else r=!0;r&&(0,s.yu)(i)&&e.push(i.name)})),this._availableNames=n;var i=this.get("data")||e,r=o.UI(i,(function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new a.Z(t,this,this.ecModel)}),this);this._data=r},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var e=this.option.selected;if("single"===this.get("selectedMode")){var n=this._data;o.S6(n,(function(t){e[t.get("name")]=!1}))}e[t]=!0},e.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,e=this.option.selected;o.S6(t,(function(t){e[t.get("name",!0)]=!0}))},e.prototype.inverseSelect=function(){var t=this._data,e=this.option.selected;o.S6(t,(function(t){var n=t.get("name",!0);e.hasOwnProperty(n)||(e[n]=!0),e[n]=!e[n]}))},e.prototype.isSelected=function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&o.cq(this._availableNames,t)>=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(l.Z);function c(t,e,n){var i,r={},a="toggleSelected"===t;return n.eachComponent("legend",(function(n){a&&null!=i?n[i?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),i=n.isSelected(e.name));var s=n.getData();o.S6(s,(function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);r.hasOwnProperty(e)?r[e]=r[e]&&i:r[e]=i}}))})),"allSelect"===t||"inverseSelect"===t?{selected:r}:{name:e.name,selected:r}}l.Z.registerClass(u),i.registerAction("legendToggleSelect","legendselectchanged",o.WA(c,"toggleSelected")),i.registerAction("legendAllSelect","legendselectall",o.WA(c,"allSelect")),i.registerAction("legendInverseSelect","legendinverseselect",o.WA(c,"inverseSelect")),i.registerAction("legendSelect","legendselected",o.WA(c,"select")),i.registerAction("legendUnSelect","legendunselected",o.WA(c,"unSelect"));var h=n(3111),p=n(3696),d=n(106),f=n(5628),g=n(5966),v=n(2746),y=n(8278),m=n(1756),_=o.WA,x=o.S6,b=p.Group,w=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return(0,r.ZT)(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new b),this.group.add(this._selectorGroup=new b),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),a=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===a?"right":"left");var s=t.get("selector",!0),l=t.get("selectorPosition",!0);!s||l&&"auto"!==l||(l="horizontal"===a?"end":"start"),this.renderInner(r,t,e,n,s,a,l);var u=t.getBoxLayoutParams(),c={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),p=v.ME(u,c,h),d=this.layoutInner(t,r,p,i,s,l),f=v.ME(o.ce({width:d.width,height:d.height},u),c,h);this.group.x=f.x-d.x,this.group.y=f.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=(0,g.l)(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,a,s){var l=this.getContentGroup(),u=o.kW(),c=e.get("selectedMode"),h=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),x(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var s=new b;return s.newline=!0,void l.add(s)}var p=n.getSeriesByName(a)[0];if(!u.get(a))if(p){var d=p.getData(),f=d.getVisual("style"),g=f[d.getVisual("drawType")]||f.fill,v=f.stroke,y=f.decal,x=d.getVisual("legendSymbol")||"roundRect",w=d.getVisual("symbol");this._createItem(a,o,r,e,x,w,t,g,v,y,c).on("click",_(T,a,null,i,h)).on("mouseover",_(C,p.name,null,i,h)).on("mouseout",_(k,p.name,null,i,h)),u.set(a,!0)}else n.eachRawSeries((function(n){if(!u.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var l=s.indexOfName(a),p=s.getItemVisual(l,"style"),d=p.stroke,f=p.decal,g=p.fill,v=(0,m.Qc)(p.fill);v&&0===v[3]&&(v[3]=.2,g=(0,m.Pz)(v,"rgba")),this._createItem(a,o,r,e,"roundRect",null,t,g,d,f,c).on("click",_(T,null,a,i,h)).on("mouseover",_(C,null,a,i,h)).on("mouseout",_(k,null,a,i,h)),u.set(a,!0)}}),this)}),this),r&&this._createSelector(r,e,i,a,s)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();x(t,(function(t){var i=t.type,r=new p.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r);var a=e.getModel("selectorLabel"),s=e.getModel(["emphasis","selectorLabel"]);(0,f.ni)(r,{normal:a,emphasis:s},{defaultText:t.title}),(0,d.vF)(r)}))},e.prototype._createItem=function(t,e,n,i,r,a,s,l,u,c,g){var v=i.get("itemWidth"),y=i.get("itemHeight"),m=i.get("inactiveColor"),_=i.get("inactiveBorderColor"),x=i.get("symbolKeepAspect"),w=i.getModel("itemStyle"),T=i.isSelected(t),M=new b,C=n.getModel("textStyle"),k=n.get("icon"),A=n.getModel("tooltip"),I=A.parentModel;r=k||r;var D=(0,h.t)(r,0,0,v,y,T?l:m,null==x||x);if(M.add(S(D,r,w,u,_,c,T)),!k&&a&&(a!==r||"none"===a)){var P=.8*y;"none"===a&&(a="circle");var O=(0,h.t)(a,(v-P)/2,(y-P)/2,P,P,T?l:m,null==x||x);M.add(S(O,a,w,u,_,c,T))}var L="left"===s?v+5:-5,R=s,E=i.get("formatter"),Z=t;"string"==typeof E&&E?Z=E.replace("{name}",null!=t?t:""):"function"==typeof E&&(Z=E(t)),M.add(new p.Text({style:(0,f.Lr)(C,{text:Z,x:L,y:y/2,fill:T?C.getTextColor():m,align:R,verticalAlign:"middle"})}));var N=new p.Rect({shape:M.getBoundingRect(),invisible:!0});if(A.get("show")){var B={componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]};N.tooltip=o.l7({content:t,formatter:I.get("formatter",!0)||function(t){return t.name},formatterParams:B},A.option)}return M.add(N),M.eachChild((function(t){t.silent=!0})),N.silent=!g,this.getContentGroup().add(M),(0,d.vF)(M),M.__legendDataIndex=e,M},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();v.BZ(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){v.BZ("horizontal",s,t.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,f=0===d?"width":"height",g=0===d?"height":"width",y=0===d?"y":"x";"end"===o?h[d]+=l[f]+p:u[d]+=c[f]+p,h[1-d]+=l[g]/2-c[g]/2,s.x=h[0],s.y=h[1],a.x=u[0],a.y=u[1];var m={x:0,y:0};return m[f]=l[f]+p+c[f],m[g]=Math.max(l[g],c[g]),m[y]=Math.min(0,c[y]+h[1-d]),m}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(y.Z);function S(t,e,n,i,r,o,a){var s;return"line"!==e&&e.indexOf("empty")<0?(s=n.getItemStyle(),t.style.stroke=i,t.style.decal=o,a||(s.stroke=r)):s=n.getItemStyle(["borderWidth","borderColor"]),t.setStyle(s),t}function T(t,e,n,i){k(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),C(t,e,n,i)}function M(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;i<r&&!(e=n[i].states.emphasis);)i++;return e&&e.hoverLayer}function C(t,e,n,i){M(n)||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function k(t,e,n,i){M(n)||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}y.Z.registerClass(w),i.registerProcessor(i.PRIORITY.PROCESSOR.SERIES_FILTER,(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0}))})),l.Z.registerSubTypeDefaulter("legend",(function(){return"plain"}))},9045:(t,e,n)=>{"use strict";var i=n(9312),r=n(8778),o=n(3696),a=n(1563),s=n(5628),l=n(2746),u=n(2822),c=n(8278),h=n(349),p=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,i.ZT)(e,t),e.type="title",e.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(u.Z);u.Z.registerClass(p);var d=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,u=t.getModel("textStyle"),c=t.getModel("subtextStyle"),p=t.get("textAlign"),d=r.pD(t.get("textBaseline"),t.get("textVerticalAlign")),f=new o.Text({style:(0,s.Lr)(u,{text:t.get("text"),fill:u.getTextColor()},{disableBox:!0}),z2:10}),g=f.getBoundingRect(),v=t.get("subtext"),y=new o.Text({style:(0,s.Lr)(c,{text:v,fill:c.getTextColor(),y:g.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),m=t.get("link"),_=t.get("sublink"),x=t.get("triggerEvent",!0);f.silent=!m&&!x,y.silent=!_&&!x,m&&f.on("click",(function(){(0,h.MI)(m,"_"+t.get("target"))})),_&&y.on("click",(function(){(0,h.MI)(_,"_"+t.get("subtarget"))})),(0,a.A)(f).eventData=(0,a.A)(y).eventData=x?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(f),v&&i.add(y);var b=i.getBoundingRect(),w=t.getBoxLayoutParams();w.width=b.width,w.height=b.height;var S=(0,l.ME)(w,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));p||("middle"===(p=t.get("left")||t.get("right"))&&(p="center"),"right"===p?S.x+=S.width:"center"===p&&(S.x+=S.width/2)),d||("center"===(d=t.get("top")||t.get("bottom"))&&(d="middle"),"bottom"===d?S.y+=S.height:"middle"===d&&(S.y+=S.height/2),d=d||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var T={align:p,verticalAlign:d};f.setStyle(T),y.setStyle(T),b=i.getBoundingRect();var M=S.margin,C=t.getItemStyle(["color","opacity"]);C.fill=t.get("backgroundColor");var k=new o.Rect({shape:{x:b.x-M[3],y:b.y-M[0],width:b.width+M[1]+M[3],height:b.height+M[0]+M[2],r:t.get("borderRadius")},style:C,subPixelOptimize:!0,silent:!0});i.add(k)}},e.type="title",e}(c.Z);c.Z.registerClass(d)},2124:(t,e,n)=>{"use strict";var i=n(9312),r=n(8778),o=function(){},a={};function s(t,e){a[t]=e}function l(t){return a[t]}var u=n(2822),c=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;r.S6(this.option.feature,(function(t,n){var i=l(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),r.TS(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}},e}(u.Z);u.Z.registerClass(c);var h=n(9356),p=n(3696),d=n(106),f=n(4708),g=n(7586),v=n(5966),y=n(8278),m=n(4053),_=n(4239),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n,i){var a=this.group;if(a.removeAll(),t.get("show")){var s=+t.get("itemSize"),u=t.get("feature")||{},c=this._features||(this._features={}),y=[];r.S6(u,(function(t,e){y.push(e)})),new g.Z(this._featureNames||[],y).add(x).update(x).remove(r.WA(x,null)).execute(),this._featureNames=y,v.b(a,t,n),a.add(v.l(a.getBoundingRect(),t)),a.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),o=i.textConfig||(i.textConfig={}),l=t.getTextContent(),u=l&&l.states.emphasis;if(u&&!r.mf(u)&&e){var c=u.style||(u.style={}),p=h.lP(e,_.ZP.makeFont(c)),d=t.x+a.x,f=!1;t.y+a.y+s+p.height>n.getHeight()&&(o.position="top",f=!0);var g=f?-5-p.height:s+8;d+p.width/2>n.getWidth()?(o.position=["100%",g],c.align="right"):d-p.width/2<0&&(o.position=[0,g],c.align="left")}}))}function x(h,g){var v,x=y[h],b=y[g],w=u[x],S=new f.Z(w,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===x&&(w.title=i.newTitle),x&&!b){if(function(t){return 0===t.indexOf("my")}(x))v={onclick:S.option.onclick,featureName:x};else{var T=l(x);if(!T)return;v=new T}c[x]=v}else if(!(v=c[b]))return;if(v.uid=(0,m.Kr)("toolbox-feature"),v.model=S,v.ecModel=e,v.api=n,v instanceof o){if(!x&&b)return void(v.dispose&&v.dispose(e,n));if(!S.get("show")||v.unusable)return void(v.remove&&v.remove(e,n))}!function(i,l,u){var c,h,f=i.getModel("iconStyle"),g=i.getModel(["emphasis","iconStyle"]),v=l instanceof o&&l.getIcons?l.getIcons():i.get("icon"),y=i.get("title")||{};"string"==typeof v?(c={})[u]=v:c=v,"string"==typeof y?(h={})[u]=y:h=y;var m=i.iconPaths={};r.S6(c,(function(o,u){var c=p.createIcon(o,{},{x:-s/2,y:-s/2,width:s,height:s});c.setStyle(f.getItemStyle()),c.ensureState("emphasis").style=g.getItemStyle();var v=new _.ZP({style:{text:h[u],align:g.get("textAlign"),borderRadius:g.get("textBorderRadius"),padding:g.get("textPadding"),fill:null},ignore:!0});c.setTextContent(v);var y=t.getModel("tooltip");y&&y.get("show")&&(c.tooltip=r.l7({content:h[u],formatter:y.get("formatter",!0)||function(){return h[u]},formatterParams:{componentType:"toolbox",name:u,title:h[u],$vars:["name","title"]},position:y.get("position",!0)||"bottom"},y.option)),c.__title=h[u],c.on("mouseover",(function(){var e=g.getItemStyle(),n="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";v.setStyle({fill:g.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:g.get("textBackgroundColor")}),c.setTextConfig({position:g.get("textPosition")||n}),v.ignore=!t.get("showTitle"),(0,d.fD)(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",u])&&(0,d.Mh)(this),v.hide()})),("emphasis"===i.get(["iconStatus",u])?d.fD:d.Mh)(c),a.add(c),c.on("click",r.ak(l.onclick,l,e,n,u)),m[u]=c}))}(S,v,x),S.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?d.fD:d.Mh)(i[t])},v instanceof o&&v.render&&v.render(S,e,n,i)}},e.prototype.updateView=function(t,e,n,i){r.S6(this._features,(function(t){t instanceof o&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){r.S6(this._features,(function(n){n instanceof o&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){r.S6(this._features,(function(n){n instanceof o&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(y.Z);y.Z.registerClass(x);var b=n(8781),w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType()?"svg":n.get("type",!0)||"png",o=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||b.Z.browser.ie||b.Z.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var a=atob(o.split(",")[1]),s=a.length,l=new Uint8Array(s);s--;)l[s]=a.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,i+"."+r)}else{var c=n.get("lang"),h='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(h)}else{var p=document.createElement("a");p.download=i+"."+r,p.target="_blank",p.href=o;var d=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});p.dispatchEvent(d)}},e.getDefaultOption=function(t){return{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.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:t.getLocale(["toolbox","saveAsImage","lang"])}},e}(o);w.prototype.unusable=!b.Z.canvasSupported,s("saveAsImage",w);var S=n(8966),T=n(5495),M="__ec_magicType_stack__",C=[["line","bar"],["stack"]],k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return r.S6(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{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.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,o=i.get(["seriesIndex",n]);if(A[n]){var a,s={series:[]};r.S6(C,(function(t){r.cq(t,n)>=0&&r.S6(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(t){var e=t.subType,o=t.id,a=A[n](e,o,t,i);a&&(r.ce(a,t.option),s.series.push(a));var l=t.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===n||"bar"===n)){var u=l.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",h=t.getReferringComponents(c,T.C6).models[0].componentIndex;s[c]=s[c]||[];for(var p=0;p<=h;p++)s[c][h]=s[c][h]||{};s[c][h].boundaryGap="bar"===n}}})),"stack"===n&&(a=r.TS({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title)),e.dispatchAction({type:"changeMagicType",currentType:n,newOption:s,newTitle:a,featureName:"magicType"})}},e}(o),A={line:function(t,e,n,i){if("bar"===t)return r.TS({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return r.TS({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var o=n.get("stack")===M;if("line"===t||"bar"===t)return i.setIconStatus("stack",o?"normal":"emphasis"),r.TS({id:e,stack:o?"":M},i.get(["option","stack"])||{},!0)}};S.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)})),s("magicType",k);var I=n(3837),D=new Array(60).join("-"),P="\t";function O(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var L=new RegExp("[\t]+","g");function R(t,e){return r.UI(t,(function(t,n){var i=e&&e[n];if(r.Kn(i)&&!r.kJ(i)){r.Kn(t)&&!r.kJ(t)||(t={value:t});var o=null!=i.name&&null==t.name;return t=r.ce(t,i),o&&delete t.name,t}return t}))}s("dataView",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.onclick=function(t,e){var n=e.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=i.get("backgroundColor")||"#fff";var a=document.createElement("h4"),s=i.get("lang")||[];a.innerHTML=s[0]||i.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=i.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var c=i.get("optionToContent"),h=i.get("contentToOption"),p=function(t){var e,n,i,o=function(t){var e={},n=[],i=[];return t.eachRawSeries((function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else n.push(t)}})),{seriesGroupByCategoryAxis:e,other:n,meta:i}}(t);return{value:r.hX([(n=o.seriesGroupByCategoryAxis,i=[],r.S6(n,(function(t,e){var n=t.categoryAxis,o=t.valueAxis.dim,a=[" "].concat(r.UI(t.series,(function(t){return t.name}))),s=[n.model.getCategories()];r.S6(t.series,(function(t){var e=t.getRawData();s.push(t.getRawData().mapArray(e.mapDimension(o),(function(t){return t})))}));for(var l=[a.join(P)],u=0;u<s[0].length;u++){for(var c=[],h=0;h<s.length;h++)c.push(s[h][u]);l.push(c.join(P))}i.push(l.join("\n"))})),i.join("\n\n"+D+"\n\n")),(e=o.other,r.UI(e,(function(t){var e=t.getRawData(),n=[t.name],i=[];return e.each(e.dimensions,(function(){for(var t=arguments.length,r=arguments[t-1],o=e.getName(r),a=0;a<t-1;a++)i[a]=arguments[a];n.push((o?o+P:"")+i.join(P))})),n.join("\n")})).join("\n\n"+D+"\n\n"))],(function(t){return!!t.replace(/[\n\t\s]/g,"")})).join("\n\n"+D+"\n\n"),meta:o.meta}}(t);if("function"==typeof c){var d=c(e.getOption());"string"==typeof d?l.innerHTML=d:r.Mh(d)&&l.appendChild(d)}else l.appendChild(u),u.readOnly=i.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=i.get("textColor"),u.style.borderColor=i.get("textareaBorderColor"),u.style.backgroundColor=i.get("textareaColor"),u.value=p.value;var f=p.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var v="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",y=document.createElement("div"),m=document.createElement("div");v+=";background-color:"+i.get("buttonColor"),v+=";color:"+i.get("buttonTextColor");var _=this;function x(){n.removeChild(o),_._dom=null}(0,I.Oo)(y,"click",x),(0,I.Oo)(m,"click",(function(){if(null==h&&null!=c||null!=h&&null==c)x();else{var t;try{t="function"==typeof h?h(l,e.getOption()):function(t,e){var n=t.split(new RegExp("\n*"+D+"\n*","g")),i={series:[]};return r.S6(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(P)>=0)return!0}(t)){var o=function(t){for(var e=t.split(/\n+/g),n=O(e.shift()).split(L),i=[],o=r.UI(n,(function(t){return{name:t,data:[]}})),a=0;a<e.length;a++){var s=O(e[a]).split(L);i.push(s.shift());for(var l=0;l<s.length;l++)o[l]&&(o[l].data[a]=s[l])}return{series:o,categories:i}}(t),a=e[n],s=a.axisDim+"Axis";a&&(i[s]=i[s]||[],i[s][a.axisIndex]={data:o.categories},i.series=i.series.concat(o.series))}else o=function(t){for(var e=t.split(/\n+/g),n=O(e.shift()),i=[],r=0;r<e.length;r++){var o=O(e[r]);if(o){var a=o.split(L),s="",l=void 0,u=!1;isNaN(a[0])?(u=!0,s=a[0],a=a.slice(1),i[r]={name:s,value:[]},l=i[r].value):l=i[r]=[];for(var c=0;c<a.length;c++)l.push(+a[c]);1===l.length&&(u?i[r].value=l[0]:i[r]=l[0])}}return{name:n,data:i}}(t),i.series.push(o)})),i}(u.value,f)}catch(t){throw x(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),x()}})),y.innerHTML=s[1],m.innerHTML=s[2],m.style.cssText=v,y.style.cssText=v,!i.get("readOnly")&&g.appendChild(m),g.appendChild(y),o.appendChild(a),o.appendChild(l),o.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},e.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.getDefaultOption=function(t){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocale(["toolbox","dataView","title"]),lang:t.getLocale(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},e}(o)),S.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(t,e){var n=[];r.S6(t.newOption.series,(function(t){var i=e.getSeriesByName(t.name)[0];if(i){var o=i.get("data");n.push({name:t.name,data:R(t.data,o)})}else n.push(r.l7({type:"scatter"},t))})),e.mergeOption(r.ce({series:n},t.newOption))}));var E=n(444),Z="\0_ec_interaction_mutex";function N(t){return t[Z]||(t[Z]={})}S.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var B=!0,z=Math.min,F=Math.max,W=Math.pow,V={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},H={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},U={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},G=0,X=function(t){function e(e){var n=t.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new p.Group,n._uid="brushController_"+G++,(0,r.S6)(_t,(function(t,e){this._handlers[e]=(0,r.ak)(t,this)}),n),n}return(0,i.ZT)(e,t),e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var e=this._zr;this._enableGlobalPan||function(t,e,n){N(t).globalPan=n}(e,0,this._uid),(0,r.S6)(this._handlers,(function(t,n){e.on(n,t)})),this._brushType=t.brushType,this._brushOption=(0,r.TS)((0,r.d9)(U),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;!function(t,e,n){var i=N(t);i.globalPan===n&&(i.globalPan=null)}(t,0,this._uid),(0,r.S6)(this._handlers,(function(e,n){t.off(n,e)})),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var e=this._panels={};(0,r.S6)(t,(function(t){e[t.panelId]=(0,r.d9)(t)}))}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=(0,r.UI)(t,(function(t){return(0,r.TS)((0,r.d9)(U),t,!0)}));var e=this._covers,n=this._covers=[],i=this,o=this._creatingCover;return new g.Z(e,t,(function(t,e){return a(t.__brushOption,e)}),a).add(s).update(s).remove((function(t){e[t]!==o&&i.group.remove(e[t])})).execute(),this;function a(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function s(r,a){var s=t[r];if(null!=a&&e[a]===o)n[r]=e[a];else{var l=n[r]=null!=a?(e[a].__brushOption=s,e[a]):j(i,Y(i,s));K(i,l)}}},e.prototype.unmount=function(){return this.enableBrush(!1),et(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(E.Z);function Y(t,e){var n=bt[e.brushType].createCover(t,e);return n.__brushOption=e,q(n,e),t.group.add(n),n}function j(t,e){var n=J(e);return n.endCreating&&(n.endCreating(t,e),q(e,e.__brushOption)),e}function $(t,e){var n=e.__brushOption;J(e).updateCoverShape(t,e,n.range,n)}function q(t,e){var n=e.z;null==n&&(n=1e4),t.traverse((function(t){t.z=n,t.z2=n}))}function K(t,e){J(e).updateCommon(t,e),$(t,e)}function J(t){return bt[t.__brushOption.brushType]}function Q(t,e,n){var i,o=t._panels;if(!o)return B;var a=t._transform;return(0,r.S6)(o,(function(t){t.isTargetByCursor(e,n,a)&&(i=t)})),i}function tt(t,e){var n=t._panels;if(!n)return B;var i=e.__brushOption.panelId;return null!=i?n[i]:B}function et(t){var e=t._covers,n=e.length;return(0,r.S6)(e,(function(e){t.group.remove(e)}),t),e.length=0,!!n}function nt(t,e){var n=(0,r.UI)(t._covers,(function(t){var e=t.__brushOption,n=(0,r.d9)(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}}));t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function it(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function rt(t,e,n,i){var o=new p.Group;return o.add(new p.Rect({name:"main",style:lt(n),silent:!0,draggable:!0,cursor:"move",drift:(0,r.WA)(ht,t,e,o,["n","s","w","e"]),ondragend:(0,r.WA)(nt,e,{isEnd:!0})})),(0,r.S6)(i,(function(n){o.add(new p.Rect({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:(0,r.WA)(ht,t,e,o,n),ondragend:(0,r.WA)(nt,e,{isEnd:!0})}))})),o}function ot(t,e,n,i){var r=i.brushStyle.lineWidth||0,o=F(r,6),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,c=n[0][1],h=n[1][1],p=c-o+r/2,d=h-o+r/2,f=c-a,g=h-s,v=f+r,y=g+r;st(t,e,"main",a,s,f,g),i.transformable&&(st(t,e,"w",l,u,o,y),st(t,e,"e",p,u,o,y),st(t,e,"n",l,u,v,o),st(t,e,"s",l,d,v,o),st(t,e,"nw",l,u,o,o),st(t,e,"ne",p,u,o,o),st(t,e,"sw",l,d,o,o),st(t,e,"se",p,d,o,o))}function at(t,e){var n=e.__brushOption,i=n.transformable,o=e.childAt(0);o.useStyle(lt(n)),o.attr({silent:!i,cursor:i?"move":"default"}),(0,r.S6)([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var r=e.childOfName(n.join("")),o=1===n.length?ct(t,n[0]):function(t,e){var n=[ct(t,e[0]),ct(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?H[o]+"-resize":null})}))}function st(t,e,n,i,r,o,a){var s,l,u,c=e.childOfName(n);c&&c.setShape((s=ft(t,e,[[i,r],[i+o,r+a]]),{x:l=z(s[0][0],s[1][0]),y:u=z(s[0][1],s[1][1]),width:F(s[0][0],s[1][0])-l,height:F(s[0][1],s[1][1])-u}))}function lt(t){return(0,r.ce)({strokeNoScale:!0},t.brushStyle)}function ut(t,e,n,i){var r=[z(t,n),z(e,i)],o=[F(t,n),F(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function ct(t,e){return{left:"w",right:"e",top:"n",bottom:"s"}[p.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return p.getTransform(t.group)}(t))]}function ht(t,e,n,i,o,a){var s=n.__brushOption,l=t.toRectRange(s.range),u=dt(e,o,a);(0,r.S6)(i,(function(t){var e=V[t];l[e[0]][e[1]]+=u[e[0]]})),s.range=t.fromRectRange(ut(l[0][0],l[1][0],l[0][1],l[1][1])),K(e,n),nt(e,{isEnd:!1})}function pt(t,e,n,i){var o=e.__brushOption.range,a=dt(t,n,i);(0,r.S6)(o,(function(t){t[0]+=a[0],t[1]+=a[1]})),K(t,e),nt(t,{isEnd:!1})}function dt(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function ft(t,e,n){var i=tt(t,e);return i&&i!==B?i.clipPath(n,t._transform):(0,r.d9)(n)}function gt(t){var e=t.event;e.preventDefault&&e.preventDefault()}function vt(t,e,n){return t.childOfName("main").contain(e,n)}function yt(t,e,n,i){var o,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],o=n[1]-i[1];return W(r*r+o*o,.5)>6}(t)||a){if(s&&!a){"single"===l.brushMode&&et(t);var u=(0,r.d9)(l);u.brushType=mt(u.brushType,s),u.panelId=s===B?null:s.panelId,a=t._creatingCover=Y(t,u),t._covers.push(a)}if(a){var c=bt[mt(t._brushType,s)];a.__brushOption.range=c.getCreatingRange(ft(t,a,t._track)),i&&(j(t,a),c.updateCommon(t,a)),$(t,a),o={isEnd:i}}}else i&&"single"===l.brushMode&&l.removeOnClick&&Q(t,e,n)&&et(t)&&(o={isEnd:i,removeOnClick:!0});return o}function mt(t,e){return"auto"===t?e.defaultBrushType:t}var _t={mousedown:function(t){if(this._dragging)xt(this,t);else if(!t.target||!t.target.draggable){gt(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Q(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=Q(t,e,n);if(!t._dragging)for(var a=0;a<r.length;a++){var s=r[a].__brushOption;if(o&&(o===B||s.panelId===o.panelId)&&bt[s.brushType].contain(r[a],n[0],n[1]))return}o&&i.setCursorStyle("crosshair")}}(this,t,i),this._dragging){gt(t);var r=yt(this,t,i,!1);r&&nt(this,r)}},mouseup:function(t){xt(this,t)}};function xt(t,e){if(t._dragging){gt(e);var n=e.offsetX,i=e.offsetY,r=t.group.transformCoordToLocal(n,i),o=yt(t,e,r,!0);t._dragging=!1,t._track=[],t._creatingCover=null,o&&nt(t,o)}}var bt={lineX:wt(0),lineY:wt(1),rect:{createCover:function(t,e){function n(t){return t}return rt({toRectRange:n,fromRectRange:n},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=it(t);return ut(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){ot(t,e,n,i)},updateCommon:at,contain:vt},polygon:{createCover:function(t,e){var n=new p.Group;return n.add(new p.Polyline({name:"main",style:lt(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new p.Polygon({name:"main",draggable:!0,drift:(0,r.WA)(pt,t,e),ondragend:(0,r.WA)(nt,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:ft(t,e,n)})},updateCommon:at,contain:vt}};function wt(t){return{createCover:function(e,n){return rt({toRectRange:function(e){var n=[e,[0,100]];return t&&n.reverse(),n},fromRectRange:function(e){return e[t]}},e,n,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var n=it(e);return[z(n[0][t],n[1][t]),F(n[0][t],n[1][t])]},updateCoverShape:function(e,n,i,r){var o,a=tt(e,n);if(a!==B&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(t);else{var s=e._zr;o=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[i,o];t&&l.reverse(),ot(e,n,l,r)},updateCommon:at,contain:vt}}const St=X;var Tt=n(9472),Mt={axisPointer:1,tooltip:1,brush:1};function Ct(t){return t=It(t),function(e){return p.clipPointsByRect(e,t)}}function kt(t,e){return t=It(t),function(n){var i=null!=e?e:n,r=i?t.width:t.height,o=i?t.x:t.y;return[o,o+(r||0)]}}function At(t,e,n){var i=It(t);return function(t,r){return i.contain(r[0],r[1])&&!function(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!Mt.hasOwnProperty(i.mainType)&&r&&r.model!==n}(t,e,n)}}function It(t){return Tt.Z.create(t)}var Dt=["dataToPoint","pointToData"],Pt=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Ot=function(){function t(t,e,n){var i=this;this._targetInfoList=[];var o=Rt(e,t);(0,r.S6)(Et,(function(t,e){(!n||!n.include||(0,r.cq)(n.include,e)>=0)&&t(o,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=Bt[t.brushType](0,n,e);t.__rangeOffset={offset:Ft[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){(0,r.S6)(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&(0,r.S6)(i.coordSyses,(function(i){var r=Bt[t.brushType](1,i,t.range);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){(0,r.S6)(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=Bt[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?Ft[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=Vt(n),o=Vt(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return(0,r.UI)(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:Ct(i),isTargetByCursor:At(i,t,n.coordSysModel),getLinearBrushOtherExtent:kt(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&(0,r.cq)(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=Rt(e,t),r=0;r<n.length;r++){var o=n[r],a=t.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<Zt.length;s++)if(Zt[s](i,o))return o}return!0},t}();function Lt(t){return t[0]>t[1]&&t.reverse(),t}function Rt(t,e){return(0,T.pm)(t,e,{includeMainTypes:Pt})}var Et={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,o=t.gridModels,a=(0,r.kW)(),s={},l={};(n||i||o)&&((0,r.S6)(n,(function(t){var e=t.axis.grid.model;a.set(e.id,e),s[e.id]=!0})),(0,r.S6)(i,(function(t){var e=t.axis.grid.model;a.set(e.id,e),l[e.id]=!0})),(0,r.S6)(o,(function(t){a.set(t.id,t),s[t.id]=!0,l[t.id]=!0})),a.each((function(t){var o=t.coordinateSystem,a=[];(0,r.S6)(o.getCartesians(),(function(t,e){((0,r.cq)(n,t.getAxis("x").model)>=0||(0,r.cq)(i,t.getAxis("y").model)>=0)&&a.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:Nt.grid,xAxisDeclared:s[t.id],yAxisDeclared:l[t.id]})})))},geo:function(t,e){(0,r.S6)(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:Nt.geo})}))}},Zt=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],Nt={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(p.getTransform(t)),e}},Bt={lineX:(0,r.WA)(zt,0),lineY:(0,r.WA)(zt,1),rect:function(t,e,n){var i=e[Dt[t]]([n[0][0],n[1][0]]),r=e[Dt[t]]([n[0][1],n[1][1]]),o=[Lt([i[0],r[0]]),Lt([i[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:(0,r.UI)(n,(function(n){var r=e[Dt[t]](n);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r})),xyMinMax:i}}};function zt(t,e,n,i){var o=n.getAxis(["x","y"][t]),a=Lt((0,r.UI)([0,1],(function(t){return e?o.coordToData(o.toLocalCoord(i[t])):o.toGlobalCoord(o.dataToCoord(i[t]))}))),s=[];return s[t]=a,s[1-t]=[NaN,NaN],{values:a,xyMinMax:s}}var Ft={lineX:(0,r.WA)(Wt,0),lineY:(0,r.WA)(Wt,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return(0,r.UI)(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function Wt(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function Vt(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}const Ht=Ot;var Ut=r.S6,Gt=(0,T.Yf)();function Xt(t){var e=Gt(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}function Yt(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=$t(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=$t(s,[0,a]),r=o=$t(s,[r,o]),i=0}e[0]=$t(e[0],n),e[1]=$t(e[1],n);var l=jt(e,i);e[i]+=t;var u,c=r||0,h=n.slice();return l.sign<0?h[0]+=c:h[1]-=c,e[i]=$t(e[i],h),u=jt(e,i),null!=r&&(u.sign!==l.sign||u.span<r)&&(e[1-i]=e[i]+l.sign*r),u=jt(e,i),null!=o&&u.span>o&&(e[1-i]=e[i]+u.sign*o),e}function jt(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function $t(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}u.Z.registerSubTypeDefaulter("dataZoom",(function(){return"slider"}));var qt=["x","y","radius","angle","single"],Kt=["cartesian2d","polar","singleAxis"];function Jt(t){return t+"Axis"}var Qt=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}();function te(t){var e={};return(0,r.S6)(["start","end","startValue","endValue","throttle"],(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}const ee=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){var i=te(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=te(t);(0,r.TS)(this.option,t,!0),(0,r.TS)(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;(0,r.S6)([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=(0,r.kW)();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return(0,r.S6)(qt,(function(n){var i=this.getReferringComponents(Jt(n),T.iP);if(i.specified){e=!0;var o=new Qt;(0,r.S6)(i.models,(function(t){o.add(t.componentIndex)})),t.set(n,o)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var o="vertical"===e?"y":"x";a(n.findComponents({mainType:o+"Axis"}),o)}function a(e,n){var o=e[0];if(o){var a=new Qt;if(a.add(o.componentIndex),t.set(n,a),i=!1,"x"===n||"y"===n){var s=o.getReferringComponents("grid",T.C6).models[0];s&&(0,r.S6)(e,(function(t){o.componentIndex!==t.componentIndex&&s===t.getReferringComponents("grid",T.C6).models[0]&&a.add(t.componentIndex)}))}}}i&&a(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single"),i&&(0,r.S6)(qt,(function(e){if(i){var r=n.findComponents({mainType:Jt(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new Qt;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");(0,r.S6)([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(Jt(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){(0,r.S6)(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(Jt(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;(0,r.S6)([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;(0,r.S6)(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var r=n[i],o=this._targetAxisInfoMap.get(r),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(r,o.indexList[a]);if(s.hostedBy(this))return s;e||(e=s)}return e},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={zlevel:0,z:4,filterMode:"filter",start:0,end:100},e}(u.Z);var ne=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},e.type="dataZoom",e}(y.Z);y.Z.registerClass(ne);const ie=ne;var re=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.type="dataZoom.select",e}(ee);u.Z.registerClass(re);var oe=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.type="dataZoom.select",e}(ie);y.Z.registerClass(oe);var ae=n(9199),se=n(3493),le=n(9820),ue=r.S6,ce=ae.dt;const he=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries((function(e){if(function(t){var e=t.get("coordinateSystem");return(0,r.cq)(Kt,e)>=0}(e)){var n=Jt(this._dimName),i=e.getReferringComponents(n,T.C6).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return r.d9(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];ue(["start","end"],(function(l,u){var c=t[l],h=t[l+"Value"];"percent"===r[u]?(null==c&&(c=o[u]),h=i.parse(ae.NU(c,o,n))):(e=!0,h=null==h?n[u]:i.parse(h),c=ae.NU(h,n,o)),s[u]=h,a[u]=c})),ce(s),ce(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";Yt(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=ae.NU(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];ue(n,(function(t){(0,se.AH)(i,t.getData(),e)}));var r=t.getAxisModel(),o=(0,le.Qw)(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&ue(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);i.length&&("weakFilter"===r?e.filterSelf((function(t){for(var n,r,a,s=0;s<i.length;s++){var l=e.get(i[s],t),u=!isNaN(l),c=l<o[0],h=l>o[1];if(u&&!c&&!h)return!0;u&&(a=!0),c&&(n=!0),h&&(r=!0)}return a&&n&&r})):ue(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}})),ue(i,(function(t){e.setApproximateExtent(o,t)})))}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;ue(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=ae.NU(n[0]+o,n,[0,100],!0):null!=r&&(o=ae.NU(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=ae.M9(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();S.registerProcessor(S.PRIORITY.PROCESSOR.FILTER,{getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(Jt(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new he(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=(0,r.kW)();return(0,r.S6)(n,(function(t){(0,r.S6)(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}}),S.registerAction("dataZoom",(function(t,e){var n=function(t,e){var n,i=(0,r.kW)(),o=[],a=(0,r.kW)();t.eachComponent({mainType:"dataZoom",query:e},(function(t){a.get(t.uid)||l(t)}));do{n=!1,t.eachComponent("dataZoom",s)}while(n);function s(t){!a.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(l(t),n=!0)}function l(t){a.set(t.uid,!0),o.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return o}(e,t);r.S6(n,(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}));var pe=n(4841),de=r.S6,fe=(0,T.g0)("toolbox-dataZoom_"),ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n,i){this.brushController||(this.brushController=new St(n.getZr()),this.brushController.on("brush",r.ak(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n.isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n.isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new Ht(ye(t),e,{include:["grid"]}).makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n.brushController.setPanels(a).enableBrush(!(!o||!a.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return Xt(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){ve[n].call(this)},e.prototype.remove=function(t,e){this.brushController.unmount()},e.prototype.dispose=function(t,e){this.brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this.brushController.updateCovers([]),new Ht(ye(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=Xt(t);Ut(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=Yt(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];de(t,(function(t,n){e.push(r.d9(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{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.getLocale(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(o),ve={zoom:function(){var t=!this.isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=Xt(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return Ut(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function ye(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}s("dataZoom",ge),(0,pe.f)("dataZoom",(function(t){var e=t.getComponent("toolbox",0);if(e){var n=e.getModel(["feature","dataZoom"]),i=[],r=ye(n),o=(0,T.pm)(t,r);return de(o.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),de(o.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),i}function a(t,e,r){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:fe+e+o};a[r]=o,i.push(a)}})),s("restore",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.onclick=function(t,e){!function(t){Gt(t).snapshots=null}(t),e.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){return{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.getLocale(["toolbox","restore","title"])}},e}(o)),S.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")}))},3121:(t,e,n)=>{"use strict";var i=n(8966),r=n(8778),o=n(4566),a=n(5495);function s(t,e){var n,i=[],o=t.seriesIndex;if(null==o||!(n=e.getSeriesByIndex(o)))return{point:[]};var s=n.getData(),l=a.gO(s,t);if(null==l||l<0||r.kJ(l))return{point:[]};var u=s.getItemGraphicEl(l),c=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(l)||[];else if(c&&c.dataToPoint)if(t.isStacked){var h=c.getBaseAxis(),p=c.getOtherAxis(h).dim,d=h.dim,f="x"===p||"radius"===p?1:0,g=s.mapDimension(d),v=[];v[f]=s.get(g,l),v[1-f]=s.get(s.getCalculationInfo("stackResultDimension"),l),i=c.dataToPoint(v)||[]}else i=c.dataToPoint(s.getValues(r.UI(c.dimensions,(function(t){return s.mapDimension(t)})),l))||[];else if(u){var y=u.getBoundingRect().clone();y.applyTransform(u.transform),i=[y.x+y.width/2,y.y+y.height/2]}return{point:i,el:u}}var l=(0,a.Yf)();function u(t,e,n,i,o){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e))if(t.involveSeries){var s=function(t,e){var n=e.axis,i=n.dim,o=t,a=[],s=Number.MAX_VALUE,l=-1;return(0,r.S6)(e.seriesModels,(function(e,u){var c,h,p=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(p,t,n);h=d.dataIndices,c=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(p[0],t,"category"===n.type?.5:null)).length)return;c=e.getData().get(p[0],h[0])}if(null!=c&&isFinite(c)){var f=t-c,g=Math.abs(f);g<=s&&((g<s||f>=0&&l<0)&&(s=g,l=f,o=c,a.length=0),(0,r.S6)(h,(function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:a,snapToValue:o}}(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==o.seriesIndex&&(0,r.l7)(o,l[0]),!i&&t.snap&&a.containData(u)&&null!=u&&(e=u),n.showPointer(t,e,l),n.showTooltip(t,s,u)}else n.showPointer(t,e)}function c(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function h(t,e,n,i){var r=n.payloadBatch,a=e.axis,s=a.model,l=e.axisPointerModel;if(e.triggerTooltip&&r.length){var u=e.coordSys.model,c=o.zm(u),h=t.map[c];h||(h=t.map[c]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:i,valueLabelOpt:{precision:l.get(["label","precision"]),formatter:l.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function p(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function d(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}var f=n(9312),g=n(8781),v=(0,a.Yf)(),y=r.S6;function m(t,e,n){if(!g.Z.node){var i=e.getZr();v(i).records||(v(i).records={}),function(t,e){function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);y(v(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}v(t).initialized||(v(t).initialized=!0,n("click",r.WA(x,"click")),n("mousemove",r.WA(x,"mousemove")),n("globalout",_))}(i,e),(v(i).records[t]||(v(i).records[t]={})).handler=n}}function _(t,e,n){t.handler("leave",null,n)}function x(t,e,n,i){e.handler(t,n,i)}function b(t,e){if(!g.Z.node){var n=e.getZr();(v(n).records||{})[t]&&(v(n).records[t]=null)}}var w=n(8278),S=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,f.ZT)(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";m("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){b("axisPointer",e)},e.prototype.dispose=function(t,e){b("axisPointer",e)},e.type="axisPointer",e}(w.Z);w.Z.registerClass(S);var T=n(3696),M=n(3837),C=n(4013),k=(0,a.Yf)(),A=r.d9,I=r.ak;function D(t,e,n,i){P(k(n).lastProp,i)||(k(n).lastProp=i,e?T.updateProps(n,i,t):(n.stopAnimation(),n.attr(i)))}function P(t,e){if(r.Kn(t)&&r.Kn(e)){var n=!0;return r.S6(e,(function(e,i){n=n&&P(t[i],e)})),!!n}return t===e}function O(t,e){t[e.get(["label","show"])?"show":"hide"]()}function L(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function R(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}const E=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,i){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var s=this._group,l=this._handle;if(!a||"hide"===a)return s&&s.hide(),void(l&&l.hide());s&&s.show(),l&&l.show();var u={};this.makeElOption(u,o,t,e,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(t,e);if(s){var p=r.WA(D,e,h);this.updatePointerEl(s,u,p),this.updateLabelEl(s,u,p,e)}else s=this._group=new T.Group,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),n.getZr().add(s);R(s,e,!0),this._renderHandle(o)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===n||null==n){var s=this.animationThreshold;if(r&&i.getBandWidth()>s)return!0;if(a){var l=o.r(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=k(t).pointerEl=new T[r.type](A(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=k(t).labelEl=new T.Text(A(e.label));t.add(r),O(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=k(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=k(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),O(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,a=n.getModel("handle"),s=n.get("status");if(!a.get("show")||!s||"hide"===s)return o&&i.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=T.createIcon(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){M.sT(t.event)},onmousedown:I(this._onHandleDragMove,this,0,0),drift:I(this._onHandleDragMove,this),ondragend:I(this._onHandleDragEnd,this)}),i.add(o)),R(o,n,!1),o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");r.kJ(l)||(l=[l,l]),o.scaleX=l[0]/2,o.scaleY=l[1]/2,C.T9(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){D(this._axisPointerModel,!e&&this._moveAnimation,this._handle,L(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(L(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(L(i)),k(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();var Z=n(9356),N=n(349),B=n(561),z=n(3493),F=n(8637),W=n(5628);function V(t,e,n,i,o){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:o.precision}),s=o.formatter;if(s){var l={value:z.DX(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};r.S6(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&l.seriesData.push(r)})),r.HD(s)?a=s.replace("{value}",a):r.mf(s)&&(a=s(l))}return a}function H(t,e,n){var i=B.Ue();return B.U1(i,i,n.rotation),B.Iu(i,i,n.position),T.applyTransform([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}var U=n(8395),G=n(7774),X=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,f.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=Y(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var c=function(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}(i),h=j[s](o,u,l);h.style=c,t.graphicKey=h.type,t.pointer=h}!function(t,e,n,i,r,o){var a=F.Z.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),function(t,e,n,i,r){var o=V(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=N.MY(a.get("padding")||0),l=a.getFont(),u=Z.lP(o,l),c=r.position,h=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;"right"===d&&(c[0]-=h),"center"===d&&(c[0]-=h/2);var f=r.verticalAlign;"bottom"===f&&(c[1]-=p),"middle"===f&&(c[1]-=p/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(c,h,p,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:(0,W.Lr)(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}(e,i,r,o,{position:H(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(e,t,U.bK(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=U.bK(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=H(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=Y(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];return h[l]=u[l],{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(E);function Y(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var j={line:function(t,e,n){var i,r,o;return{type:"Line",subPixelOptimize:!0,shape:(i=[e,n[0]],r=[e,n[1]],o=$(t),{x1:i[o=o||0],y1:i[1-o],x2:r[o],y2:r[1-o]})}},shadow:function(t,e,n){var i,r,o,a=Math.max(1,t.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(i=[e-a/2,n[0]],r=[a,s],o=$(t),{x:i[o=o||0],y:i[1-o],width:r[o],height:r[1-o]})}}};function $(t){return"x"===t.dim?0:1}G.Z.registerAxisPointerClass("CartesianAxisPointer",X);var q=n(2822);const K=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,f.ZT)(e,t),e.type="axisPointer",e.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",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:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(q.Z);q.Z.registerClass(K),i.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!r.kJ(e)&&(t.axisPointer.link=[e])}})),i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=o.KM(t,e)})),i.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},(function(t,e,n){var i=t.currTrigger,o=[t.x,t.y],a=t,f=t.dispatchAction||(0,r.ak)(n.dispatchAction,n),g=e.getComponent("axisPointer").coordSysAxesInfo;if(g){d(o)&&(o=s({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var v=d(o),y=a.axesInfo,m=g.axesInfo,_="leave"===i||d(o),x={},b={},w={list:[],map:{}},S={showPointer:(0,r.WA)(c,b),showTooltip:(0,r.WA)(h,w)};(0,r.S6)(g.coordSysMap,(function(t,e){var n=v||t.containPoint(o);(0,r.S6)(g.coordSysAxesInfo[e],(function(t,e){var i=t.axis,r=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(y,t);if(!_&&n&&(!y||r)){var a=r&&r.value;null!=a||v||(a=i.pointToData(o)),null!=a&&u(t,a,S,!1,x)}}))}));var T={};return(0,r.S6)(m,(function(t,e){var n=t.linkGroup;n&&!b[e]&&(0,r.S6)(n.axesInfo,(function(e,i){var r=b[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,p(e),p(t)))),T[t.key]=o}}))})),(0,r.S6)(T,(function(t,e){u(m[e],t,S,!0,x)})),function(t,e,n){var i=n.axesInfo=[];(0,r.S6)(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(b,m,x),function(t,e,n,i){if(!d(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else i({type:"hideTip"})}(w,o,t,f),function(t,e,n){var i=n.getZr(),o="axisPointerLastHighlights",a=l(i)[o]||{},s=l(i)[o]={};(0,r.S6)(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&(0,r.S6)(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;s[e]=t}))}));var u=[],c=[];(0,r.S6)(a,(function(t,e){!s[e]&&c.push(t)})),(0,r.S6)(s,(function(t,e){!a[e]&&u.push(t)})),c.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:c}),u.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:u})}(m,0,n),x}}));var J=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,f.ZT)(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderColor:"#333",borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(q.Z);q.Z.registerClass(J);var Q=n(1756),tt=n(9186);function et(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}var nt=n(574),it=["-ms-","-moz-","-o-","-webkit-",""];function rt(t,e,n,i,r){var o=e&&e.painter;if(n){var a=o&&o.getViewportRoot();a&&(0,tt.YB)(t,a,document.body,i,r)}else{t[0]=i,t[1]=r;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}const ot=function(){function t(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,g.Z.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;rt(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!a._enterable){var e=r.handler,n=r.painter.getViewportRoot();(0,M.OD)(n,t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return t.prototype.update=function(t){var e=this._container,n=e.currentStyle||document.defaultView.getComputedStyle(e),i=e.style;"absolute"!==i.position&&"absolute"!==n.position&&(i.position="relative"),t.get("alwaysShowContent")&&this._moveIfResized(),this.el.className=t.get("className")||""},t.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=this._styleCoord,o=n.offsetHeight/2;e=(0,N.Lz)(e),n.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+function(t,e,n){var i=[],o=t.get("transitionDuration"),a=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),h=t.getModel("textStyle"),p=(0,nt.d_)(t,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),e&&o&&i.push(function(t,e){var n="cubic-bezier(0.23, 1, 0.32, 1)",i="opacity "+t/2+"s "+n+",visibility "+t/2+"s "+n;return e||(i+=",left "+t+"s "+n+",top "+t+"s "+n),(0,r.UI)(it,(function(t){return t+"transition:"+i})).join(";")}(o,n)),a&&(g.Z.canvasSupported?i.push("background-Color:"+a):(i.push("background-Color:#"+(0,Q.NC)(a)),i.push("filter:alpha(opacity=70)"))),(0,r.S6)(["width","color","radius"],(function(e){var n="border-"+e,r=(0,N.zW)(n),o=t.get(r);null!=o&&i.push(n+":"+o+("color"===e?"":"px"))})),i.push(function(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px");var o=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return o&&a&&e.push("text-shadow:"+s+"px "+l+"px "+a+"px "+o),(0,r.S6)(["decoration","align"],(function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)})),e.join(";")}(h)),null!=p&&i.push("padding:"+(0,N.MY)(p).join("px ")+"px"),i.join(";")+";"}(t,!this._firstShow,this._longHide)+";left:"+i[0]+"px;top:"+(i[1]-o)+"px;border-color: "+e+";"+(t.get("extraCssText")||""),n.style.display=n.innerHTML?"block":"none",n.style.pointerEvents=this._enterable?"auto":"none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,e,n,i,o){if(null!=t){var a=this.el;if((0,r.HD)(o)&&"item"===n.get("trigger")&&!et(n)&&(t+=function(t,e,n){if(!(0,r.HD)(n)||"inside"===n)return"";e=(0,N.Lz)(e);var i,o="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",a="",s="";return(0,r.cq)(["left","right"],o)>-1?(a=o+":-6px;top:50%;",s="translateY(-50%) rotate("+("left"===o?-225:-45)+"deg)"):(a=o+":-6px;left:50%;",s="translateX(-50%) rotate("+("top"===o?225:45)+"deg)"),'<div style="'+["position:absolute;width:10px;height:10px;",""+a+(s=(0,r.UI)(it,(function(t){return t+"transform:"+s})).join(";"))+";","border-bottom: "+e+" solid 1px;","border-right: "+e+" solid 1px;","background-color: "+t+";","box-shadow: 8px 8px 16px -3px #000;"].join("")+'"></div>'}(n.get("backgroundColor"),i,o)),(0,r.HD)(t))a.innerHTML=t;else if(t){a.innerHTML="",(0,r.kJ)(t)||(t=[t]);for(var s=0;s<t.length;s++)(0,r.Mh)(t[s])&&t[s].parentNode!==a&&a.appendChild(t[s])}}},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el;return[t.clientWidth,t.clientHeight]},t.prototype.moveTo=function(t,e){var n=this._styleCoord;if(rt(n,this._zr,this._appendToBody,t,e),null!=n[0]&&null!=n[1]){var i=this.el.style;i.left=n[0].toFixed(0)+"px",i.top=n[1].toFixed(0)+"px"}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){var t=this;this.el.style.visibility="hidden",this.el.style.opacity="0",this._show=!1,this._longHideTimeout=setTimeout((function(){return t._longHide=!0}),500)},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout((0,r.ak)(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},t.prototype.getOuterSize=function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}},t}();var at=n(4239),st=n(3264);function lt(t){return Math.max(0,t)}function ut(t){var e=lt(t.shadowBlur||0),n=lt(t.shadowOffsetX||0),i=lt(t.shadowOffsetY||0);return{left:lt(e-n),right:lt(e+n),top:lt(e-i),bottom:lt(e+i)}}function ct(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}const ht=function(){function t(t){this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._zr=t.getZr(),ct(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return t.prototype.update=function(t){t.get("alwaysShowContent")&&this._moveIfResized()},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(t,e,n,i,o){r.Kn(t)&&(0,st._y)(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new at.ZP({style:{rich:e.richTextStyles,text:t,lineHeight:22,backgroundColor:n.get("backgroundColor"),borderRadius:n.get("borderRadius"),borderWidth:1,borderColor:i,shadowColor:n.get("shadowColor"),shadowBlur:n.get("shadowBlur"),shadowOffsetX:n.get("shadowOffsetX"),shadowOffsetY:n.get("shadowOffsetY"),textShadowColor:a.get("textShadowColor"),textShadowBlur:a.get("textShadowBlur")||0,textShadowOffsetX:a.get("textShadowOffsetX")||0,textShadowOffsetY:a.get("textShadowOffsetY")||0,fill:n.get(["textStyle","color"]),padding:(0,nt.d_)(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),n=ut(t.style);return[e.width+n.left+n.right,e.height+n.top+n.bottom]},t.prototype.moveTo=function(t,e){var n=this.el;if(n){var i=this._styleCoord;ct(i,this._zr,t,e),t=i[0],e=i[1];var r=n.style,o=lt(r.borderWidth||0),a=ut(r);n.x=t+o+a.left,n.y=e+o+a.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(r.ak(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.getOuterSize=function(){var t=this.getSize();return{width:t[0],height:t[1]}},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();var pt=n(9199),dt=n(2746),ft=n(4708),gt=n(4037),vt=n(1563),yt=n(5498),mt=n(9291),_t=r.ak,xt=r.S6,bt=pt.GM,wt=new T.Rect({shape:{x:-1,y:-1,width:2,height:2}}),St=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,f.ZT)(e,t),e.prototype.init=function(t,e){if(!g.Z.node){var n=t.getComponent("tooltip"),i=n.get("renderMode");this._renderMode=(0,a.U9)(i),this._tooltipContent="richText"===this._renderMode?new ht(e):new ot(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)})}},e.prototype.render=function(t,e,n){if(!g.Z.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");m("itemTooltip",this._api,_t((function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!g.Z.node){var r=Mt(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var a=wt;a.x=i.x,a.y=i.y,a.update(),a.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:a},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var l=s(i,e),u=l.point[0],c=l.point[1];null!=u&&null!=c&&this._tryShow({offsetX:u,offsetY:c,position:i.position,target:l.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(Mt(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===Tt([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t]).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&(0,mt.o)(n,(function(t){return null!=(0,vt.A)(t).dataIndex}))?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=r.ak(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,o=[e.offsetX,e.offsetY],a=Tt([e.tooltipOption,i]),s=this._renderMode,l=[],u=(0,nt.TX)("section",{blocks:[],noHeader:!0}),c=[],h=new nt.iv;xt(t,(function(t){xt(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value;if(e&&null!=i){var o=V(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),a=(0,nt.TX)("section",{header:o,noHeader:!r.fy(o),sortBlocks:!0,blocks:[]});u.blocks.push(a),r.S6(t.seriesDataIndices,(function(r){var u=n.getSeriesByIndex(r.seriesIndex),p=r.dataIndexInside,d=u.getDataParams(p);d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=z.DX(e.axis,{value:i}),d.axisValueLabel=o,d.marker=h.makeTooltipMarker("item",N.Lz(d.color),s);var f=(0,yt.f)(u.formatTooltip(p,!0,null));f.markupFragment&&a.blocks.push(f.markupFragment),f.markupText&&c.push(f.markupText),l.push(d)}))}}))})),u.blocks.reverse(),c.reverse();var p=e.position,d=a.get("order"),f=(0,nt.BY)(u,h,s,d,n.get("useUTC"));f&&c.unshift(f);var g="richText"===s?"\n\n":"<br/>",v=c.join(g);this._showOrMove(a,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(a,p,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(a,v,l,Math.random()+"",o[0],o[1],p,null,h)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=(0,mt.o)(e,(function(t){return null!=(0,vt.A)(t).dataIndex})),r=this._ecModel,o=(0,vt.A)(i),a=o.seriesIndex,s=r.getSeriesByIndex(a),l=o.dataModel||s,u=o.dataIndex,c=o.dataType,h=l.getData(c),p=this._renderMode,d=Tt([h.getItemModel(u),l,s&&(s.coordinateSystem||{}).model,this._tooltipModel]),f=d.get("trigger");if(null==f||"item"===f){var g=l.getDataParams(u,c),v=new nt.iv;g.marker=v.makeTooltipMarker("item",N.Lz(g.color),p);var y=(0,yt.f)(l.formatTooltip(u,!1,c)),m=d.get("order"),_=y.markupFragment?(0,nt.BY)(y.markupFragment,v,p,m,r.get("useUTC")):y.markupText,x="item_"+l.name+"_"+u;this._showOrMove(d,(function(){this._showTooltipContent(d,_,g,x,t.offsetX,t.offsetY,t.position,t.target,v)})),n({type:"showTip",dataIndexInside:u,dataIndex:h.getRawIndex(u),seriesIndex:a,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=e.tooltip;r.HD(i)&&(i={content:i,formatter:i});var o=new ft.Z(i,this._tooltipModel,this._ecModel),a=o.get("content"),s=Math.random()+"",l=new nt.iv;this._showOrMove(o,(function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e,l)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,o,a,s,l,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var c=this._tooltipContent,h=t.get("formatter");s=s||t.get("position");var p=e,d=this._getNearestPoint([o,a],n,t.get("trigger"));if(h&&r.HD(h)){var f=t.ecModel.get("useUTC"),g=r.kJ(n)?n[0]:n;p=h,g&&g.axisType&&g.axisType.indexOf("time")>=0&&(p=(0,gt.WU)(g.axisValue,p,f)),p=N.kF(p,n,!0)}else if(r.mf(h)){var v=_t((function(e,i){e===this._ticket&&(c.setContent(i,u,t,d.color,s),this._updatePosition(t,s,o,a,c,n,l))}),this);this._ticket=i,p=h(n,i,v)}c.setContent(p,u,t,d.color,s),c.show(t,d.color),this._updatePosition(t,s,o,a,c,n,l)}},e.prototype._getNearestPoint=function(t,e,n){return"axis"===n||r.kJ(e)?{color:"html"===this._renderMode?"#fff":"none"}:r.kJ(e)?void 0:{color:e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,o,a,s){var l=this._api.getWidth(),u=this._api.getHeight();e=e||t.get("position");var c=o.getSize(),h=t.get("align"),p=t.get("verticalAlign"),d=s&&s.getBoundingRect().clone();if(s&&d.applyTransform(s.transform),r.mf(e)&&(e=e([n,i],a,o.el,d,{viewSize:[l,u],contentSize:c.slice()})),r.kJ(e))n=bt(e[0],l),i=bt(e[1],u);else if(r.Kn(e)){var f=e;f.width=c[0],f.height=c[1];var g=dt.ME(f,{width:l,height:u});n=g.x,i=g.y,h=null,p=null}else if(r.HD(e)&&s){var v=function(t,e,n){var i=n[0],r=n[1],o=0,a=0,s=e.width,l=e.height;switch(t){case"inside":o=e.x+s/2-i/2,a=e.y+l/2-r/2;break;case"top":o=e.x+s/2-i/2,a=e.y-r-10;break;case"bottom":o=e.x+s/2-i/2,a=e.y+l+10;break;case"left":o=e.x-i-10-5,a=e.y+l/2-r/2;break;case"right":o=e.x+s+10+5,a=e.y+l/2-r/2}return[o,a]}(e,d,c);n=v[0],i=v[1]}else v=function(t,e,n,i,r,o,a){var s=n.getOuterSize(),l=s.width,u=s.height;return null!=o&&(t+l+o+2>i?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}(n,i,o,l,u,h?null:20,p?null:20),n=v[0],i=v[1];h&&(n-=Ct(h)?c[0]/2:"right"===h?c[0]:0),p&&(i-=Ct(p)?c[1]/2:"bottom"===p?c[1]:0),et(t)&&(v=function(t,e,n,i,r){var o=n.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,[t=Math.max(t,0),e=Math.max(e,0)]}(n,i,o,l,u),n=v[0],i=v[1]),o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&xt(e,(function(e,i){var r=e.dataByAxis||[],o=(t[i]||{}).dataByAxis||[];(n=n&&r.length===o.length)&&xt(r,(function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];(n=n&&t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length)&&xt(r,(function(t,e){var i=a[e];n=n&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=t,!!n},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){g.Z.node||(this._tooltipContent.dispose(),b("itemTooltip",e))},e.type="tooltip",e}(w.Z);function Tt(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(n instanceof ft.Z&&(n=n.get("tooltip",!0)),r.HD(n)&&(n={formatter:n}),e=new ft.Z(n,e,e.ecModel))}return e}function Mt(t,e){return t.dispatchAction||r.ak(e.dispatchAction,e)}function Ct(t){return"center"===t||"middle"===t}w.Z.registerClass(St),i.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),i.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}))},574:(t,e,n)=>{"use strict";n.d(e,{TX:()=>h,BY:()=>f,jT:()=>m,d_:()=>_,iv:()=>x});var i=n(349),r=n(8778),o=n(5294),a=n(9199),s={fontSize:12,fill:"#6e7079"},l={fontSize:14,fill:"#464646",fontWeight:900},u=[0,10,20,30],c=["","\n","\n\n","\n\n\n"];function h(t,e){return e.type=t,e}function p(t){return(0,r.RI)(d,t.type)&&d[t.type]}var d={section:{planLayout:function(t){var e=t.blocks.length,n=e>1||e>0&&!t.noHeader,i=0;(0,r.S6)(t.blocks,(function(t){p(t).planLayout(t);var e=t.__gapLevelBetweenSubBlocks;e>=i&&(i=e+(!n||e&&("section"!==t.type||t.noHeader)?0:1))})),t.__gapLevelBetweenSubBlocks=i},build:function(t,e,n){var a=e.noHeader,s=g(e),l=function(t,e,n){var i=[],a=e.blocks||[];(0,r.hu)(!a||(0,r.kJ)(a)),a=a||[];var s=t.orderMode;if(e.sortBlocks&&s){a=a.slice();var l={valueAsc:"asc",valueDesc:"desc"};if((0,r.RI)(l,s)){var u=new o.ID(l[s],null);a.sort((function(t,e){return u.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===s&&a.reverse()}var c=g(e);if((0,r.S6)(a,(function(e,n){var r=p(e).build(t,e,n>0?c.html:0);null!=r&&i.push(r)})),i.length)return"richText"===t.renderMode?i.join(c.richText):v(i.join(""),n)}(t,e,a?n:s.html);if(a)return l;var u=(0,i.uX)(e.header,"ordinal",t.useUTC);return"richText"===t.renderMode?y(t,u)+s.richText+l:v('<div style="font-size:12px;color:#6e7079;line-height:1;">'+(0,i.F1)(u)+"</div>"+l,n)}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n){var o=t.renderMode,a=e.noName,s=e.noValue,u=!e.markerType,c=e.name,h=e.value,p=t.useUTC;if(!a||!s){var d=u?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",o),f=a?"":(0,i.uX)(c,"ordinal",p),g=e.valueType,m=s?[]:(0,r.kJ)(h)?(0,r.UI)(h,(function(t,e){return(0,i.uX)(t,(0,r.kJ)(g)?g[e]:g,p)})):[(0,i.uX)(h,(0,r.kJ)(g)?g[0]:g,p)],_=!u||!a,x=!u&&a;return"richText"===o?(u?"":d)+(a?"":y(t,f))+(s?"":function(t,e,n,i){var r=[l],o=i?10:20;return n&&r.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),r)}(t,m,_,x)):v((u?"":d)+(a?"":function(t,e){return'<span style="font-size:12px;color:#6e7079;'+(e?"margin-left:2px":"")+'">'+(0,i.F1)(t)+"</span>"}(f,!u))+(s?"":function(t,e,n){return'<span style="'+(e?"float:right;margin-left:"+(n?"10px":"20px"):"")+';font-size:14px;color:#464646;font-weight:900">'+(0,r.UI)(t,(function(t){return(0,i.F1)(t)})).join(" ")+"</span>"}(m,_,x)),n)}}}};function f(t,e,n,i,r){if(t){var o=p(t);o.planLayout(t);var a={useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e};return o.build(a,t,0)}}function g(t){var e=t.__gapLevelBetweenSubBlocks;return{html:u[e],richText:c[e]}}function v(t,e){return'<div style="margin: '+e+'px 0 0;line-height:1;">'+t+'<div style="clear:both"></div></div>'}function y(t,e){return t.markupStyleCreator.wrapRichTextStyle(e,s)}function m(t,e){var n=t.getData().getItemVisual(e,"style")[t.visualDrawType];return(0,i.Lz)(n)}function _(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var x=function(){function t(){this.richTextStyles={},this._nextStyleNameId=(0,a.jj)()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var o="richText"===n?this._generateStyleName():null,a=(0,i.A0)({color:e,type:t,renderMode:n,markerId:o});return(0,r.HD)(a)?a:(this.richTextStyles[o]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};(0,r.kJ)(e)?(0,r.S6)(e,(function(t){return(0,r.l7)(n,t)})):(0,r.l7)(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}()},5320:(t,e,n)=>{"use strict";function i(t,e){return t.type===e}n.d(e,{H:()=>i})},3493:(t,e,n)=>{"use strict";n.d(e,{aG:()=>$,Do:()=>Q,DX:()=>J,PY:()=>nt,rk:()=>tt,Yb:()=>q,J9:()=>K,Jk:()=>j,WY:()=>et,AH:()=>it});var i=n(8778),r=n(9312),o=n(4536),a=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();o.au(a,{registerWhenExtend:!0});const s=a;var l=n(1214),u=n(9199),c=u.NM;function h(t){return u.ZB(t)+2}function p(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function d(t,e){return t>=e[0]&&t<=e[1]}function f(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function g(t,e){return t*(e[1]-e[0])+e[0]}var v=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new l.Z({})),(0,i.kJ)(r)&&(r=new l.Z({categories:(0,i.UI)(r,(function(t){return(0,i.Kn)(t)?t.value:t}))})),n._ordinalMeta=r,n._categorySortInfo=[],n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return(0,r.ZT)(e,t),e.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return d(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return f(t=this.getCategoryIndex(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=this.getCategoryIndex(t),Math.round(g(t,this._extent))},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:this.getCategoryIndex(n)}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setCategorySortInfo=function(t){this._categorySortInfo=t},e.prototype.getCategorySortInfo=function(){return this._categorySortInfo},e.prototype.getCategoryIndex=function(t){return this._categorySortInfo.length?this._categorySortInfo[t].beforeSortIndex:t},e.prototype.getRawIndex=function(t){return this._categorySortInfo.length?this._categorySortInfo[t].ordinalNumber:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var e=this.getRawIndex(t.value),n=this._ordinalMeta.categories[e];return null==n?"":n+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.isInExtentRange=function(t){return t=this.getCategoryIndex(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.niceTicks=function(){},e.prototype.niceExtent=function(){},e.type="ordinal",e}(s);s.registerClass(v);const y=v;var m=n(349),_=u.NM,x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return(0,r.ZT)(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return d(t,this._extent)},e.prototype.normalize=function(t){return f(t,this._extent)},e.prototype.scale=function(t){return g(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=h(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]<i[0]&&(t?o.push({value:_(i[0]-e,r)}):o.push({value:n[0]}));for(var a=i[0];a<=i[1]&&(o.push({value:a}),(a=_(a+e,r))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:_(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;r<e.length;r++){for(var o=e[r],a=e[r-1],s=0,l=[],u=(o.value-a.value)/t;s<t-1;){var c=_(a.value+(s+1)*u);c>i[0]&&c<i[1]&&l.push(c),s++}n.push(l)}return n},e.prototype.getLabel=function(t,e){if(null==t)return"";var n=e&&e.precision;null==n?n=u.ZB(t.value)||0:"auto"===n&&(n=this._intervalPrecision);var i=_(t.value,n,!0);return m.OD(i)},e.prototype.niceTicks=function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){r<0&&(r=-r,i.reverse());var o=function(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=u.kx(o/e,!0);null!=n&&a<n&&(a=r.interval=n),null!=i&&a>i&&(a=r.interval=i);var s=r.intervalPrecision=h(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),p(t,0,e),p(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[c(Math.ceil(t[0]/a)*a,s),c(Math.floor(t[1]/a)*a,s)],t),r}(i,t,e,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},e.prototype.niceExtent=function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=_(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=_(Math.ceil(e[1]/r)*r))},e.type="interval",e}(s);s.registerClass(x);const b=x;var w=n(3442),S=n(9472),T=n(4037),M=(n(3264),function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return(0,r.ZT)(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return(0,T.WU)(t.value,T.V8[(0,T.xC)((0,T.Tj)(this._minLevelUnit))]||T.V8.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC"),r=this.getSetting("locale");return(0,T.k7)(t,e,n,r,i)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,r=[];if(!e)return r;r.push({value:n[0],level:0});var o=this.getSetting("useUTC"),a=function(t,e,n,r){var o=T.FW,a=0;function s(t,e,n,i,o,a,s){for(var l=new Date(e),u=e,c=l[i]();u<n&&u<=r[1];)s.push({value:u}),c+=t,l[o](c),u=l.getTime();s.push({value:u,notAdd:!0})}function l(t,i,o){var a=[],l=!i.length;if(!function(t,e,n,i){var r=u.sG(e),o=u.sG(n),a=function(t){return(0,T.q5)(r,t,i)===(0,T.q5)(o,t,i)},s=function(){return a("year")},l=function(){return s()&&a("month")},c=function(){return l()&&a("day")},h=function(){return c()&&a("hour")},p=function(){return h()&&a("minute")},d=function(){return p()&&a("second")};switch(t){case"year":return s();case"month":return l();case"day":return c();case"hour":return h();case"minute":return p();case"second":return d();case"millisecond":return d()&&a("millisecond")}}((0,T.Tj)(t),r[0],r[1],n)){l&&(i=[{value:O(new Date(r[0]),t,n)},{value:r[1]}]);for(var c=0;c<i.length-1;c++){var h=i[c].value,p=i[c+1].value;if(h!==p){var d=void 0,f=void 0,g=void 0;switch(t){case"year":d=Math.max(1,Math.round(e/T.s2/365)),f=(0,T.sx)(n),g=(0,T.xL)(n);break;case"half-year":case"quarter":case"month":d=A(e),f=(0,T.CW)(n),g=(0,T.vh)(n);break;case"week":case"half-week":case"day":d=k(e),f=(0,T.xz)(n),g=(0,T.f5)(n),!0;break;case"half-day":case"quarter-day":case"hour":d=I(e),f=(0,T.Wp)(n),g=(0,T.En)(n);break;case"minute":d=D(e,!0),f=(0,T.fn)(n),g=(0,T.eN)(n);break;case"second":d=D(e,!1),f=(0,T.MV)(n),g=(0,T.rM)(n);break;case"millisecond":d=P(e),f=(0,T.RZ)(n),g=(0,T.cb)(n)}s(d,h,p,f,g,0,a),"year"===t&&o.length>1&&0===c&&o.unshift({value:o[0].value-d})}}for(c=0;c<a.length;c++)o.push(a[c]);return a}}for(var c=[],h=[],p=0,d=0,f=0;f<o.length&&a++<1e4;++f){var g=(0,T.Tj)(o[f]);if((0,T.$K)(o[f])&&(l(o[f],c[c.length-1]||[],h),g!==(o[f+1]?(0,T.Tj)(o[f+1]):null))){if(h.length){d=p,h.sort((function(t,e){return t.value-e.value}));for(var v=[],y=0;y<h.length;++y){var m=h[y].value;0!==y&&h[y-1].value===m||(v.push(h[y]),m>=r[0]&&m<=r[1]&&p++)}var _=(r[1]-r[0])/e;if(p>1.5*_&&d>_/1.5)break;if(c.push(v),p>_||t===o[f])break}h=[]}}var x=(0,i.hX)((0,i.UI)(c,(function(t){return(0,i.hX)(t,(function(t){return t.value>=r[0]&&t.value<=r[1]&&!t.notAdd}))})),(function(t){return t.length>0})),b=[],w=x.length-1;for(f=0;f<x.length;++f)for(var S=x[f],M=0;M<S.length;++M)b.push({value:S[M].value,level:w-f});b.sort((function(t,e){return t.value-e.value}));var C=[];for(f=0;f<b.length;++f)0!==f&&b[f].value===b[f-1].value||C.push(b[f]);return C}(this._minLevelUnit,this._approxInterval,o,n);return(r=r.concat(a)).push({value:n[1],level:0}),r},e.prototype.niceExtent=function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=T.s2,e[1]+=T.s2),e[1]===-1/0&&e[0]===1/0){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-T.s2}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.niceTicks=function(t,e,n){t=t||10;var i=this._extent,r=i[1]-i[0];this._approxInterval=r/t,null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=C.length,a=Math.min(function(t,e,n,i){for(;n<i;){var r=n+i>>>1;t[r][1]<e?n=r+1:i=r}return n}(C,this._approxInterval,0,o),o-1);this._interval=C[a][1],this._minLevelUnit=C[Math.max(a-1,0)][0]},e.prototype.parse=function(t){return"number"==typeof t?t:+u.sG(t)},e.prototype.contain=function(t){return d(this.parse(t),this._extent)},e.prototype.normalize=function(t){return f(this.parse(t),this._extent)},e.prototype.scale=function(t){return g(t,this._extent)},e.type="time",e}(b)),C=[["second",T.WT],["minute",T.yR],["hour",T.dV],["quarter-day",6*T.dV],["half-day",12*T.dV],["day",1.2*T.s2],["half-week",3.5*T.s2],["week",7*T.s2],["month",31*T.s2],["quarter",95*T.s2],["half-year",T.P5/2],["year",T.P5]];function k(t,e){return(t/=T.s2)>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function A(t){return(t/=30*T.s2)>6?6:t>3?3:t>2?2:1}function I(t){return(t/=T.dV)>12?12:t>6?6:t>3.5?4:t>2?2:1}function D(t,e){return(t/=e?T.yR:T.WT)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function P(t){return u.kx(t,!0)}function O(t,e,n){var i=new Date(t);switch((0,T.Tj)(e)){case"year":case"month":i[(0,T.vh)(n)](0);case"day":i[(0,T.f5)(n)](1);case"hour":i[(0,T.En)(n)](0);case"minute":i[(0,T.eN)(n)](0);case"second":i[(0,T.rM)(n)](0),i[(0,T.cb)(n)](0)}return i.getTime()}s.registerClass(M);const L=M;var R=s.prototype,E=b.prototype,Z=u.ZB,N=u.NM,B=Math.floor,z=Math.ceil,F=Math.pow,W=Math.log,V=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new b,e._interval=0,e}return(0,r.ZT)(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,r=e.getExtent(),o=E.getTicks.call(this,t);return i.UI(o,(function(t){var e=t.value,i=u.NM(F(this.base,e));return i=e===n[0]&&this._fixMin?U(i,r[0]):i,{value:i=e===n[1]&&this._fixMax?U(i,r[1]):i}}),this)},e.prototype.setExtent=function(t,e){var n=this.base;t=W(t)/W(n),e=W(e)/W(n),E.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=R.getExtent.call(this);e[0]=F(t,e[0]),e[1]=F(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=U(e[0],n[0])),this._fixMax&&(e[1]=U(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=W(t[0])/W(e),t[1]=W(t[1])/W(e),R.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=u.Xd(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[u.NM(z(e[0]/i)*i),u.NM(B(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.niceExtent=function(t){E.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return d(t=W(t)/W(this.base),this._extent)},e.prototype.normalize=function(t){return f(t=W(t)/W(this.base),this._extent)},e.prototype.scale=function(t){return t=g(t,this._extent),F(this.base,t)},e.type="log",e}(s),H=V.prototype;function U(t,e){return N(t,Z(e))}H.getMinorTicks=E.getMinorTicks,H.getLabel=E.getLabel,s.registerClass(V);const G=V;var X=n(816),Y=n(9820);function j(t,e){var n=function(t,e){var n=t.type,r=(0,Y.Qw)(t,e,t.getExtent()).calculate();t.setBlank(r.isBlank);var o=r.min,a=r.max,s=e.ecModel;if(s&&"time"===n){var l=(0,w.Ge)("bar",s),u=!1;if(i.S6(l,(function(t){u=u||t.getBaseAxis()===e.axis})),u){var c=(0,w.My)(l),h=function(t,e,n,r){var o=n.axis.getExtent(),a=o[1]-o[0],s=(0,w.G_)(r,n.axis);if(void 0===s)return{min:t,max:e};var l=1/0;i.S6(s,(function(t){l=Math.min(t.offset,l)}));var u=-1/0;i.S6(s,(function(t){u=Math.max(t.offset+t.width,u)})),l=Math.abs(l),u=Math.abs(u);var c=l+u,h=e-t,p=h/(1-(l+u)/a)-h;return{min:t-=p*(l/c),max:e+=p*(u/c)}}(o,a,e,c);o=h.min,a=h.max}}return{extent:[o,a],fixMin:r.minFixed,fixMax:r.maxFixed}}(t,e),r=n.extent,o=e.get("splitNumber");t instanceof G&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(r[0],r[1]),t.niceExtent({splitNumber:o,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function $(t,e){if(e=e||t.get("type"))switch(e){case"category":return new y({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new L({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(s.getClass(e)||b)}}function q(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}function K(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):"string"==typeof i?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):"function"==typeof i?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(J(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function J(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function Q(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof y?n.count():(i=n.getTicks()).length;var a,s,l,u,c,h,p,d=t.getLabelModel(),f=K(t),g=1;r>40&&(g=Math.ceil(r/40));for(var v=0;v<r;v+=g){var m=f(i?i[v]:{value:o[0]+v},v),_=(s=d.getTextRect(m),void 0,void 0,void 0,void 0,void 0,l=(d.get("rotate")||0)*Math.PI/180,u=s.width,c=s.height,h=u*Math.abs(Math.cos(l))+Math.abs(c*Math.sin(l)),p=u*Math.abs(Math.sin(l))+Math.abs(c*Math.cos(l)),new S.Z(s.x,s.y,h,p));a?a.union(_):a=_}return a}}function tt(t){var e=t.get("interval");return null==e?"auto":e}function et(t){return"category"===t.type&&0===tt(t.getLabelModel())}function nt(t,e){var n={};return i.S6(t.mapDimensionsAll(e),(function(e){n[(0,X.IR)(t,e)]=!0})),i.XP(n)}function it(t,e,n){e&&i.S6(nt(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]<t[0]&&(t[0]=i[0]),i[1]>t[1]&&(t[1]=i[1])}))}},8395:(t,e,n)=>{"use strict";n.d(e,{bK:()=>o,Yh:()=>a,Mk:()=>s});var i=n(8778),r=n(5495);function o(t,e,n){n=n||{};var r=t.coordinateSystem,o=e.axis,a={},s=o.getAxesOnZeroOf()[0],l=o.position,u=s?"onZero":l,c=o.dim,h=r.getRect(),p=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,g="x"===c?[p[2]-f,p[3]+f]:[p[0]-f,p[1]+f];if(s){var v=s.toGlobalCoord(s.dataToCoord(0));g[d.onZero]=Math.max(Math.min(v,g[1]),g[0])}a.position=["y"===c?g[d[u]]:p[0],"x"===c?g[d[u]]:p[3]],a.rotation=Math.PI/2*("x"===c?0:1),a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[l],a.labelOffset=s?g[d[l]]-g[d.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),i.Jv(n.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=e.get(["axisLabel","rotate"]);return a.labelRotate="top"===u?-y:y,a.z2=1,a}function a(t){return"cartesian2d"===t.get("coordinateSystem")}function s(t){var e={xAxisModel:null,yAxisModel:null};return i.S6(e,(function(n,i){var o=i.replace(/Model$/,""),a=t.getReferringComponents(o,r.C6).models[0];e[i]=a})),e}},9820:(t,e,n)=>{"use strict";n.d(e,{Qw:()=>l});var i=n(8778),r=n(9356),o=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var o=this._isOrdinal="ordinal"===t.type;this._needCrossZero=e.getNeedCrossZero&&e.getNeedCrossZero();var a=this._modelMinRaw=e.get("min",!0);(0,i.mf)(a)?this._modelMinNum=u(t,a({min:n[0],max:n[1]})):"dataMin"!==a&&(this._modelMinNum=u(t,a));var s=this._modelMaxRaw=e.get("max",!0);if((0,i.mf)(s)?this._modelMaxNum=u(t,s({min:n[0],max:n[1]})):"dataMax"!==s&&(this._modelMaxNum=u(t,s)),o)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),c=(0,i.kJ)(l)?l:[l||0,l||0];"boolean"==typeof c[0]||"boolean"==typeof c[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[(0,r.GM)(c[0],1),(0,r.GM)(c[1],1)]}},t.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,r=this._axisDataLen,o=this._boundaryGapInner,a=t?null:n-e||Math.abs(e),s="dataMin"===this._modelMinRaw?e:this._modelMinNum,l="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,u=null!=s,c=null!=l;null==s&&(s=t?r?0:NaN:e-o[0]*a),null==l&&(l=t?r?r-1:NaN:n+o[1]*a),(null==s||!isFinite(s))&&(s=NaN),(null==l||!isFinite(l))&&(l=NaN),s>l&&(s=NaN,l=NaN);var h=(0,i.Bu)(s)||(0,i.Bu)(l)||t&&!r;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var p=this._determinedMin,d=this._determinedMax;return null!=p&&(s=p,u=!0),null!=d&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[s[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[a[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),a={min:"_determinedMin",max:"_determinedMax"},s={min:"_dataMin",max:"_dataMax"};function l(t,e,n){var i=t.rawExtentInfo;return i||(i=new o(t,e,n),t.rawExtentInfo=i,i)}function u(t,e){return null==e?null:(0,i.Bu)(e)?NaN:t.parse(e)}},7586:(t,e,n)=>{"use strict";function i(t){return null==t?0:t.length||1}function r(t){return t}n.d(e,{Z:()=>o});const o=function(){function t(t,e,n,i,o,a){this._old=t,this._new=e,this._oldKeyGetter=n||r,this._newKeyGetter=i||r,this.context=o,this._diffModeMultiple="multiple"===a}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},r=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var a=0;a<t.length;a++){var s=r[a],l=n[s],u=i(l);if(u>1){var c=l.shift();1===l.length&&(n[s]=l[0]),this._update&&this._update(c,a)}else 1===u?(n[s]=null,this._update&&this._update(l,a)):this._remove&&this._remove(a)}this._performRestAdd(o,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},r={},o=[],a=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,r,a,"_newKeyGetter");for(var s=0;s<o.length;s++){var l=o[s],u=n[l],c=r[l],h=i(u),p=i(c);if(h>1&&1===p)this._updateManyToOne&&this._updateManyToOne(c,u),r[l]=null;else if(1===h&&p>1)this._updateOneToMany&&this._updateOneToMany(c,u),r[l]=null;else if(1===h&&1===p)this._update&&this._update(c,u),r[l]=null;else if(h>1)for(var d=0;d<h;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(a,r)},t.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=e[r],a=i(o);if(a>1)for(var s=0;s<a;s++)this._add&&this._add(o[s]);else 1===a&&this._add&&this._add(o);e[r]=null}},t.prototype._initIndexMap=function(t,e,n,r){for(var o=this._diffModeMultiple,a=0;a<t.length;a++){var s="_ec_"+this[r](t[a],a);if(o||(n[a]=s),e){var l=e[s],u=i(l);0===u?(e[s]=a,o&&n.push(s)):1===u?e[s]=[l,a]:l.push(a)}}},t}()},1214:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(8778);function r(t){return(0,i.Kn)(t)&&null!=t.value?t.value:t+""}const o=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}return t.createByAxisModel=function(e){var n=e.option,o=n.data,a=o&&(0,i.UI)(o,r);return new t({categories:a,needCollect:!a,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=(0,i.kW)(this.categories))},t}()},7158:(t,e,n)=>{"use strict";n.d(e,{Ld:()=>s,_P:()=>l,nx:()=>u,ML:()=>c});var i=n(8778),r=n(7252),o=n(5495),a=function(t){this.data=t.data||(t.sourceFormat===r.hL?{}:[]),this.sourceFormat=t.sourceFormat||r.RA,this.seriesLayoutBy=t.seriesLayoutBy||r.fY,this.startIndex=t.startIndex||0,this.dimensionsDefine=t.dimensionsDefine,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.encodeDefine=t.encodeDefine,this.metaRawOption=t.metaRawOption};function s(t){return t instanceof a}function l(t,e,n,s){n=n||function(t){var e=r.RA;if((0,i.fU)(t))e=r.J5;else if((0,i.kJ)(t)){0===t.length&&(e=r.XD);for(var n=0,o=t.length;n<o;n++){var a=t[n];if(null!=a){if((0,i.kJ)(a)){e=r.XD;break}if((0,i.Kn)(a)){e=r.qb;break}}}}else if((0,i.Kn)(t)){for(var s in t)if((0,i.RI)(t,s)&&(0,i.zG)(t[s])){e=r.hL;break}}else if(null!=t)throw new Error("Invalid data");return e}(t);var l=e.seriesLayoutBy,u=function(t,e,n,a,s){var l,u;if(!t)return{dimensionsDefine:p(s),startIndex:u,dimensionsDetectedCount:l};if(e===r.XD){var c=t;"auto"===a||null==a?d((function(t){null!=t&&"-"!==t&&((0,i.HD)(t)?null==u&&(u=1):u=0)}),n,c,10):u=(0,i.hj)(a)?a:a?1:0,s||1!==u||(s=[],d((function(t,e){s[e]=null!=t?t+"":""}),n,c,1/0)),l=s?s.length:n===r.Wc?c.length:c[0]?c[0].length:null}else if(e===r.qb)s||(s=function(t){for(var e,n=0;n<t.length&&!(e=t[n++]););if(e){var r=[];return(0,i.S6)(e,(function(t,e){r.push(e)})),r}}(t));else if(e===r.hL)s||(s=[],(0,i.S6)(t,(function(t,e){s.push(e)})));else if(e===r.cy){var h=(0,o.C4)(t[0]);l=(0,i.kJ)(h)&&h.length||1}else r.J5;return{startIndex:u,dimensionsDefine:p(s),dimensionsDetectedCount:l}}(t,n,l,e.sourceHeader,e.dimensions);return new a({data:t,sourceFormat:n,seriesLayoutBy:l,dimensionsDefine:u.dimensionsDefine,startIndex:u.startIndex,dimensionsDetectedCount:u.dimensionsDetectedCount,encodeDefine:h(s),metaRawOption:(0,i.d9)(e)})}function u(t){return new a({data:t,sourceFormat:(0,i.fU)(t)?r.J5:r.cy})}function c(t){return new a({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:(0,i.d9)(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount,encodeDefine:h(t.encodeDefine)})}function h(t){return t?(0,i.kW)(t):null}function p(t){if(t){var e=(0,i.kW)();return(0,i.UI)(t,(function(t,n){var r={name:(t=(0,i.Kn)(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var o=e.get(r.name);return o?r.name+="-"+o.count++:e.set(r.name,{count:1}),r}))}}function d(t,e,n,i){if(e===r.Wc)for(var o=0;o<n.length&&o<i;o++)t(n[o]?n[o][0]:null,o);else{var a=n[0]||[];for(o=0;o<a.length&&o<i;o++)t(a[o],o)}}},1245:(t,e,n)=>{"use strict";n.d(e,{Pl:()=>p,_j:()=>g,a:()=>m,tB:()=>b,hk:()=>S});var i,r,o,a,s,l=n(8778),u=n(5495),c=n(7158),h=n(7252),p=function(){function t(t,e){var n=(0,c.Ld)(t)?t:(0,c.nx)(t);this._source=n;var i=this._data=n.data;n.sourceFormat===h.J5&&(this._offset=0,this._dimSize=e,this._data=i),s(this,i,n)}var e;return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(t,e){},t.prototype.appendData=function(t){},t.prototype.clean=function(){},t.protoInitialize=((e=t.prototype).pure=!1,void(e.persistent=!0)),t.internalField=function(){var t;s=function(t,r,o){var s=o.sourceFormat,u=o.seriesLayoutBy,c=o.startIndex,p=o.dimensionsDefine,d=a[w(s,u)];if((0,l.l7)(t,d),s===h.J5)t.getItem=e,t.count=i,t.fillStorage=n;else{var f=g(s,u);t.getItem=(0,l.ak)(f,null,r,c,p);var v=m(s,u);t.count=(0,l.ak)(v,null,r,c,p)}};var e=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,r=i*t,o=0;o<i;o++)e[o]=n[r+o];return e},n=function(t,e,n,i){for(var r=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=e-t,h=n[a],p=0;p<c;p++){var d=r[(t+p)*o+a];h[t+p]=d,d<l&&(l=d),d>u&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}(t={})[h.XD+"_"+h.fY]={pure:!0,appendData:r},t[h.XD+"_"+h.Wc]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[h.qb]={pure:!0,appendData:r},t[h.hL]={pure:!0,appendData:function(t){var e=this._data;(0,l.S6)(t,(function(t,n){for(var i=e[n]||(e[n]=[]),r=0;r<(t||[]).length;r++)i.push(t[r])}))}},t[h.cy]={appendData:r},t[h.J5]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},a=t}(),t}(),d=function(t,e,n,i){return t[i]},f=((i={})[h.XD+"_"+h.fY]=function(t,e,n,i){return t[i+e]},i[h.XD+"_"+h.Wc]=function(t,e,n,i){i+=e;for(var r=[],o=t,a=0;a<o.length;a++){var s=o[a];r.push(s?s[i]:null)}return r},i[h.qb]=d,i[h.hL]=function(t,e,n,i){for(var r=[],o=0;o<n.length;o++){var a=t[n[o].name];r.push(a?a[i]:null)}return r},i[h.cy]=d,i);function g(t,e){return f[w(t,e)]}var v=function(t,e,n){return t.length},y=((r={})[h.XD+"_"+h.fY]=function(t,e,n){return Math.max(0,t.length-e)},r[h.XD+"_"+h.Wc]=function(t,e,n){var i=t[0];return i?Math.max(0,i.length-e):0},r[h.qb]=v,r[h.hL]=function(t,e,n){var i=t[n[0].name];return i?i.length:0},r[h.cy]=v,r);function m(t,e){return y[w(t,e)]}var _=function(t,e,n){return null!=e?t[e]:t},x=((o={})[h.XD]=_,o[h.qb]=function(t,e,n){return null!=e?t[n]:t},o[h.hL]=_,o[h.cy]=function(t,e,n){var i=(0,u.C4)(t);return null!=e&&i instanceof Array?i[e]:i},o[h.J5]=_,o);function b(t){return x[t]}function w(t,e){return t===h.XD?t+"_"+e:t}function S(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var r,o,a=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(n);return s&&(r=s.name,o=s.index),b(a)(i,o,r)}}}},816:(t,e,n)=>{"use strict";n.d(e,{BM:()=>r,M:()=>o,IR:()=>a});var i=n(8778);function r(t,e,n){var r,o,a,s,l=(n=n||{}).byIndex,u=n.stackedCoordDimension,c=!(!t||!t.get("stack"));if((0,i.S6)(e,(function(t,n){(0,i.HD)(t)&&(e[n]=t={name:t}),c&&!t.isExtraCoord&&(l||r||!t.ordinalMeta||(r=t),o||"ordinal"===t.type||"time"===t.type||u&&u!==t.coordDim||(o=t))})),!o||l||r||(l=!0),o){a="__\0ecstackresult",s="__\0ecstackedover",r&&(r.createInvertedIndices=!0);var h=o.coordDim,p=o.type,d=0;(0,i.S6)(e,(function(t){t.coordDim===h&&d++})),e.push({name:a,coordDim:h,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:s,coordDim:s,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:o&&o.name,stackedByDimension:r&&r.name,isStackedByIndex:l,stackedOverDimension:s,stackResultDimension:a}}function o(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function a(t,e){return o(t,e)?t.getCalculationInfo("stackResultDimension"):e}},5294:(t,e,n)=>{"use strict";n.d(e,{yQ:()=>o,ID:()=>a});var i=n(9199),r=n(8778);n(3264);function o(t,e){var n=e&&e.type;if("ordinal"===n){var r=e&&e.ordinalMeta;return r?r.parseAndCollect(t):t}return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+(0,i.sG)(t)),null==t||""===t?NaN:+t}(0,r.kW)({number:function(t){return parseFloat(t)},time:function(t){return+(0,i.sG)(t)},trim:function(t){return"string"==typeof t?(0,r.fy)(t):t}});var a=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=typeof t,r=typeof e,o="number"===n?t:(0,i.FK)(t),a="number"===r?e:(0,i.FK)(e),s=isNaN(o),l=isNaN(a);if(s&&(o=this._incomparable),l&&(a=this._incomparable),s&&l){var u="string"===n,c="string"===r;u&&(o=c?t:0),c&&(a=u?e:0)}return o<a?this._resultLT:o>a?-this._resultLT:0},t}()},6203:(t,e,n)=>{"use strict";n.d(e,{Dq:()=>a,md:()=>l,pV:()=>u,pY:()=>c,Wd:()=>h,JT:()=>p,u7:()=>d});var i=n(5495),r=n(8778),o=n(7252),a={Must:1,Might:2,Not:3},s=(0,i.Yf)();function l(t){s(t).datasetMap=(0,r.kW)()}function u(t,e){var n=t?t.metaRawOption:null;return{seriesLayoutBy:(0,r.pD)(e.seriesLayoutBy,n?n.seriesLayoutBy:null),sourceHeader:(0,r.pD)(e.sourceHeader,t?t.startIndex:null),dimensions:(0,r.pD)(e.dimensions,t?t.dimensionsDefine:null)}}function c(t,e,n){var i={},o=h(e);if(!o||!t)return i;var a,l,u=[],c=[],p=e.ecModel,d=s(p).datasetMap,f=o.uid+"_"+n.seriesLayoutBy;t=t.slice(),(0,r.S6)(t,(function(e,n){var o=(0,r.Kn)(e)?e:t[n]={name:e};"ordinal"===o.type&&null==a&&(a=n,l=y(o)),i[o.name]=[]}));var g=d.get(f)||d.set(f,{categoryWayDim:l,valueWayDim:0});function v(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function y(t){var e=t.dimsDef;return e?e.length:1}return(0,r.S6)(t,(function(t,e){var n=t.name,r=y(t);if(null==a){var o=g.valueWayDim;v(i[n],o,r),v(c,o,r),g.valueWayDim+=r}else a===e?(v(i[n],0,r),v(u,0,r)):(o=g.categoryWayDim,v(i[n],o,r),v(c,o,r),g.categoryWayDim+=r)})),u.length&&(i.itemName=u),c.length&&(i.seriesName=c),i}function h(t){if(!t.get("data",!0))return(0,i.HZ)(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},i.C6).models[0]}function p(t){return t.get("transform",!0)||t.get("fromTransformResult",!0)?(0,i.HZ)(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},i.C6).models:[]}function d(t,e){return function(t,e,n,s,l,u){var c,h,p;if((0,r.fU)(t))return a.Not;if(s){var d=s[u];(0,r.Kn)(d)?(h=d.name,p=d.type):(0,r.HD)(d)&&(h=d)}if(null!=p)return"ordinal"===p?a.Must:a.Not;if(e===o.XD){var f=t;if(n===o.Wc){for(var g=f[u],v=0;v<(g||[]).length&&v<5;v++)if(null!=(c=S(g[l+v])))return c}else for(v=0;v<f.length&&v<5;v++){var y=f[l+v];if(y&&null!=(c=S(y[u])))return c}}else if(e===o.qb){var m=t;if(!h)return a.Not;for(v=0;v<m.length&&v<5;v++)if((b=m[v])&&null!=(c=S(b[h])))return c}else if(e===o.hL){var _=t;if(!h)return a.Not;if(!(g=_[h])||(0,r.fU)(g))return a.Not;for(v=0;v<g.length&&v<5;v++)if(null!=(c=S(g[v])))return c}else if(e===o.cy){var x=t;for(v=0;v<x.length&&v<5;v++){var b=x[v],w=(0,i.C4)(b);if(!(0,r.kJ)(w))return a.Not;if(null!=(c=S(w[u])))return c}}function S(t){var e=(0,r.HD)(t);return null!=t&&isFinite(t)&&""!==t?e?a.Might:a.Not:e&&"-"!==t?a.Must:void 0}return a.Not}(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}},5073:(t,e,n)=>{"use strict";n.d(e,{U:()=>l,t:()=>u});var i=n(8778),r=n(7158),o=n(7252),a=n(6203),s=n(9785),l=function(){function t(t){this._sourceList=[],this._upstreamSignList=[],this._versionSignBase=0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[])},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,s=this._getUpstreamSourceManagers(),l=!!s.length;if(c(n)){var u=n,h=void 0,p=void 0,d=void 0;if(l){var f=s[0];f.prepareSource(),h=(d=f.getSource()).data,p=d.sourceFormat,e=[f._getVersionSign()]}else h=u.get("data",!0),p=(0,i.fU)(h)?o.J5:o.cy,e=[];var g=(0,a.pV)(d,this._getSourceMetaRawOption());t=[(0,r._P)(h,g,p,u.get("encode",!0))]}else{var v=n;if(l){var y=this._applyTransform(s);t=y.sourceList,e=y.upstreamSignList}else{var m=v.get("source",!0);t=[(0,r._P)(m,this._getSourceMetaRawOption(),null,null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,o=n.get("transform",!0),a=n.get("fromTransformResult",!0);null!=a&&1!==t.length&&h("");var l=[],u=[];return(0,i.S6)(t,(function(t){t.prepareSource();var e=t.getSource(a||0);null==a||e||h(""),l.push(e),u.push(t._getVersionSign())})),o?e=(0,s.vK)(o,l,{datasetIndex:n.componentIndex}):null!=a&&(e=[(0,r.ML)(l[0])]),{sourceList:e,upstreamSignList:u}},t.prototype._isDirty=function(){if(!this._sourceList.length)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},t.prototype.getSource=function(t){return this._sourceList[t||0]},t.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(c(t)){var e=(0,a.Wd)(t);return e?[e.getSourceManager()]:[]}return(0,i.UI)((0,a.JT)(t),(function(t){return t.getSourceManager()}))},t.prototype._getSourceMetaRawOption=function(){var t,e,n,i=this._sourceHost;if(c(i))t=i.get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var r=i;t=r.get("seriesLayoutBy",!0),e=r.get("sourceHeader",!0),n=r.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:e,dimensions:n}},t}();function u(t){t.option.transform&&(0,i.s7)(t.option.transform)}function c(t){return"series"===t.mainType}function h(t){throw new Error(t)}},9785:(t,e,n)=>{"use strict";n.d(e,{DA:()=>y,vK:()=>m});var i=n(7252),r=n(5495),o=n(8778),a=n(1245),s=n(5294),l=n(6203),u=n(3264),c=n(7158),h=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return(0,s.yQ)(t,e)},t}();function p(t){var e=t.sourceFormat,n=t.data;if(e===i.XD||e===i.qb||!n||(0,o.kJ)(n)&&!n.length)return t.data;(0,u._y)("")}function d(t){var e=t.sourceFormat,n=t.data;if(!n)return n;if((0,o.kJ)(n)&&!n.length)return[];if(e===i.XD){for(var r=[],a=0,s=n.length;a<s;a++)r.push(n[a].slice());return r}if(e===i.qb){for(r=[],a=0,s=n.length;a<s;a++)r.push((0,o.l7)({},n[a]));return r}}function f(t,e,n){if(null!=n)return"number"==typeof n||!isNaN(n)&&!(0,o.RI)(e,n)?t[n]:(0,o.RI)(e,n)?e[n]:void 0}function g(t){return(0,o.d9)(t)}var v=(0,o.kW)();function y(t){var e=(t=(0,o.d9)(t)).type;e||(0,u._y)("");var n=e.split(":");2!==n.length&&(0,u._y)("");var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,v.set(e,t)}function m(t,e,n){var i=(0,r.kF)(t),o=i.length;o||(0,u._y)("");for(var a=0,s=o;a<s;a++)e=_(i[a],e),a!==s-1&&(e.length=Math.max(e.length,1));return e}function _(t,e,n,s){e.length||(0,u._y)(""),(0,o.Kn)(t)||(0,u._y)("");var y=t.type,m=v.get(y);m||(0,u._y)("");var _=(0,o.UI)(e,(function(t){return function(t,e){var n=new h,r=t.data,s=n.sourceFormat=t.sourceFormat,l=t.startIndex,c=[],v={},y=t.dimensionsDefine;if(y)(0,o.S6)(y,(function(t,e){var n=t.name,i={index:e,name:n,displayName:t.displayName};c.push(i),null!=n&&((0,o.RI)(v,n)&&(0,u._y)(""),v[n]=i)}));else for(var m=0;m<t.dimensionsDetectedCount;m++)c.push({index:m});var _=(0,a._j)(s,i.fY);e.__isBuiltIn&&(n.getRawDataItem=function(t){return _(r,l,c,t)},n.getRawData=(0,o.ak)(p,null,t)),n.cloneRawData=(0,o.ak)(d,null,t);var x=(0,a.a)(s,i.fY);n.count=(0,o.ak)(x,null,r,l,c);var b=(0,a.tB)(s);n.retrieveValue=function(t,e){var n=_(r,l,c,t);return w(n,e)};var w=n.retrieveValueFromItem=function(t,e){if(null!=t){var n=c[e];return n?b(t,e,n.name):void 0}};return n.getDimensionInfo=(0,o.ak)(f,null,c,v),n.cloneAllDimensionInfo=(0,o.ak)(g,null,c),n}(t,m)})),x=(0,r.kF)(m.transform({upstream:_[0],upstreamList:_,config:(0,o.d9)(t.config)}));return(0,o.UI)(x,(function(t){(0,o.Kn)(t)||(0,u._y)("");var n=t.data;null!=n?(0,o.Kn)(n)||(0,o.zG)(n)||(0,u._y)(""):n=e[0].data;var r=(0,l.pV)(e[0],{seriesLayoutBy:i.fY,sourceHeader:0,dimensions:t.dimensions});return(0,c._P)(n,r,null,null)}))}},8966:(t,e,n)=>{"use strict";n.r(e),n.d(e,{PRIORITY:()=>br,connect:()=>vo,dataTool:()=>Vo,dependencies:()=>mr,disConnect:()=>yo,disconnect:()=>mo,dispose:()=>_o,extendChartView:()=>No,extendComponentModel:()=>Ro,extendComponentView:()=>Eo,extendSeriesModel:()=>Zo,getCoordinateSystemDimensions:()=>Io,getInstanceByDom:()=>xo,getInstanceById:()=>bo,getMap:()=>Fo,init:()=>go,registerAction:()=>ko,registerCoordinateSystem:()=>Ao,registerLayout:()=>Do,registerLoading:()=>Lo,registerLocale:()=>tr.I2,registerMap:()=>zo,registerPostInit:()=>Mo,registerPostUpdate:()=>Co,registerPreprocessor:()=>So,registerProcessor:()=>To,registerTheme:()=>wo,registerTransform:()=>Wo,registerVisual:()=>Po,setCanvasCreator:()=>Bo,version:()=>yr});var i=n(9312),r=n(8781),o=n(8778),a=n(213),s=function(t,e){this.target=t,this.topTarget=e&&e.topTarget};const l=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new s(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.handler.dispatchToElement(new s(e,t),"drag",t.event);var a=this.handler.findHover(n,i,e).target,l=this._dropTarget;this._dropTarget=a,e!==a&&(l&&a!==l&&this.handler.dispatchToElement(new s(l,t),"dragleave",t.event),a&&a!==l&&this.handler.dispatchToElement(new s(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new s(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new s(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}();var u=n(444),c=n(3837),h=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o<a;o++){var s=i[o],l=c.eV(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},t.prototype._recognize=function(t){for(var e in d)if(d.hasOwnProperty(e)){var n=d[e](this._track,t);if(n)return n}},t}();function p(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}var d={pinch:function(t,e){var n=t.length;if(n){var i,r=(t[n-1]||{}).points,o=(t[n-2]||{}).points||r;if(o&&o.length>1&&r&&r.length>1){var a=p(r)/p(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},f="silent";function g(){c.sT(this.event)}var v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return(0,i.ZT)(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(u.Z),y=function(t,e){this.x=t,this.y=e},m=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new y(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new v,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new l(o),o}return(0,i.ZT)(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(o.S6(m,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=b(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new y(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!n&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new y(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:g}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new y(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=x(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==f)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new h);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new y;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(u.Z);function x(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}i=i.__hostTarget||i.parent}return!r||f}return!1}function b(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}o.S6(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){_.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,s=b(this,r,o);if("mouseup"===t&&s||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||a.TK(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));const w=_;var S=n(8073);function T(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r<n&&i(t[r],t[r-1])<0;)r++;!function(t,e,n){for(n--;e<n;){var i=t[e];t[e++]=t[n],t[n--]=i}}(t,e,r)}else for(;r<n&&i(t[r],t[r-1])>=0;)r++;return r-e}function M(t,e,n,i,r){for(i===e&&i++;i<n;i++){for(var o,a=t[i],s=e,l=i;s<l;)r(a,t[o=s+l>>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function C(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l<s&&o(t,e[n+r+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;l<s&&o(t,e[n+r-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a<l;){var c=a+(l-a>>>1);o(t,e[n+c])>0?a=c+1:l=c}return l}function k(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;l<s&&o(t,e[n+r-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l<s&&o(t,e[n+r+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a<l;){var c=a+(l-a>>>1);o(t,e[n+c])<0?l=c:a=c+1}return l}function A(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(r<2)){var o=0;if(r<32)M(t,n,i,n+(o=T(t,n,i,e)),e);else{var a=function(t,e){var n,i,r=7,o=0;t.length;var a=[];function s(s){var l=n[s],u=i[s],c=n[s+1],h=i[s+1];i[s]=u+h,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=k(t[c],t,l,u,0,e);l+=p,0!=(u-=p)&&0!==(h=C(t[l+u-1],t,c,h,h-1,e))&&(u<=h?function(n,i,o,s){var l=0;for(l=0;l<i;l++)a[l]=t[n+l];var u=0,c=o,h=n;if(t[h++]=t[c++],0!=--s)if(1!==i){for(var p,d,f,g=r;;){p=0,d=0,f=!1;do{if(e(t[c],a[u])<0){if(t[h++]=t[c++],d++,p=0,0==--s){f=!0;break}}else if(t[h++]=a[u++],p++,d=0,1==--i){f=!0;break}}while((p|d)<g);if(f)break;do{if(0!==(p=k(t[c],a,u,i,0,e))){for(l=0;l<p;l++)t[h+l]=a[u+l];if(h+=p,u+=p,(i-=p)<=1){f=!0;break}}if(t[h++]=t[c++],0==--s){f=!0;break}if(0!==(d=C(a[u],t,c,s,0,e))){for(l=0;l<d;l++)t[h+l]=t[c+l];if(h+=d,c+=d,0==(s-=d)){f=!0;break}}if(t[h++]=a[u++],1==--i){f=!0;break}g--}while(p>=7||d>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l<s;l++)t[h+l]=t[c+l];t[h+s]=a[u]}else{if(0===i)throw new Error;for(l=0;l<i;l++)t[h+l]=a[u+l]}}else{for(l=0;l<s;l++)t[h+l]=t[c+l];t[h+s]=a[u]}else for(l=0;l<i;l++)t[h+l]=a[u+l]}(l,u,c,h):function(n,i,o,s){var l=0;for(l=0;l<s;l++)a[l]=t[o+l];var u=n+i-1,c=s-1,h=o+s-1,p=0,d=0;if(t[h--]=t[u--],0!=--i)if(1!==s){for(var f=r;;){var g=0,v=0,y=!1;do{if(e(a[c],t[u])<0){if(t[h--]=t[u--],g++,v=0,0==--i){y=!0;break}}else if(t[h--]=a[c--],v++,g=0,1==--s){y=!0;break}}while((g|v)<f);if(y)break;do{if(0!=(g=i-k(a[c],t,n,i,i-1,e))){for(i-=g,d=1+(h-=g),p=1+(u-=g),l=g-1;l>=0;l--)t[d+l]=t[p+l];if(0===i){y=!0;break}}if(t[h--]=a[c--],1==--s){y=!0;break}if(0!=(v=s-C(t[u],a,0,s,s-1,e))){for(s-=v,d=1+(h-=v),p=1+(c-=v),l=0;l<v;l++)t[d+l]=a[p+l];if(s<=1){y=!0;break}}if(t[h--]=t[u--],0==--i){y=!0;break}f--}while(g>=7||v>=7);if(y)break;f<0&&(f=0),f+=2}if((r=f)<1&&(r=1),1===s){for(d=1+(h-=i),p=1+(u-=i),l=i-1;l>=0;l--)t[d+l]=t[p+l];t[h]=a[c]}else{if(0===s)throw new Error;for(p=h-(s-1),l=0;l<s;l++)t[p+l]=a[l]}}else{for(d=1+(h-=i),p=1+(u-=i),l=i-1;l>=0;l--)t[d+l]=t[p+l];t[h]=a[c]}else for(p=h-(s-1),l=0;l<s;l++)t[p+l]=a[l]}(l,u,c,h))}return n=[],i=[],{mergeRuns:function(){for(;o>1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]<i[t+1]&&t--;else if(i[t]>i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]<i[t+1]&&t--,s(t)}},pushRun:function(t,e){n[o]=t,i[o]=e,o+=1}}}(t,e),s=function(t){for(var e=0;t>=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=T(t,n,i,e))<s){var l=r;l>s&&(l=s),M(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var I=!1;function D(){I||(I=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function P(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}const O=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=P}return t.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},t.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return!t&&n.length||this.updateDisplayList(e),n},t.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,o=e.length;i<o;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,r.Z.canvasSupported&&A(n,P)},t.prototype._updateAndAddDisplayable=function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e=e?e.slice():[];for(var r=i,o=t;r;)r.parent=o,r.updateTransform(),e.push(r),o=r,r=r.getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty|=S.Z.REDARAW_BIT),this._updateAndAddDisplayable(l,e,n)}t.__dirty=0}else{var u=t;e&&e.length?u.__clipPaths=e:u.__clipPaths&&u.__clipPaths.length>0&&(u.__clipPaths=[]),isNaN(u.z)&&(D(),u.z=0),isNaN(u.z2)&&(D(),u.z2=0),isNaN(u.zlevel)&&(D(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,e,n);var h=t.getTextGuideLine();h&&this._updateAndAddDisplayable(h,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);else{var i=o.cq(this._roots,t);i>=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),L="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var R=n(4017);const E=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n.onframe=e.onframe||function(){},n}return(0,i.ZT)(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?(this._clipsTail.next=t,t.prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;){var r=i.next;i.step(e,n)?(i.ondestroy&&i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,L((function e(){t._running&&(L(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},e.prototype.isFinished=function(){return null==this._clipsHead},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new R.ZP(t,e.loop);return this.addAnimator(n),n},e}(u.Z);var Z,N,B=r.Z.domSupported,z=(N={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Z=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:o.UI(Z,(function(t){var e=t.replace("mouse","pointer");return N.hasOwnProperty(e)?e:t}))}),F=["mousemove","mouseup"],W=["pointermove","pointerup"],V=!1;function H(t){var e=t.pointerType;return"pen"===e||"touch"===e}function U(t){t&&(t.zrByTouch=!0)}function G(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var X=function(t,e){this.stopPropagation=o.ZT,this.stopImmediatePropagation=o.ZT,this.preventDefault=o.ZT,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Y={mousedown:function(t){t=(0,c.OD)(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=(0,c.OD)(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=(0,c.OD)(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){if(t.target===this.dom){t=(0,c.OD)(this.dom,t),this.__pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=G(this,e),this.trigger("mouseout",t)}},wheel:function(t){V=!0,t=(0,c.OD)(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){V||(t=(0,c.OD)(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){U(t=(0,c.OD)(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Y.mousemove.call(this,t),Y.mousedown.call(this,t)},touchmove:function(t){U(t=(0,c.OD)(this.dom,t)),this.handler.processGesture(t,"change"),Y.mousemove.call(this,t)},touchend:function(t){U(t=(0,c.OD)(this.dom,t)),this.handler.processGesture(t,"end"),Y.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Y.click.call(this,t)},pointerdown:function(t){Y.mousedown.call(this,t)},pointermove:function(t){H(t)||Y.mousemove.call(this,t)},pointerup:function(t){Y.mouseup.call(this,t)},pointerout:function(t){H(t)||Y.mouseout.call(this,t)}};o.S6(["click","dblclick","contextmenu"],(function(t){Y[t]=function(e){e=(0,c.OD)(this.dom,e),this.trigger(t,e)}}));var j={pointermove:function(t){H(t)||j.mousemove.call(this,t)},pointerup:function(t){j.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function $(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,(0,c.Oo)(t.domTarget,e,n,i)}function q(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&(0,c.xg)(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}var K=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e};const J=function(t){function e(e,n){var i,a,s,l=t.call(this)||this;return l.__pointerCapturing=!1,l.dom=e,l.painterRoot=n,l._localHandlerScope=new K(e,Y),B&&(l._globalHandlerScope=new K(document,j)),i=l,a=l._localHandlerScope,s=a.domHandlers,r.Z.pointerEventsSupported?o.S6(z.pointer,(function(t){$(a,t,(function(e){s[t].call(i,e)}))})):(r.Z.touchEventsSupported&&o.S6(z.touch,(function(t){$(a,t,(function(e){s[t].call(i,e),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(a)}))})),o.S6(z.mouse,(function(t){$(a,t,(function(e){e=(0,c.iP)(e),a.touching||s[t].call(i,e)}))}))),l}return(0,i.ZT)(e,t),e.prototype.dispose=function(){q(this._localHandlerScope),B&&q(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,B&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?function(t,e){function n(n){$(e,n,(function(i){i=(0,c.iP)(i),G(t,i.target)||(i=function(t,e){return(0,c.OD)(t.dom,new X(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}r.Z.pointerEventsSupported?o.S6(W,n):r.Z.touchEventsSupported||o.S6(F,n)}(this,e):q(e)}},e}(u.Z);var Q,tt=n(1756),et=n(7367),nt=n(6454),it=n(6781),rt=n(1707),ot=n(230),at=n(9509),st=n(6573),lt=n(391),ut=n(1748),ct=n(9181),ht=n(561),pt=n(5853),dt=n(9882),ft=/[\s,]+/;function gt(t){(0,o.HD)(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}!function(){function t(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}t.prototype.parse=function(t,e){e=e||{};var n=gt(t);if(!n)throw new Error("Illegal svg");var i=new nt.Z;this._root=i;var r=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),s=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),xt(n,i,null,!0);for(var l,u,c=n.firstChild;c;)this._parseNode(c,i),c=c.nextSibling;if(r){var h=(0,o.fy)(r).split(ft);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=s&&(u=function(t,e,n){var i=e/t.width,r=n/t.height,o=Math.min(i,r);return{scale:o,x:-(t.x+t.width/2)*o+e/2,y:-(t.y+t.height/2)*o+n/2}}(l,a,s),!e.ignoreViewBox)){var p=i;(i=new nt.Z).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new ot.Z({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u}},t.prototype._parseNode=function(t,e){var n,i,r=t.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(i=vt[r]){var o=i.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else(i=Q[r])&&(n=i.call(this,t,e),e.add(n));if(n)for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},t.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new dt.Z({style:{text:t.textContent},x:this._textX||0,y:this._textY||0});yt(e,r),xt(t,r,this._defs);var o=r.style,a=o.fontSize;a&&a<9&&(o.fontSize=9,r.scaleX*=a/9,r.scaleY*=a/9);var s=(o.fontSize||o.fontFamily)&&[o.fontStyle,o.fontWeight,(o.fontSize||12)+"px",o.fontFamily||"sans-serif"].join(" ");o.font=s;var l=r.getBoundingRect();return this._textX+=l.width,e.add(r),r},t.internalField=void(Q={g:function(t,e){var n=new nt.Z;return yt(e,n),xt(t,n,this._defs),n},rect:function(t,e){var n=new ot.Z;return yt(e,n),xt(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n},circle:function(t,e){var n=new rt.Z;return yt(e,n),xt(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n},line:function(t,e){var n=new st.Z;return yt(e,n),xt(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n},ellipse:function(t,e){var n=new at.Z;return yt(e,n),xt(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=mt(i));var r=new ut.Z({shape:{points:n||[]}});return yt(e,r),xt(t,r,this._defs),r},polyline:function(t,e){var n=new lt.ZP;yt(e,n),xt(t,n,this._defs);var i,r=t.getAttribute("points");return r&&(i=mt(r)),new ct.Z({shape:{points:i||[]}})},image:function(t,e){var n=new it.ZP;return yt(e,n),xt(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new nt.Z;return yt(e,a),xt(t,a,this._defs),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,a=new nt.Z;return yt(e,a),xt(t,a,this._defs),this._textX+=r,this._textY+=o,a},path:function(t,e){var n=t.getAttribute("d")||"",i=(0,et.iR)(n);return yt(e,i),xt(t,i,this._defs),i}})}();var vt={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new pt.Z(e,n,i,r);return function(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType){var i,r=n.getAttribute("offset");i=r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var o=n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}n=n.nextSibling}}(t,o),o}};function yt(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),(0,o.ce)(e.__inheritedStyle,t.__inheritedStyle))}function mt(t){for(var e=(0,o.fy)(t).split(ft),n=[],i=0;i<e.length;i+=2){var r=parseFloat(e[i]),a=parseFloat(e[i+1]);n.push([r,a])}return n}var _t={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function xt(t,e,n,i){var r=e,a=r.__inheritedStyle||{};if(1===t.nodeType&&(function(t,e){var n=t.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=[],r=null;n.replace(St,(function(t,e,n){return i.push(e,n),""}));for(var a=i.length-1;a>0;a-=2){var s=i[a],l=i[a-1],u=void 0;switch(r=r||ht.Ue(),l){case"translate":u=(0,o.fy)(s).split(ft),ht.Iu(r,r,[parseFloat(u[0]),parseFloat(u[1]||"0")]);break;case"scale":u=(0,o.fy)(s).split(ft),ht.bA(r,r,[parseFloat(u[0]),parseFloat(u[1]||u[0])]);break;case"rotate":u=(0,o.fy)(s).split(ft),ht.U1(r,r,parseFloat(u[0]));break;case"skew":u=(0,o.fy)(s).split(ft),console.warn("Skew transform is not supported yet");break;case"matrix":u=(0,o.fy)(s).split(ft),r[0]=parseFloat(u[0]),r[1]=parseFloat(u[1]),r[2]=parseFloat(u[2]),r[3]=parseFloat(u[3]),r[4]=parseFloat(u[4]),r[5]=parseFloat(u[5])}}e.setLocalTransform(r)}}(t,e),(0,o.l7)(a,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,r={};for(Tt.lastIndex=0;null!=(i=Tt.exec(e));)r[i[1]]=i[2];for(var o in _t)_t.hasOwnProperty(o)&&null!=r[o]&&(n[_t[o]]=r[o]);return n}(t)),!i))for(var s in _t)if(_t.hasOwnProperty(s)){var l=t.getAttribute(s);null!=l&&(a[_t[s]]=l)}r.style=r.style||{},null!=a.fill&&(r.style.fill=wt(a.fill,n)),null!=a.stroke&&(r.style.stroke=wt(a.stroke,n)),(0,o.S6)(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){null!=a[t]&&(r.style[t]=parseFloat(a[t]))})),a.textBaseline&&"auto"!==a.textBaseline||(a.textBaseline="alphabetic"),"alphabetic"===a.textBaseline&&(a.textBaseline="bottom"),"start"===a.textAlign&&(a.textAlign="left"),"end"===a.textAlign&&(a.textAlign="right"),(0,o.S6)(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=a[t]&&(r.style[t]=a[t])})),a.lineDash&&(r.style.lineDash=(0,o.UI)((0,o.fy)(a.lineDash).split(ft),(function(t){return parseFloat(t)}))),r.__inheritedStyle=a}var bt=/url\(\s*#(.*?)\)/;function wt(t,e){var n=e&&t&&t.match(bt);return n?e[(0,o.fy)(n[1])]:t}var St=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,Tt=/([^\s:;]+)\s*:\s*([^:;]+)/g,Mt=n(2397),Ct=n(3475);n(2098),Mt.Z.CMD,Math.PI,n(6),n(8234);var kt=n(2012),At=(n(4239),n(9689),n(3584),function(){this.cx=0,this.cy=0,this.width=0,this.height=0});(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new At},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=e.width,o=e.height;t.moveTo(n,i+r),t.bezierCurveTo(n+r,i+r,n+3*r/2,i-r/3,n,i-o),t.bezierCurveTo(n-3*r/2,i-r/3,n-r,i+r,n,i+r),t.closePath()},e})(lt.ZP).prototype.type="droplet";var It=function(){this.cx=0,this.cy=0,this.width=0,this.height=0};(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new It},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=e.width,o=e.height;t.moveTo(n,i),t.bezierCurveTo(n+r/2,i-2*o/3,n+2*r,i+o/3,n,i+o),t.bezierCurveTo(n-2*r,i+o/3,n-r/2,i-2*o/3,n,i)},e})(lt.ZP).prototype.type="heart";var Dt=Math.PI,Pt=Math.sin,Ot=Math.cos,Lt=function(){this.x=0,this.y=0,this.r=0,this.n=0};(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Lt},e.prototype.buildPath=function(t,e){var n=e.n;if(n&&!(n<2)){var i=e.x,r=e.y,o=e.r,a=2*Dt/n,s=-Dt/2;t.moveTo(i+o*Ot(s),r+o*Pt(s));for(var l=0,u=n-1;l<u;l++)s+=a,t.lineTo(i+o*Ot(s),r+o*Pt(s));t.closePath()}},e})(lt.ZP).prototype.type="isogon",n(4874);var Rt=Math.sin,Et=Math.cos,Zt=Math.PI/180,Nt=function(){this.cx=0,this.cy=0,this.r=[],this.k=0,this.n=1};(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Nt},e.prototype.buildPath=function(t,e){var n,i,r,o=e.r,a=e.k,s=e.n,l=e.cx,u=e.cy;t.moveTo(l,u);for(var c=0,h=o.length;c<h;c++){r=o[c];for(var p=0;p<=360*s;p++)n=r*Rt(a/s*p%360*Zt)*Et(p*Zt)+l,i=r*Rt(a/s*p%360*Zt)*Rt(p*Zt)+u,t.lineTo(n,i)}},e})(lt.ZP).prototype.type="rose";var Bt=Math.PI,zt=Math.cos,Ft=Math.sin,Wt=function(){this.cx=0,this.cy=0,this.n=3,this.r=0};(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Wt},e.prototype.buildPath=function(t,e){var n=e.n;if(n&&!(n<2)){var i=e.cx,r=e.cy,o=e.r,a=e.r0;null==a&&(a=n>4?o*zt(2*Bt/n)/zt(Bt/n):o/3);var s=Bt/n,l=-Bt/2,u=i+o*zt(l),c=r+o*Ft(l);l+=s,t.moveTo(u,c);for(var h=0,p=2*n-1,d=void 0;h<p;h++)d=h%2==0?a:o,t.lineTo(i+d*zt(l),r+d*Ft(l)),l+=s;t.closePath()}},e})(lt.ZP).prototype.type="star";var Vt=Math.cos,Ht=Math.sin,Ut=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0,this.d=0,this.location="out"};(function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Ut},e.prototype.buildPath=function(t,e){var n,i,r,o,a=e.r,s=e.r0,l=e.d,u=e.cx,c=e.cy,h="out"===e.location?1:-1;if(!(e.location&&a<=s)){var p,d=0,f=1;n=(a+h*s)*Vt(0)-h*l*Vt(0)+u,i=(a+h*s)*Ht(0)-l*Ht(0)+c,t.moveTo(n,i);do{d++}while(s*d%(a+h*s)!=0);do{p=Math.PI/180*f,r=(a+h*s)*Vt(p)-h*l*Vt((a/s+h)*p)+u,o=(a+h*s)*Ht(p)-l*Ht((a/s+h)*p)+c,t.lineTo(r,o),f++}while(f<=s*d/(a+h*s)*360)}},e})(lt.ZP).prototype.type="trochoid",n(2763);var Gt=n(9472);n(8511),function(){function t(t){var e=this.dom=document.createElement("div");for(var n in e.className="ec-debug-dirty-rect",t=Object.assign({},t),Object.assign(t,{backgroundColor:"rgba(0, 0, 255, 0.2)",border:"1px solid #00f"}),e.style.cssText="\nposition: absolute;\nopacity: 0;\ntransition: opacity 0.5s linear;\npointer-events: none;\n",t)t.hasOwnProperty(n)&&(e.style[n]=t[n])}t.prototype.update=function(t){var e=this.dom.style;e.width=t.width+"px",e.height=t.height+"px",e.left=t.x+"px",e.top=t.y+"px"},t.prototype.hide=function(){this.dom.style.opacity="0"},t.prototype.show=function(t){var e=this;clearTimeout(this._hideTimeout),this.dom.style.opacity="1",this._hideTimeout=setTimeout((function(){e.hide()}),t||1e3)}}();var Xt=n(5080),Yt=!r.Z.canvasSupported,jt={},$t={},qt=function(){function t(t,e,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var o=new O,a=n.renderer;if(Yt){if(!jt.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a||(a="canvas");if(!jt[a])throw new Error("Renderer '"+a+"' is not imported. Please import it first.");n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var s=new jt[a](e,o,n,t);this.storage=o,this.painter=s;var l=r.Z.node||r.Z.worker?null:new J(s.getViewportRoot(),s.root);this.handler=new w(o,s,l,s.root),this.animation=new E({stage:{update:function(){return i._flush(!0)}}}),this.animation.start()}return t.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},t.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return(0,tt.L0)(t,1)<Xt.Ak;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,r=0;r<i;r++)n+=(0,tt.L0)(e[r].color,1);return(n/=i)<Xt.Ak}return!1}(t)},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(t){this._darkMode=t},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},t.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},t.prototype.flush=function(){this._flush(!1)},t.prototype._flush=function(t){var e,n=(new Date).getTime();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var i=(new Date).getTime();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.addHover=function(t){},t.prototype.removeHover=function(t){},t.prototype.clearHover=function(){},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof nt.Z&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},t.prototype.dispose=function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete $t[t]},t}();function Kt(t,e){var n=new qt(o.M8(),t,e);return $t[n.id]=n,n}var Jt=n(5495),Qt=n(4708),te=n(2822),ee="";"undefined"!=typeof navigator&&(ee=navigator.platform||"");var ne="rgba(0, 0, 0, 0.2)";const ie={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ne,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ne,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ne,dashArrayX:[1,0],dashArrayY:[4,3],dashLineOffset:0,rotation:-Math.PI/4},{color:ne,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ne,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ne,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:ee.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 re,oe,ae,se=n(6203),le=n(4841),ue=n(661),ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Qt.Z(i),this._locale=new Qt.Z(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){(0,o.hu)(!("\0_ec_inner"in t),"please use chart.getOption()");var i=de(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,de(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):ae(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,e))}if(!t||"recreate"===t||"media"===t){var s=i.getMediaOption(this);s.length&&(0,o.S6)(s,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,a=[],s=(0,o.kW)(),l=e&&e.replaceMergeMainTypeMap;(0,se.md)(this),(0,o.S6)(t,(function(t,e){null!=t&&(te.Z.hasClass(e)?e&&(a.push(e),s.set(e,!0)):n[e]=null==n[e]?(0,o.d9)(t):(0,o.TS)(n[e],t,!0))})),l&&l.each((function(t,e){te.Z.hasClass(e)&&!s.get(e)&&(a.push(e),s.set(e,!0))})),te.Z.topologicalTravel(a,te.Z.getAllClassMainTypes(),(function(e){var a=(0,le.R)(this,e,Jt.kF(t[e])),s=i.get(e),u=s?l&&l.get(e)?"replaceMerge":"normalMerge":"replaceAll",c=Jt.ab(s,a,u);Jt.O0(c,e,te.Z),n[e]=null,i.set(e,null),r.set(e,0);var h=[],p=[],d=0;(0,o.S6)(c,(function(t,n){var i=t.existing,r=t.newOption;if(r){var a=te.Z.getClass(e,t.keyInfo.subType,!0);if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=(0,o.l7)({componentIndex:n},t.keyInfo);i=new a(r,this,this,s),(0,o.l7)(i,s),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(h.push(i.option),p.push(i),d++):(h.push(void 0),p.push(void 0))}),this),n[e]=h,i.set(e,p),r.set(e,d),"series"===e&&re(this)}),this),this._seriesIndices||re(this)},e.prototype.getOption=function(){var t=(0,o.d9)(this.option);return(0,o.S6)(t,(function(e,n){if(te.Z.hasClass(n)){for(var i=Jt.kF(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!Jt.lY(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r<n.length;r++)if(n[r])return n[r]}},e.prototype.queryComponents=function(t){var e=t.mainType;if(!e)return[];var n,i=t.index,r=t.id,a=t.name,s=this._componentsMap.get(e);return s&&s.length?(null!=i?(n=[],(0,o.S6)(Jt.kF(i),(function(t){s[t]&&n.push(s[t])}))):n=null!=r?he("id",r,s):null!=a?he("name",a,s):(0,o.hX)(s,(function(t){return!!t})),pe(n,t)):[]},e.prototype.findComponents=function(t){var e,n,i,r,a,s=t.query,l=t.mainType,u=(n=l+"Index",i=l+"Id",r=l+"Name",!(e=s)||null==e[n]&&null==e[i]&&null==e[r]?null:{mainType:l,index:e[n],id:e[i],name:e[r]});return a=pe(u?this.queryComponents(u):(0,o.hX)(this._componentsMap.get(l),(function(t){return!!t})),t),t.filter?(0,o.hX)(a,t.filter):a},e.prototype.eachComponent=function(t,e,n){var i=this._componentsMap;if((0,o.mf)(t)){var r=e,a=t;i.each((function(t,e){for(var n=0;t&&n<t.length;n++){var i=t[n];i&&a.call(r,e,i,i.componentIndex)}}))}else for(var s=(0,o.HD)(t)?i.get(t):(0,o.Kn)(t)?this.findComponents(t):null,l=0;s&&l<s.length;l++){var u=s[l];u&&e.call(n,u,u.componentIndex)}},e.prototype.getSeriesByName=function(t){var e=Jt.U5(t,null);return(0,o.hX)(this._componentsMap.get("series"),(function(t){return!!t&&null!=e&&t.name===e}))},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return(0,o.hX)(this._componentsMap.get("series"),(function(e){return!!e&&e.subType===t}))},e.prototype.getSeries=function(){return(0,o.hX)(this._componentsMap.get("series").slice(),(function(t){return!!t}))},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,e){oe(this),(0,o.S6)(this._seriesIndices,(function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)}),this)},e.prototype.eachRawSeries=function(t,e){(0,o.S6)(this._componentsMap.get("series"),(function(n){n&&t.call(e,n,n.componentIndex)}))},e.prototype.eachSeriesByType=function(t,e,n){oe(this),(0,o.S6)(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)}),this)},e.prototype.eachRawSeriesByType=function(t,e,n){return(0,o.S6)(this.getSeriesByType(t),e,n)},e.prototype.isSeriesFiltered=function(t){return oe(this),null==this._seriesIndicesMap.get(t.componentIndex)},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,e){oe(this);var n=[];(0,o.S6)(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];t.call(e,r,i)&&n.push(i)}),this),this._seriesIndices=n,this._seriesIndicesMap=(0,o.kW)(n)},e.prototype.restoreData=function(t){re(this);var e=this._componentsMap,n=[];e.each((function(t,e){te.Z.hasClass(e)&&n.push(e)})),te.Z.topologicalTravel(n,te.Z.getAllClassMainTypes(),(function(n){(0,o.S6)(e.get(n),(function(e){!e||"series"===n&&function(t,e){if(e){var n=e.seriesIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}(e,t)||e.restoreData()}))}))},e.internalField=(re=function(t){var e=t._seriesIndices=[];(0,o.S6)(t._componentsMap.get("series"),(function(t){t&&e.push(t.componentIndex)})),t._seriesIndicesMap=(0,o.kW)(e)},oe=function(t){},void(ae=function(t,e){t.option={},t.option["\0_ec_inner"]=1,t._componentsMap=(0,o.kW)({series:[]}),t._componentsCount=(0,o.kW)();var n=e.aria;(0,o.Kn)(n)&&null==n.enabled&&(n.enabled=!0),function(t,e){var n=t.color&&!t.colorLayer;(0,o.S6)(e,(function(e,i){"colorLayer"===i&&n||te.Z.hasClass(i)||("object"==typeof e?t[i]=t[i]?(0,o.TS)(t[i],e,!1):(0,o.d9)(e):null==t[i]&&(t[i]=e))}))}(e,t._theme.option),(0,o.TS)(e,ie,!1),t._mergeOption(e,null)})),e}(Qt.Z);function he(t,e,n){if((0,o.kJ)(e)){var i=(0,o.kW)();return(0,o.S6)(e,(function(t){null!=t&&null!=Jt.U5(t,null)&&i.set(t,!0)})),(0,o.hX)(n,(function(e){return e&&i.get(e[t])}))}var r=Jt.U5(e,null);return(0,o.hX)(n,(function(e){return e&&null!=r&&e[t]===r}))}function pe(t,e){return e.hasOwnProperty("subType")?(0,o.hX)(t,(function(t){return t&&t.subType===e.subType})):t}function de(t){var e=(0,o.kW)();return t&&(0,o.S6)(Jt.kF(t.replaceMerge),(function(t){e.set(t,!0)})),{replaceMergeMainTypeMap:e}}(0,o.jB)(ce,ue._);const fe=ce;var ge=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"];const ve=function(t){o.S6(ge,(function(e){this[e]=o.ak(t[e],t)}),this)};var ye=n(4134),me=n(3264),_e=/^(min|max)?(.+)$/;function xe(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return(0,o.S6)(t,(function(t,e){var n=e.match(_e);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();(function(t,e,n){return"min"===n?t>=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}const be=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,e,n){t&&((0,o.S6)((0,Jt.kF)(t.series),(function(t){t&&t.data&&(0,o.fU)(t.data)&&(0,o.s7)(t.data)})),(0,o.S6)((0,Jt.kF)(t.dataset),(function(t){t&&t.source&&(0,o.fU)(t.source)&&(0,o.s7)(t.source)}))),t=(0,o.d9)(t);var i=this._optionBackup,r=function(t,e,n){var i,r,a=[],s=t.baseOption,l=t.timeline,u=t.options,c=t.media,h=!!t.media,p=!!(u||l||s&&s.timeline);function d(t){(0,o.S6)(e,(function(e){e(t,n)}))}return s?(r=s).timeline||(r.timeline=l):((p||h)&&(t.options=t.media=null),r=t),h&&(0,o.kJ)(c)&&(0,o.S6)(c,(function(t){t&&t.option&&(t.query?a.push(t):i||(i=t))})),d(r),(0,o.S6)(u,(function(t){return d(t)})),(0,o.S6)(a,(function(t){return d(t.option)})),{baseOption:r,timelineOptions:u||[],mediaDefault:i,mediaList:a}}(t,e,!i);this._newBaseOption=r.baseOption,i?(r.timelineOptions.length&&(i.timelineOptions=r.timelineOptions),r.mediaList.length&&(i.mediaList=r.mediaList),r.mediaDefault&&(i.mediaDefault=r.mediaDefault)):this._optionBackup=r},t.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],(0,o.d9)(t?e.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=(0,o.d9)(n[i.getCurrentIndex()]))}return e},t.prototype.getMediaOption=function(t){var e,n,i=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,s=this._mediaDefault,l=[],u=[];if(!a.length&&!s)return u;for(var c=0,h=a.length;c<h;c++)xe(a[c].query,i,r)&&l.push(c);return!l.length&&s&&(l=[-1]),l.length&&(e=l,n=this._currentMediaIndices,e.join(",")!==n.join(","))&&(u=(0,o.UI)(l,(function(t){return(0,o.d9)(-1===t?s.option:a[t].option)}))),this._currentMediaIndices=l,u},t}();var we=o.S6,Se=o.Kn,Te=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Me(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Te.length;n<i;n++){var r=Te[n],a=e.normal,s=e.emphasis;a&&a[r]&&(t[r]=t[r]||{},t[r].normal?o.TS(t[r].normal,a[r]):t[r].normal=a[r],a[r]=null),s&&s[r]&&(t[r]=t[r]||{},t[r].emphasis?o.TS(t[r].emphasis,s[r]):t[r].emphasis=s[r],s[r]=null)}}function Ce(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,o.ce(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r,r.focus&&(t.emphasis.focus=r.focus),r.blurScope&&(t.emphasis.blurScope=r.blurScope))}}function ke(t){Ce(t,"itemStyle"),Ce(t,"lineStyle"),Ce(t,"areaStyle"),Ce(t,"label"),Ce(t,"labelLine"),Ce(t,"upperLabel"),Ce(t,"edgeLabel")}function Ae(t,e){var n=Se(t)&&t[e],i=Se(n)&&n.textStyle;if(i)for(var r=0,o=Jt.Td.length;r<o;r++){var a=Jt.Td[r];i.hasOwnProperty(a)&&(n[a]=i[a])}}function Ie(t){t&&(ke(t),Ae(t,"label"),t.emphasis&&Ae(t.emphasis,"label"))}function De(t){return o.kJ(t)?t:t?[t]:[]}function Pe(t){return(o.kJ(t)?t[0]:t)||{}}function Oe(t){t&&(0,o.S6)(Le,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var Le=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Re=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Ee=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Ze(t){var e=t&&t.itemStyle;if(e)for(var n=0;n<Ee.length;n++){var i=Ee[n][1],r=Ee[n][0];null!=e[i]&&(e[r]=e[i])}}function Ne(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function Be(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function ze(t,e){if(t)for(var n=0;n<t.length;n++)e(t[n]),t[n]&&ze(t[n].children,e)}function Fe(t,e){(function(t,e){we(De(t.series),(function(t){Se(t)&&function(t){if(Se(t)){Me(t),ke(t),Ae(t,"label"),Ae(t,"upperLabel"),Ae(t,"edgeLabel"),t.emphasis&&(Ae(t.emphasis,"label"),Ae(t.emphasis,"upperLabel"),Ae(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Me(e),Ie(e));var n=t.markLine;n&&(Me(n),Ie(n));var i=t.markArea;i&&Ie(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!o.fU(a))for(var s=0;s<a.length;s++)Ie(a[s]);o.S6(t.categories,(function(t){ke(t)}))}if(r&&!o.fU(r))for(s=0;s<r.length;s++)Ie(r[s]);if((e=t.markPoint)&&e.data){var l=e.data;for(s=0;s<l.length;s++)Ie(l[s])}if((n=t.markLine)&&n.data){var u=n.data;for(s=0;s<u.length;s++)o.kJ(u[s])?(Ie(u[s][0]),Ie(u[s][1])):Ie(u[s])}"gauge"===t.type?(Ae(t,"axisLabel"),Ae(t,"title"),Ae(t,"detail")):"treemap"===t.type?(Ce(t.breadcrumb,"itemStyle"),o.S6(t.levels,(function(t){ke(t)}))):"tree"===t.type&&ke(t.leaves)}}(t)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),we(n,(function(e){we(De(t[e]),(function(t){t&&(Ae(t,"axisLabel"),Ae(t.axisPointer,"label"))}))})),we(De(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;Ae(e,"axisLabel"),Ae(e&&e.axisPointer,"label")})),we(De(t.calendar),(function(t){Ce(t,"itemStyle"),Ae(t,"dayLabel"),Ae(t,"monthLabel"),Ae(t,"yearLabel")})),we(De(t.radar),(function(t){Ae(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)})),we(De(t.geo),(function(t){Se(t)&&(Ie(t),we(De(t.regions),(function(t){Ie(t)})))})),we(De(t.timeline),(function(t){Ie(t),Ce(t,"label"),Ce(t,"itemStyle"),Ce(t,"controlStyle",!0);var e=t.data;o.kJ(e)&&o.S6(e,(function(t){o.Kn(t)&&(Ce(t,"label"),Ce(t,"itemStyle"))}))})),we(De(t.toolbox),(function(t){Ce(t,"iconStyle"),we(t.feature,(function(t){Ce(t,"iconStyle")}))})),Ae(Pe(t.axisPointer),"label"),Ae(Pe(t.tooltip).axisPointer,"label")})(t,e),t.series=(0,Jt.kF)(t.series),(0,o.S6)(t.series,(function(t){if((0,o.Kn)(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e){if(null!=t.clockWise&&(t.clockwise=t.clockWise),Ne(t.label),(r=t.data)&&!(0,o.fU)(r))for(var n=0;n<r.length;n++)Ne(r[n]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===e){var i=function(t,e){for(var n="pointer.color".split(","),i=t,r=0;r<n.length&&null!=(i=i&&i[n[r]]);r++);return i}(t);null!=i&&function(t,e,n,i){for(var r,o="itemStyle.color".split(","),a=t,s=0;s<o.length-1;s++)null==a[r=o[s]]&&(a[r]={}),a=a[r];null==a[o[s]]&&(a[o[s]]=n)}(t,0,i)}else if("bar"===e){var r;if(Ze(t),Ze(t.backgroundStyle),Ze(t.emphasis),(r=t.data)&&!(0,o.fU)(r))for(n=0;n<r.length;n++)"object"==typeof r[n]&&(Ze(r[n]),Ze(r[n]&&r[n].emphasis))}else if("sunburst"===e){var a=t.highlightPolicy;a&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=a)),Be(t),ze(t.data,Be)}else"graph"===e||"sankey"===e?function(t){t&&null!=t.focusNodeAdjacency&&(t.emphasis=t.emphasis||{},null==t.emphasis.focus&&(t.emphasis.focus="adjacency"))}(t):"map"===e&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&(0,o.ce)(t,t.mapLocation));null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),Oe(t)}})),t.dataRange&&(t.visualMap=t.dataRange),(0,o.S6)(Re,(function(e){var n=t[e];n&&((0,o.kJ)(n)||(n=[n]),(0,o.S6)(n,(function(t){Oe(t)})))}))}function We(t){(0,o.S6)(t,(function(e,n){var i=[],r=[NaN,NaN],o=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=a.map(o,(function(o,l,u){var c,h,p=a.get(e.stackedDimension,u);if(isNaN(p))return r;s?h=a.getRawIndex(u):c=a.get(e.stackedByDimension,u);for(var d=NaN,f=n-1;f>=0;f--){var g=t[f];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,c)),h>=0){var v=g.data.getByRawIndex(g.stackResultDimension,h);if(p>=0&&v>0||p<=0&&v<0){p+=v,d=v;break}}}return i[0]=p,i[1]=d,i}));a.hostModel.setData(l),e.data=l}))}var Ve=n(4689),He=n(8278),Ue=n(2916),Ge=n(3696),Xe=n(1563),Ye=n(106),je=n(4013),$e=n(1761),qe=n(8261),Ke=n(3607),Je=(0,Jt.Yf)(),Qe={itemStyle:(0,$e.Z)(qe.t,!0),lineStyle:(0,$e.Z)(Ke.v,!0)},tn={lineStyle:"stroke",itemStyle:"fill"};function en(t,e){return t.visualStyleMapper||Qe[e]||(console.warn("Unkown style type '"+e+"'."),Qe.itemStyle)}function nn(t,e){return t.visualDrawType||tn[e]||(console.warn("Unkown style type '"+e+"'."),"fill")}var rn={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),a=en(t,i)(r),s=r.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=nn(t,i),u=a[l],c=(0,o.mf)(u)?u:null;if(a[l]&&!c||(a[l]=t.getColorFromPalette(t.name,null,e.getSeriesCount()),n.setVisual("colorFromPalette",!0)),n.setVisual("style",a),n.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=(0,o.l7)({},a);r[l]=c(i),e.setItemVisual(n,"style",r)}}}},on=new Qt.Z,an={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=en(t,i),a=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){on.option=n[i];var s=r(on),l=t.ensureUniqueItemVisual(e,"style");(0,o.l7)(l,s),on.option.decal&&(t.setItemVisual(e,"decal",on.option.decal),on.option.decal.dirty=!0),a in s&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},sn={performRawSeries:!0,overallReset:function(t){var e=(0,o.kW)();t.eachSeries((function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||(n={},e.set(t.type,n)),Je(t).scope=n}})),t.eachSeries((function(e){if(e.useColorPaletteOnData&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=Je(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=nn(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",c=n.count();l[s]=e.getColorFromPalette(u,o,c)}}))}}))}},ln=n(9356),un=Math.PI,cn=n(5193),hn=n(4053),pn=function(){function t(t,e,n,i){this._stageTaskMap=(0,o.kW)(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=(0,o.kW)();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;(0,o.S6)(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{});(0,o.hu)(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,a=this;function s(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}(0,o.S6)(t,(function(t,o){if(!i.visualType||i.visualType===t.visualType){var l=a._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,p=c.agentStubMap;p.each((function(t){s(i,t)&&(t.dirty(),h=!0)})),h&&c.dirty(),a.updatePayload(c,n);var d=a.getPerformArgs(c,i.block);p.each((function(t){t.perform(d)})),c.perform(d)&&(r=!0)}else u&&u.each((function(o,l){s(i,o)&&o.dirty();var u=a.getPerformArgs(o,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(o.context.model),a.updatePayload(o,n),o.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,a=e.seriesTaskMap,s=e.seriesTaskMap=(0,o.kW)(),l=t.seriesType,u=t.getTargetSeries;function c(e){var o=e.uid,l=s.set(o,a&&a.get(o)||(0,cn.v)({plan:yn,reset:mn,count:bn}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,a=e.overallTask=e.overallTask||(0,cn.v)({reset:dn});a.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var s=a.agentStubMap,l=a.agentStubMap=(0,o.kW)(),u=t.seriesType,c=t.getTargetSeries,h=!0,p=!1;function d(t){var e=t.uid,n=l.set(e,s&&s.get(e)||(p=!0,(0,cn.v)({reset:fn,onDirty:vn})));n.context={model:t,overallProgress:h},n.agent=a,n.__block=h,r._pipe(t,n)}(0,o.hu)(!t.createOnAllSeries,""),u?n.eachRawSeriesByType(u,d):c?c(n,i).each(d):(h=!1,(0,o.S6)(n.getSeries(),d)),p&&a.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return(0,o.mf)(t)&&(t={overallReset:t,seriesType:wn(t)}),t.uid=(0,hn.Kr)("stageHandler"),e&&(t.visualType=e),t},t}();function dn(t){t.overallReset(t.ecModel,t.api,t.payload)}function fn(t){return t.overallProgress&&gn}function gn(){this.agent.dirty(),this.getDownstream().dirty()}function vn(){this.agent&&this.agent.dirty()}function yn(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function mn(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=(0,Jt.kF)(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?(0,o.UI)(e,(function(t,e){return xn(e)})):_n}var _n=xn(0);function xn(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o<e.end;o++)r.dataEach(i,o);else r&&r.progress&&r.progress(e,i)}}function bn(t){return t.data.count()}function wn(t){Sn=null;try{t(Tn,Mn)}catch(t){}return Sn}var Sn,Tn={},Mn={};function Cn(t,e){for(var n in e.prototype)t[n]=o.ZT}Cn(Tn,fe),Cn(Mn,ve),Tn.eachSeriesByType=Tn.eachRawSeriesByType=function(t){Sn=t},Tn.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Sn=t.subType)};const kn=pn;var An=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const In={color:An,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],An]};var Dn="#B9B8CE",Pn="#100C2A",On=function(){return{axisLine:{lineStyle:{color:Dn}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Ln=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Rn={darkMode:!0,color:Ln,backgroundColor:Pn,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Dn}},textStyle:{color:Dn},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Dn}},dataZoom:{borderColor:"#71708A",textStyle:{color:Dn},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Dn}},timeline:{lineStyle:{color:Dn},label:{color:Dn},controlStyle:{color:Dn,borderColor:Dn}},calendar:{itemStyle:{color:Pn},dayLabel:{color:Dn},monthLabel:{color:Dn},yearLabel:{color:Dn}},timeAxis:On(),logAxis:On(),valueAxis:On(),categoryAxis:On(),line:{symbol:"circle"},graph:{color:Ln},gauge:{title:{color:Dn},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Dn},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}};Rn.categoryAxis.splitLine.show=!1;const En=Rn;var Zn=n(7252),Nn=n(5073),Bn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.prototype.init=function(e,n,i){t.prototype.init.call(this,e,n,i),this._sourceManager=new Nn.U(this),(0,Nn.t)(this)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),(0,Nn.t)(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Zn.fY},e}(te.Z);te.Z.registerClass(Bn);var zn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.type="dataset",e}(He.Z);He.Z.registerClass(zn);var Fn=(0,o.kW)();var Wn={geoJSON:function(t){var e=t.source;t.geoJSON=(0,o.HD)(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=gt(t.source)}},Vn=n(4536),Hn=function(){function t(){}return t.prototype.normalizeQuery=function(t){var e={},n={},i={};if(o.HD(t)){var r=(0,Vn.u9)(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var a=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};o.S6(t,(function(t,r){for(var o=!1,l=0;l<a.length;l++){var u=a[l],c=r.lastIndexOf(u);if(c>0&&c===r.length-u.length){var h=r.slice(0,c);"data"!==h&&(e.mainType=h,e[u.toLowerCase()]=t,o=!0)}}s.hasOwnProperty(r)&&(n[r]=t,o=!0),o||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Un={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendSymbol&&n.setVisual("legendSymbol",t.legendSymbol),t.hasSymbolVisual){var i=t.get("symbol"),r=t.get("symbolSize"),a=t.get("symbolKeepAspect"),s=t.get("symbolRotate"),l=(0,o.mf)(i),u=(0,o.mf)(r),c=(0,o.mf)(s),h=l||u||c,p=!l&&i?i:t.defaultSymbol,d=u?null:r,f=c?null:s;if(n.setVisual({legendSymbol:t.legendSymbol||p,symbol:p,symbolSize:d,symbolKeepAspect:a,symbolRotate:f}),!e.isSeriesFiltered(t))return{dataEach:h?function(e,n){var o=t.getRawValue(n),a=t.getDataParams(n);l&&e.setItemVisual(n,"symbol",i(o,a)),u&&e.setItemVisual(n,"symbolSize",r(o,a)),c&&e.setItemVisual(n,"symbolRotate",s(o,a))}:null}}}},Gn=n(9199),Xn=n(4629),Yn=n(7096),jn=2*Math.PI,$n=Mt.Z.CMD,qn=["top","right","bottom","left"];function Kn(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function Jn(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+t,h=(s/=u)*n+e;if(Math.abs(i-r)%jn<1e-4)return l[0]=c,l[1]=h,u-n;if(o){var p=i;i=(0,Yn.m)(r),r=(0,Yn.m)(p)}else i=(0,Yn.m)(i),r=(0,Yn.m)(r);i>r&&(r+=jn);var d=Math.atan2(s,a);if(d<0&&(d+=jn),d>=i&&d<=r||d+jn>=i&&d+jn<=r)return l[0]=c,l[1]=h,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,v=n*Math.cos(r)+t,y=n*Math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),_=(v-a)*(v-a)+(y-s)*(y-s);return m<_?(l[0]=f,l[1]=g,Math.sqrt(m)):(l[0]=v,l[1]=y,Math.sqrt(_))}function Qn(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,c=n-t,h=i-e,p=Math.sqrt(c*c+h*h),d=(l*(c/=p)+u*(h/=p))/p;s&&(d=Math.min(Math.max(d,0),1)),d*=p;var f=a[0]=t+d*c,g=a[1]=e+d*h;return Math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}function ti(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=Math.min(Math.max(r,t),s),c=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-r)*(u-r)+(c-o)*(c-o))}var ei=[];function ni(t,e,n){var i=ti(e.x,e.y,e.width,e.height,t.x,t.y,ei);return n.set(ei[0],ei[1]),i}function ii(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,c=e.data,h=t.x,p=t.y,d=0;d<c.length;){var f=c[d++];1===d&&(s=o=c[d],l=a=c[d+1]);var g=u;switch(f){case $n.M:o=s=c[d++],a=l=c[d++];break;case $n.L:g=Qn(o,a,c[d],c[d+1],h,p,ei,!0),o=c[d++],a=c[d++];break;case $n.C:g=(0,Ct.t1)(o,a,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],h,p,ei),o=c[d++],a=c[d++];break;case $n.Q:g=(0,Ct.Wr)(o,a,c[d++],c[d++],c[d],c[d+1],h,p,ei),o=c[d++],a=c[d++];break;case $n.A:var v=c[d++],y=c[d++],m=c[d++],_=c[d++],x=c[d++],b=c[d++];d+=1;var w=!!(1-c[d++]);i=Math.cos(x)*m+v,r=Math.sin(x)*_+y,d<=1&&(s=i,l=r),g=Jn(v,y,_,x,x+b,w,(h-v)*_/m+v,p,ei),o=Math.cos(x+b)*m+v,a=Math.sin(x+b)*_+y;break;case $n.R:g=ti(s=o=c[d++],l=a=c[d++],c[d++],c[d++],h,p,ei);break;case $n.Z:g=Qn(o,a,s,l,h,p,ei,!0),o=s,a=l}g<u&&(u=g,n.set(ei[0],ei[1]))}return u}var ri=new Ge.Point,oi=new Ge.Point,ai=new Ge.Point,si=new Ge.Point,li=new Ge.Point;function ui(t,e){if(t){var n=t.getTextGuideLine(),i=t.getTextContent();if(i&&n){var r=t.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=r.candidates||qn,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=r.anchor,c=t.getComputedTransform(),h=c&&(0,ht.U_)([],c),p=e.get("length2")||0;u&&ai.copy(u);for(var d=0;d<a.length;d++){Kn(a[d],0,s,ri,si),Ge.Point.scaleAndAdd(oi,ri,si,p),oi.transform(h);var f=t.getBoundingRect(),g=u?u.distance(oi):t instanceof Ge.Path?ii(oi,t.path,ai):ni(oi,f,ai);g<l&&(l=g,oi.transform(c),ai.transform(c),ai.toArray(o[0]),oi.toArray(o[1]),ri.toArray(o[2]))}!function(t,e){if(e<=180&&e>0){e=e/180*Math.PI,ri.fromArray(t[0]),oi.fromArray(t[1]),ai.fromArray(t[2]),Ge.Point.sub(si,ri,oi),Ge.Point.sub(li,ai,oi);var n=si.len(),i=li.len();if(!(n<.001||i<.001)){si.scale(1/n),li.scale(1/i);var r=si.dot(li);if(Math.cos(e)<r){var o=Qn(oi.x,oi.y,ai.x,ai.y,ri.x,ri.y,ci,!1);hi.fromArray(ci),hi.scaleAndAdd(li,o/Math.tan(Math.PI-e));var a=ai.x!==oi.x?(hi.x-oi.x)/(ai.x-oi.x):(hi.y-oi.y)/(ai.y-oi.y);if(isNaN(a))return;a<0?Ge.Point.copy(hi,oi):a>1&&Ge.Point.copy(hi,ai),hi.toArray(t[1])}}}}(o,e.get("minTurnAngle")),n.setShape({points:o})}}}var ci=[],hi=new Ge.Point;function pi(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function di(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=a.TK(i[0],i[1]),o=a.TK(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var s=Math.min(r,o)*n,l=a.t7([],i[1],i[0],s/r),u=a.t7([],i[1],i[2],s/o),c=a.t7([],l,u,.5);t.bezierCurveTo(l[0],l[1],l[0],l[1],c[0],c[1]),t.bezierCurveTo(u[0],u[1],u[0],u[1],i[2][0],i[2][1])}else for(var h=1;h<i.length;h++)t.lineTo(i[h][0],i[h][1])}function fi(t,e,n,i,r,o){var a=t.length;if(!(a<2)){t.sort((function(t,n){return t.rect[e]-n.rect[e]}));for(var s,l=0,u=!1,c=[],h=0,p=0;p<a;p++){var d=t[p],f=d.rect;(s=f[e]-l)<0&&(f[e]-=s,d.label[e]-=s,u=!0);var g=Math.max(-s,0);c.push(g),h+=g,l=f[e]+f[n]}h>0&&o&&w(-h/a,0,a);var v,y,m=t[0],_=t[a-1];return x(),v<0&&S(-v,.8),y<0&&S(y,.8),x(),b(v,y,1),b(y,v,-1),x(),v<0&&T(-v),y<0&&T(y),u}function x(){v=m.rect[e]-i,y=r-_.rect[e]-_.rect[n]}function b(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){w(i*n,0,a);var r=i+t;r<0&&S(-r*n,1)}else S(-t*n,1)}}function w(n,i,r){0!==n&&(u=!0);for(var o=i;o<r;o++){var a=t[o];a.rect[e]+=n,a.label[e]+=n}}function S(i,r){for(var o=[],s=0,l=1;l<a;l++){var u=t[l-1].rect,c=Math.max(t[l].rect[e]-u[e]-u[n],0);o.push(c),s+=c}if(s){var h=Math.min(Math.abs(i)/s,r);if(i>0)for(l=0;l<a-1;l++)w(o[l]*h,0,l+1);else for(l=a-1;l>0;l--)w(-o[l-1]*h,l,a)}}function T(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i<a-1;i++)if(e>0?w(n,0,i+1):w(-n,a-i-1,a),(t-=n)<=0)return}}var gi=n(5628);function vi(t){if(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].slice());return e}}function yi(t,e){var n=t.label,i=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:vi(i&&i.shape.points)}}var mi=["align","verticalAlign","width","height","fontSize"],_i=new Xn.Z,xi=(0,Jt.Yf)(),bi=(0,Jt.Yf)();function wi(t,e,n){for(var i=0;i<n.length;i++){var r=n[i];null!=e[r]&&(t[r]=e[r])}}var Si=["x","y","rotation"];const Ti=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(t,e,n,i,r){var o=i.style,a=i.__hostTarget.textConfig||{},s=i.getComputedTransform(),l=i.getBoundingRect().plain();Ge.BoundingRect.applyTransform(l,l,s),s?_i.setLocalTransform(s):(_i.x=_i.y=_i.rotation=_i.originX=_i.originY=0,_i.scaleX=_i.scaleY=1);var u,c=i.__hostTarget;if(c){u=c.getBoundingRect().plain();var h=c.getComputedTransform();Ge.BoundingRect.applyTransform(u,u,h)}var p=u&&c.getTextGuideLine();this._labelList.push({label:i,labelLine:p,seriesModel:n,dataIndex:t,dataType:e,layoutOption:r,computedLayoutOption:null,rect:l,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:p&&p.ignore,x:_i.x,y:_i.y,rotation:_i.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:a.position,attachedRot:a.rotation}})},t.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var n=t.__model,i=n.get("labelLayout");((0,o.mf)(i)||(0,o.XP)(i).length)&&t.group.traverse((function(t){if(t.ignore)return!0;var r=t.getTextContent(),o=(0,Xe.A)(t);r&&!r.disableLabelLayout&&e._addLabel(o.dataIndex,o.dataType,n,r,i)}))},t.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();function i(t,e){return function(){ui(t,e)}}for(var r=0;r<this._labelList.length;r++){var o=this._labelList[r],a=o.label,s=a.__hostTarget,l=o.defaultAttr,u=void 0;u=(u="function"==typeof o.layoutOption?o.layoutOption(yi(o,s)):o.layoutOption)||{},o.computedLayoutOption=u;var c=Math.PI/180;s&&s.setTextConfig({local:!1,position:null!=u.x||null!=u.y?null:l.attachedPos,rotation:null!=u.rotate?u.rotate*c:l.attachedRot,offset:[u.dx||0,u.dy||0]});var h=!1;if(null!=u.x?(a.x=(0,Gn.GM)(u.x,e),a.setStyle("x",0),h=!0):(a.x=l.x,a.setStyle("x",l.style.x)),null!=u.y?(a.y=(0,Gn.GM)(u.y,n),a.setStyle("y",0),h=!0):(a.y=l.y,a.setStyle("y",l.style.y)),u.labelLinePoints){var p=s.getTextGuideLine();p&&(p.setShape({points:u.labelLinePoints}),h=!1)}xi(a).needsUpdateLabelLine=h,a.rotation=null!=u.rotate?u.rotate*c:l.rotation;for(var d=0;d<mi.length;d++){var f=mi[d];a.setStyle(f,null!=u[f]?u[f]:l.style[f])}if(u.draggable){if(a.draggable=!0,a.cursor="move",s){var g=o.seriesModel;null!=o.dataIndex&&(g=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex)),a.on("drag",i(s,g.getModel("labelLine")))}}else a.off("drag"),a.cursor=l.cursor}},t.prototype.layout=function(t){var e=t.getWidth(),n=t.getHeight(),i=function(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];if(!i.defaultAttr.ignore){var r=i.label,o=r.getComputedTransform(),a=r.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=r.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new Ge.OrientedBoundingRect(a,o):null;e.push({label:r,labelLine:i.labelLine,rect:u,localRect:a,obb:c,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:s,transform:o})}}return e}(this._labelList),r=(0,o.hX)(i,(function(t){return"shiftX"===t.layoutOption.moveOverlap})),a=(0,o.hX)(i,(function(t){return"shiftY"===t.layoutOption.moveOverlap}));fi(r,"x","width",0,e,undefined),fi(a,"y","height",0,n,void 0),function(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new Ge.BoundingRect(0,0,0,0);function i(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var r=0;r<t.length;r++){var o=t[r],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var h=o.obb,p=!1,d=0;d<e.length;d++){var f=e[d];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new Ge.OrientedBoundingRect(f.localRect,f.transform)),h||(h=new Ge.OrientedBoundingRect(s,l)),h.intersect(f.obb)){p=!0;break}}}p?(i(u),c&&i(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),e.push(o))}}((0,o.hX)(i,(function(t){return t.layoutOption.hideOverlap})))},t.prototype.processLabelsOverall=function(){var t=this;(0,o.S6)(this._chartViewList,(function(e){var n=e.__model,i=e.ignoreLabelLineUpdate,r=n.isAnimationEnabled();e.group.traverse((function(e){if(e.ignore)return!0;var o=!i,a=e.getTextContent();!o&&a&&(o=xi(a).needsUpdateLabelLine),o&&t._updateLabelLine(e,n),r&&t._animateLabels(e,n)}))}))},t.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),i=(0,Xe.A)(t),r=i.dataIndex;if(n&&null!=r){var a=e.getData(i.dataType),s=a.getItemModel(r),l={},u=a.getItemVisual(r,"style"),c=a.getVisual("drawType");l.stroke=u[c];var h=s.getModel("labelLine");!function(t,e,n){var i=t.getTextGuideLine(),r=t.getTextContent();if(r){for(var a=e.normal,s=a.get("show"),l=r.ignore,u=0;u<Ye.qc.length;u++){var c=Ye.qc[u],h=e[c],p="normal"===c;if(h){var d=h.get("show");if((p?l:(0,o.pD)(r.states[c]&&r.states[c].ignore,l))||!(0,o.pD)(d,s)){var f=p?i:i&&i.states.normal;f&&(f.ignore=!0);continue}i||(i=new Ge.Polyline,t.setTextGuideLine(i),p||!l&&s||pi(i,!0,"normal",e.normal),t.stateProxy&&(i.stateProxy=t.stateProxy)),pi(i,!1,c,h)}}if(i){(0,o.ce)(i.style,n),i.style.fill=null;var g=a.get("showAbove");(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=g||!1,i.buildPath=di}}else i&&t.removeTextGuideLine()}(t,function(t,e){e=e||"labelLine";for(var n={normal:t.getModel(e)},i=0;i<Ye.L1.length;i++){var r=Ye.L1[i];n[r]=t.getModel([r,e])}return n}(s),l),ui(t,h)}},t.prototype._animateLabels=function(t,e){var n=t.getTextContent(),i=t.getTextGuideLine();if(n&&!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!(0,Ge.isElementRemoved)(t)){var r=(f=xi(n)).oldLayout,a=(0,Xe.A)(t),s=a.dataIndex,l={x:n.x,y:n.y,rotation:n.rotation},u=e.getData(a.dataType);if(r){n.attr(r);var c=t.prevStates;c&&((0,o.cq)(c,"select")>=0&&n.attr(f.oldLayoutSelect),(0,o.cq)(c,"emphasis")>=0&&n.attr(f.oldLayoutEmphasis)),(0,Ge.updateProps)(n,l,e,s)}else if(n.attr(l),!(0,gi.qA)(n).valueAnimation){var h=(0,o.pD)(n.style.opacity,1);n.style.opacity=0,(0,Ge.initProps)(n,{style:{opacity:h}},e,s)}if(f.oldLayout=l,n.states.select){var p=f.oldLayoutSelect={};wi(p,l,Si),wi(p,n.states.select,Si)}if(n.states.emphasis){var d=f.oldLayoutEmphasis={};wi(d,l,Si),wi(d,n.states.emphasis,Si)}(0,gi.tD)(n,s,u,e)}if(i&&!i.ignore&&!i.invisible){r=(f=bi(i)).oldLayout;var f,g={points:i.shape.points};r?(i.attr({shape:r}),(0,Ge.updateProps)(i,{shape:g},e)):(i.setShape(g),i.style.strokePercent=0,(0,Ge.initProps)(i,{style:{strokePercent:1}},e)),f.oldLayout=g}},t}();function Mi(t,e,n,i,r){var a=t+e;n.isSilent(a)||i.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,i=r.selected,s=0;s<i.length;s++)if(i[s].seriesIndex===e){var l=t.getData(),u=(0,Jt.gO)(l,r.fromActionPayload);n.trigger(a,{type:a,seriesId:t.id,name:(0,o.kJ)(u)?l.getName(u[0]):l.getName(u),selected:(0,o.l7)({},t.option.selectedMap)})}}))}var Ci=n(400),ki=n(8199);function Ai(t,e,n){for(var i="radial"===e.type?function(t,e,n){var i=n.width,r=n.height,o=Math.min(i,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(a=a*i+n.x,s=s*r+n.y,l*=o),t.createRadialGradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,o=isNaN(o)?0:o,a=isNaN(a)?0:a,t.createLinearGradient(i,o,r,a)}(t,e,n),r=e.colorStops,o=0;o<r.length;o++)i.addColorStop(r[o].offset,r[o].color);return i}function Ii(t,e){return t&&"solid"!==t&&e>0?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:(0,o.hj)(t)?[t]:(0,o.kJ)(t)?t:null):null}var Di=new Mt.Z(!0);function Pi(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function Oi(t){var e=t.fill;return null!=e&&"none"!==e}function Li(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function Ri(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function Ei(t,e,n){var i=(0,ki.Gq)(e.image,e.__image,n);if((0,ki.v5)(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix){var o=new DOMMatrix;o.rotateSelf(0,0,(e.rotation||0)/Math.PI*180),o.scaleSelf(e.scaleX||1,e.scaleY||1),o.translateSelf(e.x||0,e.y||0),r.setTransform(o)}return r}}var Zi=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ni=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Bi(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;(i||e.opacity!==n.opacity)&&(o||(Wi(t,r),o=!0),t.globalAlpha=null==e.opacity?Ci.tj.opacity:e.opacity),(i||e.blend!==n.blend)&&(o||(Wi(t,r),o=!0),t.globalCompositeOperation=e.blend||Ci.tj.blend);for(var a=0;a<Zi.length;a++){var s=Zi[a];(i||e[s]!==n[s])&&(o||(Wi(t,r),o=!0),t[s]=t.dpr*(e[s]||0))}return(i||e.shadowColor!==n.shadowColor)&&(o||(Wi(t,r),o=!0),t.shadowColor=e.shadowColor||Ci.tj.shadowColor),o}function zi(t,e,n,i,r){var o=Vi(e,r.inHover),a=i?null:n&&Vi(n,r.inHover)||{};if(o===a)return!1;var s=Bi(t,o,a,i,r);if((i||o.fill!==a.fill)&&(s||(Wi(t,r),s=!0),t.fillStyle=o.fill),(i||o.stroke!==a.stroke)&&(s||(Wi(t,r),s=!0),t.strokeStyle=o.stroke),(i||o.opacity!==a.opacity)&&(s||(Wi(t,r),s=!0),t.globalAlpha=null==o.opacity?1:o.opacity),e.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(Wi(t,r),s=!0),t.lineWidth=l)}for(var u=0;u<Ni.length;u++){var c=Ni[u],h=c[0];(i||o[h]!==a[h])&&(s||(Wi(t,r),s=!0),t[h]=o[h]||c[1])}return s}function Fi(t,e){var n=e.transform,i=t.dpr||1;n?t.setTransform(i*n[0],i*n[1],i*n[2],i*n[3],i*n[4],i*n[5]):t.setTransform(i,0,0,i,0,0)}function Wi(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Vi(t,e){return e&&t.__hoverStyle||t.style}function Hi(t,e){Ui(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Ui(t,e,n,i){var r=e.transform;if(!e.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return e.__dirty&=~S.Z.REDARAW_BIT,void(e.__isRendered=!1);var a=e.__clipPaths,s=n.prevElClipPaths,l=!1,u=!1;if(s&&!function(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0;return!1}(a,s)||(s&&s.length&&(Wi(t,n),t.restore(),u=l=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),a&&a.length&&(Wi(t,n),t.save(),function(t,e,n){for(var i=!1,r=0;r<t.length;r++){var o=t[r];i=i||o.isZeroArea(),Fi(e,o),e.beginPath(),o.buildPath(e,o.shape),e.clip()}n.allClipped=i}(a,t,n),l=!0),n.prevElClipPaths=a),n.allClipped)e.__isRendered=!1;else{e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var c=n.prevEl;c||(u=l=!0);var h,p,d=e instanceof lt.ZP&&e.autoBatch&&function(t){var e=Oi(t),n=Pi(t);return!(t.lineDash||!(+e^+n)||e&&"string"!=typeof t.fill||n&&"string"!=typeof t.stroke||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}(e.style);l||(h=r,p=c.transform,h&&p?h[0]!==p[0]||h[1]!==p[1]||h[2]!==p[2]||h[3]!==p[3]||h[4]!==p[4]||h[5]!==p[5]:h||p)?(Wi(t,n),Fi(t,e)):d||Wi(t,n);var f=Vi(e,n.inHover);e instanceof lt.ZP?(1!==n.lastDrawType&&(u=!0,n.lastDrawType=1),zi(t,e,c,u,n),d&&(n.batchFill||n.batchStroke)||t.beginPath(),function(t,e,n,i){var r=Pi(n),a=Oi(n),s=n.strokePercent,l=s<1,u=!e.path;e.silent&&!l||!u||e.createPathProxy();var c=e.path||Di;if(!i){var h=n.fill,p=n.stroke,d=a&&!!h.colorStops,f=r&&!!p.colorStops,g=a&&!!h.image,v=r&&!!p.image,y=void 0,m=void 0,_=void 0,x=void 0,b=void 0;(d||f)&&(b=e.getBoundingRect()),d&&(y=e.__dirty?Ai(t,h,b):e.__canvasFillGradient,e.__canvasFillGradient=y),f&&(m=e.__dirty?Ai(t,p,b):e.__canvasStrokeGradient,e.__canvasStrokeGradient=m),g&&(_=e.__dirty||!e.__canvasFillPattern?Ei(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=_),v&&(x=e.__dirty||!e.__canvasStrokePattern?Ei(t,p,e):e.__canvasStrokePattern,e.__canvasStrokePattern=_),d?t.fillStyle=y:g&&(_?t.fillStyle=_:a=!1),f?t.strokeStyle=m:v&&(x?t.strokeStyle=x:r=!1)}var w=n.lineDash&&n.lineWidth>0&&Ii(n.lineDash,n.lineWidth),S=n.lineDashOffset,T=!!t.setLineDash,M=e.getGlobalScale();if(c.setScale(M[0],M[1],e.segmentIgnoreThreshold),w){var C=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;C&&1!==C&&(w=(0,o.UI)(w,(function(t){return t/C})),S/=C)}var k=!0;(u||e.__dirty<.ZP.SHAPE_CHANGED_BIT||w&&!T&&r)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),k=!1),c.reset(),w&&!T&&(c.setLineDash(w),c.setLineDashOffset(S)),e.buildPath(c,e.shape,i),c.toStatic(),e.pathUpdated()),k&&c.rebuildPath(t,l?s:1),w&&T&&(t.setLineDash(w),t.lineDashOffset=S),i||(n.strokeFirst?(r&&Ri(t,n),a&&Li(t,n)):(a&&Li(t,n),r&&Ri(t,n))),w&&T&&t.setLineDash([])}(t,e,f,d),d&&(n.batchFill=f.fill||"",n.batchStroke=f.stroke||"")):e instanceof dt.Z?(3!==n.lastDrawType&&(u=!0,n.lastDrawType=3),zi(t,e,c,u,n),function(t,e,n){var i=n.text;if(null!=i&&(i+=""),i){t.font=n.font||ln.Uo,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var r=void 0;if(t.setLineDash){var a=n.lineDash&&n.lineWidth>0&&Ii(n.lineDash,n.lineWidth),s=n.lineDashOffset;if(a){var l=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;l&&1!==l&&(a=(0,o.UI)(a,(function(t){return t/l})),s/=l),t.setLineDash(a),t.lineDashOffset=s,r=!0}}n.strokeFirst?(Pi(n)&&t.strokeText(i,n.x,n.y),Oi(n)&&t.fillText(i,n.x,n.y)):(Oi(n)&&t.fillText(i,n.x,n.y),Pi(n)&&t.strokeText(i,n.x,n.y)),r&&t.setLineDash([])}}(t,e,f)):e instanceof it.ZP?(2!==n.lastDrawType&&(u=!0,n.lastDrawType=2),function(t,e,n,i,r){Bi(t,Vi(e,r.inHover),n&&Vi(n,r.inHover),i,r)}(t,e,c,u,n),function(t,e,n){var i=e.__image=(0,ki.Gq)(n.image,e.__image,e,e.onload);if(i&&(0,ki.v5)(i)){var r=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;t.drawImage(i,u,c,n.sWidth,n.sHeight,r,o,a,s)}else if(n.sx&&n.sy){var h=a-(u=n.sx),p=s-(c=n.sy);t.drawImage(i,u,c,h,p,r,o,a,s)}else t.drawImage(i,r,o,a,s)}}(t,e,f)):e instanceof kt.Z&&(4!==n.lastDrawType&&(u=!0,n.lastDrawType=4),function(t,e,n){var i=e.getDisplayables(),r=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=e.getCursor(),a=i.length;o<a;o++)(c=i[o]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),Ui(t,c,s,o===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c;for(var l=0,u=r.length;l<u;l++){var c;(c=r[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),Ui(t,c,s,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}(t,e,n)),d&&i&&Wi(t,n),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),n.prevEl=e,e.__dirty=0,e.__isRendered=!0}}function Gi(){return!1}function Xi(t,e,n){var i=o.vL(),r=e.getWidth(),a=e.getHeight(),s=i.style;return s&&(s.position="absolute",s.left="0",s.top="0",s.width=r+"px",s.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=a*n,i}const Yi=function(t){function e(e,n,i){var r,a=t.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null,i=i||Xt.KL,"string"==typeof e?r=Xi(e,n,i):o.Kn(e)&&(e=(r=e).id),a.id=e,a.dom=r;var s=r.style;return s&&(r.onselectstart=Gi,s.webkitUserSelect="none",s.userSelect="none",s.webkitTapHighlightColor="rgba(0,0,0,0)",s["-webkit-touch-callout"]="none",s.padding="0",s.margin="0",s.borderWidth="0"),a.domBack=null,a.ctxBack=null,a.painter=n,a.config=null,a.dpr=i,a}return(0,i.ZT)(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Xi("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new Gt.Z(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===o.length)(e=new Gt.Z(0,0,0,0)).copy(t),o.push(e);else{for(var e,n=!1,i=1/0,r=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(t)){var h=new Gt.Z(0,0,0,0);h.copy(c),h.union(t),o[u]=h,n=!0;break}if(s){l.copy(t),l.union(c);var p=t.width*t.height,d=c.width*c.height;l.width*l.height-p-d<i&&(i=i,r=u)}}s&&(o[r].union(t),n=!0),n||((e=new Gt.Z(0,0,0,0)).copy(t),o.push(e)),s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c)if(d=t[c]){var h=d.shouldBePainted(n,i,!0,!0);(f=d.__isRendered&&(d.__dirty&S.Z.REDARAW_BIT||!h)?d.getPrevPaintRect():null)&&u(f);var p=h&&(d.__dirty&S.Z.REDARAW_BIT||!d.__isRendered)?d.getPaintRect():null;p&&u(p)}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var d,f;h=(d=e[c]).shouldBePainted(n,i,!0,!0),!d||h&&d.__zr||!d.__isRendered||(f=d.getPrevPaintRect())&&u(f)}do{for(r=!1,c=0;c<o.length;)if(o[c].isZero())o.splice(c,1);else{for(var g=c+1;g<o.length;)o[c].intersect(o[g])?(r=!0,o[c].union(o[g]),o.splice(g,1)):g++;c++}}while(r);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,e){var n=this.dpr,i=this.dom,r=i.style,o=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),i.width=t*n,i.height=e*n,o&&(o.width=t*n,o.height=e*n,1!==n&&this.ctxBack.scale(n,n))},e.prototype.clear=function(t,e,n){var i=this.dom,r=this.ctx,a=i.width,s=i.height;e=e||this.clearColor;var l=this.motionBlur&&!t,u=this.lastFrameAlpha,c=this.dpr,h=this;l&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,a/c,s/c));var p=this.domBack;function d(t,n,i,a){if(r.clearRect(t,n,i,a),e&&"transparent"!==e){var s=void 0;o.Qq(e)?(s=e.__canvasGradient||Ai(r,e,{x:0,y:0,width:i,height:a}),e.__canvasGradient=s):o.wo(e)&&(s=Ei(r,e,{dirty:function(){h.setUnpainted(),h.__painter.refresh()}})),r.save(),r.fillStyle=s||e,r.fillRect(t,n,i,a),r.restore()}l&&(r.save(),r.globalAlpha=u,r.drawImage(p,t,n,i,a),r.restore())}!n||l?d(0,0,a,s):n.length&&o.S6(n,(function(t){d(t.x*c,t.y*c,t.width*c,t.height*c)}))},e}(u.Z);var ji,$i=1e5,qi=314159,Ki=.01;function Ji(t){return parseInt(t,10)}ji=function(){function t(t,e,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var r=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=o.l7({},n||{}),this.dpr=n.devicePixelRatio||Xt.KL,this._singleCanvas=r,this.root=t;var a=t.style;a&&(a.webkitTapHighlightColor="transparent",a.webkitUserSelect="none",a.userSelect="none",a["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(r){var u=t,c=u.width,h=u.height;null!=n.width&&(c=n.width),null!=n.height&&(h=n.height),this.dpr=n.devicePixelRatio||1,u.width=c*this.dpr,u.height=h*this.dpr,this._width=c,this._height=h;var p=new Yi(u,this,this.dpr);p.__builtin__=!0,p.initContext(),l[314159]=p,p.zlevel=qi,s.push(qi),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var d=this._domRoot=function(t,e){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);t.appendChild(d)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var r=0;r<i.length;r++){var o=i[r],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===r?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){for(var i,r={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<e;o++){var a=t[o];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer($i)),i||(i=n.ctx).save(),Ui(i,a,r,o===e-1))}i&&i.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer($i)},t.prototype.paintOne=function(t,e){Hi(t,e)},t.prototype._paintList=function(t,e,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var r=this._doPaintList(t,e,n),o=r.finished,a=r.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(t),o)this.eachLayer((function(t){t.afterBrush&&t.afterBrush()}));else{var s=this;L((function(){s._paintList(t,e,n,i)}))}}},t.prototype._compositeManually=function(){var t=this.getLayer(qi).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer((function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)}))},t.prototype._doPaintList=function(t,e,n){for(var i=this,a=[],s=this._opts.useDirtyRect,l=0;l<this._zlevelList.length;l++){var u=this._zlevelList[l],c=this._layers[u];c.__builtin__&&c!==this._hoverlayer&&(c.__dirty||n)&&a.push(c)}for(var h=!0,p=!1,d=function(r){var o=a[r],l=o.ctx,u=s&&o.createRepaintRects(t,e,f._width,f._height);l.save();var c,d=n?o.__startIndex:o.__drawIndex,g=!n&&o.incremental&&Date.now,v=g&&Date.now(),y=o.zlevel===f._zlevelList[0]?f._backgroundColor:null;if(o.__startIndex===o.__endIndex)o.clear(!1,y,u);else if(d===o.__startIndex){var m=t[d];m.incremental&&m.notClear&&!n||o.clear(!1,y,u)}-1===d&&(console.error("For some unknown reason. drawIndex is -1"),d=o.__startIndex);var _=function(e){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(c=d;c<o.__endIndex;c++){var r=t[c];if(r.__inHover&&(p=!0),i._doPaintEl(r,o,s,e,n,c===o.__endIndex-1),g&&Date.now()-v>15)break}n.prevElClipPaths&&l.restore()};if(u)if(0===u.length)c=o.__endIndex;else for(var x=f.dpr,b=0;b<u.length;++b){var w=u[b];l.save(),l.beginPath(),l.rect(w.x*x,w.y*x,w.width*x,w.height*x),l.clip(),_(w),l.restore()}else l.save(),_(),l.restore();o.__drawIndex=c,o.__drawIndex<o.__endIndex&&(h=!1)},f=this,g=0;g<a.length;g++)d(g);return r.Z.wxa&&o.S6(this._layers,(function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()})),{finished:h,needsRefreshHover:p}},t.prototype._doPaintEl=function(t,e,n,i,r,o){var a=e.ctx;if(n){var s=t.getPaintRect();(!i||s&&s.intersect(i))&&(Ui(a,t,r,o),t.setPrevPaintRect(s))}else Ui(a,t,r,o)},t.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=qi);var n=this._layers[t];return n||((n=new Yi("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?o.TS(n,this._layerConfig[t],!0):this._layerConfig[t-Ki]&&o.TS(n,this._layerConfig[t-Ki],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},t.prototype.insertLayer=function(t,e){var n=this._layers,i=this._zlevelList,r=i.length,a=this._domRoot,s=null,l=-1;if(n[t])o.H("ZLevel "+t+" has been used already");else if(function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(r>0&&t>i[0]){for(l=0;l<r-1&&!(i[l]<t&&i[l+1]>t);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?a.insertBefore(e.dom,u.nextSibling):a.appendChild(e.dom)}else a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom);e.__painter=this}else o.H("Layer of zlevel "+t+" is not valid")},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i];t.call(e,this._layers[r],r)}},t.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i],o=this._layers[r];o.__builtin__&&t.call(e,o,r)}},t.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i],o=this._layers[r];o.__builtin__||t.call(e,o,r)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(t){function e(t){a&&(a.__endIndex!==t&&(a.__dirty=!0),a.__endIndex=t)}if(this.eachBuiltinLayer((function(t,e){t.__dirty=t.__used=!1})),this._singleCanvas)for(var n=1;n<t.length;n++)if((l=t[n]).zlevel!==t[n-1].zlevel||l.incremental){this._needsManuallyCompositing=!0;break}var i,r,a=null,s=0;for(r=0;r<t.length;r++){var l,u=(l=t[r]).zlevel,c=void 0;i!==u&&(i=u,s=0),l.incremental?((c=this.getLayer(u+.001,this._needsManuallyCompositing)).incremental=!0,s=1):c=this.getLayer(u+(s>0?Ki:0),this._needsManuallyCompositing),c.__builtin__||o.H("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==r&&(c.__dirty=!0),c.__startIndex=r,c.incremental?c.__drawIndex=-1:c.__drawIndex=r,e(r),a=c),l.__dirty&S.Z.REDARAW_BIT&&!l.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=r))}e(r),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,o.S6(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?o.TS(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];if(r===t||r===t+Ki){var a=this._layers[r];o.TS(a,n[t],!0)}}}},t.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(o.cq(n,t),1))},t.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||e!==this._height){for(var r in n.style.width=t+"px",n.style.height=e+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(qi).resize(t,e)}return this},t.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new Yi("image",this,t.pixelRatio||this.dpr),n=e.ctx;if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,r=e.dom.height,o=e.ctx;this.eachLayer((function(t){t.__builtin__?o.drawImage(t.dom,0,0,i,r):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())}))}else for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++)Ui(n,s[l],a,l===u-1);return e.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype._getSize=function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[i]||Ji(s[n])||Ji(a.style[n]))-(Ji(s[r])||0)-(Ji(s[o])||0)|0},t.prototype.pathToImage=function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),r=t.getBoundingRect(),a=t.style,s=a.shadowBlur*e,l=a.shadowOffsetX*e,u=a.shadowOffsetY*e,c=t.hasStroke()?a.lineWidth:0,h=Math.max(c/2,-l+s),p=Math.max(c/2,l+s),d=Math.max(c/2,-u+s),f=Math.max(c/2,u+s),g=r.width+h+p,v=r.height+d+f;n.width=g*e,n.height=v*e,i.scale(e,e),i.clearRect(0,0,g,v),i.dpr=e;var y={x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY,rotation:t.rotation,originX:t.originX,originY:t.originY};t.x=h-r.x,t.y=d-r.y,t.rotation=0,t.scaleX=1,t.scaleY=1,t.updateTransform(),t&&Ui(i,t,{inHover:!1,viewWidth:this._width,viewHeight:this._height},!0);var m=new it.ZP({style:{x:0,y:0,image:n}});return o.l7(t,y),m},t}(),jt.canvas=ji;var Qi=n(9785),tr=n(7979),er=n(9291),nr=Math.round(9*Math.random());const ir=function(){function t(){this._id="__ec_inner_"+nr++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,e){var n=this._guard(t);return"function"==typeof Object.defineProperty?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}();var rr=n(4290),or=n(3111),ar=new ir,sr=new rr.ZP(100),lr=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","dashLineOffset","maxTileWidth","maxTileHeight"];function ur(t,e){if("none"===t)return null;var n=e.getDevicePixelRatio(),i=e.getZr(),r="svg"===i.painter.type;t.dirty&&ar.delete(t);var a=ar.get(t);if(a)return a;var s=(0,o.ce)(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,dashLineOffset:0,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===s.backgroundColor&&(s.backgroundColor=null);var l={repeat:"repeat"};return function(t){for(var e,a=[n],l=!0,u=0;u<lr.length;++u){var c=s[lr[u]],h=typeof c;if(null!=c&&!(0,o.kJ)(c)&&"string"!==h&&"number"!==h&&"boolean"!==h){l=!1;break}a.push(c)}if(l){e=a.join(",")+(r?"-svg":"");var p=sr.get(e);p&&(r?t.svgElement=p:t.image=p)}var d,f,g=hr(s.dashArrayX),v=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if("number"==typeof t){var e=Math.ceil(t);return[e,e]}var n=(0,o.UI)(t,(function(t){return Math.ceil(t)}));return t.length%2?n.concat(n):n}(s.dashArrayY),y=cr(s.symbol),m=(f=g,(0,o.UI)(f,(function(t){return pr(t)}))),_=pr(v),x=!r&&(0,o.vL)(),b=r&&i.painter.createSVGElement("g"),w=function(){for(var t=1,e=0,n=m.length;e<n;++e)t=(0,Gn.nl)(t,m[e]);var i=1;for(e=0,n=y.length;e<n;++e)i=(0,Gn.nl)(i,y[e].length);t*=i;var r=_*m.length*y.length;return{width:Math.max(1,Math.min(t,s.maxTileWidth)),height:Math.max(1,Math.min(r,s.maxTileHeight))}}();x&&(x.width=w.width*n,x.height=w.height*n,d=x.getContext("2d")),function(){d&&(d.clearRect(0,0,x.width,x.height),s.backgroundColor&&(d.fillStyle=s.backgroundColor,d.fillRect(0,0,x.width,x.height)));for(var t=0,e=0;e<v.length;++e)t+=v[e];if(!(t<=0))for(var o=-_,a=0,l=0,u=0;o<w.height;){if(a%2==0){for(var c=l/2%y.length,h=0,p=0,f=0;h<2*w.width;){var m=0;for(e=0;e<g[u].length;++e)m+=g[u][e];if(m<=0)break;if(p%2==0){var S=.5*(1-s.symbolSize),T=h+g[u][p]*S,M=o+v[a]*S,C=g[u][p]*s.symbolSize,k=v[a]*s.symbolSize,A=f/2%y[c].length;I(T,M,C,k,y[c][A])}h+=g[u][p],++f,++p===g[u].length&&(p=0)}++u===g.length&&(u=0)}o+=v[a],++l,++a===v.length&&(a=0)}function I(t,e,o,a,l){var u=r?1:n,c=(0,or.t)(l,t*u,e*u,o*u,a*u,s.color,s.symbolKeepAspect);r?b.appendChild(i.painter.paintOne(c)):Hi(d,c)}}(),l&&sr.put(e,x||b),t.image=x,t.svgElement=b,t.svgWidth=w.width,t.svgHeight=w.height}(l),l.rotation=s.rotation,l.scaleX=l.scaleY=r?1:1/n,ar.set(t,l),t.dirty=!1,l}function cr(t){if(!t||0===t.length)return[["rect"]];if("string"==typeof t)return[[t]];for(var e=!0,n=0;n<t.length;++n)if("string"!=typeof t[n]){e=!1;break}if(e)return cr([t]);var i=[];for(n=0;n<t.length;++n)"string"==typeof t[n]?i.push([t[n]]):i.push(t[n]);return i}function hr(t){if(!t||0===t.length)return[[0,0]];if("number"==typeof t)return[[r=Math.ceil(t),r]];for(var e=!0,n=0;n<t.length;++n)if("number"!=typeof t[n]){e=!1;break}if(e)return hr([t]);var i=[];for(n=0;n<t.length;++n)if("number"==typeof t[n]){var r=Math.ceil(t[n]);i.push([r,r])}else(r=(0,o.UI)(t[n],(function(t){return Math.ceil(t)}))).length%2==1?i.push(r.concat(r)):i.push(r);return i}function pr(t){for(var e=0,n=0;n<t.length;++n)e+=t[n];return t.length%2==1?2*e:e}var dr=o.hu,fr=o.S6,gr=o.mf,vr=o.Kn,yr="5.0.0",mr={zrender:"5.0.1"},_r=2e3,xr=4500,br={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:_r,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:xr,ARIA:6e3,DECAL:7e3}},wr=/^[a-zA-Z0-9_]+$/,Sr="__connectUpdateStatus";function Tr(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(!this.isDisposed())return Cr(this,t,e);Qr(this.id)}}function Mr(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Cr(this,t,e)}}function Cr(t,e,n){return n[0]=n[0]&&n[0].toLowerCase(),u.Z.prototype[e].apply(t,n)}var kr,Ar,Ir,Dr,Pr,Or,Lr,Rr,Er,Zr,Nr,Br,zr,Fr,Wr,Vr,Hr,Ur,Gr,Xr,Yr,jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(u.Z),$r=jr.prototype;$r.on=Mr("on"),$r.off=Mr("off");var qr=function(t){function e(e,i,r){var a=t.call(this,new Hn)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],r=r||{},"string"==typeof i&&(i=so[i]),a._dom=e,"undefined"==typeof window?n.g:window;var s=a._zr=Kt(e,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,useDirtyRect:null!=r.useDirtyRect&&r.useDirtyRect});a._throttledZrFlush=(0,je.P2)(o.ak(s.flush,s),17),(i=o.d9(i))&&Fe(i,!0),a._theme=i,a._locale=(0,tr.D0)(r.locale||tr.sO),a._coordSysMgr=new ye.Z;var l=a._api=Hr(a);function u(t,e){return t.__prio-e.__prio}return A(ao,u),A(no,u),a._scheduler=new kn(a,l,no,ao),a._messageCenter=new jr,a._labelManager=new Ti,a._initEvents(),a.resize=o.ak(a.resize,a),s.animation.on("frame",a._onframe,a),Zr(s,a),Nr(s,a),o.s7(a),a}return(0,i.ZT)(e,t),e.prototype._onframe=function(){if(!this._disposed){Yr(this);var t=this._scheduler;if(this.__optionUpdated){var e=this.__optionUpdated.silent;this.__flagInMainProcess=!0,kr(this),Dr.update.call(this),this._zr.flush(),this.__flagInMainProcess=!1,this.__optionUpdated=!1,Rr.call(this,e),Er.call(this,e)}else if(t.unfinished){var n=1,i=this._model,r=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),Or(this,i),t.performVisualTasks(i),Wr(this,this._model,r,"remain"),n-=+new Date-o}while(n>0&&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.setOption=function(t,e,n){if(this._disposed)Qr(this.id);else{var i,r,o;if(vr(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var a=new be(this._api),s=this._theme,l=this._model=new fe;l.scheduler=this._scheduler,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},io),Gr(this,o),n?(this.__optionUpdated={silent:i},this.__flagInMainProcess=!1,this.getZr().wakeUp()):(kr(this),Dr.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this.__flagInMainProcess=!1,Rr.call(this,i),Er.call(this,i))}},e.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},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||window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){if(r.Z.canvasSupported)return(t=o.l7({},t||{})).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},e.prototype.getSvgDataURL=function(){if(r.Z.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return o.S6(e,(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;fr(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return fr(i,(function(t){t.group.ignore=!1})),o}Qr(this.id)},e.prototype.getConnectedDataURL=function(t){if(this._disposed)Qr(this.id);else if(r.Z.canvasSupported){var e="svg"===t.type,n=this.group,i=Math.min,a=Math.max,s=1/0;if(co[n]){var l=s,u=s,c=-1/0,h=-1/0,p=[],d=t&&t.pixelRatio||1;o.S6(uo,(function(r,s){if(r.group===n){var d=e?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(o.d9(t)),f=r.getDom().getBoundingClientRect();l=i(f.left,l),u=i(f.top,u),c=a(f.right,c),h=a(f.bottom,h),p.push({dom:d,left:f.left,top:f.top})}}));var f=(c*=d)-(l*=d),g=(h*=d)-(u*=d),v=o.vL(),y=Kt(v,{renderer:e?"svg":"canvas"});if(y.resize({width:f,height:g}),e){var m="";return fr(p,(function(t){var e=t.left-l,n=t.top-u;m+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"})),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new Ge.Rect({shape:{x:0,y:0,width:f,height:g},style:{fill:t.connectedBackgroundColor}})),fr(p,(function(t){var e=new Ge.Image({style:{x:t.left*d-l,y:t.top*d-u,image:t.dom}});y.add(e)})),y.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},e.prototype.convertToPixel=function(t,e){return Pr(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Pr(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=this._model,r=Jt.pm(i,t);return o.S6(r,(function(t,i){i.indexOf("Models")>=0&&o.S6(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}}),this)}),this),!!n}Qr(this.id)},e.prototype.getVisual=function(t,e){var n=this._model,i=Jt.pm(n,t,{defaultMainType:"series"}),r=i.seriesModel.getData(),o=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?r.indexOfRawIndex(i.dataIndex):null;return null!=o?function(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}(r,o,e):function(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}(r,e)},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,e,n,i=this;fr(Jr,(function(t){var e=function(e){var n,r=i.getModel(),a=e.target;if("globalout"===t?n={}:a&&(0,er.o)(a,(function(t){var e=(0,Xe.A)(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return n=o.l7({},e.eventData),!0}),!0),n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),c=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:a,packedEvent:n,model:u,view:c},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),fr(eo,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),fr(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._model,t.on("selectchanged",(function(t){t.isFromClick?(Mi("map","selectchanged",e,n,t),Mi("pie","selectchanged",e,n,t)):"select"===t.fromAction?(Mi("map","selected",e,n,t),Mi("pie","selected",e,n,t)):"unselect"===t.fromAction&&(Mi("map","unselected",e,n,t),Mi("pie","unselected",e,n,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?Qr(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)Qr(this.id);else{this._disposed=!0,Jt.P$(this.getDom(),fo,"");var t=this._api,e=this._model;fr(this._componentsViews,(function(n){n.dispose(e,t)})),fr(this._chartsViews,(function(n){n.dispose(e,t)})),this._zr.dispose(),delete uo[this.id]}},e.prototype.resize=function(t){if(this._disposed)Qr(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__flagInMainProcess=!0,n&&kr(this),Dr.update.call(this,{type:"resize",animation:{duration:0}}),this.__flagInMainProcess=!1,Rr.call(this,i),Er.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)Qr(this.id);else if(vr(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),lo[t]){var n=lo[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?Qr(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=o.l7({},t);return e.type=eo[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)Qr(this.id);else if(vr(e)||(e={silent:!!e}),to[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;Lr.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&r.Z.browser.weChat&&this._throttledZrFlush(),Rr.call(this,n),Er.call(this,n)}},e.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},e.prototype.appendData=function(t){if(this._disposed)Qr(this.id);else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){for(var e=[],n=t.currentStates,i=0;i<n.length;i++){var r=n[i];"emphasis"!==r&&"blur"!==r&&"select"!==r&&e.push(r)}t.selected&&t.states.select&&e.push("select"),t.hoverState===Ye.wU&&t.states.emphasis?e.push("emphasis"):t.hoverState===Ye.CX&&t.states.blur&&e.push("blur"),t.useStates(e)}function e(t,e){if(!t.preventAutoZ){var n=t.get("z"),i=t.get("zlevel");e.group.traverse((function(t){if(!t.isGroup){null!=n&&(t.z=n),null!=i&&(t.zlevel=i);var e=t.getTextContent(),r=t.getTextGuideLine();if(e&&(e.z=t.z,e.zlevel=t.zlevel,e.z2=t.z2+2),r){var o=t.textGuideLineConfig&&t.textGuideLineConfig.showAbove;r.z=t.z,r.zlevel=t.zlevel,r.z2=t.z2+(o?1:-1)}}}))}}function n(t,e){e.group.traverse((function(t){if(!Ge.isElementRemoved(t)){var e=t.getTextContent(),n=t.getTextGuideLine();t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null)}}))}function a(e,n){var i=e.getModel("stateAnimation"),r=e.isAnimationEnabled(),o=i.get("duration"),a=o>0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.group.traverse((function(e){if(e.states&&e.states.emphasis){if(Ge.isElementRemoved(e))return;if(e instanceof Ge.Path&&(0,Ye.e9)(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(r){e.stateTransition=a;var i=e.getTextContent(),o=e.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}kr=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Ar(t,!0),Ar(t,!1),e.plan()},Ar=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;l<r.length;l++)r[l].__alive=!1;function u(t){var l=t.__requireNewView;t.__requireNewView=!1;var u="_ec_"+t.id+"_"+t.type,c=!l&&o[u];if(!c){var h=(0,Vn.u9)(t.type);(c=new(e?He.Z.getClass(h.main,h.sub):Ue.Z.getClass(h.sub))).init(n,s),o[u]=c,r.push(c),a.add(c.group)}t.__viewId=c.__id=u,c.__alive=!0,c.__model=t,c.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!e&&i.prepareView(c,t,n,s)}for(e?n.eachComponent((function(t,e){"series"!==t&&u(e)})):n.eachSeries(u),l=0;l<r.length;){var c=r[l];c.__alive?l++:(!e&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),r.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},Ir=function(t,e,n,i,r){var a=t._model;if(a.setUpdatePayload(n),i){var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};r&&(l.subType=r);var u,c=n.excludeSeriesId;null!=c&&(u=o.kW(),fr(Jt.kF(c),(function(t){var e=Jt.U5(t,null);null!=e&&u.set(e,!0)}))),a&&a.eachComponent(l,(function(e){u&&null!=u.get(e.id)||((0,Ye.xp)(n)&&!n.notBlur?e instanceof Ve.Z&&(0,Ye.nV)(e,n,t._api):(0,Ye.aG)(n)&&e instanceof Ve.Z&&((0,Ye.og)(e,n,t._api),(0,Ye.ci)(e),Xr(t)),h(t["series"===i?"_chartsMap":"_componentsMap"][e.__viewId]))}),t)}else fr([].concat(t._componentsViews).concat(t._chartsViews),h);function h(i){i&&i.__alive&&i[e]&&i[e](i.__model,a,t._api,n)}},Dr={prepareAndUpdate:function(t){kr(this),Dr.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,o=this._coordSysMgr,a=this._scheduler;if(e){e.setUpdatePayload(t),a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,n),a.performDataProcessorTasks(e,t),Or(this,e),o.update(e,n),Br(e),a.performVisualTasks(e,t),zr(this,e,n,t);var s=e.get("backgroundColor")||"transparent",l=e.get("darkMode");if(r.Z.canvasSupported)i.setBackgroundColor(s),null!=l&&"auto"!==l&&i.setDarkMode(l);else{var u=tt.Qc(s);s=tt.Pz(u,"rgb"),0===u[3]&&(s="transparent")}Vr(e,n)}},updateTransform:function(t){var e=this,n=this._model,i=this._api;if(n){n.setUpdatePayload(t);var r=[];n.eachComponent((function(o,a){if("series"!==o){var s=e.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,n,i,t);l&&l.update&&r.push(s)}else r.push(s)}}));var a=o.kW();n.eachSeries((function(r){var o=e._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,n,i,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)})),Br(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0,dirtyMap:a}),Wr(this,n,i,t,a),Vr(n,this._api)}},updateView:function(t){var e=this._model;e&&(e.setUpdatePayload(t),Ue.Z.markUpdateMethod(t,"updateView"),Br(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),zr(this,this._model,this._api,t),Vr(e,this._api))},updateVisual:function(t){var e=this,n=this._model;n&&(n.setUpdatePayload(t),n.eachSeries((function(t){t.getData().clearAllVisual()})),Ue.Z.markUpdateMethod(t,"updateVisual"),Br(n),this._scheduler.performVisualTasks(n,t,{visualType:"visual",setDirty:!0}),n.eachComponent((function(i,r){if("series"!==i){var o=e.getViewOfComponentModel(r);o&&o.__alive&&o.updateVisual(r,n,e._api,t)}})),n.eachSeries((function(i){e._chartsMap[i.__viewId].updateVisual(i,n,e._api,t)})),Vr(n,this._api))},updateLayout:function(t){Dr.update.call(this,t)}},Pr=function(t,e,n,i){if(t._disposed)Qr(t.id);else for(var r,o=t._model,a=t._coordSysMgr.getCoordinateSystems(),s=Jt.pm(o,n),l=0;l<a.length;l++){var u=a[l];if(u[e]&&null!=(r=u[e](o,s,i)))return r}},Or=function(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries((function(t){i.updateStreamModes(t,n[t.__viewId])}))},Lr=function(t,e){var n=this,i=this.getModel(),r=t.type,a=t.escapeConnect,s=to[r],l=s.actionInfo,u=(l.update||"update").split(":"),c=u.pop(),h=null!=u[0]&&(0,Vn.u9)(u[0]);this.__flagInMainProcess=!0;var p=[t],d=!1;t.batch&&(d=!0,p=o.UI(t.batch,(function(e){return(e=o.ce(o.l7({},e),t)).batch=null,e})));var f,g=[],v=(0,Ye.aG)(t),y=(0,Ye.xp)(t)||v;if(fr(p,(function(t){(f=(f=s.action(t,n._model,n._api))||o.l7({},t)).type=l.event||f.type,g.push(f),y?(Ir(n,c,t,"series"),Xr(n)):h&&Ir(n,c,t,h.main,h.sub)})),"none"===c||y||h||(this.__optionUpdated?(kr(this),Dr.update.call(this,t),this.__optionUpdated=!1):Dr[c].call(this,t)),f=d?{type:l.event||r,escapeConnect:a,batch:g}:g[0],this.__flagInMainProcess=!1,!e){var m=this._messageCenter;if(m.trigger(f.type,f),v){var _={type:"selectchanged",escapeConnect:a,selected:(0,Ye.C5)(i),isFromClick:t.isFromClick||!1,fromAction:t.type,fromActionPayload:t};m.trigger(_.type,_)}}},Rr=function(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Lr.call(this,n,t)}},Er=function(t){!t&&this.trigger("updated")},Zr=function(t,e){t.on("rendered",(function(n){e.trigger("rendered",n),!t.animation.isFinished()||e.__optionUpdated||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")}))},Nr=function(t,e){t.on("mouseover",(function(t){var n=t.target,i=(0,er.o)(n,Ye.Av);if(i){var r=(0,Xe.A)(i);(0,Ye._V)(r.seriesIndex,r.focus,r.blurScope,e._api,!0),(0,Ye.Pc)(i,t),Xr(e)}})).on("mouseout",(function(t){var n=t.target,i=(0,er.o)(n,Ye.Av);if(i){var r=(0,Xe.A)(i);(0,Ye._V)(r.seriesIndex,r.focus,r.blurScope,e._api,!1),(0,Ye.i1)(i,t),Xr(e)}})).on("click",(function(t){var n=t.target,i=(0,er.o)(n,(function(t){return null!=(0,Xe.A)(t).dataIndex}),!0);if(i){var r=i.selected?"unselect":"select",o=(0,Xe.A)(i);e._api.dispatchAction({type:r,dataType:o.dataType,dataIndexInside:o.dataIndex,seriesIndex:o.seriesIndex,isFromClick:!0})}}))},Br=function(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))},zr=function(t,e,n,i){Fr(t,e,n,i),fr(t._chartsViews,(function(t){t.__alive=!1})),Wr(t,e,n,i),fr(t._chartsViews,(function(t){t.__alive||t.remove(e,n)}))},Fr=function(t,i,r,o,s){fr(s||t._componentsViews,(function(t){var s=t.__model;n(0,t),t.render(s,i,r,o),e(s,t),a(s,t)}))},Wr=function(t,i,o,s,l){var u=t._scheduler,c=t._labelManager;c.clearLabels();var h=!1;i.eachSeries((function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var r=i.renderTask;u.updatePayload(r,s),n(0,i),l&&l.get(e.uid)&&r.dirty(),r.perform(u.getPerformArgs(r))&&(h=!0),e.__transientTransitionOpt=null,i.group.silent=!!e.get("silent"),function(t,e){var n=t.get("blendMode")||null;e.group.traverse((function(t){t.isGroup||(t.style.blend=n),t.eachPendingDisplayable&&t.eachPendingDisplayable((function(t){t.style.blend=n}))}))}(e,i),(0,Ye.ci)(e),c.addLabelsOfSeries(i)})),u.unfinished=h||u.unfinished,c.updateLayoutConfig(o),c.layout(o),c.processLabelsOverall(),i.eachSeries((function(n){var i=t._chartsMap[n.__viewId];e(n,i),a(n,i)})),function(t,e){var n=t._zr.storage,i=0;n.traverse((function(t){t.isGroup||i++})),i>e.get("hoverLayerThreshold")&&!r.Z.node&&!r.Z.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,i)},Vr=function(t,e){fr(oo,(function(n){n(t,e)}))},Xr=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},Yr=function(e){e.__needsUpdateStatus&&(e.getZr().storage.traverse((function(e){Ge.isElementRemoved(e)||t(e)})),e.__needsUpdateStatus=!1)},Hr=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ZT)(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){(0,Ye.fD)(e,n),Xr(t)},n.prototype.leaveEmphasis=function(e,n){(0,Ye.Mh)(e,n),Xr(t)},n.prototype.enterBlur=function(e){(0,Ye.SX)(e),Xr(t)},n.prototype.leaveBlur=function(e){(0,Ye.VP)(e),Xr(t)},n.prototype.enterSelect=function(e){(0,Ye.XX)(e),Xr(t)},n.prototype.leaveSelect=function(e){(0,Ye.SJ)(e),Xr(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(ve))(t)},Ur=function(t){function e(t,e){for(var n=0;n<t.length;n++)t[n][Sr]=e}fr(eo,(function(n,i){t._messageCenter.on(i,(function(n){if(co[t.group]&&0!==t[Sr]){if(n&&n.escapeConnect)return;var i=t.makeActionFromEvent(n),r=[];fr(uo,(function(e){e!==t&&e.group===t.group&&r.push(e)})),e(r,0),fr(r,(function(t){1!==t[Sr]&&t.dispatchAction(i)})),e(r,2)}}))}))},Gr=function(t,e){var n=t._model;o.S6(Jt.kF(e),(function(t){var e,i=t.from,r=t.to;null==r&&(0,me._y)(e);var o={includeMainTypes:["series"],enableAll:!1,enableNone:!1},a=i?Jt.pm(n,i,o):null,s=Jt.pm(n,r,o).seriesModel;null==s&&(e=""),a&&a.seriesModel!==s&&(e=""),null!=e&&(0,me._y)(e),s.__transientTransitionOpt={from:i?i.dimension:null,to:r.dimension,dividingMethod:t.dividingMethod}}))}}(),e}(u.Z),Kr=qr.prototype;Kr.on=Tr("on"),Kr.off=Tr("off"),Kr.one=function(t,e,n){var i=this;(0,me.Sh)("ECharts#one is deprecated."),this.on.call(this,t,(function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];e&&e.apply&&e.apply(this,r),i.off(t,n)}),n)};var Jr=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Qr(t){}var to={},eo={},no=[],io=[],ro=[],oo=[],ao=[],so={},lo={},uo={},co={},ho=+new Date-0,po=+new Date-0,fo="_echarts_instance_";function go(t,e,n){var i=xo(t);if(i)return i;var r=new qr(t,e,n);return r.id="ec_"+ho++,uo[r.id]=r,Jt.P$(t,fo,r.id),Ur(r),fr(ro,(function(t){t(r)})),r}function vo(t){if(o.kJ(t)){var e=t;t=null,fr(e,(function(e){null!=e.group&&(t=e.group)})),t=t||"g_"+po++,fr(e,(function(e){e.group=t}))}return co[t]=!0,t}function yo(t){co[t]=!1}var mo=yo;function _o(t){"string"==typeof t?t=uo[t]:t instanceof qr||(t=xo(t)),t instanceof qr&&!t.isDisposed()&&t.dispose()}function xo(t){return uo[Jt.IL(t,fo)]}function bo(t){return uo[t]}function wo(t,e){so[t]=e}function So(t){io.push(t)}function To(t,e){Oo(no,t,e,2e3)}function Mo(t){t&&ro.push(t)}function Co(t){t&&oo.push(t)}function ko(t,e,n){"function"==typeof e&&(n=e,e="");var i=vr(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,dr(wr.test(i)&&wr.test(e)),to[i]||(to[i]={action:n,actionInfo:t}),eo[e]=i}function Ao(t,e){ye.Z.register(t,e)}function Io(t){var e=ye.Z.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function Do(t,e){Oo(ao,t,e,1e3,"layout")}function Po(t,e){Oo(ao,t,e,3e3,"visual")}function Oo(t,e,n,i,r){(gr(e)||vr(e))&&(n=e,e=i);var o=kn.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}function Lo(t,e){lo[t]=e}function Ro(t){return te.Z.extend(t)}function Eo(t){return He.Z.extend(t)}function Zo(t){return Ve.Z.extend(t)}function No(t){return Ue.Z.extend(t)}function Bo(t){o.v9("createCanvas",t)}function zo(t,e,n){!function(t,e,n){var i;if((0,o.kJ)(e))i=e;else if(e.svg)i=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}];else{var r=e.geoJson||e.geoJSON;r&&!e.features&&(n=e.specialAreas,e=r),i=[{type:"geoJSON",source:e,specialAreas:n}]}(0,o.S6)(i,(function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,Wn[e])(t)})),Fn.set(t,i)}(t,e,n)}function Fo(t){var e=function(t){return Fn.get(t)}(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}var Wo=Qi.DA;Po(_r,rn),Po(xr,an),Po(xr,sn),Po(_r,Un),Po(xr,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.getShallow("symbol",!0),r=n.getShallow("symbolSize",!0),o=n.getShallow("symbolRotate",!0),a=n.getShallow("symbolKeepAspect",!0);null!=i&&t.setItemVisual(e,"symbol",i),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=o&&t.setItemVisual(e,"symbolRotate",o),null!=a&&t.setItemVisual(e,"symbolKeepAspect",a)}:null}}}),Po(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=ur(n,e))}));var r=i.getVisual("decal");r&&(i.getVisual("style").decal=ur(r,e))}}))})),So(Fe),To(900,(function(t){var e=(0,o.kW)();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(We)})),Lo("default",(function(t,e){e=e||{},o.ce(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Ge.Group,i=new Ge.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,a=e.fontSize+" sans-serif",s=new Ge.Rect({style:{fill:"none"},textContent:new Ge.Text({style:{text:e.text,fill:e.textColor,font:a}}),textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(s),e.showSpinner&&((r=new Ge.Arc({shape:{startAngle:-un/2,endAngle:-un/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*un/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*un/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=ln.dz(e.text,a),o=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*o-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner?0:n/2),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),s.setShape({x:l-o,y:u-o,width:2*o,height:2*o}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),ko({type:Ye.Ki,event:Ye.Ki,update:Ye.Ki},o.ZT),ko({type:Ye.yx,event:Ye.yx,update:Ye.yx},o.ZT),ko({type:Ye.Hg,event:Ye.Hg,update:Ye.Hg},o.ZT),ko({type:Ye.JQ,event:Ye.JQ,update:Ye.JQ},o.ZT),ko({type:Ye.iK,event:Ye.iK,update:Ye.iK},o.ZT),wo("light",In),wo("dark",En);var Vo={}},5628:(t,e,n)=>{"use strict";n.d(e,{ni:()=>h,k3:()=>p,Lr:()=>d,qT:()=>_,qA:()=>x,pe:()=>b,tD:()=>w});var i=n(4239),r=n(8778),o=n(106),a=(n(3264),n(5495)),s=n(3696),l={};function u(t,e){for(var n=0;n<o.L1.length;n++){var i=o.L1[n],r=e[i],a=t.ensureState(i);a.style=a.style||{},a.style.text=r}var s=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(s,!0)}function c(t,e,n){var i,a=t.labelFetcher,s=t.labelDataIndex,l=t.labelDimIndex,u=e.normal;a&&(i=a.getFormattedLabel(s,"normal",null,l,u&&u.get("formatter"),null!=n?{value:n}:null)),null==i&&(i=(0,r.mf)(t.defaultText)?t.defaultText(s,t,n):t.defaultText);for(var c={normal:i},h=0;h<o.L1.length;h++){var p=o.L1[h],d=e[p];c[p]=(0,r.pD)(a?a.getFormattedLabel(s,p,null,l,d&&d.get("formatter")):null,i)}return c}function h(t,e,n,a){n=n||l;for(var s=t instanceof i.ZP,h=!1,p=0;p<o.qc.length;p++)if((b=e[o.qc[p]])&&b.getShallow("show")){h=!0;break}var g=s?t:t.getTextContent();if(h){s||(g||(g=new i.ZP,t.setTextContent(g)),t.stateProxy&&(g.stateProxy=t.stateProxy));var v=c(n,e),y=e.normal,m=!!y.getShallow("show"),_=d(y,a&&a.normal,n,!1,!s);for(_.text=v.normal,s||t.setTextConfig(f(y,n,!1)),p=0;p<o.L1.length;p++){var b,w=o.L1[p];if(b=e[w]){var S=g.ensureState(w),T=!!(0,r.pD)(b.getShallow("show"),m);T!==m&&(S.ignore=!T),S.style=d(b,a&&a[w],n,!0,!s),S.style.text=v[w],s||(t.ensureState(w).textConfig=f(b,n,!0))}}g.silent=!!y.getShallow("silent"),null!=g.style.x&&(_.x=g.style.x),null!=g.style.y&&(_.y=g.style.y),g.ignore=!m,g.useStyle(_),g.dirty(),n.enableTextSetter&&(x(g).setLabelText=function(t){var i=c(n,e,t);u(g,i)})}else g&&(g.ignore=!0);t.dirty()}function p(t,e){e=e||"label";for(var n={normal:t.getModel(e)},i=0;i<o.L1.length;i++){var r=o.L1[i];n[r]=t.getModel([r,e])}return n}function d(t,e,n,i,o){var a={};return function(t,e,n,i,o){n=n||l;var a,s=e.ecModel,u=s&&s.option.textStyle,c=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||l).rich;if(n){e=e||{};for(var i=(0,r.XP)(n),o=0;o<i.length;o++)e[i[o]]=1}t=t.parentModel}return e}(e);if(c)for(var h in a={},c)if(c.hasOwnProperty(h)){var p=e.getModel(["rich",h]);m(a[h]={},p,u,n,i,o,!1,!0)}a&&(t.rich=a);var d=e.get("overflow");d&&(t.overflow=d);var f=e.get("minMargin");null!=f&&(t.margin=f),m(t,e,u,n,i,o,!0,!1)}(a,t,n,i,o),e&&(0,r.l7)(a,e),a}function f(t,e,n){e=e||{};var i,o={},a=t.getShallow("rotate"),s=(0,r.pD)(t.getShallow("distance"),n?null:5),l=t.getShallow("offset");return"outside"===(i=t.getShallow("position")||(n?null:"inside"))&&(i=e.defaultOutsidePosition||"top"),null!=i&&(o.position=i),null!=l&&(o.offset=l),null!=a&&(a*=Math.PI/180,o.rotation=a),null!=s&&(o.distance=s),o.outsideFill="inherit"===t.get("color")?e.inheritColor||null:"auto",o}var g=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],v=["align","lineHeight","width","height","tag","verticalAlign"],y=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function m(t,e,n,i,o,a,s,u){n=!o&&n||l;var c=i&&i.inheritColor,h=e.getShallow("color"),p=e.getShallow("textBorderColor"),d=(0,r.pD)(e.getShallow("opacity"),n.opacity);"inherit"!==h&&"auto"!==h||(h=c||null),"inherit"!==p&&"auto"!==p||(p=c||null),a||(h=h||n.color,p=p||n.textBorderColor),null!=h&&(t.fill=h),null!=p&&(t.stroke=p);var f=(0,r.pD)(e.getShallow("textBorderWidth"),n.textBorderWidth);null!=f&&(t.lineWidth=f);var m=(0,r.pD)(e.getShallow("textBorderType"),n.textBorderType);null!=m&&(t.lineDash=m);var _=(0,r.pD)(e.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=_&&(t.lineDashOffset=_),o||null!=d||u||(d=i&&i.defaultOpacity),null!=d&&(t.opacity=d),o||a||null==t.fill&&i.inheritColor&&(t.fill=i.inheritColor);for(var x=0;x<g.length;x++){var b=g[x];null!=(S=(0,r.pD)(e.getShallow(b),n[b]))&&(t[b]=S)}for(x=0;x<v.length;x++)b=v[x],null!=(S=e.getShallow(b))&&(t[b]=S);if(null==t.verticalAlign){var w=e.getShallow("baseline");null!=w&&(t.verticalAlign=w)}if(!s||!i.disableBox){for(x=0;x<y.length;x++){var S;b=y[x],null!=(S=e.getShallow(b))&&(t[b]=S)}var T=e.getShallow("borderType");null!=T&&(t.borderDash=T),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!c||(t.backgroundColor=c),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!c||(t.borderColor=c)}}function _(t,e){var n=e&&e.getModel("textStyle");return(0,r.fy)([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var x=(0,a.Yf)();function b(t,e,n,i){if(t){var r=x(t);r.prevValue=r.value,r.value=n;var o=e.normal;r.valueAnimation=o.get("valueAnimation"),r.valueAnimation&&(r.precision=o.get("precision"),r.defaultInterpolatedText=i,r.statesModels=e)}}function w(t,e,n,i){var r=x(t);if(r.valueAnimation){var o=r.defaultInterpolatedText,l=r.prevValue,h=r.value;(null==l?s.initProps:s.updateProps)(t,{},i,e,null,(function(i){var s=(0,a.pk)(n,r.precision,l,h,i),p=c({labelDataIndex:e,defaultText:o?o(s):s+""},r.statesModels,s);u(t,p)}))}}},3442:(t,e,n)=>{"use strict";n.d(e,{Ge:()=>c,My:()=>h,G_:()=>p,bK:()=>d,kY:()=>f});var i=n(8778),r=n(9199),o=n(816),a=n(760),s="undefined"!=typeof Float32Array?Float32Array:Array;function l(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function u(t){return t.dim+t.index}function c(t,e){var n=[];return e.eachSeriesByType(t,(function(t){g(t)&&!v(t)&&n.push(t)})),n}function h(t){var e=function(t){var e={};i.S6(t,(function(t){var n=t.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=t.getData(),r=n.dim+"_"+n.index,o=i.mapDimension(n.dim),a=0,s=i.count();a<s;++a){var l=i.get(o,a);e[r]?e[r].push(l):e[r]=[l]}}));var n={};for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];if(o){o.sort((function(t,e){return t-e}));for(var a=null,s=1;s<o.length;++s){var l=o[s]-o[s-1];l>0&&(a=null===a?l:Math.min(a,l))}n[r]=a}}return n}(t),n=[];return i.S6(t,(function(t){var i,o=t.coordinateSystem.getBaseAxis(),a=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,c=e[s],h=Math.abs(a[1]-a[0]),p=o.scale.getExtent(),d=Math.abs(p[1]-p[0]);i=c?h/d*c:h}else{var f=t.getData();i=Math.abs(a[1]-a[0])/f.count()}var g=(0,r.GM)(t.get("barWidth"),i),v=(0,r.GM)(t.get("barMaxWidth"),i),y=(0,r.GM)(t.get("barMinWidth")||1,i),m=t.get("barGap"),_=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:g,barMaxWidth:v,barMinWidth:y,barGap:m,barCategoryGap:_,axisKey:u(o),stackId:l(t)})})),function(t){var e={};i.S6(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var c=t.barMinWidth;c&&(a[s].minWidth=c);var h=t.barGap;null!=h&&(o.gap=h);var p=t.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return i.S6(e,(function(t,e){n[e]={};var o=t.stacks,a=t.bandWidth,s=t.categoryGap;if(null==s){var l=i.XP(o).length;s=Math.max(35-4*l,15)+"%"}var u=(0,r.GM)(s,a),c=(0,r.GM)(t.gap,1),h=t.remainedWidth,p=t.autoWidthCount,d=(h-u)/(p+(p-1)*c);d=Math.max(d,0),i.S6(o,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width)i=t.width,e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,h-=i+c*i,p--;else{var i=d;e&&e<i&&(i=Math.min(e,h)),n&&n>i&&(i=n),i!==d&&(t.width=i,h-=i+c*i,p--)}})),d=(h-u)/(p+(p-1)*c),d=Math.max(d,0);var f,g=0;i.S6(o,(function(t,e){t.width||(t.width=d),f=t,g+=t.width*(1+c)})),f&&(g-=f.width*c);var v=-g/2;i.S6(o,(function(t,i){n[e][i]=n[e][i]||{bandWidth:a,offset:v,width:t.width},v+=t.width*(1+c)}))})),n}(n)}function p(t,e,n){if(t&&e){var i=t[u(e)];return null!=i&&null!=n?i[l(n)]:i}}function d(t,e){var n=c(t,e),r=h(n),a={};i.S6(n,(function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),s=l(t),c=r[u(i)][s],h=c.offset,p=c.width,d=n.getOtherAxis(i),f=t.get("barMinHeight")||0;a[s]=a[s]||[],e.setLayout({bandWidth:c.bandWidth,offset:h,size:p});for(var g=e.mapDimension(d.dim),v=e.mapDimension(i.dim),m=(0,o.M)(e,g),_=d.isHorizontal(),x=y(0,d),b=0,w=e.count();b<w;b++){var S=e.get(g,b),T=e.get(v,b),M=S>=0?"p":"n",C=x;m&&(a[s][T]||(a[s][T]={p:x,n:x}),C=a[s][T][M]);var k,A=void 0,I=void 0,D=void 0,P=void 0;_?(A=C,I=(k=n.dataToPoint([S,T]))[1]+h,D=k[0]-x,P=p,Math.abs(D)<f&&(D=(D<0?-1:1)*f),isNaN(D)||m&&(a[s][T][M]+=D)):(A=(k=n.dataToPoint([T,S]))[0]+h,I=C,D=p,P=k[1]-x,Math.abs(P)<f&&(P=(P<=0?-1:1)*f),isNaN(P)||m&&(a[s][T][M]+=P)),e.setItemLayout(b,{x:A,y:I,width:D,height:P})}}))}var f={seriesType:"bar",plan:(0,a.Z)(),reset:function(t){if(g(t)&&v(t)){var e=t.getData(),n=t.coordinateSystem,i=n.master.getRect(),r=n.getBaseAxis(),o=n.getOtherAxis(r),a=e.mapDimension(o.dim),l=e.mapDimension(r.dim),u=o.isHorizontal(),c=u?0:1,d=p(h([t]),r,t).width;return d>.5||(d=.5),{progress:function(t,e){for(var r,h=t.count,p=new s(2*h),f=new s(2*h),g=new s(h),v=[],m=[],_=0,x=0;null!=(r=t.next());)m[c]=e.get(a,r),m[1-c]=e.get(l,r),v=n.dataToPoint(m,null,v),f[_]=u?i.x+i.width:v[0],p[_++]=v[0],f[_]=u?v[1]:i.y+i.height,p[_++]=v[1],g[x++]=r;e.setLayout({largePoints:p,largeDataIndices:g,largeBackgroundPoints:f,barWidth:d,valueAxisStart:y(0,o),backgroundStart:u?i.x:i.y,valueAxisHorizontal:u})}}}}};function g(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function v(t){return t.pipelineContext&&t.pipelineContext.large}function y(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}},7979:(t,e,n)=>{"use strict";n.d(e,{sO:()=>c,D0:()=>p,Li:()=>f,G8:()=>d,I2:()=>h});var i=n(4708),r=n(8781),o=n(8778),a="ZH",s="EN",l={},u={},c=r.Z.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(a)>-1?a:"EN";function h(t,e){t=t.toUpperCase(),u[t]=new i.Z(e),l[t]=e}function p(t){if((0,o.HD)(t)){var e=l[t.toUpperCase()]||{};return t===a||t===s?(0,o.d9)(e):(0,o.TS)((0,o.d9)(e),(0,o.d9)(l.EN),!1)}return(0,o.TS)((0,o.d9)(t),(0,o.d9)(l.EN),!1)}function d(t){return u[t]}function f(){return u.EN}h(s,{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:"Guage",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},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:". "}}}}),h(a,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}})},2822:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var i=n(9312),r=n(8778),o=n(4708),a=n(4053),s=n(4536),l=n(5495),u=n(2746),c=(0,l.Yf)(),h=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.uid=a.Kr("ec_cpt_model"),r}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=u.YD(this),i=n?u.tE(t):{},o=e.getTheme();r.TS(t,o.get(this.mainType)),r.TS(t,this.getDefaultOption()),n&&u.dt(t,i,n)},e.prototype.mergeOption=function(t,e){r.TS(this.option,t,!0);var n=u.YD(this);n&&u.dt(this.option,t,n)},e.prototype.optionUpdated=function(t,e){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!(0,s.PT)(t))return t.defaultOption;var e=c(this);if(!e.defaultOption){for(var n=[],i=t;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var a={},l=n.length-1;l>=0;l--)a=r.TS(a,n[l],!0);e.defaultOption=a}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return(0,l.HZ)(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.protoInitialize=((n=e.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),e}(o.Z);(0,s.pw)(h,o.Z),(0,s.au)(h,{registerWhenExtend:!0}),a.cj(h),a.jS(h,(function(t){var e=[];return r.S6(h.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=r.UI(e,(function(t){return(0,s.u9)(t).main})),"dataset"!==t&&r.cq(e,"dataset")<=0&&e.unshift("dataset"),e}));const p=h},4708:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var i=n(8781),r=n(4536),o=(0,n(1761).Z)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),a=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return o(this,t,e)},t}(),s=n(5628),l=n(4239),u=["textStyle","color"],c=new l.ZP;const h=function(){function t(){}return t.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(u):null)},t.prototype.getFont=function(){return(0,s.qT)({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(t){return c.useStyle({text:t,fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily"),verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline"),padding:this.getShallow("padding"),lineHeight:this.getShallow("lineHeight"),rich:this.getShallow("rich")}),c.update(),c.getBoundingRect()},t}();var p=n(3607),d=n(8261),f=n(8778),g=function(){function t(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}return t.prototype.init=function(t,e,n){for(var i=[],r=3;r<arguments.length;r++)i[r-3]=arguments[r]},t.prototype.mergeOption=function(t,e){(0,f.TS)(this.option,t,!0)},t.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},t.prototype.getShallow=function(t,e){var n=this.option,i=null==n?n:n[t];if(null==i&&!e){var r=this.parentModel;r&&(i=r.getShallow(t))}return i},t.prototype.getModel=function(e,n){var i=null!=e,r=i?this.parsePath(e):null;return new t(i?this._doGet(r):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(r)),this.ecModel)},t.prototype.isEmpty=function(){return null==this.option},t.prototype.restoreData=function(){},t.prototype.clone=function(){return new(0,this.constructor)((0,f.d9)(this.option))},t.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},t.prototype.resolveParentPath=function(t){return t},t.prototype.isAnimationEnabled=function(){if(!i.Z.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(t,e){var n=this.option;if(!t)return n;for(var i=0;i<t.length&&(!t[i]||null!=(n=n&&"object"==typeof n?n[t[i]]:null));i++);return null==n&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},t}();(0,r.dm)(g),(0,r.Qj)(g),(0,f.jB)(g,p.K),(0,f.jB)(g,d.D),(0,f.jB)(g,a),(0,f.jB)(g,h);const v=g},4689:(t,e,n)=>{"use strict";n.d(e,{Z:()=>C});var i=n(9312),r=n(8778),o=n(8781),a=n(5495),s=n(2822),l=n(661),u=n(5498),c=n(2746),h=n(5193),p=n(4536),d=n(5073),f=n(574),g=n(1245);var v=a.Yf();function y(t,e){return t.getName(e)||t.getId(e)}var m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=(0,h.v)({count:x,reset:b}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(v(this).sourceManager=new d.U(this)).prepareSource();var i=this.getInitialData(t,n);S(i,this),this.dataTask.context.data=i,v(this).dataBeforeProcessed=i,_(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,c.YD)(this),i=n?(0,c.tE)(t):{},o=this.subType;s.Z.hasClass(o)&&(o+="Series"),r.TS(t,e.getTheme().get(this.subType)),r.TS(t,this.getDefaultOption()),a.Cc(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&(0,c.dt)(t,i,n)},e.prototype.mergeOption=function(t,e){t=r.TS(this.option,t,!0),this.fillDataTextStyle(t.data);var n=(0,c.YD)(this);n&&(0,c.dt)(this.option,t,n);var i=v(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,e);S(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,v(this).dataBeforeProcessed=o,_(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!r.fU(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&a.Cc(t[n],"label",e)},e.prototype.getInitialData=function(t,e){},e.prototype.appendData=function(t){this.getRawData().appendData(t.data)},e.prototype.getData=function(t){var e=M(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return v(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var e=M(this);if(e){var n=e.context;n.outputData=t,e!==this.dataTask&&(n.data=t)}v(this).data=t},e.prototype.getSource=function(){return v(this).sourceManager.getSource()},e.prototype.getRawData=function(){return v(this).dataBeforeProcessed},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,e,n){return function(t){var e,n,i,o,s=t.series,l=t.dataIndex,u=t.multipleSeries,c=s.getData(),h=c.mapDimensionsAll("defaultedTooltip"),p=h.length,d=s.getRawValue(l),v=(0,r.kJ)(d),y=(0,f.jT)(s,l);if(p>1||v&&!p){var m=function(t,e,n,i,o){var a=e.getData(),s=(0,r.u4)(t,(function(t,e,n){var i=a.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),l=[],u=[],c=[];function h(t,e){var n=a.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(s?c.push((0,f.TX)("nameValue",{markerType:"subItem",markerColor:o,name:n.displayName,value:t,valueType:n.type})):(l.push(t),u.push(n.type)))}return i.length?(0,r.S6)(i,(function(t){h((0,g.hk)(a,n,t),t)})):(0,r.S6)(t,h),{inlineValues:l,inlineValueTypes:u,blocks:c}}(d,s,l,h,y);e=m.inlineValues,n=m.inlineValueTypes,i=m.blocks,o=m.inlineValues[0]}else if(p){var _=c.getDimensionInfo(h[0]);o=e=(0,g.hk)(c,l,h[0]),n=_.type}else o=e=v?d[0]:d;var x=(0,a.yu)(s),b=x&&s.name||"",w=c.getName(l),S=u?b:w;return(0,f.TX)("section",{header:b,noHeader:u||!x,sortParam:o,blocks:[(0,f.TX)("nameValue",{markerType:"item",markerColor:y,name:S,noName:!(0,r.fy)(S),value:e,valueType:n})].concat(i||[])})}({series:this,dataIndex:t,multipleSeries:e})},e.prototype.isAnimationEnabled=function(){if(o.Z.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=l._.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},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,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),r=0;r<t.length;r++){var o=y(i,t[r]);n[o]=!1,this._selectedDataIndicesMap[o]=-1}},e.prototype.toggleSelect=function(t,e){for(var n=[],i=0;i<t.length;i++)n[0]=t[i],this.isSelected(t[i],e)?this.unselect(n,e):this.select(n,e)},e.prototype.getSelectedDataIndices=function(){for(var t=this._selectedDataIndicesMap,e=r.XP(t),n=[],i=0;i<e.length;i++){var o=t[e[i]];o>=0&&n.push(o)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[y(this.getData(e),t)]||!1},e.prototype._innerSelect=function(t,e){var n,i,r=this.option.selectedMode,o=e.length;if(r&&o)if("multiple"===r)for(var a=this.option.selectedMap||(this.option.selectedMap={}),s=0;s<o;s++){var l=e[s];a[c=y(t,l)]=!0,this._selectedDataIndicesMap[c]=t.getRawIndex(l)}else if("single"===r||!0===r){var u=e[o-1],c=y(t,u);this.option.selectedMap=((n={})[c]=!0,n),this._selectedDataIndicesMap=((i={})[c]=t.getRawIndex(u),i)}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var e=[];t.hasItemOption&&t.each((function(n){var i=t.getRawDataItem(n);"object"==typeof i&&i.selected&&e.push(n)})),e.length>0&&this._innerSelect(t,e)}},e.registerClass=function(t){return s.Z.registerClass(t)},e.protoInitialize=((n=e.prototype).type="series.__base__",n.seriesIndex=0,n.useColorPaletteOnData=!1,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),e}(s.Z);function _(t){var e=t.name;a.yu(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return r.S6(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function x(t){return t.model.getRawData().count()}function b(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),w}function w(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function S(t,e){r.S6((0,i.pr)(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,r.WA(T,e))}))}function T(t,e){var n=M(t);return n&&n.setOutputEnd((e||this).count()),e}function M(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}r.jB(m,u.X),r.jB(m,l._),(0,p.pw)(m,s.Z);const C=m},4841:(t,e,n)=>{"use strict";n.d(e,{f:()=>o,R:()=>a});var i=n(8778),r=(n(5495),(0,i.kW)());function o(t,e){(0,i.hu)(null==r.get(t)&&e),r.set(t,e)}function a(t,e,n){var i=r.get(e);if(!i)return n;var o=i(t);return o?n.concat(o):n}},5498:(t,e,n)=>{"use strict";n.d(e,{X:()=>s,f:()=>l});var i=n(8778),r=n(1245),o=n(349),a=(n(3264),/\{@(.+?)\}/g),s=function(){function t(){}return t.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),o=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,h="series"===c,p=n.userOutput;return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:r,data:a,dataType:e,value:i,color:l,borderColor:u,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,e,n,s,l,u){e=e||"normal";var c=this.getData(n),h=this.getDataParams(t,n);return u&&i.l7(h,u),null!=s&&h.value instanceof Array&&(h.value=h.value[s]),l||(l=c.getItemModel(t).get("normal"===e?["label","formatter"]:[e,"label","formatter"])),"function"==typeof l?(h.status=e,h.dimensionIndex=s,l(h)):"string"==typeof l?(0,o.kF)(l,h).replace(a,(function(e,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),(0,r.hk)(c,t,n)})):void 0},t.prototype.getRawValue=function(t,e){return(0,r.hk)(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function l(t){var e,n;return i.Kn(t)?t.type&&(n=t):e=t,{markupText:e,markupFragment:n}}},8261:(t,e,n)=>{"use strict";n.d(e,{t:()=>r,D:()=>a});var i=n(1761),r=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getItemStyle=function(t,e){return o(this,t,e)},t}()},3607:(t,e,n)=>{"use strict";n.d(e,{v:()=>r,K:()=>a});var i=n(1761),r=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getLineStyle=function(t){return o(this,t)},t}()},1761:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(8778);function r(t,e){for(var n=0;n<t.length;n++)t[n][1]||(t[n][1]=t[n][0]);return e=e||!1,function(n,r,o){for(var a={},s=0;s<t.length;s++){var l=t[s][1];if(!(r&&i.cq(r,l)>=0||o&&i.cq(o,l)<0)){var u=n.getShallow(l,e);null!=u&&(a[t[s][0]]=u)}}return a}}},661:(t,e,n)=>{"use strict";n.d(e,{_:()=>o});var i=n(5495),r=(0,i.Yf)(),o=((0,i.Yf)(),function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,n){var o=(0,i.kF)(this.get("color",!0)),a=this.get("colorLayer",!0);return function(t,e,n,i,r,o,a){var s=e(o=o||t),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var c=null!=a&&i?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(i,a):n;if((c=c||n)&&c.length){var h=c[l];return r&&(u[r]=h),s.paletteIdx=(l+1)%c.length,h}}(this,r,o,a,t,e,n)},t.prototype.clearColorPalette=function(){var t;(t=r)(this).paletteIdx=0,t(this).paletteNameMap={}},t}())},6774:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},r=function(t){return Math.round(t.length/2)};function o(t){return{seriesType:t,reset:function(t,e,n){var o=t.getData(),a=t.get("sampling"),s=t.coordinateSystem,l=o.count();if(l>10&&"cartesian2d"===s.type&&a){var u=s.getBaseAxis(),c=s.getOtherAxis(u),h=u.getExtent(),p=n.getDevicePixelRatio(),d=Math.abs(h[1]-h[0])*(p||1),f=Math.round(l/d);if(f>1){"lttb"===a&&t.setData(o.lttbDownSample(o.mapDimension(c.dim),1/f));var g=void 0;"string"==typeof a?g=i[a]:"function"==typeof a&&(g=a),g&&t.setData(o.downSample(o.mapDimension(c.dim),1/f,g,r))}}}}}},5193:(t,e,n)=>{"use strict";n.d(e,{v:()=>r});var i=n(8778);function r(t){return new o(t)}var o=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var a,s=h(this._modBy),l=this._modDataCount||0,u=h(t&&t.modBy),c=t&&t.modDataCount||0;function h(t){return!(t>=1)&&(t=1),t}s===u&&l===c||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=this._doReset(r)),this._modBy=u,this._modDataCount=c;var p=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=p?this._dueIndex+p:1/0,this._dueEnd);if(!r&&(a||d<f)){var g=this._progress;if((0,i.kJ)(g))for(var v=0;v<g.length;v++)this._doProgress(g[v],d,f,u,c);else this._doProgress(g,d,f,u,c)}this._dueIndex=f;var y=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(t,e,n,i,r){a.reset(e,n,i,r),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:a.next},this.context)},t.prototype._doReset=function(t){var e,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((e=this._reset(this.context))&&e.progress&&(n=e.forceFirstProgress,e=e.progress),(0,i.kJ)(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},t}(),a=function(){var t,e,n,i,r,o={reset:function(l,u,c,h){e=l,t=u,n=c,i=h,r=Math.ceil(i/n),o.next=n>1&&i>0?s:a}};return o;function a(){return e<t?e++:null}function s(){var o=e%r*n+Math.ceil(e/r),a=e>=t?null:o<i?o:e;return e++,a}}()},4536:(t,e,n)=>{"use strict";n.d(e,{u9:()=>s,PT:()=>l,dm:()=>u,pw:()=>h,Qj:()=>d,au:()=>v});var i=n(9312),r=n(8778),o="___EC__COMPONENT__CONTAINER___",a="___EC__EXTENDED_CLASS___";function s(t){var e={main:"",sub:""};if(t){var n=t.split(".");e.main=n[0]||"",e.sub=n[1]||""}return e}function l(t){return!(!t||!t[a])}function u(t,e){t.$constructor=t,t.extend=function(t){var e=this;function n(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(t.$constructor)t.$constructor.apply(this,arguments);else{if(c(e)){var s=r.nW(n.prototype,new(e.bind.apply(e,(0,i.pr)([void 0],o))));return s}e.apply(this,arguments)}}return n[a]=!0,r.l7(n.prototype,t),n.extend=this.extend,n.superCall=f,n.superApply=g,r.XW(n,this),n.superClass=e,n}}function c(t){return"function"==typeof t&&/^class\s/.test(Function.prototype.toString.call(t))}function h(t,e){t.extend=e.extend}var p=Math.round(10*Math.random());function d(t){var e=["__\0is_clz",p++].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function f(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[e].apply(t,n)}function g(t,e,n){return this.superClass.prototype[e].apply(t,n)}function v(t,e){e=e||{};var n={};if(t.registerClass=function(t){var e,i=t.type||t.prototype.type;if(i){e=i,r.hu(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal'),t.prototype.type=i;var a=s(i);a.sub?a.sub!==o&&((function(t){var e=n[t.main];return e&&e[o]||((e=n[t.main]={})[o]=!0),e}(a))[a.sub]=t):n[a.main]=t}return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[o]&&(r=e?r[e]:null),i&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){var e=s(t),i=[],a=n[e.main];return a&&a[o]?r.S6(a,(function(t,e){e!==o&&i.push(t)})):i.push(a),i},t.hasClass=function(t){var e=s(t);return!!n[e.main]},t.getAllClassMainTypes=function(){var t=[];return r.S6(n,(function(e,n){t.push(n)})),t},t.hasSubTypes=function(t){var e=s(t),i=n[e.main];return i&&i[o]},e.registerWhenExtend){var i=t.extend;i&&(t.extend=function(e){var n=i.call(this,e);return t.registerClass(n)})}}},4053:(t,e,n)=>{"use strict";n.d(e,{Kr:()=>a,cj:()=>s,jS:()=>l,ZL:()=>u});var i=n(8778),r=n(4536),o=(n(3264),Math.round(10*Math.random()));function a(t){return[t||"",o++].join("_")}function s(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=(0,r.u9)(t);e[i.main]=n},t.determineSubType=function(n,i){var o=i.type;if(!o){var a=(0,r.u9)(n).main;t.hasSubTypes(n)&&e[a]&&(o=e[a](i))}return o}}function l(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,r,o,a){if(t.length){var s=function(t){var r={},o=[];return i.S6(t,(function(a){var s=n(r,a),l=function(t,e){var n=[];return i.S6(t,(function(t){i.cq(e,t)>=0&&n.push(t)})),n}(s.originalDeps=e(a),t);s.entryCount=l.length,0===s.entryCount&&o.push(a),i.S6(l,(function(t){i.cq(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(r,t);i.cq(e.successor,t)<0&&e.successor.push(a)}))})),{graph:r,noEntryList:o}}(r),l=s.graph,u=s.noEntryList,c={};for(i.S6(t,(function(t){c[t]=!0}));u.length;){var h=u.pop(),p=l[h],d=!!c[h];d&&(o.call(a,h,p.originalDeps.slice()),delete c[h]),i.S6(p.successor,d?g:f)}i.S6(c,(function(){throw new Error("")}))}function f(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function g(t){c[t]=!0,f(t)}}}function u(t,e){return i.TS(i.TS({},t,!0),e,!0)}},9291:(t,e,n)=>{"use strict";function i(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}n.d(e,{o:()=>i})},349:(t,e,n)=>{"use strict";n.d(e,{OD:()=>a,Lz:()=>y,F1:()=>h,kF:()=>g,A0:()=>v,uX:()=>p,MY:()=>l,zW:()=>s,MI:()=>m});var i=n(8778),r=n(9199),o=n(4037);function a(t){if(!(0,r.kE)(t))return i.HD(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function s(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}n(3264),n(3146),n(3696);var l=i.MY,u=/([&<>"'])/g,c={"&":"&","<":"<",">":">",'"':""","'":"'"};function h(t){return null==t?"":(t+"").replace(u,(function(t,e){return c[e]}))}function p(t,e,n){function s(t){return t&&i.fy(t)?t:"-"}function l(t){return!(null==t||isNaN(t)||!isFinite(t))}var u="time"===e,c=t instanceof Date;if(u||c){var h=u?(0,r.sG)(t):t;if(!isNaN(+h))return(0,o.WU)(h,"yyyy-MM-dd hh:mm:ss",n);if(c)return"-"}if("ordinal"===e)return i.cd(t)?s(t):i.hj(t)&&l(t)?t+"":"-";var p=(0,r.FK)(t);return l(p)?a(p):i.cd(t)?s(t):"-"}var d=["a","b","c","d","e","f","g"],f=function(t,e){return"{"+t+(null==e?"":e)+"}"};function g(t,e,n){i.kJ(e)||(e=[e]);var r=e.length;if(!r)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var s=d[a];t=t.replace(f(s),f(s,0))}for(var l=0;l<r;l++)for(var u=0;u<o.length;u++){var c=e[l][o[u]];t=t.replace(f(d[u],l),n?h(c):c)}return t}function v(t,e){var n=i.HD(t)?{color:t,extraCssText:e}:t||{},r=n.color,o=n.type;e=n.extraCssText;var a=n.renderMode||"html";return r?"html"===a?"subItem"===o?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+h(r)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+h(r)+";"+(e||"")+'"></span>':{renderMode:a,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}function y(t,e){return e=e||"transparent",i.HD(t)?t:i.Kn(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function m(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}},3696:(t,e,n)=>{"use strict";n.r(e),n.d(e,{extendShape:()=>R,extendPath:()=>Z,registerShape:()=>N,getShapeClass:()=>B,makePath:()=>z,makeImage:()=>F,mergePath:()=>V,resizePath:()=>H,subPixelOptimizeLine:()=>U,subPixelOptimizeRect:()=>G,subPixelOptimize:()=>X,updateProps:()=>j,initProps:()=>$,removeElement:()=>q,removeElementWithFadeOut:()=>J,isElementRemoved:()=>Q,getTransform:()=>tt,applyTransform:()=>et,transformDirection:()=>nt,groupTransition:()=>rt,clipPointsByRect:()=>ot,clipRectByRect:()=>at,createIcon:()=>st,linePolygonIntersect:()=>lt,lineLineIntersect:()=>ut,Group:()=>u.Z,Image:()=>l.ZP,Text:()=>c.ZP,Circle:()=>h.Z,Ellipse:()=>p.Z,Sector:()=>d.Z,Ring:()=>f.Z,Polygon:()=>g.Z,Polyline:()=>v.Z,Rect:()=>y.Z,Line:()=>m.Z,BezierCurve:()=>_.Z,Arc:()=>x.Z,IncrementalDisplayable:()=>k.Z,CompoundPath:()=>b.Z,LinearGradient:()=>w.Z,RadialGradient:()=>S.Z,BoundingRect:()=>T.Z,OrientedBoundingRect:()=>M.Z,Point:()=>C.Z,Path:()=>a.ZP});var i=n(7367),r=n(561),o=n(213),a=n(391),s=n(4629),l=n(6781),u=n(6454),c=n(4239),h=n(1707),p=n(9509),d=n(2098),f=n(4874),g=n(1748),v=n(9181),y=n(230),m=n(6573),_=n(3584),x=n(9689),b=n(8234),w=n(5853),S=n(2763),T=n(9472),M=n(8511),C=n(6),k=n(2012),A=n(6169),I=n(8778),D=n(1563),P=Math.max,O=Math.min,L={};function R(t){return a.ZP.extend(t)}var E=i.Pc;function Z(t,e){return E(t,e)}function N(t,e){L[t]=e}function B(t){if(L.hasOwnProperty(t))return L[t]}function z(t,e,n,r){var o=i.iR(t,e);return n&&("center"===r&&(n=W(n,o.getBoundingRect())),H(o,n)),o}function F(t,e,n){var i=new l.ZP({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(W(e,r))}}});return i}function W(t,e){var n,i=e.width/e.height,r=t.height*i;return n=r<=t.width?t.height:(r=t.width)/i,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-n/2,width:r,height:n}}var V=i.AA;function H(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}function U(t){return A._3(t.shape,t.shape,t.style),t}function G(t){return A.Pw(t.shape,t.shape,t.style),t}var X=A.vu;function Y(t,e,n,i,r,o,a){var s,l=!1;"function"==typeof r?(a=o,o=r,r=null):(0,I.Kn)(r)&&(o=r.cb,a=r.during,l=r.isFrom,s=r.removeOpt,r=r.dataIndex);var u,c="update"===t,h="remove"===t;if(i&&i.ecModel){var p=i.ecModel.getUpdatePayload();u=p&&p.animation}var d=i&&i.isAnimationEnabled();if(h||e.stopAnimation("remove"),d){var f=void 0,g=void 0,v=void 0;u?(f=u.duration||0,g=u.easing||"cubicOut",v=u.delay||0):h?(s=s||{},f=(0,I.pD)(s.duration,200),g=(0,I.pD)(s.easing,"cubicOut"),v=0):(f=i.getShallow(c?"animationDurationUpdate":"animationDuration"),g=i.getShallow(c?"animationEasingUpdate":"animationEasing"),v=i.getShallow(c?"animationDelayUpdate":"animationDelay")),"function"==typeof v&&(v=v(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof f&&(f=f(r)),f>0?l?e.animateFrom(n,{duration:f,delay:v||0,easing:g,done:o,force:!!o||!!a,scope:t,during:a}):e.animateTo(n,{duration:f,delay:v||0,easing:g,done:o,force:!!o||!!a,setToFinal:!0,scope:t,during:a}):(e.stopAnimation(),!l&&e.attr(n),o&&o())}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function j(t,e,n,i,r,o){Y("update",t,e,n,i,r,o)}function $(t,e,n,i,r,o){Y("init",t,e,n,i,r,o)}function q(t,e,n,i,r,o){Q(t)||Y("remove",t,e,n,i,r,o)}function K(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),q(t,{style:{opacity:0}},e,n,i)}function J(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse((function(t){t.isGroup||K(t,e,n,i)})):K(t,e,n,i)}function Q(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++)if("remove"===t.animators[e].scope)return!0;return!1}function tt(t,e){for(var n=r.yR([]);t&&t!==e;)r.dC(n,t.getLocalTransform(),n),t=t.parent;return n}function et(t,e,n){return e&&!(0,I.zG)(e)&&(e=s.Z.getLocalTransform(e)),n&&(e=r.U_([],e)),o.Ne([],t,e)}function nt(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=et(o,e,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function it(t){return!t.isGroup}function rt(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){it(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(it(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),j(t,i,n,(0,D.A)(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=(0,I.l7)({},t.shape)),e}}function ot(t,e){return(0,I.UI)(t,(function(t){var n=t[0];n=P(n,e.x),n=O(n,e.x+e.width);var i=t[1];return i=P(i,e.y),[n,i=O(i,e.y+e.height)]}))}function at(t,e){var n=P(t.x,e.x),i=O(t.x+t.width,e.x+e.width),r=P(t.y,e.y),o=O(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function st(t,e,n){var i=(0,I.l7)({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),(0,I.ce)(r,n),new l.ZP(i)):z(t.replace("path://",""),i,n,"center")}function lt(t,e,n,i,r){for(var o=0,a=r[r.length-1];o<r.length;o++){var s=r[o];if(ut(t,e,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function ut(t,e,n,i,r,o,a,s){var l,u=n-t,c=i-e,h=a-r,p=s-o,d=ct(h,p,u,c);if((l=d)<=1e-6&&l>=-1e-6)return!1;var f=t-r,g=e-o,v=ct(f,g,u,c)/d;if(v<0||v>1)return!1;var y=ct(f,g,h,p)/d;return!(y<0||y>1)}function ct(t,e,n,i){return t*i-n*e}N("circle",h.Z),N("ellipse",p.Z),N("sector",d.Z),N("ring",f.Z),N("polygon",g.Z),N("polyline",v.Z),N("rect",y.Z),N("line",m.Z),N("bezierCurve",_.Z),N("arc",x.Z)},1563:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var i=(0,n(5495).Yf)()},2746:(t,e,n)=>{"use strict";n.d(e,{BZ:()=>h,ME:()=>p,p$:()=>d,YD:()=>f,dt:()=>g,tE:()=>v});var i=n(8778),r=n(9472),o=n(9199),a=n(349),s=i.S6,l=["left","right","top","bottom","width","height"],u=[["width","left","right"],["height","top","bottom"]];function c(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var c,h,p=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);(c=o+g)>i||l.newline?(o=0,c=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var v=p.height+(f?-f.y+p.y:0);(h=a+v)>r||l.newline?(o+=s+n,a=0,h=v,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=c+n:a=h+n)}))}var h=c;function p(t,e,n){n=a.MY(n||0);var i=e.width,s=e.height,l=(0,o.GM)(t.left,i),u=(0,o.GM)(t.top,s),c=(0,o.GM)(t.right,i),h=(0,o.GM)(t.bottom,s),p=(0,o.GM)(t.width,i),d=(0,o.GM)(t.height,s),f=n[2]+n[0],g=n[1]+n[3],v=t.aspect;switch(isNaN(p)&&(p=i-c-g-l),isNaN(d)&&(d=s-h-f-u),null!=v&&(isNaN(p)&&isNaN(d)&&(v>i/s?p=.8*i:d=.8*s),isNaN(p)&&(p=v*d),isNaN(d)&&(d=p/v)),isNaN(l)&&(l=i-c-p-g),isNaN(u)&&(u=s-h-d-f),t.left||t.right){case"center":l=i/2-p/2-n[3];break;case"right":l=i-p-g}switch(t.top||t.bottom){case"middle":case"center":u=s/2-d/2-n[0];break;case"bottom":u=s-d-f}l=l||0,u=u||0,isNaN(p)&&(p=i-g-l-(c||0)),isNaN(d)&&(d=s-f-u-(h||0));var y=new r.Z(l+n[3],u+n[0],p,d);return y.margin=n,y}function d(t,e,n,o,a){var s=!a||!a.hv||a.hv[0],l=!a||!a.hv||a.hv[1],u=a&&a.boundingMode||"all";if(s||l){var c;if("raw"===u)c="group"===t.type?new r.Z(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(c=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(c=c.clone()).applyTransform(h)}var d=p(i.ce({width:c.width,height:c.height},e),n,o),f=s?d.x-c.x:0,g=l?d.y-c.y:0;"raw"===u?(t.x=f,t.y=g):(t.x+=f,t.y+=g),t.markRedraw()}}function f(t){var e=t.layoutMode||t.constructor.layoutMode;return i.Kn(e)?e:e?{type:e}:null}function g(t,e,n){var r=n&&n.ignoreSize;!i.kJ(r)&&(r=[r,r]);var o=l(u[0],0),a=l(u[1],1);function l(n,i){var o={},a=0,l={},u=0;if(s(n,(function(e){l[e]=t[e]})),s(n,(function(t){c(e,t)&&(o[t]=l[t]=e[t]),h(o,t)&&a++,h(l,t)&&u++})),r[i])return h(e,n[1])?l[n[2]]=null:h(e,n[2])&&(l[n[1]]=null),l;if(2!==u&&a){if(a>=2)return o;for(var p=0;p<n.length;p++){var d=n[p];if(!c(o,d)&&c(t,d)){o[d]=t[d];break}}return o}return l}function c(t,e){return t.hasOwnProperty(e)}function h(t,e){return null!=t[e]&&"auto"!==t[e]}function p(t,e,n){s(t,(function(t){e[t]=n[t]}))}p(u[0],t,o),p(u[1],t,a)}function v(t){return function(t,e){return e&&t&&s(l,(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}({},t)}i.WA(c,"vertical"),i.WA(c,"horizontal")},3264:(t,e,n)=>{"use strict";function i(t){}function r(t){throw new Error(t)}n.d(e,{Sh:()=>i,_y:()=>r}),n(8778),"undefined"!=typeof console&&console.warn&&console.log},5495:(t,e,n)=>{"use strict";n.d(e,{kF:()=>u,Cc:()=>c,Td:()=>h,C4:()=>p,Co:()=>d,ab:()=>f,U5:()=>y,yu:()=>m,lY:()=>_,g0:()=>x,O0:()=>b,gO:()=>w,Yf:()=>S,pm:()=>M,C6:()=>C,iP:()=>k,HZ:()=>A,P$:()=>I,IL:()=>D,U9:()=>P,pk:()=>O});var i=n(8778),r=n(8781),o=n(9199),a=n(4017),s=(n(3264),"series\0"),l="\0_ec_\0";function u(t){return t instanceof Array?t:null==t?[]:[t]}function c(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i<r;i++){var o=n[i];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}var h=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function p(t){return!(0,i.Kn)(t)||(0,i.kJ)(t)||t instanceof Date?t:t.value}function d(t){return(0,i.Kn)(t)&&!(t instanceof Array)}function f(t,e,n){var r="normalMerge"===n,o="replaceMerge"===n,a="replaceAll"===n;t=t||[],e=(e||[]).slice();var l=(0,i.kW)();(0,i.S6)(e,(function(t,n){(0,i.Kn)(t)||(e[n]=null)}));var u,c,h=function(t,e,n){var i=[];if("replaceAll"===n)return i;for(var r=0;r<t.length;r++){var o=t[r];o&&null!=o.id&&e.set(o.id,r),i.push({existing:"replaceMerge"===n||_(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return i}(t,l,n);return(r||o)&&function(t,e,n,r){(0,i.S6)(r,(function(o,a){if(o&&null!=o.id){var s=v(o.id),l=n.get(s);if(null!=l){var u=t[l];(0,i.hu)(!u.newOption,'Duplicated option on id "'+s+'".'),u.newOption=o,u.existing=e[l],r[a]=null}}}))}(h,t,l,e),r&&function(t,e){(0,i.S6)(e,(function(n,i){if(n&&null!=n.name)for(var r=0;r<t.length;r++){var o=t[r].existing;if(!t[r].newOption&&o&&(null==o.id||null==n.id)&&!_(n)&&!_(o)&&g("name",o,n))return t[r].newOption=n,void(e[i]=null)}}))}(h,e),r||o?function(t,e,n){(0,i.S6)(e,(function(e){if(e){for(var i,r=0;(i=t[r])&&(i.newOption||_(i.existing)||i.existing&&null!=e.id&&!g("id",e,i.existing));)r++;i?(i.newOption=e,i.brandNew=n):t.push({newOption:e,brandNew:n,existing:null,keyInfo:null}),r++}}))}(h,e,o):a&&function(t,e){(0,i.S6)(e,(function(e){t.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})}))}(h,e),u=h,c=(0,i.kW)(),(0,i.S6)(u,(function(t){var e=t.existing;e&&c.set(e.id,t)})),(0,i.S6)(u,(function(t){var e=t.newOption;(0,i.hu)(!e||null==e.id||!c.get(e.id)||c.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&c.set(e.id,t),!t.keyInfo&&(t.keyInfo={})})),(0,i.S6)(u,(function(t,e){var n=t.existing,r=t.newOption,o=t.keyInfo;if((0,i.Kn)(r)){if(o.name=null!=r.name?v(r.name):n?n.name:s+e,n)o.id=v(n.id);else if(null!=r.id)o.id=v(r.id);else{var a=0;do{o.id="\0"+o.name+"\0"+a++}while(c.get(o.id))}c.set(o.id,t)}})),h}function g(t,e,n){var i=y(e[t],null),r=y(n[t],null);return null!=i&&null!=r&&i===r}function v(t){return y(t,"")}function y(t,e){if(null==t)return e;var n=typeof t;return"string"===n?t:"number"===n||(0,i.cd)(t)?t+"":e}function m(t){var e=t.name;return!(!e||!e.indexOf(s))}function _(t){return t&&null!=t.id&&0===v(t.id).indexOf(l)}function x(t){return l+t}function b(t,e,n){(0,i.S6)(t,(function(t){var r=t.newOption;(0,i.Kn)(r)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,r,t.existing,n))}))}function w(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?(0,i.kJ)(e.dataIndex)?(0,i.UI)(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?(0,i.kJ)(e.name)?(0,i.UI)(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0}function S(){var t="__ec_inner_"+T++;return function(e){return e[t]||(e[t]={})}}var T=(0,o.jj)();function M(t,e,n){var r;if((0,i.HD)(e)){var o={};o[e+"Index"]=0,r=o}else r=e;var a=(0,i.kW)(),s={},l=!1;(0,i.S6)(r,(function(t,e){if("dataIndex"!==e&&"dataIndexInside"!==e){var r=e.match(/^(\w+)(Index|Id|Name)$/)||[],o=r[1],u=(r[2]||"").toLowerCase();!o||!u||n&&n.includeMainTypes&&(0,i.cq)(n.includeMainTypes,o)<0||(l=l||!!o,(a.get(o)||a.set(o,{}))[u]=t)}else s[e]=t}));var u=n?n.defaultMainType:null;return!l&&u&&a.set(u,{}),a.each((function(e,i){var r=A(t,i,e,{useDefault:u===i,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});s[i+"Models"]=r.models,s[i+"Model"]=r.models[0]})),s}var C={useDefault:!0,enableAll:!1,enableNone:!1},k={useDefault:!1,enableAll:!0,enableNone:!0};function A(t,e,n,r){r=r||C;var o=n.index,a=n.id,s=n.name,l={models:null,specified:null!=o||null!=a||null!=s};if(!l.specified){var u=void 0;return l.models=r.useDefault&&(u=t.getComponent(e))?[u]:[],l}return"none"===o||!1===o?((0,i.hu)(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),l.models=[],l):("all"===o&&((0,i.hu)(r.enableAll,'`"all"` is not a valid value on index option.'),o=a=s=null),l.models=t.queryComponents({mainType:e,index:o,id:a,name:s}),l)}function I(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function D(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function P(t){return"auto"===t?r.Z.domSupported?"html":"richText":t||"html"}function O(t,e,n,i,r){var s=null==e||"auto"===e;if(null==i)return i;if("number"==typeof i){var l=(0,a.k4)(n||0,i,r);return(0,o.NM)(l,s?Math.max((0,o.ZB)(n||0),(0,o.ZB)(i)):e)}if("string"==typeof i)return r<1?n:i;for(var u=[],c=n||[],h=i,p=Math.max(c.length,h.length),d=0;d<p;++d)if("ordinal"===t.getDimensionInfo(d).type)u[d]=(r<1?c:h)[d];else{var f=c&&c[d]?c[d]:0,g=h[d];l=null==c?i[d]:(0,a.k4)(f,g,r),u[d]=(0,o.NM)(l,s?Math.max((0,o.ZB)(f),(0,o.ZB)(g)):e)}return u}},9199:(t,e,n)=>{"use strict";n.d(e,{NU:()=>i,GM:()=>r,NM:()=>o,dt:()=>a,ZB:()=>s,M9:()=>l,wW:()=>u,mW:()=>c,sG:()=>p,Xd:()=>d,kx:()=>g,FK:()=>v,kE:()=>y,jj:()=>m,nl:()=>x}),n(8778);function i(t,e,n,i){var r=e[1]-e[0],o=n[1]-n[0];if(0===r)return 0===o?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function r(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function o(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function a(t){return t.sort((function(t,e){return t-e})),t}function s(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function l(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function u(t){var e=2*Math.PI;return(t%e+e)%e}function c(t){return t>-1e-4&&t<1e-4}var h=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function p(t){if(t instanceof Date)return t;if("string"==typeof t){var e=h.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))}function d(t){return Math.pow(10,f(t))}function f(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function g(t,e){var n=f(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function v(t){var e=parseFloat(t);return e==t&&(0!==e||"string"!=typeof t||t.indexOf("x")<=0)?e:NaN}function y(t){return!isNaN(v(t))}function m(){return Math.round(9*Math.random())}function _(t,e){return 0===e?t:_(e,t%e)}function x(t,e){return null==t?e:null==e?t:t*e/_(t,e)}},106:(t,e,n)=>{"use strict";n.d(e,{CX:()=>p,wU:()=>d,L1:()=>f,qc:()=>g,Ki:()=>v,yx:()=>y,Hg:()=>m,JQ:()=>_,iK:()=>x,Gl:()=>L,Pc:()=>Z,i1:()=>N,fD:()=>B,Mh:()=>z,SX:()=>F,VP:()=>W,XX:()=>V,SJ:()=>H,_V:()=>G,nV:()=>X,og:()=>Y,ci:()=>j,C5:()=>$,vF:()=>q,WO:()=>Q,Av:()=>tt,RW:()=>et,aG:()=>nt,xp:()=>it,e9:()=>rt});var i=n(4290),r=n(8778),o=n(1563),a=n(1756),s=n(5495),l=n(391),u=1,c={},h=(0,s.Yf)(),p=1,d=2,f=["emphasis","blur","select"],g=["normal","emphasis","blur","select"],v="highlight",y="downplay",m="select",_="unselect",x="toggleSelect";function b(t){return null!=t&&"none"!==t}var w=new i.ZP(100);function S(t){if("string"!=typeof t)return t;var e=w.get(t);return e||(e=a.xb(t,-.1),w.put(t,e)),e}function T(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function M(t){T(t,"emphasis",d)}function C(t){t.hoverState===d&&T(t,"normal",0)}function k(t){T(t,"blur",p)}function A(t){t.hoverState===p&&T(t,"normal",0)}function I(t){t.selected=!0}function D(t){t.selected=!1}function P(t,e,n){e(t,n)}function O(t,e,n){P(t,e,n),t.isGroup&&t.traverse((function(t){P(t,e,n)}))}function L(t,e){switch(e){case"emphasis":t.hoverState=d;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=p;break;case"select":t.selected=!0}}function R(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var o=n&&(0,r.cq)(n,"select")>=0,a=!1;if(t instanceof l.ZP){var s=h(t),u=o&&s.selectFill||s.normalFill,c=o&&s.selectStroke||s.normalStroke;if(b(u)||b(c)){var p=(i=i||{}).style||{};!b(p.fill)&&b(u)?(a=!0,i=(0,r.l7)({},i),(p=(0,r.l7)({},p)).fill=S(u)):!b(p.stroke)&&b(c)&&(a||(i=(0,r.l7)({},i),p=(0,r.l7)({},p)),p.stroke=S(c)),i.style=p}}if(i&&null==i.z2){a||(i=(0,r.l7)({},i));var d=t.z2EmphasisLift;i.z2=t.z2+(null!=d?d:10)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=(0,r.cq)(t.currentStates,e)>=0,o=t.style.opacity,a=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a<e.length;a++){var s=e[a],l=r[s];o[s]=null==l?i&&i[s]:l}for(a=0;a<t.animators.length;a++){var u=t.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveFinalToTarget(o,e)}return o}(t,["opacity"],e,{opacity:1}),s=(n=n||{}).style||{};return null==s.opacity&&(n=(0,r.l7)({},n),s=(0,r.l7)({opacity:i?o:.1*a.opacity},s),n.style=s),n}(this,t,n);if("select"===t)return function(t,e,n){if(n&&null==n.z2){n=(0,r.l7)({},n);var i=t.z2SelectLift;n.z2=t.z2+(null!=i?i:9)}return n}(this,0,n)}return n}function E(t){t.stateProxy=R;var e=t.getTextContent(),n=t.getTextGuideLine();e&&(e.stateProxy=R),n&&(n.stateProxy=R)}function Z(t,e){!U(t,e)&&!t.__highByOuter&&O(t,M)}function N(t,e){!U(t,e)&&!t.__highByOuter&&O(t,C)}function B(t,e){t.__highByOuter|=1<<(e||0),O(t,M)}function z(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&O(t,C)}function F(t){O(t,k)}function W(t){O(t,A)}function V(t){O(t,I)}function H(t){O(t,D)}function U(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function G(t,e,n,i,o){var a=i.getModel();function s(t,e){for(var n=0;n<e.length;n++){var i=t.getItemGraphicEl(e[n]);i&&W(i)}}if(n=n||"coordinateSystem",o){if(null!=t&&e&&"none"!==e){var l=a.getSeriesByIndex(t),u=l.coordinateSystem;u&&u.master&&(u=u.master);var c=[];a.eachSeries((function(t){var o=l===t,a=t.coordinateSystem;if(a&&a.master&&(a=a.master),!("series"===n&&!o||"coordinateSystem"===n&&!(a&&u?a===u:o)||"series"===e&&o)){if(i.getViewOfSeriesModel(t).group.traverse((function(t){k(t)})),(0,r.zG)(e))s(t.getData(),e);else if((0,r.Kn)(e))for(var h=(0,r.XP)(e),p=0;p<h.length;p++)s(t.getData(h[p]),e[h[p]]);c.push(t)}})),a.eachComponent((function(t,e){if("series"!==t){var n=i.getViewOfComponentModel(e);n&&n.blurSeries&&n.blurSeries(c,a)}}))}}else!function(t){t.getModel().eachComponent((function(e,n){("series"===e?t.getViewOfSeriesModel(n):t.getViewOfComponentModel(n)).group.traverse((function(t){A(t)}))}))}(i)}function X(t,e,n){if(it(e)){var i=e.type===v,a=t.seriesIndex,l=t.getData(e.dataType),u=(0,s.gO)(l,e);u=((0,r.kJ)(u)?u[0]:u)||0;var c=l.getItemGraphicEl(u);if(!c)for(var h=l.count(),p=0;!c&&p<h;)c=l.getItemGraphicEl(p++);if(c){var d=(0,o.A)(c);G(a,d.focus,d.blurScope,n,i)}else{var f=t.get(["emphasis","focus"]),g=t.get(["emphasis","blurScope"]);null!=f&&G(a,f,g,n,i)}}}function Y(t,e,n){if(nt(e)){var i=e.dataType,o=t.getData(i),a=(0,s.gO)(o,e);(0,r.kJ)(a)||(a=[a]),t[e.type===x?"toggleSelect":e.type===m?"select":"unselect"](a,i)}}function j(t){var e=t.getAllData();(0,r.S6)(e,(function(e){var n=e.data,i=e.type;n.eachItemGraphicEl((function(e,n){t.isSelected(n,i)?V(e):H(e)}))}))}function $(t){var e=[];return t.eachSeries((function(t){var n=t.getAllData();(0,r.S6)(n,(function(n){n.data;var i=n.type,r=t.getSelectedDataIndices();if(r.length>0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function q(t,e,n){!function(t,e){var n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!0}(t),O(t,E),function(t,e,n){var i=(0,o.A)(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}(t,e,n)}var K=["emphasis","blur","select"],J={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Q(t,e,n,i){n=n||"itemStyle";for(var r=0;r<K.length;r++){var o=K[r],a=e.getModel([o,n]);t.ensureState(o).style=i?i(a):a[J[n]]()}}function tt(t){return!(!t||!t.__highDownDispatcher)}function et(t){var e=c[t];return null==e&&u<=32&&(e=c[t]=u++),e}function nt(t){var e=t.type;return e===m||e===_||e===x}function it(t){var e=t.type;return e===v||e===y}function rt(t){var e=h(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}},3111:(t,e,n)=>{"use strict";n.d(e,{t:()=>v});var i=n(8778),r=n(3696),o=n(9472),a=n(9356),s=r.Path.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),l=r.Path.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),u=r.Path.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,h=Math.sin(u),p=Math.cos(u),d=.6*a,f=.7*a;t.moveTo(n-c,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+c-h*d,l+s+p*d,n,i-f,n,i),t.bezierCurveTo(n,i-f,n-c+h*d,l+s+p*d,n-c,l+s),t.closePath()}}),c=r.Path.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveTo(r,o),t.lineTo(r+a,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-a,o+n),t.lineTo(r,o),t.closePath()}}),h={line:r.Rect,rect:r.Rect,roundRect:r.Rect,square:r.Rect,circle:r.Circle,diamond:l,pin:u,arrow:c,triangle:s},p={line:function(t,e,n,i,r){r.x=t,r.y=e+i/2-1,r.width=n,r.height=2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},d={};i.S6(h,(function(t,e){d[e]=new t}));var f=r.Path.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=(0,a.wI)(t,e,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var r=d[i];r||(r=d[i="rect"]),p[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}});function g(t,e){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):n.fill=t,this.markRedraw()}}function v(t,e,n,i,a,s,l){var u,c=0===t.indexOf("empty");return c&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(u=0===t.indexOf("image://")?r.makeImage(t.slice(8),new o.Z(e,n,i,a),l?"center":"cover"):0===t.indexOf("path://")?r.makePath(t.slice(7),{},new o.Z(e,n,i,a),l?"center":"cover"):new f({shape:{symbolType:t,x:e,y:n,width:i,height:a}})).__isEmptyBrush=c,u.setColor=g,s&&u.setColor(s),u}},4013:(t,e,n)=>{"use strict";n.d(e,{P2:()=>a,T9:()=>s});var i="\0__throttleOriginMethod",r="\0__throttleRate",o="\0__throttleType";function a(t,e,n){var i,r,o,a,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,t.apply(o,a||[])}e=e||0;var p=function(){for(var t=[],p=0;p<arguments.length;p++)t[p]=arguments[p];i=(new Date).getTime(),o=this,a=t;var d=s||e,f=s||n;s=null,r=i-(f?l:u)-d,clearTimeout(c),f?c=setTimeout(h,d):r>=0?h():c=setTimeout(h,-r),l=i};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(t){s=t},p}function s(t,e,n,s){var l=t[e];if(l){var u=l[i]||l,c=l[o];if(l[r]!==n||c!==s){if(null==n||!s)return t[e]=u;(l=t[e]=a(u,n,"debounce"===s))[i]=u,l[o]=s,l[r]=n}return l}}},4037:(t,e,n)=>{"use strict";n.d(e,{WT:()=>s,yR:()=>l,dV:()=>u,s2:()=>c,P5:()=>h,V8:()=>d,FW:()=>g,Tj:()=>y,$K:()=>m,xC:()=>_,WU:()=>x,k7:()=>b,q5:()=>S,sx:()=>T,CW:()=>M,xz:()=>C,Wp:()=>k,fn:()=>A,MV:()=>I,RZ:()=>D,xL:()=>P,vh:()=>O,f5:()=>L,En:()=>R,eN:()=>E,rM:()=>Z,cb:()=>N});var i=n(8778),r=n(9199),o=n(7979),a=n(4708),s=1e3,l=60*s,u=60*l,c=24*u,h=365*c,p={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},d={year:"{yyyy}",month:"{yyyy}-{MM}",day:"{yyyy}-{MM}-{dd}",hour:"{yyyy}-{MM}-{dd} "+p.hour,minute:"{yyyy}-{MM}-{dd} "+p.minute,second:"{yyyy}-{MM}-{dd} "+p.second,millisecond:p.none},f=["year","month","day","hour","minute","second","millisecond"],g=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function v(t,e){return"0000".substr(0,e-(t+="").length)+t}function y(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function m(t){return t===y(t)}function _(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function x(t,e,n,i){var s=r.sG(t),l=s[T(n)](),u=s[M(n)]()+1,c=Math.floor((u-1)/4)+1,h=s[C(n)](),p=s["get"+(n?"UTC":"")+"Day"](),d=s[k(n)](),f=(d-1)%12+1,g=s[A(n)](),y=s[I(n)](),m=s[D(n)](),_=(i instanceof a.Z?i:(0,o.G8)(i||o.sO)||(0,o.Li)()).getModel("time"),x=_.get("month"),b=_.get("monthAbbr"),w=_.get("dayOfWeek"),S=_.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,l+"").replace(/{yy}/g,l%100+"").replace(/{Q}/g,c+"").replace(/{MMMM}/g,x[u-1]).replace(/{MMM}/g,b[u-1]).replace(/{MM}/g,v(u,2)).replace(/{M}/g,u+"").replace(/{dd}/g,v(h,2)).replace(/{d}/g,h+"").replace(/{eeee}/g,w[p]).replace(/{ee}/g,S[p]).replace(/{e}/g,p+"").replace(/{HH}/g,v(d,2)).replace(/{H}/g,d+"").replace(/{hh}/g,v(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,v(g,2)).replace(/{m}/g,g+"").replace(/{ss}/g,v(y,2)).replace(/{s}/g,y+"").replace(/{SSS}/g,v(m,3)).replace(/{S}/g,m+"")}function b(t,e,n,r,o){var a=null;if("string"==typeof n)a=n;else if("function"==typeof n)a=n(t.value,e,{level:t.level});else{var s=i.l7({},p);if(t.level>0)for(var l=0;l<f.length;++l)s[f[l]]="{primary|"+s[f[l]]+"}";var u=n?!1===n.inherit?n:i.ce(n,s):s,c=w(t.value,o);if(u[c])a=u[c];else if(u.inherit){for(l=g.indexOf(c)-1;l>=0;--l)if(u[c]){a=u[c];break}a=a||s.none}if(i.kJ(a)){var h=null==t.level?0:t.level>=0?t.level:a.length+t.level;a=a[h=Math.min(h,a.length-1)]}}return x(new Date(t.value),a,o,r)}function w(t,e){var n=r.sG(t),i=n[M(e)]()+1,o=n[C(e)](),a=n[k(e)](),s=n[A(e)](),l=n[I(e)](),u=0===n[D(e)](),c=u&&0===l,h=c&&0===s,p=h&&0===a,d=p&&1===o;return d&&1===i?"year":d?"month":p?"day":h?"hour":c?"minute":u?"second":"millisecond"}function S(t,e,n){var i="number"==typeof t?r.sG(t):t;switch(e=e||w(t,n)){case"year":return i[T(n)]();case"half-year":return i[M(n)]()>=6?1:0;case"quarter":return Math.floor((i[M(n)]()+1)/4);case"month":return i[M(n)]();case"day":return i[C(n)]();case"half-day":return i[k(n)]()/24;case"hour":return i[k(n)]();case"minute":return i[A(n)]();case"second":return i[I(n)]();case"millisecond":return i[D(n)]()}}function T(t){return t?"getUTCFullYear":"getFullYear"}function M(t){return t?"getUTCMonth":"getMonth"}function C(t){return t?"getUTCDate":"getDate"}function k(t){return t?"getUTCHours":"getHours"}function A(t){return t?"getUTCMinutes":"getMinutes"}function I(t){return t?"getUTCSeconds":"getSeconds"}function D(t){return t?"getUTCSeconds":"getSeconds"}function P(t){return t?"setUTCFullYear":"setFullYear"}function O(t){return t?"setUTCMonth":"setMonth"}function L(t){return t?"setUTCDate":"setDate"}function R(t){return t?"setUTCHours":"setHours"}function E(t){return t?"setUTCMinutes":"setMinutes"}function Z(t){return t?"setUTCSeconds":"setSeconds"}function N(t){return t?"setUTCSeconds":"setSeconds"}},7252:(t,e,n)=>{"use strict";n.d(e,{f7:()=>i,cy:()=>r,XD:()=>o,qb:()=>a,hL:()=>s,J5:()=>l,RA:()=>u,fY:()=>c,Wc:()=>h});var i=(0,n(8778).kW)(["tooltip","label","itemName","itemId","seriesName"]),r="original",o="arrayRows",a="objectRows",s="keyedColumns",l="typedArray",u="unknown",c="column",h="row"},2916:(t,e,n)=>{"use strict";n.d(e,{Z:()=>_});var i=n(8778),r=n(6454),o=n(4053),a=n(4536),s=n(5495),l=n(106),u=n(5193),c=n(760),h=s.Yf(),p=(0,c.Z)(),d=function(){function t(){this.group=new r.Z,this.uid=o.Kr("viewChart"),this.renderTask=(0,u.v)({plan:v,reset:y}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){g(t.getData(),i,"emphasis")},t.prototype.downplay=function(t,e,n,i){g(t.getData(),i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.markUpdateMethod=function(t,e){h(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function f(t,e,n){t&&("emphasis"===e?l.fD:l.Mh)(t,n)}function g(t,e,n){var r=s.gO(t,e),o=e&&null!=e.highlightKey?(0,l.RW)(e.highlightKey):null;null!=r?(0,i.S6)(s.kF(r),(function(e){f(t.getItemGraphicEl(e),n,o)})):t.eachItemGraphicEl((function(t){f(t,n,o)}))}function v(t){return p(t.model)}function y(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&h(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),m[l]}a.dm(d,["dispose"]),a.au(d,{registerWhenExtend:!0});var m={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const _=d},8278:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(6454),r=n(4053),o=n(4536),a=function(){function t(){this.group=new i.Z,this.uid=r.Kr("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.blurSeries=function(t,e){},t}();o.dm(a),o.au(a,{registerWhenExtend:!0});const s=a},9312:(t,e,n)=>{"use strict";n.d(e,{ZT:()=>r,pr:()=>o});var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function o(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}},810:(t,e,n)=>{"use strict";function i(t,e,n,i,r,o,a,s){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=l):r&&(l=s?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:u}}n.d(e,{Z:()=>i})},9441:(t,e,n)=>{"use strict";function i(t,e){for(var n=[],i={},r=0;r<e.length;r++){var o=e[r],a=o[0],s={id:t+":"+r,css:o[1],media:o[2],sourceMap:o[3]};i[a]?i[a].parts.push(s):n.push(i[a]={id:a,parts:[s]})}return n}n.d(e,{Z:()=>f});var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=r&&(document.head||document.getElementsByTagName("head")[0]),s=null,l=0,u=!1,c=function(){},h=null,p="data-vue-ssr-id",d="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(t,e,n,r){u=n,h=r||{};var a=i(t,e);return g(a),function(e){for(var n=[],r=0;r<a.length;r++){var s=a[r];(l=o[s.id]).refs--,n.push(l)}for(e?g(a=i(t,e)):a=[],r=0;r<n.length;r++){var l;if(0===(l=n[r]).refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete o[l.id]}}}}function g(t){for(var e=0;e<t.length;e++){var n=t[e],i=o[n.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](n.parts[r]);for(;r<n.parts.length;r++)i.parts.push(y(n.parts[r]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{var a=[];for(r=0;r<n.parts.length;r++)a.push(y(n.parts[r]));o[n.id]={id:n.id,refs:1,parts:a}}}}function v(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function y(t){var e,n,i=document.querySelector("style["+p+'~="'+t.id+'"]');if(i){if(u)return c;i.parentNode.removeChild(i)}if(d){var r=l++;i=s||(s=v()),e=x.bind(null,i,r,!1),n=x.bind(null,i,r,!0)}else i=v(),e=b.bind(null,i),n=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else n()}}var m,_=(m=[],function(t,e){return m[t]=e,m.filter(Boolean).join("\n")});function x(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=_(e,r);else{var o=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function b(t,e){var n=e.css,i=e.media,r=e.sourceMap;if(i&&t.setAttribute("media",i),h.ssrId&&t.setAttribute(p,e.id),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},8073:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var i=n(4629),r=n(4017),o=n(9472),a=n(444),s=n(9356),l=n(8778),u=n(5080),c=n(1756),h=n(8781),p="__zr_normal__",d=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],f={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},g={},v=new o.Z(0,0,0,0),y=function(){function t(t){this.id=(0,l.M8)(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.attachedTransform,o=void 0,a=void 0,l=!1;r.parent=i?this:null;var u=!1;if(r.x=e.x,r.y=e.y,r.originX=e.originX,r.originY=e.originY,r.rotation=e.rotation,r.scaleX=e.scaleX,r.scaleY=e.scaleY,null!=n.position){var c=v;n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(g,n,c):(0,s.wI)(g,n,c),r.x=g.x,r.y=g.y,o=g.align,a=g.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var p=void 0,d=void 0;"center"===h?(p=.5*c.width,d=.5*c.height):(p=(0,s.GM)(h[0],c.width),d=(0,s.GM)(h[1],c.height)),u=!0,r.originX=-r.x+p+(i?0:c.x),r.originY=-r.y+d+(i?0:c.y)}}null!=n.rotation&&(r.rotation=n.rotation);var f=n.offset;f&&(r.x+=f[0],r.y+=f[1],u||(r.originX=-f[0],r.originY=-f[1]));var y=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),_=void 0,x=void 0,b=void 0;y&&this.canBeInsideText()?(_=n.insideFill,x=n.insideStroke,null!=_&&"auto"!==_||(_=this.getInsideTextFill()),null!=x&&"auto"!==x||(x=this.getInsideTextStroke(_),b=!0)):(_=n.outsideFill,x=n.outsideStroke,null!=_&&"auto"!==_||(_=this.getOutsideFill()),null!=x&&"auto"!==x||(x=this.getOutsideStroke(_),b=!0)),(_=_||"#000")===m.fill&&x===m.stroke&&b===m.autoStroke&&o===m.align&&a===m.verticalAlign||(l=!0,m.fill=_,m.stroke=x,m.autoStroke=b,m.align=o,m.verticalAlign=a,e.setDefaultTextStyle(m)),l&&e.dirtyStyle(),e.markRedraw()}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?u.GD:u.vU},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&(0,c.Qc)(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,(0,c.Pz)(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},(0,l.l7)(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if((0,l.Kn)(t))for(var n=t,i=(0,l.XP)(n),r=0;r<i.length;r++){var o=i[r];this.attrKV(o,t[o])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],r=i.__fromStateTransition;if(!r||r===p){var o=i.targetName,a=o?e[o]:e;i.saveFinalToTarget(a)}}},t.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,d)},t.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var r=n[i];null==t[r]||r in e||(e[r]=this[r])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(p,!1,t)},t.prototype.useState=function(e,n,i){var r=e===p;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!((0,l.cq)(o,e)>=0)||!n&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||r){r||this.saveCurrentToNormalState(s);var u=!(!s||!s.hoverLayer);return u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,n,!i&&!this.__inHover&&a&&a.duration>0,a),this._textContent&&this._textContent.useState(e,n),this._textGuide&&this._textGuide.useState(e,n),r?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT),s}(0,l.H)("State "+e+" not exists.")}}},t.prototype.useStates=function(e,n){if(e.length){var i=[],r=this.currentStates,o=e.length,a=o===r.length;if(a)for(var s=0;s<o;s++)if(e[s]!==r[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var l=e[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,e)),u||(u=this.states[l]),u&&i.push(u)}var c=!(!i[o-1]||!i[o-1].hoverLayer);c&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(i),p=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!n&&!this.__inHover&&p&&p.duration>0,p),this._textContent&&this._textContent.useStates(e),this._textGuide&&this._textGuide.useStates(e),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},t.prototype.removeState=function(t){var e=(0,l.cq)(this.currentStates,t);if(e>=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=(0,l.cq)(i,t),o=(0,l.cq)(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i<t.length;i++){var r=t[i];(0,l.l7)(n,r),r.textConfig&&(e=e||{},(0,l.l7)(e,r.textConfig))}return e&&(n.textConfig=e),n},t.prototype._applyStateObj=function(t,e,n,i,r,o){var a=!(e&&i);e&&e.textConfig?(this.textConfig=(0,l.l7)({},i?this.textConfig:n.textConfig),(0,l.l7)(this.textConfig,e.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},u=!1,c=0;c<d.length;c++){var h=d[c],p=r&&f[h];e&&null!=e[h]?p?(u=!0,s[h]=e[h]):this[h]=e[h]:a&&null!=n[h]&&(p?(u=!0,s[h]=n[h]):this[h]=n[h])}if(!r)for(c=0;c<this.animators.length;c++){var g=this.animators[c],v=g.targetName;g.__changeFinalValue(v?(e||n)[v]:e||n)}u&&this._transitionState(t,s,o)},t.prototype._attachComponent=function(t){if(t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");if(t===this)throw new Error("Recursive component attachment.");var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this},t.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},t.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(t){var e=this._textContent;if(e!==t){if(e&&e!==t&&this.removeTextContent(),t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");t.attachedTransform=new i.Z,this._attachComponent(t),this._textContent=t,this.markRedraw()}},t.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),(0,l.l7)(this.textConfig,t),this.markRedraw()},t.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.attachedTransform=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=t.REDARAW_BIT;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},t.prototype.addSelfToZr=function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)},t.prototype.animate=function(t,e){var n=t?this[t]:this;if(n){var i=new r.ZP(n,e);return this.addAnimator(i,t),i}(0,l.H)('Property "'+t+'" is not existed in element '+this.id)},t.prototype.addAnimator=function(t,e){var n=this.__zr,i=this;t.during((function(){i.updateDuringAnimation(e)})).done((function(){var e=i.animators,n=(0,l.cq)(e,t);n>=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o<i;o++){var a=n[o];t&&t!==a.scope?r.push(a):a.stop(e)}return this.animators=r,this},t.prototype.animateTo=function(t,e,n){m(this,t,e,n)},t.prototype.animateFrom=function(t,e,n){m(this,t,e,n,!0)},t.prototype._transitionState=function(t,e,n,i){for(var r=m(this,e,n,i),o=0;o<r.length;o++)r[o].__fromStateTransition=t},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.REDARAW_BIT=1,t.initDefaultProps=function(){var e=t.prototype;e.type="element",e.name="",e.ignore=!1,e.silent=!1,e.isGroup=!1,e.draggable=!1,e.dragging=!1,e.ignoreClip=!1,e.__inHover=!1,e.__dirty=t.REDARAW_BIT;var n={};function i(t,e,i){n[t+e+i]||(console.warn("DEPRECATED: '"+t+"' has been deprecated. use '"+e+"', '"+i+"' instead"),n[t+e+i]=!0)}function r(t,n,r,o){function a(t,e){Object.defineProperty(e,0,{get:function(){return t[r]},set:function(e){t[r]=e}}),Object.defineProperty(e,1,{get:function(){return t[o]},set:function(e){t[o]=e}})}Object.defineProperty(e,t,{get:function(){return i(t,r,o),this[n]||a(this,this[n]=[]),this[n]},set:function(e){i(t,r,o),this[r]=e[0],this[o]=e[1],this[n]=e,a(this,e)}})}Object.defineProperty&&(!h.Z.browser.ie||h.Z.browser.version>8)&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),t}();function m(t,e,n,i,r){var o=[];b(t,"",t,e,n=n||{},i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},h=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p<o.length;p++){var d=o[p];c&&d.done(c),h&&d.aborted(h),d.start(n.easing,n.force)}return o}function _(t,e,n){for(var i=0;i<n;i++)t[i]=e[i]}function x(t,e,n){if((0,l.zG)(e[n]))if((0,l.zG)(t[n])||(t[n]=[]),(0,l.fU)(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),_(t[n],e[n],i))}else{var r=e[n],o=t[n],a=r.length;if(c=r,(0,l.zG)(c[0]))for(var s=r[0].length,u=0;u<a;u++)o[u]?_(o[u],r[u],s):o[u]=Array.prototype.slice.call(r[u]);else _(o,r,a);o.length=r.length}else t[n]=e[n];var c}function b(t,e,n,i,o,a,s,u){for(var c=[],h=[],p=(0,l.XP)(i),d=o.duration,f=o.delay,g=o.additive,v=o.setToFinal,y=!(0,l.Kn)(a),m=0;m<p.length;m++)if(null!=n[I=p[m]]&&null!=i[I]&&(y||a[I]))if((0,l.Kn)(i[I])&&!(0,l.zG)(i[I])){if(e){u||(n[I]=i[I],t.updateDuringAnimation(e));continue}b(t,I,n[I],i[I],o,a&&a[I],s,u)}else c.push(I),h.push(I);else u||(n[I]=i[I],t.updateDuringAnimation(e),h.push(I));var _=c.length;if(_>0||o.force&&!s.length){for(var w=t.animators,S=[],T=0;T<w.length;T++)w[T].targetName===e&&S.push(w[T]);if(!g&&S.length)for(T=0;T<S.length;T++)if(S[T].stopTracks(h)){var M=(0,l.cq)(w,S[T]);w.splice(M,1)}var C=void 0,k=void 0,A=void 0;if(u)for(k={},v&&(C={}),T=0;T<_;T++)k[I=c[T]]=n[I],v?C[I]=i[I]:n[I]=i[I];else if(v)for(A={},T=0;T<_;T++){var I;A[I=c[T]]=(0,r.Ve)(n[I]),x(n,i,I)}var D=new r.ZP(n,!1,g?S:null);D.targetName=e,o.scope&&(D.scope=o.scope),v&&C&&D.whenWithKeys(0,C,c),A&&D.whenWithKeys(0,A,c),D.whenWithKeys(null==d?500:d,u?k:i,c).delay(f||0),t.addAnimator(D,e),s.push(D)}}(0,l.jB)(y,a.Z),(0,l.jB)(y,i.Z);const w=y},4017:(t,e,n)=>{"use strict";n.d(e,{Ve:()=>y,ZP:()=>b,k4:()=>u});var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};const r=i,o=function(){function t(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}return t.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._startTime-this._pausedTime)/this._life;n<0&&(n=0),n=Math.min(n,1);var i=this.easing,o="string"==typeof i?r[i]:i,a="function"==typeof o?o(n):n;if(this.onframe&&this.onframe(a),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},t.prototype._restart=function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t}();var a=n(1756),s=n(8778),l=Array.prototype.slice;function u(t,e,n){return(e-t)*n+t}function c(t,e,n,i){for(var r=e.length,o=0;o<r;o++)t[o]=u(e[o],n[o],i)}function h(t,e,n,i){for(var r=e.length,o=0;o<r;o++)t[o]=e[o]+n[o]*i;return t}function p(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a<r;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=e[a][s]+n[a][s]*i}return t}function d(t,e,n){var i=t,r=e;if(i.push&&r.push){var o=i.length,a=r.length;if(o!==a)if(o>a)i.length=a;else for(var s=o;s<a;s++)i.push(1===n?r[s]:l.call(r[s]));var u=i[0]&&i[0].length;for(s=0;s<i.length;s++)if(1===n)isNaN(i[s])&&(i[s]=r[s]);else for(var c=0;c<u;c++)isNaN(i[s][c])&&(i[s][c]=r[s][c])}}function f(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function g(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function v(t,e,n,i,r,o,a,s){for(var l=e.length,u=0;u<l;u++)t[u]=g(e[u],n[u],i[u],r[u],o,a,s)}function y(t){if((0,s.zG)(t)){var e=t.length;if((0,s.zG)(t[0])){for(var n=[],i=0;i<e;i++)n.push(l.call(t[i]));return n}return l.call(t)}return t}function m(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}var _=[0,0,0,0],x=function(){function t(t){this.keyframes=[],this.maxTime=0,this.arrDim=0,this.interpolable=!0,this._needsSort=!1,this._isAllValueEqual=!0,this._lastFrame=0,this._lastFramePercent=0,this.propName=t}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return!this._isAllValueEqual&&this.keyframes.length>=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if((0,s.zG)(e)){var r=function(t){return(0,s.zG)(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&f(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var l=a.Qc(e);l?(e=l,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e)return void(this.interpolable=!1);this._isAllValueEqual&&i>0&&(o=n[i-1],(this.isValueColor&&!f(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1))}var u={time:t,value:e,percent:0};return this.keyframes.push(u),u},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort((function(t,e){return t.time-e.time}));for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o<i;o++)e[o].percent=e[o].time/this.maxTime,n>0&&o!==i-1&&d(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o<i;o++)0===n?this.isValueColor?e[o].additiveValue=h([],e[o].value,a,-1):e[o].additiveValue=e[o].value-a:1===n?e[o].additiveValue=h([],e[o].value,a,-1):2===n&&(e[o].additiveValue=p([],e[o].value,a,-1))}},t.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,i=null!=this._additiveTrack,r=i?"additiveValue":"value",o=this.keyframes,a=this.keyframes.length,s=this.propName,l=this.arrDim,h=this.isValueColor;if(e<0)n=0;else if(e<this._lastFramePercent){for(n=Math.min(this._lastFrame+1,a-1);n>=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;n<a&&!(o[n].percent>e);n++);n=Math.min(n-1,a-2)}var p=o[n+1],d=o[n];if(d&&p){this._lastFrame=n,this._lastFramePercent=e;var f=p.percent-d.percent;if(0!==f){var y=(e-d.percent)/f,x=i?this._additiveValue:h?_:t[s];if((l>0||h)&&!x&&(x=this._additiveValue=[]),this.useSpline){var b=o[n][r],w=o[0===n?n:n-1][r],S=o[n>a-2?a-1:n+1][r],T=o[n>a-3?a-1:n+2][r];if(l>0)1===l?v(x,w,b,S,T,y,y*y,y*y*y):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,c=0;c<l;c++){t[c]||(t[1]=[]);for(var h=0;h<u;h++)t[c][h]=g(e[c][h],n[c][h],i[c][h],r[c][h],o,a,s)}}(x,w,b,S,T,y,y*y,y*y*y);else if(h)v(x,w,b,S,T,y,y*y,y*y*y),i||(t[s]=m(x));else{var M=void 0;M=this.interpolable?g(w,b,S,T,y,y*y,y*y*y):S,i?this._additiveValue=M:t[s]=M}}else l>0?1===l?c(x,d[r],p[r],y):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a<r;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=u(e[a][s],n[a][s],i)}}(x,d[r],p[r],y):h?(c(x,d[r],p[r],y),i||(t[s]=m(x))):(M=void 0,M=this.interpolable?u(d[r],p[r],y):function(t,e,n){return n>.5?e:t}(d[r],p[r],y),i?this._additiveValue=M:t[s]=M);i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(a.Qc(t[n],_),h(_,_,i,1),t[n]=m(_)):t[n]=t[n]+i:1===e?h(t[n],t[n],i,1):2===e&&p(t[n],t[n],i,1)},t}();const b=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?(0,s.H)("Can' use additive animation on looped animation."):this._additiveAnimators=n}return t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e){return this.whenWithKeys(t,e,(0,s.XP)(e))},t.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,r=0;r<n.length;r++){var o=n[r],a=i[o];if(!a){a=i[o]=new x(o);var s=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes[l.keyframes.length-1];s=u&&u.value,l.isValueColor&&s&&(s=m(s))}else s=this._target[o];if(null==s)continue;0!==t&&a.addKeyframe(0,y(s)),this._trackKeys.push(o)}a.addKeyframe(t,y(e[o]))}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneList;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedList;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},t.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},t.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var r=n[i].getTrack(t);r&&(e=r)}return e},t.prototype.start=function(t,e){if(!(this._started>0)){this._started=1;for(var n=this,i=[],r=0;r<this._trackKeys.length;r++){var a=this._trackKeys[r],s=this._tracks[a],l=this._getAdditiveTrack(a),u=s.keyframes;if(s.prepare(l),s.needsAnimate())i.push(s);else if(!s.interpolable){var c=u[u.length-1];c&&(n._target[s.propName]=c.value)}}if(i.length||e){var h=new o({life:this._maxTime,loop:this._loop,delay:this._delay,onframe:function(t){n._started=2;var e=n._additiveAnimators;if(e){for(var r=!1,o=0;o<e.length;o++)if(e[o]._clip){r=!0;break}r||(n._additiveAnimators=null)}for(o=0;o<i.length;o++)i[o].step(n._target,t);var a=n._onframeList;if(a)for(o=0;o<a.length;o++)a[o](n._target,t)},ondestroy:function(){n._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),t&&"spline"!==t&&(h.easing=t)}else this._doneCallback();return this}},t.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},t.prototype.delay=function(t){return this._delay=t,this},t.prototype.during=function(t){return t&&(this._onframeList||(this._onframeList=[]),this._onframeList.push(t)),this},t.prototype.done=function(t){return t&&(this._doneList||(this._doneList=[]),this._doneList.push(t)),this},t.prototype.aborted=function(t){return t&&(this._abortedList||(this._abortedList=[]),this._abortedList.push(t)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(t){return this._tracks[t]},t.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,r=0;r<t.length;r++){var o=n[t[r]];o&&(e?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(r=0;r<i.length;r++)if(!n[i[r]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},t.prototype.saveFinalToTarget=function(t,e){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var i=e[n],r=this._tracks[i];if(r&&!r.isFinished()){var o=r.keyframes,a=o[o.length-1];if(a){var s=y(a.value);r.isValueColor&&(s=m(s)),t[i]=s}}}}},t.prototype.__changeFinalValue=function(t,e){e=e||(0,s.XP)(t);for(var n=0;n<e.length;n++){var i=e[n],r=this._tracks[i];if(r){var o=r.keyframes;if(o.length>1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}()},5080:(t,e,n)=>{"use strict";n.d(e,{KL:()=>r,Ak:()=>o,vU:()=>a,GD:()=>s,iv:()=>l});var i=1;"undefined"!=typeof window&&(i=Math.max(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var r=i,o=.4,a="#333",s="#ccc",l="#eee"},9356:(t,e,n)=>{"use strict";n.d(e,{Uo:()=>u,dz:()=>h,lP:()=>d,M3:()=>f,mU:()=>g,Dp:()=>v,GM:()=>y,wI:()=>m});var i,r,o=n(9472),a=n(8778),s=n(4290),l={},u="12px sans-serif",c=function(t,e){return i||(i=(0,a.vL)().getContext("2d")),r!==e&&(r=i.font=e||u),i.measureText(t)};function h(t,e){var n=l[e=e||u];n||(n=l[e]=new s.ZP(500));var i=n.get(t);return null==i&&(i=c(t,e).width,n.put(t,i)),i}function p(t,e,n,i){var r=h(t,e),a=v(e),s=f(0,r,n),l=g(0,a,i);return new o.Z(s,l,r,a)}function d(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return p(r[0],e,n,i);for(var a=new o.Z(0,0,0,0),s=0;s<r.length;s++){var l=p(r[s],e,n,i);0===s?a.copy(l):a.union(l)}return a}function f(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function g(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function v(t){return h("国",t)}function y(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function m(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",h="top";if(i instanceof Array)l+=y(i[0],n.width),u+=y(i[1],n.height),c=null,h=null;else switch(i){case"left":l-=r,u+=s,c="right",h="middle";break;case"right":l+=r+a,u+=s,h="middle";break;case"top":l+=a/2,u-=r,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+r,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=r,u+=s,h="middle";break;case"insideRight":l+=a-r,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=r,c="center";break;case"insideBottom":l+=a/2,u+=o-r,c="center",h="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,c="right";break;case"insideBottomLeft":l+=r,u+=o-r,h="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,c="right",h="bottom"}return(t=t||{}).x=l,t.y=u,t.align=c,t.verticalAlign=h,t}},7096:(t,e,n)=>{"use strict";n.d(e,{m:()=>r});var i=2*Math.PI;function r(t){return(t%=i)<0&&(t+=i),t}},9472:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(561),r=n(6),o=Math.min,a=Math.max,s=new r.Z,l=new r.Z,u=new r.Z,c=new r.Z,h=new r.Z,p=new r.Z;const d=function(){function t(t,e,n,i){n<0&&isFinite(n)&&(t+=n,n=-n),i<0&&isFinite(i)&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=o(t.x,this.x),n=o(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=a(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=a(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,r=t.height/e.height,o=i.Ue();return i.Iu(o,o,[-e.x,-e.y]),i.bA(o,o,[n,r]),i.Iu(o,o,[t.x,t.y]),o},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,o=i.x,a=i.x+i.width,s=i.y,l=i.y+i.height,u=e.x,c=e.x+e.width,d=e.y,f=e.y+e.height,g=!(a<u||c<o||l<d||f<s);if(n){var v=1/0,y=0,m=Math.abs(a-u),_=Math.abs(c-o),x=Math.abs(l-d),b=Math.abs(f-s),w=Math.min(m,_),S=Math.min(x,b);a<u||c<o?w>y&&(y=w,m<_?r.Z.set(p,-m,0):r.Z.set(p,_,0)):w<v&&(v=w,m<_?r.Z.set(h,m,0):r.Z.set(h,-_,0)),l<d||f<s?S>y&&(y=S,x<b?r.Z.set(p,0,-x):r.Z.set(p,0,b)):w<v&&(v=w,x<b?r.Z.set(h,0,x):r.Z.set(h,0,-b))}return n&&r.Z.copy(n,g?h:p),g},t.prototype.contain=function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],h=i[3],p=i[4],d=i[5];return e.x=n.x*r+p,e.y=n.y*h+d,e.width=n.width*r,e.height=n.height*h,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}s.x=u.x=n.x,s.y=c.y=n.y,l.x=c.x=n.x+n.width,l.y=u.y=n.y+n.height,s.transform(i),c.transform(i),l.transform(i),u.transform(i),e.x=o(s.x,l.x,u.x,c.x),e.y=o(s.y,l.y,u.y,c.y);var f=a(s.x,l.x,u.x,c.x),g=a(s.y,l.y,u.y,c.y);e.width=f-e.x,e.height=g-e.y}else e!==n&&t.copy(e,n)},t}()},444:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),r[t]||(r[t]=[]);for(var a=0;a<r[t].length;a++)if(r[t][a].h===n)return this;var s={h:n,query:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},l=r[t].length-1,u=r[t][l];return u&&u.callAtLast?r[t].splice(l,0,s):r[t].push(s),this},t.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},t.prototype.off=function(t,e){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,o=n[t].length;r<o;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],r=this._$eventProcessor;if(i)for(var o=e.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!r||!r.filter||null==l.query||r.filter(t,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return r&&r.afterTrigger&&r.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){if(!this._$handlers)return this;var e=this._$handlers[t],n=this._$eventProcessor;if(e)for(var i=arguments,r=i.length,o=i[r-1],a=e.length,s=0;s<a;s++){var l=e[s];if(!n||!n.filter||null==l.query||n.filter(t,l.query))switch(r){case 0:l.h.call(o);break;case 1:l.h.call(o,i[0]);break;case 2:l.h.call(o,i[0],i[1]);break;default:l.h.apply(o,i.slice(1,r-1))}}return n&&n.afterTrigger&&n.afterTrigger(t),this},t}()},4290:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>o});var i=function(t){this.value=t},r=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new i(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}();const o=function(){function t(t){this._list=new r,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,r=this._map,o=null;if(null==r[t]){var a=n.len(),s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var l=n.head;n.remove(l),delete r[l.key],o=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new i(e),s.key=t,n.insertEntry(s),r[t]=s}return o},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}()},8511:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(6),r=[0,0],o=[0,0],a=new i.Z,s=new i.Z;const l=function(){function t(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new i.Z;for(n=0;n<2;n++)this._axes[n]=new i.Z;t&&this.fromBoundingRect(t,e)}return t.prototype.fromBoundingRect=function(t,e){var n=this._corners,r=this._axes,o=t.x,a=t.y,s=o+t.width,l=a+t.height;if(n[0].set(o,a),n[1].set(s,a),n[2].set(s,l),n[3].set(o,l),e)for(var u=0;u<4;u++)n[u].transform(e);for(i.Z.sub(r[0],n[1],n[0]),i.Z.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize(),u=0;u<2;u++)this._origin[u]=r[u].dot(n[0])},t.prototype.intersect=function(t,e){var n=!0,r=!e;return a.set(1/0,1/0),s.set(0,0),!this._intersectCheckOneSide(this,t,a,s,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(t,this,a,s,r,-1)&&(n=!1,r)||r||i.Z.copy(e,n?a:s),n},t.prototype._intersectCheckOneSide=function(t,e,n,a,s,l){for(var u=!0,c=0;c<2;c++){var h=this._axes[c];if(this._getProjMinMaxOnAxis(c,t._corners,r),this._getProjMinMaxOnAxis(c,e._corners,o),r[1]<o[0]||r[0]>o[1]){if(u=!1,s)return u;var p=Math.abs(o[0]-r[1]),d=Math.abs(r[0]-o[1]);Math.min(p,d)>a.len()&&(p<d?i.Z.scale(a,h,-p*l):i.Z.scale(a,h,d*l))}else n&&(p=Math.abs(o[0]-r[1]),d=Math.abs(r[0]-o[1]),Math.min(p,d)<n.len()&&(p<d?i.Z.scale(n,h,p*l):i.Z.scale(n,h,-d*l)))}return u},t.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],r=this._origin,o=e[0].dot(i)+r[t],a=o,s=o,l=1;l<e.length;l++){var u=e[l].dot(i)+r[t];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},t}()},2397:(t,e,n)=>{"use strict";n.d(e,{Z:()=>F,L:()=>z});var i=n(213),r=n(9472),o=n(5080),a=n(3475),s=Math.min,l=Math.max,u=Math.sin,c=Math.cos,h=2*Math.PI,p=i.Ue(),d=i.Ue(),f=i.Ue();function g(t,e,n,i,r,o){r[0]=s(t,n),r[1]=s(e,i),o[0]=l(t,n),o[1]=l(e,i)}var v=[],y=[];function m(t,e,n,i,r,o,u,c,h,p){var d=a.pP,f=a.af,g=d(t,n,r,u,v);h[0]=1/0,h[1]=1/0,p[0]=-1/0,p[1]=-1/0;for(var m=0;m<g;m++){var _=f(t,n,r,u,v[m]);h[0]=s(_,h[0]),p[0]=l(_,p[0])}for(g=d(e,i,o,c,y),m=0;m<g;m++){var x=f(e,i,o,c,y[m]);h[1]=s(x,h[1]),p[1]=l(x,p[1])}h[0]=s(t,h[0]),p[0]=l(t,p[0]),h[0]=s(u,h[0]),p[0]=l(u,p[0]),h[1]=s(e,h[1]),p[1]=l(e,p[1]),h[1]=s(c,h[1]),p[1]=l(c,p[1])}function _(t,e,n,i,r,o,u,c){var h=a.QC,p=a.Zm,d=l(s(h(t,n,r),1),0),f=l(s(h(e,i,o),1),0),g=p(t,n,r,d),v=p(e,i,o,f);u[0]=s(t,r,g),u[1]=s(e,o,v),c[0]=l(t,r,g),c[1]=l(e,o,v)}function x(t,e,n,r,o,a,s,l,g){var v=i.VV,y=i.Fp,m=Math.abs(o-a);if(m%h<1e-4&&m>1e-4)return l[0]=t-n,l[1]=e-r,g[0]=t+n,void(g[1]=e+r);if(p[0]=c(o)*n+t,p[1]=u(o)*r+e,d[0]=c(a)*n+t,d[1]=u(a)*r+e,v(l,p,d),y(g,p,d),(o%=h)<0&&(o+=h),(a%=h)<0&&(a+=h),o>a&&!s?a+=h:o<a&&s&&(o+=h),s){var _=a;a=o,o=_}for(var x=0;x<a;x+=Math.PI/2)x>o&&(f[0]=c(x)*n+t,f[1]=u(x)*r+e,v(l,f,l),y(g,f,g))}var b={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},w=[],S=[],T=[],M=[],C=[],k=[],A=Math.min,I=Math.max,D=Math.cos,P=Math.sin,O=Math.sqrt,L=Math.abs,R=Math.PI,E=2*R,Z="undefined"!=typeof Float32Array,N=[];function B(t){return Math.round(t/R*1e8)/1e8%2*R}function z(t,e){var n=B(t[0]);n<0&&(n+=E);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=E?r=n+E:e&&n-r>=E?r=n-E:!e&&n>r?r=n+(E-B(n-r)):e&&n<r&&(r=n-(E-B(r-n))),t[0]=n,t[1]=r}const F=function(){function t(t){this.dpr=1,this._version=0,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}var e;return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,e,n){(n=n||0)>0&&(this._ux=L(n/o.KL/t)||0,this._uy=L(n/o.KL/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this.addData(b.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=L(t-this._xi)>this._ux||L(e-this._yi)>this._uy||this._len<5;return this.addData(b.L,t,e),this._ctx&&n&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this.addData(b.C,t,e,n,i,r,o),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(b.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){N[0]=i,N[1]=r,z(N,o),i=N[0];var a=(r=N[1])-i;return this.addData(b.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=D(r)*n+t,this._yi=P(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(b.R,t,e,n,i),this},t.prototype.closePath=function(){this.addData(b.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e,this._needsDash=!0}else this._lineDash=null,this._needsDash=!1;return this},t.prototype.setLineDashOffset=function(t){return this._dashOffset=t,this},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!Z||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},t.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;r<e;r++)n+=t[r].len();for(Z&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n)),r=0;r<e;r++)for(var o=t[r].data,a=0;a<o.length;a++)this.data[i++]=o[a];this._len=i},t.prototype.addData=function(t,e,n,i,r,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},t.prototype._dashedLineTo=function(t,e){var n,i,r=this._dashSum,o=this._lineDash,a=this._ctx,s=this._dashOffset,l=this._xi,u=this._yi,c=t-l,h=e-u,p=O(c*c+h*h),d=l,f=u,g=o.length;for(s<0&&(s=r+s),d-=(s%=r)*(c/=p),f-=s*(h/=p);c>0&&d<=t||c<0&&d>=t||0===c&&(h>0&&f<=e||h<0&&f>=e);)d+=c*(n=o[i=this._dashIdx]),f+=h*n,this._dashIdx=(i+1)%g,c>0&&d<l||c<0&&d>l||h>0&&f<u||h<0&&f>u||a[i%2?"moveTo":"lineTo"](c>=0?A(d,t):I(d,t),h>=0?A(f,e):I(f,e));c=d-t,h=f-e,this._dashOffset=-O(c*c+h*h)},t.prototype._dashedBezierTo=function(t,e,n,i,r,o){var s,l,u,c,h,p=this._ctx,d=this._dashSum,f=this._dashOffset,g=this._lineDash,v=this._xi,y=this._yi,m=0,_=this._dashIdx,x=g.length,b=0;for(f<0&&(f=d+f),f%=d,s=0;s<1;s+=.1)l=(0,a.af)(v,t,n,r,s+.1)-(0,a.af)(v,t,n,r,s),u=(0,a.af)(y,e,i,o,s+.1)-(0,a.af)(y,e,i,o,s),m+=O(l*l+u*u);for(;_<x&&!((b+=g[_])>f);_++);for(s=(b-f)/m;s<=1;)c=(0,a.af)(v,t,n,r,s),h=(0,a.af)(y,e,i,o,s),_%2?p.moveTo(c,h):p.lineTo(c,h),s+=g[_]/m,_=(_+1)%x;_%2!=0&&p.lineTo(r,o),l=r-c,u=o-h,this._dashOffset=-O(l*l+u*u)},t.prototype._dashedQuadraticTo=function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,o)},t.prototype.toStatic=function(){if(this._saveData){var t=this.data;t instanceof Array&&(t.length=this._len,Z&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){T[0]=T[1]=C[0]=C[1]=Number.MAX_VALUE,M[0]=M[1]=k[0]=k[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,o=0,a=0,s=0;for(t=0;t<this._len;){var l=e[t++],u=1===t;switch(u&&(a=n=e[t],s=o=e[t+1]),l){case b.M:n=a=e[t++],o=s=e[t++],C[0]=a,C[1]=s,k[0]=a,k[1]=s;break;case b.L:g(n,o,e[t],e[t+1],C,k),n=e[t++],o=e[t++];break;case b.C:m(n,o,e[t++],e[t++],e[t++],e[t++],e[t],e[t+1],C,k),n=e[t++],o=e[t++];break;case b.Q:_(n,o,e[t++],e[t++],e[t],e[t+1],C,k),n=e[t++],o=e[t++];break;case b.A:var c=e[t++],h=e[t++],p=e[t++],d=e[t++],f=e[t++],v=e[t++]+f;t+=1;var y=!e[t++];u&&(a=D(f)*p+c,s=P(f)*d+h),x(c,h,p,d,f,v,y,C,k),n=D(v)*p+c,o=P(v)*d+h;break;case b.R:g(a=n=e[t++],s=o=e[t++],a+e[t++],s+e[t++],C,k);break;case b.Z:n=a,o=s}i.VV(T,T,C),i.Fp(M,M,k)}return 0===t&&(T[0]=T[1]=M[0]=M[1]=0),new r.Z(T[0],T[1],M[0]-T[0],M[1]-T[1])},t.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=this._uy,r=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,h=0,p=0;p<e;){var d=t[p++],f=1===p;f&&(s=r=t[p],l=o=t[p+1]);var g=-1;switch(d){case b.M:r=s=t[p++],o=l=t[p++];break;case b.L:var v=t[p++],y=(x=t[p++])-o;(L(N=v-r)>n||L(y)>i||p===e-1)&&(g=Math.sqrt(N*N+y*y),r=v,o=x);break;case b.C:var m=t[p++],_=t[p++],x=(v=t[p++],t[p++]),w=t[p++],S=t[p++];g=(0,a.Ci)(r,o,m,_,v,x,w,S,10),r=w,o=S;break;case b.Q:m=t[p++],_=t[p++],v=t[p++],x=t[p++],g=(0,a.wQ)(r,o,m,_,v,x,10),r=v,o=x;break;case b.A:var T=t[p++],M=t[p++],C=t[p++],k=t[p++],O=t[p++],R=t[p++],Z=R+O;p+=1,t[p++],f&&(s=D(O)*C+T,l=P(O)*k+M),g=I(C,k)*A(E,Math.abs(R)),r=D(Z)*C+T,o=P(Z)*k+M;break;case b.R:s=r=t[p++],l=o=t[p++],g=2*t[p++]+2*t[p++];break;case b.Z:var N=s-r;y=l-o,g=Math.sqrt(N*N+y*y),r=s,o=l}g>=0&&(u[h++]=g,c+=g)}return this._pathLen=c,c},t.prototype.rebuildPath=function(t,e){var n,i,r,o,s,l,u,c,h=this.data,p=this._ux,d=this._uy,f=this._len,g=e<1,v=0,y=0;if(!g||(this._pathSegLen||this._calculateLength(),u=this._pathSegLen,c=e*this._pathLen))t:for(var m=0;m<f;){var _=h[m++],x=1===m;switch(x&&(n=r=h[m],i=o=h[m+1]),_){case b.M:n=r=h[m++],i=o=h[m++],t.moveTo(r,o);break;case b.L:if(s=h[m++],l=h[m++],L(s-r)>p||L(l-o)>d||m===f-1){if(g){if(v+(K=u[y++])>c){var T=(c-v)/K;t.lineTo(r*(1-T)+s*T,o*(1-T)+l*T);break t}v+=K}t.lineTo(s,l),r=s,o=l}break;case b.C:var M=h[m++],C=h[m++],k=h[m++],O=h[m++],R=h[m++],E=h[m++];if(g){if(v+(K=u[y++])>c){T=(c-v)/K,(0,a.Vz)(r,M,k,R,T,w),(0,a.Vz)(o,C,O,E,T,S),t.bezierCurveTo(w[1],S[1],w[2],S[2],w[3],S[3]);break t}v+=K}t.bezierCurveTo(M,C,k,O,R,E),r=R,o=E;break;case b.Q:if(M=h[m++],C=h[m++],k=h[m++],O=h[m++],g){if(v+(K=u[y++])>c){T=(c-v)/K,(0,a.Lx)(r,M,k,T,w),(0,a.Lx)(o,C,O,T,S),t.quadraticCurveTo(w[1],S[1],w[2],S[2]);break t}v+=K}t.quadraticCurveTo(M,C,k,O),r=k,o=O;break;case b.A:var Z=h[m++],N=h[m++],B=h[m++],z=h[m++],F=h[m++],W=h[m++],V=h[m++],H=!h[m++],U=B>z?B:z,G=L(B-z)>.001,X=F+W,Y=!1;if(g&&(v+(K=u[y++])>c&&(X=F+W*(c-v)/K,Y=!0),v+=K),G&&t.ellipse?t.ellipse(Z,N,B,z,V,F,X,H):t.arc(Z,N,U,F,X,H),Y)break t;x&&(n=D(F)*B+Z,i=P(F)*z+N),r=D(X)*B+Z,o=P(X)*z+N;break;case b.R:n=r=h[m],i=o=h[m+1],s=h[m++],l=h[m++];var j=h[m++],$=h[m++];if(g){if(v+(K=u[y++])>c){var q=c-v;t.moveTo(s,l),t.lineTo(s+A(q,j),l),(q-=j)>0&&t.lineTo(s+j,l+A(q,$)),(q-=$)>0&&t.lineTo(s+I(j-q,0),l+$),(q-=j)>0&&t.lineTo(s,l+I($-q,0));break t}v+=K}t.rect(s,l,j,$);break;case b.Z:if(g){var K;if(v+(K=u[y++])>c){T=(c-v)/K,t.lineTo(r*(1-T)+n*T,o*(1-T)+i*T);break t}v+=K}t.closePath(),r=n,o=i}}},t.CMD=b,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._needsDash=!1,e._dashOffset=0,e._dashIdx=0,e._dashSum=0,e._ux=0,void(e._uy=0)),t}()},6:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}()},4629:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(561),r=n(213),o=i.yR;function a(t){return t>5e-5||t<-5e-5}var s=[],l=[],u=i.Ue(),c=Math.abs;const h=function(){function t(){}var e;return t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return a(this.rotation)||a(this.x)||a(this.y)||a(this.scaleX-1)||a(this.scaleY-1)},t.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),r=this.transform;n||e?(r=r||i.Ue(),n?this.getLocalTransform(r):o(r),e&&(n?i.dC(r,t.transform,r):i.JG(r,t.transform)),this.transform=r,this._resolveGlobalScaleRatio(r)):r&&o(r)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(s);var n=s[0]<0?-1:1,r=s[1]<0?-1:1,o=((s[0]-n)*e+n)/s[0]||0,a=((s[1]-r)*e+r)/s[1]||0;t[0]*=o,t[1]*=o,t[2]*=a,t[3]*=a}this.invTransform=this.invTransform||i.Ue(),i.U_(this.invTransform,t)},t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3];a(e-1)&&(e=Math.sqrt(e)),a(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),this.rotation=Math.atan2(-t[1]/n,t[0]/e),e<0&&n<0&&(this.rotation+=Math.PI,e=-e,n=-n),this.x=t[4],this.y=t[5],this.scaleX=e,this.scaleY=n}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(i.dC(l,t.invTransform,e),e=l);var n=this.originX,r=this.originY;(n||r)&&(u[4]=n,u[5]=r,i.dC(l,e,u),l[4]-=n,l[5]-=r,e=l),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&r.Ne(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&r.Ne(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&c(t[0]-1)>1e-10&&c(t[3]-1)>1e-10?Math.sqrt(c(t[0]*t[3]-t[2]*t[1])):1},t.getLocalTransform=function(t,e){o(e=e||[]);var n=t.originX||0,r=t.originY||0,a=t.scaleX,s=t.scaleY,l=t.rotation||0,u=t.x,c=t.y;return e[4]-=n,e[5]-=r,e[0]*=a,e[1]*=s,e[2]*=a,e[3]*=s,e[4]*=a,e[5]*=s,l&&i.U1(e,e,l),e[4]+=n,e[5]+=r,e[4]+=u,e[5]+=c,e},t.initDefaultProps=((e=t.prototype).x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.originX=0,e.originY=0,e.rotation=0,void(e.globalScaleRatio=1)),t}()},3475:(t,e,n)=>{"use strict";n.d(e,{af:()=>f,X_:()=>g,kD:()=>v,pP:()=>y,Vz:()=>m,t1:()=>_,Ci:()=>x,Zm:()=>b,AZ:()=>w,Jz:()=>S,QC:()=>T,Lx:()=>M,Wr:()=>C,wQ:()=>k});var i=n(213),r=Math.pow,o=Math.sqrt,a=1e-4,s=o(3),l=1/3,u=(0,i.Ue)(),c=(0,i.Ue)(),h=(0,i.Ue)();function p(t){return t>-1e-8&&t<1e-8}function d(t){return t>1e-8||t<-1e-8}function f(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function g(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function v(t,e,n,i,a,u){var c=i+3*(e-n)-t,h=3*(n-2*e+t),d=3*(e-t),f=t-a,g=h*h-3*c*d,v=h*d-9*c*f,y=d*d-3*h*f,m=0;if(p(g)&&p(v))p(h)?u[0]=0:(I=-d/h)>=0&&I<=1&&(u[m++]=I);else{var _=v*v-4*g*y;if(p(_)){var x=v/g,b=-x/2;(I=-h/c+x)>=0&&I<=1&&(u[m++]=I),b>=0&&b<=1&&(u[m++]=b)}else if(_>0){var w=o(_),S=g*h+1.5*c*(-v+w),T=g*h+1.5*c*(-v-w);(I=(-h-((S=S<0?-r(-S,l):r(S,l))+(T=T<0?-r(-T,l):r(T,l))))/(3*c))>=0&&I<=1&&(u[m++]=I)}else{var M=(2*g*h-3*c*v)/(2*o(g*g*g)),C=Math.acos(M)/3,k=o(g),A=Math.cos(C),I=(-h-2*k*A)/(3*c),D=(b=(-h+k*(A+s*Math.sin(C)))/(3*c),(-h+k*(A-s*Math.sin(C)))/(3*c));I>=0&&I<=1&&(u[m++]=I),b>=0&&b<=1&&(u[m++]=b),D>=0&&D<=1&&(u[m++]=D)}}return m}function y(t,e,n,i,r){var a=6*n-12*e+6*t,s=9*e+3*i-3*t-9*n,l=3*e-3*t,u=0;if(p(s))d(a)&&(h=-l/a)>=0&&h<=1&&(r[u++]=h);else{var c=a*a-4*s*l;if(p(c))r[0]=-a/(2*s);else if(c>0){var h,f=o(c),g=(-a-f)/(2*s);(h=(-a+f)/(2*s))>=0&&h<=1&&(r[u++]=h),g>=0&&g<=1&&(r[u++]=g)}}return u}function m(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,c=(l-s)*r+s,h=(c-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=i}function _(t,e,n,r,s,l,p,d,g,v,y){var m,_,x,b,w,S=.005,T=1/0;u[0]=g,u[1]=v;for(var M=0;M<1;M+=.05)c[0]=f(t,n,s,p,M),c[1]=f(e,r,l,d,M),(b=(0,i.WU)(u,c))<T&&(m=M,T=b);T=1/0;for(var C=0;C<32&&!(S<a);C++)_=m-S,x=m+S,c[0]=f(t,n,s,p,_),c[1]=f(e,r,l,d,_),b=(0,i.WU)(c,u),_>=0&&b<T?(m=_,T=b):(h[0]=f(t,n,s,p,x),h[1]=f(e,r,l,d,x),w=(0,i.WU)(h,u),x<=1&&w<T?(m=x,T=w):S*=.5);return y&&(y[0]=f(t,n,s,p,m),y[1]=f(e,r,l,d,m)),o(T)}function x(t,e,n,i,r,o,a,s,l){for(var u=t,c=e,h=0,p=1/l,d=1;d<=l;d++){var g=d*p,v=f(t,n,r,a,g),y=f(e,i,o,s,g),m=v-u,_=y-c;h+=Math.sqrt(m*m+_*_),u=v,c=y}return h}function b(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function w(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function S(t,e,n,i,r){var a=t-2*e+n,s=2*(e-t),l=t-i,u=0;if(p(a))d(s)&&(h=-l/s)>=0&&h<=1&&(r[u++]=h);else{var c=s*s-4*a*l;if(p(c))(h=-s/(2*a))>=0&&h<=1&&(r[u++]=h);else if(c>0){var h,f=o(c),g=(-s-f)/(2*a);(h=(-s+f)/(2*a))>=0&&h<=1&&(r[u++]=h),g>=0&&g<=1&&(r[u++]=g)}}return u}function T(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function M(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function C(t,e,n,r,s,l,p,d,f){var g,v=.005,y=1/0;u[0]=p,u[1]=d;for(var m=0;m<1;m+=.05)c[0]=b(t,n,s,m),c[1]=b(e,r,l,m),(S=(0,i.WU)(u,c))<y&&(g=m,y=S);y=1/0;for(var _=0;_<32&&!(v<a);_++){var x=g-v,w=g+v;c[0]=b(t,n,s,x),c[1]=b(e,r,l,x);var S=(0,i.WU)(c,u);if(x>=0&&S<y)g=x,y=S;else{h[0]=b(t,n,s,w),h[1]=b(e,r,l,w);var T=(0,i.WU)(h,u);w<=1&&T<y?(g=w,y=T):v*=.5}}return f&&(f[0]=b(t,n,s,g),f[1]=b(e,r,l,g)),o(y)}function k(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,c=1/a,h=1;h<=a;h++){var p=h*c,d=b(t,n,r,p),f=b(e,i,o,p),g=d-s,v=f-l;u+=Math.sqrt(g*g+v*v),s=d,l=f}return u}},9186:(t,e,n)=>{"use strict";n.d(e,{UK:()=>c,A4:()=>u,YB:()=>l});var i=n(8781),r=Math.log(2);function o(t,e,n,i,a,s){var l=i+"-"+a,u=t.length;if(s.hasOwnProperty(l))return s[l];if(1===e){var c=Math.round(Math.log((1<<u)-1&~a)/r);return t[n][c]}for(var h=i|1<<n,p=n+1;i&1<<p;)p++;for(var d=0,f=0,g=0;f<u;f++){var v=1<<f;v&a||(d+=(g%2?-1:1)*t[n][f]*o(t,e-1,p,h,a|v,s),g++)}return s[l]=d,d}function a(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},r=o(n,8,0,0,0,i);if(0!==r){for(var a=[],s=0;s<8;s++)for(var l=0;l<8;l++)null==a[l]&&(a[l]=0),a[l]+=((s+l)%2?-1:1)*o(n,7,0===s?1:0,1<<s,1<<l,i)/r*e[s];return function(t,e,n){var i=e*a[6]+n*a[7]+1;t[0]=(e*a[0]+n*a[1]+a[2])/i,t[1]=(e*a[3]+n*a[4]+a[5])/i}}}var s=[];function l(t,e,n,i,r){return u(s,e,i,r,!0)&&u(t,n,s[0],s[1])}function u(t,e,n,r,o){if(e.getBoundingClientRect&&i.Z.domSupported&&!c(e)){var s=e.___zrEVENTSAVED||(e.___zrEVENTSAVED={}),l=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,s=[],l=[],u=!0,c=0;c<4;c++){var h=t[c].getBoundingClientRect(),p=2*c,d=h.left,f=h.top;s.push(d,f),u=u&&o&&d===o[p]&&f===o[p+1],l.push(t[c].offsetLeft,t[c].offsetTop)}return u&&r?r:(e.srcCoords=s,e[i]=n?a(l,s):a(s,l))}(function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],r=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,l=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,s),s,o);if(l)return l(t,n,r),!0}return!1}function c(t){return"CANVAS"===t.nodeName.toUpperCase()}},8781:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.weChat=!1},r=new function(){this.browser=new i,this.node=!1,this.wxa=!1,this.worker=!1,this.canvasSupported=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.canvasSupported=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?(r.worker=!0,r.canvasSupported=!0):"undefined"==typeof navigator?(r.node=!0,r.canvasSupported=!0,r.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1]),a&&(n.weChat=!0),e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document}(navigator.userAgent,r);const o=r},3837:(t,e,n)=>{"use strict";n.d(e,{eV:()=>l,iP:()=>c,OD:()=>h,Oo:()=>p,xg:()=>d,sT:()=>f}),n(444);var i=n(8781),r=n(9186),o="undefined"!=typeof window&&!!window.addEventListener,a=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,s=[];function l(t,e,n,r){return n=n||{},r||!i.Z.canvasSupported?u(t,e,n):i.Z.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):u(t,e,n),n}function u(t,e,n){if(i.Z.domSupported&&t.getBoundingClientRect){var o=e.clientX,a=e.clientY;if((0,r.UK)(t)){var l=t.getBoundingClientRect();return n.zrX=o-l.left,void(n.zrY=a-l.top)}if((0,r.A4)(s,t,o,a))return n.zrX=s[0],void(n.zrY=s[1])}n.zrX=n.zrY=0}function c(t){return t||window.event}function h(t,e,n){if(null!=(e=c(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&l(t,r,e,n)}else{l(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;return null==n||null==i?e:3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var s=e.button;return null==e.which&&void 0!==s&&a.test(e.type)&&(e.which=1&s?1:2&s?3:4&s?2:0),e}function p(t,e,n,i){o?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}function d(t,e,n,i){o?t.removeEventListener(e,n,i):t.detachEvent("on"+e,n)}var f=o?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0}},561:(t,e,n)=>{"use strict";function i(){return[1,0,0,1,0,0]}function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function a(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function s(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function l(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),c=Math.cos(n);return t[0]=i*c+a*u,t[1]=-i*u+a*c,t[2]=r*c+s*u,t[3]=-r*u+c*s,t[4]=c*o+u*l,t[5]=c*l-u*o,t}function u(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function c(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}n.d(e,{Ue:()=>i,yR:()=>r,JG:()=>o,dC:()=>a,Iu:()=>s,U1:()=>l,bA:()=>u,U_:()=>c})},8778:(t,e,n)=>{"use strict";n.d(e,{v9:()=>f,M8:()=>v,H:()=>y,d9:()=>m,TS:()=>_,l7:()=>x,ce:()=>b,vL:()=>w,cq:()=>S,XW:()=>T,jB:()=>M,zG:()=>C,S6:()=>k,UI:()=>A,u4:()=>I,hX:()=>D,XP:()=>P,ak:()=>O,WA:()=>L,kJ:()=>R,mf:()=>E,HD:()=>Z,cd:()=>N,hj:()=>B,Kn:()=>z,fU:()=>W,Mh:()=>V,Qq:()=>H,wo:()=>U,Bu:()=>G,Jv:()=>X,pD:()=>Y,R1:()=>j,tP:()=>$,MY:()=>q,hu:()=>K,fy:()=>J,s7:()=>tt,kW:()=>it,nW:()=>rt,RI:()=>ot,ZT:()=>at});var i={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},r={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},o=Object.prototype.toString,a=Array.prototype,s=a.forEach,l=a.filter,u=a.slice,c=a.map,h=function(){}.constructor,p=h?h.prototype:null,d={};function f(t,e){d[t]=e}var g=2311;function v(){return g++}function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function m(t){if(null==t||"object"!=typeof t)return t;var e=t,n=o.call(t);if("[object Array]"===n){if(!et(t)){e=[];for(var a=0,s=t.length;a<s;a++)e[a]=m(t[a])}}else if(r[n]){if(!et(t)){var l=t.constructor;if(l.from)e=l.from(t);else for(e=new l(t.length),a=0,s=t.length;a<s;a++)e[a]=m(t[a])}}else if(!i[n]&&!et(t)&&!V(t))for(var u in e={},t)t.hasOwnProperty(u)&&(e[u]=m(t[u]));return e}function _(t,e,n){if(!z(e)||!z(t))return n?m(e):t;for(var i in e)if(e.hasOwnProperty(i)){var r=t[i],o=e[i];!z(o)||!z(r)||R(o)||R(r)||V(o)||V(r)||F(o)||F(r)||et(o)||et(r)?!n&&i in t||(t[i]=m(e[i])):_(r,o,n)}return t}function x(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function b(t,e,n){for(var i=P(e),r=0;r<i.length;r++){var o=i[r];(n?null!=e[o]:null==t[o])&&(t[o]=e[o])}return t}var w=function(){return d.createCanvas()};function S(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function T(t,e){var n=t.prototype;function i(){}for(var r in i.prototype=e.prototype,t.prototype=new i,n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r]);t.prototype.constructor=t,t.superClass=e}function M(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;r<i.length;r++){var o=i[r];"constructor"!==o&&(n?null!=e[o]:null==t[o])&&(t[o]=e[o])}else b(t,e,n)}function C(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function k(t,e,n){if(t&&e)if(t.forEach&&t.forEach===s)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;i<r;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function A(t,e,n){if(!t)return[];if(!e)return $(t);if(t.map&&t.map===c)return t.map(e,n);for(var i=[],r=0,o=t.length;r<o;r++)i.push(e.call(n,t[r],r,t));return i}function I(t,e,n,i){if(t&&e){for(var r=0,o=t.length;r<o;r++)n=e.call(i,n,t[r],r,t);return n}}function D(t,e,n){if(!t)return[];if(!e)return $(t);if(t.filter&&t.filter===l)return t.filter(e,n);for(var i=[],r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}function P(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}d.createCanvas=function(){return document.createElement("canvas")};var O=p&&E(p.bind)?p.call.bind(p.bind):function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return t.apply(e,n.concat(u.call(arguments)))}};function L(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(u.call(arguments)))}}function R(t){return Array.isArray?Array.isArray(t):"[object Array]"===o.call(t)}function E(t){return"function"==typeof t}function Z(t){return"string"==typeof t}function N(t){return"[object String]"===o.call(t)}function B(t){return"number"==typeof t}function z(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function F(t){return!!i[o.call(t)]}function W(t){return!!r[o.call(t)]}function V(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function H(t){return null!=t.colorStops}function U(t){return null!=t.image}function G(t){return t!=t}function X(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t.length;n<i;n++)if(null!=t[n])return t[n]}function Y(t,e){return null!=t?t:e}function j(t,e,n){return null!=t?t:null!=e?e:n}function $(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return u.apply(t,e)}function q(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function K(t,e){if(!t)throw new Error(e)}function J(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Q="__ec_primitive__";function tt(t){t[Q]=!0}function et(t){return t[Q]}var nt=function(){function t(e){this.data={};var n=R(e);this.data={};var i=this;function r(t,e){n?i.set(t,e):i.set(e,t)}e instanceof t?e.each(r):e&&k(e,r)}return t.prototype.get=function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},t.prototype.set=function(t,e){return this.data[t]=e},t.prototype.each=function(t,e){for(var n in this.data)this.data.hasOwnProperty(n)&&t.call(e,this.data[n],n)},t.prototype.keys=function(){return P(this.data)},t.prototype.removeKey=function(t){delete this.data[t]},t}();function it(t){return new nt(t)}function rt(t,e){var n;if(Object.create)n=Object.create(t);else{var i=function(){};i.prototype=t,n=new i}return e&&x(n,e),n}function ot(t,e){return t.hasOwnProperty(e)}function at(){}},213:(t,e,n)=>{"use strict";function i(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function r(t){return[t[0],t[1]]}function o(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function s(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function l(t,e){var n=function(t){return Math.sqrt(function(t){return t[0]*t[0]+t[1]*t[1]}(t))}(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function u(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}n.d(e,{Ue:()=>i,d9:()=>r,IH:()=>o,lu:()=>a,bA:()=>s,Fv:()=>l,TE:()=>u,TK:()=>c,WU:()=>h,t7:()=>p,Ne:()=>d,VV:()=>f,Fp:()=>g});var c=u,h=function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])};function p(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function d(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function f(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function g(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}},8234:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(9312),r=n(391);const o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return(0,i.ZT)(e,t),e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n<t.length;n++)e=e||t[n].shapeChanged();e&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),r.ZP.prototype.getBoundingRect.call(this)},e}(r.ZP)},400:(t,e,n)=>{"use strict";n.d(e,{tj:()=>l,ik:()=>u,ZP:()=>f});var i=n(9312),r=n(8073),o=n(9472),a=n(8778),s="__zr_style_"+Math.round(10*Math.random()),l={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},u={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};l[s]=!0;var c=["z","z2","invisible"],h=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype._init=function(e){for(var n=(0,a.XP)(e),i=0;i<n.length;i++){var r=n[i];"style"===r?this.useStyle(e[r]):t.prototype.attrKV.call(this,r,e[r])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,e,n,i){var r,o,a,s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(r=this,o=t,a=e,p.copy(r.getBoundingRect()),r.transform&&p.applyTransform(r.transform),d.width=o,d.height=a,!p.intersect(d))||s&&!s[0]&&!s[3])return!1;if(n&&this.__clipPaths)for(var l=0;l<this.__clipPaths.length;++l)if(this.__clipPaths[l].isZeroArea())return!1;if(i&&this.parent)for(var u=this.parent;u;){if(u.ignore)return!1;u=u.parent}return!0},e.prototype.contain=function(t,e){return this.rectContain(t,e)},e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.rectContain=function(t,e){var n=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(n[0],n[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var e=this.transform,n=this.getBoundingRect(),i=this.style,r=i.shadowBlur||0,a=i.shadowOffsetX||0,s=i.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new o.Z(0,0,0,0)),e?o.Z.applyTransform(t,n,e):t.copy(n),(r||a||s)&&(t.width+=2*r+Math.abs(a),t.height+=2*r+Math.abs(s),t.x=Math.min(t.x,t.x+a-r),t.y=Math.min(t.y,t.y+s-r));var l=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-l),t.y=Math.floor(t.y-l),t.width=Math.ceil(t.width+1+2*l),t.height=Math.ceil(t.height+1+2*l))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new o.Z(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(e,n){"style"!==e?t.prototype.attrKV.call(this,e,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:(0,a.l7)(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(){this.markRedraw(),this.__dirty|=e.STYLE_CHANGED_BIT,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&e.STYLE_CHANGED_BIT)},e.prototype.styleUpdated=function(){this.__dirty&=~e.STYLE_CHANGED_BIT},e.prototype.createStyle=function(t){return(0,a.nW)(l,t)},e.prototype.useStyle=function(t){t[s]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[s]},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,n,c)},e.prototype._applyStateObj=function(e,n,i,r,o,s){t.prototype._applyStateObj.call(this,e,n,i,r,o,s);var l,u=!(n&&r);if(n&&n.style?o?r?l=n.style:(l=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),r?this.style:i.style),this._mergeStyle(l,n.style)):u&&(l=i.style),l)if(o){var h=this.style;if(this.style=this.createStyle(u?{}:h),u)for(var p=(0,a.XP)(h),d=0;d<p.length;d++)(g=p[d])in l&&(l[g]=l[g],this.style[g]=h[g]);var f=(0,a.XP)(l);for(d=0;d<f.length;d++){var g=f[d];this.style[g]=this.style[g]}this._transitionState(e,{style:l},s,this.getAnimationStyleProps())}else this.useStyle(l);for(d=0;d<c.length;d++)g=c[d],n&&null!=n[g]?this[g]=n[g]:u&&null!=i[g]&&(this[g]=i[g])},e.prototype._mergeStates=function(e){for(var n,i=t.prototype._mergeStates.call(this,e),r=0;r<e.length;r++){var o=e[r];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(i.style=n),i},e.prototype._mergeStyle=function(t,e){return(0,a.l7)(t,e),t},e.prototype.getAnimationStyleProps=function(){return u},e.STYLE_CHANGED_BIT=2,e.initDefaultProps=((n=e.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=r.Z.REDARAW_BIT|e.STYLE_CHANGED_BIT)),e}(r.Z),p=new o.Z(0,0,0,0),d=new o.Z(0,0,0,0);const f=h},8387:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},t}()},6454:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(9312),r=n(8778),o=n(8073),a=n(9472),s=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){if(t&&(t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),t.__hostTarget))throw"This elemenet has been used as an attachment";return this},e.prototype.addBefore=function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var n=this._children,i=n.indexOf(e);i>=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=r.cq(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n<t.length;n++){var i=t[n];e&&i.removeSelfFromZr(e),i.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,e){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];t.call(e,r,i)}return this},e.prototype.traverse=function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n],r=t.call(e,i);i.isGroup&&!r&&i.traverse(t,e)}return this},e.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(e)},e.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(e)},e.prototype.getBoundingRect=function(t){for(var e=new a.Z(0,0,0,0),n=t||this._children,i=[],r=null,o=0;o<n.length;o++){var s=n[o];if(!s.ignore&&!s.invisible){var l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(a.Z.applyTransform(e,l,u),(r=r||e.clone()).union(e)):(r=r||l.clone()).union(l)}}return r||e},e}(o.Z);s.prototype.type="group";const l=s},6781:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>c});var i=n(9312),r=n(400),o=n(9472),a=n(8778),s=(0,a.ce)({x:0,y:0},r.tj),l={style:(0,a.ce)({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},r.ik.style)},u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.createStyle=function(t){return(0,a.nW)(s,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return l},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new o.Z(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(r.ZP);u.prototype.type="image";const c=u},2012:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(400),o=n(9472),a=[];const s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return(0,i.ZT)(e,t),e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new o.Z(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(a)),t.union(i)}this._rect=t}return this._rect},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++)if(this._displayables[i].contain(t,e))return!0;return!1},e}(r.ZP)},5853:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(9312);const r=function(t){function e(e,n,i,r,o,a){var s=t.call(this,o)||this;return s.x=null==e?0:e,s.y=null==n?0:n,s.x2=null==i?1:i,s.y2=null==r?0:r,s.type="linear",s.global=a||!1,s}return(0,i.ZT)(e,t),e}(n(8387).Z)},391:(t,e,n)=>{"use strict";n.d(e,{$t:()=>C,ZP:()=>I});var i=n(9312),r=n(400),o=n(8073),a=n(2397);function s(t,e,n,i,r,o,a){if(0===r)return!1;var s,l=r;if(a>e+l&&a>i+l||a<e-l&&a<i-l||o>t+l&&o>n+l||o<t-l&&o<n-l)return!1;if(t===n)return Math.abs(o-t)<=l/2;var u=(s=(e-i)/(t-n))*o-a+(t*i-n*e)/(t-n);return u*u/(s*s+1)<=l/2*l/2}var l=n(3475);function u(t,e,n,i,r,o,a,s,u,c,h){if(0===u)return!1;var p=u;return!(h>e+p&&h>i+p&&h>o+p&&h>s+p||h<e-p&&h<i-p&&h<o-p&&h<s-p||c>t+p&&c>n+p&&c>r+p&&c>a+p||c<t-p&&c<n-p&&c<r-p&&c<a-p)&&l.t1(t,e,n,i,r,o,a,s,c,h,null)<=p/2}function c(t,e,n,i,r,o,a,s,u){if(0===a)return!1;var c=a;return!(u>e+c&&u>i+c&&u>o+c||u<e-c&&u<i-c&&u<o-c||s>t+c&&s>n+c&&s>r+c||s<t-c&&s<n-c&&s<r-c)&&(0,l.Wr)(t,e,n,i,r,o,s,u,null)<=c/2}var h=n(7096),p=2*Math.PI;function d(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;s-=t,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(i-r)%p<1e-4)return!0;if(o){var d=i;i=(0,h.m)(r),r=(0,h.m)(d)}else i=(0,h.m)(i),r=(0,h.m)(r);i>r&&(r+=p);var f=Math.atan2(l,s);return f<0&&(f+=p),f>=i&&f<=r||f+p>=i&&f+p<=r}function f(t,e,n,i,r,o){if(o>e&&o>i||o<e&&o<i)return 0;if(i===e)return 0;var a=(o-e)/(i-e),s=i<e?1:-1;1!==a&&0!==a||(s=i<e?.5:-.5);var l=a*(n-t)+t;return l===r?1/0:l>r?s:0}var g=a.Z.CMD,v=2*Math.PI,y=[-1,-1,-1],m=[-1,-1];function _(t,e,n,i,r,o,a,s,u,c){if(c>e&&c>i&&c>o&&c>s||c<e&&c<i&&c<o&&c<s)return 0;var h,p=l.kD(e,i,o,s,c,y);if(0===p)return 0;for(var d=0,f=-1,g=void 0,v=void 0,_=0;_<p;_++){var x=y[_],b=0===x||1===x?.5:1;l.af(t,n,r,a,x)<u||(f<0&&(f=l.pP(e,i,o,s,m),m[1]<m[0]&&f>1&&(void 0,h=m[0],m[0]=m[1],m[1]=h),g=l.af(e,i,o,s,m[0]),f>1&&(v=l.af(e,i,o,s,m[1]))),2===f?x<m[0]?d+=g<e?b:-b:x<m[1]?d+=v<g?b:-b:d+=s<v?b:-b:x<m[0]?d+=g<e?b:-b:d+=s<g?b:-b)}return d}function x(t,e,n,i,r,o,a,s){if(s>e&&s>i&&s>o||s<e&&s<i&&s<o)return 0;var u=l.Jz(e,i,o,s,y);if(0===u)return 0;var c=l.QC(e,i,o);if(c>=0&&c<=1){for(var h=0,p=l.Zm(e,i,o,c),d=0;d<u;d++){var f=0===y[d]||1===y[d]?.5:1;l.Zm(t,n,r,y[d])<a||(y[d]<c?h+=p<e?f:-f:h+=o<p?f:-f)}return h}return f=0===y[0]||1===y[0]?.5:1,l.Zm(t,n,r,y[0])<a?0:o<e?f:-f}function b(t,e,n,i,r,o,a,s){if((s-=e)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);y[0]=-l,y[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=v-1e-4){i=0,r=v;var c=o?1:-1;return a>=y[0]+t&&a<=y[1]+t?c:0}if(i>r){var h=i;i=r,r=h}i<0&&(i+=v,r+=v);for(var p=0,d=0;d<2;d++){var f=y[d];if(f+t>a){var g=Math.atan2(s,f);c=o?1:-1,g<0&&(g=v+g),(g>=i&&g<=r||g+v>=i&&g+v<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),p+=c)}}return p}function w(t,e,n,i,r){for(var o,a,l,h,p=t.data,v=t.len(),y=0,m=0,w=0,S=0,T=0,M=0;M<v;){var C=p[M++],k=1===M;switch(C===g.M&&M>1&&(n||(y+=f(m,w,S,T,i,r))),k&&(S=m=p[M],T=w=p[M+1]),C){case g.M:m=S=p[M++],w=T=p[M++];break;case g.L:if(n){if(s(m,w,p[M],p[M+1],e,i,r))return!0}else y+=f(m,w,p[M],p[M+1],i,r)||0;m=p[M++],w=p[M++];break;case g.C:if(n){if(u(m,w,p[M++],p[M++],p[M++],p[M++],p[M],p[M+1],e,i,r))return!0}else y+=_(m,w,p[M++],p[M++],p[M++],p[M++],p[M],p[M+1],i,r)||0;m=p[M++],w=p[M++];break;case g.Q:if(n){if(c(m,w,p[M++],p[M++],p[M],p[M+1],e,i,r))return!0}else y+=x(m,w,p[M++],p[M++],p[M],p[M+1],i,r)||0;m=p[M++],w=p[M++];break;case g.A:var A=p[M++],I=p[M++],D=p[M++],P=p[M++],O=p[M++],L=p[M++];M+=1;var R=!!(1-p[M++]);o=Math.cos(O)*D+A,a=Math.sin(O)*P+I,k?(S=o,T=a):y+=f(m,w,o,a,i,r);var E=(i-A)*P/D+A;if(n){if(d(A,I,P,O,O+L,R,e,E,r))return!0}else y+=b(A,I,P,O,O+L,R,E,r);m=Math.cos(O+L)*D+A,w=Math.sin(O+L)*P+I;break;case g.R:if(S=m=p[M++],T=w=p[M++],o=S+p[M++],a=T+p[M++],n){if(s(S,T,o,T,e,i,r)||s(o,T,o,a,e,i,r)||s(o,a,S,a,e,i,r)||s(S,a,S,T,e,i,r))return!0}else y+=f(o,T,o,a,i,r),y+=f(S,a,S,T,i,r);break;case g.Z:if(n){if(s(m,w,S,T,e,i,r))return!0}else y+=f(m,w,S,T,i,r);m=S,w=T}}return n||(l=w,h=T,Math.abs(l-h)<1e-4)||(y+=f(m,w,S,T,i,r)||0),0!==y}var S=n(8778),T=n(1756),M=n(5080),C=(0,S.ce)({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},r.tj),k={style:(0,S.ce)({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},r.ik.style)},A=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"];const I=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var a=r.style;for(var s in i)a[s]!==i[s]&&(a[s]=i[s]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var l=0;l<A.length;++l)r[A[l]]=this[A[l]];r.__dirty|=o.Z.REDARAW_BIT}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(e){var n=(0,S.XP)(e);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var r=0;r<n.length;r++){var o=n[r],a=e[o];"style"===o?this.style?(0,S.l7)(this.style,a):this.useStyle(a):"shape"===o?(0,S.l7)(this.shape,a):t.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if((0,S.HD)(t)){var e=(0,T.L0)(t,0);return e>.5?M.vU:e>.2?M.iv:M.GD}if(t)return M.GD}return M.vU},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if((0,S.HD)(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())==(0,T.L0)(t,0)<M.Ak)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=~e.SHAPE_CHANGED_BIT},e.prototype.createPathProxy=function(){this.path=new a.Z(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||this.__dirty&e.SHAPE_CHANGED_BIT)&&(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 a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var s=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var u=this.strokeContainThreshold;l=Math.max(l,null==u?4:u)}s>1e-10&&(a.width+=l/s,a.height+=l/s,a.x-=l/s/2,a.y-=l/s/2)}return a}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return w(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return w(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=e.SHAPE_CHANGED_BIT,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){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:(0,S.l7)(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&e.SHAPE_CHANGED_BIT)},e.prototype.createStyle=function(t){return(0,S.nW)(C,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=(0,S.l7)({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=(0,S.l7)({},i.shape),(0,S.l7)(s,n.shape)):(s=(0,S.l7)({},r?this.shape:i.shape),(0,S.l7)(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=(0,S.l7)({},this.shape);for(var u={},c=(0,S.XP)(s),h=0;h<c.length;h++){var p=c[h];"object"==typeof s[p]?this.shape[p]=s[p]:u[p]=s[p]}this._transitionState(e,{shape:u},a)}else this.shape=s,this.dirtyShape()},e.prototype._mergeStates=function(e){for(var n,i=t.prototype._mergeStates.call(this,e),r=0;r<e.length;r++){var o=e[r];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(i.shape=n),i},e.prototype.getAnimationStyleProps=function(){return k},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var n=function(e){function n(n){var i=e.call(this,n)||this;return t.init&&t.init.call(i,n),i}return(0,i.ZT)(n,e),n.prototype.getDefaultStyle=function(){return(0,S.d9)(t.style)},n.prototype.getDefaultShape=function(){return(0,S.d9)(t.shape)},n}(e);for(var r in t)"function"==typeof t[r]&&(n.prototype[r]=t[r]);return n},e.SHAPE_CHANGED_BIT=4,e.initDefaultProps=((n=e.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=o.Z.REDARAW_BIT|r.ZP.STYLE_CHANGED_BIT|e.SHAPE_CHANGED_BIT)),e}(r.ZP)},2763:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(9312);const r=function(t){function e(e,n,i,r,o){var a=t.call(this,r)||this;return a.x=null==e?.5:e,a.y=null==n?.5:n,a.r=null==i?.5:i,a.type="radial",a.global=o||!1,a}return(0,i.ZT)(e,t),e}(n(8387).Z)},9882:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(9312),r=n(400),o=n(9356),a=n(391),s=n(8778),l=(0,s.ce)({strokeFirst:!0,font:o.Uo,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},a.$t),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return(0,s.nW)(l,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=(0,o.lP)(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(r.ZP);u.prototype.type="tspan";const c=u},4239:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>S});var i=n(9312),r=n(3146),o=n(9882),a=n(8778),s=n(9356),l=n(6781),u=n(230),c=n(9472),h=n(561),p=n(400),d={fill:"#000"},f={style:(0,a.ce)({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},p.ik.style)},g=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=d,n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var n=this._children[e];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}var i=this.attachedTransform;if(i){i.updateTransform();var r=i.transform;r?(this.transform=this.transform||[],(0,h.JG)(this.transform,r)):this.transform=null}else t.prototype.update.call(this)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),this.attachedTransform?this.attachedTransform.getComputedTransform():t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){var t;this._childCursor=0,m(t=this.style),(0,a.S6)(t.rich,m),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=e},e.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new c.Z(0,0,0,0),e=this._children,n=[],i=null,r=0;r<e.length;r++){var o=e[r],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(t.copy(a),t.applyTransform(s),(i=i||t.clone()).union(t)):(i=i||a.clone()).union(a)}this._rect=i||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||d},e.prototype.setTextContent=function(t){throw new Error("Can't attach text on another text")},e.prototype._mergeStyle=function(t,e){if(!e)return t;var n=e.rich,i=t.rich||n&&{};return(0,a.l7)(t,e),n&&i?(this._mergeRich(i,n),t.rich=i):i&&(t.rich=i),t},e.prototype._mergeRich=function(t,e){for(var n=(0,a.XP)(e),i=0;i<n.length;i++){var r=n[i];t[r]=t[r]||{},(0,a.l7)(t[r],e[r])}},e.prototype.getAnimationStyleProps=function(){return f},e.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),this._children[this._childCursor++]=e,e.__zr=this.__zr,e.parent=this,e},e.prototype._updatePlainTexts=function(){var t=this.style,e=t.font||s.Uo,n=t.padding,i=b(t),a=(0,r.NY)(i,t),l=w(t),u=!!t.backgroundColor,h=a.outerHeight,p=a.lines,d=a.lineHeight,f=this._defaultStyle,g=t.x||0,v=t.y||0,y=t.align||f.align||"left",m=t.verticalAlign||f.verticalAlign||"top",S=g,T=(0,s.mU)(v,a.contentHeight,m);if(l||n){var M=a.width;n&&(M+=n[1]+n[3]);var C=(0,s.M3)(g,M,y),k=(0,s.mU)(v,h,m);l&&this._renderBackground(t,t,C,k,M,h)}T+=d/2,n&&(S=x(g,y,n),"top"===m?T+=n[0]:"bottom"===m&&(T-=n[2]));for(var A,I=0,D=!1,P=(null==(A="fill"in t?t.fill:(D=!0,f.fill))||"none"===A?null:A.image||A.colorStops?"#000":A),O=(_("stroke"in t?t.stroke:u||f.autoStroke&&!D?null:(I=2,f.stroke))),L=t.textShadowBlur>0,R=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),E=a.calculatedLineHeight,Z=0;Z<p.length;Z++){var N=this._getOrCreateChild(o.Z),B=N.createStyle();N.useStyle(B),B.text=p[Z],B.x=S,B.y=T,y&&(B.textAlign=y),B.textBaseline="middle",B.opacity=t.opacity,B.strokeFirst=!0,L&&(B.shadowBlur=t.textShadowBlur||0,B.shadowColor=t.textShadowColor||"transparent",B.shadowOffsetX=t.textShadowOffsetX||0,B.shadowOffsetY=t.textShadowOffsetY||0),O&&(B.stroke=O,B.lineWidth=t.lineWidth||I,B.lineDash=t.lineDash,B.lineDashOffset=t.lineDashOffset||0),P&&(B.fill=P),B.font=e,T+=d,R&&N.setBoundingRect(new c.Z((0,s.M3)(B.x,t.width,B.textAlign),(0,s.mU)(B.y,E,B.textBaseline),t.width,E))}},e.prototype._updateRichTexts=function(){var t=this.style,e=b(t),n=(0,r.$F)(e,t),i=n.width,o=n.outerWidth,a=n.outerHeight,l=t.padding,u=t.x||0,c=t.y||0,h=this._defaultStyle,p=t.align||h.align,d=t.verticalAlign||h.verticalAlign,f=(0,s.M3)(u,o,p),g=(0,s.mU)(c,a,d),v=f,y=g;l&&(v+=l[3],y+=l[0]);var m=v+i;w(t)&&this._renderBackground(t,t,f,g,o,a);for(var _=!!t.backgroundColor,x=0;x<n.lines.length;x++){for(var S=n.lines[x],T=S.tokens,M=T.length,C=S.lineHeight,k=S.width,A=0,I=v,D=m,P=M-1,O=void 0;A<M&&(!(O=T[A]).align||"left"===O.align);)this._placeToken(O,t,C,y,I,"left",_),k-=O.width,I+=O.width,A++;for(;P>=0&&"right"===(O=T[P]).align;)this._placeToken(O,t,C,y,D,"right",_),k-=O.width,D-=O.width,P--;for(I+=(i-(I-v)-(m-D)-k)/2;A<=P;)O=T[A],this._placeToken(O,t,C,y,I+O.width/2,"center",_),I+=O.width,A++;y+=C}},e.prototype._placeToken=function(t,e,n,i,r,l,u){var h=e.rich[t.styleName]||{};h.text=t.text;var p=t.verticalAlign,d=i+n/2;"top"===p?d=i+t.height/2:"bottom"===p&&(d=i+n-t.height/2),!t.isLineHolder&&w(h)&&this._renderBackground(h,e,"right"===l?r-t.width:"center"===l?r-t.width/2:r,d-t.height/2,t.width,t.height);var f=!!h.backgroundColor,g=t.textPadding;g&&(r=x(r,l,g),d-=t.height/2-g[0]-t.innerHeight/2);var v=this._getOrCreateChild(o.Z),y=v.createStyle();v.useStyle(y);var m=this._defaultStyle,b=!1,S=0,T=_("fill"in h?h.fill:"fill"in e?e.fill:(b=!0,m.fill)),M=_("stroke"in h?h.stroke:"stroke"in e?e.stroke:f||u||m.autoStroke&&!b?null:(S=2,m.stroke)),C=h.textShadowBlur>0||e.textShadowBlur>0;y.text=t.text,y.x=r,y.y=d,C&&(y.shadowBlur=h.textShadowBlur||e.textShadowBlur||0,y.shadowColor=h.textShadowColor||e.textShadowColor||"transparent",y.shadowOffsetX=h.textShadowOffsetX||e.textShadowOffsetX||0,y.shadowOffsetY=h.textShadowOffsetY||e.textShadowOffsetY||0),y.textAlign=l,y.textBaseline="middle",y.font=t.font||s.Uo,y.opacity=(0,a.R1)(h.opacity,e.opacity,1),M&&(y.lineWidth=(0,a.R1)(h.lineWidth,e.lineWidth,S),y.lineDash=(0,a.pD)(h.lineDash,e.lineDash),y.lineDashOffset=e.lineDashOffset||0,y.stroke=M),T&&(y.fill=T);var k=t.contentWidth,A=t.contentHeight;v.setBoundingRect(new c.Z((0,s.M3)(y.x,k,y.textAlign),(0,s.mU)(y.y,A,y.textBaseline),k,A))},e.prototype._renderBackground=function(t,e,n,i,r,o){var s,c,h,p=t.backgroundColor,d=t.borderWidth,f=t.borderColor,g=(0,a.HD)(p),v=t.borderRadius,y=this;if(g||d&&f){(s=this._getOrCreateChild(u.Z)).useStyle(s.createStyle()),s.style.fill=null;var m=s.shape;m.x=n,m.y=i,m.width=r,m.height=o,m.r=v,s.dirtyShape()}if(g)(h=s.style).fill=p||null,h.fillOpacity=(0,a.pD)(t.fillOpacity,1);else if(p&&p.image){(c=this._getOrCreateChild(l.ZP)).onload=function(){y.dirtyStyle()};var _=c.style;_.image=p.image,_.x=n,_.y=i,_.width=r,_.height=o}d&&f&&((h=s.style).lineWidth=d,h.stroke=f,h.strokeOpacity=(0,a.pD)(t.strokeOpacity,1),h.lineDash=t.borderDash,h.lineDashOffset=t.borderDashOffset||0,s.strokeContainThreshold=0,s.hasFill()&&s.hasStroke()&&(h.strokeFirst=!0,h.lineWidth*=2));var x=(s||c).style;x.shadowBlur=t.shadowBlur||0,x.shadowColor=t.shadowColor||"transparent",x.shadowOffsetX=t.shadowOffsetX||0,x.shadowOffsetY=t.shadowOffsetY||0,x.opacity=(0,a.R1)(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";if(t.fontSize||t.fontFamily||t.fontWeight){var n="";n="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,e=[t.fontStyle,t.fontWeight,n,t.fontFamily||"sans-serif"].join(" ")}return e&&(0,a.fy)(e)||t.textFont||t.font},e}(p.ZP),v={left:!0,right:1,center:1},y={top:1,bottom:1,middle:1};function m(t){if(t){t.font=g.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||v[e]?e:"left";var n=t.verticalAlign;"center"===n&&(n="middle"),t.verticalAlign=null==n||y[n]?n:"top",t.padding&&(t.padding=(0,a.MY)(t.padding))}}function _(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function x(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function b(t){var e=t.text;return null!=e&&(e+=""),e}function w(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}const S=g},8199:(t,e,n)=>{"use strict";n.d(e,{ko:()=>r,Gq:()=>o,v5:()=>s});var i=new(n(4290).ZP)(50);function r(t){if("string"==typeof t){var e=i.get(t);return e&&e.image}return t}function o(t,e,n,r,o){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var l=i.get(t),u={hostEl:n,cb:r,cbPayload:o};return l?!s(e=l.image)&&l.pending.push(u):((e=new Image).onload=e.onerror=a,i.put(t,e.__cachedImgObj={image:e,pending:[u]}),e.src=e.__zrImageSrc=t),e}return t}return e}function a(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function s(t){return t&&t.width&&t.height}},3146:(t,e,n)=>{"use strict";n.d(e,{NY:()=>h,$F:()=>g});var i=n(8199),r=n(8778),o=n(9356),a=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function s(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=l(e,n,i,r);for(var a=0,s=o.length;a<s;a++)o[a]=u(o[a],r);return o.join("\n")}function l(t,e,n,i){i=i||{};var a=(0,r.l7)({},i);a.font=e,n=(0,r.pD)(n,"..."),a.maxIterations=(0,r.pD)(i.maxIterations,2);var s=a.minChar=(0,r.pD)(i.minChar,0);a.cnCharWidth=(0,o.dz)("国",e);var l=a.ascCharWidth=(0,o.dz)("a",e);a.placeholder=(0,r.pD)(i.placeholder,"");for(var u=t=Math.max(0,t-1),c=0;c<s&&u>=l;c++)u-=l;var h=(0,o.dz)(n,e);return h>u&&(n="",h=0),u=t-h,a.ellipsis=n,a.ellipsisWidth=h,a.contentWidth=u,a.containerWidth=t,a}function u(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=(0,o.dz)(t,i);if(a<=n)return t;for(var s=0;;s++){if(a<=r||s>=e.maxIterations){t+=e.ellipsis;break}var l=0===s?c(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,l),a=(0,o.dz)(t,i)}return""===t&&(t=e.placeholder),t}function c(t,e,n,i){for(var r=0,o=0,a=t.length;o<a&&r<e;o++){var s=t.charCodeAt(o);r+=0<=s&&s<=127?n:i}return o}function h(t,e){null!=t&&(t+="");var n,i=e.overflow,a=e.padding,s=e.font,c="truncate"===i,h=(0,o.Dp)(s),p=(0,r.pD)(e.lineHeight,h),d="truncate"===e.lineOverflow,f=e.width,g=(n=null!=f&&"break"===i||"breakAll"===i?t?_(t,e.font,f,"breakAll"===i,0).lines:[]:t?t.split("\n"):[]).length*p,v=(0,r.pD)(e.height,g);if(g>v&&d){var y=Math.floor(v/p);n=n.slice(0,y)}var m=v,x=f;if(a&&(m+=a[0]+a[2],null!=x&&(x+=a[1]+a[3])),t&&c&&null!=x)for(var b=l(f,s,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),w=0;w<n.length;w++)n[w]=u(n[w],b);if(null==f){var S=0;for(w=0;w<n.length;w++)S=Math.max((0,o.dz)(n[w],s),S);f=S}return{lines:n,height:v,outerHeight:m,lineHeight:p,calculatedLineHeight:h,contentHeight:g,width:f}}var p=function(){},d=function(t){this.tokens=[],t&&(this.tokens=t)},f=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function g(t,e){var n=new f;if(null!=t&&(t+=""),!t)return n;for(var l,u=e.width,c=e.height,h=e.overflow,p="break"!==h&&"breakAll"!==h||null==u?null:{width:u,accumWidth:0,breakAll:"breakAll"===h},d=a.lastIndex=0;null!=(l=a.exec(t));){var g=l.index;g>d&&v(n,t.substring(d,g),e,p),v(n,l[2],e,p,l[1]),d=a.lastIndex}d<t.length&&v(n,t.substring(d,t.length),e,p);var y=[],m=0,_=0,x=e.padding,b="truncate"===h,w="truncate"===e.lineOverflow;function S(t,e,n){t.width=e,t.lineHeight=n,m+=n,_=Math.max(_,e)}t:for(var T=0;T<n.lines.length;T++){for(var M=n.lines[T],C=0,k=0,A=0;A<M.tokens.length;A++){var I=(z=M.tokens[A]).styleName&&e.rich[z.styleName]||{},D=z.textPadding=I.padding,P=D?D[1]+D[3]:0,O=z.font=I.font||e.font;z.contentHeight=(0,o.Dp)(O);var L=(0,r.pD)(I.height,z.contentHeight);if(z.innerHeight=L,D&&(L+=D[0]+D[2]),z.height=L,z.lineHeight=(0,r.R1)(I.lineHeight,e.lineHeight,L),z.align=I&&I.align||e.align,z.verticalAlign=I&&I.verticalAlign||"middle",w&&null!=c&&m+z.lineHeight>c){A>0?(M.tokens=M.tokens.slice(0,A),S(M,k,C),n.lines=n.lines.slice(0,T+1)):n.lines=n.lines.slice(0,T);break t}var R=I.width,E=null==R||"auto"===R;if("string"==typeof R&&"%"===R.charAt(R.length-1))z.percentWidth=R,y.push(z),z.contentWidth=(0,o.dz)(z.text,O);else{if(E){var Z=I.backgroundColor,N=Z&&Z.image;N&&(N=i.ko(N),i.v5(N)&&(z.width=Math.max(z.width,N.width*L/N.height)))}var B=b&&null!=u?u-k:null;null!=B&&B<z.width?!E||B<P?(z.text="",z.width=z.contentWidth=0):(z.text=s(z.text,B-P,O,e.ellipsis,{minChar:e.truncateMinChar}),z.width=z.contentWidth=(0,o.dz)(z.text,O)):z.contentWidth=(0,o.dz)(z.text,O)}z.width+=P,k+=z.width,I&&(C=Math.max(C,z.lineHeight))}S(M,k,C)}for(n.outerWidth=n.width=(0,r.pD)(u,_),n.outerHeight=n.height=(0,r.pD)(c,m),n.contentHeight=m,n.contentWidth=_,x&&(n.outerWidth+=x[1]+x[3],n.outerHeight+=x[0]+x[2]),T=0;T<y.length;T++){var z,F=(z=y[T]).percentWidth;z.width=parseInt(F,10)/100*n.width}return n}function v(t,e,n,i,r){var a,s,l,u,c=""===e,h=r&&n.rich[r]||{},f=t.lines,g=h.font||n.font,v=!1;if(i){var y=h.padding,m=y?y[1]+y[3]:0;if(null!=h.width&&"auto"!==h.width){var x=(l=h.width,u=i.width,("string"==typeof l?l.lastIndexOf("%")>=0?parseFloat(l)/100*u:parseFloat(l):l)+m);f.length>0&&x+i.accumWidth>i.width&&(a=e.split("\n"),v=!0),i.accumWidth=x}else{var b=_(e,g,i.width,i.breakAll,i.accumWidth);i.accumWidth=b.accumWidth+m,s=b.linesWidths,a=b.lines}}else a=e.split("\n");for(var w=0;w<a.length;w++){var S=a[w],T=new p;if(T.styleName=r,T.text=S,T.isLineHolder=!S&&!c,"number"==typeof h.width?T.width=h.width:T.width=s?s[w]:(0,o.dz)(S,g),w||v)f.push(new d([T]));else{var M=(f[f.length-1]||(f[0]=new d)).tokens,C=M.length;1===C&&M[0].isLineHolder?M[0]=T:(S||!C||c)&&M.push(T)}}}var y=(0,r.u4)(",&?/;] ".split(""),(function(t,e){return t[e]=!0,t}),{});function m(t){return!function(t){var e=t.charCodeAt(0);return e>=33&&e<=255}(t)||!!y[t]}function _(t,e,n,i,r){for(var a=[],s=[],l="",u="",c=0,h=0,p=0;p<t.length;p++){var d=t.charAt(p);if("\n"!==d){var f=(0,o.dz)(d,e),g=!i&&!m(d);(a.length?h+f>n:r+h+f>n)?h?(l||u)&&(g?(l||(l=u,u="",h=c=0),a.push(l),s.push(h-c),u+=d,l="",h=c+=f):(u&&(l+=u,h+=c,u="",c=0),a.push(l),s.push(h),l=d,h=f)):g?(a.push(u),s.push(c),u=d,c=f):(a.push(d),s.push(f)):(h+=f,g?(u+=d,c+=f):(u&&(l+=u,u="",c=0),l+=d))}else u&&(l+=u,h+=c),a.push(l),s.push(h),l="",u="",c=0,h=0}return a.length||l||(l=t,u="",c=0),u&&(l+=u),l&&(a.push(l),s.push(h)),1===a.length&&(h+=r),{accumWidth:h,lines:a,linesWidths:s}}},5425:(t,e,n)=>{"use strict";n.d(e,{L:()=>o});var i=n(213);function r(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function o(t,e,n){var o=e.smooth,a=e.points;if(a&&a.length>=2){if(o&&"spline"!==o){var s=function(t,e,n,r){var o,a,s,l,u=[],c=[],h=[],p=[];if(r){s=[1/0,1/0],l=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)(0,i.VV)(s,s,t[d]),(0,i.Fp)(l,l,t[d]);(0,i.VV)(s,s,r[0]),(0,i.Fp)(l,l,r[1])}for(d=0,f=t.length;d<f;d++){var g=t[d];if(n)o=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){u.push((0,i.d9)(t[d]));continue}o=t[d-1],a=t[d+1]}(0,i.lu)(c,a,o),(0,i.bA)(c,c,e);var v=(0,i.TE)(g,o),y=(0,i.TE)(g,a),m=v+y;0!==m&&(v/=m,y/=m),(0,i.bA)(h,c,-v),(0,i.bA)(p,c,y);var _=(0,i.IH)([],g,h),x=(0,i.IH)([],g,p);r&&((0,i.Fp)(_,_,s),(0,i.VV)(_,_,l),(0,i.Fp)(x,x,s),(0,i.VV)(x,x,l)),u.push(_),u.push(x)}return n&&u.push(u.shift()),u}(a,o,n,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var l=a.length,u=0;u<(n?l:l-1);u++){var c=s[2*u],h=s[2*u+1],p=a[(u+1)%l];t.bezierCurveTo(c[0],c[1],h[0],h[1],p[0],p[1])}}else{"spline"===o&&(a=function(t,e){for(var n=t.length,o=[],a=0,s=1;s<n;s++)a+=(0,i.TE)(t[s-1],t[s]);var l=a/2;for(l=l<n?n:l,s=0;s<l;s++){var u=s/(l-1)*(e?n:n-1),c=Math.floor(u),h=u-c,p=void 0,d=t[c%n],f=void 0,g=void 0;e?(p=t[(c-1+n)%n],f=t[(c+1)%n],g=t[(c+2)%n]):(p=t[0===c?c:c-1],f=t[c>n-2?n-1:c+1],g=t[c>n-3?n-1:c+2]);var v=h*h,y=h*v;o.push([r(p[0],d[0],f[0],g[0],h,v,y),r(p[1],d[1],f[1],g[1],h,v,y)])}return o}(a,n)),t.moveTo(a[0][0],a[0][1]),u=1;for(var d=a.length;u<d;u++)t.lineTo(a[u][0],a[u][1])}n&&t.closePath()}}},6169:(t,e,n)=>{"use strict";n.d(e,{_3:()=>r,Pw:()=>o,vu:()=>a});var i=Math.round;function r(t,e,n){if(e){var r=e.x1,o=e.x2,s=e.y1,l=e.y2;t.x1=r,t.x2=o,t.y1=s,t.y2=l;var u=n&&n.lineWidth;return u?(i(2*r)===i(2*o)&&(t.x1=t.x2=a(r,u,!0)),i(2*s)===i(2*l)&&(t.y1=t.y2=a(s,u,!0)),t):t}}function o(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,s=e.height;t.x=i,t.y=r,t.width=o,t.height=s;var l=n&&n.lineWidth;return l?(t.x=a(i,l,!0),t.y=a(r,l,!0),t.width=Math.max(a(i+o,l,!1)-t.x,0===o?0:1),t.height=Math.max(a(r+s,l,!1)-t.y,0===s?0:1),t):t}}function a(t,e,n){if(!e)return t;var r=i(2*t);return(r+i(e))%2==0?r/2:(r+(n?1:-1))/2}},9689:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(391),o=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,o,a,!s)},e}(r.ZP);a.prototype.type="arc";const s=a},3584:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(9312),r=n(391),o=n(213),a=n(3475),s=[],l=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function u(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?a.X_:a.af)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?a.X_:a.af)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?a.AZ:a.Zm)(t.x1,t.cpx1,t.x2,e),(n?a.AZ:a.Zm)(t.y1,t.cpy1,t.y2,e)]}var c=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new l},e.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,l=e.cpx1,u=e.cpy1,c=e.cpx2,h=e.cpy2,p=e.percent;0!==p&&(t.moveTo(n,i),null==c||null==h?(p<1&&((0,a.Lx)(n,l,r,p,s),l=s[1],r=s[2],(0,a.Lx)(i,u,o,p,s),u=s[1],o=s[2]),t.quadraticCurveTo(l,u,r,o)):(p<1&&((0,a.Vz)(n,l,c,r,p,s),l=s[1],c=s[2],r=s[3],(0,a.Vz)(i,u,h,o,p,s),u=s[1],h=s[2],o=s[3]),t.bezierCurveTo(l,u,c,h,r,o)))},e.prototype.pointAt=function(t){return u(this.shape,t,!1)},e.prototype.tangentAt=function(t){var e=u(this.shape,t,!0);return o.Fv(e,e)},e}(r.ZP);c.prototype.type="bezier-curve";const h=c},1707:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(391),o=function(){this.cx=0,this.cy=0,this.r=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},e}(r.ZP);a.prototype.type="circle";const s=a},9509:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(391),o=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=.5522848,i=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveTo(i-o,r),t.bezierCurveTo(i-o,r-l,i-s,r-a,i,r-a),t.bezierCurveTo(i+s,r-a,i+o,r-l,i+o,r),t.bezierCurveTo(i+o,r+l,i+s,r+a,i,r+a),t.bezierCurveTo(i-s,r+a,i-o,r+l,i-o,r),t.closePath()},e}(r.ZP);a.prototype.type="ellipse";const s=a},6573:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(9312),r=n(391),o=n(6169),a={},s=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new s},e.prototype.buildPath=function(t,e){var n,i,r,s;if(this.subPixelOptimize){var l=(0,o._3)(a,e,this.style);n=l.x1,i=l.y1,r=l.x2,s=l.y2}else n=e.x1,i=e.y1,r=e.x2,s=e.y2;var u=e.percent;0!==u&&(t.moveTo(n,i),u<1&&(r=n*(1-u)+r*u,s=i*(1-u)+s*u),t.lineTo(r,s))},e.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},e}(r.ZP);l.prototype.type="line";const u=l},1748:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(9312),r=n(391),o=n(5425),a=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!0)},e}(r.ZP);s.prototype.type="polygon";const l=s},9181:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(9312),r=n(391),o=n(5425),a=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!1)},e}(r.ZP);s.prototype.type="polyline";const l=s},230:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(9312),r=n(391),o=n(6169),a=function(){this.x=0,this.y=0,this.width=0,this.height=0},s={},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){var n,i,r,a;if(this.subPixelOptimize){var l=(0,o.Pw)(s,e,this.style);n=l.x,i=l.y,r=l.width,a=l.height,l.r=e.r,e=l}else n=e.x,i=e.y,r=e.width,a=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,c=e.height,h=e.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?n=i=r=o=h:h instanceof Array?1===h.length?n=i=r=o=h[0]:2===h.length?(n=r=h[0],i=o=h[1]):3===h.length?(n=h[0],i=o=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],o=h[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>c&&(i*=c/(a=i+r),r*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+c-r),0!==r&&t.arc(s+u-r,l+c-r,r,0,Math.PI/2),t.lineTo(s+o,l+c),0!==o&&t.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,a)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(r.ZP);l.prototype.type="rect";const u=l},4874:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(9312),r=n(391),o=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(r.ZP);a.prototype.type="ring";const s=a},2098:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(9312),r=n(391),o=n(2397),a=Math.PI,s=2*a,l=Math.sin,u=Math.cos,c=Math.acos,h=Math.atan2,p=Math.abs,d=Math.sqrt,f=Math.max,g=Math.min,v=1e-4;function y(t,e,n,i,r,o,a){var s=t-n,l=e-i,u=(a?o:-o)/d(s*s+l*l),c=u*l,h=-u*s,p=t+c,g=e+h,v=n+c,y=i+h,m=(p+v)/2,_=(g+y)/2,x=v-p,b=y-g,w=x*x+b*b,S=r-o,T=p*y-v*g,M=(b<0?-1:1)*d(f(0,S*S*w-T*T)),C=(T*b-x*M)/w,k=(-T*x-b*M)/w,A=(T*b+x*M)/w,I=(-T*x+b*M)/w,D=C-m,P=k-_,O=A-m,L=I-_;return D*D+P*P>O*O+L*L&&(C=A,k=I),{cx:C,cy:k,x01:-c,y01:-h,x11:C*(r/S-1),y11:k*(r/S-1)}}var m=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0,this.innerCornerRadius=0},_=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new m},e.prototype.buildPath=function(t,e){!function(t,e){var n=f(e.r,0),i=f(e.r0||0,0),r=n>0;if(r||i>0){if(r||(n=i,i=0),i>n){var m=n;n=i,i=m}var _=!!e.clockwise,x=e.startAngle,b=e.endAngle,w=[x,b];(0,o.L)(w,!_);var S=p(w[0]-w[1]),T=e.cx,M=e.cy,C=e.cornerRadius||0,k=e.innerCornerRadius||0;if(n>v)if(S>s-v)t.moveTo(T+n*u(x),M+n*l(x)),t.arc(T,M,n,x,b,!_),i>v&&(t.moveTo(T+i*u(b),M+i*l(b)),t.arc(T,M,i,b,x,_));else{var A=p(n-i)/2,I=g(A,C),D=g(A,k),P=D,O=I,L=n*u(x),R=n*l(x),E=i*u(b),Z=i*l(b),N=void 0,B=void 0,z=void 0,F=void 0;if((I>v||D>v)&&(N=n*u(b),B=n*l(b),z=i*u(x),F=i*l(x),S<a)){var W=function(t,e,n,i,r,o,a,s){var l=n-t,u=i-e,c=a-r,h=s-o,p=h*l-c*u;if(!(p*p<v))return[t+(p=(c*(e-o)-h*(t-r))/p)*l,e+p*u]}(L,R,z,F,N,B,E,Z);if(W){var V=L-W[0],H=R-W[1],U=N-W[0],G=B-W[1],X=1/l(c((V*U+H*G)/(d(V*V+H*H)*d(U*U+G*G)))/2),Y=d(W[0]*W[0]+W[1]*W[1]);P=g(D,(i-Y)/(X-1)),O=g(I,(n-Y)/(X+1))}}if(S>v)if(O>v){var j=y(z,F,L,R,n,O,_),$=y(N,B,E,Z,n,O,_);t.moveTo(T+j.cx+j.x01,M+j.cy+j.y01),O<I?t.arc(T+j.cx,M+j.cy,O,h(j.y01,j.x01),h($.y01,$.x01),!_):(t.arc(T+j.cx,M+j.cy,O,h(j.y01,j.x01),h(j.y11,j.x11),!_),t.arc(T,M,n,h(j.cy+j.y11,j.cx+j.x11),h($.cy+$.y11,$.cx+$.x11),!_),t.arc(T+$.cx,M+$.cy,O,h($.y11,$.x11),h($.y01,$.x01),!_))}else t.moveTo(T+L,M+R),t.arc(T,M,n,x,b,!_);else t.moveTo(T+L,M+R);i>v&&S>v?P>v?(j=y(E,Z,N,B,i,-P,_),$=y(L,R,z,F,i,-P,_),t.lineTo(T+j.cx+j.x01,M+j.cy+j.y01),P<D?t.arc(T+j.cx,M+j.cy,P,h(j.y01,j.x01),h($.y01,$.x01),!_):(t.arc(T+j.cx,M+j.cy,P,h(j.y01,j.x01),h(j.y11,j.x11),!_),t.arc(T,M,i,h(j.cy+j.y11,j.cx+j.x11),h($.cy+$.y11,$.cx+$.x11),_),t.arc(T+$.cx,M+$.cy,P,h($.y11,$.x11),h($.y01,$.x01),!_))):(t.lineTo(T+E,M+Z),t.arc(T,M,i,b,x,_)):t.lineTo(T+E,M+Z)}else t.moveTo(T,M);t.closePath()}}(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(r.ZP);_.prototype.type="sector";const x=_},1756:(t,e,n)=>{"use strict";n.d(e,{Qc:()=>g,xb:()=>y,NC:()=>m,Pz:()=>_,L0:()=>x});var i=n(4290),r={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 o(t){return(t=Math.round(t))<0?0:t>255?255:t}function a(t){return t<0?0:t>1?1:t}function s(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100*255):o(parseInt(e,10))}function l(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100):a(parseFloat(e))}function u(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function c(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var p=new i.ZP(20),d=null;function f(t,e){d&&h(d,e),d=p.put(t,d||e.slice())}function g(t,e){if(t){e=e||[];var n=p.get(t);if(n)return h(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in r)return h(e,r[i]),f(t,e),e;var o,a=i.length;if("#"===i.charAt(0))return 4===a||5===a?(o=parseInt(i.slice(1,4),16))>=0&&o<=4095?(c(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===a?parseInt(i.slice(4),16)/15:1),f(t,e),e):void c(e,0,0,0,1):7===a||9===a?(o=parseInt(i.slice(1,7),16))>=0&&o<=16777215?(c(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===a?parseInt(i.slice(7),16)/255:1),f(t,e),e):void c(e,0,0,0,1):void 0;var u=i.indexOf("("),d=i.indexOf(")");if(-1!==u&&d+1===a){var g=i.substr(0,u),y=i.substr(u+1,d-(u+1)).split(","),m=1;switch(g){case"rgba":if(4!==y.length)return 3===y.length?c(e,+y[0],+y[1],+y[2],1):c(e,0,0,0,1);m=l(y.pop());case"rgb":return 3!==y.length?void c(e,0,0,0,1):(c(e,s(y[0]),s(y[1]),s(y[2]),m),f(t,e),e);case"hsla":return 4!==y.length?void c(e,0,0,0,1):(y[3]=l(y[3]),v(y,e),f(t,e),e);case"hsl":return 3!==y.length?void c(e,0,0,0,1):(v(y,e),f(t,e),e);default:return}}c(e,0,0,0,1)}}function v(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=l(t[1]),r=l(t[2]),a=r<=.5?r*(i+1):r+i-r*i,s=2*r-a;return c(e=e||[],o(255*u(s,a,n+1/3)),o(255*u(s,a,n)),o(255*u(s,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function y(t,e){var n=g(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return _(n,4===n.length?"rgba":"rgb")}}function m(t){var e=g(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function _(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function x(t,e){var n=g(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}},7367:(t,e,n)=>{"use strict";n.d(e,{iR:()=>M,Pc:()=>C,AA:()=>k});var i=n(9312),r=n(391),o=n(2397),a=n(213),s=o.Z.CMD,l=[[],[],[]],u=Math.sqrt,c=Math.atan2,h=n(8778),p=Math.sqrt,d=Math.sin,f=Math.cos,g=Math.PI;function v(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function y(t,e){return(t[0]*e[0]+t[1]*e[1])/(v(t)*v(e))}function m(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(y(t,e))}function _(t,e,n,i,r,o,a,s,l,u,c){var h=l*(g/180),v=f(h)*(t-n)/2+d(h)*(e-i)/2,_=-1*d(h)*(t-n)/2+f(h)*(e-i)/2,x=v*v/(a*a)+_*_/(s*s);x>1&&(a*=p(x),s*=p(x));var b=(r===o?-1:1)*p((a*a*(s*s)-a*a*(_*_)-s*s*(v*v))/(a*a*(_*_)+s*s*(v*v)))||0,w=b*a*_/s,S=b*-s*v/a,T=(t+n)/2+f(h)*w-d(h)*S,M=(e+i)/2+d(h)*w+f(h)*S,C=m([1,0],[(v-w)/a,(_-S)/s]),k=[(v-w)/a,(_-S)/s],A=[(-1*v-w)/a,(-1*_-S)/s],I=m(k,A);if(y(k,A)<=-1&&(I=g),y(k,A)>=1&&(I=0),I<0){var D=Math.round(I/g*1e6)/1e6;I=2*g+D%2*g}c.addData(u,T,M,a,s,C,I,h,o)}var x=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,b=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.applyTransform=function(t){},e}(r.ZP);function S(t){return null!=t.setData}function T(t,e){var n=function(t){if(!t)return new o.Z;for(var e,n=0,i=0,r=n,a=i,s=new o.Z,l=o.Z.CMD,u=t.match(x),c=0;c<u.length;c++){for(var h=u[c],p=h.charAt(0),d=void 0,f=h.match(b)||[],g=f.length,v=0;v<g;v++)f[v]=parseFloat(f[v]);for(var y=0;y<g;){var m=void 0,w=void 0,S=void 0,T=void 0,M=void 0,C=void 0,k=void 0,A=n,I=i,D=void 0,P=void 0;switch(p){case"l":n+=f[y++],i+=f[y++],d=l.L,s.addData(d,n,i);break;case"L":n=f[y++],i=f[y++],d=l.L,s.addData(d,n,i);break;case"m":n+=f[y++],i+=f[y++],d=l.M,s.addData(d,n,i),r=n,a=i,p="l";break;case"M":n=f[y++],i=f[y++],d=l.M,s.addData(d,n,i),r=n,a=i,p="L";break;case"h":n+=f[y++],d=l.L,s.addData(d,n,i);break;case"H":n=f[y++],d=l.L,s.addData(d,n,i);break;case"v":i+=f[y++],d=l.L,s.addData(d,n,i);break;case"V":i=f[y++],d=l.L,s.addData(d,n,i);break;case"C":d=l.C,s.addData(d,f[y++],f[y++],f[y++],f[y++],f[y++],f[y++]),n=f[y-2],i=f[y-1];break;case"c":d=l.C,s.addData(d,f[y++]+n,f[y++]+i,f[y++]+n,f[y++]+i,f[y++]+n,f[y++]+i),n+=f[y-2],i+=f[y-1];break;case"S":m=n,w=i,D=s.len(),P=s.data,e===l.C&&(m+=n-P[D-4],w+=i-P[D-3]),d=l.C,A=f[y++],I=f[y++],n=f[y++],i=f[y++],s.addData(d,m,w,A,I,n,i);break;case"s":m=n,w=i,D=s.len(),P=s.data,e===l.C&&(m+=n-P[D-4],w+=i-P[D-3]),d=l.C,A=n+f[y++],I=i+f[y++],n+=f[y++],i+=f[y++],s.addData(d,m,w,A,I,n,i);break;case"Q":A=f[y++],I=f[y++],n=f[y++],i=f[y++],d=l.Q,s.addData(d,A,I,n,i);break;case"q":A=f[y++]+n,I=f[y++]+i,n+=f[y++],i+=f[y++],d=l.Q,s.addData(d,A,I,n,i);break;case"T":m=n,w=i,D=s.len(),P=s.data,e===l.Q&&(m+=n-P[D-4],w+=i-P[D-3]),n=f[y++],i=f[y++],d=l.Q,s.addData(d,m,w,n,i);break;case"t":m=n,w=i,D=s.len(),P=s.data,e===l.Q&&(m+=n-P[D-4],w+=i-P[D-3]),n+=f[y++],i+=f[y++],d=l.Q,s.addData(d,m,w,n,i);break;case"A":S=f[y++],T=f[y++],M=f[y++],C=f[y++],k=f[y++],_(A=n,I=i,n=f[y++],i=f[y++],C,k,S,T,M,d=l.A,s);break;case"a":S=f[y++],T=f[y++],M=f[y++],C=f[y++],k=f[y++],_(A=n,I=i,n+=f[y++],i+=f[y++],C,k,S,T,M,d=l.A,s)}}"z"!==p&&"Z"!==p||(d=l.Z,s.addData(d),n=r,i=a),e=d}return s.toStatic(),s}(t),i=(0,h.l7)({},e);return i.buildPath=function(t){if(S(t))t.setData(n.data),(e=t.getContext())&&t.rebuildPath(e,1);else{var e=t;n.rebuildPath(e,1)}},i.applyTransform=function(t){!function(t,e){var n,i,r,o,h,p,d=t.data,f=t.len(),g=s.M,v=s.C,y=s.L,m=s.R,_=s.A,x=s.Q;for(r=0,o=0;r<f;){switch(n=d[r++],o=r,i=0,n){case g:case y:i=1;break;case v:i=3;break;case x:i=2;break;case _:var b=e[4],w=e[5],S=u(e[0]*e[0]+e[1]*e[1]),T=u(e[2]*e[2]+e[3]*e[3]),M=c(-e[1]/T,e[0]/S);d[r]*=S,d[r++]+=b,d[r]*=T,d[r++]+=w,d[r++]*=S,d[r++]*=T,d[r++]+=M,d[r++]+=M,o=r+=2;break;case m:p[0]=d[r++],p[1]=d[r++],(0,a.Ne)(p,p,e),d[o++]=p[0],d[o++]=p[1],p[0]+=d[r++],p[1]+=d[r++],(0,a.Ne)(p,p,e),d[o++]=p[0],d[o++]=p[1]}for(h=0;h<i;h++){var C=l[h];C[0]=d[r++],C[1]=d[r++],(0,a.Ne)(C,C,e),d[o++]=C[0],d[o++]=C[1]}}t.increaseVersion()}(n,t),this.dirtyShape()},i}function M(t,e){return new w(T(t,e))}function C(t,e){var n=T(t,e);return function(t){function e(e){var i=t.call(this,e)||this;return i.applyTransform=n.applyTransform,i.buildPath=n.buildPath,i}return(0,i.ZT)(e,t),e}(w)}function k(t,e){for(var n=[],i=t.length,o=0;o<i;o++){var a=t[o];a.path||a.createPathProxy(),a.shapeChanged()&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var s=new r.ZP(e);return s.createPathProxy(),s.buildPath=function(t){if(S(t)){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e,1)}},s}}}]); | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzQxLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLzc0MS5qcyJdLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlUm9vdCI6IiJ9 |
|
provider.go | // Copyright (c) 2021 Terminus, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package avg_duration
import (
"context"
"reflect"
"github.com/erda-project/erda-infra/base/logs"
"github.com/erda-project/erda-infra/base/servicehub"
"github.com/erda-project/erda-infra/providers/component-protocol/components/linegraph/impl"
"github.com/erda-project/erda-infra/providers/component-protocol/cpregister"
"github.com/erda-project/erda-infra/providers/component-protocol/cptype"
"github.com/erda-project/erda-infra/providers/component-protocol/protocol"
"github.com/erda-project/erda-infra/providers/i18n"
metricpb "github.com/erda-project/erda-proto-go/core/monitor/metric/pb"
"github.com/erda-project/erda-proto-go/msp/apm/service/pb"
"github.com/erda-project/erda/modules/msp/apm/service/datasources"
"github.com/erda-project/erda/modules/msp/apm/service/view/common"
)
type provider struct {
impl.DefaultLineGraph
Log logs.Logger
I18n i18n.Translator `autowired:"i18n" translator:"msp-i18n"`
Metric metricpb.MetricServiceServer `autowired:"erda.core.monitor.metric.MetricService"`
DataSource datasources.ServiceDataSource `autowired:"component-protocol.components.datasources.msp-service"`
}
// RegisterInitializeOp .
func (p *provider) RegisterInitializeOp() (opFunc cptype.OperationFunc) {
return func(sdk *cptype.SDK) cptype.IStdStructuredPtr {
lang := sdk.Lang
startTime := int64(p.StdInParamsPtr.Get("startTime").(float64))
endTime := int64(p.StdInParamsPtr.Get("endTime").(float64))
tenantId := p.StdInParamsPtr.Get("tenantId").(string)
serviceId := p.StdInParamsPtr.Get("serviceId").(string)
chart, err := p.DataSource.GetChart(context.WithValue(context.Background(), common.LangKey, lang),
pb.ChartType_AvgDuration,
startTime,
endTime,
tenantId,
serviceId,
common.TransactionLayerCache,
"")
if err != nil {
p.Log.Error(err)
// todo how to throw error?
return nil
}
p.StdDataPtr = chart
return nil
}
}
// RegisterRenderingOp .
func (p *provider) RegisterRenderingOp() (opFunc cptype.OperationFunc) {
return p.RegisterInitializeOp()
}
// Init .
func (p *provider) Init(ctx servicehub.Context) error {
p.DefaultLineGraph = impl.DefaultLineGraph{}
v := reflect.ValueOf(p)
v.Elem().FieldByName("Impl").Set(v)
compName := "avgDuration"
if ctx.Label() != "" {
compName = ctx.Label()
}
protocol.MustRegisterComponent(&protocol.CompRenderSpec{
Scenario: "transaction-cache-analysis",
CompName: compName,
Creator: func() cptype.IComponent { return p },
})
return nil
}
// Provide .
func (p *provider) Provide(ctx servicehub.DependencyContext, args ...interface{}) interface{} {
return p
}
func | () {
name := "component-protocol.components.transaction-cache-analysis.avgDuration"
cpregister.AllExplicitProviderCreatorMap[name] = nil
servicehub.Register(name, &servicehub.Spec{
Creator: func() servicehub.Provider { return &provider{} },
})
}
| init |
import.go | // Copyright 2016 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package cmd
import (
"bufio"
"bytes"
"fmt"
"os"
"path/filepath"
"time"
"github.com/Unknwon/com"
"github.com/urfave/cli"
"github.com/gogits/gogs/modules/setting"
)
var (
Import = cli.Command{
Name: "import",
Usage: "Import portable data as local Gogs data",
Description: `Allow user import data from other Gogs installations to local instance
without manually hacking the data files`,
Subcommands: []cli.Command{
subcmdImportLocale,
},
}
subcmdImportLocale = cli.Command{
Name: "locale",
Usage: "Import locale files to local repository",
Action: runImportLocale,
Flags: []cli.Flag{
stringFlag("source", "", "Source directory that stores new locale files"),
stringFlag("target", "", "Target directory that stores old locale files"),
stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"),
},
}
)
func runImportLocale(c *cli.Context) error {
if !c.IsSet("source") {
return fmt.Errorf("Source directory is not specified")
} else if !c.IsSet("target") {
return fmt.Errorf("Target directory is not specified")
}
if !com.IsDir(c.String("source")) {
return fmt.Errorf("Source directory does not exist or is not a directory")
} else if !com.IsDir(c.String("target")) {
return fmt.Errorf("Target directory does not exist or is not a directory")
}
if c.IsSet("config") {
setting.CustomConf = c.String("config")
}
setting.NewContext()
now := time.Now()
line := make([]byte, 0, 100)
badChars := []byte(`="`)
escapedQuotes := []byte(`\"`)
regularQuotes := []byte(`"`)
// Cut out en-US.
for _, lang := range setting.Langs[1:] {
name := fmt.Sprintf("locale_%s.ini", lang)
source := filepath.Join(c.String("source"), name)
target := filepath.Join(c.String("target"), name)
if !com.IsFile(source) {
continue
}
| // Crowdin surrounds double quotes for strings contain quotes inside,
// this breaks INI parser, we need to fix that.
sr, err := os.Open(source)
if err != nil {
return fmt.Errorf("Open: %v", err)
}
tw, err := os.Create(target)
if err != nil {
if err != nil {
return fmt.Errorf("Open: %v", err)
}
}
scanner := bufio.NewScanner(sr)
for scanner.Scan() {
line = scanner.Bytes()
idx := bytes.Index(line, badChars)
if idx > -1 && line[len(line)-1] == '"' {
// We still want the "=" sign
line = append(line[:idx+1], line[idx+2:len(line)-1]...)
line = bytes.Replace(line, escapedQuotes, regularQuotes, -1)
}
tw.Write(line)
tw.WriteString("\n")
}
sr.Close()
tw.Close()
// Modification time of files from Crowdin often ahead of current,
// so we need to set back to current.
os.Chtimes(target, now, now)
}
fmt.Println("Locale files has been successfully imported!")
return nil
} | |
attribute.rs | use proc_macro2::TokenStream;
use quote::quote;
use syn::{
parse::{Parse, ParseStream},
*,
};
use super::PIN;
use crate::utils::SliceExt;
// To generate the correct `Unpin` implementation and the projection methods,
// we need to collect the types of the pinned fields.
// However, since proc-macro-attribute is applied before `cfg` and `cfg_attr`
// on fields, we cannot be collecting field types properly at this timing.
// So instead of generating the `Unpin` implementation and the projection
// methods here, delegate their processing to proc-macro-derive.
//
// At this stage, only attributes are parsed and the following attributes are
// added to the attributes of the item.
// * `#[derive(InternalDerive)]` - An internal helper macro that does the above
// processing.
// * `#[pin(__private(#args))]` - Pass the argument of `#[pin_project]` to
// proc-macro-derive (`InternalDerive`).
pub(super) fn parse_attribute(args: &TokenStream, input: TokenStream) -> Result<TokenStream> |
#[allow(dead_code)] // https://github.com/rust-lang/rust/issues/56750
struct Input {
attrs: Vec<Attribute>,
body: TokenStream,
}
impl Parse for Input {
fn parse(input: ParseStream<'_>) -> Result<Self> {
let attrs = input.call(Attribute::parse_outer)?;
let ahead = input.fork();
let _: Visibility = ahead.parse()?;
if !ahead.peek(Token![struct]) && !ahead.peek(Token![enum]) {
// If we check this only on proc-macro-derive, it may generate unhelpful error
// messages. So it is preferable to be able to detect it here.
Err(error!(
input.parse::<TokenStream>()?,
"#[pin_project] attribute may only be used on structs or enums"
))
} else if let Some(attr) = attrs.find(PIN) {
Err(error!(attr, "#[pin] attribute may only be used on fields of structs or variants"))
} else if let Some(attr) = attrs.find("pin_project") {
Err(error!(attr, "duplicate #[pin_project] attribute"))
} else {
Ok(Self { attrs, body: input.parse()? })
}
}
}
| {
let Input { attrs, body } = syn::parse2(input)?;
Ok(quote! {
#(#attrs)*
#[derive(::pin_project::__private::__PinProjectInternalDerive)]
// Use `__private` to prevent users from trying to control `InternalDerive`
// manually. `__private` does not guarantee compatibility between patch
// versions, so it should be sufficient for this purpose in most cases.
#[pin(__private(#args))]
#body
})
} |
physical_costing.py | #coverage:ignore
import dataclasses
import datetime
import math
from typing import Tuple, Iterator
@dataclasses.dataclass(frozen=True, unsafe_hash=True)
class MagicStateFactory:
details: str
physical_qubit_footprint: int
rounds: int
failure_rate: int
@dataclasses.dataclass(frozen=True, unsafe_hash=True)
class CostEstimate:
physical_qubit_count: int
duration: datetime.timedelta
algorithm_failure_probability: float
@dataclasses.dataclass(frozen=True, unsafe_hash=True)
class AlgorithmParameters:
physical_error_rate: float
surface_code_cycle_time: datetime.timedelta
logical_data_qubit_distance: int
magic_state_factory: MagicStateFactory
toffoli_count: int
max_allocated_logical_qubits: int
factory_count: int
routing_overhead_proportion: float
proportion_of_bounding_box: float = 1
def estimate_cost(self) -> CostEstimate:
"""Determine algorithm single-shot layout and costs for given params.
ASSUMES:
- There is enough routing area to get needed data qubits to the
factories as fast as the factories run.
- The bottleneck time cost is waiting for magic states.
"""
logical_storage = int(
math.ceil(self.max_allocated_logical_qubits *
(1 + self.routing_overhead_proportion)))
storage_area = logical_storage * _physical_qubits_per_logical_qubit(
self.logical_data_qubit_distance)
distillation_area = self.factory_count \
* self.magic_state_factory.physical_qubit_footprint
rounds = int(self.toffoli_count / self.factory_count *
self.magic_state_factory.rounds)
distillation_failure = self.magic_state_factory.failure_rate \
* self.toffoli_count
data_failure = self.proportion_of_bounding_box \
* _topological_error_per_unit_cell(
self.logical_data_qubit_distance,
gate_err=self.physical_error_rate) * logical_storage * rounds
return CostEstimate(physical_qubit_count=storage_area +
distillation_area,
duration=rounds * self.surface_code_cycle_time,
algorithm_failure_probability=min(
1., data_failure + distillation_failure))
def _topological_error_per_unit_cell(code_distance: int,
gate_err: float) -> float:
return 0.1 * (100 * gate_err)**((code_distance + 1) / 2)
def _total_topological_error(code_distance: int, gate_err: float,
unit_cells: int) -> float:
return unit_cells * _topological_error_per_unit_cell(
code_distance, gate_err)
def iter_known_factories(physical_error_rate: float
) -> Iterator[MagicStateFactory]:
if physical_error_rate == 0.001:
yield _two_level_t_state_factory_1p1000(
physical_error_rate=physical_error_rate)
yield from iter_auto_ccz_factories(physical_error_rate)
def _two_level_t_state_factory_1p1000(physical_error_rate: float
) -> MagicStateFactory:
assert physical_error_rate == 0.001
return MagicStateFactory(
details="https://arxiv.org/abs/1808.06709",
failure_rate=4 * 9 * 10**-17,
physical_qubit_footprint=(12 * 8) * (4) *
_physical_qubits_per_logical_qubit(31),
rounds=6 * 31, | )
def _autoccz_factory_dimensions(l1_distance: int,
l2_distance: int) -> Tuple[int, int, float]:
"""Determine the width, height, depth of the magic state factory."""
t1_height = 4 * l1_distance / l2_distance
t1_width = 8 * l1_distance / l2_distance
t1_depth = 5.75 * l1_distance / l2_distance
ccz_depth = 5
ccz_height = 6
ccz_width = 3
storage_width = 2 * l1_distance / l2_distance
ccz_rate = 1 / ccz_depth
t1_rate = 1 / t1_depth
t1_factories = int(math.ceil((ccz_rate * 8) / t1_rate))
t1_factory_column_height = t1_height * math.ceil(t1_factories / 2)
width = int(math.ceil(t1_width * 2 + ccz_width + storage_width))
height = int(math.ceil(max(ccz_height, t1_factory_column_height)))
depth = max(ccz_depth, t1_depth)
return width, height, depth
def iter_auto_ccz_factories(physical_error_rate: float
) -> Iterator[MagicStateFactory]:
for l1_distance in range(5, 25, 2):
for l2_distance in range(l1_distance + 2, 41, 2):
w, h, d = _autoccz_factory_dimensions(l1_distance=l1_distance,
l2_distance=l2_distance)
f = _compute_autoccz_distillation_error(
l1_distance=l1_distance,
l2_distance=l2_distance,
physical_error_rate=physical_error_rate)
yield MagicStateFactory(
details=
f"AutoCCZ({physical_error_rate=},{l1_distance=},{l2_distance=}",
physical_qubit_footprint=w * h *
_physical_qubits_per_logical_qubit(l2_distance),
rounds=d * l2_distance,
failure_rate=f,
)
def _compute_autoccz_distillation_error(l1_distance: int, l2_distance: int,
physical_error_rate: float) -> float:
# Level 0
L0_distance = l1_distance // 2
L0_distillation_error = physical_error_rate
L0_topological_error = _total_topological_error(
unit_cells=100, # Estimated 100 for T injection.
code_distance=L0_distance,
gate_err=physical_error_rate)
L0_total_T_error = L0_distillation_error + L0_topological_error
# Level 1
L1_topological_error = _total_topological_error(
unit_cells=1100, # Estimated 1000 for factory, 100 for T injection.
code_distance=l1_distance,
gate_err=physical_error_rate)
L1_distillation_error = 35 * L0_total_T_error**3
L1_total_T_error = L1_distillation_error + L1_topological_error
# Level 2
L2_topological_error = _total_topological_error(
unit_cells=1000, # Estimated 1000 for factory.
code_distance=l2_distance,
gate_err=physical_error_rate)
L2_distillation_error = 28 * L1_total_T_error**2
L2_total_CCZ_or_2T_error = L2_topological_error + L2_distillation_error
return L2_total_CCZ_or_2T_error
def _physical_qubits_per_logical_qubit(code_distance: int) -> int:
return (code_distance + 1)**2 * 2
def cost_estimator(num_logical_qubits,
num_toffoli,
physical_error_rate=1.0E-3,
portion_of_bounding_box=1.):
"""
Produce best cost in terms of physical qubits and real run time based on
number of toffoli, number of logical qubits, and physical error rate.
"""
best_cost = None
best_params = None
for factory in iter_known_factories(
physical_error_rate=physical_error_rate):
for logical_data_qubit_distance in range(7, 35, 2):
params = AlgorithmParameters(
physical_error_rate=physical_error_rate,
surface_code_cycle_time=datetime.timedelta(microseconds=1),
logical_data_qubit_distance=logical_data_qubit_distance,
magic_state_factory=factory,
toffoli_count=num_toffoli,
max_allocated_logical_qubits=num_logical_qubits,
factory_count=4,
routing_overhead_proportion=0.5,
proportion_of_bounding_box=portion_of_bounding_box)
cost = params.estimate_cost()
if cost.algorithm_failure_probability > 0.1:
continue
if best_cost is None or cost.physical_qubit_count * cost.duration \
< best_cost.physical_qubit_count * best_cost.duration:
best_cost = cost
best_params = params
return best_cost, best_params | |
MedicinalProductDefinition_Characteristic.rs | #![allow(unused_imports, non_camel_case_types)]
use crate::models::r4b::Attachment::Attachment;
use crate::models::r4b::CodeableConcept::CodeableConcept;
use crate::models::r4b::Element::Element;
use crate::models::r4b::Extension::Extension;
use crate::models::r4b::Quantity::Quantity;
use serde_json::json;
use serde_json::value::Value;
use std::borrow::Cow;
/// A medicinal product, being a substance or combination of substances that is
/// intended to treat, prevent or diagnose a disease, or to restore, correct or modify
/// physiological functions by exerting a pharmacological, immunological or metabolic
/// action. This resource is intended to define and detail such products and their
/// properties, for uses other than direct patient care (e.g. regulatory use, or drug
/// catalogs).
#[derive(Debug)]
pub struct MedicinalProductDefinition_Characteristic<'a> {
pub(crate) value: Cow<'a, Value>,
}
impl MedicinalProductDefinition_Characteristic<'_> {
pub fn new(value: &Value) -> MedicinalProductDefinition_Characteristic {
MedicinalProductDefinition_Characteristic {
value: Cow::Borrowed(value),
}
}
pub fn to_json(&self) -> Value {
(*self.value).clone()
}
/// Extensions for valueBoolean
pub fn _value_boolean(&self) -> Option<Element> {
if let Some(val) = self.value.get("_valueBoolean") {
return Some(Element {
value: Cow::Borrowed(val),
});
}
return None;
}
/// Extensions for valueDate
pub fn _value_date(&self) -> Option<Element> {
if let Some(val) = self.value.get("_valueDate") {
return Some(Element {
value: Cow::Borrowed(val),
});
}
return None;
}
/// May be used to represent additional information that is not part of the basic
/// definition of the element. To make the use of extensions safe and manageable,
/// there is a strict set of governance applied to the definition and use of
/// extensions. Though any implementer can define an extension, there is a set of
/// requirements that SHALL be met as part of the definition of the extension.
pub fn extension(&self) -> Option<Vec<Extension>> {
if let Some(Value::Array(val)) = self.value.get("extension") {
return Some(
val.into_iter()
.map(|e| Extension {
value: Cow::Borrowed(e),
})
.collect::<Vec<_>>(),
);
}
return None;
}
/// Unique id for the element within a resource (for internal references). This may be
/// any string value that does not contain spaces.
pub fn id(&self) -> Option<&str> {
if let Some(Value::String(string)) = self.value.get("id") {
return Some(string);
}
return None;
}
/// May be used to represent additional information that is not part of the basic
/// definition of the element and that modifies the understanding of the element
/// in which it is contained and/or the understanding of the containing element's
/// descendants. Usually modifier elements provide negation or qualification. To make
/// the use of extensions safe and manageable, there is a strict set of governance
/// applied to the definition and use of extensions. Though any implementer can define
/// an extension, there is a set of requirements that SHALL be met as part of the
/// definition of the extension. Applications processing a resource are required to
/// check for modifier extensions. Modifier extensions SHALL NOT change the meaning
/// of any elements on Resource or DomainResource (including cannot change the meaning
/// of modifierExtension itself).
pub fn modifier_extension(&self) -> Option<Vec<Extension>> {
if let Some(Value::Array(val)) = self.value.get("modifierExtension") {
return Some(
val.into_iter()
.map(|e| Extension {
value: Cow::Borrowed(e),
})
.collect::<Vec<_>>(),
);
}
return None;
}
/// A code expressing the type of characteristic.
pub fn fhir_type(&self) -> CodeableConcept |
/// A value for the characteristic.
pub fn value_attachment(&self) -> Option<Attachment> {
if let Some(val) = self.value.get("valueAttachment") {
return Some(Attachment {
value: Cow::Borrowed(val),
});
}
return None;
}
/// A value for the characteristic.
pub fn value_boolean(&self) -> Option<bool> {
if let Some(val) = self.value.get("valueBoolean") {
return Some(val.as_bool().unwrap());
}
return None;
}
/// A value for the characteristic.
pub fn value_codeable_concept(&self) -> Option<CodeableConcept> {
if let Some(val) = self.value.get("valueCodeableConcept") {
return Some(CodeableConcept {
value: Cow::Borrowed(val),
});
}
return None;
}
/// A value for the characteristic.
pub fn value_date(&self) -> Option<&str> {
if let Some(Value::String(string)) = self.value.get("valueDate") {
return Some(string);
}
return None;
}
/// A value for the characteristic.
pub fn value_quantity(&self) -> Option<Quantity> {
if let Some(val) = self.value.get("valueQuantity") {
return Some(Quantity {
value: Cow::Borrowed(val),
});
}
return None;
}
pub fn validate(&self) -> bool {
if let Some(_val) = self._value_boolean() {
if !_val.validate() {
return false;
}
}
if let Some(_val) = self._value_date() {
if !_val.validate() {
return false;
}
}
if let Some(_val) = self.extension() {
if !_val.into_iter().map(|e| e.validate()).all(|x| x == true) {
return false;
}
}
if let Some(_val) = self.id() {}
if let Some(_val) = self.modifier_extension() {
if !_val.into_iter().map(|e| e.validate()).all(|x| x == true) {
return false;
}
}
if !self.fhir_type().validate() {
return false;
}
if let Some(_val) = self.value_attachment() {
if !_val.validate() {
return false;
}
}
if let Some(_val) = self.value_boolean() {}
if let Some(_val) = self.value_codeable_concept() {
if !_val.validate() {
return false;
}
}
if let Some(_val) = self.value_date() {}
if let Some(_val) = self.value_quantity() {
if !_val.validate() {
return false;
}
}
return true;
}
}
#[derive(Debug)]
pub struct MedicinalProductDefinition_CharacteristicBuilder {
pub(crate) value: Value,
}
impl MedicinalProductDefinition_CharacteristicBuilder {
pub fn build(&self) -> MedicinalProductDefinition_Characteristic {
MedicinalProductDefinition_Characteristic {
value: Cow::Owned(self.value.clone()),
}
}
pub fn with(
existing: MedicinalProductDefinition_Characteristic,
) -> MedicinalProductDefinition_CharacteristicBuilder {
MedicinalProductDefinition_CharacteristicBuilder {
value: (*existing.value).clone(),
}
}
pub fn new(fhir_type: CodeableConcept) -> MedicinalProductDefinition_CharacteristicBuilder {
let mut __value: Value = json!({});
__value["type"] = json!(fhir_type.value);
return MedicinalProductDefinition_CharacteristicBuilder { value: __value };
}
pub fn _value_boolean<'a>(
&'a mut self,
val: Element,
) -> &'a mut MedicinalProductDefinition_CharacteristicBuilder {
self.value["_valueBoolean"] = json!(val.value);
return self;
}
pub fn _value_date<'a>(
&'a mut self,
val: Element,
) -> &'a mut MedicinalProductDefinition_CharacteristicBuilder {
self.value["_valueDate"] = json!(val.value);
return self;
}
pub fn extension<'a>(
&'a mut self,
val: Vec<Extension>,
) -> &'a mut MedicinalProductDefinition_CharacteristicBuilder {
self.value["extension"] = json!(val.into_iter().map(|e| e.value).collect::<Vec<_>>());
return self;
}
pub fn id<'a>(
&'a mut self,
val: &str,
) -> &'a mut MedicinalProductDefinition_CharacteristicBuilder {
self.value["id"] = json!(val);
return self;
}
pub fn modifier_extension<'a>(
&'a mut self,
val: Vec<Extension>,
) -> &'a mut MedicinalProductDefinition_CharacteristicBuilder {
self.value["modifierExtension"] =
json!(val.into_iter().map(|e| e.value).collect::<Vec<_>>());
return self;
}
pub fn value_attachment<'a>(
&'a mut self,
val: Attachment,
) -> &'a mut MedicinalProductDefinition_CharacteristicBuilder {
self.value["valueAttachment"] = json!(val.value);
return self;
}
pub fn value_boolean<'a>(
&'a mut self,
val: bool,
) -> &'a mut MedicinalProductDefinition_CharacteristicBuilder {
self.value["valueBoolean"] = json!(val);
return self;
}
pub fn value_codeable_concept<'a>(
&'a mut self,
val: CodeableConcept,
) -> &'a mut MedicinalProductDefinition_CharacteristicBuilder {
self.value["valueCodeableConcept"] = json!(val.value);
return self;
}
pub fn value_date<'a>(
&'a mut self,
val: &str,
) -> &'a mut MedicinalProductDefinition_CharacteristicBuilder {
self.value["valueDate"] = json!(val);
return self;
}
pub fn value_quantity<'a>(
&'a mut self,
val: Quantity,
) -> &'a mut MedicinalProductDefinition_CharacteristicBuilder {
self.value["valueQuantity"] = json!(val.value);
return self;
}
}
| {
CodeableConcept {
value: Cow::Borrowed(&self.value["type"]),
}
} |
asgi.py | """
ASGI config for Assignment project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/ | """
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Assignment.settings')
application = get_asgi_application() | |
main_test.go | package choose
import (
"testing"
"github.com/ready-steady/assert"
)
func TestUniformUint(t *testing.T) {
cases := []struct {
sequence []uint
choose uint
chosen []uint
}{
{
sequence: []uint{11, 21, 31, 41, 51},
choose: 0,
chosen: []uint{},
},
{
sequence: []uint{11, 21, 31, 41, 51},
choose: 1, | sequence: []uint{11, 21, 31, 41, 51},
choose: 2,
chosen: []uint{11, 51},
},
{
sequence: []uint{11, 21, 31, 41, 51},
choose: 10,
chosen: []uint{11, 21, 31, 41, 51},
},
{
sequence: []uint{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 31, 35, 41},
choose: 5,
chosen: []uint{1, 11, 21, 31, 41},
},
{
sequence: []uint{0, 2, 3, 40, 100},
choose: 4,
chosen: []uint{0, 3, 40, 100},
},
}
for _, c := range cases {
indices := UniformUint(c.sequence, c.choose)
chosen := make([]uint, len(indices))
for i, j := range indices {
chosen[i] = c.sequence[j]
}
assert.Equal(chosen, c.chosen, t)
}
} | chosen: []uint{11},
},
{ |
config.rs | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Service config.
///
///
/// Service configuration allows for customization of endpoints, region, credentials providers,
/// and retry configuration. Generally, it is constructed automatically for you from a shared
/// configuration loaded by the `aws-config` crate. For example:
///
/// ```ignore
/// // Load a shared config from the environment
/// let shared_config = aws_config::from_env().load().await;
/// // The client constructor automatically converts the shared config into the service config
/// let client = Client::new(&shared_config);
/// ```
///
/// The service config can also be constructed manually using its builder.
///
pub struct Config {
app_name: Option<aws_types::app_name::AppName>,
pub(crate) timeout_config: Option<aws_smithy_types::timeout::TimeoutConfig>,
pub(crate) sleep_impl: Option<std::sync::Arc<dyn aws_smithy_async::rt::sleep::AsyncSleep>>,
pub(crate) retry_config: Option<aws_smithy_types::retry::RetryConfig>,
pub(crate) endpoint_resolver: ::std::sync::Arc<dyn aws_endpoint::ResolveAwsEndpoint>,
pub(crate) region: Option<aws_types::region::Region>,
pub(crate) credentials_provider: aws_types::credentials::SharedCredentialsProvider,
}
impl std::fmt::Debug for Config {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut config = f.debug_struct("Config");
config.finish()
}
}
impl Config {
/// Constructs a config builder.
pub fn builder() -> Builder {
Builder::default()
}
/// Returns the name of the app that is using the client, if it was provided.
///
/// This _optional_ name is used to identify the application in the user agent that
/// gets sent along with requests.
pub fn app_name(&self) -> Option<&aws_types::app_name::AppName> {
self.app_name.as_ref()
}
/// Creates a new [service config](crate::Config) from a [shared `config`](aws_types::config::Config).
pub fn new(config: &aws_types::config::Config) -> Self {
Builder::from(config).build()
}
/// The signature version 4 service signing name to use in the credential scope when signing requests.
///
/// The signing service may be overridden by the `Endpoint`, or by specifying a custom
/// [`SigningService`](aws_types::SigningService) during operation construction
pub fn signing_service(&self) -> &'static str {
"pricing"
}
}
/// Builder for creating a `Config`.
#[derive(Default)]
pub struct Builder {
app_name: Option<aws_types::app_name::AppName>,
timeout_config: Option<aws_smithy_types::timeout::TimeoutConfig>,
sleep_impl: Option<std::sync::Arc<dyn aws_smithy_async::rt::sleep::AsyncSleep>>,
retry_config: Option<aws_smithy_types::retry::RetryConfig>,
endpoint_resolver: Option<::std::sync::Arc<dyn aws_endpoint::ResolveAwsEndpoint>>,
region: Option<aws_types::region::Region>,
credentials_provider: Option<aws_types::credentials::SharedCredentialsProvider>,
}
impl Builder {
/// Constructs a config builder.
pub fn new() -> Self {
Self::default()
}
/// Sets the name of the app that is using the client.
///
/// This _optional_ name is used to identify the application in the user agent that
/// gets sent along with requests.
pub fn app_name(mut self, app_name: aws_types::app_name::AppName) -> Self {
self.set_app_name(Some(app_name));
self
}
/// Sets the name of the app that is using the client.
///
/// This _optional_ name is used to identify the application in the user agent that
/// gets sent along with requests.
pub fn | (&mut self, app_name: Option<aws_types::app_name::AppName>) -> &mut Self {
self.app_name = app_name;
self
}
/// Set the timeout_config for the builder
///
/// # Examples
/// ```rust
/// # use std::time::Duration;
/// use aws_sdk_pricing::config::Config;
/// use aws_smithy_types::timeout::TimeoutConfig;
///
/// let timeout_config = TimeoutConfig::new()
/// .with_api_call_attempt_timeout(Some(Duration::from_secs(1)));
/// let config = Config::builder().timeout_config(timeout_config).build();
/// ```
pub fn timeout_config(
mut self,
timeout_config: aws_smithy_types::timeout::TimeoutConfig,
) -> Self {
self.set_timeout_config(Some(timeout_config));
self
}
/// Set the timeout_config for the builder
///
/// # Examples
/// ```rust
/// # use std::time::Duration;
/// use aws_sdk_pricing::config::{Builder, Config};
/// use aws_smithy_types::timeout::TimeoutConfig;
///
/// fn set_request_timeout(builder: &mut Builder) {
/// let timeout_config = TimeoutConfig::new()
/// .with_api_call_timeout(Some(Duration::from_secs(3)));
/// builder.set_timeout_config(Some(timeout_config));
/// }
///
/// let mut builder = Config::builder();
/// set_request_timeout(&mut builder);
/// let config = builder.build();
/// ```
pub fn set_timeout_config(
&mut self,
timeout_config: Option<aws_smithy_types::timeout::TimeoutConfig>,
) -> &mut Self {
self.timeout_config = timeout_config;
self
}
/// Set the sleep_impl for the builder
///
/// # Examples
/// ```rust
/// use aws_sdk_pricing::config::Config;
/// use aws_smithy_async::rt::sleep::AsyncSleep;
/// use aws_smithy_async::rt::sleep::Sleep;
///
/// #[derive(Debug)]
/// pub struct ForeverSleep;
///
/// impl AsyncSleep for ForeverSleep {
/// fn sleep(&self, duration: std::time::Duration) -> Sleep {
/// Sleep::new(std::future::pending())
/// }
/// }
///
/// let sleep_impl = std::sync::Arc::new(ForeverSleep);
/// let config = Config::builder().sleep_impl(sleep_impl).build();
/// ```
pub fn sleep_impl(
mut self,
sleep_impl: std::sync::Arc<dyn aws_smithy_async::rt::sleep::AsyncSleep>,
) -> Self {
self.set_sleep_impl(Some(sleep_impl));
self
}
/// Set the sleep_impl for the builder
///
/// # Examples
/// ```rust
/// use aws_sdk_pricing::config::{Builder, Config};
/// use aws_smithy_async::rt::sleep::AsyncSleep;
/// use aws_smithy_async::rt::sleep::Sleep;
///
/// #[derive(Debug)]
/// pub struct ForeverSleep;
///
/// impl AsyncSleep for ForeverSleep {
/// fn sleep(&self, duration: std::time::Duration) -> Sleep {
/// Sleep::new(std::future::pending())
/// }
/// }
///
/// fn set_never_ending_sleep_impl(builder: &mut Builder) {
/// let sleep_impl = std::sync::Arc::new(ForeverSleep);
/// builder.set_sleep_impl(Some(sleep_impl));
/// }
///
/// let mut builder = Config::builder();
/// set_never_ending_sleep_impl(&mut builder);
/// let config = builder.build();
/// ```
pub fn set_sleep_impl(
&mut self,
sleep_impl: Option<std::sync::Arc<dyn aws_smithy_async::rt::sleep::AsyncSleep>>,
) -> &mut Self {
self.sleep_impl = sleep_impl;
self
}
/// Set the retry_config for the builder
///
/// # Examples
/// ```rust
/// use aws_sdk_pricing::config::Config;
/// use aws_smithy_types::retry::RetryConfig;
///
/// let retry_config = RetryConfig::new().with_max_attempts(5);
/// let config = Config::builder().retry_config(retry_config).build();
/// ```
pub fn retry_config(mut self, retry_config: aws_smithy_types::retry::RetryConfig) -> Self {
self.set_retry_config(Some(retry_config));
self
}
/// Set the retry_config for the builder
///
/// # Examples
/// ```rust
/// use aws_sdk_pricing::config::{Builder, Config};
/// use aws_smithy_types::retry::RetryConfig;
///
/// fn disable_retries(builder: &mut Builder) {
/// let retry_config = RetryConfig::new().with_max_attempts(1);
/// builder.set_retry_config(Some(retry_config));
/// }
///
/// let mut builder = Config::builder();
/// disable_retries(&mut builder);
/// let config = builder.build();
/// ```
pub fn set_retry_config(
&mut self,
retry_config: Option<aws_smithy_types::retry::RetryConfig>,
) -> &mut Self {
self.retry_config = retry_config;
self
}
// TODO(docs): include an example of using a static endpoint
/// Sets the endpoint resolver to use when making requests.
pub fn endpoint_resolver(
mut self,
endpoint_resolver: impl aws_endpoint::ResolveAwsEndpoint + 'static,
) -> Self {
self.endpoint_resolver = Some(::std::sync::Arc::new(endpoint_resolver));
self
}
/// Sets the AWS region to use when making requests.
pub fn region(mut self, region: impl Into<Option<aws_types::region::Region>>) -> Self {
self.region = region.into();
self
}
/// Sets the credentials provider for this service
pub fn credentials_provider(
mut self,
credentials_provider: impl aws_types::credentials::ProvideCredentials + 'static,
) -> Self {
self.credentials_provider = Some(aws_types::credentials::SharedCredentialsProvider::new(
credentials_provider,
));
self
}
/// Sets the credentials provider for this service
pub fn set_credentials_provider(
&mut self,
credentials_provider: Option<aws_types::credentials::SharedCredentialsProvider>,
) -> &mut Self {
self.credentials_provider = credentials_provider;
self
}
/// Builds a [`Config`].
pub fn build(self) -> Config {
Config {
app_name: self.app_name,
timeout_config: self.timeout_config,
sleep_impl: self.sleep_impl,
retry_config: self.retry_config,
endpoint_resolver: self
.endpoint_resolver
.unwrap_or_else(|| ::std::sync::Arc::new(crate::aws_endpoint::endpoint_resolver())),
region: self.region,
credentials_provider: self.credentials_provider.unwrap_or_else(|| {
aws_types::credentials::SharedCredentialsProvider::new(
crate::no_credentials::NoCredentials,
)
}),
}
}
}
impl From<&aws_types::config::Config> for Builder {
fn from(input: &aws_types::config::Config) -> Self {
let mut builder = Builder::default();
builder = builder.region(input.region().cloned());
builder.set_retry_config(input.retry_config().cloned());
builder.set_timeout_config(input.timeout_config().cloned());
builder.set_sleep_impl(input.sleep_impl().clone());
builder.set_credentials_provider(input.credentials_provider().cloned());
builder.set_app_name(input.app_name().cloned());
builder
}
}
impl From<&aws_types::config::Config> for Config {
fn from(config: &aws_types::config::Config) -> Self {
Builder::from(config).build()
}
}
| set_app_name |
board_test.go | package models
import (
"testing"
"github.com/stretchr/testify/assert"
)
func cleanBoard() *Board {
b := InitialBoard()
b.Grid[0][8] = EmptyCell
b.Grid[15][8] = EmptyCell
return b
}
func TestInitialBoardAdvanceNoWinner(t *testing.T) {
b := InitialBoard()
w, _ := b.Advance()
assert.Equal(t, w, (Winner)(NoWinner))
assert.Equal(t, b.Grid[0][8], (Cell)(P1Tail))
assert.Equal(t, b.Grid[15][8], (Cell)(P2Tail))
assert.Equal(t, b.Grid[1][8], (Cell)(P1Head))
assert.Equal(t, b.Grid[14][8], (Cell)(P2Head))
}
func TestInitialBoardAdvanceDraw(t *testing.T) {
b := InitialBoard()
b.P1.Direction = Left
b.P2.Direction = Right
w, _ := b.Advance()
assert.Equal(t, w, (Winner)(Draw))
}
func TestInitialBoardAdvanceP1Wins(t *testing.T) {
b := InitialBoard()
b.P1.Direction = Right
b.P2.Direction = Right
w, _ := b.Advance()
assert.Equal(t, w, (Winner)(P1Wins))
}
func TestInitialBoardAdvanceP2Wins(t *testing.T) {
b := InitialBoard()
b.P1.Direction = Left
b.P2.Direction = Left
w, _ := b.Advance()
assert.Equal(t, w, (Winner)(P2Wins))
}
func TestDrawWhenArriveAtTheSameCell(t *testing.T) {
b := cleanBoard()
b.Grid[6][8] = P1Head
b.Grid[8][8] = P2Head | w, _ := b.Advance()
assert.Equal(t, w, (Winner)(Draw))
assert.Equal(t, b.Grid[7][8], (Cell)(Crash))
} | |
pipeline-hetero-ftl-with-predict.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import argparse
from pipeline.backend.pipeline import PipeLine
from pipeline.component import DataTransform
from pipeline.component.hetero_ftl import HeteroFTL
from pipeline.component.reader import Reader
from pipeline.interface.data import Data
from tensorflow.keras import optimizers
from tensorflow.keras.layers import Dense
from tensorflow.keras import initializers
from pipeline.component.evaluation import Evaluation
from pipeline.utils.tools import load_job_config
def | (config="../../config.yaml", namespace=""):
# obtain config
if isinstance(config, str):
config = load_job_config(config)
parties = config.parties
guest = parties.guest[0]
host = parties.host[0]
guest_train_data = {"name": "nus_wide_guest", "namespace": f"experiment{namespace}"}
host_train_data = {"name": "nus_wide_host", "namespace": f"experiment{namespace}"}
pipeline = PipeLine().set_initiator(role='guest', party_id=guest).set_roles(guest=guest, host=host)
reader_0 = Reader(name="reader_0")
reader_0.get_party_instance(role='guest', party_id=guest).component_param(table=guest_train_data)
reader_0.get_party_instance(role='host', party_id=host).component_param(table=host_train_data)
data_transform_0 = DataTransform(name="data_transform_0")
data_transform_0.get_party_instance(
role='guest', party_id=guest).component_param(
with_label=True, output_format="dense")
data_transform_0.get_party_instance(role='host', party_id=host).component_param(with_label=False)
hetero_ftl_0 = HeteroFTL(name='hetero_ftl_0',
epochs=10, alpha=1, batch_size=-1, mode='plain')
hetero_ftl_0.add_nn_layer(Dense(units=32, activation='sigmoid',
kernel_initializer=initializers.RandomNormal(stddev=1.0),
bias_initializer=initializers.Zeros()))
hetero_ftl_0.compile(optimizer=optimizers.Adam(lr=0.01))
evaluation_0 = Evaluation(name='evaluation_0', eval_type="binary")
pipeline.add_component(reader_0)
pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data))
pipeline.add_component(hetero_ftl_0, data=Data(train_data=data_transform_0.output.data))
pipeline.add_component(evaluation_0, data=Data(data=hetero_ftl_0.output.data))
pipeline.compile()
pipeline.fit()
# predict
# deploy required components
pipeline.deploy_component([data_transform_0, hetero_ftl_0])
predict_pipeline = PipeLine()
# add data reader onto predict pipeline
predict_pipeline.add_component(reader_0)
# add selected components from train pipeline onto predict pipeline
# specify data source
predict_pipeline.add_component(
pipeline, data=Data(
predict_input={
pipeline.data_transform_0.input.data: reader_0.output.data}))
# run predict model
predict_pipeline.predict()
if __name__ == "__main__":
parser = argparse.ArgumentParser("PIPELINE DEMO")
parser.add_argument("-config", type=str,
help="config file")
args = parser.parse_args()
if args.config is not None:
main(args.config)
else:
main()
| main |
41-invalid-param-type-in-interface.rs | use liquid_lang as liquid;
#[liquid::interface(name = auto)]
mod foo {
extern "liquid" {
fn bar(&self, _f: f32);
}
}
fn | () {}
| main |
app.js | 'use strict';
var fichador = angular.module('MyApp', [
'ngRoute',
'services',
'commonControllers',
'loginControllers',
'moduleComponent',
'ngMaterial',
'Directives'
]).config(function ($mdDateLocaleProvider) {
// Example of a Spanish localization.
$mdDateLocaleProvider.months = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio',
'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'];
$mdDateLocaleProvider.shortMonths = ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun',
'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'];
$mdDateLocaleProvider.days = ['Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sábado'];
$mdDateLocaleProvider.shortDays = ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sá'];
// Can change week display to start on Monday. | return 'Semana ' + weekNumber;
};
$mdDateLocaleProvider.msgCalendar = 'Calendario';
$mdDateLocaleProvider.msgOpenCalendar = 'Abrir calendario';
$mdDateLocaleProvider.formatDate = function (date) {
return moment(date).format('DD-MM-YYYY');
};
});
var moduleCommon = angular.module('commonControllers', []);
var moduleService = angular.module('services', []);
var moduleTipousuario = angular.module('tipousuarioControllers', []);
var moduleTipoproducto = angular.module('tipoproductoControllers', []);
var moduleLinea = angular.module('lineaControllers', []);
var moduleComponent = angular.module('moduleComponent', []);
var moduleLogin = angular.module('loginControllers', []);
var moduloDirectivas = angular.module('Directives', []); | $mdDateLocaleProvider.firstDayOfWeek = 1;
$mdDateLocaleProvider.weekNumberFormatter = function (weekNumber) { |
test.rs | use cosmwasm_bignumber::Uint256;
use cosmwasm_std::testing::{
mock_dependencies, mock_env, mock_info, MockApi, MockQuerier, MockStorage,
};
use cosmwasm_std::{from_binary, Env, MessageInfo, OwnedDeps, Response};
use pylon_gateway::cap_strategy_msg::QueryMsg;
use pylon_gateway::cap_strategy_resp::AvailableCapOfResponse;
use crate::contract::ExecuteMsg;
use crate::{contract, state};
const OWNER: &str = "owner";
const NEW_OWNER: &str = "new_owner";
fn init_contract(
deps: &mut OwnedDeps<MockStorage, MockApi, MockQuerier>,
min_user_cap: Uint256,
max_user_cap: Uint256,
) -> (Env, MessageInfo) {
let env = mock_env();
let info = mock_info(OWNER, &[]);
let resp = contract::instantiate(
deps.as_mut(),
env.clone(),
info.clone(),
contract::InstantiateMsg {
min_user_cap,
max_user_cap,
},
)
.expect("testing: should init contract");
assert_eq!(resp, Response::default());
(env, info)
}
#[test]
fn instantiate() {
let mut deps = mock_dependencies(&[]);
let min_user_cap = Uint256::from(10u64);
let max_user_cap = Uint256::from(1500u64);
let _ = init_contract(&mut deps, min_user_cap, max_user_cap);
let config = state::config_r(deps.as_ref().storage).load().unwrap();
assert_eq!(
config,
state::Config {
owner: OWNER.to_string(),
min_user_cap,
max_user_cap
}
);
}
#[test]
fn execute_configure() {
let mut deps = mock_dependencies(&[]);
let mut min_user_cap = Uint256::from(10u64);
let mut max_user_cap = Uint256::from(1500u64);
let (env, owner) = init_contract(&mut deps, min_user_cap, max_user_cap);
min_user_cap += Uint256::from(100u64);
max_user_cap = max_user_cap - Uint256::from(100u64);
let msg = ExecuteMsg::Configure {
owner: Option::from(NEW_OWNER.to_string()),
min_user_cap: Option::from(min_user_cap),
max_user_cap: Option::from(max_user_cap),
};
let resp = contract::execute(deps.as_mut(), env, owner, msg)
.expect("testing: should able to configure settings");
assert_eq!(resp, Response::default());
let config = state::config_r(deps.as_ref().storage).load().unwrap();
assert_eq!(
config,
state::Config {
owner: NEW_OWNER.to_string(),
min_user_cap,
max_user_cap
}
);
}
#[test]
fn | () {
let mut deps = mock_dependencies(&[]);
let min_user_cap = Uint256::from(10u64);
let max_user_cap = Uint256::from(1500u64);
let (env, _) = init_contract(&mut deps, min_user_cap, max_user_cap);
// lt min_user_cap
let amount = min_user_cap - Uint256::from(1u64);
let msg = QueryMsg::AvailableCapOf {
address: "".to_string(),
amount,
};
let resp = from_binary::<AvailableCapOfResponse>(
&contract::query(deps.as_ref(), env.clone(), msg)
.expect("testing: should able to query available cap"),
)
.unwrap();
assert_eq!(resp.amount, max_user_cap - amount);
// gt min_user_cap && lt max_user_cap
let amount = min_user_cap + Uint256::from(1u64);
let msg = QueryMsg::AvailableCapOf {
address: "".to_string(),
amount,
};
let resp = from_binary::<AvailableCapOfResponse>(
&contract::query(deps.as_ref(), env.clone(), msg)
.expect("testing: should able to query available cap"),
)
.unwrap();
assert_eq!(resp.amount, max_user_cap - amount);
let amount = max_user_cap - Uint256::from(1u64);
let msg = QueryMsg::AvailableCapOf {
address: "".to_string(),
amount,
};
let resp = from_binary::<AvailableCapOfResponse>(
&contract::query(deps.as_ref(), env.clone(), msg)
.expect("testing: should able to query available cap"),
)
.unwrap();
assert_eq!(resp.amount, max_user_cap - amount);
// gt max_user_cap
let amount = max_user_cap + Uint256::from(1u64);
let msg = QueryMsg::AvailableCapOf {
address: "".to_string(),
amount,
};
let resp = from_binary::<AvailableCapOfResponse>(
&contract::query(deps.as_ref(), env, msg)
.expect("testing: should able to query available cap"),
)
.unwrap();
assert_eq!(resp.amount, Uint256::zero());
}
| query_available_cap |
challenges.min.js | !function(r){function e(e){for(var t,o,n=e[0],s=e[1],a=e[2],i=0,l=[];i<n.length;i++)o=n[i],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&l.push(c[o][0]),c[o]=0;for(t in s)Object.prototype.hasOwnProperty.call(s,t)&&(r[t]=s[t]);for(m&&m(e);l.length;)l.shift()();return u.push.apply(u,a||[]),d()}function d(){for(var e,t=0;t<u.length;t++){for(var o=u[t],n=!0,s=1;s<o.length;s++){var a=o[s];0!==c[a]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=o[0]))}return e}var o={},c={3:0,4:0},u=[];function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=r,i.c=o,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/themes/core/static/js";var t=window.webpackJsonp=window.webpackJsonp||[],n=t.push.bind(t);t.push=e,t=t.slice();for(var s=0;s<t.length;s++)e(t[s]);var m=n;u.push(["./CTFd/themes/core/assets/js/pages/challenges.js",0,1]),d()}({"./CTFd/themes/core/assets/js/CTFd.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(o("./CTFd/themes/core/assets/js/fetch.js")),s=d(o("./CTFd/themes/core/assets/js/config.js")),a=o("./CTFd/themes/core/assets/js/api.js");o("./CTFd/themes/core/assets/js/patch.js");var i=d(o("./node_modules/markdown-it/index.js")),l=d(o("./node_modules/jquery/dist/jquery.js")),r=d(o("./CTFd/themes/core/assets/js/ezq.js"));function d(e){return e&&e.__esModule?e:{default:e}}function c(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var u=new a.API("/"),m={},p={ezq:r.default},f={$:l.default,markdown:function(e){var t=function(t){for(var e=1;e<arguments.length;e++)if(e%2){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),n.forEach(function(e){c(t,e,o[e])})}else Object.defineProperties(t,Object.getOwnPropertyDescriptors(arguments[e]));return t}({},{html:!0,linkify:!0},{},e),o=(0,i.default)(t);return o.renderer.rules.link_open=function(e,t,o,n,s){return e[t].attrPush(["target","_blank"]),s.renderToken(e,t,o)},o}},j=!1,h={run:function(e){e(_)}};var _={init:function(e){j||(j=!0,s.default.urlRoot=e.urlRoot||s.default.urlRoot,s.default.csrfNonce=e.csrfNonce||s.default.csrfNonce,s.default.userMode=e.userMode||s.default.userMode,u.domain=s.default.urlRoot+"/api/v1",m.id=e.userId)},config:s.default,fetch:n.default,user:m,ui:p,api:u,lib:f,_internal:{},plugin:h},g=_;t.default=g},"./CTFd/themes/core/assets/js/api.js":function(e,t,o){var c=n(o("./CTFd/themes/core/assets/js/fetch.js")),l=n(o("./node_modules/q/q.js"));function n(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=function(){"use strict";function e(e){var t="object"===s(e)?e.domain:e;if(this.domain=t||"",0===this.domain.length)throw new Error("Domain parameter must be specified as a string.")}function i(o,n){return o.$queryParameters&&Object.keys(o.$queryParameters).forEach(function(e){var t=o.$queryParameters[e];n[e]=t}),n}return e.prototype.request=function(e,t,o,n,s,a,i,l){var r=a&&Object.keys(a).length?function(e){var t=[];for(var o in e)e.hasOwnProperty(o)&&t.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return t.join("&")}(a):null,d=t+(r?"?"+r:"");n&&!Object.keys(n).length&&(n=void 0),(0,c.default)(d,{method:e,headers:s,body:JSON.stringify(n)}).then(function(e){return e.json()}).then(function(e){l.resolve(e)}).catch(function(e){l.reject(e)})},e.prototype.post_award_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/awards",e,{},s,n,{},t),t.promise},e.prototype.delete_award=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/awards/{award_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{award_id}",e.awardId),void 0===e.awardId?t.reject(new Error("Missing required parameter: awardId")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_award=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/awards/{award_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{award_id}",e.awardId),void 0===e.awardId?t.reject(new Error("Missing required parameter: awardId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.post_challenge_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/challenges",e,{},s,n,{},t),t.promise},e.prototype.get_challenge_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/challenges",e,{},s,n,{},t),t.promise},e.prototype.post_challenge_attempt=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/challenges/attempt",e,{},s,n,{},t),t.promise},e.prototype.get_challenge_types=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/challenges/types",e,{},s,n,{},t),t.promise},e.prototype.patch_challenge=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/challenges/{challenge_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?t.reject(new Error("Missing required parameter: challengeId")):(s=i(e,s),this.request("PATCH",o+n,e,{},a,s,{},t)),t.promise},e.prototype.delete_challenge=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/challenges/{challenge_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?t.reject(new Error("Missing required parameter: challengeId")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_challenge=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/challenges/{challenge_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?t.reject(new Error("Missing required parameter: challengeId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_challenge_files=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/challenges/{challenge_id}/files",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],void 0!==e.id&&(s.id=e.id),n=n.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?t.reject(new Error("Missing required parameter: challengeId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_challenge_flags=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/challenges/{challenge_id}/flags",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],void 0!==e.id&&(s.id=e.id),n=n.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?t.reject(new Error("Missing required parameter: challengeId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_challenge_hints=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/challenges/{challenge_id}/hints",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],void 0!==e.id&&(s.id=e.id),n=n.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?t.reject(new Error("Missing required parameter: challengeId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_challenge_solves=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/challenges/{challenge_id}/solves",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],void 0!==e.id&&(s.id=e.id),n=n.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?t.reject(new Error("Missing required parameter: challengeId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_challenge_tags=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/challenges/{challenge_id}/tags",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],void 0!==e.id&&(s.id=e.id),n=n.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?t.reject(new Error("Missing required parameter: challengeId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.post_config_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/configs",e,{},s,n,{},t),t.promise},e.prototype.patch_config_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("PATCH",o+"/configs",e,{},s,n,{},t),t.promise},e.prototype.get_config_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/configs",e,{},s,n,{},t),t.promise},e.prototype.patch_config=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/configs/{config_key}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{config_key}",e.configKey),void 0===e.configKey?t.reject(new Error("Missing required parameter: configKey")):(s=i(e,s),this.request("PATCH",o+n,e,{},a,s,{},t)),t.promise},e.prototype.delete_config=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/configs/{config_key}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{config_key}",e.configKey),void 0===e.configKey?t.reject(new Error("Missing required parameter: configKey")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_config=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/configs/{config_key}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{config_key}",e.configKey),void 0===e.configKey?t.reject(new Error("Missing required parameter: configKey")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.post_files_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/files",e,{},s,n,{},t),t.promise},e.prototype.get_files_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/files",e,{},s,n,{},t),t.promise},e.prototype.delete_files_detail=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/files/{file_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{file_id}",e.fileId),void 0===e.fileId?t.reject(new Error("Missing required parameter: fileId")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_files_detail=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/files/{file_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{file_id}",e.fileId),void 0===e.fileId?t.reject(new Error("Missing required parameter: fileId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.post_flag_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/flags",e,{},s,n,{},t),t.promise},e.prototype.get_flag_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/flags",e,{},s,n,{},t),t.promise},e.prototype.get_flag_types=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/flags/types",e,{},s,n,{},t),t.promise},e.prototype.get_flag_types_1=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/flags/types/{type_name}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{type_name}",e.typeName),void 0===e.typeName?t.reject(new Error("Missing required parameter: typeName")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.patch_flag=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/flags/{flag_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{flag_id}",e.flagId),void 0===e.flagId?t.reject(new Error("Missing required parameter: flagId")):(s=i(e,s),this.request("PATCH",o+n,e,{},a,s,{},t)),t.promise},e.prototype.delete_flag=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/flags/{flag_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{flag_id}",e.flagId),void 0===e.flagId?t.reject(new Error("Missing required parameter: flagId")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_flag=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/flags/{flag_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{flag_id}",e.flagId),void 0===e.flagId?t.reject(new Error("Missing required parameter: flagId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.post_hint_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/hints",e,{},s,n,{},t),t.promise},e.prototype.get_hint_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/hints",e,{},s,n,{},t),t.promise},e.prototype.patch_hint=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/hints/{hint_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{hint_id}",e.hintId),void 0===e.hintId?t.reject(new Error("Missing required parameter: hintId")):(s=i(e,s),this.request("PATCH",o+n,e,{},a,s,{},t)),t.promise},e.prototype.delete_hint=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/hints/{hint_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{hint_id}",e.hintId),void 0===e.hintId?t.reject(new Error("Missing required parameter: hintId")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_hint=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/hints/{hint_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{hint_id}",e.hintId),void 0===e.hintId?t.reject(new Error("Missing required parameter: hintId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.post_notification_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/notifications",e,{},s,n,{},t),t.promise},e.prototype.get_notification_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/notifications",e,{},s,n,{},t),t.promise},e.prototype.delete_notification=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/notifications/{notification_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{notification_id}",e.notificationId),void 0===e.notificationId?t.reject(new Error("Missing required parameter: notificationId")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_notification=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/notifications/{notification_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{notification_id}",e.notificationId),void 0===e.notificationId?t.reject(new Error("Missing required parameter: notificationId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.post_page_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/pages",e,{},s,n,{},t),t.promise},e.prototype.get_page_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/pages",e,{},s,n,{},t),t.promise},e.prototype.patch_page_detail=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/pages/{page_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{page_id}",e.pageId),void 0===e.pageId?t.reject(new Error("Missing required parameter: pageId")):(s=i(e,s),this.request("PATCH",o+n,e,{},a,s,{},t)),t.promise},e.prototype.delete_page_detail=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/pages/{page_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{page_id}",e.pageId),void 0===e.pageId?t.reject(new Error("Missing required parameter: pageId")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_page_detail=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/pages/{page_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{page_id}",e.pageId),void 0===e.pageId?t.reject(new Error("Missing required parameter: pageId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_scoreboard_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/scoreboard",e,{},s,n,{},t),t.promise},e.prototype.get_scoreboard_detail=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/scoreboard/top/{count}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{count}",e.count),void 0===e.count?t.reject(new Error("Missing required parameter: count")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_challenge_solve_statistics=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/statistics/challenges/solves",e,{},s,n,{},t),t.promise},e.prototype.get_challenge_solve_percentages=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/statistics/challenges/solves/percentages",e,{},s,n,{},t),t.promise},e.prototype.get_challenge_property_counts=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/statistics/challenges/{column}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{column}",e.column),void 0===e.column?t.reject(new Error("Missing required parameter: column")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_submission_property_counts=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/statistics/submissions/{column}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{column}",e.column),void 0===e.column?t.reject(new Error("Missing required parameter: column")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_team_statistics=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/statistics/teams",e,{},s,n,{},t),t.promise},e.prototype.get_user_statistics=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/statistics/users",e,{},s,n,{},t),t.promise},e.prototype.get_user_property_counts=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/statistics/users/{column}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{column}",e.column),void 0===e.column?t.reject(new Error("Missing required parameter: column")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.post_submissions_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/submissions",e,{},s,n,{},t),t.promise},e.prototype.get_submissions_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/submissions",e,{},s,n,{},t),t.promise},e.prototype.delete_submission=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/submissions/{submission_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{submission_id}",e.submissionId),void 0===e.submissionId?t.reject(new Error("Missing required parameter: submissionId")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_submission=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/submissions/{submission_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{submission_id}",e.submissionId),void 0===e.submissionId?t.reject(new Error("Missing required parameter: submissionId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.post_tag_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/tags",e,{},s,n,{},t),t.promise},e.prototype.get_tag_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/tags",e,{},s,n,{},t),t.promise},e.prototype.patch_tag=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/tags/{tag_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{tag_id}",e.tagId),void 0===e.tagId?t.reject(new Error("Missing required parameter: tagId")):(s=i(e,s),this.request("PATCH",o+n,e,{},a,s,{},t)),t.promise},e.prototype.delete_tag=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/tags/{tag_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{tag_id}",e.tagId),void 0===e.tagId?t.reject(new Error("Missing required parameter: tagId")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_tag=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/tags/{tag_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{tag_id}",e.tagId),void 0===e.tagId?t.reject(new Error("Missing required parameter: tagId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.post_team_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/teams",e,{},s,n,{},t),t.promise},e.prototype.get_team_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/teams",e,{},s,n,{},t),t.promise},e.prototype.patch_team_private=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],void 0!==e.teamId&&(n.team_id=e.teamId),n=i(e,n),this.request("PATCH",o+"/teams/me",e,{},s,n,{},t),t.promise},e.prototype.get_team_private=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],void 0!==e.teamId&&(n.team_id=e.teamId),n=i(e,n),this.request("GET",o+"/teams/me",e,{},s,n,{},t),t.promise},e.prototype.patch_team_public=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/teams/{team_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{team_id}",e.teamId),void 0===e.teamId?t.reject(new Error("Missing required parameter: teamId")):(s=i(e,s),this.request("PATCH",o+n,e,{},a,s,{},t)),t.promise},e.prototype.delete_team_public=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/teams/{team_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{team_id}",e.teamId),void 0===e.teamId?t.reject(new Error("Missing required parameter: teamId")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_team_public=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/teams/{team_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{team_id}",e.teamId),void 0===e.teamId?t.reject(new Error("Missing required parameter: teamId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_team_awards=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/teams/{team_id}/awards",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{team_id}",e.teamId),void 0===e.teamId?t.reject(new Error("Missing required parameter: teamId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_team_fails=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/teams/{team_id}/fails",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{team_id}",e.teamId),void 0===e.teamId?t.reject(new Error("Missing required parameter: teamId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_team_solves=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/teams/{team_id}/solves",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{team_id}",e.teamId),void 0===e.teamId?t.reject(new Error("Missing required parameter: teamId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.post_unlock_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/unlocks",e,{},s,n,{},t),t.promise},e.prototype.get_unlock_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/unlocks",e,{},s,n,{},t),t.promise},e.prototype.post_user_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("POST",o+"/users",e,{},s,n,{},t),t.promise},e.prototype.get_user_list=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/users",e,{},s,n,{},t),t.promise},e.prototype.patch_user_private=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("PATCH",o+"/users/me",e,{},s,n,{},t),t.promise},e.prototype.get_user_private=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n={},s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],n=i(e,n),this.request("GET",o+"/users/me",e,{},s,n,{},t),t.promise},e.prototype.patch_user_public=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/users/{user_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{user_id}",e.userId),void 0===e.userId?t.reject(new Error("Missing required parameter: userId")):(s=i(e,s),this.request("PATCH",o+n,e,{},a,s,{},t)),t.promise},e.prototype.delete_user_public=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/users/{user_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{user_id}",e.userId),void 0===e.userId?t.reject(new Error("Missing required parameter: userId")):(s=i(e,s),this.request("DELETE",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_user_public=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/users/{user_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{user_id}",e.userId),void 0===e.userId?t.reject(new Error("Missing required parameter: userId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_user_awards=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/users/{user_id}/awards",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{user_id}",e.userId),void 0===e.userId?t.reject(new Error("Missing required parameter: userId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_user_fails=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/users/{user_id}/fails",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{user_id}",e.userId),void 0===e.userId?t.reject(new Error("Missing required parameter: userId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e.prototype.get_user_solves=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/users/{user_id}/solves",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{user_id}",e.userId),void 0===e.userId?t.reject(new Error("Missing required parameter: userId")):(s=i(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise},e}();t.API=a},"./CTFd/themes/core/assets/js/config.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={urlRoot:"",csrfNonce:"",userMode:""}},"./CTFd/themes/core/assets/js/events.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o("./node_modules/howler/dist/howler.js"),n=o("./node_modules/event-source-polyfill/src/eventsource.js"),i=o("./CTFd/themes/core/assets/js/ezq.js"),l=o("./CTFd/themes/core/assets/js/utils.js"),r=n.NativeEventSource||n.EventSourcePolyfill;t.default=function(e){var t=new r(e+"/events"),o=new l.WindowController,n=new a.Howl({src:[e+"/themes/core/static/sounds/notification.webm",e+"/themes/core/static/sounds/notification.mp3"]});function s(e){switch(e.type){case"toast":(0,l.inc_notification_counter)();var t=50<e.content.length?e.content.substring(0,47)+"...":e.content,o=!1;(0,i.ezToast)({title:e.title,body:t,onclick:function(){(0,i.ezAlert)({title:e.title,body:e.content,button:"Got it!",success:function(){o=!0,(0,l.dec_notification_counter)()}})},onclose:function(){o||(0,l.dec_notification_counter)()}});break;case"alert":(0,l.inc_notification_counter)(),(0,i.ezAlert)({title:e.title,body:e.content,button:"Got it!",success:function(){(0,l.dec_notification_counter)()}});break;case"background":default:(0,l.inc_notification_counter)()}e.sound&&n.play()}(0,l.init_notification_counter)(),o.notification=function(e){s(e)},o.masterDidChange=function(){this.isMaster?t.addEventListener("notification",function(e){var t=JSON.parse(e.data);o.broadcast("notification",t),s(t)},!1):t&&t.close()}}},"./CTFd/themes/core/assets/js/ezq.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.ezAlert=p,t.ezToast=f,t.ezQuery=j,t.ezProgressBar=h,t.ezBadge=_,t.default=void 0,o("./node_modules/bootstrap/js/dist/modal.js");var n,l=(n=o("./node_modules/jquery/dist/jquery.js"))&&n.__esModule?n:{default:n};var a='<div class="modal fade" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">{0}</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> </div> <div class="modal-footer"> </div> </div> </div></div>',r='<div class="toast m-3" role="alert"> <div class="toast-header"> <strong class="mr-auto">{0}</strong> <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="toast-body">{1}</div></div>',i='<div class="progress"> <div class="progress-bar progress-bar-success progress-bar-striped progress-bar-animated" role="progressbar" style="width: {0}%"> </div></div>',s='<div class="alert alert-danger alert-dismissable" role="alert">\n <span class="sr-only">Error:</span>\n {0}\n <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>\n</div>',d='<div class="alert alert-success alert-dismissable submit-row" role="alert">\n <strong>Success!</strong>\n {0}\n <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>\n</div>',c='<button type="button" class="btn btn-primary" data-dismiss="modal">{0}</button>',u='<button type="button" class="btn btn-danger" data-dismiss="modal">No</button>',m='<button type="button" class="btn btn-primary" data-dismiss="modal">Yes</button>';function p(e){var t=a.format(e.title),o=(0,l.default)(t);"string"==typeof e.body?o.find(".modal-body").append("<p>".concat(e.body,"</p>")):o.find(".modal-body").append((0,l.default)(e.body));var n=(0,l.default)(c.format(e.button));return e.success&&(0,l.default)(n).click(function(){e.success()}),e.large&&o.find(".modal-dialog").addClass("modal-lg"),e.xlarge&&o.find(".modal-dialog").addClass("modal-xl"),o.find(".modal-footer").append(n),(0,l.default)("main").append(o),o.modal("show"),(0,l.default)(o).on("hidden.bs.modal",function(){(0,l.default)(this).modal("dispose")}),o}function f(e){(0,l.default)("#ezq--notifications-toast-container").length||(0,l.default)("body").append((0,l.default)("<div/>").attr({id:"ezq--notifications-toast-container"}).css({position:"fixed",bottom:"0",right:"0","min-width":"20%"}));var t=r.format(e.title,e.body),o=(0,l.default)(t);if(e.onclose&&(0,l.default)(o).find("button[data-dismiss=toast]").click(function(){e.onclose()}),e.onclick){var n=(0,l.default)(o).find(".toast-body");n.addClass("cursor-pointer"),n.click(function(){e.onclick()})}var s=!1!==e.autohide,a=!1!==e.animation,i=e.delay||1e4;return(0,l.default)("#ezq--notifications-toast-container").prepend(o),o.toast({autohide:s,delay:i,animation:a}),o.toast("show"),o}function j(e){var t=a.format(e.title),o=(0,l.default)(t);"string"==typeof e.body?o.find(".modal-body").append("<p>".concat(e.body,"</p>")):o.find(".modal-body").append((0,l.default)(e.body));var n=(0,l.default)(m),s=(0,l.default)(u);return o.find(".modal-footer").append(s),o.find(".modal-footer").append(n),(0,l.default)("main").append(o),(0,l.default)(o).on("hidden.bs.modal",function(){(0,l.default)(this).modal("dispose")}),(0,l.default)(n).click(function(){e.success()}),o.modal("show"),o}function h(e){if(e.target){var t=(0,l.default)(e.target);return t.find(".progress-bar").css("width",e.width+"%"),t}var o=i.format(e.width),n=a.format(e.title),s=(0,l.default)(n);return s.find(".modal-body").append((0,l.default)(o)),(0,l.default)("main").append(s),s.modal("show")}function _(e){var t={success:d,error:s}[e.type].format(e.body);return(0,l.default)(t)}var g={ezAlert:p,ezToast:f,ezQuery:j,ezProgressBar:h,ezBadge:_};t.default=g},"./CTFd/themes/core/assets/js/fetch.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,o("./node_modules/whatwg-fetch/fetch.js");var n,s=(n=o("./CTFd/themes/core/assets/js/config.js"))&&n.__esModule?n:{default:n};var a=window.fetch;t.default=function(e,t){return void 0===t&&(t={method:"GET",credentials:"same-origin",headers:{}}),e=s.default.urlRoot+e,void 0===t.headers&&(t.headers={}),t.credentials="same-origin",t.headers.Accept="application/json",t.headers["Content-Type"]="application/json",t.headers["CSRF-Token"]=s.default.csrfNonce,a(e,t)}},"./CTFd/themes/core/assets/js/pages/challenges.js":function(e,t,o){o("./CTFd/themes/core/assets/js/pages/main.js"),o("./node_modules/bootstrap/js/dist/tab.js");var d=s(o("./node_modules/nunjucks/browser/nunjucks.js")),c=o("./CTFd/themes/core/assets/js/ezq.js"),r=o("./CTFd/themes/core/assets/js/utils.js"),u=s(o("./node_modules/moment/moment.js")),_=s(o("./node_modules/jquery/dist/jquery.js")),m=s(o("./CTFd/themes/core/assets/js/CTFd.js")),n=s(o("./CTFd/themes/core/assets/js/config.js"));function s(e){return e&&e.__esModule?e:{default:e}}var a={teams:function(e){return m.default.api.get_team_solves({teamId:e})},users:function(e){return m.default.api.get_user_solves({userId:e})}},i=m.default.lib.markdown();m.default._internal.challenge={};var g=[],v=[],y=function(t){var e=_.default.grep(g,function(e){return e.id==t})[0];"hidden"!==e.type?l(e):(0,c.ezAlert)({title:"Challenge Hidden!",body:"You haven't unlocked this challenge yet!",button:"Got it!"})},l=function(r){return Promise.all([m.default.api.get_challenge({challengeId:r.id}),_.default.getScript(n.default.urlRoot+r.script),_.default.get(n.default.urlRoot+r.template)]).then(function(o){var e=o[0].data,t=o[2],n=m.default._internal.challenge;if(!o[0].success&&o[0].need_pass){function s(t){var e=g.find(function(e){return e.id==o[0].need_pass[t]});e&&a.push(e.name)}var a=[];for(var i in o[0].need_pass)s(i);(0,c.ezAlert)({title:"Таск недоступен",body:"Для этого задания сначала необходимо решить "+a.join(" или "),button:"Понял!"})}(0,_.default)("#challenge-window").empty();var l=d.default.compile(t);n.data=e,n.preRender(),e.description=n.render(e.description),e.script_root=m.default.config.urlRoot,(0,_.default)("#challenge-window").append(l.render(e)),(0,_.default)(".challenge-solves").click(function(e){b((0,_.default)("#challenge-id").val())}),(0,_.default)(".nav-tabs a").click(function(e){e.preventDefault(),(0,_.default)(this).tab("show")}),(0,_.default)("#challenge-window").on("hide.bs.modal",function(e){(0,_.default)("#submission-input").removeClass("wrong"),(0,_.default)("#submission-input").removeClass("correct"),(0,_.default)("#incorrect-key").slideUp(),(0,_.default)("#correct-key").slideUp(),(0,_.default)("#already-solved").slideUp(),(0,_.default)("#too-fast").slideUp()}),(0,_.default)(".load-hint").on("click",function(e){w((0,_.default)(this).data("hint-id"))}),(0,_.default)("#submit-key").click(function(e){e.preventDefault(),(0,_.default)("#submit-key").addClass("disabled-button"),(0,_.default)("#submit-key").prop("disabled",!0),m.default._internal.challenge.submit().then(p).then(j).then(f)}),(0,_.default)("#submission-input").keyup(function(e){13==e.keyCode&&(0,_.default)("#submit-key").click()}),(0,_.default)(".input-field").bind({focus:function(){(0,_.default)(this).parent().addClass("input--filled")},blur:function(){var e=(0,_.default)(this);""===e.val()&&(e.parent().removeClass("input--filled"),e.siblings(".input-label").removeClass("input--hide"))}}),n.postRender(),window.location.replace(window.location.href.split("#")[0]+"#"+r.name),(0,_.default)("#challenge-window").modal()})};function p(e){var t=e.data,o=(0,_.default)("#result-message"),n=(0,_.default)("#result-notification"),s=(0,_.default)("#submission-input");n.removeClass(),o.text(t.message),"authentication_required"!==t.status?("incorrect"===t.status?(n.addClass("alert alert-danger alert-dismissable text-center"),n.slideDown(),s.removeClass("correct"),s.addClass("wrong"),setTimeout(function(){s.removeClass("wrong")},3e3)):"correct"===t.status?(n.addClass("alert alert-success alert-dismissable text-center"),n.slideDown(),(0,_.default)(".challenge-solves").text(parseInt((0,_.default)(".challenge-solves").text().split(" ")[0])+1+" Solves"),s.val(""),s.removeClass("wrong"),s.addClass("correct")):"already_solved"===t.status?(n.addClass("alert alert-info alert-dismissable text-center"),n.slideDown(),s.addClass("correct")):"paused"===t.status?(n.addClass("alert alert-warning alert-dismissable text-center"),n.slideDown()):"ratelimited"===t.status&&(n.addClass("alert alert-warning alert-dismissable text-center"),n.slideDown(),s.addClass("too-fast"),setTimeout(function(){s.removeClass("too-fast")},3e3)),setTimeout(function(){(0,_.default)(".alert").slideUp(),(0,_.default)("#submit-key").removeClass("disabled-button"),(0,_.default)("#submit-key").prop("disabled",!1)},3e3)):window.location=m.default.config.urlRoot+"/login?next="+m.default.config.urlRoot+window.location.pathname+window.location.hash}function f(){return a[m.default.config.userMode]("me").then(function(e){for(var t=e.data,o=t.length-1;0<=o;o--){var n=(0,_.default)('button[value="'+t[o].challenge_id+'"]');n.addClass("solved-challenge"),n.prepend("<i class='fas fa-check corner-button-check'></i>")}})}function b(e){return m.default.api.get_challenge_solves({challengeId:e}).then(function(e){var t=e.data;(0,_.default)(".challenge-solves").text(parseInt(t.length)+" Solves");var o=(0,_.default)("#challenge-solves-names");o.empty();for(var n=0;n<t.length;n++){var s=t[n].account_id,a=t[n].name,i=(0,u.default)(t[n].date).local().fromNow(),l=t[n].account_url;o.append('<tr><td><a href="{0}">{2}</td><td>{3}</td></tr>'.format(l,s,(0,r.htmlEntities)(a),i))}})}function j(){return m.default.api.get_challenge_list().then(function(e){var t=[],o=(0,_.default)("#challenges-board");g=e.data,o.empty();for(var n=g.length-1;0<=n;n--)if(g[n].solves=0,-1==_.default.inArray(g[n].category,t)){var s=g[n].category;t.push(s);var a=s.replace(/ /g,"-").hashCode(),i=(0,_.default)('<div id="{0}-row" class="row">'.format(a)+'<div class="category-header col-2"></div>\n<div class="category-challenges col m-0"><div class="challenges-row row">\n</div></div></div>');i.find(".category-header").append((0,_.default)("<h3 class='text-right pt-4'>"+s+"</h3>")),o.append(i)}for(var l=0;l<=g.length-1;l++){var r=g[l],d=r.name.replace(/ /g,"-").hashCode(),c=r.category.replace(/ /g,"-").hashCode(),u=(0,_.default)("<div id='{0}' class='col-2 m-0 p-0 d-inline-block'>".format(d)),m=void 0;m=(0,_.default)("<button class='btn btn-{1} challenge-button w-100 text-truncate pt-3 pb-3' value='{0}'>{3}</button>".format(r.id,{beginner:"warning",middle:"success",default:"dark"}[r.grade?r.grade:"default"],-1!==v.indexOf(r.id)?"solved-challenge":"",r.open?"":"<i class='fas fa-lock corner-button-check'></i>"));for(var p=(0,_.default)("<h4>{0}</h4>".format(r.name)),f=(0,_.default)("<span>{0}</span>".format(r.value)),j=0;j<r.tags.length;j++){var h="tag-"+r.tags[j].value.replace(/ /g,"-");u.addClass(h)}m.append(p),m.append(f),u.append(m),(0,_.default)("#"+c+"-row").find(".category-challenges > .challenges-row").append(u)}(0,_.default)(".challenge-button").click(function(e){y(this.value),b(this.value)})})}function h(){return(0==m.default.user.id?Promise.resolve():a[m.default.config.userMode]("me").then(function(e){for(var t=e.data,o=t.length-1;0<=o;o--){var n=t[o].challenge_id;t.push(n)}})).then(j).then(f)}(0,_.default)(function(){h().then(function(){0<window.location.hash.length&&function(t){var e=_.default.grep(g,function(e){return e.name==t})[0];l(e)}(decodeURIComponent(window.location.hash.substring(1)))}),(0,_.default)("#submission-input").keyup(function(e){13==e.keyCode&&(0,_.default)("#submit-key").click()}),(0,_.default)(".nav-tabs a").click(function(e){e.preventDefault(),(0,_.default)(this).tab("show")}),(0,_.default)("#challenge-window").on("hidden.bs.modal",function(e){(0,_.default)(".nav-tabs a:first").tab("show"),history.replaceState("",window.document.title,window.location.pathname)}),(0,_.default)(".challenge-solves").click(function(e){b((0,_.default)("#challenge-id").val())}),(0,_.default)("#challenge-window").on("hide.bs.modal",function(e){(0,_.default)("#submission-input").removeClass("wrong"),(0,_.default)("#submission-input").removeClass("correct"),(0,_.default)("#incorrect-key").slideUp(),(0,_.default)("#correct-key").slideUp(),(0,_.default)("#already-solved").slideUp(),(0,_.default)("#too-fast").slideUp()}),(0,_.default)('[data-toggle="tooltip"]').tooltip()}),setInterval(h,3e5);function T(e){(0,c.ezAlert)({title:"Hint",body:i.render(e.content),button:"Got it!"})}var w=function(t){m.default.api.get_hint({hintId:t}).then(function(e){e.data.content?T(e.data):function(t){(0,c.ezQuery)({title:"Unlock Hint?",body:"Are you sure you want to open this hint?",success:function(){var e={target:t,type:"hints"};m.default.api.post_unlock_list({},e).then(function(e){e.success?m.default.api.get_hint({hintId:t}).then(function(e){T(e.data)}):(0,c.ezAlert)({title:"Error",body:i.render(e.errors.score),button:"Got it!"})})}})}(t)})}},"./CTFd/themes/core/assets/js/pages/main.js":function(e,t,o){var n=f(o("./CTFd/themes/core/assets/js/CTFd.js")),s=f(o("./node_modules/jquery/dist/jquery.js")),a=f(o("./node_modules/moment/moment.js")),i=f(o("./node_modules/nunjucks/browser/nunjucks.js")),l=o("./node_modules/howler/dist/howler.js"),r=f(o("./CTFd/themes/core/assets/js/events.js")),d=f(o("./CTFd/themes/core/assets/js/config.js")),c=f(o("./CTFd/themes/core/assets/js/styles.js")),u=f(o("./CTFd/themes/core/assets/js/times.js")),m=f(o("./CTFd/themes/core/assets/js/helpers.js")),p=o("./CTFd/themes/core/assets/js/ezq.js");function f(e){return e&&e.__esModule?e:{default:e}}n.default.init(window.init),window.CTFd=n.default,window.helpers=m.default,window.$=s.default,window.Moment=a.default,window.nunjucks=i.default,window.Howl=l.Howl,(0,s.default)(function(){(0,c.default)(),(0,u.default)(),(0,r.default)(d.default.urlRoot)}),window.localStorage.getItem("starMirWelcome")||(0,p.ezAlert)({title:"Да пребудет с тобой сила!",body:'<p><img src="https://sun9-39.userapi.com/c851120/v851120018/187550/ukLQzp_WWlo.jpg" style="margin-right: 20px; max-width: 400px; float: left;">Добро пожаловать в центр обучения!</p>\n<p>В галактическом сенате смятение... <br />Пока бойцы сопротивления находятся в самых разных концах Мира, всеми силами поддерживая связь и эффективность работы - вирусы, ошибки и уязвимости появляются внезапно и наносят непоправимый вред Системам. Отряду, ответственному за мировую безопасность нужна поддержка. Они готовы поделиться знаниями со всеми, но стать одним из рыцарей Ордена не так просто. Есть ли у Светлой стороны шанс оказаться сильнее? Возможно, но пока известно только одно - этот путь не будет простым.</p> <p>Вам предстоит пройти испытания, чтобы быть готовым встать в наши ряды, и выйти в Мир.</p>',button:"Начинаем!",xlarge:!0})},"./CTFd/themes/core/assets/js/patch.js":function(e,t,o){var n,l=(n=o("./node_modules/q/q.js"))&&n.__esModule?n:{default:n},s=o("./CTFd/themes/core/assets/js/api.js");function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e,t){return function(t){for(var e=1;e<arguments.length;e++)if(e%2){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),n.forEach(function(e){a(t,e,o[e])})}else Object.defineProperties(t,Object.getOwnPropertyDescriptors(arguments[e]));return t}({},e,{},t)}s.API.prototype.requestRaw=function(e,t,o,n,s,a,i,l){var r=a&&Object.keys(a).length?function(e){var t=[];for(var o in e)e.hasOwnProperty(o)&&t.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return t.join("&")}(a):null,d=t+(r?"?"+r:"");n&&!Object.keys(n).length&&(n=void 0),fetch(d,{method:e,headers:s,body:n}).then(function(e){return e.json()}).then(function(e){l.resolve(e)}).catch(function(e){l.reject(e)})},s.API.prototype.patch_user_public=function(e,t){void 0===e&&(e={});var o=l.default.defer(),n=this.domain,s="/users/{user_id}",a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],s=s.replace("{user_id}",e.userId),void 0===e.userId?o.reject(new Error("Missing required parameter: userId")):this.request("PATCH",n+s,e,t,a,{},{},o),o.promise},s.API.prototype.patch_user_private=function(e,t){void 0===e&&(e={});var o=l.default.defer(),n=this.domain,s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],this.request("PATCH",n+"/users/me",e,t,s,{},{},o),o.promise},s.API.prototype.post_unlock_list=function(e,t){var o=l.default.defer(),n=this.domain,s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],this.request("POST",n+"/unlocks",e,t,s,{},{},o),o.promise},s.API.prototype.post_notification_list=function(e,t){void 0===e&&(e={});var o=l.default.defer(),n=this.domain,s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],this.request("POST",n+"/notifications",e,t,s,{},{},o),o.promise},s.API.prototype.post_files_list=function(e,t){var o=l.default.defer(),n=this.domain,s={};return s.Accept=["application/json"],s["Content-Type"]=["application/json"],this.requestRaw("POST",n+"/files",e,t,s,{},{},o),o.promise},s.API.prototype.patch_config=function(e,t){void 0===e&&(e={});var o=l.default.defer(),n=this.domain,s="/configs/{config_key}",a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],s=s.replace("{config_key}",e.configKey),void 0===e.configKey?o.reject(new Error("Missing required parameter: configKey")):this.request("PATCH",n+s,e,t,a,{},{},o),o.promise},s.API.prototype.patch_config_list=function(e,t){void 0===e&&(e={});var o=l.default.defer(),n=this.domain,s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],s=r(e,s),this.request("PATCH",n+"/configs",e,t,a,s,{},o),o.promise},s.API.prototype.post_tag_list=function(e,t){void 0===e&&(e={});var o=l.default.defer(),n=this.domain,s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],s=r(e,s),this.request("POST",n+"/tags",e,t,a,s,{},o),o.promise},s.API.prototype.patch_team_public=function(e,t){void 0===e&&(e={});var o=l.default.defer(),n=this.domain,s="/teams/{team_id}",a={},i={};return i.Accept=["application/json"],i["Content-Type"]=["application/json"],s=s.replace("{team_id}",e.teamId),void 0===e.teamId?o.reject(new Error("Missing required parameter: teamId")):(a=r(e,a),this.request("PATCH",n+s,e,t,i,a,{},o)),o.promise},s.API.prototype.post_challenge_attempt=function(e,t){void 0===e&&(e={});var o=l.default.defer(),n=this.domain,s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],s=r(e,s),this.request("POST",n+"/challenges/attempt",e,t,a,s,{},o),o.promise},s.API.prototype.get_hint=function(e){void 0===e&&(e={});var t=l.default.defer(),o=this.domain,n="/hints/{hint_id}",s={},a={};return a.Accept=["application/json"],a["Content-Type"]=["application/json"],n=n.replace("{hint_id}",e.hintId),void 0===e.hintId?t.reject(new Error("Missing required parameter: hintId")):(delete e.hintId,s=r(e,s),this.request("GET",o+n,e,{},a,s,{},t)),t.promise}},"./CTFd/themes/core/assets/js/styles.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,o("./node_modules/bootstrap/dist/js/bootstrap.bundle.js");var n,s=(n=o("./node_modules/jquery/dist/jquery.js"))&&n.__esModule?n:{default:n};t.default=function(){(0,s.default)(":input").each(function(){(0,s.default)(this).data("initial",(0,s.default)(this).val())}),(0,s.default)(".form-control").bind({focus:function(){(0,s.default)(this).removeClass("input-filled-invalid"),(0,s.default)(this).addClass("input-filled-valid")},blur:function(){""===(0,s.default)(this).val()&&((0,s.default)(this).removeClass("input-filled-invalid"),(0,s.default)(this).removeClass("input-filled-valid"))}}),(0,s.default)(".form-control").each(function(){(0,s.default)(this).val()&&(0,s.default)(this).addClass("input-filled-valid")}),(0,s.default)(".page-select").change(function(){var e=new URL(window.location);e.searchParams.set("page",this.value),window.location.href=e.toString()}),(0,s.default)('[data-toggle="tooltip"]').tooltip()}},"./CTFd/themes/core/assets/js/times.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(o("./node_modules/moment/moment.js")),s=a(o("./node_modules/jquery/dist/jquery.js"));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(){(0,s.default)("[data-time]").each(function(e,t){t.innerText=(0,n.default)((0,s.default)(t).data("time")).local().format("MMMM Do, h:mm:ss A")})}},"./CTFd/themes/core/assets/js/utils.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.WindowController=s,t.colorHash=function(e){for(var t=0,o=0;o<e.length;o++)t=e.charCodeAt(o)+((t<<5)-t);for(var n="#",s=0;s<3;s++){n+=("00"+(t>>8*s&255).toString(16)).substr(-2)}return n},t.htmlEntities=function(e){return(0,i.default)("<div/>").text(e).html()},t.cumulativeSum=function(e){for(var t=e.concat(),o=0;o<e.length;o++)t[o]=e.slice(0,o+1).reduce(function(e,t){return e+t});return t},t.init_notification_counter=function(){var e=a.getItem(l);null===e?a.setItem(l,0):0<e&&(0,i.default)(".badge-notification").text(e)},t.set_notification_counter=function(e){a.setItem(l,e)},t.inc_notification_counter=function(){var e=a.getItem(l)||0;a.setItem(l,++e),(0,i.default)(".badge-notification").text(e)},t.dec_notification_counter=function(){var e=a.getItem(l)||0;0<e&&(a.setItem(l,--e),(0,i.default)(".badge-notification").text(e));0==e&&r()},t.clear_notification_counter=r,t.copyToClipboard=function(e,t){(0,i.default)(t).select(),document.execCommand("copy"),(0,i.default)(e.target).tooltip({title:"Copied!",trigger:"manual"}),(0,i.default)(e.target).tooltip("show"),setTimeout(function(){(0,i.default)(e.target).tooltip("hide")},1500)},t.makeSortableTables=function(){function a(e,t){return(0,i.default)(e).children("td").eq(t).text()}(0,i.default)("th.sort-col").append(' <i class="fas fa-sort"></i>'),(0,i.default)("th.sort-col").click(function(){var e=(0,i.default)(this).parents("table").eq(0),t=e.find("tr:gt(0)").toArray().sort(function(s){return function(e,t){var o=a(e,s),n=a(t,s);return i.default.isNumeric(o)&&i.default.isNumeric(n)?o-n:o.toString().localeCompare(n)}}((0,i.default)(this).index()));this.asc=!this.asc,this.asc||(t=t.reverse());for(var o=0;o<t.length;o++)e.append(t[o])})};var n,i=(n=o("./node_modules/jquery/dist/jquery.js"))&&n.__esModule?n:{default:n};function s(){this.id=Math.random(),this.isMaster=!1,this.others={},window.addEventListener("storage",this,!1),window.addEventListener("unload",this,!1),this.broadcast("hello");var t=this;this._checkTimeout=setTimeout(function e(){t.check(),t._checkTimeout=setTimeout(e,9e3)},500),this._pingTimeout=setTimeout(function e(){t.sendPing(),t._pingTimeout=setTimeout(e,17e3)},17e3)}i.default.fn.serializeJSON=function(o){var n={},s=(0,i.default)(this),e=s.serializeArray();return(e=(e=e.concat(s.find("input[type=checkbox]:checked").map(function(){return{name:this.name,value:!0}}).get())).concat(s.find("input[type=checkbox]:not(:checked)").map(function(){return{name:this.name,value:!1}}).get())).map(function(e){if(o)if(null!==e.value&&""!==e.value)n[e.name]=e.value;else{var t=s.find(":input[name=".concat(e.name,"]"));t.data("initial")!==t.val()&&(n[e.name]=e.value)}else n[e.name]=e.value}),n},String.prototype.format=String.prototype.f=function(){for(var e=this,t=arguments.length;t--;)e=e.replace(new RegExp("\\{"+t+"\\}","gm"),arguments[t]);return e},String.prototype.hashCode=function(){var e,t,o=0;if(0==this.length)return o;for(e=0,t=this.length;e<t;e++)o=(o<<5)-o+this.charCodeAt(e),o|=0;return o},s.prototype.destroy=function(){clearTimeout(this._pingTimeout),clearTimeout(this._checkTimeout),window.removeEventListener("storage",this,!1),window.removeEventListener("unload",this,!1),this.broadcast("bye")},s.prototype.handleEvent=function(e){if("unload"===e.type)this.destroy();else if("broadcast"===e.key)try{var t=JSON.parse(e.newValue);t.id!==this.id&&this[t.type](t)}catch(e){}},s.prototype.sendPing=function(){this.broadcast("ping")},s.prototype.hello=function(e){this.ping(e),e.id<this.id?this.check():this.sendPing()},s.prototype.ping=function(e){this.others[e.id]=+new Date},s.prototype.bye=function(e){delete this.others[e.id],this.check()},s.prototype.check=function(e){var t,o=+new Date,n=!0;for(t in this.others)this.others[t]+23e3<o?delete this.others[t]:t<this.id&&(n=!1);this.isMaster!==n&&(this.isMaster=n,this.masterDidChange())},s.prototype.masterDidChange=function(){},s.prototype.broadcast=function(e,t){var o={id:this.id,type:e};for(var n in t)o[n]=t[n];try{localStorage.setItem("broadcast",JSON.stringify(o))}catch(e){console.log(e)}};var a=window.localStorage,l="unread_notifications";function r(){a.setItem(l,0),(0,i.default)(".badge-notification").empty()}},"./node_modules/moment/locale sync recursive ^\\.\\/.*$":function(e,t,o){var n={"./af":"./node_modules/moment/locale/af.js","./af.js":"./node_modules/moment/locale/af.js","./ar":"./node_modules/moment/locale/ar.js","./ar-dz":"./node_modules/moment/locale/ar-dz.js","./ar-dz.js":"./node_modules/moment/locale/ar-dz.js","./ar-kw":"./node_modules/moment/locale/ar-kw.js","./ar-kw.js":"./node_modules/moment/locale/ar-kw.js","./ar-ly":"./node_modules/moment/locale/ar-ly.js","./ar-ly.js":"./node_modules/moment/locale/ar-ly.js","./ar-ma":"./node_modules/moment/locale/ar-ma.js","./ar-ma.js":"./node_modules/moment/locale/ar-ma.js","./ar-sa":"./node_modules/moment/locale/ar-sa.js","./ar-sa.js":"./node_modules/moment/locale/ar-sa.js","./ar-tn":"./node_modules/moment/locale/ar-tn.js","./ar-tn.js":"./node_modules/moment/locale/ar-tn.js","./ar.js":"./node_modules/moment/locale/ar.js","./az":"./node_modules/moment/locale/az.js","./az.js":"./node_modules/moment/locale/az.js","./be":"./node_modules/moment/locale/be.js","./be.js":"./node_modules/moment/locale/be.js","./bg":"./node_modules/moment/locale/bg.js","./bg.js":"./node_modules/moment/locale/bg.js","./bm":"./node_modules/moment/locale/bm.js","./bm.js":"./node_modules/moment/locale/bm.js","./bn":"./node_modules/moment/locale/bn.js","./bn.js":"./node_modules/moment/locale/bn.js","./bo":"./node_modules/moment/locale/bo.js","./bo.js":"./node_modules/moment/locale/bo.js","./br":"./node_modules/moment/locale/br.js","./br.js":"./node_modules/moment/locale/br.js","./bs":"./node_modules/moment/locale/bs.js","./bs.js":"./node_modules/moment/locale/bs.js","./ca":"./node_modules/moment/locale/ca.js","./ca.js":"./node_modules/moment/locale/ca.js","./cs":"./node_modules/moment/locale/cs.js","./cs.js":"./node_modules/moment/locale/cs.js","./cv":"./node_modules/moment/locale/cv.js","./cv.js":"./node_modules/moment/locale/cv.js","./cy":"./node_modules/moment/locale/cy.js","./cy.js":"./node_modules/moment/locale/cy.js","./da":"./node_modules/moment/locale/da.js","./da.js":"./node_modules/moment/locale/da.js","./de":"./node_modules/moment/locale/de.js","./de-at":"./node_modules/moment/locale/de-at.js","./de-at.js":"./node_modules/moment/locale/de-at.js","./de-ch":"./node_modules/moment/locale/de-ch.js","./de-ch.js":"./node_modules/moment/locale/de-ch.js","./de.js":"./node_modules/moment/locale/de.js","./dv":"./node_modules/moment/locale/dv.js","./dv.js":"./node_modules/moment/locale/dv.js","./el":"./node_modules/moment/locale/el.js","./el.js":"./node_modules/moment/locale/el.js","./en-SG":"./node_modules/moment/locale/en-SG.js","./en-SG.js":"./node_modules/moment/locale/en-SG.js","./en-au":"./node_modules/moment/locale/en-au.js","./en-au.js":"./node_modules/moment/locale/en-au.js","./en-ca":"./node_modules/moment/locale/en-ca.js","./en-ca.js":"./node_modules/moment/locale/en-ca.js","./en-gb":"./node_modules/moment/locale/en-gb.js","./en-gb.js":"./node_modules/moment/locale/en-gb.js","./en-ie":"./node_modules/moment/locale/en-ie.js","./en-ie.js":"./node_modules/moment/locale/en-ie.js","./en-il":"./node_modules/moment/locale/en-il.js","./en-il.js":"./node_modules/moment/locale/en-il.js","./en-nz":"./node_modules/moment/locale/en-nz.js","./en-nz.js":"./node_modules/moment/locale/en-nz.js","./eo":"./node_modules/moment/locale/eo.js","./eo.js":"./node_modules/moment/locale/eo.js","./es":"./node_modules/moment/locale/es.js","./es-do":"./node_modules/moment/locale/es-do.js","./es-do.js":"./node_modules/moment/locale/es-do.js","./es-us":"./node_modules/moment/locale/es-us.js","./es-us.js":"./node_modules/moment/locale/es-us.js","./es.js":"./node_modules/moment/locale/es.js","./et":"./node_modules/moment/locale/et.js","./et.js":"./node_modules/moment/locale/et.js","./eu":"./node_modules/moment/locale/eu.js","./eu.js":"./node_modules/moment/locale/eu.js","./fa":"./node_modules/moment/locale/fa.js","./fa.js":"./node_modules/moment/locale/fa.js","./fi":"./node_modules/moment/locale/fi.js","./fi.js":"./node_modules/moment/locale/fi.js","./fo":"./node_modules/moment/locale/fo.js","./fo.js":"./node_modules/moment/locale/fo.js","./fr":"./node_modules/moment/locale/fr.js","./fr-ca":"./node_modules/moment/locale/fr-ca.js","./fr-ca.js":"./node_modules/moment/locale/fr-ca.js","./fr-ch":"./node_modules/moment/locale/fr-ch.js","./fr-ch.js":"./node_modules/moment/locale/fr-ch.js","./fr.js":"./node_modules/moment/locale/fr.js","./fy":"./node_modules/moment/locale/fy.js","./fy.js":"./node_modules/moment/locale/fy.js","./ga":"./node_modules/moment/locale/ga.js","./ga.js":"./node_modules/moment/locale/ga.js","./gd":"./node_modules/moment/locale/gd.js","./gd.js":"./node_modules/moment/locale/gd.js","./gl":"./node_modules/moment/locale/gl.js","./gl.js":"./node_modules/moment/locale/gl.js","./gom-latn":"./node_modules/moment/locale/gom-latn.js","./gom-latn.js":"./node_modules/moment/locale/gom-latn.js","./gu":"./node_modules/moment/locale/gu.js","./gu.js":"./node_modules/moment/locale/gu.js","./he":"./node_modules/moment/locale/he.js","./he.js":"./node_modules/moment/locale/he.js","./hi":"./node_modules/moment/locale/hi.js","./hi.js":"./node_modules/moment/locale/hi.js","./hr":"./node_modules/moment/locale/hr.js","./hr.js":"./node_modules/moment/locale/hr.js","./hu":"./node_modules/moment/locale/hu.js","./hu.js":"./node_modules/moment/locale/hu.js","./hy-am":"./node_modules/moment/locale/hy-am.js","./hy-am.js":"./node_modules/moment/locale/hy-am.js","./id":"./node_modules/moment/locale/id.js","./id.js":"./node_modules/moment/locale/id.js","./is":"./node_modules/moment/locale/is.js","./is.js":"./node_modules/moment/locale/is.js","./it":"./node_modules/moment/locale/it.js","./it-ch":"./node_modules/moment/locale/it-ch.js","./it-ch.js":"./node_modules/moment/locale/it-ch.js","./it.js":"./node_modules/moment/locale/it.js","./ja":"./node_modules/moment/locale/ja.js","./ja.js":"./node_modules/moment/locale/ja.js","./jv":"./node_modules/moment/locale/jv.js","./jv.js":"./node_modules/moment/locale/jv.js","./ka":"./node_modules/moment/locale/ka.js","./ka.js":"./node_modules/moment/locale/ka.js","./kk":"./node_modules/moment/locale/kk.js","./kk.js":"./node_modules/moment/locale/kk.js","./km":"./node_modules/moment/locale/km.js","./km.js":"./node_modules/moment/locale/km.js","./kn":"./node_modules/moment/locale/kn.js","./kn.js":"./node_modules/moment/locale/kn.js","./ko":"./node_modules/moment/locale/ko.js","./ko.js":"./node_modules/moment/locale/ko.js","./ku":"./node_modules/moment/locale/ku.js","./ku.js":"./node_modules/moment/locale/ku.js","./ky":"./node_modules/moment/locale/ky.js","./ky.js":"./node_modules/moment/locale/ky.js","./lb":"./node_modules/moment/locale/lb.js","./lb.js":"./node_modules/moment/locale/lb.js","./lo":"./node_modules/moment/locale/lo.js","./lo.js":"./node_modules/moment/locale/lo.js","./lt":"./node_modules/moment/locale/lt.js","./lt.js":"./node_modules/moment/locale/lt.js","./lv":"./node_modules/moment/locale/lv.js","./lv.js":"./node_modules/moment/locale/lv.js","./me":"./node_modules/moment/locale/me.js","./me.js":"./node_modules/moment/locale/me.js","./mi":"./node_modules/moment/locale/mi.js","./mi.js":"./node_modules/moment/locale/mi.js","./mk":"./node_modules/moment/locale/mk.js","./mk.js":"./node_modules/moment/locale/mk.js","./ml":"./node_modules/moment/locale/ml.js","./ml.js":"./node_modules/moment/locale/ml.js","./mn":"./node_modules/moment/locale/mn.js","./mn.js":"./node_modules/moment/locale/mn.js","./mr":"./node_modules/moment/locale/mr.js","./mr.js":"./node_modules/moment/locale/mr.js","./ms":"./node_modules/moment/locale/ms.js","./ms-my":"./node_modules/moment/locale/ms-my.js","./ms-my.js":"./node_modules/moment/locale/ms-my.js","./ms.js":"./node_modules/moment/locale/ms.js","./mt":"./node_modules/moment/locale/mt.js","./mt.js":"./node_modules/moment/locale/mt.js","./my":"./node_modules/moment/locale/my.js","./my.js":"./node_modules/moment/locale/my.js","./nb":"./node_modules/moment/locale/nb.js","./nb.js":"./node_modules/moment/locale/nb.js","./ne":"./node_modules/moment/locale/ne.js","./ne.js":"./node_modules/moment/locale/ne.js","./nl":"./node_modules/moment/locale/nl.js","./nl-be":"./node_modules/moment/locale/nl-be.js","./nl-be.js":"./node_modules/moment/locale/nl-be.js","./nl.js":"./node_modules/moment/locale/nl.js","./nn":"./node_modules/moment/locale/nn.js","./nn.js":"./node_modules/moment/locale/nn.js","./pa-in":"./node_modules/moment/locale/pa-in.js","./pa-in.js":"./node_modules/moment/locale/pa-in.js","./pl":"./node_modules/moment/locale/pl.js","./pl.js":"./node_modules/moment/locale/pl.js","./pt":"./node_modules/moment/locale/pt.js","./pt-br":"./node_modules/moment/locale/pt-br.js","./pt-br.js":"./node_modules/moment/locale/pt-br.js","./pt.js":"./node_modules/moment/locale/pt.js","./ro":"./node_modules/moment/locale/ro.js","./ro.js":"./node_modules/moment/locale/ro.js","./ru":"./node_modules/moment/locale/ru.js","./ru.js":"./node_modules/moment/locale/ru.js","./sd":"./node_modules/moment/locale/sd.js","./sd.js":"./node_modules/moment/locale/sd.js","./se":"./node_modules/moment/locale/se.js","./se.js":"./node_modules/moment/locale/se.js","./si":"./node_modules/moment/locale/si.js","./si.js":"./node_modules/moment/locale/si.js","./sk":"./node_modules/moment/locale/sk.js","./sk.js":"./node_modules/moment/locale/sk.js","./sl":"./node_modules/moment/locale/sl.js","./sl.js":"./node_modules/moment/locale/sl.js","./sq":"./node_modules/moment/locale/sq.js","./sq.js":"./node_modules/moment/locale/sq.js","./sr":"./node_modules/moment/locale/sr.js","./sr-cyrl":"./node_modules/moment/locale/sr-cyrl.js","./sr-cyrl.js":"./node_modules/moment/locale/sr-cyrl.js","./sr.js":"./node_modules/moment/locale/sr.js","./ss":"./node_modules/moment/locale/ss.js","./ss.js":"./node_modules/moment/locale/ss.js","./sv":"./node_modules/moment/locale/sv.js","./sv.js":"./node_modules/moment/locale/sv.js","./sw":"./node_modules/moment/locale/sw.js","./sw.js":"./node_modules/moment/locale/sw.js","./ta":"./node_modules/moment/locale/ta.js","./ta.js":"./node_modules/moment/locale/ta.js","./te":"./node_modules/moment/locale/te.js","./te.js":"./node_modules/moment/locale/te.js","./tet":"./node_modules/moment/locale/tet.js","./tet.js":"./node_modules/moment/locale/tet.js","./tg":"./node_modules/moment/locale/tg.js","./tg.js":"./node_modules/moment/locale/tg.js","./th":"./node_modules/moment/locale/th.js","./th.js":"./node_modules/moment/locale/th.js","./tl-ph":"./node_modules/moment/locale/tl-ph.js","./tl-ph.js":"./node_modules/moment/locale/tl-ph.js","./tlh":"./node_modules/moment/locale/tlh.js","./tlh.js":"./node_modules/moment/locale/tlh.js","./tr":"./node_modules/moment/locale/tr.js","./tr.js":"./node_modules/moment/locale/tr.js","./tzl":"./node_modules/moment/locale/tzl.js","./tzl.js":"./node_modules/moment/locale/tzl.js","./tzm":"./node_modules/moment/locale/tzm.js","./tzm-latn":"./node_modules/moment/locale/tzm-latn.js","./tzm-latn.js":"./node_modules/moment/locale/tzm-latn.js","./tzm.js":"./node_modules/moment/locale/tzm.js","./ug-cn":"./node_modules/moment/locale/ug-cn.js","./ug-cn.js":"./node_modules/moment/locale/ug-cn.js","./uk":"./node_modules/moment/locale/uk.js","./uk.js":"./node_modules/moment/locale/uk.js","./ur":"./node_modules/moment/locale/ur.js","./ur.js":"./node_modules/moment/locale/ur.js","./uz":"./node_modules/moment/locale/uz.js","./uz-latn":"./node_modules/moment/locale/uz-latn.js","./uz-latn.js":"./node_modules/moment/locale/uz-latn.js","./uz.js":"./node_modules/moment/locale/uz.js","./vi":"./node_modules/moment/locale/vi.js","./vi.js":"./node_modules/moment/locale/vi.js","./x-pseudo":"./node_modules/moment/locale/x-pseudo.js","./x-pseudo.js":"./node_modules/moment/locale/x-pseudo.js","./yo":"./node_modules/moment/locale/yo.js","./yo.js":"./node_modules/moment/locale/yo.js","./zh-cn":"./node_modules/moment/locale/zh-cn.js","./zh-cn.js":"./node_modules/moment/locale/zh-cn.js","./zh-hk":"./node_modules/moment/locale/zh-hk.js","./zh-hk.js":"./node_modules/moment/locale/zh-hk.js","./zh-tw":"./node_modules/moment/locale/zh-tw.js","./zh-tw.js":"./node_modules/moment/locale/zh-tw.js"};function s(e){var t=a(e);return o(t)}function a(e){if(o.o(n,e))return n[e];var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}s.keys=function(){return Object.keys(n)},s.resolve=a,(e.exports=s).id="./node_modules/moment/locale sync recursive ^\\.\\/.*$"}}); |
||
catalog.go | package catalog
import (
"encoding/json"
"fmt"
"net/url"
"sort"
"strings"
"sync"
"github.com/openshift/odo/pkg/preference"
"github.com/zalando/go-keyring"
imagev1 "github.com/openshift/api/image/v1"
"github.com/openshift/odo/pkg/log"
"github.com/openshift/odo/pkg/occlient"
registryUtil "github.com/openshift/odo/pkg/odo/cli/registry/util"
"github.com/openshift/odo/pkg/util"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/klog"
)
const (
apiVersion = "odo.dev/v1alpha1"
)
var supportedImages = map[string]bool{
"redhat-openjdk-18/openjdk18-openshift:latest": true,
"openjdk/openjdk-11-rhel8:latest": true,
"openjdk/openjdk-11-rhel7:latest": true,
"centos/nodejs-10-centos7:latest": true,
"centos/nodejs-12-centos7:latest": true,
"rhscl/nodejs-10-rhel7:latest": true,
"rhscl/nodejs-12-rhel7:latest": true,
"rhoar-nodejs/nodejs-10:latest": true,
}
// GetDevfileRegistries gets devfile registries from preference file,
// if registry name is specified return the specific registry, otherwise return all registries
func GetDevfileRegistries(registryName string) ([]Registry, error) {
var devfileRegistries []Registry
cfg, err := preference.New()
if err != nil {
return nil, err
}
hasName := len(registryName) != 0
if cfg.OdoSettings.RegistryList != nil {
registryList := *cfg.OdoSettings.RegistryList
// Loop backwards here to ensure the registry display order is correct (display latest newly added registry firstly)
for i := len(registryList) - 1; i >= 0; i-- {
registry := registryList[i]
if hasName {
if registryName == registry.Name {
reg := Registry{
Name: registry.Name,
URL: registry.URL,
Secure: registry.Secure,
}
devfileRegistries = append(devfileRegistries, reg)
return devfileRegistries, nil
}
} else {
reg := Registry{
Name: registry.Name,
URL: registry.URL,
Secure: registry.Secure,
}
devfileRegistries = append(devfileRegistries, reg)
}
}
} else {
return nil, nil
}
return devfileRegistries, nil
}
// convertURL converts GitHub regular URL to GitHub raw URL, do nothing if the URL is not GitHub URL
// For example:
// GitHub regular URL: https://github.com/elsony/devfile-registry/tree/johnmcollier-crw
// GitHub raw URL: https://raw.githubusercontent.com/elsony/devfile-registry/johnmcollier-crw
func convertURL(URL string) (string, error) {
url, err := url.Parse(URL)
if err != nil {
return "", err
}
if strings.Contains(url.Host, "github") && !strings.Contains(url.Host, "raw") {
// Convert path part of the URL
URLSlice := strings.Split(URL, "/")
if len(URLSlice) > 2 && URLSlice[len(URLSlice)-2] == "tree" {
// GitHub raw URL doesn't have "tree" structure in the URL, need to remove it
URL = strings.Replace(URL, "/tree", "", 1)
} else {
// Add "master" branch for GitHub raw URL by default if branch is not specified
URL = URL + "/master"
}
// Convert host part of the URL
if url.Host == "github.com" {
URL = strings.Replace(URL, "github.com", "raw.githubusercontent.com", 1)
} else {
URL = strings.Replace(URL, url.Host, "raw."+url.Host, 1)
}
}
return URL, nil
}
const indexPath = "/devfiles/index.json"
// getRegistryDevfiles retrieves the registry's index devfile entries
func getRegistryDevfiles(registry Registry) ([]DevfileComponentType, error) {
var devfileIndex []DevfileIndexEntry
URL, err := convertURL(registry.URL)
if err != nil {
return nil, errors.Wrapf(err, "Unable to convert URL %s", registry.URL)
}
registry.URL = URL
indexLink := registry.URL + indexPath
request := util.HTTPRequestParams{
URL: indexLink,
}
if registryUtil.IsSecure(registry.Name) {
token, err := keyring.Get(util.CredentialPrefix+registry.Name, "default")
if err != nil {
return nil, errors.Wrap(err, "Unable to get secure registry credential from keyring")
}
request.Token = token
}
cfg, err := preference.New()
if err != nil {
return nil, err
}
jsonBytes, err := util.HTTPGetRequest(request, cfg.GetRegistryCacheTime())
if err != nil {
return nil, errors.Wrapf(err, "Unable to download the devfile index.json from %s", indexLink)
}
err = json.Unmarshal(jsonBytes, &devfileIndex)
if err != nil {
return nil, errors.Wrapf(err, "Unable to unmarshal the devfile index.json from %s", indexLink)
}
var registryDevfiles []DevfileComponentType
for _, devfileIndexEntry := range devfileIndex {
stackDevfile := DevfileComponentType{
Name: devfileIndexEntry.Name,
DisplayName: devfileIndexEntry.DisplayName,
Description: devfileIndexEntry.Description,
Link: devfileIndexEntry.Links.Link,
Registry: registry,
}
registryDevfiles = append(registryDevfiles, stackDevfile)
}
return registryDevfiles, nil
}
// ListDevfileComponents lists all the available devfile components
func ListDevfileComponents(registryName string) (DevfileComponentTypeList, error) {
catalogDevfileList := &DevfileComponentTypeList{}
var err error
// TODO: consider caching registry information for better performance since it should be fairly stable over time
// Get devfile registries
catalogDevfileList.DevfileRegistries, err = GetDevfileRegistries(registryName)
if err != nil {
return *catalogDevfileList, err
}
if catalogDevfileList.DevfileRegistries == nil {
return *catalogDevfileList, nil
}
// first retrieve the indices for each registry, concurrently
devfileIndicesMutex := &sync.Mutex{}
retrieveRegistryIndices := util.NewConcurrentTasks(len(catalogDevfileList.DevfileRegistries))
// The 2D slice index is the priority of the registry (highest priority has highest index)
// and the element is the devfile slice that belongs to the registry
registrySlice := make([][]DevfileComponentType, len(catalogDevfileList.DevfileRegistries))
for regPriority, reg := range catalogDevfileList.DevfileRegistries {
// Load the devfile registry index.json
registry := reg // Needed to prevent the lambda from capturing the value
registryPriority := regPriority // Needed to prevent the lambda from capturing the value
retrieveRegistryIndices.Add(util.ConcurrentTask{ToRun: func(errChannel chan error) {
registryDevfiles, err := getRegistryDevfiles(registry)
if err != nil {
log.Warningf("Registry %s is not set up properly with error: %v, please check the registry URL and credential (refer `odo registry update --help`)\n", registry.Name, err)
return
}
devfileIndicesMutex.Lock()
registrySlice[registryPriority] = registryDevfiles
devfileIndicesMutex.Unlock()
}})
}
if err := retrieveRegistryIndices.Run(); err != nil {
return *catalogDevfileList, err
}
for _, registryDevfiles := range registrySlice {
catalogDevfileList.Items = append(catalogDevfileList.Items, registryDevfiles...)
}
return *catalogDevfileList, nil
}
// ListComponents lists all the available component types
func ListComponents(client *occlient.Client) (ComponentTypeList, error) {
catalogList, err := getDefaultBuilderImages(client)
if err != nil {
return ComponentTypeList{}, errors.Wrap(err, "unable to get image streams")
}
if len(catalogList) == 0 {
return ComponentTypeList{}, errors.New("unable to retrieve any catalog images from the OpenShift cluster")
}
return ComponentTypeList{
TypeMeta: metav1.TypeMeta{
Kind: "List",
APIVersion: apiVersion,
},
Items: catalogList,
}, nil
}
| componentList, err := ListComponents(client)
if err != nil {
return nil, errors.Wrap(err, "unable to list components")
}
// do a partial search in all the components
for _, component := range componentList.Items {
// we only show components that contain the search term and that have at least non-hidden tag
// since a component with all hidden tags is not shown in the odo catalog list components either
if strings.Contains(component.ObjectMeta.Name, name) && len(component.Spec.NonHiddenTags) > 0 {
result = append(result, component.ObjectMeta.Name)
}
}
return result, nil
}
// ComponentExists returns true if the given component type and the version are valid, false if not
func ComponentExists(client *occlient.Client, componentType string, componentVersion string) (bool, error) {
imageStream, err := client.GetImageStream("", componentType, componentVersion)
if err != nil {
return false, errors.Wrapf(err, "unable to get from catalog")
}
if imageStream == nil {
return false, nil
}
return true, nil
}
// ListServices lists all the available service types
func ListServices(client *occlient.Client) (ServiceTypeList, error) {
clusterServiceClasses, err := getClusterCatalogServices(client)
if err != nil {
return ServiceTypeList{}, errors.Wrapf(err, "unable to get cluster serviceClassExternalName")
}
// Sorting service classes alphabetically
// Reference: https://golang.org/pkg/sort/#example_Slice
sort.Slice(clusterServiceClasses, func(i, j int) bool {
return clusterServiceClasses[i].Name < clusterServiceClasses[j].Name
})
return ServiceTypeList{
TypeMeta: metav1.TypeMeta{
Kind: "List",
APIVersion: apiVersion,
},
Items: clusterServiceClasses,
}, nil
}
// SearchService searches for the services
func SearchService(client *occlient.Client, name string) (ServiceTypeList, error) {
var result []ServiceType
serviceList, err := ListServices(client)
if err != nil {
return ServiceTypeList{}, errors.Wrap(err, "unable to list services")
}
// do a partial search in all the services
for _, service := range serviceList.Items {
if strings.Contains(service.ObjectMeta.Name, name) {
result = append(result, service)
}
}
return ServiceTypeList{
TypeMeta: metav1.TypeMeta{
Kind: "List",
APIVersion: apiVersion,
},
Items: result,
}, nil
}
// getClusterCatalogServices returns the names of all the cluster service
// classes in the cluster
func getClusterCatalogServices(client *occlient.Client) ([]ServiceType, error) {
var classNames []ServiceType
classes, err := client.GetClusterServiceClasses()
if err != nil {
return nil, errors.Wrap(err, "unable to get cluster service classes")
}
planListItems, err := client.GetAllClusterServicePlans()
if err != nil {
return nil, errors.Wrap(err, "Unable to get service plans")
}
for _, class := range classes {
var planList []string
for _, plan := range planListItems {
if plan.Spec.ClusterServiceClassRef.Name == class.Spec.ExternalID {
planList = append(planList, plan.Spec.ExternalName)
}
}
classNames = append(classNames, ServiceType{
TypeMeta: metav1.TypeMeta{
Kind: "ServiceType",
APIVersion: apiVersion,
},
ObjectMeta: metav1.ObjectMeta{
Name: class.Spec.ExternalName,
},
Spec: ServiceSpec{
Hidden: occlient.HasTag(class.Spec.Tags, "hidden"),
PlanList: planList,
},
})
}
return classNames, nil
}
// getDefaultBuilderImages returns the default builder images available in the
// openshift and the current namespaces
func getDefaultBuilderImages(client *occlient.Client) ([]ComponentType, error) {
var imageStreams []imagev1.ImageStream
currentNamespace := client.GetCurrentProjectName()
// Fetch imagestreams from default openshift namespace
openshiftNSImageStreams, openshiftNSISFetchError := client.GetImageStreams(occlient.OpenShiftNameSpace)
if openshiftNSISFetchError != nil {
// Tolerate the error as it might only be a partial failure
// We may get the imagestreams from other Namespaces
//err = errors.Wrapf(openshiftNSISFetchError, "unable to get Image Streams from namespace %s", occlient.OpenShiftNameSpace)
// log it for debugging purposes
klog.V(4).Infof("Unable to get Image Streams from namespace %s. Error %s", occlient.OpenShiftNameSpace, openshiftNSISFetchError.Error())
}
// Fetch imagestreams from current namespace
currentNSImageStreams, currentNSISFetchError := client.GetImageStreams(currentNamespace)
// If failure to fetch imagestreams from current namespace, log the failure for debugging purposes
if currentNSISFetchError != nil {
// Tolerate the error as it is totally a valid scenario to not have any imagestreams in current namespace
// log it for debugging purposes
klog.V(4).Infof("Unable to get Image Streams from namespace %s. Error %s", currentNamespace, currentNSISFetchError.Error())
}
// If failure fetching imagestreams from both namespaces, error out
if openshiftNSISFetchError != nil && currentNSISFetchError != nil {
return nil, errors.Wrapf(
fmt.Errorf("%s.\n%s", openshiftNSISFetchError, currentNSISFetchError),
"Failed to fetch imagestreams from both openshift and %s namespaces.\nPlease ensure that a builder imagestream of required version for the component exists in either openshift or %s namespaces",
currentNamespace,
currentNamespace,
)
}
// Resultant imagestreams is list of imagestreams from current and openshift namespaces
imageStreams = append(imageStreams, openshiftNSImageStreams...)
imageStreams = append(imageStreams, currentNSImageStreams...)
// create a map from name (builder image name + tag) to the ImageStreamTag
// we need this in order to filter out hidden tags
imageStreamTagMap := make(map[string]imagev1.ImageStreamTag)
currentNSImageStreamTags, currentNSImageStreamTagsErr := client.GetImageStreamTags(currentNamespace)
openshiftNSImageStreamTags, openshiftNSImageStreamTagsErr := client.GetImageStreamTags(occlient.OpenShiftNameSpace)
// If failure fetching imagestreamtags from both namespaces, error out
if currentNSImageStreamTagsErr != nil && openshiftNSImageStreamTagsErr != nil {
return nil, errors.Wrapf(
fmt.Errorf("%s.\n%s", currentNSImageStreamTagsErr, openshiftNSImageStreamTagsErr),
"Failed to fetch imagestreamtags from both openshift and %s namespaces.\nPlease ensure that a builder imagestream of required version for the component exists in either openshift or %s namespaces",
currentNamespace,
currentNamespace,
)
}
// create a map from name to ImageStreamTag out of all the ImageStreamTag objects we collect
var imageStreamTags []imagev1.ImageStreamTag
imageStreamTags = append(imageStreamTags, currentNSImageStreamTags...)
imageStreamTags = append(imageStreamTags, openshiftNSImageStreamTags...)
for _, imageStreamTag := range imageStreamTags {
imageStreamTagMap[imageStreamTag.Name] = imageStreamTag
}
builderImages := getBuildersFromImageStreams(imageStreams, imageStreamTagMap)
return builderImages, nil
}
// SliceSupportedTags splits the tags in to fully supported and unsupported tags
func SliceSupportedTags(component ComponentType) ([]string, []string) {
// this makes sure that json marshal shows these lists as [] instead of null
supTag, unSupTag := []string{}, []string{}
tagMap := createImageTagMap(component.Spec.ImageStreamTags)
for _, tag := range component.Spec.NonHiddenTags {
imageName := tagMap[tag]
if isSupportedImage(imageName) {
supTag = append(supTag, tag)
} else {
unSupTag = append(unSupTag, tag)
}
}
return supTag, unSupTag
}
// IsComponentTypeSupported takes the componentType e.g. java:8 and return true if
// it is fully supported i.e. debug mode and more.
func IsComponentTypeSupported(client *occlient.Client, componentType string) (bool, error) {
_, componentType, _, componentVersion := util.ParseComponentImageName(componentType)
imageStream, err := client.GetImageStream("", componentType, componentVersion)
if err != nil {
return false, err
}
tagMap := createImageTagMap(imageStream.Spec.Tags)
return isSupportedImage(tagMap[componentVersion]), nil
}
// createImageTagMap takes a list of image TagReferences and creates a map of type tag name => image name e.g. 1.11 => openshift/nodejs-11
func createImageTagMap(tagRefs []imagev1.TagReference) map[string]string {
tagMap := make(map[string]string)
for _, tagRef := range tagRefs {
imageName := tagRef.From.Name
if tagRef.From.Kind == "DockerImage" {
// we get the image name from the repo url e.g. registry.redhat.com/openshift/nodejs:10 will give openshift/nodejs:10
imageNameParts := strings.SplitN(imageName, "/", 2)
var urlImageName string
// this means the docker image url might just be something like nodejs:10, no namespace or registry info
if len(imageNameParts) == 1 {
urlImageName = imageNameParts[0]
// else block executes when there is a registry information attached in the docker image url
} else {
// we dont want the registry url portion
urlImageName = imageNameParts[1]
}
// here we remove the tag and digest
ns, img, tag, _, _ := occlient.ParseImageName(urlImageName)
imageName = ns + "/" + img + ":" + tag
} else if tagRef.From.Kind == "ImageStreamTag" {
tagList := strings.Split(imageName, ":")
tag := tagList[len(tagList)-1]
// if the kind is a image stream tag that means its pointing to an existing dockerImage or image stream image
// we just look it up from the tapMap we already have
imageName = tagMap[tag]
}
tagMap[tagRef.Name] = imageName
}
return tagMap
}
// isSupportedImages returns if the image is supported or not. the supported images have been provided here
// https://github.com/openshift/odo-init-image/blob/master/language-scripts/image-mappings.json
func isSupportedImage(imgName string) bool {
return supportedImages[imgName]
}
// getBuildersFromImageStreams returns all the builder Images from the image streams provided and also hides the builder images
// which have hidden annotation attached to it
func getBuildersFromImageStreams(imageStreams []imagev1.ImageStream, imageStreamTagMap map[string]imagev1.ImageStreamTag) []ComponentType {
var builderImages []ComponentType
// Get builder images from the available imagestreams
for _, imageStream := range imageStreams {
var allTags []string
var hiddenTags []string
buildImage := false
for _, tagReference := range imageStream.Spec.Tags {
allTags = append(allTags, tagReference.Name)
// Check to see if it is a "builder" image
if _, ok := tagReference.Annotations["tags"]; ok {
for _, t := range strings.Split(tagReference.Annotations["tags"], ",") {
// If the tagReference has "builder" then we will add the image to the list
if t == "builder" {
buildImage = true
}
}
}
}
// Append to the list of images if a "builder" tag was found
if buildImage {
// We need to gauge the ImageStreamTag of each potential builder image, because it might contain
// the 'hidden' tag. If so, this builder image is deprecated and should not be offered to the user
// as candidate
for _, tag := range allTags {
imageStreamTag := imageStreamTagMap[imageStream.Name+":"+tag]
if _, ok := imageStreamTag.Annotations["tags"]; ok {
for _, t := range strings.Split(imageStreamTag.Annotations["tags"], ",") {
// If the tagReference has "builder" then we will add the image to the list
if t == "hidden" {
klog.V(5).Infof("Tag: %v of builder: %v is marked as hidden and therefore will be excluded", tag, imageStream.Name)
hiddenTags = append(hiddenTags, tag)
}
}
}
}
catalogImage := ComponentType{
TypeMeta: metav1.TypeMeta{
Kind: "ComponentType",
APIVersion: apiVersion,
},
ObjectMeta: metav1.ObjectMeta{
Name: imageStream.Name,
Namespace: imageStream.Namespace,
},
Spec: ComponentSpec{
AllTags: allTags,
NonHiddenTags: getAllNonHiddenTags(allTags, hiddenTags),
ImageStreamTags: imageStream.Spec.Tags,
},
}
builderImages = append(builderImages, catalogImage)
klog.V(5).Infof("Found builder image: %#v", catalogImage)
}
}
return builderImages
}
func getAllNonHiddenTags(allTags []string, hiddenTags []string) []string {
result := make([]string, 0, len(allTags))
for _, t1 := range allTags {
found := false
for _, t2 := range hiddenTags {
if t1 == t2 {
found = true
break
}
}
if !found {
result = append(result, t1)
}
}
return result
} | // SearchComponent searches for the component
func SearchComponent(client *occlient.Client, name string) ([]string, error) {
var result []string |
app.rs | use yew::prelude::*;
use yew_prism::Prism;
pub struct App;
impl Component for App {
type Message = ();
type Properties = ();
fn create(_: Self::Properties, _: ComponentLink<Self>) -> Self {
App {}
}
fn update(&mut self, _: Self::Message) -> ShouldRender {
false
}
fn change(&mut self, _props: Self::Properties) -> ShouldRender {
false
}
fn | (&self) -> Html {
html! {
<div>
<h1>{"Yew Prism"}</h1>
<span><a href="https://prismjs.com/" target="_blank">{"Prism"}</a>{" component for yew"}</span>
<h2>{"Example of highlighting rust code"}</h2>
<Prism
code="let greeting: &str = \"Hello World\";"
language="rust"
/>
<h3>{"Code:"}</h3>
<Prism
code="\t<Prism
\tcode=\"let greeting: &str = \"Hello World\"\"
\tlanguage=\"rust\"
/>"
language="rust"
/>
<h2>{"Example of highlighting html code"}</h2>
<Prism
code="<body>\n\t<h1>Hello World</h1>\n\t<div>Yew Prism is awesome</div>\n</body>"
language="markup"
/>
<h3>{"Code:"}</h3>
<Prism
code="\t<Prism
\tcode=\"<body>\\n\\t<h1>Hello World</h1>\\n\\t<div>Yew Prism is awesome</div>\\n</body>\"
\tlanguage=\"markup\"
/>"
language="rust"
/>
</div>
}
}
}
| view |
url.rs | use std::cmp::min;
use std::mem;
use glutin::event::{ElementState, ModifiersState};
use urlocator::{UrlLocation, UrlLocator};
use font::Metrics;
use alacritty_terminal::index::{Column, Point};
use alacritty_terminal::term::cell::Flags;
use alacritty_terminal::term::color::Rgb;
use alacritty_terminal::term::{RenderableCell, RenderableCellContent, SizeInfo};
use crate::config::Config;
use crate::event::Mouse;
use crate::renderer::rects::{RenderLine, RenderRect};
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Url {
lines: Vec<RenderLine>,
end_offset: u16,
num_cols: Column,
}
impl Url {
pub fn rects(&self, metrics: &Metrics, size: &SizeInfo) -> Vec<RenderRect> {
let end = self.end();
self.lines
.iter()
.filter(|line| line.start <= end)
.map(|line| {
let mut rect_line = *line;
rect_line.end = min(line.end, end);
rect_line.rects(Flags::UNDERLINE, metrics, size)
})
.flatten()
.collect()
}
pub fn start(&self) -> Point {
self.lines[0].start
}
pub fn end(&self) -> Point {
self.lines[self.lines.len() - 1].end.sub(self.num_cols, self.end_offset as usize)
}
}
pub struct Urls {
locator: UrlLocator,
urls: Vec<Url>,
scheme_buffer: Vec<RenderableCell>,
last_point: Option<Point>,
state: UrlLocation,
}
impl Default for Urls {
fn default() -> Self {
Self {
locator: UrlLocator::new(),
scheme_buffer: Vec::new(),
urls: Vec::new(),
state: UrlLocation::Reset,
last_point: None,
}
}
}
impl Urls {
pub fn new() -> Self {
Self::default()
}
// Update tracked URLs.
pub fn update(&mut self, num_cols: Column, cell: RenderableCell) {
// Convert cell to character.
let c = match cell.inner {
RenderableCellContent::Chars(chars) => chars[0],
RenderableCellContent::Cursor(_) => return,
};
let point: Point = cell.into();
let end = point;
// Reset URL when empty cells have been skipped.
if point != Point::default() && Some(point.sub(num_cols, 1)) != self.last_point {
self.reset();
}
self.last_point = Some(end);
// Extend current state if a wide char spacer is encountered.
if cell.flags.contains(Flags::WIDE_CHAR_SPACER) {
if let UrlLocation::Url(_, mut end_offset) = self.state {
if end_offset != 0 {
end_offset += 1;
}
self.extend_url(point, end, cell.fg, end_offset);
}
return;
}
// Advance parser.
let last_state = mem::replace(&mut self.state, self.locator.advance(c));
match (self.state, last_state) {
(UrlLocation::Url(_length, end_offset), UrlLocation::Scheme) => {
// Create empty URL.
self.urls.push(Url { lines: Vec::new(), end_offset, num_cols });
// Push schemes into URL.
for scheme_cell in self.scheme_buffer.split_off(0) {
let point = scheme_cell.into();
self.extend_url(point, point, scheme_cell.fg, end_offset);
}
// Push the new cell into URL.
self.extend_url(point, end, cell.fg, end_offset);
},
(UrlLocation::Url(_length, end_offset), UrlLocation::Url(..)) => {
self.extend_url(point, end, cell.fg, end_offset);
},
(UrlLocation::Scheme, _) => self.scheme_buffer.push(cell),
(UrlLocation::Reset, _) => self.reset(),
_ => (),
}
// Reset at un-wrapped linebreak.
if cell.column + 1 == num_cols && !cell.flags.contains(Flags::WRAPLINE) {
self.reset();
}
}
/// Extend the last URL.
fn extend_url(&mut self, start: Point, end: Point, color: Rgb, end_offset: u16) {
let url = self.urls.last_mut().unwrap();
// If color changed, we need to insert a new line.
if url.lines.last().map(|last| last.color) == Some(color) {
url.lines.last_mut().unwrap().end = end;
} else {
url.lines.push(RenderLine { color, start, end });
}
// Update excluded cells at the end of the URL.
url.end_offset = end_offset;
}
/// Find URL below the mouse cursor.
pub fn highlighted(
&self,
config: &Config,
mouse: &Mouse,
mods: ModifiersState,
mouse_mode: bool,
selection: bool,
) -> Option<Url> {
// Require additional shift in mouse mode.
let mut required_mods = config.ui_config.mouse.url.mods();
if mouse_mode {
required_mods |= ModifiersState::SHIFT;
}
// Make sure all prerequisites for highlighting are met.
if selection
|| !mouse.inside_grid
|| config.ui_config.mouse.url.launcher.is_none()
|| required_mods != mods
|| mouse.left_button_state == ElementState::Pressed
{
return None;
}
self.find_at(Point::new(mouse.line, mouse.column))
}
/// Find URL at location.
pub fn find_at(&self, point: Point) -> Option<Url> {
for url in &self.urls {
if (url.start()..=url.end()).contains(&point) {
return Some(url.clone());
}
}
None
}
fn reset(&mut self) {
self.locator = UrlLocator::new();
self.state = UrlLocation::Reset;
self.scheme_buffer.clear();
}
}
#[cfg(test)]
mod tests {
use super::*;
use alacritty_terminal::index::{Column, Line};
use alacritty_terminal::term::cell::MAX_ZEROWIDTH_CHARS;
fn text_to_cells(text: &str) -> Vec<RenderableCell> {
text.chars()
.enumerate()
.map(|(i, c)| RenderableCell {
inner: RenderableCellContent::Chars([c; MAX_ZEROWIDTH_CHARS + 1]),
line: Line(0),
column: Column(i),
fg: Default::default(),
bg: Default::default(),
bg_alpha: 0.,
flags: Flags::empty(),
})
.collect()
}
#[test]
fn multi_color_url() {
let mut input = text_to_cells("test https://example.org ing");
let num_cols = input.len();
input[10].fg = Rgb { r: 0xff, g: 0x00, b: 0xff };
let mut urls = Urls::new();
for cell in input {
urls.update(Column(num_cols), cell);
}
let url = urls.urls.first().unwrap();
assert_eq!(url.start().col, Column(5));
assert_eq!(url.end().col, Column(23));
}
#[test]
fn multiple_urls() {
let input = text_to_cells("test git:a git:b git:c ing");
let num_cols = input.len();
let mut urls = Urls::new();
for cell in input {
urls.update(Column(num_cols), cell);
}
assert_eq!(urls.urls.len(), 3);
assert_eq!(urls.urls[0].start().col, Column(5));
assert_eq!(urls.urls[0].end().col, Column(9));
assert_eq!(urls.urls[1].start().col, Column(11));
assert_eq!(urls.urls[1].end().col, Column(15));
assert_eq!(urls.urls[2].start().col, Column(17)); | assert_eq!(urls.urls[2].end().col, Column(21));
}
} |
|
json_test.go | package encoding
import (
"encoding/json"
"fmt"
"log"
"os"
"time"
)
type Response struct {
Page int `json:"page"`
Items []string `json:"items"`
}
type FruitBasket struct {
Name string `json:"name"` // default json tag
Fruit []string `json:"fruit"`
Id int64 `json:"ref"` // json tag name ref
Private string `json:"private"` // An unexported field is not encoded.
Created time.Time `json:"created"`
}
func test() {
// json for boolean, int, float, string, slice, map, struct
mapU := make(map[string]string)
b1, _ := json.Marshal(true)
i1, _ := json.Marshal(111)
f1, _ := json.Marshal(3.2)
s1, _ := json.Marshal("hello")
sl1, _ := json.Marshal([]string{"a", "b", "c"})
m1, _ := json.Marshal(map[string]string{"a": "a", "b": "b"})
stru1, _ := json.Marshal(&Response{
Page: 1,
Items: []string{"a", "b", "c"},
})
fmt.Println(string(b1))
fmt.Println(string(i1))
fmt.Println(string(f1))
fmt.Println(string(s1))
fmt.Println(string(sl1))
fmt.Println(string(m1))
fmt.Println(string(stru1))
fmt.Println(json.Unmarshal(m1, &mapU)) // 断言是否解析错误
// encode | Id: 999,
Private: "Second-rate",
Created: time.Now(),
}
var jsonData []byte
jsonData, err := json.Marshal(basket)
if err != nil {
log.Println(err)
}
fmt.Println(string(jsonData))
// pretty print
jsonDataPretty, _ := json.MarshalIndent(basket, "", " ")
fmt.Println(string(jsonDataPretty))
//decode
jsonDataB := []byte(`
{
"Name": "Standard",
"Fruit": [
"Apple",
"Banana",
"Orange"
],
"ref": 999,
"Created": "2018-04-09T23:00:00Z"
}`)
basketD := new(FruitBasket)
json.Unmarshal(jsonDataB, basketD)
fmt.Println(basketD)
// arbitrary object and arrays
jsonDataM := []byte(`{
"Name": "Eve",
"Age": 6,
"Parents": [
"Alice",
"Bob"
]
}`)
basketM := new(map[string]interface{})
json.Unmarshal(jsonDataM, basketM)
fmt.Println(basketM)
}
type Dummy struct {
Name string `json:"name"`
Number int64 `json:"number"`
Pointer *string `json:"pointer"`
}
func test_omitempty() {
pointer := "yes"
dummyComplete := Dummy{
Name: "Mr Dummy",
Number: 4,
Pointer: &pointer,
}
data, err := json.Marshal(dummyComplete)
if err != nil {
os.Exit(1)
}
fmt.Println(string(data))
// ALL of those are considered empty by Go
dummyNilPointer := Dummy{
Name: "",
Number: 0,
Pointer: nil,
}
dataNil, err := json.Marshal(dummyNilPointer)
if err != nil {
os.Exit(1)
}
fmt.Println(string(dataNil))
}
type ReturnFormat struct {
ErrNo int64 `json:"errno"`
ErrMsg string `json:"errmsg"`
Data interface{} `json:"data"`
}
func Marshal() {
// data 第一次marshal后存redis
data := struct {
Sn string `json:"sn"`
Trigger string `json:"trigger"`
}{Sn: "sn", Trigger: "trigger"}
dataMarshal, _ := json.Marshal(data)
// marshal的数据转换成string后, 重新封装再次marshal
returnUnMarshal := ReturnFormat{}
returnUnMarshal.ErrNo = 2
returnUnMarshal.ErrMsg = "hello"
returnUnMarshal.Data = string(dataMarshal)
returnMarshal, _ := json.Marshal(returnUnMarshal)
// 通用函数, 想一次性unmarshal上面分开marshal的数据,但是报错
result := new(struct {
ErrNo int64 `json:"errno"`
ErrMsg string `json:"errmsg"`
Data struct {
Sn string `json:"sn"`
Trigger string `json:"trigger"`
} `json:"data"`
})
err := json.Unmarshal(returnMarshal, result)
fmt.Println(err)
} | basket := FruitBasket{
Name: "Standard",
Fruit: []string{"Apple", "Banana", "Orange"}, |
sync.rs | use self::Blocker::*;
/// Synchronous channels/ports
///
/// This channel implementation differs significantly from the asynchronous
/// implementations found next to it (oneshot/stream/share). This is an
/// implementation of a synchronous, bounded buffer channel.
///
/// Each channel is created with some amount of backing buffer, and sends will
/// *block* until buffer space becomes available. A buffer size of 0 is valid,
/// which means that every successful send is paired with a successful recv.
///
/// This flavor of channels defines a new `send_opt` method for channels which
/// is the method by which a message is sent but the thread does not panic if it
/// cannot be delivered.
///
/// Another major difference is that send() will *always* return back the data
/// if it couldn't be sent. This is because it is deterministically known when
/// the data is received and when it is not received.
///
/// Implementation-wise, it can all be summed up with "use a mutex plus some
/// logic". The mutex used here is an OS native mutex, meaning that no user code
/// is run inside of the mutex (to prevent context switching). This
/// implementation shares almost all code for the buffered and unbuffered cases
/// of a synchronous channel. There are a few branches for the unbuffered case,
/// but they're mostly just relevant to blocking senders.
pub use self::Failure::*;
use core::intrinsics::abort;
use core::mem;
use core::ptr;
use crate::sync::atomic::{AtomicUsize, Ordering};
use crate::sync::mpsc::blocking::{self, SignalToken, WaitToken};
use crate::sync::{Mutex, MutexGuard};
use crate::time::Instant;
const MAX_REFCOUNT: usize = (isize::MAX) as usize;
pub struct Packet<T> {
/// Only field outside of the mutex. Just done for kicks, but mainly because
/// the other shared channel already had the code implemented
channels: AtomicUsize,
lock: Mutex<State<T>>,
}
unsafe impl<T: Send> Send for Packet<T> {}
unsafe impl<T: Send> Sync for Packet<T> {}
struct State<T> {
disconnected: bool, // Is the channel disconnected yet?
queue: Queue, // queue of senders waiting to send data
blocker: Blocker, // currently blocked thread on this channel
buf: Buffer<T>, // storage for buffered messages
cap: usize, // capacity of this channel
/// A curious flag used to indicate whether a sender failed or succeeded in
/// blocking. This is used to transmit information back to the thread that it
/// must dequeue its message from the buffer because it was not received.
/// This is only relevant in the 0-buffer case. This obviously cannot be
/// safely constructed, but it's guaranteed to always have a valid pointer
/// value.
canceled: Option<&'static mut bool>,
}
unsafe impl<T: Send> Send for State<T> {}
/// Possible flavors of threads who can be blocked on this channel.
enum Blocker {
BlockedSender(SignalToken),
BlockedReceiver(SignalToken),
NoneBlocked,
}
/// Simple queue for threading threads together. Nodes are stack-allocated, so
/// this structure is not safe at all
struct Queue {
head: *mut Node,
tail: *mut Node,
}
struct Node {
token: Option<SignalToken>,
next: *mut Node,
}
unsafe impl Send for Node {}
/// A simple ring-buffer
struct Buffer<T> {
buf: Vec<Option<T>>,
start: usize,
size: usize,
}
#[derive(Debug)]
pub enum Failure {
Empty,
Disconnected,
}
/// Atomically blocks the current thread, placing it into `slot`, unlocking `lock`
/// in the meantime. This re-locks the mutex upon returning.
fn wait<'a, 'b, T>(
lock: &'a Mutex<State<T>>,
mut guard: MutexGuard<'b, State<T>>,
f: fn(SignalToken) -> Blocker,
) -> MutexGuard<'a, State<T>> {
let (wait_token, signal_token) = blocking::tokens();
match mem::replace(&mut guard.blocker, f(signal_token)) {
NoneBlocked => {}
_ => unreachable!(),
}
drop(guard); // unlock
wait_token.wait(); // block
lock.lock().unwrap() // relock
}
/// Same as wait, but waiting at most until `deadline`.
fn wait_timeout_receiver<'a, 'b, T>(
lock: &'a Mutex<State<T>>,
deadline: Instant,
mut guard: MutexGuard<'b, State<T>>,
success: &mut bool,
) -> MutexGuard<'a, State<T>> {
let (wait_token, signal_token) = blocking::tokens();
match mem::replace(&mut guard.blocker, BlockedReceiver(signal_token)) {
NoneBlocked => {}
_ => unreachable!(),
}
drop(guard); // unlock
*success = wait_token.wait_max_until(deadline); // block
let mut new_guard = lock.lock().unwrap(); // relock
if !*success {
abort_selection(&mut new_guard);
}
new_guard
}
fn abort_selection<T>(guard: &mut MutexGuard<'_, State<T>>) -> bool {
match mem::replace(&mut guard.blocker, NoneBlocked) {
NoneBlocked => true,
BlockedSender(token) => {
guard.blocker = BlockedSender(token);
true
}
BlockedReceiver(token) => {
drop(token);
false
}
}
}
/// Wakes up a thread, dropping the lock at the correct time
fn wakeup<T>(token: SignalToken, guard: MutexGuard<'_, State<T>>) {
// We need to be careful to wake up the waiting thread *outside* of the mutex
// in case it incurs a context switch.
drop(guard);
token.signal();
}
impl<T> Packet<T> {
pub fn new(capacity: usize) -> Packet<T> {
Packet {
channels: AtomicUsize::new(1),
lock: Mutex::new(State {
disconnected: false,
blocker: NoneBlocked,
cap: capacity,
canceled: None,
queue: Queue { head: ptr::null_mut(), tail: ptr::null_mut() },
buf: Buffer {
buf: (0..capacity + if capacity == 0 { 1 } else { 0 }).map(|_| None).collect(),
start: 0,
size: 0,
},
}),
}
}
// wait until a send slot is available, returning locked access to
// the channel state.
fn acquire_send_slot(&self) -> MutexGuard<'_, State<T>> {
let mut node = Node { token: None, next: ptr::null_mut() };
loop {
let mut guard = self.lock.lock().unwrap();
// are we ready to go?
if guard.disconnected || guard.buf.size() < guard.buf.capacity() {
return guard;
}
// no room; actually block
let wait_token = guard.queue.enqueue(&mut node);
drop(guard);
wait_token.wait();
}
}
pub fn send(&self, t: T) -> Result<(), T> {
let mut guard = self.acquire_send_slot();
if guard.disconnected {
return Err(t);
}
guard.buf.enqueue(t);
match mem::replace(&mut guard.blocker, NoneBlocked) {
// if our capacity is 0, then we need to wait for a receiver to be
// available to take our data. After waiting, we check again to make
// sure the port didn't go away in the meantime. If it did, we need
// to hand back our data.
NoneBlocked if guard.cap == 0 => {
let mut canceled = false;
assert!(guard.canceled.is_none());
guard.canceled = Some(unsafe { mem::transmute(&mut canceled) });
let mut guard = wait(&self.lock, guard, BlockedSender);
if canceled { Err(guard.buf.dequeue()) } else { Ok(()) }
}
// success, we buffered some data
NoneBlocked => Ok(()),
// success, someone's about to receive our buffered data.
BlockedReceiver(token) => {
wakeup(token, guard);
Ok(())
}
BlockedSender(..) => panic!("lolwut"),
}
}
pub fn try_send(&self, t: T) -> Result<(), super::TrySendError<T>> {
let mut guard = self.lock.lock().unwrap();
if guard.disconnected {
Err(super::TrySendError::Disconnected(t))
} else if guard.buf.size() == guard.buf.capacity() {
Err(super::TrySendError::Full(t))
} else if guard.cap == 0 {
// With capacity 0, even though we have buffer space we can't
// transfer the data unless there's a receiver waiting.
match mem::replace(&mut guard.blocker, NoneBlocked) {
NoneBlocked => Err(super::TrySendError::Full(t)),
BlockedSender(..) => unreachable!(),
BlockedReceiver(token) => {
guard.buf.enqueue(t);
wakeup(token, guard);
Ok(())
}
}
} else {
// If the buffer has some space and the capacity isn't 0, then we
// just enqueue the data for later retrieval, ensuring to wake up
// any blocked receiver if there is one.
assert!(guard.buf.size() < guard.buf.capacity());
guard.buf.enqueue(t);
match mem::replace(&mut guard.blocker, NoneBlocked) {
BlockedReceiver(token) => wakeup(token, guard),
NoneBlocked => {}
BlockedSender(..) => unreachable!(),
}
Ok(())
}
}
// Receives a message from this channel
//
// When reading this, remember that there can only ever be one receiver at
// time.
pub fn recv(&self, deadline: Option<Instant>) -> Result<T, Failure> {
let mut guard = self.lock.lock().unwrap();
let mut woke_up_after_waiting = false;
// Wait for the buffer to have something in it. No need for a
// while loop because we're the only receiver.
if !guard.disconnected && guard.buf.size() == 0 {
if let Some(deadline) = deadline {
guard =
wait_timeout_receiver(&self.lock, deadline, guard, &mut woke_up_after_waiting);
} else {
guard = wait(&self.lock, guard, BlockedReceiver);
woke_up_after_waiting = true;
}
}
// N.B., channel could be disconnected while waiting, so the order of
// these conditionals is important.
if guard.disconnected && guard.buf.size() == 0 {
return Err(Disconnected);
}
// Pick up the data, wake up our neighbors, and carry on
assert!(guard.buf.size() > 0 || (deadline.is_some() && !woke_up_after_waiting));
if guard.buf.size() == 0 {
return Err(Empty);
}
let ret = guard.buf.dequeue();
self.wakeup_senders(woke_up_after_waiting, guard);
Ok(ret)
}
pub fn try_recv(&self) -> Result<T, Failure> {
let mut guard = self.lock.lock().unwrap();
// Easy cases first
if guard.disconnected && guard.buf.size() == 0 {
return Err(Disconnected);
}
if guard.buf.size() == 0 {
return Err(Empty);
}
// Be sure to wake up neighbors
let ret = Ok(guard.buf.dequeue());
self.wakeup_senders(false, guard);
ret
}
// Wake up pending senders after some data has been received
//
// * `waited` - flag if the receiver blocked to receive some data, or if it
// just picked up some data on the way out
// * `guard` - the lock guard that is held over this channel's lock
fn wakeup_senders(&self, waited: bool, mut guard: MutexGuard<'_, State<T>>) {
let pending_sender1: Option<SignalToken> = guard.queue.dequeue();
// If this is a no-buffer channel (cap == 0), then if we didn't wait we
// need to ACK the sender. If we waited, then the sender waking us up
// was already the ACK.
let pending_sender2 = if guard.cap == 0 && !waited {
match mem::replace(&mut guard.blocker, NoneBlocked) {
NoneBlocked => None,
BlockedReceiver(..) => unreachable!(),
BlockedSender(token) => {
guard.canceled.take();
Some(token)
}
}
} else {
None
};
mem::drop(guard);
// only outside of the lock do we wake up the pending threads
if let Some(token) = pending_sender1 {
token.signal();
}
if let Some(token) = pending_sender2 {
token.signal();
}
}
// Prepares this shared packet for a channel clone, essentially just bumping
// a refcount.
pub fn clone_chan(&self) {
let old_count = self.channels.fetch_add(1, Ordering::SeqCst);
// See comments on Arc::clone() on why we do this (for `mem::forget`).
if old_count > MAX_REFCOUNT {
unsafe {
abort();
}
}
}
pub fn drop_chan(&self) |
pub fn drop_port(&self) {
let mut guard = self.lock.lock().unwrap();
if guard.disconnected {
return;
}
guard.disconnected = true;
// If the capacity is 0, then the sender may want its data back after
// we're disconnected. Otherwise it's now our responsibility to destroy
// the buffered data. As with many other portions of this code, this
// needs to be careful to destroy the data *outside* of the lock to
// prevent deadlock.
let _data = if guard.cap != 0 { mem::take(&mut guard.buf.buf) } else { Vec::new() };
let mut queue =
mem::replace(&mut guard.queue, Queue { head: ptr::null_mut(), tail: ptr::null_mut() });
let waiter = match mem::replace(&mut guard.blocker, NoneBlocked) {
NoneBlocked => None,
BlockedSender(token) => {
*guard.canceled.take().unwrap() = true;
Some(token)
}
BlockedReceiver(..) => unreachable!(),
};
mem::drop(guard);
while let Some(token) = queue.dequeue() {
token.signal();
}
if let Some(token) = waiter {
token.signal();
}
}
}
impl<T> Drop for Packet<T> {
fn drop(&mut self) {
assert_eq!(self.channels.load(Ordering::SeqCst), 0);
let mut guard = self.lock.lock().unwrap();
assert!(guard.queue.dequeue().is_none());
assert!(guard.canceled.is_none());
}
}
////////////////////////////////////////////////////////////////////////////////
// Buffer, a simple ring buffer backed by Vec<T>
////////////////////////////////////////////////////////////////////////////////
impl<T> Buffer<T> {
fn enqueue(&mut self, t: T) {
let pos = (self.start + self.size) % self.buf.len();
self.size += 1;
let prev = mem::replace(&mut self.buf[pos], Some(t));
assert!(prev.is_none());
}
fn dequeue(&mut self) -> T {
let start = self.start;
self.size -= 1;
self.start = (self.start + 1) % self.buf.len();
let result = &mut self.buf[start];
result.take().unwrap()
}
fn size(&self) -> usize {
self.size
}
fn capacity(&self) -> usize {
self.buf.len()
}
}
////////////////////////////////////////////////////////////////////////////////
// Queue, a simple queue to enqueue threads with (stack-allocated nodes)
////////////////////////////////////////////////////////////////////////////////
impl Queue {
fn enqueue(&mut self, node: &mut Node) -> WaitToken {
let (wait_token, signal_token) = blocking::tokens();
node.token = Some(signal_token);
node.next = ptr::null_mut();
if self.tail.is_null() {
self.head = node as *mut Node;
self.tail = node as *mut Node;
} else {
unsafe {
(*self.tail).next = node as *mut Node;
self.tail = node as *mut Node;
}
}
wait_token
}
fn dequeue(&mut self) -> Option<SignalToken> {
if self.head.is_null() {
return None;
}
let node = self.head;
self.head = unsafe { (*node).next };
if self.head.is_null() {
self.tail = ptr::null_mut();
}
unsafe {
(*node).next = ptr::null_mut();
Some((*node).token.take().unwrap())
}
}
}
| {
// Only flag the channel as disconnected if we're the last channel
match self.channels.fetch_sub(1, Ordering::SeqCst) {
1 => {}
_ => return,
}
// Not much to do other than wake up a receiver if one's there
let mut guard = self.lock.lock().unwrap();
if guard.disconnected {
return;
}
guard.disconnected = true;
match mem::replace(&mut guard.blocker, NoneBlocked) {
NoneBlocked => {}
BlockedSender(..) => unreachable!(),
BlockedReceiver(token) => wakeup(token, guard),
}
} |
bug289.go | // errchk $G $D/$F.go
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style |
// https://code.google.com/p/gofrontend/issues/detail?id=1
package main
func f1() {
a, b := f() // ERROR "mismatch|does not match"
_ = a
_ = b
}
func f2() {
var a, b int
a, b = f() // ERROR "mismatch|does not match"
_ = a
_ = b
}
func f() int {
return 1;
} | // license that can be found in the LICENSE file. |
utils.py | import base64
import os
import random
import re
import shutil
import string
import subprocess
import sys
import traceback
from datetime import datetime, timedelta
from random import randint
from subprocess import PIPE
from time import sleep
import colorama
from colorama import Fore, Style, AnsiToWin32
import insomniac.__version__ as __version__
import insomniac.globals as insomniac_globals
random.seed()
# Init colorama but set "wrap" to False to not replace sys.stdout with a proxy object. It's meaningless as
# sys.stdout is set to a custom Logger object in utils.py
colorama.init(wrap=False)
COLOR_HEADER = Fore.MAGENTA
COLOR_OKBLUE = Fore.BLUE
COLOR_OKGREEN = Fore.GREEN
COLOR_REPORT = Fore.YELLOW
COLOR_FAIL = Fore.RED
COLOR_ENDC = Style.RESET_ALL
COLOR_BOLD = Style.BRIGHT
ENGINE_LOGS_DIR_NAME = 'logs'
UI_LOGS_DIR_NAME = 'ui-logs'
APP_REOPEN_WARNING = "Warning: Activity not started, intent has been delivered to currently running top-most instance."
def get_instagram_version(device_id, app_id):
stream = os.popen("adb" + ("" if device_id is None else " -s " + device_id) +
f" shell dumpsys package {app_id}")
output = stream.read()
version_match = re.findall('versionName=(\\S+)', output)
if len(version_match) == 1:
version = version_match[0]
else:
version = "not found"
stream.close()
return version
def versiontuple(v):
return tuple(map(int, (v.split("."))))
def get_connected_devices_adb_ids():
stream = os.popen('adb devices')
output = stream.read()
devices_count = len(re.findall('device\n', output))
stream.close()
if devices_count == 0:
return []
devices = []
for line in output.split('\n'):
if '\tdevice' in line:
devices.append(line.split('\t')[0])
return devices
def check_adb_connection(device_id, wait_for_device):
is_device_id_provided = device_id is not None
while True:
print_timeless("Looking for ADB devices...")
stream = os.popen('adb devices')
output = stream.read()
devices_count = len(re.findall('device\n', output))
stream.close()
if not wait_for_device:
break
if devices_count == 0:
print_timeless(COLOR_HEADER + "Couldn't find any ADB-device available, sleeping a bit and trying again..." + COLOR_ENDC)
sleep(10)
continue
if not is_device_id_provided:
break
found_device = False
for line in output.split('\n'):
if device_id in line and 'device' in line:
found_device = True
break
if found_device:
break
print_timeless(COLOR_HEADER + "Couldn't find ADB-device " + device_id + " available, sleeping a bit and trying again..." + COLOR_ENDC)
sleep(10)
continue
is_ok = True
message = "That's ok."
if devices_count == 0:
is_ok = False
message = "Cannot proceed."
elif devices_count > 1 and not is_device_id_provided:
is_ok = False
message = "Use --device to specify a device."
print_timeless(("" if is_ok else COLOR_FAIL) + "Connected devices via adb: " + str(devices_count) + ". " + message +
COLOR_ENDC)
return is_ok
def open_instagram(device_id, app_id):
print("Open Instagram app")
cmd = ("adb" + ("" if device_id is None else " -s " + device_id) +
f" shell am start -n {app_id}/com.instagram.mainactivity.MainActivity")
cmd_res = subprocess.run(cmd, stdout=PIPE, stderr=PIPE, shell=True, encoding="utf8")
err = cmd_res.stderr.strip()
if err and err != APP_REOPEN_WARNING: |
def open_instagram_with_url(device_id, app_id, url):
print("Open Instagram app with url: {}".format(url))
cmd = ("adb" + ("" if device_id is None else " -s " + device_id) +
f" shell am start -a android.intent.action.VIEW -d {url} {app_id}")
cmd_res = subprocess.run(cmd, stdout=PIPE, stderr=PIPE, shell=True, encoding="utf8")
err = cmd_res.stderr.strip()
if err and err != APP_REOPEN_WARNING:
print(COLOR_FAIL + err + COLOR_ENDC)
return False
return True
def close_instagram(device_id, app_id):
print("Close Instagram app")
os.popen("adb" + ("" if device_id is None else " -s " + device_id) +
f" shell am force-stop {app_id}").close()
# Press HOME to leave a possible state of opened system dialog(s)
os.popen("adb" + ("" if device_id is None else " -s " + device_id) +
f" shell input keyevent 3").close()
def clear_instagram_data(device_id, app_id):
print("Clear Instagram data")
os.popen("adb" + ("" if device_id is None else " -s " + device_id) +
f" shell pm clear {app_id}").close()
def save_crash(device, ex=None):
global print_log
try:
device.wake_up()
directory_name = "Crash-" + datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
try:
os.makedirs(os.path.join("crashes", directory_name), exist_ok=False)
except OSError:
print(COLOR_FAIL + "Directory " + directory_name + " already exists." + COLOR_ENDC)
return
screenshot_format = ".png" if device.is_old() else ".jpg"
try:
device.screenshot(os.path.join("crashes", directory_name, "screenshot" + screenshot_format))
except RuntimeError:
print(COLOR_FAIL + "Cannot save screenshot." + COLOR_ENDC)
view_hierarchy_format = ".xml"
try:
device.dump_hierarchy(os.path.join("crashes", directory_name, "view_hierarchy" + view_hierarchy_format))
except RuntimeError:
print(COLOR_FAIL + "Cannot save view hierarchy." + COLOR_ENDC)
with open(os.path.join("crashes", directory_name, "logs.txt"), 'w', encoding="utf-8") as outfile:
outfile.write(print_log)
if ex:
outfile.write("\n")
outfile.write(describe_exception(ex))
shutil.make_archive(os.path.join("crashes", directory_name), 'zip', os.path.join("crashes", directory_name))
shutil.rmtree(os.path.join("crashes", directory_name))
if insomniac_globals.is_insomniac():
print(COLOR_OKGREEN + "Crash saved as \"crashes/" + directory_name + ".zip\"." + COLOR_ENDC)
print(COLOR_OKGREEN + "Please attach this file if you gonna report the crash at" + COLOR_ENDC)
print(COLOR_OKGREEN + "https://github.com/alexal1/Insomniac/issues\n" + COLOR_ENDC)
except Exception as e:
print(COLOR_FAIL + f"Could not save crash after an error. Crash-save-error: {str(e)}" + COLOR_ENDC)
print(COLOR_FAIL + describe_exception(e) + COLOR_ENDC)
def print_copyright():
if insomniac_globals.is_insomniac():
print_timeless("\nIf you like this bot, please " + COLOR_BOLD + "give us a star" + COLOR_ENDC + ":")
print_timeless(COLOR_BOLD + "https://github.com/alexal1/Insomniac\n" + COLOR_ENDC)
def _print_with_time_decorator(standard_print, print_time, debug, ui_log):
def wrapper(*args, **kwargs):
if insomniac_globals.is_ui_process and not ui_log:
return
if debug and not __version__.__debug_mode__:
return
global print_log
if print_time:
time = datetime.now().strftime("%m/%d %H:%M:%S")
print_log += re.sub(r"\[\d+m", '', ("[" + time + "] " + str(*args, **kwargs) + "\n"))
return standard_print("[" + time + "]", *args, **kwargs)
else:
print_log += re.sub(r"\[\d+m", '', (str(*args, **kwargs) + "\n"))
return standard_print(*args, **kwargs)
return wrapper
def get_value(count: str, name: str, default: int, max_count=None):
return _get_value(count, name, default, max_count, is_float=False)
def get_float_value(count: str, name: str, default: float, max_count=None):
return _get_value(count, name, default, max_count, is_float=True)
def _get_value(count, name, default, max_count, is_float):
def print_error():
print(COLOR_FAIL + name.format(default) + f". Using default value instead of \"{count}\", because it must be "
"either a number (e.g. 2) or a range (e.g. 2-4)." + COLOR_ENDC)
parts = count.split("-")
if len(parts) <= 0:
value = default
print_error()
elif len(parts) == 1:
try:
value = float(count) if is_float else int(count)
print(COLOR_BOLD + name.format(value, "%.2f") + COLOR_ENDC)
except ValueError:
value = default
print_error()
elif len(parts) == 2:
try:
value = random.uniform(float(parts[0]), float(parts[1])) if is_float \
else randint(int(parts[0]), int(parts[1]))
print(COLOR_BOLD + name.format(value, "%.2f") + COLOR_ENDC)
except ValueError:
value = default
print_error()
else:
value = default
print_error()
if max_count is not None and value > max_count:
print(COLOR_FAIL + name.format(max_count) + f". This is max value." + COLOR_ENDC)
value = max_count
return value
def get_left_right_values(left_right_str, name, default):
def print_error():
print(COLOR_FAIL + name.format(default) + f". Using default value instead of \"{left_right_str}\", because it "
"must be either a number (e.g. 2) or a range (e.g. 2-4)." + COLOR_ENDC)
parts = left_right_str.split("-")
if len(parts) <= 0:
value = default
print_error()
elif len(parts) == 1:
try:
value = (int(left_right_str), int(left_right_str))
print(COLOR_BOLD + name.format(value) + COLOR_ENDC)
except ValueError:
value = default
print_error()
elif len(parts) == 2:
try:
value = (int(parts[0]), int(parts[1]))
print(COLOR_BOLD + name.format(value) + COLOR_ENDC)
except ValueError:
value = default
print_error()
else:
value = default
print_error()
return value
def get_from_to_timestamps_by_hours(hours):
"""Returns a tuple of two timestamps: (given number of hours before; current time)"""
return get_from_to_timestamps_by_minutes(hours*60)
def get_from_to_timestamps_by_minutes(minutes):
"""Returns a tuple of two timestamps: (given number of minutes before; current time)"""
time_to = datetime.now().timestamp()
delta = timedelta(minutes=minutes).total_seconds()
time_from = time_to - delta
return time_from, time_to
def get_count_of_nums_in_str(str_to_check):
count = 0
for i in range(0, 10):
count += str_to_check.count(str(i))
return count
def get_random_string(length):
return ''.join(random.choices(string.ascii_uppercase + string.digits, k=length))
def describe_exception(ex, with_stacktrace=True):
trace = ''.join(traceback.format_exception(etype=type(ex), value=ex, tb=ex.__traceback__)) if with_stacktrace else ''
description = f"Error - {str(ex)}\n{trace}"
return description
def split_list_items_with_separator(original_list, separator):
values = []
for record in original_list:
for value in record.split(separator):
stripped_value = value.strip()
if stripped_value:
values.append(stripped_value)
return values
def to_base_64(text):
text_bytes = text.encode(encoding='UTF-8', errors='strict')
base64_bytes = base64.b64encode(text_bytes)
base64_text = base64_bytes.decode(encoding='UTF-8', errors='strict')
return base64_text
def from_base_64(base64_text):
base64_bytes = base64_text.encode(encoding='UTF-8', errors='strict')
text_bytes = base64.b64decode(base64_bytes)
text = text_bytes.decode(encoding='UTF-8', errors='strict')
return text
def _get_logs_dir_name():
if insomniac_globals.is_ui_process:
return UI_LOGS_DIR_NAME
return ENGINE_LOGS_DIR_NAME
def _get_log_file_name(logs_directory_name):
os.makedirs(os.path.join(logs_directory_name), exist_ok=True)
curr_time = datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
log_name = f"{insomniac_globals.executable_name}_log-{curr_time}{'-'+insomniac_globals.execution_id if insomniac_globals.execution_id != '' else ''}.log"
log_path = os.path.join(logs_directory_name, log_name)
return log_path
class Timer:
duration = None
start_time = None
end_time = None
def __init__(self, seconds):
self.duration = timedelta(seconds=seconds)
self.start()
def start(self):
self.start_time = datetime.now()
self.end_time = self.start_time + self.duration
def is_expired(self):
return datetime.now() > self.end_time
def get_seconds_left(self):
time_since_start = datetime.now() - self.start_time
if time_since_start >= self.duration:
return 0
else:
return int((self.duration - time_since_start).total_seconds())
class Logger(object):
is_log_initiated = False
def __init__(self):
sys.stdout.reconfigure(encoding='utf-8')
self.wrapped_stdout = AnsiToWin32(sys.stdout)
self.terminal = self.wrapped_stdout.stream
self.log = None
def _init_log(self):
if not self.is_log_initiated:
self.log = AnsiToWin32(open(_get_log_file_name(_get_logs_dir_name()), "a", encoding="utf-8")).stream
self.is_log_initiated = True
def write(self, message):
self._init_log()
self.terminal.write(message)
self.terminal.flush()
self.log.write(message)
self.log.flush()
def flush(self):
self._init_log()
self.terminal.flush()
self.log.flush()
def fileno(self):
return self.wrapped_stdout.wrapped.fileno()
sys.stdout = Logger()
print_log = ""
print_timeless = _print_with_time_decorator(print, False, False, False)
print_timeless_ui = _print_with_time_decorator(print, False, False, True)
print_debug = _print_with_time_decorator(print, True, True, False)
print_ui = _print_with_time_decorator(print, True, False, True)
print_debug_ui = _print_with_time_decorator(print, True, True, True)
print = _print_with_time_decorator(print, True, False, False) | print(COLOR_FAIL + err + COLOR_ENDC)
|
utils.py | import math
from rply import LexerGenerator, ParserGenerator
def build_lexer():
# LEXERGENERATOR INSTANZIEREN
lexer_generator = LexerGenerator()
# WHITESPACES IGNORIEREN
lexer_generator.ignore(r'\s+')
# ZAHLEN ERKENNEN
# -? => ENTWEDER MINUS ODER NICHT
# \.? => ENTWEDER EIN PUNKT ODER NICHT
# [0-9]* BELIEBIG OFT 0-9 (MINDESTENS 0 MAL)
# [0-9]+ BELIEBIG OFT 0-9 (MINDESTENS 1 MAL)
# 'NUM' => NUMBER
lexer_generator.add('NUM', r'-?[0-9]*\.?[0-9]+')
# OPERATOREN
lexer_generator.add('ADD', r'\+') # 'ADD' => ADD
lexer_generator.add('SUB', r'-') # 'SUB' => SUBTRACT
lexer_generator.add('MUL', r'\*') # 'MUL' => MULTIPLY
lexer_generator.add('DIV', r'/') # 'DIV' => DIVIDE
lexer_generator.add('MOD', r'%') # 'MOD' => MODULO | lexer_generator.add('BR_C', r'\)') # 'BR_C' => BRACKET CLOSE
lexer_generator.add('ABS_P', r'\|') # 'ABS_P' => ABSOLUTE PART
# LEXER ERSTELLEN UND ZURÜCKGEBEN
return lexer_generator.build()
def build_parser():
# TOKENS FÜR PARSER FESTLEGEN
parser_generator = ParserGenerator([
'NUM',
'ADD', 'SUB', 'MUL', 'DIV', 'MOD', 'EXP',
'ABS_P',
'BR_O', 'BR_C'
])
# REGELN FÜR PARSER FESTLEGEN
@parser_generator.production('main : expr')
def main(x): return x[0]
@parser_generator.production('expr : factor')
def term_zahl(x): return x[0]
@parser_generator.production('expr : expr SUB factor')
def term_zahl(x): return x[0] - x[2]
@parser_generator.production('expr : expr ADD factor')
def term_zahl(x): return x[0] + x[2]
# STANDARD RECHENOPERATIONEN
@parser_generator.production('factor : term')
def term_zahl(x): return x[0]
@parser_generator.production('factor : factor EXP term')
def term_zahl(x): return x[0] ** x[2]
@parser_generator.production('factor : factor DIV term')
def term_zahl(x): return x[0] / x[2]
@parser_generator.production('factor : factor MOD term')
def term_zahl(x): return x[0] % x[2]
@parser_generator.production('factor : factor MUL term')
def term_zahl(x): return x[0] * x[2]
@parser_generator.production('term : NUM')
def term_zahl(x): return float(x[0].getstr())
# KLAMMERN
@parser_generator.production('term : BR_O expr BR_C')
def term_zahl(x): return x[1]
# BETRAG
@parser_generator.production('term : ABS_P expr ABS_P')
def term_zahl(x): return x[0] if x[0] >= 0 else x[0] * -1
return parser_generator.build()
lexer = build_lexer()
parser = build_parser() | lexer_generator.add('EXP', r'^|\*\*') # 'EXP' => EXPONENTIATE
lexer_generator.add('BR_O', r'\(') # 'BR_O' => BRACKET OPEN |
__init__.py | from networkx.algorithms.assortativity import *
from networkx.algorithms.block import *
from networkx.algorithms.boundary import *
from networkx.algorithms.centrality import *
from networkx.algorithms.cluster import *
from networkx.algorithms.clique import *
from networkx.algorithms.community import *
from networkx.algorithms.components import *
from networkx.algorithms.coloring import *
from networkx.algorithms.core import *
from networkx.algorithms.cycles import *
from networkx.algorithms.dag import *
from networkx.algorithms.distance_measures import *
from networkx.algorithms.dominance import *
from networkx.algorithms.dominating import *
from networkx.algorithms.hierarchy import *
from networkx.algorithms.hybrid import *
from networkx.algorithms.matching import *
from networkx.algorithms.minors import *
from networkx.algorithms.mis import *
from networkx.algorithms.mst import * | from networkx.algorithms.operators import *
from networkx.algorithms.shortest_paths import *
from networkx.algorithms.smetric import *
from networkx.algorithms.triads import *
from networkx.algorithms.traversal import *
from networkx.algorithms.isolate import *
from networkx.algorithms.euler import *
from networkx.algorithms.vitality import *
from networkx.algorithms.chordal import *
from networkx.algorithms.richclub import *
from networkx.algorithms.distance_regular import *
from networkx.algorithms.swap import *
from networkx.algorithms.graphical import *
from networkx.algorithms.simple_paths import *
import networkx.algorithms.assortativity
import networkx.algorithms.bipartite
import networkx.algorithms.centrality
import networkx.algorithms.cluster
import networkx.algorithms.clique
import networkx.algorithms.components
import networkx.algorithms.connectivity
import networkx.algorithms.coloring
import networkx.algorithms.flow
import networkx.algorithms.isomorphism
import networkx.algorithms.link_analysis
import networkx.algorithms.shortest_paths
import networkx.algorithms.traversal
import networkx.algorithms.chordal
import networkx.algorithms.operators
import networkx.algorithms.tree
# bipartite
from networkx.algorithms.bipartite import (projected_graph, project, is_bipartite,
complete_bipartite_graph)
# connectivity
from networkx.algorithms.connectivity import (minimum_edge_cut, minimum_node_cut,
average_node_connectivity, edge_connectivity, node_connectivity,
stoer_wagner, all_pairs_node_connectivity, all_node_cuts)
# isomorphism
from networkx.algorithms.isomorphism import (is_isomorphic, could_be_isomorphic,
fast_could_be_isomorphic, faster_could_be_isomorphic)
# flow
from networkx.algorithms.flow import (maximum_flow, maximum_flow_value,
minimum_cut, minimum_cut_value, capacity_scaling, network_simplex,
min_cost_flow_cost, max_flow_min_cost, min_cost_flow, cost_of_flow)
from .tree.recognition import *
from .tree.branchings import (
maximum_branching, minimum_branching,
maximum_spanning_arborescence, minimum_spanning_arborescence
) | from networkx.algorithms.link_analysis import *
from networkx.algorithms.link_prediction import * |
_z.py | import _plotly_utils.basevalidators
class | (_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="z", parent_name="isosurface.lightposition", **kwargs
):
super(ZValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwargs.pop("edit_type", "calc"),
max=kwargs.pop("max", 100000),
min=kwargs.pop("min", -100000),
**kwargs,
)
| ZValidator |
json_compatibility.rs | //! Types which are serializable to JSON, which map to types defined outside this module.
mod account;
mod auction_state;
mod contracts;
mod stored_value;
use casper_types::{contracts::NamedKeys, NamedKey};
pub use account::Account; | /// A helper function to change NamedKeys into a Vec<NamedKey>
pub fn vectorize(keys: &NamedKeys) -> Vec<NamedKey> {
let named_keys = keys
.iter()
.map(|(name, key)| NamedKey {
name: name.clone(),
key: key.to_formatted_string(),
})
.collect();
named_keys
} | pub use auction_state::AuctionState;
pub use contracts::{Contract, ContractPackage};
pub use stored_value::StoredValue;
|
batchnorm.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np # type: ignore
import onnx
from ..base import Base
from . import expect
class BatchNormalization(Base):
@staticmethod
def export(): # type: () -> None
def _batchnorm_test_mode(x, s, bias, mean, var, epsilon=1e-5): # type: ignore
|
# input size: (1, 2, 1, 3)
x = np.array([[[[-1, 0, 1]], [[2, 3, 4]]]]).astype(np.float32)
s = np.array([1.0, 1.5]).astype(np.float32)
bias = np.array([0, 1]).astype(np.float32)
mean = np.array([0, 3]).astype(np.float32)
var = np.array([1, 1.5]).astype(np.float32)
y = _batchnorm_test_mode(x, s, bias, mean, var).astype(np.float32)
node = onnx.helper.make_node(
'BatchNormalization',
inputs=['x', 's', 'bias', 'mean', 'var'],
outputs=['y'],
)
# output size: (1, 2, 1, 3)
expect(node, inputs=[x, s, bias, mean, var], outputs=[y],
name='test_batchnorm_example')
# input size: (2, 3, 4, 5)
x = np.random.randn(2, 3, 4, 5).astype(np.float32)
s = np.random.randn(3).astype(np.float32)
bias = np.random.randn(3).astype(np.float32)
mean = np.random.randn(3).astype(np.float32)
var = np.random.rand(3).astype(np.float32)
epsilon = 1e-2
y = _batchnorm_test_mode(x, s, bias, mean, var, epsilon).astype(np.float32)
node = onnx.helper.make_node(
'BatchNormalization',
inputs=['x', 's', 'bias', 'mean', 'var'],
outputs=['y'],
epsilon=epsilon,
)
# output size: (2, 3, 4, 5)
expect(node, inputs=[x, s, bias, mean, var], outputs=[y],
name='test_batchnorm_epsilon')
| dims_x = len(x.shape)
dim_ones = (1,) * (dims_x - 2)
s = s.reshape(-1, *dim_ones)
bias = bias.reshape(-1, *dim_ones)
mean = mean.reshape(-1, *dim_ones)
var = var.reshape(-1, *dim_ones)
return s * (x - mean) / np.sqrt(var + epsilon) + bias |
describe.go | package git
/*
#include <git2.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
// DescribeOptions represents the describe operation configuration.
//
// You can use DefaultDescribeOptions() to get default options.
type DescribeOptions struct {
// How many tags as candidates to consider to describe the input commit-ish.
// Increasing it above 10 will take slightly longer but may produce a more
// accurate result. 0 will cause only exact matches to be output.
MaxCandidatesTags uint // default: 10
// By default describe only shows annotated tags. Change this in order
// to show all refs from refs/tags or refs/.
Strategy DescribeOptionsStrategy // default: DescribeDefault
// Only consider tags matching the given glob(7) pattern, excluding
// the "refs/tags/" prefix. Can be used to avoid leaking private
// tags from the repo.
Pattern string
// When calculating the distance from the matching tag or
// reference, only walk down the first-parent ancestry.
OnlyFollowFirstParent bool
// If no matching tag or reference is found, the describe
// operation would normally fail. If this option is set, it
// will instead fall back to showing the full id of the commit.
ShowCommitOidAsFallback bool
}
// DefaultDescribeOptions returns default options for the describe operation.
func DefaultDescribeOptions() (DescribeOptions, error) {
runtime.LockOSThread()
defer runtime.UnlockOSThread()
opts := C.git_describe_options{}
ecode := C.git_describe_init_options(&opts, C.GIT_DESCRIBE_OPTIONS_VERSION)
if ecode < 0 {
return DescribeOptions{}, MakeGitError(ecode)
}
return DescribeOptions{
MaxCandidatesTags: uint(opts.max_candidates_tags),
Strategy: DescribeOptionsStrategy(opts.describe_strategy),
}, nil
}
// DescribeFormatOptions can be used for formatting the describe string.
//
// You can use DefaultDescribeFormatOptions() to get default options.
type DescribeFormatOptions struct {
// Size of the abbreviated commit id to use. This value is the
// lower bound for the length of the abbreviated string.
AbbreviatedSize uint // default: 7
// Set to use the long format even when a shorter name could be used.
AlwaysUseLongFormat bool
// If the workdir is dirty and this is set, this string will be
// appended to the description string.
DirtySuffix string
}
// DefaultDescribeFormatOptions returns default options for formatting
// the output.
func DefaultDescribeFormatOptions() (DescribeFormatOptions, error) {
runtime.LockOSThread()
defer runtime.UnlockOSThread()
opts := C.git_describe_format_options{}
ecode := C.git_describe_init_format_options(&opts, C.GIT_DESCRIBE_FORMAT_OPTIONS_VERSION)
if ecode < 0 {
return DescribeFormatOptions{}, MakeGitError(ecode)
}
return DescribeFormatOptions{
AbbreviatedSize: uint(opts.abbreviated_size),
AlwaysUseLongFormat: opts.always_use_long_format == 1, | // to git-describe, namely they say to look for any reference in
// either refs/tags/ or refs/ respectively.
//
// By default it only shows annotated tags.
type DescribeOptionsStrategy uint
// Describe strategy options.
const (
DescribeDefault DescribeOptionsStrategy = C.GIT_DESCRIBE_DEFAULT
DescribeTags DescribeOptionsStrategy = C.GIT_DESCRIBE_TAGS
DescribeAll DescribeOptionsStrategy = C.GIT_DESCRIBE_ALL
)
// Describe performs the describe operation on the commit.
func (c *Commit) Describe(opts *DescribeOptions) (*DescribeResult, error) {
var resultPtr *C.git_describe_result
var cDescribeOpts *C.git_describe_options
if opts != nil {
var cpattern *C.char
if len(opts.Pattern) > 0 {
cpattern = C.CString(opts.Pattern)
defer C.free(unsafe.Pointer(cpattern))
}
cDescribeOpts = &C.git_describe_options{
version: C.GIT_DESCRIBE_OPTIONS_VERSION,
max_candidates_tags: C.uint(opts.MaxCandidatesTags),
describe_strategy: C.uint(opts.Strategy),
pattern: cpattern,
only_follow_first_parent: cbool(opts.OnlyFollowFirstParent),
show_commit_oid_as_fallback: cbool(opts.ShowCommitOidAsFallback),
}
}
runtime.LockOSThread()
defer runtime.UnlockOSThread()
ecode := C.git_describe_commit(&resultPtr, c.ptr, cDescribeOpts)
runtime.KeepAlive(c)
if ecode < 0 {
return nil, MakeGitError(ecode)
}
return newDescribeResultFromC(resultPtr), nil
}
// DescribeWorkdir describes the working tree. It means describe HEAD
// and appends <mark> (-dirty by default) if the working tree is dirty.
func (repo *Repository) DescribeWorkdir(opts *DescribeOptions) (*DescribeResult, error) {
var resultPtr *C.git_describe_result
var cDescribeOpts *C.git_describe_options
if opts != nil {
var cpattern *C.char
if len(opts.Pattern) > 0 {
cpattern = C.CString(opts.Pattern)
defer C.free(unsafe.Pointer(cpattern))
}
cDescribeOpts = &C.git_describe_options{
version: C.GIT_DESCRIBE_OPTIONS_VERSION,
max_candidates_tags: C.uint(opts.MaxCandidatesTags),
describe_strategy: C.uint(opts.Strategy),
pattern: cpattern,
only_follow_first_parent: cbool(opts.OnlyFollowFirstParent),
show_commit_oid_as_fallback: cbool(opts.ShowCommitOidAsFallback),
}
}
runtime.LockOSThread()
defer runtime.UnlockOSThread()
ecode := C.git_describe_workdir(&resultPtr, repo.ptr, cDescribeOpts)
runtime.KeepAlive(repo)
if ecode < 0 {
return nil, MakeGitError(ecode)
}
return newDescribeResultFromC(resultPtr), nil
}
// DescribeResult represents the output from the 'git_describe_commit'
// and 'git_describe_workdir' functions in libgit2.
//
// Use Format() to get a string out of it.
type DescribeResult struct {
ptr *C.git_describe_result
}
func newDescribeResultFromC(ptr *C.git_describe_result) *DescribeResult {
result := &DescribeResult{
ptr: ptr,
}
runtime.SetFinalizer(result, (*DescribeResult).Free)
return result
}
// Format prints the DescribeResult as a string.
func (result *DescribeResult) Format(opts *DescribeFormatOptions) (string, error) {
resultBuf := C.git_buf{}
var cFormatOpts *C.git_describe_format_options
if opts != nil {
cDirtySuffix := C.CString(opts.DirtySuffix)
defer C.free(unsafe.Pointer(cDirtySuffix))
cFormatOpts = &C.git_describe_format_options{
version: C.GIT_DESCRIBE_FORMAT_OPTIONS_VERSION,
abbreviated_size: C.uint(opts.AbbreviatedSize),
always_use_long_format: cbool(opts.AlwaysUseLongFormat),
dirty_suffix: cDirtySuffix,
}
}
runtime.LockOSThread()
defer runtime.UnlockOSThread()
ecode := C.git_describe_format(&resultBuf, result.ptr, cFormatOpts)
runtime.KeepAlive(result)
if ecode < 0 {
return "", MakeGitError(ecode)
}
defer C.git_buf_dispose(&resultBuf)
return C.GoString(resultBuf.ptr), nil
}
// Free cleans up the C reference.
func (result *DescribeResult) Free() {
runtime.SetFinalizer(result, nil)
C.git_describe_result_free(result.ptr)
result.ptr = nil
} | }, nil
}
// DescribeOptionsStrategy behaves like the --tags and --all options |
SlideShow.py | import pathlib
from PySide6 import QtCore, QtWidgets, QtGui
import json
from ffpyplayer.player import MediaPlayer
from classes import DowConfig
from classes import DowDatabase
from classes import DowGlImage
from .SequenceScriptParser import DowSequenceScriptParser
class DowSlideShowManager(QtWidgets.QWidget):
def __init__(self, config : DowConfig, db : DowDatabase, script : pathlib.Path, beat_sound : str, onSlideEndCallback):
QtWidgets.QWidget.__init__(self)
self.__config = config
self.__db = db
self.__onSlideEndCallback = onSlideEndCallback
script_type = json.loads(script.read_text())["Type"]
self.__image = DowGlImage()
self.__image.setContentsMargins(0, 0, 0, 0)
self.__text = QtWidgets.QLabel(parent=self.__image)
self.setLayout(QtWidgets.QVBoxLayout())
self.layout().setContentsMargins(QtCore.QMargins(0,0,0,0))
self.layout().addWidget(self.__image)
self.__sound = MediaPlayer(beat_sound)
self.__sound.set_pause(True)
self.__sound.set_volume(1.0)
if script_type == "Sequence":
self.__engine = DowSequenceScriptParser(script, db, self.__config)
self.__engine.setTextSignal.connect(self.__SetText)
self.__engine.setTextAttributesSignal.connect(self.__SetTextAttributes)
self.__engine.setTextPositionSignal.connect(self.__SetTextPosition)
self.__engine.setImageSignal.connect(self.__SetImage)
self.__engine.setVideoSignal.connect(self.__SetVideo)
self.__engine.onSlideShowEnd.connect(self.__onSlideEndCallback)
self.__engine.setImageListSignal.connect(self.__SetImageList)
self.__engine.nextFileInImageList.connect(self.__NextFileInList)
self.__engine.playSound = self.__PlayBeatSound
self.__engine.Run()
@QtCore.Slot(str,str)
def __SetTextAttributes(self, color : str, size : str):
self.__text.setStyleSheet("QLabel { color : %s; font-size : %s; }" % (color, size))
self.__text.adjustSize()
@QtCore.Slot(QtCore.QPoint)
def __SetTextPosition(self, pos : QtCore.QPoint):
self.__text.move(QtCore.QPoint(self.width() * (pos.x() / 100), self.height() * (pos.y() / 100)))
@QtCore.Slot(str)
def __SetText(self, text : str):
self.__text.setText(text)
self.__text.adjustSize()
@QtCore.Slot()
def __PlayBeatSound(self):
self.__sound.seek(0, relative=False)
self.__sound.set_pause(False)
@QtCore.Slot(str)
def __SetImage(self, file : str):
self.__image.SetImage(file)
@QtCore.Slot(list)
def __SetImageList(self, files : list):
self.__image.SetImageList(files)
@QtCore.Slot(str)
def __SetVideo(self, file : str):
self.__image.SetVideo(file)
@QtCore.Slot()
def | (self):
self.__image.NextFromList()
| __NextFileInList |
hcsr04.py | import machine, time
from machine import Pin
__version__ = '0.2.0'
__author__ = 'Roberto Sánchez'
__license__ = "Apache License 2.0. https://www.apache.org/licenses/LICENSE-2.0"
class HCSR04:
"""
Driver to use the untrasonic sensor HC-SR04.
The sensor range is between 2cm and 4m.
The timeouts received listening to echo pin are converted to OSError('Out of range')
"""
# echo_timeout_us is based in chip range limit (400cm)
def _ | self, trigger_pin, echo_pin, echo_timeout_us=500*2*30):
"""
trigger_pin: Output pin to send pulses
echo_pin: Readonly pin to measure the distance. The pin should be protected with 1k resistor
echo_timeout_us: Timeout in microseconds to listen to echo pin.
By default is based in sensor limit range (4m)
"""
self.echo_timeout_us = echo_timeout_us
# Init trigger pin (out)
self.trigger = Pin(trigger_pin, mode=Pin.OUT, pull=None)
self.trigger.value(0)
# Init echo pin (in)
self.echo = Pin(echo_pin, mode=Pin.IN, pull=None)
def _send_pulse_and_wait(self):
"""
Send the pulse to trigger and listen on echo pin.
We use the method `machine.time_pulse_us()` to get the microseconds until the echo is received.
"""
self.trigger.value(0) # Stabilize the sensor
time.sleep_us(5)
self.trigger.value(1)
# Send a 10us pulse.
time.sleep_us(10)
self.trigger.value(0)
try:
pulse_time = machine.time_pulse_us(self.echo, 1, self.echo_timeout_us)
return pulse_time
except OSError as ex:
if ex.args[0] == 110: # 110 = ETIMEDOUT
raise OSError('Out of range')
raise ex
def distance_mm(self):
"""
Get the distance in milimeters without floating point operations.
"""
pulse_time = self._send_pulse_and_wait()
# To calculate the distance we get the pulse_time and divide it by 2
# (the pulse walk the distance twice) and by 29.1 becasue
# the sound speed on air (343.2 m/s), that It's equivalent to
# 0.34320 mm/us that is 1mm each 2.91us
# pulse_time // 2 // 2.91 -> pulse_time // 5.82 -> pulse_time * 100 // 582
mm = pulse_time * 100 // 582
return mm
def distance_cm(self):
"""
Get the distance in centimeters with floating point operations.
It returns a float
"""
pulse_time = self._send_pulse_and_wait()
# To calculate the distance we get the pulse_time and divide it by 2
# (the pulse walk the distance twice) and by 29.1 becasue
# the sound speed on air (343.2 m/s), that It's equivalent to
# 0.034320 cm/us that is 1cm each 29.1us
cms = (pulse_time / 2) / 29.1
return cms
| _init__( |
makeInstallationRecordMutation.graphql.ts | /* tslint:disable */
import { ConcreteRequest } from "relay-runtime";
export type makeInstallationRecordMutationVariables = {
readonly iID: number;
};
export type makeInstallationRecordMutationResponse = {
readonly makeInstallationRecord: ({
readonly login?: string;
readonly error?: ({
readonly description: string;
}) | null;
}) | null;
};
/*
mutation makeInstallationRecordMutation(
$iID: Int!
) {
makeInstallationRecord(iID: $iID) {
__typename
... on Installation {
login
}
... on MutationError {
error {
description
}
}
... on Node {
__id: id
}
}
}
*/
const node: ConcreteRequest = (function(){
var v0 = [
{
"kind": "LocalArgument",
"name": "iID",
"type": "Int!",
"defaultValue": null
}
],
v1 = [
{
"kind": "Variable",
"name": "iID",
"variableName": "iID",
"type": "Int!"
}
],
v2 = {
"kind": "ScalarField",
"alias": "__id",
"name": "id",
"args": null,
"storageKey": null
},
v3 = {
"kind": "InlineFragment",
"type": "MutationError",
"selections": [
{
"kind": "LinkedField",
"alias": null,
"name": "error",
"storageKey": null,
"args": null,
"concreteType": "Error", | "kind": "ScalarField",
"alias": null,
"name": "description",
"args": null,
"storageKey": null
}
]
}
]
},
v4 = {
"kind": "InlineFragment",
"type": "Installation",
"selections": [
{
"kind": "ScalarField",
"alias": null,
"name": "login",
"args": null,
"storageKey": null
}
]
};
return {
"kind": "Request",
"operationKind": "mutation",
"name": "makeInstallationRecordMutation",
"id": null,
"text": "mutation makeInstallationRecordMutation(\n $iID: Int!\n) {\n makeInstallationRecord(iID: $iID) {\n __typename\n ... on Installation {\n login\n }\n ... on MutationError {\n error {\n description\n }\n }\n ... on Node {\n __id: id\n }\n }\n}\n",
"metadata": {},
"fragment": {
"kind": "Fragment",
"name": "makeInstallationRecordMutation",
"type": "Mutation",
"metadata": null,
"argumentDefinitions": v0,
"selections": [
{
"kind": "LinkedField",
"alias": null,
"name": "makeInstallationRecord",
"storageKey": null,
"args": v1,
"concreteType": null,
"plural": false,
"selections": [
v2,
v3,
v4
]
}
]
},
"operation": {
"kind": "Operation",
"name": "makeInstallationRecordMutation",
"argumentDefinitions": v0,
"selections": [
{
"kind": "LinkedField",
"alias": null,
"name": "makeInstallationRecord",
"storageKey": null,
"args": v1,
"concreteType": null,
"plural": false,
"selections": [
{
"kind": "ScalarField",
"alias": null,
"name": "__typename",
"args": null,
"storageKey": null
},
v2,
v3,
v4
]
}
]
}
};
})();
(node as any).hash = '9f4e7845852f7f10f6fcb845d0f91c54';
export default node; | "plural": false,
"selections": [
{ |
gulpfile.ts | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as cp from 'child_process';
import * as gulp from 'gulp';
import * as path from 'path';
import { gulp_installAzureAccount, gulp_webpack } from 'vscode-azureextensiondev';
declare let exports: { [key: string]: unknown };
function | (): cp.ChildProcess {
const env = process.env;
env.DEBUGTELEMETRY = '1';
env.CODE_TESTS_PATH = path.join(__dirname, 'dist/test');
return cp.spawn('node', ['./node_modules/vscode/bin/test'], { stdio: 'inherit', env });
}
exports['webpack-dev'] = () => gulp_webpack('development');
exports['webpack-prod'] = () => gulp_webpack('production');
exports.test = gulp.series(gulp_installAzureAccount, test);
| test |
bitcoin_de.ts | <?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About BitcoinTrust</source>
<translation>Über BitcoinTrust</translation>
</message>
<message>
<location line="+39"/>
<source><b>BitcoinTrust</b> version</source>
<translation><b>BitcoinTrust</b> Version</translation>
</message>
<message>
<location line="+41"/>
<source>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2014 The BitcoinTrust developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or <a href="http://www.opensource.org/licenses/mit-license.php">http://www.opensource.org/licenses/mit-license.php</a>.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (<a href="https://www.openssl.org/">https://www.openssl.org/</a>) and cryptographic software written by Eric Young (<a href="mailto:[email protected]">[email protected]</a>) and UPnP software written by Thomas Bernard.</source>
<translation>
Dies ist experimentelle Software.
Veröffentlicht unter der MIT/X11-Softwarelizenz, siehe beiligende Datei COPYING oder http://www.opensource.org/licenses/mit-license.php.
Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im OpenSSL-Toolkit (http://www.openssl.org/) entwickelt wurde, sowie kryptographische Software geschrieben von Eric Young ([email protected]) und UPnP-Software geschrieben von Thomas Bernard.</translation>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Adressbuch</translation>
</message>
<message>
<location line="+22"/>
<source>Double-click to edit address or label</source>
<translation>Doppelklicken, um die Adresse oder die Bezeichnung zu bearbeiten</translation>
</message>
<message>
<location line="+24"/>
<source>Create a new address</source>
<translation>Eine neue Adresse erstellen</translation>
</message>
<message>
<location line="+10"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Ausgewählte Adresse in die Zwischenablage kopieren</translation>
</message>
<message>
<location line="-7"/>
<source>&New Address</source>
<translation>&Neue Adresse</translation>
</message>
<message>
<location line="-43"/>
<source>These are your BitcoinTrust addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation>Das sind Ihre BitcoinTrust Adressen um Zahlungen zu erhalten. Sie werden vielleicht verschiedene an jeden Sender vergeben, damit Sie im Auge behalten können wer Sie bezahlt.</translation>
</message>
<message>
<location line="+53"/>
<source>&Copy Address</source>
<translation>Adresse &kopieren</translation>
</message>
<message>
<location line="+7"/>
<source>Show &QR Code</source>
<translation>&QR Code anzeigen</translation>
</message>
<message>
<location line="+7"/>
<source>Sign a message to prove you own a BitcoinTrust address</source>
<translation>Signieren Sie eine Nachricht um zu beweisen, dass Sie eine BitcoinTrust Adresse besitzen</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>&Nachricht signieren</translation>
</message>
<message>
<location line="+17"/>
<source>Delete the currently selected address from the list</source>
<translation>Ausgewählte Adresse aus der Liste entfernen</translation>
</message>
<message>
<location line="-10"/>
<source>Verify a message to ensure it was signed with a specified BitcoinTrust address</source>
<translation>Verifizieren Sie ob eine Nachricht einer bestimmten BitcoinTrust Adresse signiert wurde</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>Nachricht &verifizieren</translation>
</message>
<message>
<location line="+10"/>
<source>&Delete</source>
<translation>&Löschen</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+66"/>
<source>Copy &Label</source>
<translation>&Bezeichnung kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation>&Editieren</translation>
</message>
<message>
<location line="+248"/>
<source>Export Address Book Data</source>
<translation>Adressbuch exportieren</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Kommagetrennte-Datei (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Fehler beim Exportieren</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Datei konnte nicht geschrieben werden: %1</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+145"/>
<source>Label</source>
<translation>Bezeichnung</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(keine Bezeichnung)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Passphrasendialog</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Passphrase eingeben</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Neue Passphrase</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Neue Passphrase wiederholen</translation>
</message>
<message>
<location line="+33"/>
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>For staking only</source>
<translation>Nur zur Zinserzeugung</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+38"/>
<source>Encrypt wallet</source>
<translation>Wallet verschlüsseln</translation>
</message>
<message>
<location line="+7"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Dieser Vorgang benötigt ihre Passphrase, um die Brieftasche zu entsperren.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Wallet entsperren</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Dieser Vorgang benötigt ihre Passphrase, um die Brieftasche zu entschlüsseln.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Wallet entschlüsseln</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Passphrase ändern</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Geben Sie die alte und neue Wallet-Passphrase ein.</translation>
</message>
<message>
<location line="+45"/>
<source>Confirm wallet encryption</source>
<translation>Wallet-Verschlüsselung bestätigen</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>!</source>
<translation>Warnung: Wenn Sie Ihre Wallet verschlüsseln und die Passphrase verlieren, führt dies zum <b>VERLUST ALLER COINS</b>!</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Sind Sie sich sicher, dass Sie Ihre Wallet verschlüsseln möchten?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>WICHTIG: Alle vorherigen Wallet-Sicherungen sollten durch die neu erzeugte, verschlüsselte Wallet ersetzt werden. Aus Sicherheitsgründen werden vorherige Sicherungen der unverschlüsselten Wallet nutzlos, sobald Sie die neue, verschlüsselte Wallet verwenden.</translation>
</message>
<message>
<location line="+103"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>Warnung: Die Feststelltaste ist aktiviert!</translation>
</message>
<message>
<location line="-133"/>
<location line="+60"/>
<source>Wallet encrypted</source>
<translation>Wallet verschlüsselt</translation>
</message>
<message>
<location line="-140"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>BitcoinTrust will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source>
<translation>BitcoinTrust wird sich schließen um den Verschlüsselungsvorgang abzuschließen. Beachten Sie, dass die Verschlüsselung Ihrer Wallet keinen vollständigen Schutz vor Diebstahl Ihrer Coins duch auf Ihrem Computer installierte Malware gewährleistet</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+44"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Wallet-Verschlüsselung fehlgeschlagen</translation>
</message>
<message>
<location line="-56"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Die Wallet-Verschlüsselung ist aufgrund eines internen Fehlers fehlgeschlagen. Ihre Wallet wurde nicht verschlüsselt.</translation>
</message>
<message>
<location line="+7"/>
<location line="+50"/>
<source>The supplied passphrases do not match.</source>
<translation>Die eingegebenen Passphrasen stimmen nicht überein.</translation>
</message>
<message>
<location line="-38"/>
<source>Wallet unlock failed</source>
<translation>Wallet-Entsperrung fehlgeschlagen</translation>
</message>
<message>
<location line="+1"/>
<location line="+12"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Die eingegebene Passphrase zur Wallet-Entschlüsselung war nicht korrekt.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Wallet-Entschlüsselung fehlgeschlagen</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Die Wallet-Passphrase wurde erfolgreich geändert.</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+297"/>
<source>Sign &message...</source>
<translation>&Nachricht signieren...</translation>
</message>
<message>
<location line="-64"/>
<source>Show general overview of wallet</source>
<translation>Allgemeine Wallet-Übersicht anzeigen</translation>
</message>
<message>
<location line="+17"/>
<source>&Transactions</source>
<translation>&Transaktionen</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Transaktionsverlauf durchsehen</translation>
</message>
<message>
<location line="+5"/>
<source>&Address Book</source>
<translation>&Addressbuch</translation>
</message>
<message>
<location line="+1"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Liste der gespeicherten Adressen und Bezeichnungen bearbeiten</translation>
</message>
<message>
<location line="-18"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Liste mit Adressen für eingehende Zahlungen anzeigen</translation>
</message>
<message>
<location line="+34"/>
<source>E&xit</source>
<translation>B&eenden</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Anwendung beenden</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about BitcoinTrust</source>
<translation>Informationen über BitcoinTrust anzeigen</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>Über &Qt</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Informationen über Qt anzeigen</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Konfiguration...</translation>
</message>
<message>
<location line="+4"/>
<source>&Encrypt Wallet...</source>
<translation>Wallet &verschlüsseln...</translation>
</message>
<message>
<location line="+2"/>
<source>&Backup Wallet...</source>
<translation>Wallet &sichern...</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>Passphrase &ändern...</translation>
</message>
<message>
<location line="+9"/>
<source>&Export...</source>
<translation>&Exportieren...</translation>
</message>
<message>
<location line="-55"/>
<source>Send coins to a BitcoinTrust address</source>
<translation>Senden Sie Coins an eine BitcoinTrust Adresse</translation>
</message>
<message>
<location line="+39"/>
<source>Modify configuration options for BitcoinTrust</source>
<translation>Konfigurationsoptionen für BitcoinTrust ändern</translation>
</message>
<message>
<location line="+17"/>
<source>Export the data in the current tab to a file</source>
<translation>Die Daten in der aktuellen Ansicht in eine Datei exportieren</translation>
</message>
<message>
<location line="-13"/>
<source>Encrypt or decrypt wallet</source>
<translation>Wallet verschlüsseln oder entschlüsseln</translation>
</message>
<message>
<location line="+2"/>
<source>Backup wallet to another location</source>
<translation>Eine Wallet-Sicherungskopie erstellen und abspeichern</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Ändert die Passphrase, die für die Wallet-Verschlüsselung benutzt wird</translation>
</message>
<message>
<location line="+10"/>
<source>&Debug window</source>
<translation>&Debugfenster</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>Debugging- und Diagnosekonsole öffnen</translation>
</message>
<message>
<location line="-5"/>
<source>&Verify message...</source>
<translation>Nachricht &verifizieren...</translation>
</message>
<message>
<location line="-214"/>
<location line="+555"/>
<source>BitcoinTrust</source>
<translation>BitcoinTrust</translation>
</message>
<message>
<location line="-555"/>
<source>Wallet</source>
<translation>Wallet</translation>
</message>
<message>
<location line="+193"/>
<source>&About BitcoinTrust</source>
<translation>&Über BitcoinTrust</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>&Anzeigen / Verstecken</translation>
</message>
<message>
<location line="+8"/>
<source>Unlock wallet</source>
<translation>Wallet entsperren</translation>
</message>
<message>
<location line="+1"/>
<source>&Lock Wallet</source>
<translation>Wallet &sperren</translation>
</message>
<message>
<location line="+1"/>
<source>Lock wallet</source>
<translation>Wallet sperren</translation>
</message>
<message>
<location line="+32"/>
<source>&File</source>
<translation>&Datei</translation>
</message>
<message>
<location line="+8"/>
<source>&Settings</source>
<translation>&Einstellungen</translation>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation>&Hilfe</translation>
</message>
<message>
<location line="+17"/>
<source>Tabs toolbar</source>
<translation>Registerkartenleiste</translation>
</message>
<message>
<location line="+46"/>
<location line="+9"/>
<source>[testnet]</source>
<translation>[Testnetz]</translation>
</message>
<message>
<location line="+0"/>
<location line="+58"/>
<source>BitcoinTrust client</source>
<translation>BitcoinTrust Anwendung</translation>
</message>
<message numerus="yes">
<location line="+70"/>
<source>%n active connection(s) to BitcoinTrust network</source>
<translation><numerusform>%n aktive Verbindung zum BitcoinTrust Netzwerk</numerusform><numerusform>%n aktive Verbindungen zum BitcoinTrust Netzwerk</numerusform></translation>
</message>
<message>
<location line="+488"/>
<source>Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3</source>
<translation>Erzeuge Zinsen.<br>Ihr Gewicht ist %1<br>Das Gesamtgewicht ist %2<br>Die erwartete Zeit bis zur nächsten Vergütung ist %3</translation>
</message>
<message>
<location line="+6"/>
<source>Not staking because wallet is locked</source>
<translation>Keine Zinsen werden erzeugt, da die Brieftasche gesperrt ist</translation>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is offline</source>
<translation>Es werden keine Zinsen werden erzeugt, da die Brieftasche gesperrt ist</translation>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is syncing</source>
<translation>Es werden keine Zinsen werden erzeugt, da die Brieftasche nicht synchronisiert ist</translation>
</message>
<message>
<location line="+2"/>
<source>Not staking because you don't have mature coins</source>
<translation>Es werden keine Zinsen werden erzeugt, da Sie keine reifen Coins haben</translation>
</message>
<message>
<location line="-812"/>
<source>&Dashboard</source>
<translation>&Übersicht / Dashboard</translation>
</message>
<message>
<location line="+6"/>
<source>&Receive</source>
<translation>&Empfangen</translation>
</message>
<message>
<location line="+6"/>
<source>&Send</source>
<translation>&Senden</translation>
</message>
<message>
<location line="+49"/>
<source>&Unlock Wallet...</source>
<translation>Wallet &entsperren</translation>
</message>
<message>
<location line="+277"/>
<source>Up to date</source>
<translation>Auf aktuellem Stand</translation>
</message>
<message>
<location line="+43"/>
<source>Catching up...</source>
<translation>Hole auf...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation>Transaktionsgebühr bestätigen</translation>
</message>
<message>
<location line="+27"/>
<source>Sent transaction</source>
<translation>Gesendete Transaktion</translation>
</message>
<message>
<location line="+1"/>
<source>Incoming transaction</source>
<translation>Eingehende Transaktion</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Datum: %1
Betrag: %2
Typ: %3
Adresse: %4</translation>
</message>
<message>
<location line="+100"/>
<location line="+15"/>
<source>URI handling</source>
<translation>URI Verarbeitung</translation>
</message>
<message>
<location line="-15"/>
<location line="+15"/>
<source>URI can not be parsed! This can be caused by an invalid BitcoinTrust address or malformed URI parameters.</source>
<translation>Die URI kann nicht erkannt werden! Die Ursache hierfür kann eine ungültige BitcoinTrust Adresse oder eine fehlerhafte Angabe der URI Parameter sein.</translation>
</message>
<message>
<location line="+9"/>
<source>Wallet is <b>not encrypted</b></source>
<translation>Die Wallet ist <b>nicht verschlüsselt</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Wallet ist <b>verschlüsselt</b> und aktuell <b>entsperrt</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Wallet ist <b>verschlüsselt</b> und aktuell <b>gesperrt</b></translation>
</message>
<message>
<location line="+24"/>
<source>Backup Wallet</source>
<translation>Wallet sichern</translation>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation>Wallet-Daten (*.dat)</translation>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation>Sicherung Fehlgeschlagen</translation>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation>Beim Speichern der Wallet Daten an dem neuen Ort ist ein Fehler aufgetreten.</translation>
</message>
<message numerus="yes">
<location line="+91"/>
<source>%n second(s)</source>
<translation><numerusform>%n Sekunde</numerusform><numerusform>%n Sekunden</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation><numerusform>%n Minute</numerusform><numerusform>%n Minuten</numerusform></translation>
</message>
<message numerus="yes">
<location line="-429"/>
<location line="+433"/>
<source>%n hour(s)</source>
<translation><numerusform>%n Stunde</numerusform><numerusform>%n Stunden</numerusform></translation>
</message>
<message>
<location line="-456"/>
<source>Processed %1 blocks of transaction history.</source>
<translation>%1 Block der Transaktionshistorie heruntergeladen.</translation>
</message>
<message numerus="yes">
<location line="+27"/>
<location line="+433"/>
<source>%n day(s)</source>
<translation><numerusform>%n Tag</numerusform><numerusform>%n Tage</numerusform></translation>
</message>
<message numerus="yes">
<location line="-429"/>
<location line="+6"/>
<source>%n week(s)</source>
<translation><numerusform>%n Woche</numerusform><numerusform>%n Wochen
</numerusform></translation>
</message>
<message>
<location line="+0"/>
<source>%1 and %2</source>
<translation>%1 und %2</translation>
</message>
<message numerus="yes">
<location line="+0"/>
<source>%n year(s)</source>
<translation><numerusform>%n Jahr</numerusform><numerusform>%n Jahre</numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>%1 behind</source>
<translation>%1 verbleibend</translation>
</message>
<message>
<location line="+15"/>
<source>Last received block was generated %1 ago.</source>
<translation>Der zuletzt empfangene Block wurden vor %1 Tagen erstellt.</translation>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation>Nachfolgende Transaktionen werden noch nicht sichtbar sein</translation>
</message>
<message>
<location line="+23"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation>Warnung</translation>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation>Information</translation>
</message>
<message>
<location line="+69"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+324"/>
<source>Not staking</source>
<translation>Aktuell nicht für eine Verzinsung freigeschaltet.</translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+104"/>
<source>A fatal error occurred. BitcoinTrust can no longer continue safely and will quit.</source>
<translation>Ein fataler Fehler ist aufgetreten. BitcoinTrust kann nicht fortgesetzt werden und wird beendet.</translation>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+119"/>
<source>Network Alert</source>
<translation>Netzwerkalarm</translation>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="+14"/>
<source>Coin Control</source>
<translation>"Coin Control"-Funktionen</translation>
</message>
<message>
<location line="+31"/>
<source>Quantity:</source>
<translation>Anzahl:</translation>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation>Byte:</translation>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation>Betrag:</translation>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation>Gebühr:</translation>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation>Zu geringer Ausgabebetrag:</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+493"/>
<source>no</source>
<translation>nein</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation>Abzüglich Gebühr:</translation>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation>Wechselgeld:</translation>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation>Alles (de)selektieren</translation>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation>Baumansicht</translation>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation>Listenansicht</translation>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation>Betrag</translation>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation>Bezeichnung</translation>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation>Bestätigungen</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation>Bestätigt</translation>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation>Priorität</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-456"/>
<source>Copy address</source>
<translation>Adresse kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Bezeichnung kopieren</translation>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation>Betrag kopieren</translation>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation>Transaktions-ID kopieren</translation>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation>Anzahl kopieren</translation>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation>Gebühr kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation>Abzüglich Gebühr kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation>Byte kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation>Zu geringen Ausgabebetrag kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation>Wechselgeld kopieren</translation>
</message>
<message>
<location line="+423"/>
<source>DUST</source>
<translation>STAUB</translation>
</message>
<message>
<location line="+0"/>
<source>yes</source>
<translation>ja</translation>
</message>
<message>
<location line="+9"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<location line="+58"/>
<source>(no label)</source>
<translation>(keine Bezeichnung)</translation>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation>Wechselgeld von %1 (%2)</translation>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation>(Wechselgeld)</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Adresse bearbeiten</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Bezeichnung</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>Die Kennzeichnung verbunden mit diesem Adressbucheintrag.</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Adresse</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>Die Adresse verknüpft mit diesem Adressbucheintrag. Kann nur bei Ausgangsadressen verändert werden.</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Neue Empfangsadresse</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Neue Zahlungsadresse</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Empfangsadresse bearbeiten</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Zahlungsadresse bearbeiten</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Die eingegebene Adresse "%1" befindet sich bereits im Adressbuch.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid BitcoinTrust address.</source>
<translation>Die eingegebene Adresse "%1" ist keine gültige BitcoinTrust Adresse.</translation>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Wallet konnte nicht entsperrt werden.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Generierung eines neuen Schlüssels fehlgeschlagen.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+426"/>
<location line="+12"/>
<source>BitcoinTrust-Qt</source>
<translation>BitcoinTrust-Qt
</translation>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>Version</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Benutzung:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation>Kommandozeilen optionen</translation>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation>UI-Optionen</translation>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation>Sprache festlegen, z.B. "de_DE" (Standard: System Locale)</translation>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation>Minimiert starten</translation>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation>Startbildschirm beim Starten anzeigen (Standard: 1)</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Erweiterte Einstellungen</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>&Allgemein</translation>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source>
<translation>Optionale Transaktionsgebühr pro kB die eine zügige Bearbeitung der Transaktion gewährleistet. Die meisten Transaktionen sind 1 kB. Eine Gebühr von 0.01 ist empfohlen.</translation>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation>Transaktions&gebühr bezahlen</translation>
</message>
<message>
<location line="+31"/>
<source>Reserved amount does not participate in staking and is therefore spendable at any time.</source>
<translation>Zurückgehaltener Betrag der nicht zur Zinserzeugung genutzt wird und daher jederzeit zum Ausgeben bereitstehen.</translation>
</message>
<message>
<location line="+15"/>
<source>Reserve</source>
<translation>Reserviert</translation>
</message>
<message>
<location line="+31"/>
<source>Automatically start BitcoinTrust after logging in to the system.</source>
<translation>Automatisch BitcoinTrust starten beim Einloggen in das System.</translation>
</message>
<message>
<location line="+3"/>
<source>&Start BitcoinTrust on system login</source>
<translation>&Starte BitcoinTrust bei Systemstart</translation>
</message>
<message>
<location line="+21"/>
<source>&Network</source>
<translation>&Netzwerk</translation>
</message>
<message>
<location line="+6"/>
<source>Automatically open the BitcoinTrust client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>Automatisch den BitcoinTrust client port auf dem Router öffnen. Das funktioniert nur wenn der Router UPnP unterstützt und UPnP aktiviert ist.</translation>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation>Portweiterleitung via &UPnP</translation>
</message>
<message>
<location line="+19"/>
<source>Proxy &IP:</source>
<translation>Proxy-&IP:</translation>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation>IP Adresse des Proxies (z.B. 127.0.01)</translation>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation>&Port:</translation>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation>Port des Proxies (z.B. 9050)</translation>
</message>
<message>
<location line="-57"/>
<source>Connect to the BitcoinTrust network through a SOCKS5 proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS5 proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+90"/>
<source>&Window</source>
<translation>&Programmfenster</translation>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Nur ein Symbol im Infobereich anzeigen, nachdem das Programmfenster minimiert wurde.</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>In den Infobereich anstatt in die Taskleiste &minimieren</translation>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation>Minimiert die Anwendung anstatt sie zu beenden wenn das Fenster geschlossen wird. Wenn dies aktiviert ist, müssen Sie das Programm über "Beenden" im Menü schließen.</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>Beim Schließen m&inimieren</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Anzeige</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>&Sprache der Benutzeroberfläche:</translation>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting BitcoinTrust.</source>
<translation>Die Sprache der GUI kann hier verändert werden. Die Einstellung wird nach einem Neustart übernommen.</translation>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>&Einheit der Beträge:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>Wählen Sie die Standarduntereinheit, die in der Benutzeroberfläche und beim Überweisen von BitcoinTrusts angezeigt werden soll.</translation>
</message>
<message>
<location line="+9"/>
<source>Whether to show coin control features or not.</source>
<translation>Legt fest, ob die "Coin Control"-Funktionen angezeigt werden.</translation>
</message>
<message>
<location line="+3"/>
<source>Display coin &control features (experts only!)</source>
<translation>Coin &control features anzeigen (nur Experten!)</translation>
</message>
<message>
<location line="+7"/>
<source>Use black visual theme (requires restart)</source>
<translation>Verwende das schwarze BitcoinTrust Wallet Design (Neustart erforderlich)</translation>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>&OK</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&Abbrechen</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation>&Anwenden</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+47"/>
<source>default</source>
<translation>Standard</translation>
</message>
<message>
<location line="+147"/>
<location line="+9"/>
<source>Warning</source>
<translation>Warnung</translation>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting BitcoinTrust.</source>
<translation>Diese Einstellung wird nach einem Neustart übernommen.</translation>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation>Die eingegebene Proxyadresse ist ungültig.</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Formular</translation>
</message>
<message>
<location line="+46"/>
<location line="+247"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the BitcoinTrust network after a connection is established, but this process has not completed yet.</source>
<translation>Die angezeigte Information kann falsch sein. Die Brieftasche synchronisiert automatisch mit dem BitcoinTrust Netzwerk nachdem eine Verbindung zustande gekommen ist, aber dieser Prozess ist nicht abgeschlossen.</translation>
</message>
<message>
<location line="-173"/>
<source>Stake:</source>
<translation>Stake:</translation>
</message>
<message>
<location line="+32"/>
<source>Unconfirmed:</source>
<translation>Unbestätigt:</translation>
</message>
<message>
<location line="-113"/>
<source>Wallet</source>
<translation>Wallet</translation>
</message>
<message>
<location line="+49"/>
<source>Spendable:</source>
<translation>Ausgabebereit:</translation>
</message>
<message>
<location line="+16"/>
<source>Your current spendable balance</source>
<translation>Ihr aktuell verfügbarer Kontostand</translation>
</message>
<message>
<location line="+80"/>
<source>Immature:</source>
<translation>Unreif:</translation>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation>Erarbeiteter Betrag der noch nicht gereift ist</translation>
</message>
<message>
<location line="+23"/>
<source>Total:</source>
<translation>Gesamtbetrag:</translation>
</message>
<message>
<location line="+16"/>
<source>Your current total balance</source>
<translation>Aktueller Gesamtbetrag aus obigen Kategorien</translation>
</message>
<message>
<location line="+50"/>
<source><b>Recent transactions</b></source>
<translation><b>Letzte Transaktionen</b></translation>
</message>
<message>
<location line="-118"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation>Anzahl der unbestätigten Transaktionen die somit noch nicht zum aktuellen Kontostand zählen.</translation>
</message>
<message>
<location line="-32"/>
<source>Total of coins that was staked, and do not yet count toward the current balance</source>
<translation>Anzahl der unbestätigten Transaktionen die somit noch nicht zum aktuellen Kontostand zählen.</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation>nicht synchron</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start bitcointrust: click-to-pay handler</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation>QR Code Dialog</translation>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation>Zahlung anfordern</translation>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Betrag:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>Bezeichnung:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Nachricht:</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>& Speichern als...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation>Fehler beim Kodieren der URI in den QR-Code.</translation>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation>Der eingegebene Betrag ist ungültig, bitte überprüfen.</translation>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation>Resultierende URI zu lang, bitte den Text für Bezeichnung / Nachricht kürzen.</translation>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation>QR Code Speichern</translation>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation>PNG Grafik (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>Clientname</translation>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<source>N/A</source>
<translation>k.A.</translation>
</message>
<message>
<location line="-194"/>
<source>Client version</source>
<translation>Clientversion</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Information</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation>Verwendete OpenSSL-Version</translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Startzeit</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Netzwerk</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>Anzahl Verbindungen</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation>Am Testnetz</translation>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>Block kette</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Aktuelle Anzahl Blöcke</translation>
</message>
<message>
<location line="+197"/>
<source>&Network Traffic</source>
<translation>& Netzwerk Traffic</translation>
</message>
<message>
<location line="+52"/>
<source>&Clear</source>
<translation>&Zurücksetzen</translation>
</message>
<message>
<location line="+13"/>
<source>Totals</source>
<translation>Gesamt</translation>
</message>
<message>
<location line="+64"/>
<location filename="../rpcconsole.cpp" line="+352"/>
<source>In:</source>
<translation>Eingang:</translation>
</message>
<message>
<location line="+80"/>
<location filename="../rpcconsole.cpp" line="+1"/>
<source>Out:</source>
<translation>Ausgang:</translation>
</message>
<message>
<location line="-383"/>
<source>Last block time</source>
<translation>Letzte Blockzeit</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>&Öffnen</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation>Kommandozeilen Optionen:</translation>
</message>
<message>
<location line="+7"/>
<source>Show the BitcoinTrust-Qt help message to get a list with possible BitcoinTrust command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation>&Zeigen</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Konsole</translation>
</message>
<message>
<location line="-237"/>
<source>Build date</source>
<translation>Erstellungsdatum</translation>
</message>
<message>
<location line="-104"/>
<source>BitcoinTrust - Debug window</source>
<translation>BitcoinTrust - Debug Fenster</translation>
</message>
<message>
<location line="+25"/>
<source>BitcoinTrust Core</source>
<translation>BitcoinTrust Kern</translation>
</message>
<message>
<location line="+256"/>
<source>Debug log file</source>
<translation>Debugprotokolldatei</translation>
</message>
<message>
<location line="+7"/>
<source>Open the BitcoinTrust debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation>Offne die BitcoinTrust Fehlerlogs aus dem Datenverzeichnis. Diese Funktion kann bei größeren Log-Files länger benötigen.</translation>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation>Konsole zurücksetzen</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-28"/>
<source>Welcome to the BitcoinTrust RPC console.</source>
<translation>Willkommen zur BitcoinTrust RPC Anwendung.</translation>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>Pfeiltaste hoch und runter, um den Verlauf durchzublättern und <b>Strg-L</b>, um die Konsole zurückzusetzen.</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Bitte <b>help</b> eingeben, um eine Übersicht verfügbarer Befehle zu erhalten.</translation>
</message>
<message>
<location line="+134"/>
<source>%1 B</source>
<translation>%1 B</translation>
</message>
<message>
<location line="+2"/>
<source>%1 KB</source>
<translation>%1 KB</translation>
</message>
<message>
<location line="+2"/>
<source>%1 MB</source>
<translation>%1 MB</translation>
</message>
<message>
<location line="+2"/>
<source>%1 GB</source>
<translation>%1 GB
</translation>
</message>
<message>
<location line="+7"/>
<source>%1 m</source>
<translation>%1 m</translation>
</message>
<message>
<location line="+5"/>
<source>%1 h</source>
<translation>%1 h</translation>
</message>
<message>
<location line="+2"/>
<source>%1 h %2 m</source>
<translation>%1 h %2 m</translation>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+179"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Bitcoins überweisen</translation>
</message>
<message>
<location line="+76"/>
<source>Coin Control Features</source>
<translation>"Coin Control"-Funktionen</translation>
</message>
<message>
<location line="+20"/>
<source>Inputs...</source>
<translation>Eingaben...</translation>
</message>
<message>
<location line="+7"/>
<source>automatically selected</source>
<translation>automatisch ausgewählt</translation>
</message>
<message>
<location line="+19"/>
<source>Insufficient funds!</source>
<translation>Unzureichender Kontostand!</translation>
</message>
<message>
<location line="+77"/>
<source>Quantity:</source>
<translation>Anzahl:</translation>
</message>
<message>
<location line="+22"/>
<location line="+35"/>
<source>0</source>
<translation>0</translation>
</message>
<message>
<location line="-19"/>
<source>Bytes:</source>
<translation>Byte:</translation>
</message>
<message>
<location line="+51"/>
<source>Amount:</source>
<translation>Betrag:</translation>
</message>
<message>
<location line="+54"/>
<source>Fee:</source>
<translation>Gebühr:</translation>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation>Zu geringer Ausgabebetrag:</translation>
</message>
<message>
<location line="+19"/>
<source>no</source>
<translation>nein</translation>
</message>
<message>
<location line="+32"/>
<source>After Fee:</source>
<translation>Abzüglich Gebühr:</translation>
</message>
<message>
<location line="+35"/>
<source>Change</source>
<translation>Wechselgeld</translation>
</message>
<message>
<location line="+50"/>
<source>custom change address</source>
<translation>Standard Adresse für Wechselgeld</translation>
</message>
<message>
<location line="+106"/>
<source>Send to multiple recipients at once</source>
<translation>In einer Transaktion an mehrere Empfänger auf einmal überweisen</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation>Empfänger &hinzufügen</translation>
</message>
<message>
<location line="+16"/>
<source>Remove all transaction fields</source>
<translation>Alle "Nachricht verifizieren"-Felder zurücksetzen</translation>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>&Zurücksetzen</translation>
</message>
<message>
<location line="+24"/>
<source>Balance:</source>
<translation>Kontostand:</translation>
</message>
<message>
<location line="+47"/>
<source>Confirm the send action</source>
<translation>Überweisung bestätigen</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>&Überweisen</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-171"/>
<source>Enter a BitcoinTrust address (e.g. TVqVV4t1fmqawZVkcJZaUmnkz9ZGNmk6t3)</source>
<translation>Empfängeradresse (z.b. TVqVV4t1fmqawZVkcJZaUmnkz9ZGNmk6t3)</translation>
</message>
<message>
<location line="+15"/>
<source>Copy quantity</source>
<translation>Anzahl kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Betrag kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy fee</source>
<translation>Gebühr kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation>Abzüglich Gebühr kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation>Byte kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation>Zu geringen Ausgabebetrag kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation>Wechselgeld kopieren</translation>
</message>
<message>
<location line="+85"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> bis %2 (%3)</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Überweisung bestätigen</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>Sins Sie sicher, dass Sie an %1 versenden möchten?</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation>und</translation>
</message>
<message>
<location line="+29"/>
<source>The recipient address is not valid, please recheck.</source>
<translation>Die Zahlungsadresse ist ungültig, bitte nochmals überprüfen.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>Der zu zahlende Betrag muss größer als 0 sein.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>Der angegebene Betrag übersteigt Ihren Kontostand.</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>Der angegebene Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 Ihren Kontostand.</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>Doppelte Adresse gefunden, pro Überweisung kann an jede Adresse nur einmalig etwas überwiesen werden.</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation>Fehler: Erstellung der Transaktion fehlgeschlagen</translation>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+241"/>
<source>WARNING: Invalid BitcoinTrust address</source>
<translation>Warnung: Ungültige BitcoinTrust Adresse</translation>
</message>
<message>
<location line="+13"/>
<source>(no label)</source>
<translation>(keine Bezeichnung)</translation>
</message>
<message>
<location line="+4"/>
<source>WARNING: unknown change address</source>
<translation>Warnung: Unbekannte Wechselgeldadresse</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>Formular</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>&Betrag:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>&Empfänger:</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. TVqVV4t1fmqawZVkcJZaUmnkz9ZGNmk6t3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>Adressbezeichnung eingeben (diese wird zusammen mit der Adresse dem Adressbuch hinzugefügt)</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Bezeichnung:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation>Adresse aus dem Adressbuch auswählen</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Adresse aus der Zwischenablage einfügen</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation>Diesen Empfänger entfernen</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a BitcoinTrust address (e.g. TVqVV4t1fmqawZVkcJZaUmnkz9ZGNmk6t3)</source>
<translation>Empfängeradresse (z.b. TVqVV4t1fmqawZVkcJZaUmnkz9ZGNmk6t3)</translation>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation>Signaturen - eine Nachricht signieren / verifizieren</translation>
</message>
<message>
<location line="+13"/>
<location line="+124"/>
<source>&Sign Message</source>
<translation>Nachricht &signieren</translation>
</message>
<message>
<location line="-118"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation>Sie können Nachrichten mit ihren Adressen signieren, um den Besitz dieser Adressen zu beweisen. Bitte nutzen Sie diese Funktion mit Vorsicht und nehmen Sie sich vor Phishingangriffen in Acht. Signieren Sie nur Nachrichten, mit denen Sie vollständig einverstanden sind.</translation>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. TVqVV4t1fmqawZVkcJZaUmnkz9ZGNmk6t3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+203"/>
<source>Choose an address from the address book</source>
<translation>Eine Adresse aus dem Adressbuch wählen</translation>
</message>
<message>
<location line="-193"/>
<location line="+203"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-193"/>
<source>Paste address from clipboard</source>
<translation>Adresse aus der Zwischenablage einfügen</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation>Zu signierende Nachricht hier eingeben</translation>
</message>
<message>
<location line="+24"/>
<source>Copy the current signature to the system clipboard</source>
<translation>Aktuelle Signatur in die Zwischenablage kopieren</translation>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this BitcoinTrust address</source>
<translation>Signiere die Nachricht um zu beweisen das du Besitzer dieser BitcoinTrust Adresse bist.</translation>
</message>
<message>
<location line="+17"/>
<source>Reset all sign message fields</source>
<translation>Alle "Nachricht signieren"-Felder zurücksetzen</translation>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>&Zurücksetzen</translation>
</message>
<message>
<location line="-87"/>
<location line="+70"/>
<source>&Verify Message</source>
<translation>Nachricht &verifizieren</translation>
</message>
<message>
<location line="-64"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation>Geben Sie die signierende Adresse, Nachricht (achten Sie darauf Zeilenumbrüche, Leerzeichen, Tabulatoren usw. exakt zu kopieren) und Signatur unten ein, um die Nachricht zu verifizieren. Vorsicht, interpretieren Sie nicht mehr in die Signatur, als in der signierten Nachricht selber enthalten ist, um nicht von einem Man-in-the-middle-Angriff hinters Licht geführt zu werden.</translation>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. TVqVV4t1fmqawZVkcJZaUmnkz9ZGNmk6t3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified BitcoinTrust address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all verify message fields</source>
<translation>Alle "Nachricht verifizieren"-Felder zurücksetzen</translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a BitcoinTrust address (e.g. TVqVV4t1fmqawZVkcJZaUmnkz9ZGNmk6t3)</source>
<translation>Empfängeradresse (z.b. TVqVV4t1fmqawZVkcJZaUmnkz9ZGNmk6t3)</translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation>Auf "Nachricht signieren" klicken, um die Signatur zu erzeugen</translation>
</message>
<message>
<location line="+3"/>
<source>Enter BitcoinTrust signature</source>
<translation>BitcoinTrust Signatur eingeben</translation>
</message>
<message>
<location line="+85"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation>Die eingegebene Adresse ist ungültig.</translation>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation>Bitte überprüfen Sie die Adresse und versuchen Sie es erneut.</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation>Die eingegebene Adresse verweist nicht auf einen Schlüssel.</translation>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation>Wallet-Entsperrung wurde abgebrochen.</translation>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation>Privater Schlüssel zur eingegebenen Adresse ist nicht verfügbar.</translation>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation>Signierung der Nachricht fehlgeschlagen.</translation>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation>Nachricht signiert.</translation>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation>Die Signatur konnte nicht dekodiert werden.</translation>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation>Bitte überprüfen Sie die Signatur und versuchen Sie es erneut.</translation>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation>Die Signatur entspricht nicht dem Message Digest.</translation>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation>Verifikation der Nachricht fehlgeschlagen.</translation>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation>Nachricht verifiziert.</translation>
</message>
</context>
<context>
<name>TrafficGraphWidget</name>
<message>
<location filename="../trafficgraphwidget.cpp" line="+75"/>
<source>KB/s</source>
<translation>KB/s</translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+25"/>
<source>Open until %1</source>
<translation>Offen bis %1</translation>
</message>
<message>
<location line="+6"/>
<source>conflicted</source>
<translation>kollidiert</translation>
</message>
<message>
<location line="+2"/>
<source>%1/offline</source>
<translation>%1/offline</translation>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/unbestätigt</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 Bestätigungen</translation>
</message>
<message>
<location line="+17"/>
<source>Status</source>
<translation>Status</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation><numerusform>, über %n Knoten übertragen</numerusform><numerusform>, über %n Knoten übertragen</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation>Quelle</translation>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>Generiert</translation>
</message>
<message>
<location line="+5"/>
<location line="+13"/>
<source>From</source>
<translation>Von</translation>
</message>
<message>
<location line="+1"/>
<location line="+19"/>
<location line="+58"/>
<source>To</source>
<translation>An</translation>
</message>
<message>
<location line="-74"/>
<location line="+2"/>
<source>own address</source>
<translation>eigene Adresse</translation>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>Bezeichnung</translation>
</message>
<message>
<location line="+34"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>Gutschrift</translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation><numerusform>reift noch %n weiteren Block</numerusform><numerusform>reift noch %n weitere Blöcke</numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>nicht angenommen</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>Belastung</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>Transaktionsgebühr</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>Nettobetrag</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Nachricht signieren</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>Kommentar</translation>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation>Transaktions-ID</translation>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 20 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation>Generierte Coins müssen 20 Bestätigungen erhalten bevor sie verfügbar sind. Dieser Block wurde ans Netzwerk gesendet und der Blockkette angehängt als der Block generiert wurde. Wenn er der Blockkette nicht erfolgreich angehängt werden konnte, wird er den Status in "nicht Akzeptiert" ändern und wird nicht verfügbar sein. Das kann zufällig geschehen wenn eine andere Leitung den Block innerhalb von ein paar Sekunden generiert.</translation>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation>Debuginformationen</translation>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Transaktion</translation>
</message>
<message>
<location line="+5"/>
<source>Inputs</source>
<translation>Eingaben</translation>
</message>
<message>
<location line="+21"/>
<source>Amount</source>
<translation>Betrag</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>wahr</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>falsch</translation>
</message>
<message>
<location line="-202"/>
<source>, has not been successfully broadcast yet</source>
<translation>, wurde noch nicht erfolgreich übertragen</translation>
</message>
<message numerus="yes">
<location line="-36"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+67"/>
<source>unknown</source>
<translation>unbekannt</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>Transaktionsdetails</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Dieser Bereich zeigt eine detaillierte Beschreibung der Transaktion an</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+231"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Typ</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Betrag</translation>
</message>
<message>
<location line="+52"/>
<source>Open until %1</source>
<translation>Offen bis %1</translation>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Bestätigt (%1 Bestätigungen)</translation>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>Offen für %n weiteren Block</numerusform><numerusform>Offen für %n weitere Blöcke</numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Offline</source>
<translation>Nicht verbunden.</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed</source>
<translation>Unbestätigt:</translation>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation>wird Bestätigt (%1 von %2 Bestätigungen)</translation>
</message>
<message>
<location line="+6"/>
<source>Conflicted</source>
<translation>Konflikt</translation>
</message>
<message>
<location line="+3"/>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation>Unreif (%1 Bestätigungen, wird verfügbar sein nach %2)</translation>
</message>
<message>
<location line="+3"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Dieser Block wurde von keinem anderen Knoten empfangen und wird wahrscheinlich nicht angenommen werden!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Generiert, jedoch nicht angenommen</translation>
</message>
<message>
<location line="+42"/>
<source>Received with</source>
<translation>Empfangen über</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Empfangen von</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Überwiesen an</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Eigenüberweisung</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Erarbeitet</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(k.A.)</translation>
</message>
<message>
<location line="+194"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Transaktionsstatus. Fahren Sie mit der Maus über dieses Feld, um die Anzahl der Bestätigungen zu sehen.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Datum und Uhrzeit als die Transaktion empfangen wurde.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Art der Transaktion</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Zieladresse der Transaktion</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Der Betrag, der dem Kontostand abgezogen oder hinzugefügt wurde.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+54"/>
<location line="+17"/>
<source>All</source>
<translation>Alle</translation>
</message>
<message>
<location line="-16"/>
<source>Today</source>
<translation>Heute</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>Diese Woche</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Diesen Monat</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Letzten Monat</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Dieses Jahr</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Zeitraum...</translation>
</message>
<message>
<location line="+12"/>
<source>Received with</source>
<translation>Empfangen über</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Überwiesen an</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Eigenüberweisung</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Erarbeitet</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Andere</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Zu suchende Adresse oder Bezeichnung eingeben</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Minimaler Betrag</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Adresse kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Bezeichnung kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Betrag kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation>Transaktions-ID kopieren</translation>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>Bezeichnung bearbeiten</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>Transaktionsdetails anzeigen</translation>
</message>
<message>
<location line="+138"/>
<source>Export Transaction Data</source>
<translation>Exportiere Transaktionsdaten</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Kommagetrennte-Datei (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Bestätigt</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Typ</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Bezeichnung</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Betrag</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Fehler beim Exportieren</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Kann Datei nicht schreiben %1.</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>Zeitraum:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>bis</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+212"/>
<source>Sending...</source>
<translation>Wird gesendet...</translation>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+8"/>
<source>BitcoinTrust version</source>
<translation>BitcoinTrust Version</translation>
</message>
<message>
<location line="+1"/>
<source>Usage:</source>
<translation>Benutzung:</translation>
</message>
<message>
<location line="+1"/>
<source>Send command to -server or bitcointrustd</source>
<translation>Kommando versenden an -server oder bitcointrustd </translation>
</message>
<message>
<location line="+1"/>
<source>List commands</source>
<translation>Befehle auflisten</translation>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation>Hilfe zu einem Befehl erhalten</translation>
</message>
<message>
<location line="+1"/>
<source>Options:</source>
<translation>Optionen:</translation>
</message>
<message>
<location line="+2"/>
<source>Specify configuration file (default: bitcointrust.conf)</source>
<translation>Konfigurationsdatei angeben (Standard: bitcointrust.conf)</translation>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: bitcointrustd.pid)</source>
<translation>PID Datei angeben (Standard: bitcointrust.pid)</translation>
</message>
<message>
<location line="+2"/>
<source>Specify wallet file (within data directory)</source>
<translation>Wallet-Datei festlegen (innerhalb des Datenverzeichnisses)</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Datenverzeichnis festlegen</translation>
</message>
<message>
<location line="+163"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=bitcointrustrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "BitcoinTrust Alert" [email protected]
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-161"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Größe des Datenbankcaches in MB festlegen (Standard: 25)</translation>
</message>
<message>
<location line="+1"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation>Größe des Datenbankspeichers in MB festlegen (Standard: 100)</translation>
</message>
<message>
<location line="+5"/>
<source>Listen for connections on <port> (default: 19914 or testnet: 9914)</source>
<translation>Horche für verbindungen auf <Port> (Standard: 19914 oder Testnetz: 9914)</translation>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Maximal <n> Verbindungen zu Gegenstellen aufrechterhalten (Standard: 125)</translation>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Mit dem Knoten verbinden um Adressen von Gegenstellen abzufragen, danach trennen</translation>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation>Die eigene öffentliche Adresse angeben</translation>
</message>
<message>
<location line="+4"/>
<source>Bind to given address. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Always query for peer addresses via DNS lookup (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>Schwellenwert, um Verbindungen zu sich nicht konform verhaltenden Gegenstellen zu beenden (Standard: 100)</translation>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Anzahl Sekunden, während denen sich nicht konform verhaltenden Gegenstellen die Wiederverbindung verweigert wird (Standard: 86400)</translation>
</message>
<message>
<location line="+153"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation>Beim Einrichten des abzuhörenden RPC-Ports %u für IPv4 ist ein Fehler aufgetreten: %s</translation>
</message>
<message>
<location line="-126"/>
<source>Listen for JSON-RPC connections on <port> (default: 9913 or testnet: 19913)</source>
<translation>Horche für eingehende JSON-RPC Verbindungen auf <Port>(Standard: 9913 or Testnetz: 19913)</translation>
</message>
<message>
<location line="-16"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Kommandozeilenbefehle und JSON-RPC-Befehle annehmen</translation>
</message>
<message>
<location line="+1"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Als Hintergrunddienst starten und Befehle annehmen</translation>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation>Das Testnetz verwenden</translation>
</message>
<message>
<location line="-23"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>Eingehende Verbindungen annehmen (Standard: 1, wenn nicht -proxy oder -connect)</translation>
</message>
<message>
<location line="+160"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation>Beim Einrichten des abzuhörenden RPC-Ports %u für IPv6 ist ein Fehler aufgetreten, es wird auf IPv4 zurückgegriffen: %s</translation>
</message>
<message>
<location line="-84"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation>Warnung: -paytxfee ist auf einen sehr hohen Wert festgelegt! Dies ist die Gebühr die beim Senden einer Transaktion fällig wird.</translation>
</message>
<message>
<location line="+46"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong BitcoinTrust will not work properly.</source>
<translation>Wanung : Bitte prüfen Sie ob Datum und Uhrzeit richtig eingestellt sind. Wenn das Datum falsch ist wird BitcoinTrust nicht richtig funktionieren.</translation>
</message>
<message>
<location line="-19"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation>Warnung: Lesen von wallet.dat fehlgeschlagen! Alle Schlüssel wurden korrekt gelesen, Transaktionsdaten bzw. Adressbucheinträge fehlen aber möglicherweise oder sind inkorrekt.</translation>
</message>
<message>
<location line="-16"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation>Warnung: wallet.dat beschädigt, Rettung erfolgreich! Original wallet.dat wurde als wallet.{Zeitstempel}.dat in %s gespeichert. Falls ihr Kontostand oder Transaktionen nicht korrekt sind, sollten Sie von einer Datensicherung wiederherstellen.</translation>
</message>
<message>
<location line="-31"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation>Versucht private Schlüssel aus einer beschädigten wallet.dat wiederherzustellen</translation>
</message>
<message>
<location line="+5"/>
<source>Block creation options:</source>
<translation>Blockerzeugungsoptionen:</translation>
</message>
<message>
<location line="-66"/>
<source>Connect only to the specified node(s)</source>
<translation>Nur mit dem/den angegebenen Knoten verbinden</translation>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>Eigene IP-Adresse erkennen (Standard: 1, wenn abgehört wird und nicht -externalip)</translation>
</message>
<message>
<location line="+97"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>Fehler, es konnte kein Port abgehört werden. Wenn dies so gewünscht wird -listen=0 verwenden.</translation>
</message>
<message>
<location line="-2"/>
<source>Invalid -tor address: '%s'</source>
<translation>Ungültige -tor Adresse: '%s'</translation>
</message>
<message>
<location line="+4"/>
<source>Invalid amount for -reservebalance=<amount></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-85"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation>Maximale Größe, <n> * 1000 Byte, des Empfangspuffers pro Verbindung (Standard: 5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>Maximale Größe, <n> * 1000 Byte, des Sendepuffers pro Verbindung (Standard: 1000)</translation>
</message>
<message>
<location line="-16"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>Verbinde nur zu Knoten des Netztyps <net> (IPv4, IPv6 oder Tor)</translation>
</message>
<message>
<location line="+30"/>
<source>Prepend debug output with timestamp</source>
<translation>Debuginformationen einen Zeitstempel voranstellen</translation>
</message>
<message>
<location line="+36"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation>SSL-Optionen: (siehe Bitcoin-Wiki für SSL-Installationsanweisungen)</translation>
</message>
<message>
<location line="-34"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Rückverfolgungs- und Debuginformationen an die Konsole senden anstatt sie in die Datei debug.log zu schreiben</translation>
</message>
<message>
<location line="+33"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation>Maximale Blockgröße in Bytes festlegen (Standard: 250000)</translation>
</message>
<message>
<location line="-1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation>Minimale Blockgröße in Byte festlegen (Standard: 0)</translation>
</message>
<message>
<location line="-33"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>Verkleinere Datei debug.log beim Starten des Clients (Standard: 1, wenn kein -debug)</translation>
</message>
<message>
<location line="-41"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>Verbindungstimeout in Millisekunden festlegen (Standard: 5000)</translation>
</message>
<message>
<location line="+28"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>UPnP verwenden, um die Portweiterleitung einzurichten (Standard: 0)</translation>
</message>
<message>
<location line="-1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>UPnP verwenden, um die Portweiterleitung einzurichten (Standard: 1, wenn abgehört wird)</translation>
</message>
<message>
<location line="-25"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation>Proxy benutzen um versteckte Services zu erreichen (Standard: selbe Einstellung wie Proxy)</translation>
</message>
<message>
<location line="+45"/>
<source>Username for JSON-RPC connections</source>
<translation>Benutzername für JSON-RPC-Verbindungen</translation>
</message>
<message>
<location line="+50"/>
<source>Verifying database integrity...</source>
<translation>Überprüfe Datenbank Integrität...</translation>
</message>
<message>
<location line="+43"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation>Fehler: Brieftasche verschlüsselt, unfähig Transaktion zu erstellen</translation>
</message>
<message>
<location line="+2"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Error: Transaction creation failed!</source>
<translation>Fehler: Erstellung der Transaktion fehlgeschlagen</translation>
</message>
<message>
<location line="+2"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Warning</source>
<translation>Warnung</translation>
</message>
<message>
<location line="+1"/>
<source>Information</source>
<translation>Information</translation>
</message>
<message>
<location line="-7"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>Warnung: Diese Version is veraltet, Aktualisierung erforderlich!</translation>
</message>
<message>
<location line="-23"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat beschädigt, Rettung fehlgeschlagen</translation>
</message>
<message>
<location line="-55"/>
<source>Password for JSON-RPC connections</source>
<translation>Passwort für JSON-RPC-Verbindungen</translation>
</message>
<message>
<location line="-47"/>
<source>Connect through SOCKS5 proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation>Beim erstellen einer Transaktion werden eingaben kleiner als dieser Wert ignoriert (Standard 0,01)</translation>
</message>
<message>
<location line="+6"/>
<source>Output debugging information (default: 0, supplying <category> is optional)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>If <category> is not supplied, output all debugging information.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source><category> can be:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>JSON-RPC-Verbindungen von der angegebenen IP-Adresse erlauben</translation>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Sende Befehle an Knoten <ip> (Standard: 127.0.0.1)</translation>
</message>
<message>
<location line="+1"/>
<source>Wait for RPC server to start</source>
<translation>Bitte warten bis der RPC Server startet.</translation>
</message>
<message>
<location line="+1"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Kommando ausführen wenn der beste Block wechselt (%s im Kommando wird durch den Hash des Blocks ersetzt)</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Kommando ausführen wenn sich eine Wallet-Transaktion verändert (%s im Kommando wird durch die TxID ersetzt)</translation>
</message>
<message>
<location line="+3"/>
<source>Require a confirmations for change (default: 0)</source>
<translation>Benötigt eine Bestätigung zur Änderung (Standard: 0)</translation>
</message>
<message>
<location line="+1"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation>Kommando ausführen wenn eine relevante Meldung eingeht (%s in cmd wird von der Meldung ausgetauscht)</translation>
</message>
<message>
<location line="+3"/>
<source>Upgrade wallet to latest format</source>
<translation>Wallet auf das neueste Format aktualisieren</translation>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Größe des Schlüsselpools festlegen auf <n> (Standard: 100)</translation>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Blockkette erneut nach fehlenden Wallet-Transaktionen durchsuchen</translation>
</message>
<message>
<location line="+3"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Imports blocks from external blk000?.dat file</source>
<translation>Importiere Blöcke aus externer blk000?.dat Datei.</translation>
</message>
<message>
<location line="+1"/>
<source>Keep at most <n> MiB of unconnectable blocks in memory (default: %u)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>OpenSSL (https) für JSON-RPC-Verbindungen verwenden</translation>
</message>
<message>
<location line="+1"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Serverzertifikat (Standard: server.cert)</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Privater Serverschlüssel (Standard: server.pem)</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Initialization sanity check failed. BitcoinTrust is shutting down.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Error loading block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Error: Wallet unlocked for staking only, unable to create transaction.</source>
<translation>Fehler: Die Brieftasche wurde nur zur Zinserzeugung entsperrt. Transaktionen können nicht erzeugt werden.</translation>
</message>
<message>
<location line="-14"/>
<source>Error: Disk space is low!</source>
<translation>Warnung: Festplatte hat wenig freien Speicher</translation>
</message>
<message>
<location line="+1"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation>Dies ist eine pre-Release Version. Verwendung auf eigenes Risiko. Verwenden Sie diese Version nicht für das Minen oder als Anwendung für Händler / Dienstleistungen.</translation>
</message>
<message>
<location line="-135"/>
<source>This help message</source>
<translation>Dieser Hilfetext</translation>
</message>
<message>
<location line="+100"/>
<source>Wallet %s resides outside data directory %s.</source>
<translation>Wallet %s liegt außerhalb des Daten Verzeichnisses %s.</translation>
</message>
<message>
<location line="+46"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>Kann auf diesem Computer nicht an %s binden (von bind zurückgegebener Fehler %d, %s)</translation>
</message>
<message>
<location line="-136"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Erlaube DNS-Namensauflösung für -addnode, -seednode und -connect</translation>
</message>
<message>
<location line="+121"/>
<source>Loading addresses...</source>
<translation>Lade Adressen...</translation>
</message>
<message>
<location line="-10"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>Fehler beim Laden von wallet.dat: Wallet beschädigt</translation>
</message>
<message>
<location line="+4"/>
<source>Error loading wallet.dat: Wallet requires newer version of BitcoinTrust</source>
<translation>Fehler beim Laden wallet.dat. Brieftasche benötigt neuere Version der BitcoinTrust Brieftasche.</translation>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart BitcoinTrust to complete</source>
<translation>Brieftasche muss neu geschrieben werden. Starte die BitcoinTrust Brieftasche neu zum komplettieren.</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat</source>
<translation>Fehler beim Laden von wallet.dat</translation>
</message>
<message>
<location line="-15"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Ungültige Adresse in -proxy: '%s'</translation>
</message> | </message>
<message>
<location line="+3"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>Kann Adresse in -bind nicht auflösen: '%s'</translation>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>Kann Adresse in -externalip nicht auflösen: '%s'</translation>
</message>
<message>
<location line="-22"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Ungültiger Betrag für -paytxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+59"/>
<source>Sending...</source>
<translation>Wird gesendet...</translation>
</message>
<message>
<location line="+5"/>
<source>Invalid amount</source>
<translation>Ungültiger Betrag</translation>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation>Unzureichender Kontostand</translation>
</message>
<message>
<location line="-41"/>
<source>Loading block index...</source>
<translation>Lade Blockindex...</translation>
</message>
<message>
<location line="-105"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Mit dem Knoten verbinden und versuchen die Verbindung aufrecht zu halten</translation>
</message>
<message>
<location line="+131"/>
<source>Unable to bind to %s on this computer. BitcoinTrust is probably already running.</source>
<translation>Fehler beim anbinden %s auf diesem Computer. BlaclCoin Client läuft wahrscheinlich bereits.</translation>
</message>
<message>
<location line="-108"/>
<source>Fee per KB to add to transactions you send</source>
<translation>Gebühr pro KB, zusätzlich zur ausgehenden Transaktion</translation>
</message>
<message>
<location line="+40"/>
<source>How many blocks to check at startup (default: 500, 0 = all)</source>
<translation>Anzahl der zu prüfenden Blöcke bei Programmstart (Standard: 2500, 0 = alle)</translation>
</message>
<message>
<location line="+11"/>
<source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
<translation>Gültige Codierschlüssel (Standard: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Invalid amount for -mininput=<amount>: '%s'</source>
<translation>Ungültiger Betrag für -mininput=<amount>:'%s'</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. BitcoinTrust is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error initializing wallet database environment %s!</source>
<translation>Fehler beim Start der Wallet-Datenbank %s!</translation>
</message>
<message>
<location line="+15"/>
<source>Loading wallet...</source>
<translation>Lade Wallet...</translation>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation>Wallet kann nicht auf eine ältere Version herabgestuft werden</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot write default address</source>
<translation>Standardadresse kann nicht geschrieben werden</translation>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation>Durchsuche erneut...</translation>
</message>
<message>
<location line="+2"/>
<source>Done loading</source>
<translation>Laden abgeschlossen</translation>
</message>
<message>
<location line="+33"/>
<source>To use the %s option</source>
<translation>Zur Nutzung der %s Option</translation>
</message>
<message>
<location line="-27"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location line="+22"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation>Sie müssen den Wert rpcpassword=<passwort> in der Konfigurationsdatei angeben:
%s
Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.</translation>
</message>
</context>
</TS> | <message>
<location line="-1"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Unbekannter Netztyp in -onlynet angegeben: '%s'</translation> |
watcher.go | package store
import (
"context"
"strings"
"sync"
"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes"
"google.golang.org/grpc/codes"
"github.com/Scalingo/go-utils/logger"
"github.com/Scalingo/sand/config"
"github.com/Scalingo/sand/etcd"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
type EtcdWatcher interface {
WatchChan() clientv3.WatchChan
Close() error
}
type Registration interface {
EventChan() <-chan *clientv3.Event
Unregister()
}
type registration struct {
eventChan chan *clientv3.Event
Watcher Watcher
key string
}
func (r registration) EventChan() <-chan *clientv3.Event {
return r.eventChan
}
func (r registration) Unregister() {
r.Watcher.unregister(r.key)
}
type Watcher struct {
config *config.Config
prefix string
etcdWatcher EtcdWatcher
registrations map[string]registration
registrationsM *sync.RWMutex
}
type WatcherOpt func(w *Watcher)
func WithPrefix(prefix string) WatcherOpt {
return func(w *Watcher) {
prefix = prefixedKey(w.config, prefix)
w.prefix = prefix
}
}
func WithEtcdWatcher(etcdWatcher EtcdWatcher) WatcherOpt {
return func(w *Watcher) {
w.etcdWatcher = etcdWatcher
}
}
func NewWatcher(ctx context.Context, config *config.Config, opts ...WatcherOpt) (Watcher, error) {
log := logger.Get(ctx)
w := Watcher{
config: config,
registrations: make(map[string]registration),
registrationsM: &sync.RWMutex{},
}
for _, opt := range opts {
opt(&w)
}
if w.prefix == "" {
w.prefix = prefixedKey(w.config, "/")
}
log.Infof("create endpoints Watcher on prefix %v", w.prefix)
if w.etcdWatcher == nil {
etcdWatcher, err := etcd.NewWatcher(w.prefix)
if err != nil |
w.etcdWatcher = etcdWatcher
}
go func() {
w.watchModifications(ctx)
}()
return w, nil
}
func (w Watcher) watchModifications(ctx context.Context) {
log := logger.Get(ctx)
for res := range w.etcdWatcher.WatchChan() {
if err := res.Err(); err != nil {
// If the connection is canceled because grpc (HTTP/2) connection is
// closed as etcd restart We don't want to throw an error but just keep
// looping as the client will automatically reconnect.
if etcderr, ok := err.(rpctypes.EtcdError); ok && etcderr.Code() == codes.Canceled {
log.WithError(err).Info("watch response canceled, retry")
} else if err != nil {
log.WithError(err).Error("fail to handle watcher response")
}
continue
}
log.WithField("events_count", len(res.Events)).Debug("received events from etcd")
for _, event := range res.Events {
log.WithFields(logrus.Fields{
"event_key": string(event.Kv.Key), "event_type": event.Type,
}).Info("received event from etcd")
w.registrationsM.RLock()
for key, registration := range w.registrations {
if strings.HasPrefix(string(event.Kv.Key), key) {
registration.eventChan <- event
}
}
w.registrationsM.RUnlock()
}
}
}
func (w Watcher) Register(key string) (Registration, error) {
w.registrationsM.Lock()
defer w.registrationsM.Unlock()
key = prefixedKey(w.config, key)
if _, ok := w.registrations[key]; ok {
return registration{}, errors.Errorf("etcd Watcher registration already exists: %v", key)
}
c := make(chan *clientv3.Event, 10)
r := registration{
key: key,
eventChan: c,
Watcher: w,
}
w.registrations[key] = r
return r, nil
}
func (w Watcher) unregister(key string) {
w.registrationsM.Lock()
defer w.registrationsM.Unlock()
r, ok := w.registrations[key]
if !ok {
return
}
close(r.eventChan)
delete(w.registrations, key)
}
func (w Watcher) Close() error {
w.registrationsM.Lock()
for key, r := range w.registrations {
close(r.eventChan)
delete(w.registrations, key)
}
w.registrationsM.Unlock()
return w.etcdWatcher.Close()
}
| {
return Watcher{}, errors.Wrapf(err, "fail to create etcd Watcher on %v", w.prefix)
} |
1.js | function parseHashBangArgs(aURL) {
aURL = aURL || window.location.href;
var vars = {};
var hashes = aURL.slice(aURL.indexOf('#') + 1).split('&');
for(var i = 0; i < hashes.length; i++) {
var hash = hashes[i].split('=');
if(hash.length > 1) {
vars[hash[0]] = hash[1];
} else {
vars[hash[0]] = null;
}
}
return vars;
} | ||
State.js | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.statesMatch = exports.State = void 0;
const lib_1 = require("./lib");
class State {
constructor(stateDef) {
this.name = "default";
this.tags = [];
const pieces = stateDef.split(/\s+/g);
const states = pieces.filter(p => !p.startsWith("#"));
if (states.length !== 1) {
throw new Error("exactly one state required");
}
this.name = states[0];
this.tags = pieces
.filter(piece => piece.startsWith("#"))
.map(tag => tag.replace("#", ""));
}
static default() {
return new State("default");
}
static create(taggedState) {
return new State(taggedState);
}
get isTagged() {
return this.tags.length > 0;
}
toString() {
return `${this.name} ${this.stringifyTags()}`;
}
stringifyTags() {
return this.tags.map(tag => `#${tag}`).join(" ");
}
/**
* Test if this state's name mathces the provided name
*/
is(state) {
return this.name === state;
}
/**
* Test if two State objects match
*/
matches(state) {
return (this.name === state.name && lib_1.arrayEquals(this.tags, state.tags));
}
filterTags(cb) {
return this.tags.filter(cb);
}
hasTag(tag) {
return this.tags.includes(tag);
}
tag(tag) {
this.tags.push(tag);
return this;
}
unTag(tag) {
delete this.tags[this.tags.indexOf(tag)];
return this;
}
}
exports.State = State;
function | (state1, state2) {
if (state1 instanceof State) {
// eslint-disable-next-line no-param-reassign
state1 = state1.name;
}
if (state2 instanceof State) {
// eslint-disable-next-line no-param-reassign
state2 = state2.name;
}
return state1 === state2;
}
exports.statesMatch = statesMatch;
| statesMatch |
test_scala_unused_import_remover.py | # coding=utf-8
# Copyright 2011 Foursquare Labs Inc. All Rights Reserved
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
import unittest
from foursquare.source_code_analysis.scala.scala_unused_import_remover import ScalaUnusedImportRemover
class ScalaUnusedImportRemoverTest(unittest.TestCase):
def _do_test_remover(self, input_text, expected_text):
remover = ScalaUnusedImportRemover(False)
removed_text = remover.apply_to_text('test.scala', input_text).new_text
self.assertEqual(expected_text, removed_text)
def | (self):
self._do_test_remover(
"""
import scala.foo.Foo
import com.baz.Baz
import java.bar.Bar
if(Foo) {
Baz()
}
""",
"""
import scala.foo.Foo
import com.baz.Baz
if(Foo) {
Baz()
}
""")
def test_no_removal(self):
input_text = """
import scala.foo.Foo
import com.baz.Baz
import java.bar.Bar
if(Foo) {
Baz()
} else {
Bar
}
"""
self._do_test_remover(input_text, input_text)
def test_all_removal(self):
self._do_test_remover(
"""
import scala.foo.Foo
import com.baz.Baz
import java.bar.Bar
if(x) {
y()
}
""",
"""
if(x) {
y()
}
""")
def test_keep_only_wildcards(self):
self._do_test_remover(
"""
import scala.foo.Foo
import com.baz.Baz
import java.bar.Bar
import boo.biz._
if(x) {
y()
}
""",
"""
import boo.biz._
if(x) {
y()
}
""")
def test_keep_wildcards(self):
self._do_test_remover(
"""
import scala.foo.Foo
import com.baz.Baz
import java.bar.Bar
import boo.biz._
if(Foo) {
y()
}
""",
"""
import scala.foo.Foo
import boo.biz._
if(Foo) {
y()
}
""")
| test_basic_removal |
urls.py | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'povary.views.home', name='home'),
# url(r'^povary/', include('povary.foo.urls')),
url(r'^recipe_gallery/(?P<recipe_slug>.*)/$',
'gallery.views.recipe_gallery_upload', | ) | name='recipe_gallery_upload'
),
# url(r'^$', 'recipes.views.recipe_list', name='recipe_list'),
# url(r'^(?P<recipe_slug>.*)/$', 'recipes.views.recipe_details', name='recipe_details'), |
data_dir_to_fasta.py | import argparse
import logging
import os
from openfold.data import mmcif_parsing
from openfold.np import protein, residue_constants
def main(args):
|
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"data_dir", type=str,
help="Path to a directory containing mmCIF or .core files"
)
parser.add_argument(
"output_path", type=str,
help="Path to output FASTA file"
)
parser.add_argument(
"--raise_errors", type=bool, default=False,
help="Whether to crash on parsing errors"
)
args = parser.parse_args()
main(args)
| fasta = []
for fname in os.listdir(args.data_dir):
basename, ext = os.path.splitext(fname)
basename = basename.upper()
fpath = os.path.join(args.data_dir, fname)
if(ext == ".cif"):
with open(fpath, 'r') as fp:
mmcif_str = fp.read()
mmcif = mmcif_parsing.parse(
file_id=basename, mmcif_string=mmcif_str
)
if(mmcif.mmcif_object is None):
logging.warning(f'Failed to parse {fname}...')
if(args.raise_errors):
raise list(mmcif.errors.values())[0]
else:
continue
mmcif = mmcif.mmcif_object
for chain, seq in mmcif.chain_to_seqres.items():
chain_id = '_'.join([basename, chain])
fasta.append(f">{chain_id}")
fasta.append(seq)
elif(ext == ".core"):
with open(fpath, 'r') as fp:
core_str = fp.read()
core_protein = protein.from_proteinnet_string(core_str)
aatype = core_protein.aatype
seq = ''.join([
residue_constants.restypes_with_x[aatype[i]]
for i in range(len(aatype))
])
fasta.append(f">{basename}")
fasta.append(seq)
with open(args.output_path, "w") as fp:
fp.write('\n'.join(fasta)) |
factory.js | /**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
// MODULES //
var isFunction = require( '@stdlib/assert/is-function' );
var isCollection = require( '@stdlib/assert/is-collection' );
var PINF = require( '@stdlib/constants/math/float64-pinf' );
var validate = require( './validate.js' );
var limit = require( './limit.js' );
// MAIN //
/**
* Returns a function for testing whether all elements in a collection pass a test implemented by a predicate function.
*
* ## Notes
*
* - If a predicate function calls the provided callback with a truthy error argument, the function suspends execution and immediately calls the `done` callback for subsequent error handling.
* - This function does **not** guarantee that execution is asynchronous. To do so, wrap the `done` callback in a function which either executes at the end of the current stack (e.g., `nextTick`) or during a subsequent turn of the event loop (e.g., `setImmediate`, `setTimeout`).
*
*
* @param {Options} [options] - function options
* @param {*} [options.thisArg] - execution context
* @param {PositiveInteger} [options.limit] - maximum number of pending invocations at any one time
* @param {boolean} [options.series=false] - boolean indicating whether to wait for a previous invocation to complete before invoking a provided function for the next element in a collection
* @param {Function} predicate - predicate function to invoke for each element in a collection
* @throws {TypeError} options argument must be an object
* @throws {TypeError} must provide valid options
* @throws {TypeError} last argument must be a function
* @returns {Function} function which invokes the predicate function once for each element in a collection
*
* @example
* var readFile = require( '@stdlib/fs/read-file' );
*
* function predicate( file, next ) {
* var opts = {
* 'encoding': 'utf8'
* };
* readFile( file, opts, onFile );
*
* function onFile( error ) {
* if ( error ) {
* return next( null, false );
* }
* next( null, true );
* }
* }
*
* var opts = {
* 'series': true
* };
*
* // Create an `everyByAsync` function which invokes the predicate function for each collection element sequentially:
* var everyByAsync = factory( opts, predicate );
*
* // Create a collection over which to iterate:
* var files = [
* './beep.js',
* './boop.js'
* ];
*
* // Define a callback which handles results:
* function done( error, bool ) {
* if ( error ) {
* throw error;
* }
* if ( bool ) {
* console.log( 'Successfully read all files.' );
* } else {
* console.log( 'Was unable to read all files.' );
* }
* }
*
* // Try to read each element in `files`:
* everyByAsync( files, done );
*/
function factory( options, predicate ) {
var opts;
var err;
var f;
opts = {};
if ( arguments.length > 1 ) {
err = validate( opts, options );
if ( err ) {
throw err;
}
f = predicate;
} else {
f = options;
}
if ( !isFunction( f ) ) {
throw new TypeError( 'invalid argument. Last argument must be a function. Value: `'+f+'`.' );
}
if ( opts.series ) {
opts.limit = 1;
} else if ( !opts.limit ) {
opts.limit = PINF;
}
return everyByAsync;
/**
* Invokes a predicate function for each element in a collection.
*
* @private
* @param {Collection} collection - input collection
* @param {Callback} done - function to invoke upon completion
* @throws {TypeError} first argument must be a collection
* @throws {TypeError} last argument must be a function
* @returns {void}
*/
function | ( collection, done ) {
if ( !isCollection( collection ) ) {
throw new TypeError( 'invalid argument. First argument must be a collection. Value: `'+collection+'.`' );
}
if ( !isFunction( done ) ) {
throw new TypeError( 'invalid argument. Last argument must be a function. Value: `'+done+'`.' );
}
return limit( collection, opts, f, clbk );
/**
* Callback invoked upon completion.
*
* @private
* @param {*} [error] - error
* @param {boolean} bool - test result
* @returns {void}
*/
function clbk( error, bool ) {
if ( error ) {
return done( error, false );
}
done( null, bool );
}
}
}
// EXPORTS //
module.exports = factory;
| everyByAsync |
__init__.py | import os
import glob
import importlib
def _package_contents():
|
available = dict(_package_contents())
| for path in glob.glob(os.path.join(os.path.dirname(__file__), "*.py")):
path = os.path.basename(path)
if not path.startswith("_"):
module_name = path.replace(".py", "")
yield module_name, importlib.import_module(f"{__package__}.{module_name}") |
temperature.py | import numpy as np
import scipy as sp
import pandas as pd
import numbers
from typing import Callable, List, Union
import logging
from .base import Epsilon
from ..distance import SCALE_LIN
from ..sampler import Sampler
from ..storage import save_dict_to_json
logger = logging.getLogger("Epsilon")
class TemperatureBase(Epsilon):
"""
A temperature scheme handles the decrease of the temperatures employed
by a :class:`pyabc.acceptor.StochasticAcceptor` over time.
This class is not functional on its own, its derivatives must be used.
"""
class ListTemperature(TemperatureBase):
"""
Pass a list of temperature values to use successively.
Parameters
----------
values:
The array of temperatures to use successively.
For exact inference, finish with 1.
"""
def __init__(self, values: List[float]):
self.values = values
def __call__(self,
t: int) -> float:
return self.values[t]
class Temperature(TemperatureBase):
"""
This class implements a highly adaptive and configurable temperature
scheme. Via the argument `schemes`, arbitrary temperature schemes can be
passed to calculate the next generation's temperature, via `aggregate_fun`
one can define how to combine multiple guesses, via `initial_temperature`
the initial temperature can be set.
Parameters
----------
schemes: Union[Callable, List[Callable]], optional
Temperature schemes returning proposed
temperatures for the next time point, e.g.
instances of :class:`pyabc.epsilon.TemperatureScheme`.
aggregate_fun: Callable[List[float], float], optional
The function to aggregate the schemes by, of the form
``Callable[List[float], float]``.
Defaults to taking the minimum.
initial_temperature: float, optional
The initial temperature. If None provided, an AcceptanceRateScheme
is used.
enforce_exact_final_temperature: bool, optional
Whether to force the final temperature (if max_nr_populations < inf)
to be 1.0, giving exact inference.
log_file: str, optional
A log file for storing data of the temperature that are currently not
saved in the database. The data are saved in json format.
Properties
----------
max_nr_populations: int
The maximum number of iterations as passed to ABCSMC.
May be inf, but not all schemes can handle that (and will complain).
temperatures: Dict[int, float]
Times as keys and temperatures as values.
"""
def __init__(
self,
schemes: Union[Callable, List[Callable]] = None,
aggregate_fun: Callable[[List[float]], float] = None,
initial_temperature: float = None,
enforce_exact_final_temperature: bool = True,
log_file: str = None):
self.schemes = schemes
if aggregate_fun is None:
# use minimum over all proposed temperature values
aggregate_fun = min
self.aggregate_fun = aggregate_fun
if initial_temperature is None:
initial_temperature = AcceptanceRateScheme()
self.initial_temperature = initial_temperature
self.enforce_exact_final_temperature = enforce_exact_final_temperature
self.log_file = log_file
# to be filled later
self.max_nr_populations = None
self.temperatures = {}
self.temperature_proposals = {}
def initialize(self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
get_all_records: Callable[[], List[dict]],
max_nr_populations: int,
acceptor_config: dict):
self.max_nr_populations = max_nr_populations
# set default schemes
if self.schemes is None:
# this combination proved rather stable
acc_rate_scheme = AcceptanceRateScheme()
decay_scheme = (
ExpDecayFixedIterScheme() if np.isfinite(max_nr_populations)
else ExpDecayFixedRatioScheme())
self.schemes = [acc_rate_scheme, decay_scheme]
# set initial temperature for time t
self._update(t, get_weighted_distances, get_all_records,
1.0, acceptor_config)
def configure_sampler(self, sampler: Sampler):
if callable(self.initial_temperature):
self.initial_temperature.configure_sampler(sampler)
for scheme in self.schemes:
scheme.configure_sampler(sampler)
def update(self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
get_all_records: Callable[[], List[dict]],
acceptance_rate: float,
acceptor_config: dict):
# set temperature for time t
self._update(t, get_weighted_distances,
get_all_records, acceptance_rate,
acceptor_config)
def _update(self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
get_all_records: Callable[[], List[dict]],
acceptance_rate: float,
acceptor_config):
"""
Compute the temperature for time `t`.
"""
# scheme arguments
kwargs = dict(
t=t,
get_weighted_distances=get_weighted_distances,
get_all_records=get_all_records,
max_nr_populations=self.max_nr_populations,
pdf_norm=acceptor_config['pdf_norm'],
kernel_scale=acceptor_config['kernel_scale'],
prev_temperature=self.temperatures.get(t-1, None),
acceptance_rate=acceptance_rate,
)
if t >= self.max_nr_populations - 1 \
and self.enforce_exact_final_temperature:
# t is last time
temps = [1.0]
elif not self.temperatures: # need an initial value
if callable(self.initial_temperature):
# execute scheme
temps = [self.initial_temperature(**kwargs)]
elif isinstance(self.initial_temperature, numbers.Number):
temps = [self.initial_temperature]
else:
raise ValueError(
"Initial temperature must be a float or a callable")
else:
# evaluate schemes
temps = []
for scheme in self.schemes:
temp = scheme(**kwargs)
temps.append(temp)
# compute next temperature based on proposals and fallback
# should not be higher than before
fallback = self.temperatures[t-1] \
if t-1 in self.temperatures else np.inf
temperature = self.aggregate_fun(temps)
# also a value lower than 1.0 does not make sense
temperature = max(min(temperature, fallback), 1.0)
if not np.isfinite(temperature):
raise ValueError("Temperature must be finite.")
# record found value
self.temperatures[t] = temperature
# logging
logger.debug(f"Proposed temperatures for {t}: {temps}.")
self.temperature_proposals[t] = temps
if self.log_file:
save_dict_to_json(self.temperature_proposals, self.log_file)
def __call__(self,
t: int) -> float:
return self.temperatures[t]
class TemperatureScheme:
"""
A TemperatureScheme suggests the next temperature value. It is used as
one of potentially multiple schemes employed in the Temperature class.
This class is abstract.
Parameters
----------
t:
The time to compute for.
get_weighted_distances:
Callable to obtain the weights and kernel values to be used for
the scheme.
get_all_records:
Callable returning a List[dict] of all recorded particles.
max_nr_populations:
The maximum number of populations that are supposed to be taken.
pdf_norm:
The normalization constant c that will be used in the acceptance step.
kernel_scale:
Scale on which the pdf values are (linear or logarithmic).
prev_temperature:
The temperature that was used last time (or None if not applicable).
acceptance_rate:
The recently obtained rate.
"""
def __init__(self):
pass
def configure_sampler(self, sampler: Sampler):
"""
Modify the sampler. As in, and redirected from,
:func:`pyabc.epsilon.Temperature.configure_sampler`.
"""
def __call__(self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
get_all_records: Callable[[], List[dict]],
max_nr_populations: int,
pdf_norm: float,
kernel_scale: str,
prev_temperature: float,
acceptance_rate: float):
pass
class AcceptanceRateScheme(TemperatureScheme):
"""
Try to keep the acceptance rate constant at a value of
`target_rate`. Note that this scheme will fail to
reduce the temperature sufficiently in later iterations, if the
problem's inherent acceptance rate is lower, but it has been
observed to give big feasible temperature leaps in early iterations.
In particular, this scheme can be used to propose an initial temperature.
Parameters
----------
target_rate: float, optional
The target acceptance rate to match.
min_rate: float, optional
The minimum rate below which not to apply the acceptance step scheme
any more. Setting this to a value of e.g. 0.05 can make sense
1) because it may be unlikely that the acceptance rate scheme will
propose a useful temperature at such low acceptance levels, and
2) to avoid uneccessary computations.
"""
def __init__(self, target_rate: float = 0.3, min_rate: float = None):
self.target_rate = target_rate
self.min_rate = min_rate
def configure_sampler(self, sampler: Sampler):
sampler.sample_factory.record_rejected = True
def __call__(self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
get_all_records: Callable[[], List[dict]],
max_nr_populations: int,
pdf_norm: float,
kernel_scale: str,
prev_temperature: float,
acceptance_rate: float):
# check minimum rate
if self.min_rate is not None and acceptance_rate < self.min_rate:
return np.inf
# execute function (expensive if in calibration)
records = get_all_records()
# convert to dataframe for easier extraction
records = pd.DataFrame(records)
# previous and current transition densities
t_pd_prev = np.array(records['transition_pd_prev'], dtype=float)
t_pd = np.array(records['transition_pd'], dtype=float)
# acceptance kernel likelihoods
pds = np.array(records['distance'], dtype=float)
# compute importance weights
weights = t_pd / t_pd_prev
# len would suffice, but maybe rather not rely on things to be normed
weights /= sum(weights)
temperature = match_acceptance_rate(
weights, pds, pdf_norm, kernel_scale, self.target_rate)
return temperature
def match_acceptance_rate(
weights, pds, pdf_norm, kernel_scale, target_rate):
"""
For large temperature, changes become effective on an exponential scale,
thus we optimize the logarithm of the inverse temperature beta.
For a temperature close to 1, subtler changes are neccesary, however here
the logarhtm is nearly linear anyway.
"""
# objective function which we wish to find a root for
def obj(b):
beta = np.exp(b)
# compute rescaled posterior densities
if kernel_scale == SCALE_LIN:
acc_probs = (pds / pdf_norm) ** beta
else: # kernel_scale == SCALE_LOG
acc_probs = np.exp((pds - pdf_norm) * beta)
# to acceptance probabilities to be sure
acc_probs = np.minimum(acc_probs, 1.0)
# objective function
val = np.sum(weights * acc_probs) - target_rate
return val
# TODO the lower boundary min_b is somewhat arbitrary
min_b = -100
if obj(0) > 0:
# function is monotonically decreasing
# smallest possible value already > 0
b_opt = 0
elif obj(min_b) < 0:
# it is obj(-inf) > 0 always
logger.info("AcceptanceRateScheme: Numerics limit temperature.")
b_opt = min_b
else:
# perform binary search
b_opt = sp.optimize.bisect(obj, min_b, 0, maxiter=100000)
beta_opt = np.exp(b_opt)
temperature = 1. / beta_opt
return temperature
class ExpDecayFixedIterScheme(TemperatureScheme):
"""
The next temperature is set as
.. math::
T_j = T_{max}^{(n-j)/n}
where n denotes the number of populations, and j=1,...,n the iteration.
This translates to
.. math::
T_j = T_{j-1}^{(n-j)/(n-(j-1))}.
This ensures that a temperature of 1.0 is reached after exactly the
remaining number of steps.
So, in both cases the sequence of temperatures follows an exponential
decay, also known as a geometric progression, or a linear progression
in log-space.
Note that the formula is applied anew in each iteration.
This is advantageous if also other schemes are used s.t. T_{j-1}
is smaller than by the above.
Parameters
----------
alpha: float
Factor by which to reduce the temperature, if `max_nr_populations`
is infinite.
"""
def __init__(self):
pass
def __call__(self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
get_all_records: Callable[[], List[dict]],
max_nr_populations: int,
pdf_norm: float,
kernel_scale: str,
prev_temperature: float,
acceptance_rate: float):
# needs a finite number of iterations
if max_nr_populations == np.inf:
raise ValueError(
"The ExpDecayFixedIterScheme requires a finite "
"`max_nr_populations`.")
# needs a starting temperature
# if not available, return infinite temperature
if prev_temperature is None:
return np.inf
# base temperature
temp_base = prev_temperature
# how many steps left?
t_to_go = max_nr_populations - t
# compute next temperature according to exponential decay
temperature = temp_base ** ((t_to_go - 1) / t_to_go)
return temperature
class ExpDecayFixedRatioScheme(TemperatureScheme):
"""
The next temperature is chosen as
.. math::
T_j = \\alpha \\cdot T_{j-1}.
Like the :class:`pyabc.epsilon.ExpDecayFixedIterScheme`,
this yields a geometric progression, however with a fixed ratio,
irrespective of the number of iterations. If a finite number of
iterations is specified in ABCSMC, there is no influence on the final
jump to a temperature of 1.0.
This is quite similar to the :class:`pyabc.epsilon.DalyScheme`, although
simpler in implementation. The alpha value here corresponds to a value of
1 - alpha there.
Parameters
----------
alpha: float, optional
The ratio of subsequent temperatures.
min_rate: float, optional
A minimum acceptance rate. If this rate has been violated in the
previous iteration, the alpha value is increased.
max_rate: float, optional
Maximum rate to not be exceeded, otherwise the alpha value is
decreased.
"""
def __init__(self, alpha: float = 0.5,
min_rate: float = 1e-4, max_rate: float = 0.5):
self.alpha = alpha
self.min_rate = min_rate
self.max_rate = max_rate
self.alphas = {}
def __call__(self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
get_all_records: Callable[[], List[dict]],
max_nr_populations: int,
pdf_norm: float,
kernel_scale: str,
prev_temperature: float,
acceptance_rate: float):
if prev_temperature is None:
return np.inf
# previous alpha
alpha = self.alphas.get(t-1, self.alpha)
# check if acceptance rate criterion violated
if acceptance_rate > self.max_rate and t > 1:
logger.debug("ExpDecayFixedRatioScheme: "
"Reacting to high acceptance rate.")
alpha = max(alpha / 2, alpha - (1 - alpha) * 2)
if acceptance_rate < self.min_rate:
logger.debug("ExpDecayFixedRatioScheme: "
"Reacting to low acceptance rate.")
# increase alpha
alpha = alpha + (1 - alpha) / 2
# record
self.alphas[t] = alpha
# reduce temperature
temperature = self.alphas[t] * prev_temperature
return temperature
class PolynomialDecayFixedIterScheme(TemperatureScheme):
"""
Compute next temperature as pre-last entry in
>>> np.linspace(1, (temp_base)**(1 / temp_decay_exponent),
>>> t_to_go + 1) ** temp_decay_exponent)
Requires finite `max_nr_populations`.
Note that this is similar to the
:class:`pyabc.epsilon.ExpDecayFixedIterScheme`, which is
indeed the limit for `exponent -> infinity`. For smaller
exponent, the sequence makes larger steps for low temperatures. This
can be useful in cases, where lower temperatures (which are usually
more expensive) can be traversed in few larger steps, however also
the opposite may be true, i.e. that more steps at low temperatures
are advantageous.
Parameters
----------
exponent: float, optional
The exponent to use in the scheme.
"""
def __init__(self, exponent: float = 3):
self.exponent = exponent
def __call__(self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
get_all_records: Callable[[], List[dict]],
max_nr_populations: int,
pdf_norm: float,
kernel_scale: str,
prev_temperature: float,
acceptance_rate: float):
# needs a starting temperature
# if not available, return infinite temperature
if prev_temperature is None:
return np.inf
# base temperature
temp_base = prev_temperature
# check if we can compute a decay step
if max_nr_populations == np.inf:
raise ValueError("Can only perform PolynomialDecayScheme step "
"with a finite max_nr_populations.")
# how many steps left?
t_to_go = max_nr_populations - t
# compute sequence
temps = np.linspace(1, (temp_base)**(1 / self.exponent),
t_to_go+1) ** self.exponent
logger.debug(f"Temperatures proposed by polynomial decay method: "
f"{temps}.")
# pre-last step is the next step
temperature = temps[-2]
return temperature
class DalyScheme(TemperatureScheme):
"""
This scheme is loosely based on [#daly2017]_, however note that it does
not try to replicate it entirely. In particular, the implementation
of pyABC does not allow the sampling to be stopped when encountering
too low acceptance rates, such that this can only be done ex-posteriori
here.
Parameters
----------
alpha: float, optional
The ratio by which to decrease the temperature value. More
specifically, the next temperature is given as
`(1-alpha) * temperature`.
min_rate: float, optional
A minimum acceptance rate. If this rate has been violated in the
previous iteration, the alpha value is decreased.
.. [#daly2017] Daly Aidan C., Cooper Jonathan, Gavaghan David J.,
and Holmes Chris. "Comparing two sequential Monte Carlo samplers
for exact and approximate Bayesian inference on biological
models". Journal of The Royal Society Interface, 2017.
"""
def __init__(self, alpha: float = 0.5, min_rate: float = 1e-4):
self.alpha = alpha
self.min_rate = min_rate
self.k = {}
def __call__(self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
get_all_records: Callable[[], List[dict]],
max_nr_populations: int,
pdf_norm: float,
kernel_scale: str,
prev_temperature: float,
acceptance_rate: float):
# needs a starting temperature
# if not available, return infinite temperature
if prev_temperature is None:
return np.inf
# base temperature
temp_base = prev_temperature
# addressing the std, not the var
eps_base = np.sqrt(temp_base)
if not self.k:
# initial iteration
self.k[t - 1] = eps_base
k_base = self.k[t - 1]
if acceptance_rate < self.min_rate:
logger.debug("DalyScheme: Reacting to low acceptance rate.")
# reduce reduction
k_base = self.alpha * k_base
self.k[t] = min(k_base, self.alpha * eps_base)
eps = eps_base - self.k[t]
temperature = eps**2
return temperature
class FrielPettittScheme(TemperatureScheme):
"""
Basically takes linear steps in log-space. See [#vyshemirsky2008]_.
.. [#vyshemirsky2008] Vyshemirsky, Vladislav, and Mark A. Girolami.
"Bayesian ranking of biochemical system models."
Bioinformatics 24.6 (2007): 833-839.
"""
def __call__(self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
get_all_records: Callable[[], List[dict]],
max_nr_populations: int,
pdf_norm: float,
kernel_scale: str,
prev_temperature: float,
acceptance_rate: float):
# needs a starting temperature
# if not available, return infinite temperature
if prev_temperature is None:
return np.inf
# check if we can compute a decay step
if max_nr_populations == np.inf:
raise ValueError("Can only perform FrielPettittScheme step with a "
"finite max_nr_populations.")
# base temperature
temp_base = prev_temperature
beta_base = 1. / temp_base
# time to go
t_to_go = max_nr_populations - t
beta = beta_base + ((1. - beta_base) * 1 / t_to_go) ** 2
temperature = 1. / beta
return temperature
class EssScheme(TemperatureScheme):
"""
Try to keep the effective sample size (ESS) constant.
Parameters
----------
target_relative_ess: float
Targe relative effective sample size.
"""
def __init__(self, target_relative_ess: float = 0.8):
self.target_relative_ess = target_relative_ess
def __call__(self,
t: int,
get_weighted_distances: Callable[[], pd.DataFrame],
get_all_records: Callable[[], List[dict]],
max_nr_populations: int,
pdf_norm: float,
kernel_scale: str,
prev_temperature: float,
acceptance_rate: float):
# execute function (expensive if in calibration)
df = get_weighted_distances()
weights = np.array(df['w'], dtype=float)
pdfs = np.array(df['distance'], dtype=float)
# compute rescaled posterior densities
if kernel_scale == SCALE_LIN:
values = pdfs / pdf_norm
else: # kernel_scale == SCALE_LOG
values = np.exp(pdfs - pdf_norm)
# to probability mass function (i.e. normalize)
weights /= np.sum(weights)
target_ess = len(weights) * self.target_relative_ess
if prev_temperature is None:
beta_base = 0.0
else:
beta_base = 1. / prev_temperature
# objective to minimize
def obj(beta):
|
bounds = sp.optimize.Bounds(lb=np.array([beta_base]),
ub=np.array([1.]))
# TODO make more efficient by providing gradients
ret = sp.optimize.minimize(
obj, x0=np.array([0.5 * (1 + beta_base)]),
bounds=bounds)
beta = ret.x
temperature = 1. / beta
return temperature
def _ess(pdfs, weights, beta):
"""
Effective sample size (ESS) of importance samples.
"""
num = np.sum(weights * pdfs**beta)**2
den = np.sum((weights * pdfs**beta)**2)
return num / den
| return (_ess(values, weights, beta) - target_ess)**2 |
fancymail.py | from smtplib import SMTP
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from jinja2 import Environment, FileSystemLoader
import os
from_email = '[email protected]'
password = 'ArushiSinghal'
env = Environment(
loader=FileSystemLoader('./templates/'))
def get_contacts(filename):
"""
Return two lists names, emails containing names and email addresses
read from a file specified by filename.
"""
names = []
emails = []
with open(filename, mode='r', encoding='utf-8') as contacts_file:
for a_contact in contacts_file:
names.append(a_contact.split()[0])
emails.append(a_contact.split()[1])
return names, emails
def get_data():
data = []
data.append(
{
"movies": [
{
"title": 'Gone Girl',
"description": 'This is a fancy email'
},
{
"title": 'Delhi 6',
"description": 'Good movie'
},
{
"title": 'The Lion King',
"description": 'Roar'
},
{
"title": 'The Great Gatsby',
"description": ':o'
}
]
})
return data
def send_mail(bodyContent):
|
def send_movie_list():
json_data = get_data()
template = env.get_template('child.html')
output = template.render(data=json_data[0])
send_mail(output)
return "Mail sent successfully."
if __name__ == '__main__':
print(send_movie_list())
| names, emails = get_contacts('mycontacts.txt') # Read contacts
subject = 'Testing CSS/HTML again!'
server = SMTP('smtp-mail.outlook.com', 587)
server.starttls()
server.login(from_email, password)
for name, email in zip(names, emails):
message = MIMEMultipart()
message['Subject'] = subject
message['From'] = from_email
message['To'] = email
message.attach(MIMEText(bodyContent, "html"))
msgBody = message.as_string()
server.sendmail(from_email, email, msgBody)
del message
server.quit() |
conns_checker.rs | use crate::data::{IocEntryId, SearchType, IocId};
use crate::ioc_evaluator::IocEntrySearchResult;
use self::netstat::ProtocolSocketInfo;
use regex::Regex;
extern crate netstat;
pub struct ConnectionParameters {
pub ioc_id: IocId,
pub ioc_entry_id: IocEntryId,
pub search: SearchType,
pub name: String,
}
struct ConnectionParametersRegexed {
conn_param: ConnectionParameters,
regex: Option<Regex>,
}
pub fn check_conns(search_parameters: Vec<ConnectionParameters>) -> Vec<IocEntrySearchResult> {
if search_parameters.is_empty() {
return vec![]
}
info!("Connection search: Searching IOCs using open network connection search.");
let mut result: Vec<IocEntrySearchResult> = Vec::new();
let search_parameters: Vec<ConnectionParametersRegexed> = search_parameters.into_iter().filter_map(|sp| {
match sp.search {
SearchType::Exact => Some(ConnectionParametersRegexed { conn_param: sp, regex: None }),
SearchType::Regex => { | Ok(regex) => Some(ConnectionParametersRegexed { conn_param: sp, regex: Some(regex) }),
Err(err) => {
error!("Connection search: {}", err);
None
}
}
}
}
}).collect();
let af_flags = netstat::AddressFamilyFlags::IPV4 | netstat::AddressFamilyFlags::IPV6;
let proto_flags = netstat::ProtocolFlags::TCP;
netstat::get_sockets_info(
af_flags,
proto_flags,
).unwrap().iter()
.filter_map(|socket|
match &socket.protocol_socket_info {
ProtocolSocketInfo::Tcp(tcp_socket) => Some(tcp_socket),
ProtocolSocketInfo::Udp(_) => None,
}
)
.filter(|socket| !socket.remote_addr.is_loopback())
.filter(|socket| !socket.remote_addr.is_unspecified())
.for_each(|socket| {
let remote_address = &socket.remote_addr;
let remote_address_name = dns_lookup::lookup_addr(remote_address);
search_parameters.iter().for_each(|sp| {
if remote_address_name.is_ok() {
debug!("Connection search: Checking address {} for IOC {}", remote_address_name.as_ref().unwrap(), &sp.conn_param.name);
check_item(remote_address_name.as_ref().unwrap(), sp, &mut result)
}
});
});
result
}
fn check_item(
address_name: &String,
sp: &ConnectionParametersRegexed,
result: &mut Vec<IocEntrySearchResult>,
) {
let matches = match &sp.regex {
None => &sp.conn_param.name == address_name,
Some(regex) => regex.is_match(address_name),
};
if matches {
let message =
format!("Connection search: Found connection {} for IOC {}",
address_name.clone(),
sp.conn_param.ioc_id
);
info!("{}", message);
result.push(IocEntrySearchResult {
ioc_id: sp.conn_param.ioc_id,
ioc_entry_id: sp.conn_param.ioc_entry_id,
description: message
});
}
} | match Regex::new(&sp.name) { |
issue-12612.rs | // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
| extern crate issue_12612_1 as foo;
use foo::bar;
mod test {
use bar::foo;
//~^ ERROR unresolved import `bar::foo`. Maybe a missing `extern crate bar`?
}
fn main() {} | // aux-build:issue_12612_1.rs
|
test_coin_collector.py | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
import textworld
from textworld.challenges import coin_collector
def test_making_coin_collector():
expected = {
1: {"quest_length": 1, "nb_rooms": 1},
100: {"quest_length": 100, "nb_rooms": 100},
101: {"quest_length": 1, "nb_rooms": 2},
200: {"quest_length": 100, "nb_rooms": 200},
201: {"quest_length": 1, "nb_rooms": 3},
300: {"quest_length": 100, "nb_rooms": 300},
}
for level in [1, 100, 101, 200, 201, 300]:
options = textworld.GameOptions() |
settings = {"level": level}
game = coin_collector.make(settings, options)
assert len(game.quests[0].commands) == expected[level]["quest_length"]
assert len(game.world.rooms) == expected[level]["nb_rooms"] | options.seeds = 1234 |
database.rs | use async_trait::async_trait;
use crate::{common, models::Account};
#[async_trait]
pub trait StateReader {
async fn read_account_data(&self, address: common::Address) -> anyhow::Result<Option<Account>>;
async fn read_account_storage(
&self,
address: common::Address,
incarnation: common::Incarnation,
key: Option<common::Hash>,
) -> anyhow::Result<Option<&[u8]>>;
async fn read_account_code(
&self,
address: common::Address,
incarnation: common::Incarnation,
code_hash: common::Hash,
) -> anyhow::Result<Option<&[u8]>>;
async fn read_account_code_size(
&self,
address: common::Address,
incarnation: common::Incarnation,
code_hash: common::Hash,
) -> anyhow::Result<Option<&[u8]>>;
async fn read_account_incarnation(address: common::Address) -> anyhow::Result<Option<u64>>;
}
#[async_trait]
pub trait StateWriter {
async fn update_account_data(
&mut self,
address: common::Address,
original: &Account,
account: &Account,
) -> anyhow::Result<()>;
async fn update_account_code(
&mut self,
address: common::Address,
incarnation: common::Incarnation,
code_hash: common::Hash,
code: &[u8],
) -> anyhow::Result<()>;
async fn delete_account(
&mut self,
address: common::Address,
original: &Account,
) -> anyhow::Result<()>;
async fn write_account_storage(
&mut self,
address: common::Address,
incarnation: common::Incarnation,
key: Option<common::Hash>,
original: Option<common::Value>,
value: Option<common::Value>,
) -> anyhow::Result<()>;
async fn create_contract(&mut self, address: common::Address) -> anyhow::Result<()>;
}
#[async_trait]
pub trait WriterWithChangesets: StateWriter {
async fn write_changesets(&mut self) -> anyhow::Result<()>;
async fn write_history(&mut self) -> anyhow::Result<()>;
}
#[derive(Clone, Default, Debug)]
pub struct Noop;
#[async_trait]
impl StateWriter for Noop {
async fn update_account_data(
&mut self,
_: common::Address,
_: &Account,
_: &Account,
) -> anyhow::Result<()> {
Ok(())
}
async fn update_account_code(
&mut self,
_: common::Address,
_: common::Incarnation,
_: common::Hash,
_: &[u8],
) -> anyhow::Result<()> {
Ok(())
}
async fn delete_account(&mut self, _: common::Address, _: &Account) -> anyhow::Result<()> {
Ok(())
}
async fn write_account_storage(
&mut self,
_: common::Address,
_: common::Incarnation,
_: Option<common::Hash>,
_: Option<common::Value>,
_: Option<common::Value>,
) -> anyhow::Result<()> |
async fn create_contract(&mut self, _: common::Address) -> anyhow::Result<()> {
Ok(())
}
}
#[async_trait]
impl WriterWithChangesets for Noop {
async fn write_changesets(&mut self) -> anyhow::Result<()> {
Ok(())
}
async fn write_history(&mut self) -> anyhow::Result<()> {
Ok(())
}
}
| {
Ok(())
} |
zflat10-pb.rs | extern crate snap_0_2_4 ; extern crate lolbench_support ; use lolbench_support
:: { criterion_from_env , init_logging } ; fn main ( ) | {
init_logging ( ) ; let mut crit = criterion_from_env ( ) ; snap_0_2_4 ::
zflat10_pb ( & mut crit ) ; } |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.